diff --git a/tgui/packages/tgui/interfaces/TTSSeedsExplorer.tsx b/tgui/packages/tgui/interfaces/TTSSeedsExplorer.tsx index 9742b50837e3..7ad5b98b3392 100644 --- a/tgui/packages/tgui/interfaces/TTSSeedsExplorer.tsx +++ b/tgui/packages/tgui/interfaces/TTSSeedsExplorer.tsx @@ -42,6 +42,7 @@ const donatorTiers = { 2: 'Tier II', 3: 'Tier III', 4: 'Tier IV', + 5: 'Tier V', }; const gender = { diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index 1761cdbc24ee..c7eaacf7c4f4 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -234,7 +234,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var V=(0,t.createLogger)("hotkeys"),k={},S=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],y={},p=function(s){if(s===16)return"Shift";if(s===17)return"Ctrl";if(s===18)return"Alt";if(s===33)return"Northeast";if(s===34)return"Southeast";if(s===35)return"Southwest";if(s===36)return"Northwest";if(s===37)return"West";if(s===38)return"North";if(s===39)return"East";if(s===40)return"South";if(s===45)return"Insert";if(s===46)return"Delete";if(s>=48&&s<=57||s>=65&&s<=90)return String.fromCharCode(s);if(s>=96&&s<=105)return"Numpad"+(s-96);if(s>=112&&s<=123)return"F"+(s-111);if(s===188)return",";if(s===189)return"-";if(s===190)return"."},l=function(s){var v=String(s);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(s.event.defaultPrevented||s.isModifierKey()||S.includes(s.code))){v==="F5"&&(s.event.preventDefault(),s.event.returnValue=!1);var g=p(s.code);if(g){var C=k[g];if(C)return V.debug("macro",C),Byond.command(C);if(s.isDown()&&!y[g]){y[g]=!0;var h='Key_Down "'+g+'"';return V.debug(h),Byond.command(h)}if(s.isUp()&&y[g]){y[g]=!1;var N='Key_Up "'+g+'"';return V.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function u(s){S.push(s)}return u}(),m=r.releaseHotKey=function(){function u(s){var v=S.indexOf(s);v>=0&&S.splice(v,1)}return u}(),i=r.releaseHeldKeys=function(){function u(){for(var s=0,v=Object.keys(y);s=75?c="green":l.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:l.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:l.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,l.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(m,i){return(0,e.createComponentVNode)(2,t.Box,{children:m},i)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){function m(){return p("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){function m(){return p("radio")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||l.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return p("wipe")}return m}()})})]})})})]})})})}return V}()},46817:function(I,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AIFixer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;if(l.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(l.stat===2||l.stat===null)&&(c=!1);var m=null;l.integrity>=75?m="green":l.integrity>=25?m="yellow":m="red";var i=!0;return l.integrity>=100&&l.stat!==2&&(i=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:l.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:m,value:l.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(d,u){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){function d(){return p("wireless")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){function d(){return p("radio")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!i||l.active,content:!i||l.active?"Already Repaired":"Repair",onClick:function(){function d(){return p("fix")}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})})]})})})}return V}()},20420:function(I,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(29723),V=r.APC=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,y)})})}return p}(),k={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},S={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.locked&&!d.siliconUser,s=d.normallyLocked,v=k[d.externalPower]||k[0],g=k[d.chargingStatus]||k[0],C=d.powerChannels||[],h=S[d.malfStatus]||S[0],N=d.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!u,color:d.isOperating?"":"bad",disabled:u,onClick:function(){function b(){return i("breaker")}return b}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:g.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:u,onClick:function(){function b(){return i("charge")}return b}()}),children:["[ ",g.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[C.map(function(b){var B=b.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:b.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:b.status>=2?"good":"bad",children:b.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!u&&(b.status===1||b.status===3),disabled:u,onClick:function(){function L(){return i("channel",B.auto)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!u&&b.status===2,disabled:u,onClick:function(){function L(){return i("channel",B.on)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!u&&b.status===0,disabled:u,onClick:function(){function L(){return i("channel",B.off)}return L}()})],4),children:[b.powerLoad," W"]},b.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[d.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,e.createFragment)([!!d.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){function b(){return i(h.action)}return b}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function b(){return i("overload")}return b}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",disabled:u,onClick:function(){function b(){return i("cover")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:d.emergencyLights?"Enabled":"Disabled",disabled:u,onClick:function(){function b(){return i("emergency_lighting")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",onClick:function(){function b(){return i("toggle_nightshift")}return b}()})})]})})],4)}},16822:function(I,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ATM=function(){function m(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.view_screen,C=v.authenticated_account,h=v.ticks_left_locked_down,N=v.linked_db,b;if(h>0)b=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)b=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(C)switch(g){case 1:b=(0,e.createComponentVNode)(2,k);break;case 2:b=(0,e.createComponentVNode)(2,S);break;case 3:b=(0,e.createComponentVNode)(2,l);break;default:b=(0,e.createComponentVNode)(2,y)}else b=(0,e.createComponentVNode)(2,p);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Section,{children:b})]})})}return m}(),V=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.machine_id,C=v.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"eject",onClick:function(){function h(){return s("insert_card")}return h}()})})})]})},k=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:g===0,onClick:function(){function C(){return s("change_security_level",{new_security_level:1})}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:g===2,onClick:function(){function C(){return s("change_security_level",{new_security_level:2})}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},S=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"targetAccNumber",0),C=g[0],h=g[1],N=(0,a.useLocalState)(d,"fundsAmount",0),b=N[0],B=N[1],L=(0,a.useLocalState)(d,"purpose",0),w=L[0],T=L[1],A=v.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return h(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return B(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return T(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return s("transfer",{target_acc_number:C,funds_amount:b,purpose:w})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},y=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"fundsAmount",0),C=g[0],h=g[1],N=v.owner_name,b=v.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function B(){return s("logout")}return B}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function B(L,w){return h(w)}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function B(){return s("withdrawal",{funds_amount:C})}return B}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function B(){return s("view_screen",{view_screen:1})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function B(){return s("view_screen",{view_screen:2})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function B(){return s("view_screen",{view_screen:3})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function B(){return s("balance_statement")}return B}()})})]})],4)},p=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"accountID",null),C=g[0],h=g[1],N=(0,a.useLocalState)(d,"accountPin",null),b=N[0],B=N[1],L=v.machine_id,w=v.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function T(A,x){return h(x)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function T(A,x){return B(x)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function T(){return s("attempt_auth",{account_num:C,account_pin:b})}return T}()})})]})})},l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),g.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:C.is_deposit?"green":"red",children:["$",C.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.target_name})]},C)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function g(){return s("view_screen",{view_screen:0})}return g}()})}},90698:function(I,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(99753),V=n(84947),k=n(51185),S=n(69774),y=r.AccountsUplinkTerminal=function(){function v(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.loginState,L=b.currentPage,w;if(B.logged_in)L===1?w=(0,e.createComponentVNode)(2,l):L===2?w=(0,e.createComponentVNode)(2,u):L===3&&(w=(0,e.createComponentVNode)(2,s));else return(0,e.createComponentVNode)(2,V.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,S.LoginScreen)})})});return(0,e.createComponentVNode)(2,V.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:w})]})})})}return v}(),p=function(g,C){var h=(0,t.useBackend)(C),N=h.data,b=(0,t.useLocalState)(C,"tabIndex",0),B=b[0],L=b[1],w=N.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:B===0,onClick:function(){function T(){return L(0)}return T}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:B===1,onClick:function(){function T(){return L(1)}return T}(),children:"Department Accounts"})]})})})},l=function(g,C){var h=(0,t.useLocalState)(C,"tabIndex",0),N=h[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.accounts,L=(0,t.useLocalState)(C,"searchText",""),w=L[0],T=L[1],A=(0,t.useLocalState)(C,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(C,"sortOrder",!0),R=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),B.filter((0,a.createSearch)(w,function(D){return D.owner_name+"|"+D.account_number+"|"+D.suspended+"|"+D.money})).sort(function(D,j){var F=R?1:-1;return D[x].localeCompare(j[x])*F}).map(function(D){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+D.suspended,onClick:function(){function j(){return N("view_account_detail",{account_num:D.account_number})}return j}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",D.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",D.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:D.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:D.money})]},D.account_number)})]})})})]})},m=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Balance"})]}),B.map(function(L){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+L.suspended,onClick:function(){function w(){return N("view_account_detail",{account_num:L.account_number})}return w}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",L.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",L.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.money})]},L.account_number)})]})})})})},i=function(g,C){var h=(0,t.useLocalState)(C,"sortId","name"),N=h[0],b=h[1],B=(0,t.useLocalState)(C,"sortOrder",!0),L=B[0],w=B[1],T=g.id,A=g.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==T&&"transparent",width:"100%",onClick:function(){function x(){N===T?w(!L):(b(T),w(!0))}return x}(),children:[A,N===T&&(0,e.createComponentVNode)(2,o.Icon,{name:L?"sort-up":"sort-down",ml:"0.25rem;"})]})})},d=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.is_printing,L=(0,t.useLocalState)(C,"searchText",""),w=L[0],T=L[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return N("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return T(E)}return A}()})})]})},u=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.account_number,L=b.owner_name,w=b.money,T=b.suspended,A=b.transactions,x=b.account_pin,E=b.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+B+" / "+L,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return N("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",B]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return N("set_account_pin",{account_number:B})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:w}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:T?"red":"green",children:[T?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:T?"Unsuspend":"Suspend",icon:T?"unlock":"lock",onClick:function(){function P(){return N("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},s=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=(0,t.useLocalState)(C,"accName",""),L=B[0],w=B[1],T=(0,t.useLocalState)(C,"accDeposit",""),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return N("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,R){return w(R)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,R){return x(R)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:L,starting_funds:A})}return E}()})]})}},66895:function(I,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AgentCard=function(){function S(y,p){var l=(0,a.useLocalState)(p,"tabIndex",0),c=l[0],m=l[1],i=function(){function d(u){switch(u){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);default:return(0,e.createComponentVNode)(2,V)}}return d}();return(0,e.createComponentVNode)(2,o.Window,{width:425,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:c===0,onClick:function(){function d(){return m(0)}return d}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:c===1,onClick:function(){function d(){return m(1)}return d}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),i(c)]})})})}return S}(),V=r.AgentCardInfo=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.registered_name,d=m.sex,u=m.age,s=m.assignment,v=m.associated_account_number,g=m.blood_type,C=m.dna_hash,h=m.fingerprint_hash,N=m.photo,b=m.ai_tracking;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,t.Button,{content:i||"[UNSET]",onClick:function(){function B(){return c("change_name")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){function B(){return c("change_sex")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"[UNSET]",onClick:function(){function B(){return c("change_age")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"[UNSET]",onClick:function(){function B(){return c("change_occupation")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:(0,e.createComponentVNode)(2,t.Button,{content:h||"[UNSET]",onClick:function(){function B(){return c("change_fingerprints")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Button,{content:g||"[UNSET]",onClick:function(){function B(){return c("change_blood_type")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"DNA Hash",children:(0,e.createComponentVNode)(2,t.Button,{content:C||"[UNSET]",onClick:function(){function B(){return c("change_dna_hash")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Money Account",children:(0,e.createComponentVNode)(2,t.Button,{content:v||"[UNSET]",onClick:function(){function B(){return c("change_money_account")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"Update":"[UNSET]",onClick:function(){function B(){return c("change_photo")}return B}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button,{content:"Delete Card Info",onClick:function(){function B(){return c("delete_info")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button,{content:"Reset Access",onClick:function(){function B(){return c("clear_access")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{content:b?"Untrackable":"Trackable",onClick:function(){function B(){return c("change_ai_tracking")}return B}()})})]})})})],4)}return S}(),k=r.AgentCardAppearances=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=(0,a.useLocalState)(p,"selectedAppearance",null),d=i[0],u=i[1],s=m.appearances;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:s.map(function(v){return(0,e.createComponentVNode)(2,t.Button,{compact:!0,m:.5,color:"translucent",selected:v===d,content:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+v.image,style:{width:"64px","vertical-align":"middle","-ms-interpolation-mode":"nearest-neighbor"},onClick:function(){function g(){u(v),c("change_appearance",{new_appearance:v.name})}return g}()})},v.name)})})})}return S}()},26354:function(I,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},V=r.AiAirlock=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=f[c.power.main]||f[0],i=f[c.power.backup]||f[0],d=f[c.shock]||f[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function u(){return l("disrupt-main")}return u}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:i.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function u(){return l("disrupt-backup")}return u}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:d.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function u(){return l("shock-restore")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function u(){return l("shock-temp")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function u(){return l("shock-perm")}return u}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function u(){return l("idscan-toggle")}return u}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function u(){return l("emergency-toggle")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function u(){return l("bolt-toggle")}return u}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function u(){return l("light-toggle")}return u}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function u(){return l("safe-toggle")}return u}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function u(){return l("speed-toggle")}return u}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function u(){return l("open-close")}return u}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return k}()},26673:function(I,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(29723),V=r.AirAlarm=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:h?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,S),!h&&(0,e.createFragment)([(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p)],4)]})})}return d}(),k=function(u){return u===0?"green":u===1?"orange":"red"},S=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.air,N=C.mode,b=C.atmos_alarm,B=C.locked,L=C.alarmActivated,w=C.rcon,T=C.target_temp,A;return h.danger.overall===0?b===0?A="Optimal":A="Caution: Atmos alert in area":h.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.pressure})," kPa",!B&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return g("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.oxygen/100,fractionDigits:"1",color:k(h.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.nitrogen/100,fractionDigits:"1",color:k(h.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.co2/100,fractionDigits:"1",color:k(h.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.plasma/100,fractionDigits:"1",color:k(h.danger.plasma)})}),h.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.n2o/100,fractionDigits:"1",color:k(h.danger.n2o)})}),h.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.other/100,fractionDigits:"1",color:k(h.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature})," K /"," ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:T+" C",onClick:function(){function x(){return g("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:h.thermostat_state?"On":"Off",selected:h.thermostat_state,icon:"power-off",onClick:function(){function x(){return g("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.overall),children:[A,!B&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:L?"Reset Alarm":"Activate Alarm",selected:L,onClick:function(){function x(){return g(L?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:w===1,onClick:function(){function x(){return g("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:w===2,onClick:function(){function x(){return g("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:w===3,onClick:function(){function x(){return g("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},y=function(u,s){var v=(0,a.useLocalState)(s,"tabIndex",0),g=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===0,onClick:function(){function h(){return C(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===1,onClick:function(){function h(){return C(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===2,onClick:function(){function h(){return C(2)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===3,onClick:function(){function h(){return C(3)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},p=function(u,s){var v=(0,a.useLocalState)(s,"tabIndex",0),g=v[0],C=v[1];switch(g){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,i);default:return"WE SHOULDN'T BE HERE!"}},l=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.vents;return h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function b(){return g("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function b(){return g("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function b(){return g("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function b(){return g("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function b(){return g("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function b(){return g("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return b}()})]})]})},N.name)})},c=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.scrubbers;return h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function b(){return g("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function b(){return g("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function b(){return g("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function b(){return g("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function b(){return g("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function b(){return g("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function b(){return g("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function b(){return g("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return b}()})]})]})},N.name)})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.modes,N=C.presets,b=C.emagged,B=C.mode,L=C.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:h.map(function(w){return(!w.emagonly||w.emagonly&&!!b)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:w.name,icon:"cog",selected:w.id===B,onClick:function(){function T(){return g("mode",{mode:w.id})}return T}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:N.map(function(w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:w.name,icon:"cog",selected:w.id===L,onClick:function(){function T(){return g("preset",{preset:w.id})}return T}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.name)})})]})],4)},i=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.settings.map(function(b){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:b.selected===-1?"Off":b.selected,onClick:function(){function B(){return g("command",{cmd:"set_threshold",env:b.env,var:b.val})}return B}()})},b.val)})]},N.name)})]})})}},98565:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AirlockAccessController=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.exterior_status,m=l.interior_status,i=l.processing,d,u;return c==="open"?d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:i,onClick:function(){function s(){return p("force_ext")}return s}()}):d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:i,onClick:function(){function s(){return p("cycle_ext_door")}return s}()}),m==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:i,color:m==="open"?"red":i?"yellow":null,onClick:function(){function s(){return p("force_int")}return s}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:i,onClick:function(){function s(){return p("cycle_int_door")}return s}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[d,u]})})]})})}return V}()},76385:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(14635),V=1,k=2,S=4,y=8,p=r.AirlockElectronics=function(){function m(i,d){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})})}return m}(),l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:g&S?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:S})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:g&k?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:k})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:g&y?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:y})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:g&V?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:V})}return C}()})})]})]})})},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.selected_accesses,C=v.one_access,h=v.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:C,content:"One",onClick:function(){function N(){return s("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!C,content:"All",onClick:function(){function N(){return s("set_one_access",{access:"all"})}return N}()})],4),accesses:h,selectedList:g,accessMod:function(){function N(b){return s("set",{access:b})}return N}(),grantAll:function(){function N(){return s("grant_all")}return N}(),denyAll:function(){function N(){return s("clear_all")}return N}(),grantDep:function(){function N(b){return s("grant_region",{region:b})}return N}(),denyDep:function(){function N(b){return s("deny_region",{region:b})}return N}()})}},55666:function(I,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(28823),a=n(2146),t=n(91819),o=n(31068),f=n(2971),V=n(84947),k=-1,S=1,y=r.AlertModal=function(){function c(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.autofocus,g=s.buttons,C=g===void 0?[]:g,h=s.large_buttons,N=s.message,b=N===void 0?"":N,B=s.timeout,L=s.title,w=(0,t.useLocalState)(i,"selected",0),T=w[0],A=w[1],x=110+(b.length>30?Math.ceil(b.length/4):0)+(b.length&&h?5:0),E=325+(C.length>2?100:0),P=function(){function R(M){T===0&&M===k?A(C.length-1):T===C.length-1&&M===S?A(0):A(T+M)}return R}();return(0,e.createComponentVNode)(2,V.Window,{title:L,height:x,width:E,children:[!!B&&(0,e.createComponentVNode)(2,a.Loader,{value:B}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function R(M){var D=window.event?M.which:M.keyCode;D===o.KEY_SPACE||D===o.KEY_ENTER?u("choose",{choice:C[T]}):D===o.KEY_ESCAPE?u("cancel"):D===o.KEY_LEFT?(M.preventDefault(),P(k)):(D===o.KEY_TAB||D===o.KEY_RIGHT)&&(M.preventDefault(),P(S))}return R}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:b})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,p,{selected:T})]})]})})})]})}return c}(),p=function(m,i){var d=(0,t.useBackend)(i),u=d.data,s=u.buttons,v=s===void 0?[]:s,g=u.large_buttons,C=u.swapped_buttons,h=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:C?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(N,b){return g&&v.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{button:N,id:b.toString(),selected:h===b})},b):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:g?1:0,children:(0,e.createComponentVNode)(2,l,{button:N,id:b.toString(),selected:h===b})},b)})})},l=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.large_buttons,g=m.button,C=m.selected,h=g.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:v?1:0,pt:v?.33:0,content:g,fluid:!!v,onClick:function(){function N(){return u("choose",{choice:g})}return N}(),selected:C,textAlign:"center",height:!!v&&2,width:!v&&h})}},16504:function(I,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AppearanceChanger=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.change_race,i=c.species,d=c.specimen,u=c.change_gender,s=c.gender,v=c.has_gender,g=c.change_eye_color,C=c.change_skin_tone,h=c.change_skin_color,N=c.change_head_accessory_color,b=c.change_hair_color,B=c.change_secondary_hair_color,L=c.change_facial_hair_color,w=c.change_secondary_facial_hair_color,T=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,R=c.head_accessory_style,M=c.change_hair,D=c.hair_styles,j=c.hair_style,F=c.change_hair_gradient,W=c.change_facial_hair,K=c.facial_hair_styles,_=c.facial_hair_style,$=c.change_head_markings,z=c.head_marking_styles,Y=c.head_marking_style,Z=c.change_body_markings,ie=c.body_marking_styles,ae=c.body_marking_style,se=c.change_tail_markings,he=c.tail_marking_styles,ye=c.tail_marking_style,Le=c.change_body_accessory,pe=c.body_accessory_styles,oe=c.body_accessory_style,Q=c.change_alt_head,q=c.alt_head_styles,ue=c.alt_head_style,me=!1;return(g||C||h||N||b||B||L||w||T||A||x)&&(me=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:i.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.specimen,selected:ne.specimen===d,onClick:function(){function be(){return l("race",{race:ne.specimen})}return be}()},ne.specimen)})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:s==="male",onClick:function(){function ne(){return l("gender",{gender:"male"})}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:s==="female",onClick:function(){function ne(){return l("gender",{gender:"female"})}return ne}()}),!v&&(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:s==="plural",onClick:function(){function ne(){return l("gender",{gender:"plural"})}return ne}()})]}),!!me&&(0,e.createComponentVNode)(2,V),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.headaccessorystyle,selected:ne.headaccessorystyle===R,onClick:function(){function be(){return l("head_accessory",{head_accessory:ne.headaccessorystyle})}return be}()},ne.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:D.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.hairstyle,selected:ne.hairstyle===j,onClick:function(){function be(){return l("hair",{hair:ne.hairstyle})}return be}()},ne.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function ne(){return l("hair_gradient")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ne(){return l("hair_gradient_offset")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ne(){return l("hair_gradient_colour")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ne(){return l("hair_gradient_alpha")}return ne}()})]}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:K.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.facialhairstyle,selected:ne.facialhairstyle===_,onClick:function(){function be(){return l("facial_hair",{facial_hair:ne.facialhairstyle})}return be}()},ne.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:z.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.headmarkingstyle,selected:ne.headmarkingstyle===Y,onClick:function(){function be(){return l("head_marking",{head_marking:ne.headmarkingstyle})}return be}()},ne.headmarkingstyle)})}),!!Z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:ie.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.bodymarkingstyle,selected:ne.bodymarkingstyle===ae,onClick:function(){function be(){return l("body_marking",{body_marking:ne.bodymarkingstyle})}return be}()},ne.bodymarkingstyle)})}),!!se&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:he.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.tailmarkingstyle,selected:ne.tailmarkingstyle===ye,onClick:function(){function be(){return l("tail_marking",{tail_marking:ne.tailmarkingstyle})}return be}()},ne.tailmarkingstyle)})}),!!Le&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:pe.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.bodyaccessorystyle,selected:ne.bodyaccessorystyle===oe,onClick:function(){function be(){return l("body_accessory",{body_accessory:ne.bodyaccessorystyle})}return be}()},ne.bodyaccessorystyle)})}),!!Q&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:q.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.altheadstyle,selected:ne.altheadstyle===ue,onClick:function(){function be(){return l("alt_head",{alt_head:ne.altheadstyle})}return be}()},ne.altheadstyle)})})]})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:m.map(function(i){return!!c[i.key]&&(0,e.createComponentVNode)(2,t.Button,{content:i.text,onClick:function(){function d(){return l(i.action)}return d}()},i.key)})})}},77280:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosAlertConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.priority||[],m=l.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(i){return(0,e.createVNode)(1,"li","color-bad",i,0,null,i)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(i){return(0,e.createVNode)(1,"li","color-average",i,0,null,i)})],0)})})})}return V}()},66274:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(99753),f=n(84947),V=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},k=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},S=r.AtmosControl=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=(0,a.useLocalState)(m,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:v===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),C(v)]})})})}return l}(),y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:V(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function g(){return d("open_alarm",{aref:v.ref})}return g}()})})]},v.name)})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.data,u=(0,a.useLocalState)(m,"zoom",1),s=u[0],v=u[1],g=d.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{onZoom:function(){function C(h){return v(h)}return C}(),children:g.filter(function(C){return C.z===3}).map(function(C){return(0,e.createComponentVNode)(2,t.NanoMap.Marker,{x:C.x,y:C.y,zoom:s,icon:"circle",tooltip:C.name,color:k(C.danger)},C.ref)})})})}},90588:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosFilter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.on,m=l.pressure,i=l.max_pressure,d=l.filter_type,u=l.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function s(){return p("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function s(){return p("min_pressure")}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:i,value:m,onDrag:function(){function s(v,g){return p("custom_pressure",{pressure:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function s(){return p("max_pressure")}return s}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Button,{selected:s.gas_type===d,content:s.label,onClick:function(){function v(){return p("set_filter",{filter:s.gas_type})}return v}()},s.label)})})]})})})})}return V}()},87486:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosMixer=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.on,i=c.pressure,d=c.max_pressure,u=c.node1_concentration,s=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:i===0,width:2.2,onClick:function(){function v(){return l("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:i,onDrag:function(){function v(g,C){return l("custom_pressure",{pressure:C})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:i===d,width:2.2,onClick:function(){function v(){return l("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,V,{node_name:"Node 1",node_ref:u}),(0,e.createComponentVNode)(2,V,{node_name:"Node 2",node_ref:s})]})})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.node_name,i=S.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:i===0,onClick:function(){function d(){return l("set_node",{node_name:m,concentration:(i-10)/100})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:i,onChange:function(){function d(u,s){return l("set_node",{node_name:m,concentration:s/100})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:i===100,onClick:function(){function d(){return l("set_node",{node_name:m,concentration:(i+10)/100})}return d}()})]})}},46714:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosPump=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.on,m=l.rate,i=l.max_rate,d=l.gas_unit,u=l.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function s(){return p("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function s(){return p("min_rate")}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:u,minValue:0,maxValue:i,value:m,onDrag:function(){function s(v,g){return p("custom_rate",{rate:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function s(){return p("max_rate")}return s}()})]})]})})})})}return V}()},66032:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(58331),f=n(30381),V=n(84947),k=r.AtmosTankControl=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.sensors||{};return(0,e.createComponentVNode)(2,V.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:[Object.keys(i).map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(i[d]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[i[d].pressure," kpa"]}):"",Object.keys(i[d]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[i[d].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(u){return Object.keys(i[d]).indexOf(u)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(u),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(u),value:i[d][u],minValue:0,maxValue:100,children:(0,o.toFixed)(i[d][u],2)+"%"})},(0,f.getGasLabel)(u)):""})]})},d)}),m.inlet&&Object.keys(m.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"inlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:m.inlet.rate,onDrag:function(){function d(u,s){return c("set_pressure",{dev:"inlet",val:s})}return d}()})})]})}):"",m.outlet&&Object.keys(m.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"outlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:m.outlet.rate,onDrag:function(){function d(u,s){return c("set_pressure",{dev:"outlet",val:s})}return d}()})})]})}):""]})})}return S}()},62343:function(I,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(28823),a=n(90955),t=n(72026),o=n(91819),f=n(2971),V=n(84947),k=n(37843),S=function(l,c,m,i){return l.requirements===null?!0:!(l.requirements.metal*i>c||l.requirements.glass*i>m)},y=r.Autolathe=function(){function p(l,c){var m=(0,o.useBackend)(c),i=m.act,d=m.data,u=d.total_amount,s=d.max_amount,v=d.metal_amount,g=d.glass_amount,C=d.busyname,h=d.busyamt,N=d.showhacked,b=d.buildQueue,B=d.buildQueueLen,L=d.recipes,w=d.categories,T=(0,o.useSharedState)(c,"category",0),A=T[0],x=T[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=g.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),R=u.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),D=M[0],j=M[1],F=(0,k.createSearch)(D,function($){return $.name}),W="";B>0&&(W=b.map(function($,z){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:b[z][0],onClick:function(){function Y(){return i("remove_from_queue",{remove_from_queue:b.indexOf($)+1})}return Y}()},$)},z)}));var K=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||D)&&(d.showhacked||!$.hacked)}),D&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(L),_="Build";return D?_="Results for: '"+D+"':":A&&(_="Build ("+A+")"),(0,e.createComponentVNode)(2,V.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:_,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:w,selected:A,onSelected:function(){function $(z){return x(z)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(z,Y){return j(Y)}return $}(),mb:1}),K.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===1,disabled:!S($,d.metal_amount,d.glass_amount,1),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:1})}return z}(),children:(0,k.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===10,disabled:!S($,d.metal_amount,d.glass_amount,10),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:10})}return z}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===25,disabled:!S($,d.metal_amount,d.glass_amount,25),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:25})}return z}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===$.max_multiplier,disabled:!S($,d.metal_amount,d.glass_amount,$.max_multiplier),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:$.max_multiplier})}return z}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(z){return(0,k.toTitleCase)(z)+": "+$.requirements[z]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:R}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[d.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[W,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!d.buildQueueLen,onClick:function(){function $(){return i("clear_queue")}return $}()})]})]})]})})})}return p}()},13940:function(I,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.BioChipPad=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.implant,m=l.contains_case;return(0,e.createComponentVNode)(2,o.Window,{width:410,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Bio-chip Mini-Computer",children:[c&&m?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function})]})],4):m?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"}),(0,e.createComponentVNode)(2,t.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!m,onClick:function(){function i(){return p("eject_case")}return i}()})]})})})}return V}()},55295:function(I,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48154),V=r.Biogenerator=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.data,u=i.config,s=d.container,v=d.processing,g=u.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:v,name:g}),(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y),s?(0,e.createComponentVNode)(2,p):(0,e.createComponentVNode)(2,k)]})})})}return l}(),k=function(c,m){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},S=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.biomass,v=u.container,g=u.container_curr_reagents,C=u.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:s}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),v?(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,maxValue:C,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:g+" / "+C+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.has_plants,v=u.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!s,tooltip:s?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function g(){return d("activate")}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!v,tooltip:v?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function g(){return d("detach_container")}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!s,tooltip:s?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function g(){return d("eject_plants")}return g}()})})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.biomass,v=u.product_list,g=(0,a.useSharedState)(m,"vendAmount",1),C=g[0],h=g[1],N=Object.entries(v).map(function(b,B){var L=Object.entries(b[1]).map(function(w){return w[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:b[0],open:!0,children:L.map(function(w){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:w.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[w.cost*C,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:sd&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!h&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),d>N&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i===0,tooltip:"Set to 0",onClick:function(){function L(){return l("set",{set_level:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:i===0,onClick:function(){function L(){return l("set",{set_level:d})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:i===0,tooltip:"Decrease one step",onClick:function(){function L(){return l("decrease")}return L}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{value:i,fillValue:d,minValue:0,color:B,maxValue:C,stepPixelSize:20,step:1,onChange:function(){function L(w,T){return l("set",{set_level:T})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:i===C,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function L(){return l("increase")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i===C,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function L(){return l("set",{set_level:C})}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Power Use",children:(0,f.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power for next level",children:(0,f.formatPower)(b)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(g)})]})})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:s})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:m.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:L.price>=u,onClick:function(){function w(){return l("vend",{target:L.key})}return w}(),content:L.price})},L.key)})})})})]})})]})})})}return k}()},31876:function(I,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],S=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],y={average:[.25,.5],bad:[.5,1/0]},p=function(b,B){for(var L=[],w=0;w0?b.filter(function(B){return!!B}).reduce(function(B,L){return(0,e.createFragment)([B,(0,e.createComponentVNode)(2,o.Box,{children:L},L)],0)},null):null},c=function(b){if(b>100){if(b<300)return"mild infection";if(b<400)return"mild infection+";if(b<500)return"mild infection++";if(b<700)return"acute infection";if(b<800)return"acute infection+";if(b<900)return"acute infection++";if(b>=900)return"septic"}return""},m=r.BodyScanner=function(){function N(b,B){var L=(0,t.useBackend)(B),w=L.data,T=w.occupied,A=w.occupant,x=A===void 0?{}:A,E=T?(0,e.createComponentVNode)(2,i,{occupant:x}):(0,e.createComponentVNode)(2,h);return(0,e.createComponentVNode)(2,f.Window,{width:690,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:E})})}return N}(),i=function(b){var B=b.occupant;return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,d,{occupant:B}),(0,e.createComponentVNode)(2,u,{occupant:B}),(0,e.createComponentVNode)(2,s,{occupant:B}),(0,e.createComponentVNode)(2,g,{organs:B.extOrgan}),(0,e.createComponentVNode)(2,C,{organs:B.intOrgan})]})},d=function(b,B){var L=(0,t.useBackend)(B),w=L.act,T=L.data,A=T.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"print",onClick:function(){function x(){return w("print_p")}return x}(),children:"Print Report"}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",onClick:function(){function x(){return w("ejectify")}return x}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:A.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:A.maxHealth,value:A.health/A.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:V[A.stat][0],children:V[A.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(A.bodyTempC,0)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(A.bodyTempF,0)}),"\xB0F"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Implants",children:A.implant_len?(0,e.createComponentVNode)(2,o.Box,{children:A.implant.map(function(x){return x.name}).join(", ")}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"None"})})]})})},u=function(b){var B=b.occupant;return B.hasBorer||B.blind||B.colourblind||B.nearsighted||B.hasVirus?(0,e.createComponentVNode)(2,o.Section,{title:"Abnormalities",children:k.map(function(L,w){if(B[L[0]])return(0,e.createComponentVNode)(2,o.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,o.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No abnormalities found."})})},s=function(b){var B=b.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,o.Table,{children:p(S,function(L,w,T){return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,v,{value:B[L[1]],marginBottom:T100)&&"average"||!!B.status.robotic&&"label",width:"33%",children:B.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",q:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:B.maxHealth,mt:L>0&&"0.5rem",value:B.totalLoss/B.maxHealth,ranges:y,children:[(0,e.createComponentVNode)(2,o.Box,{float:"left",inline:!0,children:[!!B.bruteLoss&&(0,e.createComponentVNode)(2,o.Tooltip,{position:"top",content:"Brute damage",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"bone"}),(0,a.round)(B.bruteLoss,0),"\xA0"]})}),!!B.fireLoss&&(0,e.createComponentVNode)(2,o.Tooltip,{position:"top",content:"Burn damage",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"fire"}),(0,a.round)(B.fireLoss,0)]})})]}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,a.round)(B.totalLoss,0)})]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",inline:!0,children:l([!!B.internalBleeding&&"Internal bleeding",!!B.burnWound&&"Critical tissue burns",!!B.lungRuptured&&"Ruptured lung",!!B.status.broken&&B.status.broken,c(B.germ_level),!!B.open&&"Open incision"])}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[l([!!B.status.splinted&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Splinted"}),!!B.status.robotic&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Robotic"}),!!B.status.dead&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",bold:!0,children:"DEAD"})]),l(B.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},C=function(b){return b.organs.length===0?(0,e.createComponentVNode)(2,o.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,o.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",children:"Injuries"})]}),b.organs.map(function(B,L){return(0,e.createComponentVNode)(2,o.Table.Row,{textTransform:"capitalize",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{color:!!B.dead&&"bad"||B.germ_level>100&&"average"||B.robotic>0&&"label",width:"33%",children:B.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:B.maxHealth,value:B.damage/B.maxHealth,mt:L>0&&"0.5rem",ranges:y,children:(0,a.round)(B.damage,0)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",inline:!0,children:l([c(B.germ_level)])}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:l([B.robotic===1&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Robotic"}),B.robotic===2&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Assisted"}),!!B.dead&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},h=function(){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},73440:function(I,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=n(92462),k=r.BookBinder=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.selectedbook,d=m.book_categories,u=[];return d.map(function(s){return u[s.description]=s.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function s(){return c("print_book")}return s}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.title,onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_title")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.author,onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_author")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:d.map(function(s){return s.description}),onSelected:function(){function s(v){return c("toggle_binder_category",{category_id:u[v]})}return s}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_summary")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:i.summary})]}),(0,e.createVNode)(1,"br"),d.filter(function(s){return i.categories.includes(s.category_id)}).map(function(s){return(0,e.createComponentVNode)(2,t.Button,{content:s.description,selected:!0,icon:"unlink",onClick:function(){function v(){return c("toggle_binder_category",{category_id:s.category_id})}return v}()},s.category_id)})]})})]})})})]})}return S}()},40730:function(I,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotClean=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.locked,i=c.noaccess,d=c.maintpanel,u=c.on,s=c.autopatrol,v=c.canhack,g=c.emagged,C=c.remote_disabled,h=c.painame,N=c.cleanblood;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:310,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:i,onClick:function(){function b(){return l("blood")}return b}()})}),h&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:h,disabled:i,onClick:function(){function b(){return l("ejectpai")}return b}()})})]})})}return k}()},36078:function(I,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotFloor=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.noaccess,i=c.painame,d=c.hullplating,u=c.replace,s=c.eat,v=c.make,g=c.fixfloor,C=c.nag_empty,h=c.magnet,N=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",disabled:m,onClick:function(){function b(){return l("autotile")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Replace floor tiles",disabled:m,onClick:function(){function b(){return l("replacetiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function b(){return l("fixfloors")}return b}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Finds tiles",disabled:m,onClick:function(){function b(){return l("eattiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function b(){return l("maketiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Transmit notice when empty",disabled:m,onClick:function(){function b(){return l("nagonempty")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Traction Magnets",disabled:m,onClick:function(){function b(){return l("anchored")}return b}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function b(){return l("ejectpai")}return b}()})})]})})}return k}()},89121:function(I,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotHonk=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.BotStatus)})})}return k}()},39805:function(I,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotMed=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.locked,i=c.noaccess,d=c.maintpanel,u=c.on,s=c.autopatrol,v=c.canhack,g=c.emagged,C=c.remote_disabled,h=c.painame,N=c.shut_up,b=c.declare_crit,B=c.stationary_mode,L=c.heal_threshold,w=c.injection_amount,T=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:i,onClick:function(){function E(){return l("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:b,disabled:i,onClick:function(){function E(){return l("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,disabled:i,onChange:function(){function E(P,R){return l("set_heal_threshold",{target:R})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:w.value,minValue:w.min,maxValue:w.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:i,onChange:function(){function E(P,R){return l("set_injection_amount",{target:R})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:T?"Beaker":"Internal Synthesizer",icon:T?"flask":"cogs",disabled:i,onClick:function(){function E(){return l("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:i,onClick:function(){function E(){return l("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:i,onClick:function(){function E(){return l("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:B,disabled:i,onClick:function(){function E(){return l("toggle_stationary_mode")}return E}()})]}),h&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:h,disabled:i,onClick:function(){function E(){return l("ejectpai")}return E}()})})]})})})}return k}()},35519:function(I,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotSecurity=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.noaccess,i=c.painame,d=c.check_id,u=c.check_weapons,s=c.check_warrant,v=c.arrest_mode,g=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:m,onClick:function(){function C(){return l("authid")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unauthorized Weapons",disabled:m,onClick:function(){function C(){return l("authweapon")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Wanted Criminals",disabled:m,onClick:function(){function C(){return l("authwarrant")}return C}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function C(){return l("arrtype")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function C(){return l("arrdeclare")}return C}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function C(){return l("ejectpai")}return C}()})})]})})}return k}()},71169:function(I,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(28823),a=n(84947),t=n(2971),o=n(91819),f=function(y,p){var l=y.cell,c=(0,o.useBackend)(p),m=c.act,i=l.cell_id,d=l.occupant,u=l.crimes,s=l.brigged_by,v=l.time_left_seconds,g=l.time_set_seconds,C=l.ref,h="";v>0&&(h+=" BrigCells__listRow--active");var N=function(){m("release",{ref:C})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:h,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:g})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},V=function(y){var p=y.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),p.map(function(l){return(0,e.createComponentVNode)(2,f,{cell:l},l.ref)})]})},k=r.BrigCells=function(){function S(y,p){var l=(0,o.useBackend)(p),c=l.act,m=l.data,i=m.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V,{cells:i})})})})})}return S}()},19070:function(I,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.BrigTimer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.occupant}):l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:l.occupant}));var c="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(c="exclamation-triangle"));var m=[],i=0;for(i=0;im?this.substring(0,m)+"...":this};var y=function(i,d){var u,s;if(!d)return[];var v=i.findIndex(function(g){return g.name===d.name});return[(u=i[v-1])==null?void 0:u.name,(s=i[v+1])==null?void 0:s.name]},p=function(i,d){d===void 0&&(d="");var u=(0,f.createSearch)(d,function(s){return s.name});return(0,t.flow)([(0,a.filter)(function(s){return s==null?void 0:s.name}),d&&(0,a.filter)(u),(0,a.sortBy)(function(s){return s.name})])(i)},l=r.CameraConsole=function(){function m(i,d){var u=(0,V.useBackend)(d),s=u.act,v=u.data,g=u.config,C=v.mapRef,h=v.activeCamera,N=p(v.cameras),b=y(N,h),B=b[0],L=b[1];return(0,e.createComponentVNode)(2,S.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),h&&h.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!B,onClick:function(){function w(){return s("switch_camera",{name:B})}return w}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!L,onClick:function(){function w(){return s("switch_camera",{name:L})}return w}()})],4),(0,e.createComponentVNode)(2,k.ByondUi,{className:"CameraConsole__map",params:{id:C,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(i,d){var u=(0,V.useBackend)(d),s=u.act,v=u.data,g=(0,V.useLocalState)(d,"searchText",""),C=g[0],h=g[1],N=v.activeCamera,b=p(v.cameras,C);return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function B(L,w){return h(w)}return B}()})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,scrollable:!0,children:b.map(function(B){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",N&&B.name===N.name&&"Button--selected"]),B.name.trimLongStr(23),0,{title:B.name,onClick:function(){function L(){return s("switch_camera",{name:B.name})}return L}()},B.name)})})})]})}return m}()},64487:function(I,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsole220=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(66586),f=n(37843),V=n(91819),k=n(2971),S=n(84947),y=function(d,u){var s,v;if(!u)return[];var g=d.findIndex(function(C){return C.name===u.name});return[(s=d[g-1])==null?void 0:s.name,(v=d[g+1])==null?void 0:v.name]},p=function(d,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(v){return v.name});return(0,t.flow)([(0,a.filter)(function(v){return v==null?void 0:v.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(v){return v.name})])(d)},l=r.CameraConsole220=function(){function i(d,u){var s=(0,V.useLocalState)(u,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,S.Window,{width:1170,height:755,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{children:(0,e.createComponentVNode)(2,k.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{width:v===1?"222px":"475px",textAlign:"center",children:(0,e.createComponentVNode)(2,k.Tabs,{fluid:!0,ml:v===1?1:0,mt:v===1?1:0,children:[(0,e.createComponentVNode)(2,k.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,k.Icon,{name:"map-marked-alt"})," \u041A\u0430\u0440\u0442\u0430"]},"Map"),(0,e.createComponentVNode)(2,k.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,k.Icon,{name:"table"})," \u0421\u043F\u0438\u0441\u043E\u043A"]},"List")]})}),C(v)]})})})})}return i}(),c=r.CameraConsoleMapContent=function(){function i(d,u){var s=(0,V.useBackend)(u),v=s.act,g=s.data,C=s.config,h=p(g.cameras),N=(0,V.useLocalState)(u,"zoom",1),b=N[0],B=N[1],L=g.mapRef,w=g.activeCamera,T=g.stationLevel,A=y(h,w),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,style:{display:"flex"},children:[(0,e.createComponentVNode)(2,k.Stack.Item,{height:"100%",style:{display:"flex",flex:"0 0 475px"},children:(0,e.createComponentVNode)(2,k.NanoMap,{onZoom:function(){function P(R){return B(R)}return P}(),children:h.filter(function(P){return P.z===T}).map(function(P){return(0,e.createComponentVNode)(2,k.NanoMap.NanoButton,{activeCamera:w,x:P.x,y:P.y,context:u,zoom:b,icon:"circle",tooltip:P.name,name:P.name,color:"blue",status:P.status},P.ref)})})}),(0,e.createComponentVNode)(2,k.Stack.Item,{height:"100%",resizable:!0,className:"CameraConsole__right_map",children:[(0,e.createVNode)(1,"div","CameraConsole__header",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),w&&w.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!x,onClick:function(){function P(){return v("switch_camera",{name:x})}return P}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!E,onClick:function(){function P(){return v("switch_camera",{name:E})}return P}()})],4)],4),(0,e.createComponentVNode)(2,k.ByondUi,{resizable:!0,className:"CameraConsole__map",overflow:"hidden",params:{id:L,type:"map"}})]})]})}return i}(),m=r.CameraConsoleOldContent=function(){function i(d,u){var s=(0,V.useBackend)(u),v=s.act,g=s.data,C=s.config,h=g.mapRef,N=g.activeCamera,b=(0,V.useLocalState)(u,"searchText",""),B=b[0],L=b[1],w=p(g.cameras,B),T=y(w,N),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,k.Stack.Item,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Input,{width:"215px",placeholder:"\u041D\u0430\u0439\u0442\u0438 \u043A\u0430\u043C\u0435\u0440\u0443",onInput:function(){function E(P,R){return L(R)}return E}()})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,scrollable:!0,children:w.map(function(E){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid",E.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",N&&E.name===N.name&&"Button--selected"]),E.name,0,{title:E.name,onClick:function(){function P(){return v("switch_camera",{name:E.name})}return P}()},E.name)})})})]})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),N&&N.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return v("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!x,onClick:function(){function E(){return v("switch_camera",{name:x})}return E}()})],4),(0,e.createComponentVNode)(2,k.ByondUi,{className:"CameraConsole__map",params:{id:h,type:"map"}})],4)]})}return i}()},21348:function(I,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(48300),V=n(84947),k=r.Canister=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.portConnected,d=m.tankPressure,u=m.releasePressure,s=m.defaultReleasePressure,v=m.minReleasePressure,g=m.maxReleasePressure,C=m.valveOpen,h=m.name,N=m.canLabel,b=m.colorContainer,B=m.color_index,L=m.hasHoldingTank,w=m.holdingTank,T="";B.prim&&(T=b.prim.options[B.prim].name);var A="";B.sec&&(A=b.sec.options[B.sec].name);var x="";B.ter&&(x=b.ter.options[B.ter].name);var E="";B.quart&&(E=b.quart.options[B.quart].name);var P=[],R=[],M=[],D=[],j=0;for(j=0;jh.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:h.total_positions-h.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:s.cooldown_time||!h.can_close,onClick:function(){function N(){return u("make_job_unavailable",{job:h.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:s.cooldown_time||!h.can_open,onClick:function(){function N(){return u("make_job_available",{job:h.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:s.priority_jobs.indexOf(h.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:h.is_priority?"Yes":"No",selected:h.is_priority,disabled:s.cooldown_time||!h.can_prioritize,onClick:function(){function N(){return u("prioritize_job",{job:h.title})}return N}()})})]},h.title)})]})})]}):C=(0,e.createComponentVNode)(2,S);break;case 2:!s.authenticated||!s.scan_name?C=(0,e.createComponentVNode)(2,S):s.modify_name?C=(0,e.createComponentVNode)(2,f.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(){function h(N){return u("set",{access:N})}return h}(),grantAll:function(){function h(){return u("grant_all")}return h}(),denyAll:function(){function h(){return u("clear_all")}return h}(),grantDep:function(){function h(N){return u("grant_region",{region:N})}return h}(),denyDep:function(){function h(N){return u("deny_region",{region:N})}return h}()}):C=(0,e.createComponentVNode)(2,y);break;case 3:s.authenticated?s.records.length?C=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||s.records.length===0||s.target_dept,onClick:function(){function h(){return u("wipe_all_logs")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.reason}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.deletedby})]},h.timestamp)})]}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||s.records.length===0,onClick:function(){function h(){return u("wipe_my_logs")}return h}()})})]}):C=(0,e.createComponentVNode)(2,p):C=(0,e.createComponentVNode)(2,S);break;case 4:!s.authenticated||!s.scan_name?C=(0,e.createComponentVNode)(2,S):C=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:h.buttontext,disabled:!h.demotable,onClick:function(){function N(){return u("remote_demote",{remote_demote:h.name})}return N}()})})]},h.title)})]})});break;default:C=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:g}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:C})]})})})}return c}()},62486:function(I,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(28823),a=n(90955),t=n(72026),o=n(91819),f=n(2971),V=n(84947),k=n(37843),S=r.CargoConsole=function(){function d(u,s){return(0,e.createComponentVNode)(2,V.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return d}(),y=function(u,s){var v=(0,o.useLocalState)(s,"contentsModal",null),g=v[0],C=v[1],h=(0,o.useLocalState)(s,"contentsModalTitle",null),N=h[0],b=h[1];if(g!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:g.map(function(B){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",B]},B)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function B(){C(null),b(null)}return B}()})})]})},p=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.is_public,N=C.timeleft,b=C.moving,B=C.at_station,L,w;return!b&&!B?(L="Docked off-station",w="Call Shuttle"):!b&&B?(L="Docked at the station",w="Return Shuttle"):b&&(w="In Transit...",N!==1?L="Shuttle is en route (ETA: "+N+" minutes)":L="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:L}),h===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:w,disabled:b,onClick:function(){function T(){return g("moveShuttle")}return T}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function T(){return g("showMessages")}return T}()})]})]})})})},l=function(u,s){var v,g=(0,o.useBackend)(s),C=g.act,h=g.data,N=h.accounts,b=(0,o.useLocalState)(s,"selectedAccount"),B=b[0],L=b[1],w=[];return N.map(function(T){return w[T.name]=T.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(T){return T.name}),selected:(v=N.filter(function(T){return T.account_UID===B})[0])==null?void 0:v.name,onSelected:function(){function T(A){return L(w[A])}return T}()}),N.filter(function(T){return T.account_UID===B}).map(function(T){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:T.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:T.balance})})]},T.account_UID)})]})})},c=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.categories,N=C.supply_packs,b=(0,o.useSharedState)(s,"category","Emergency"),B=b[0],L=b[1],w=(0,o.useSharedState)(s,"search_text",""),T=w[0],A=w[1],x=(0,o.useLocalState)(s,"contentsModal",null),E=x[0],P=x[1],R=(0,o.useLocalState)(s,"contentsModalTitle",null),M=R[0],D=R[1],j=(0,k.createSearch)(T,function(z){return z.name}),F=(0,o.useLocalState)(s,"selectedAccount"),W=F[0],K=F[1],_=(0,a.flow)([(0,t.filter)(function(z){return z.cat===h.filter(function(Y){return Y.name===B})[0].category||T}),T&&(0,t.filter)(j),(0,t.sortBy)(function(z){return z.name.toLowerCase()})])(N),$="Crate Catalogue";return T?$="Results for '"+T+"':":B&&($="Browsing "+B),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:$,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:h.map(function(z){return z.name}),selected:B,onSelected:function(){function z(Y){return L(Y)}return z}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function z(Y,Z){return A(Z)}return z}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:_.map(function(z){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[z.name," (",z.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!W,onClick:function(){function Y(){return g("order",{crate:z.ref,multiple:!1,account:W})}return Y}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!W,onClick:function(){function Y(){return g("order",{crate:z.ref,multiple:!0,account:W})}return Y}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function Y(){P(z.contents),D(z.name)}return Y}()})]})]},z.name)})})})]})})},m=function(u,s){var v=u.request,g,C;switch(v.department){case"Engineering":C="CE",g="orange";break;case"Medical":C="CMO",g="teal";break;case"Science":C="RD",g="purple";break;case"Supply":C="CT",g="brown";break;case"Service":C="HOP",g="olive";break;case"Security":C="HOS",g="red";break;case"Command":C="CAP",g="blue";break;case"Assistant":C="Any Head",g="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!v.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!v.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:g,content:C,disabled:v.req_cargo_approval,icon:"user-tie",tooltip:v.req_cargo_approval?"This Order first requires approval from the QM before the "+C+" can approve it":"This Order requires approval from the "+C+" still"})})]})},i=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.requests,N=C.orders,b=C.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:h.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.Box,{children:["Order #",B.ordernum,": ",B.supply_type," (",B.cost," credits) for"," ",(0,e.createVNode)(1,"b",null,B.orderedby,0)," with"," ",B.department?"The "+B.department+" Department":"Their Personal"," ","Account"]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]}),(0,e.createComponentVNode)(2,m,{request:B})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!B.can_approve,onClick:function(){function L(){return g("approve",{ordernum:B.ordernum})}return L}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!B.can_deny,onClick:function(){function L(){return g("deny",{ordernum:B.ordernum})}return L}()})]})]},B.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",B.ordernum,": ",B.supply_type," for ",(0,e.createVNode)(1,"b",null,B.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]})]})},B.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:b.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",B.ordernum,": ",B.supply_type," for ",(0,e.createVNode)(1,"b",null,B.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]})]})},B.ordernum)})})]})}},86885:function(I,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ChangelogView=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=(0,a.useLocalState)(S,"onlyRecent",0),m=c[0],i=c[1],d=l.cl_data,u=l.last_cl,s={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},v=function(){function g(C){return C in s?s[C]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return g}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function g(){return i(!m)}return g}()}),children:d.map(function(g){return!m&&g.merge_ts<=u||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:g.author+" - Merged on "+g.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+g.num,onClick:function(){function C(){return p("open_pr",{pr_number:g.num})}return C}()}),children:g.entries.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[v(C.etype)," ",C.etext]},C)})},g)})})})})}return V}()},56975:function(I,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(83326),f=n(84947),V=[1,5,10,20,30,50],k=[1,5,10],S=r.ChemDispenser=function(){function c(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+v.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l)]})})})}return c}(),y=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.amount,g=s.energy,C=s.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[g," / ",C," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:V.map(function(h,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===h,content:h,onClick:function(){function b(){return u("amount",{amount:h})}return b}()})},N)})})})]})})})},p=function(m,i){for(var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.chemicals,g=v===void 0?[]:v,C=[],h=0;h<(g.length+1)%3;h++)C.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:s.glass?"Drink Dispenser":"Chemical Dispenser",children:[g.map(function(N,b){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function B(){return u("dispense",{reagent:N.id})}return B}()},b)}),C.map(function(N,b){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},b)})]})})},l=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.isBeakerLoaded,g=s.beakerCurrentVolume,C=s.beakerMaxVolume,h=s.beakerContents,N=h===void 0?[]:h;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:s.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[g," / ",C," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function b(){return u("ejectBeaker")}return b}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:N,buttons:function(){function b(B){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function L(){return u("remove",{reagent:B.id,amount:-1})}return L}()}),k.map(function(L,w){return(0,e.createComponentVNode)(2,t.Button,{content:L,onClick:function(){function T(){return u("remove",{reagent:B.id,amount:L})}return T}()},w)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function L(){return u("remove",{reagent:B.id,amount:B.volume})}return L}()})],0)}return b}()})})})}},48734:function(I,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(83326),V=n(84947),k=r.ChemHeater=function(){function p(l,c){return(0,e.createComponentVNode)(2,V.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),S=function(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.targetTemp,s=d.targetTempReached,v=d.autoEject,g=d.isActive,C=d.currentTemp,h=d.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function N(){return i("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:g?"On":"Off",icon:"power-off",selected:g,disabled:!h,onClick:function(){function N(){return i("toggle_on")}return N}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(u,0),minValue:0,maxValue:1e3,onDrag:function(){function N(b,B){return i("adjust_temperature",{target:B})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:C,format:function(){function N(b){return(0,a.toFixed)(b)+" K"}return N}()})||"\u2014"})]})})})},y=function(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.isBeakerLoaded,s=d.beakerCurrentVolume,v=d.beakerMaxVolume,g=d.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!u&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[s," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function C(){return i("eject_beaker")}return C}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:u,beakerContents:g})})})}},35918:function(I,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(83326),V=n(22677),k=n(66586),S=n(50175),y=["icon"];function p(x,E){if(x==null)return{};var P={},R=Object.keys(x),M,D;for(D=0;D=0)&&(P[M]=x[M]);return P}function l(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,c(x,E)}function c(x,E){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(){function P(R,M){return R.__proto__=M,R}return P}(),c(x,E)}var m=(0,S.createLogger)("ChemMaster"),i=[1,5,10],d=function(E,P){var R=(0,a.useBackend)(P),M=R.act,D=R.data,j=E.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:D.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:j.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(j.desc||"").length>0?j.desc:"N/A"}),j.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:j.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:j.blood_dna})],4),!D.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:D.printing?"spinner":"print",disabled:D.printing,iconSpin:!!D.printing,ml:"0.5rem",content:"Print",onClick:function(){function F(){return M("print",{idx:j.idx,beaker:E.args.beaker})}return F}()})]})})})})},u=r.ChemMaster=function(){function x(E,P){var R=(0,a.useBackend)(P),M=R.data,D=M.condi,j=M.beaker,F=M.beaker_reagents,W=F===void 0?[]:F,K=M.buffer_reagents,_=K===void 0?[]:K,$=M.mode;return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s,{beaker:j,beakerReagents:W,bufferNonEmpty:_.length>0}),(0,e.createComponentVNode)(2,v,{mode:$,bufferReagents:_}),(0,e.createComponentVNode)(2,g,{isCondiment:D,bufferNonEmpty:_.length>0}),(0,e.createComponentVNode)(2,A)]})})]})}return x}(),s=function(E,P){var R=(0,a.useBackend)(P),M=R.act,D=E.beaker,j=E.beakerReagents,F=E.bufferNonEmpty;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:F?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!D,content:"Eject and Clear Buffer",onClick:function(){function W(){return M("eject")}return W}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!D,content:"Eject and Clear Buffer",onClick:function(){function W(){return M("eject")}return W}()}),children:D?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function W(K,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:F,buttons:function(){function W(K,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_1?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.oxy,inline:!0,children:x[0]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.toxin,inline:!0,children:x[2]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.brute,inline:!0,children:x[3]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.burn,inline:!0,children:x[1]})],4):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Unknown"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:T}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:A}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button,{disabled:!N.podready,icon:"user-plus",content:"Clone",onClick:function(){function E(){return h("clone",{ref:B})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",content:"Delete",onClick:function(){function E(){return h("del_rec")}return E}()})]})]})})},p=r.CloningConsole=function(){function s(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.menu;return(0,V.modalRegisterBodyOverride)("view_rec",y),(0,e.createComponentVNode)(2,k.Window,{width:535,height:440,children:[(0,e.createComponentVNode)(2,V.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,c)})})]})})]})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.menu;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:b===1,icon:"home",onClick:function(){function B(){return h("menu",{num:1})}return B}(),children:"Main"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:b===2,icon:"folder",onClick:function(){function B(){return h("menu",{num:2})}return B}(),children:"Records"})]})})},c=function(v,g){var C=(0,t.useBackend)(g),h=C.data,N=h.menu,b;return N===1?b=(0,e.createComponentVNode)(2,m):N===2&&(b=(0,e.createComponentVNode)(2,i)),b},m=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.loading,B=N.scantemp,L=N.occupant,w=N.locked,T=N.can_brainscan,A=N.scan_mode,x=N.numberofpods,E=N.pods,P=N.selected_pod,R=w&&!!L;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Scanner",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Scanner Lock:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L,selected:R,icon:R?"toggle-on":"toggle-off",content:R?"Engaged":"Disengaged",onClick:function(){function M(){return h("lock")}return M}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:R||!L,icon:"user-slash",content:"Eject Occupant",onClick:function(){function M(){return h("eject")}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:b?(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"spinner",spin:!0}),"\xA0 Scanning..."]}):(0,e.createComponentVNode)(2,o.Box,{color:B.color,children:B.text})}),!!T&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scan Mode",children:(0,e.createComponentVNode)(2,o.Button,{icon:A?"brain":"male",content:A?"Brain":"Body",onClick:function(){function M(){return h("toggle_mode")}return M}()})})]}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L||b,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){function M(){return h("scan")}return M}()})]}),(0,e.createComponentVNode)(2,o.Section,{title:"Pods",children:x?E.map(function(M,D){var j;return M.status==="cloning"?j=(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:M.progress/100,ranges:{good:[.75,1/0],average:[.25,.75],bad:[-1/0,.25]},mt:"0.5rem",children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,a.round)(M.progress,0)+"%"})}):M.status==="mess"?j=(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):j=(0,e.createComponentVNode)(2,o.Button,{selected:P===M.pod,icon:P===M.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){function F(){return h("selectpod",{ref:M.pod})}return F}()}),(0,e.createComponentVNode)(2,o.Box,{width:"64px",textAlign:"center",inline:!0,mr:"0.5rem",mt:1,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,S.resolveAsset)("pod_"+M.status+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["Pod #",D+1]}),(0,e.createComponentVNode)(2,o.Box,{bold:!0,mt:.75,color:M.biomass>=150?"good":"bad",inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:M.biomass>=150?"circle":"circle-o"}),"\xA0",M.biomass]}),j]},D)}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},i=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.records;return b.length?(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:b.map(function(B,L){return(0,e.createComponentVNode)(2,o.Button,{icon:"user",mb:"0.5rem",content:B.realname,onClick:function(){function w(){return h("view_rec",{ref:B.record})}return w}()},L)})}):(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No records found."]})})},d=function(v,g){var C,h=(0,t.useBackend)(g),N=h.act,b=h.data,B=b.temp;if(!(!B||!B.text||B.text.length<=0)){var L=(C={},C[B.style]=!0,C);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.NoticeBox,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",children:B.text}),(0,e.createComponentVNode)(2,o.Button,{icon:"times-circle",float:"right",onClick:function(){function w(){return N("cleartemp")}return w}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"both"})]})))}},u=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.scanner,B=N.numberofpods,L=N.autoallowed,w=N.autoprocess,T=N.disk;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Status",buttons:(0,e.createFragment)(!!L&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Auto-processing:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Enabled":"Disabled",onClick:function(){function A(){return h("autoprocess",{on:w?0:1})}return A}()})],4),0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanner",children:b?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Connected"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Not connected!"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pods",children:B?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[B," connected"]}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None connected!"})})]})})})}},14283:function(I,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ColourMatrixTester=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.colour_data,m=[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Modify Matrix",children:m.map(function(i){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:i.map(function(d){return(0,e.createFragment)([d.name,(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.NumberInput,{value:c[d.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(){function u(s,v){return p("setvalue",{idx:d.idx+1,value:v})}return u}()})],0,d.name)})},i)})})})})}return V}()},98577:function(I,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(u){switch(u){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,l);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,i);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},V=r.CommunicationsComputer=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),f(h)]})})})}return d}(),k=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.authenticated,N=C.noauthbutton,b=C.esc_section,B=C.esc_callable,L=C.esc_recallable,w=C.esc_status,T=C.authhead,A=C.is_ai,x=C.lastCallLoc,E=!1,P;return h?h===1?P="Command":h===2?P="Captain":h===3?P="CentComm Officer":h===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:h?"sign-out-alt":"id-card",selected:h,disabled:N,content:h?"Log Out ("+P+")":"Log In",onClick:function(){function R(){return g("auth")}return R}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!b&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!w&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:w}),!!B&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!T,onClick:function(){function R(){return g("callshuttle")}return R}()})}),!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!T||A,onClick:function(){function R(){return g("cancelshuttle")}return R}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},S=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin;return h?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,p)},y=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin,N=C.gamma_armory_location,b=C.admin_levels,B=C.authenticated,L=C.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:b,required_access:h,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!h,onClick:function(){function w(){return g("send_to_cc_announcement_page")}return w}()}),B===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!h,onClick:function(){function w(){return g("make_other_announcement")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!h,onClick:function(){function w(){return g("dispatch_ert")}return w}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:L,content:L?"ERT calling enabled":"ERT calling disabled",tooltip:L?"Command can request an ERT":"ERTs cannot be requested",disabled:!h,onClick:function(){function w(){return g("toggle_ert_allowed")}return w}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!h,onClick:function(){function w(){return g("send_nuke_codes")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!h,onClick:function(){function w(){return g("move_gamma_armory")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!h,onClick:function(){function w(){return g("view_econ")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!h,onClick:function(){function w(){return g("view_fax")}return w}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,p)})]})},p=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.msg_cooldown,N=C.emagged,b=C.cc_cooldown,B=C.security_level_color,L=C.str_security_level,w=C.levels,T=C.authcapt,A=C.authhead,x=C.messages,E="Make Priority Announcement";h>0&&(E+=" ("+h+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",R="Request Authentication Codes";return b>0&&(P+=" ("+b+"s)",R+=" ("+b+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:B,children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:w,required_access:T})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!T||h>0,onClick:function(){function M(){return g("announce")}return M}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!T||b>0,onClick:function(){function M(){return g("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!T,onClick:function(){function M(){return g("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!T||b>0,onClick:function(){function M(){return g("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:R,disabled:!T||b>0,onClick:function(){function M(){return g("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return g("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return g("messagelist")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Misc",children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!A,onClick:function(){function M(){return g("RestartNanoMob")}return M}()})})]})})})],4)},l=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.stat_display,N=C.authhead,b=C.current_message_title,B=h.presets.map(function(w){return(0,e.createComponentVNode)(2,t.Button,{content:w.label,selected:w.name===h.type,disabled:!N,onClick:function(){function T(){return g("setstat",{statdisp:w.name})}return T}()},w.name)}),L=h.alerts.map(function(w){return(0,e.createComponentVNode)(2,t.Button,{content:w.label,selected:w.alert===h.icon,disabled:!N,onClick:function(){function T(){return g("setstat",{statdisp:3,alert:w.alert})}return T}()},w.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function w(){return g("main")}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:h.line_1,disabled:!N,onClick:function(){function w(){return g("setmsg1")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:h.line_2,disabled:!N,onClick:function(){function w(){return g("setmsg2")}return w}()})})]})})})},c=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.authhead,N=C.current_message_title,b=C.current_message,B=C.messages,L=C.security_level,w;if(N)w=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!h,onClick:function(){function A(){return g("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:b})})});else{var T=B.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!h||N===A.title,onClick:function(){function x(){return g("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!h,onClick:function(){function x(){return g("delmessage",{msgid:A.id})}return x}()})]},A.id)});w=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return g("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:T})})}return(0,e.createComponentVNode)(2,t.Box,{children:w})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=u.levels,N=u.required_access,b=u.use_confirm,B=C.security_level;return b?h.map(function(L){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function w(){return g("newalertlevel",{level:L.id})}return w}()},L.name)}):h.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function w(){return g("newalertlevel",{level:L.id})}return w}()},L.name)})},i=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin,N=C.possible_cc_sounds;if(!h)return g("main");var b=(0,a.useLocalState)(s,"subtitle",""),B=b[0],L=b[1],w=(0,a.useLocalState)(s,"text",""),T=w[0],A=w[1],x=(0,a.useLocalState)(s,"classified",0),E=x[0],P=x[1],R=(0,a.useLocalState)(s,"beepsound","Beep"),M=R[0],D=R[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function j(){return g("main")}return j}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:B,onChange:function(){function j(F,W){return L(W)}return j}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:T,onChange:function(){function j(F,W){return A(W)}return j}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function j(){return g("make_cc_announcement",{subtitle:B,text:T,classified:E,beepsound:M})}return j}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:N,selected:M,onSelected:function(){function j(F){return D(F)}return j}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function j(){return g("test_sound",{sound:M})}return j}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function j(){return P(!E)}return j}()})})]})]})})}},70611:function(I,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.CompostBin=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.biomass,m=l.compost,i=l.biomass_capacity,d=l.compost_capacity,u=(0,a.useSharedState)(S,"vendAmount",1),s=u[0],v=u[1];return(0,e.createComponentVNode)(2,o.Window,{width:300,height:175,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:[(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:1,width:17,value:c,minValue:0,maxValue:i,ranges:{good:[i*.5,1/0],average:[i*.25,i*.5],bad:[-1/0,i*.25]},children:[c," / ",i," Units"]})})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:17,value:m,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[m," / ",d," Units"]})})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:s,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function g(C,h){return v(h)}return g}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:m<25*s,icon:"arrow-circle-down",onClick:function(){function g(){return p("create",{amount:s})}return g}()})})})]})})})}return V}()},73744:function(I,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(73712),V=n(84947);function k(g,C){g.prototype=Object.create(C.prototype),g.prototype.constructor=g,S(g,C)}function S(g,C){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(){function h(N,b){return N.__proto__=b,N}return h}(),S(g,C)}var y={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},p=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],l=r.Contractor=function(){function g(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L;B.unauthorized?L=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,s,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):B.load_animation_completed?L=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:B.page===1?(0,e.createComponentVNode)(2,i,{height:"100%"}):(0,e.createComponentVNode)(2,u,{height:"100%"})})],4):L=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,s,{height:"100%",allMessages:p,finishedTimeout:3e3,onFinished:function(){function x(){return b("complete_load_animation")}return x}()})});var w=(0,t.useLocalState)(h,"viewingPhoto",""),T=w[0],A=w[1];return(0,e.createComponentVNode)(2,V.Window,{theme:"syndicate",width:500,height:600,children:[T&&(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,V.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:L})})]})}return g}(),c=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.tc_available,w=B.tc_paid_out,T=B.completed_contracts,A=B.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},C,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[L," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:L<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return b("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[w," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:T})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},m=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},C,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function w(){return b("page",{page:1})}return w}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function w(){return b("page",{page:2})}return w}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},i=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.contracts,w=B.contract_active,T=B.can_extract,A=!!w&&L.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(h,"viewingPhoto",""),P=E[0],R=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!T||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,f.Countdown,{timeLeft:A.time_left,format:function(){function M(D,j){return" ("+j.substr(3)+")"}return M}()})],onClick:function(){function M(){return b("extract")}return M}()})},C,{children:L.slice().sort(function(M,D){return M.status===1?-1:D.status===1?1:M.status-D.status}).map(function(M){var D;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function j(){return R("target_photo_"+M.uid+".png")}return j}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!y[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:y[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:y[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function j(){return b("abort")}return j}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",d(M)]}),(D=M.difficulties)==null?void 0:D.map(function(j,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!w,content:j.name+" ("+j.reward+" TC)",onClick:function(){function W(){return b("activate",{uid:M.uid,difficulty:F+1})}return W}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},d=function(C){if(!(!C.objective||C.status>1)){var h=C.objective.locs.user_area_id,N=C.objective.locs.user_coords,b=C.objective.locs.target_area_id,B=C.objective.locs.target_coords,L=h===b;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:L?"dot-circle-o":"arrow-alt-circle-right-o",color:L?"green":"yellow",rotation:L?null:-(0,a.rad2deg)(Math.atan2(B[1]-N[1],B[0]-N[0])),lineHeight:L?null:"0.85",size:"1.5"})})}},u=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.rep,w=B.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},C,{children:w.map(function(T){return(0,e.createComponentVNode)(2,o.Section,{title:T.name,children:[T.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:L-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:T.stock===0?"bad":"good",ml:"0.5rem",children:[T.stock," in stock"]})]},T.uid)})})))},s=function(g){k(C,g);function C(N){var b;return b=g.call(this,N)||this,b.timer=null,b.state={currentIndex:0,currentDisplay:[]},b}var h=C.prototype;return h.tick=function(){function N(){var b=this.props,B=this.state;if(B.currentIndex<=b.allMessages.length){this.setState(function(w){return{currentIndex:w.currentIndex+1}});var L=B.currentDisplay;L.push(b.allMessages[B.currentIndex])}else clearTimeout(this.timer),setTimeout(b.onFinished,b.finishedTimeout)}return N}(),h.componentDidMount=function(){function N(){var b=this,B=this.props.linesPerSecond,L=B===void 0?2.5:B;this.timer=setInterval(function(){return b.tick()},1e3/L)}return N}(),h.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),h.render=function(){function N(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(b){return(0,e.createFragment)([b,(0,e.createVNode)(1,"br")],0,b)})})}return N}(),C}(e.Component),v=function(C,h){var N=(0,t.useLocalState)(h,"viewingPhoto",""),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:b}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function L(){return B("")}return L}()})]})}},57392:function(I,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ConveyorSwitch=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.slowFactor,m=l.oneWay,i=l.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:i>0?"forward":i<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function d(){return p("toggleOneWay")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function d(){return p("slowFactor",{value:c-5})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function d(){return p("slowFactor",{value:c-1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function d(u){return u+"x"}return d}(),onChange:function(){function d(u,s){return p("slowFactor",{value:s})}return d}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function d(){return p("slowFactor",{value:c+1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function d(){return p("slowFactor",{value:c+5})}return d}()})," "]})]})})]})})})})}return V}()},91413:function(I,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(28823),a=n(72026),t=n(37843),o=n(91819),f=n(2971),V=n(99753),k=n(30381),S=n(84947),y=function(d,u){return d.dead?"Deceased":parseInt(d.health,10)<=u?"Critical":parseInt(d.stat,10)===1?"Unconscious":"Living"},p=function(d,u){return d.dead?"red":parseInt(d.health,10)<=u?"orange":parseInt(d.stat,10)===1?"blue":"green"},l=r.CrewMonitor=function(){function i(d,u){var s=(0,o.useBackend)(u),v=s.act,g=s.data,C=(0,o.useLocalState)(u,"tabIndex",0),h=C[0],N=C[1],b=function(){function B(L){switch(L){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return B}();return(0,e.createComponentVNode)(2,S.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:h===0,onClick:function(){function B(){return N(0)}return B}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"map-marked-alt",selected:h===1,onClick:function(){function B(){return N(1)}return B}(),children:"Map View"},"MapView")]})}),b(h)]})})})}return i}(),c=function(d,u){var s=(0,o.useBackend)(u),v=s.act,g=s.data,C=(0,a.sortBy)(function(A){return A.name})(g.crewmembers||[]),h=g.possible_levels,N=g.viewing_current_z_level,b=g.is_advanced,B=(0,o.useLocalState)(u,"search",""),L=B[0],w=B[1],T=(0,t.createSearch)(L,function(A){return A.name+"|"+A.assignment+"|"+A.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:b?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:h,selected:N,onSelected:function(){function A(x){return v("switch_level",{new_level:x})}return A}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),C.filter(T).map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{bold:!!A.is_command,children:[(0,e.createComponentVNode)(2,V.TableCell,{children:[A.name," (",A.assignment,")"]}),(0,e.createComponentVNode)(2,V.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:p(A,g.critThreshold),children:y(A,g.critThreshold)}),A.sensor_type>=2?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.oxy,children:A.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.toxin,children:A.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.burn,children:A.fire}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.brute,children:A.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,V.TableCell,{children:A.sensor_type===3?g.isAI?(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"location-arrow",content:A.area+" ("+A.x+", "+A.y+")",onClick:function(){function x(){return v("track",{track:A.ref})}return x}()}):A.area+" ("+A.x+", "+A.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},A.name)})]})]})},m=function(d,u){var s=(0,o.useBackend)(u),v=s.data,g=(0,o.useLocalState)(u,"zoom",1),C=g[0],h=g[1];return(0,e.createComponentVNode)(2,f.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{onZoom:function(){function N(b){return h(b)}return N}(),children:v.crewmembers.filter(function(N){return N.sensor_type===3}).map(function(N){return(0,e.createComponentVNode)(2,f.NanoMap.Marker,{x:N.x,y:N.y,zoom:C,icon:"circle",tooltip:N.name+" ("+N.assignment+")",color:p(N,v.critThreshold)},N.ref)})})})}},55104:function(I,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],V=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],k=r.Cryo=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,S)})})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.isOperating,s=d.hasOccupant,v=d.occupant,g=v===void 0?[]:v,C=d.cellTemperature,h=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,B=d.auto_eject_healthy,L=d.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function w(){return i("ejectOccupant")}return w}(),disabled:!s,children:"Eject"}),children:s?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:g.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:g.health,max:g.maxHealth,value:g.health/g.maxHealth,color:g.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g[w.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g[w.type])})})},w.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function w(){return i("ejectBeaker")}return w}(),disabled:!N,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function w(){return i(u?"switchOff":"switchOn")}return w}(),selected:u,children:u?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:h,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:B?"toggle-on":"toggle-off",selected:B,onClick:function(){function w(){return i(B?"auto_eject_healthy_off":"auto_eject_healthy_on")}return w}(),children:B?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:L?"toggle-on":"toggle-off",selected:L,onClick:function(){function w(){return i(L?"auto_eject_dead_off":"auto_eject_dead_on")}return w}(),children:L?"On":"Off"})})]})})})],4)},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.isBeakerLoaded,s=d.beakerLabel,v=d.beakerVolume;return u?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!s&&"average",children:[s||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!v&&"bad",ml:1,children:v?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v,format:function(){function g(C){return Math.round(C)+" units remaining"}return g}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},1763:function(I,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(37843),V=r.CryopodConsole=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.account_name,d=m.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,k),!!d&&(0,e.createComponentVNode)(2,S)]})})}return y}(),k=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:i.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(d,u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},u)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.frozen_items,u=function(v){var g=v.toString();return g.startsWith("the ")&&(g=g.slice(4,g.length)),(0,f.toTitleCase)(g)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u(s.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return m("one_item",{item:s.uid})}return v}()})},s)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function s(){return m("all_items")}return s}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},69055:function(I,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],S=[5,10,20,30,50],y=r.DNAModifier=function(){function h(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.irradiating,A=w.dnaBlockSize,x=w.occupant;b.dnaBlockSize=A,b.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return T&&(E=(0,e.createComponentVNode)(2,g,{duration:T})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)})]})})]})}return h}(),p=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.locked,A=w.hasOccupant,x=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:T,icon:T?"toggle-on":"toggle-off",content:T?"Engaged":"Disengaged",onClick:function(){function E(){return L("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||T,icon:"user-slash",content:"Eject",onClick:function(){function E(){return L("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V[x.stat][0],children:V[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),b.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w.occupant.uniqueEnzymes?w.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},l=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedMenuKey,A=w.hasOccupant,x=w.occupant;if(A){if(b.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return T==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)],4):T==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)],4):T==="buffer"?E=(0,e.createComponentVNode)(2,d):T==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:k.map(function(P,R){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:T===P[0],onClick:function(){function M(){return L("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},R)})}),E]})},c=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedUIBlock,A=w.selectedUISubBlock,x=w.selectedUITarget,E=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,C,{dnaString:E.uniqueIdentity,selectedBlock:T,selectedSubblock:A,blockSize:b.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(R){return R.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(R,M){return L("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return L("pulseUIRadiation")}return P}()})]})},m=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedSEBlock,A=w.selectedSESubBlock,x=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,C,{dnaString:x.structuralEnzymes,selectedBlock:T,selectedSubblock:A,blockSize:b.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return L("pulseSERadiation")}return E}()})]})},i=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.radiationIntensity,A=w.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:T,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return L("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return L("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return L("pulseRadiation")}return x}()})]})},d=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.buffers,A=T.map(function(x,E){return(0,e.createComponentVNode)(2,u,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,s)})]})},u=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=N.id,A=N.name,x=N.buffer,E=w.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function R(){return L("bufferOption",{option:"clear",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function R(){return L("bufferOption",{option:"changeLabel",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!w.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function R(){return L("bufferOption",{option:"saveDisk",id:T})}return R}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveUI",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveUIAndUE",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveSE",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w.hasDisk||!w.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"loadDisk",id:T})}return R}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"createInjector",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"createInjector",id:T,block:1})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"transfer",id:T})}return R}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},s=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.hasDisk,A=w.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return L("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"Eject",onClick:function(){function x(){return L("ejectDisk")}return x}()})],4),children:T?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},v=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.isBeakerLoaded,A=w.beakerVolume,x=w.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"Eject",onClick:function(){function E(){return L("ejectBeaker")}return E}()}),children:T?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[S.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function R(){return L("injectRejuvenators",{amount:E})}return R}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return L("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},g=function(N,b){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},C=function(N,b){for(var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,R=T.split(""),M=0,D=[],j=function(){for(var K=F/E+1,_=[],$=function(){var Z=z+1;_.push((0,e.createComponentVNode)(2,t.Button,{selected:A===K&&x===Z,content:R[F+z],mb:"0",onClick:function(){function ie(){return L(P,{block:K,subblock:Z})}return ie}()}))},z=0;zs.spawnpoints?"red":"green",children:[s.total," total, versus ",s.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function N(){return u("dispatch_ert",{silent:C})}return N}()})})]})})})},p=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:v&&v.length?v.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:g.sender_real_name,onClick:function(){function C(){return u("view_player_panel",{uid:g.sender_uid})}return C}(),tooltip:"View player panel"}),children:g.message},(0,f.decodeHtmlEntities)(g.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},l=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=(0,a.useLocalState)(i,"text",""),g=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:g,onChange:function(){function h(N,b){return C(b)}return h}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function h(){return u("deny_ert",{reason:g})}return h}()})]})})}},77877:function(I,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.EconomyManager=function(){function S(y,p){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:350,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,k)})]})}return S}(),k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"global"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department_members"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"crew_member"})}return d}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function d(){return c("delay_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function d(){return c("set_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function d(){return c("accelerate_payroll")}return d}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},10707:function(I,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.Electropack=function(){function k(S,y){var p=(0,t.useBackend)(y),l=p.act,c=p.data,m=c.power,i=c.code,d=c.frequency,u=c.minFrequency,s=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:u/10,maxValue:s/10,value:d/10,format:function(){function v(g){return(0,a.toFixed)(g,1)}return v}(),width:"80px",onChange:function(){function v(g,C){return l("freq",{freq:C})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:i,width:"80px",onChange:function(){function v(g,C){return l("code",{code:C})}return v}()})})]})})})})}return k}()},85307:function(I,r,n){"use strict";r.__esModule=!0,r.EmotePanelContent=r.EmotePanel=void 0;var e=n(28823),a=n(91819),t=n(84947),o=n(2971),f=n(37843),V=r.EmotePanel=function(){function S(y,p){return(0,e.createComponentVNode)(2,t.Window,{width:500,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,k)})})})}return S}(),k=r.EmotePanelContent=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.emotes,d=(0,a.useLocalState)(p,"searchText",""),u=d[0],s=d[1],v=(0,a.useLocalState)(p,"filterVisible",""),g=v[0],C=v[1],h=(0,a.useLocalState)(p,"filterAudible",""),N=h[0],b=h[1],B=(0,a.useLocalState)(p,"filterSound",""),L=B[0],w=B[1],T=(0,a.useLocalState)(p,"filterHands",""),A=T[0],x=T[1],E=(0,a.useLocalState)(p,"filterTargettable",""),P=E[0],R=E[1],M=(0,a.useLocalState)(p,"useTarget",""),D=M[0],j=M[1],F=(0,e.createComponentVNode)(2,o.Input,{placeholder:"\u0418\u0441\u043A\u0430\u0442\u044C \u044D\u043C\u043E\u0446\u0438\u044E...",fluid:!0,onInput:function(){function W(K,_){return s(_)}return W}()});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Button,{icon:"eye",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043C\u044B\u0439",selected:g,onClick:function(){function W(){return C(!g)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",align:"center",tooltip:"\u0421\u043B\u044B\u0448\u0438\u043C\u044B\u0439",selected:N,onClick:function(){function W(){return b(!N)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"volume-up",align:"center",tooltip:"\u0417\u0432\u0443\u043A",selected:L,onClick:function(){function W(){return w(!L)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"hand-paper",align:"center",tooltip:"\u0420\u0443\u043A\u0438",selected:A,onClick:function(){function W(){return x(!A)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",height:"100%",align:"center",tooltip:"\u0426\u0435\u043B\u044C",selected:P,onClick:function(){function W(){return R(!P)}return W}()})]}),children:F})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:u.length>0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+u+'"':"\u0412\u0441\u0435 \u044D\u043C\u043E\u0446\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",selected:D,onClick:function(){function W(){return j(!D)}return W}(),children:"\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u0446\u0435\u043B\u044C"}),children:(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:i.filter(function(W){return W.key&&(u.length>0?W.key.toLowerCase().includes(u.toLowerCase())||W.name.toLowerCase().includes(u.toLowerCase()):!0)&&(g?W.visible:!0)&&(N?W.audible:!0)&&(L?W.sound:!0)&&(A?W.hands:!0)&&(P?W.targettable:!0)}).map(function(W){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function K(){return c("play_emote",{emote_key:W.key,useTarget:D})}return K}(),children:[W.visible?(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}):"",W.audible?(0,e.createComponentVNode)(2,o.Icon,{name:"comment"}):"",W.sound?(0,e.createComponentVNode)(2,o.Icon,{name:"volume-up"}):"",W.hands?(0,e.createComponentVNode)(2,o.Icon,{name:"hand-paper"}):"",W.targettable?(0,e.createComponentVNode)(2,o.Icon,{name:"crosshairs"}):"",W.name]},W.name)})})})})})],4)}return S}()},52640:function(I,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=n(90955),k=n(72026),S=r.EvolutionMenu=function(){function l(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p)]})})})}return l}(),y=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.evo_points,v=u.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:s}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!v,content:"Readapt",icon:"sync",onClick:function(){function g(){return d("readapt")}return g}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},p=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.evo_points,v=u.ability_tabs,g=u.purchased_abilities,C=u.view_mode,h=(0,t.useLocalState)(m,"selectedTab",v[0]),N=h[0],b=h[1],B=(0,t.useLocalState)(m,"searchText",""),L=B[0],w=B[1],T=(0,t.useLocalState)(m,"ability_tabs",v[0].abilities),A=T[0],x=T[1],E=function(D,j){if(j===void 0&&(j=""),!D||D.length===0)return[];var F=(0,a.createSearch)(j,function(W){return W.name+"|"+W.description});return(0,V.flow)([(0,k.filter)(function(W){return W==null?void 0:W.name}),(0,k.filter)(F),(0,k.sortBy)(function(W){return W==null?void 0:W.name})])(D)},P=function(D){if(w(D),D==="")return x(N.abilities);x(E(v.map(function(j){return j.abilities}).flat(),D))},R=function(D){b(D),x(D.abilities),w("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(D,j){P(j)}return M}(),value:L}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"square-o":"check-square-o",selected:!C,content:"Compact",onClick:function(){function M(){return d("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"check-square-o":"square-o",selected:C,content:"Expanded",onClick:function(){function M(){return d("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:v.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===""&&N===M,onClick:function(){function D(){R(M)}return D}(),children:M.category},M)})}),A.map(function(M,D){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),g.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>s||g.includes(M.power_path),content:"Evolve",onClick:function(){function j(){return d("purchase",{power_path:M.power_path})}return j}()})})]}),!!C&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},D)})]})})}},70672:function(I,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(28823),a=n(66586),t=n(37843),o=n(91819),f=n(2971),V=n(73712),k=n(84947),S=["id","amount","lineDisplay","onClick"];function y(g,C){if(g==null)return{};var h={},N=Object.keys(g),b,B;for(B=0;B=0)&&(h[b]=g[b]);return h}var p=2e3,l={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function g(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.building;return(0,e.createComponentVNode)(2,k.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,k.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)}),L&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)})]})})]})})})}return g}(),m=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.materials,w=B.capacity,T=Object.values(L).reduce(function(A,x){return A+x},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.Box,{color:"label",mt:"0.25rem",children:[(T/w*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(A){return(0,e.createComponentVNode)(2,s,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function x(){return b("withdraw",{id:A})}return x}()},A)})})},i=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.curCategory,w=B.categories,T=B.designs,A=B.syncing,x=(0,o.useLocalState)(h,"searchText",""),E=x[0],P=x[1],R=(0,t.createSearch)(E,function(D){return D.name}),M=T.filter(R);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{className:"Exofab__dropdown",selected:L,options:w,onSelected:function(){function D(j){return b("category",{cat:j})}return D}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function D(){return b("queueall")}return D}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:A,iconSpin:A,icon:"sync-alt",content:A?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){function D(){return b("sync")}return D}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function D(j,F){return P(F)}return D}()}),M.map(function(D){return(0,e.createComponentVNode)(2,v,{design:D},D.id)}),M.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},d=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.building,w=B.buildStart,T=B.buildEnd,A=B.worldTime;return(0,e.createComponentVNode)(2,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:w,current:A,end:T,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",L,"\xA0(",(0,e.createComponentVNode)(2,V.Countdown,{current:A,timeLeft:T-A,format:function(){function x(E,P){return P.substr(3)}return x}()}),")"]})]})})})},u=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.queue,w=B.processingQueue,T=Object.entries(B.queueDeficit).filter(function(x){return x[1]<0}),A=L.reduce(function(x,E){return x+E.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:"Process",onClick:function(){function x(){return b("process")}return x}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:L.length===0,icon:"eraser",content:"Clear",onClick:function(){function x(){return b("unqueueall")}return x}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:L.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:L.map(function(x,E){return(0,e.createComponentVNode)(2,f.Box,{color:x.notEnough&&"bad",children:[E+1,". ",x.name,E>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function P(){return b("queueswap",{from:E+1,to:E})}return P}()}),E0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(T).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",T.map(function(x){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,s,{id:x[0],amount:-x[1],lineDisplay:!0})},x[0])})]})],0)})})},s=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=C.id,w=C.amount,T=C.lineDisplay,A=C.onClick,x=y(C,S),E=B.materials[L]||0,P=w||E;if(!(P<=0&&!(L==="metal"||L==="glass"))){var R=w&&w>E;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",T&&"Exofab__material--line"])},x,{children:T?(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:(0,a.classes)(["materials32x32",L])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:P.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",L])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:L}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[P.toLocaleString("en-US")," cm\xB3 (",Math.round(P/p*10)/10," ","sheets)"]})]})],4)})))}},v=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=C.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.Button,{disabled:L.notEnough||B.building,icon:"cog",content:L.name,onClick:function(){function w(){return b("build",{id:L.id})}return w}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"plus-circle",onClick:function(){function w(){return b("queue",{id:L.id})}return w}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(L.cost).map(function(w){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,s,{id:w[0],amount:w[1],lineDisplay:!0})},w[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),L.time>0?(0,e.createFragment)([L.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})}},25627:function(I,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),V=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),k=r.ExperimentConsole=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.open,d=m.feedback,u=m.occupant,s=m.occupant_name,v=m.occupant_status,g=function(){function h(){if(!u)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function B(){return f.get(v)}return B}(),b=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b.color,children:b.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(B){return(0,e.createComponentVNode)(2,t.Button,{icon:V.get(B).icon,content:V.get(B).label,onClick:function(){function L(){return c("experiment",{experiment_type:B})}return L}()},B)})})]})}return h}(),C=g();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!i,onClick:function(){function h(){return c("door")}return h}()}),children:C})]})})}return S}()},14172:function(I,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=0,V=1013,k=function(p){var l="good",c=80,m=95,i=110,d=120;return pi?l="average":p>d&&(l="bad"),l},S=r.ExternalAirlockController=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.chamber_pressure,u=i.exterior_status,s=i.interior_status,v=i.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:k(d),value:d,minValue:f,maxValue:V,children:[d," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function g(){return m("abort")}return g}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:v,onClick:function(){function g(){return m("cycle_ext")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function g(){return m("cycle_int")}return g}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:s==="open"?"red":v?"yellow":null,onClick:function(){function g(){return m("force_ext")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:s==="open"?"red":v?"yellow":null,onClick:function(){function g(){return m("force_int")}return g}()})]})]})]})})}return y}()},61893:function(I,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.FaxMachine=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return p("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){function c(){return p("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:l.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){function c(){return p("paper")}return c}()}),!!l.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return p("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){function c(){return p("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){function c(){return p("send")}return c}()})})]})})]})})}return V}()},80031:function(I,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.FilingCabinet=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=y.config,m=l.contents,i=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!m&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",i," is empty."]})}),!!m&&m.slice().map(function(d){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:d.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function u(){return p("retrieve",{index:d.index})}return u}()})})]},d)})]})})})})}return V}()},39552:function(I,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.image,i=S.isSelected,d=S.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+m,style:{"border-style":i&&"solid"||"none","border-width":"2px","border-color":"orange",padding:i&&"2px"||"4px"},onClick:d})},V=r.FloorPainter=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.availableStyles,i=c.selectedStyle,d=c.selectedDir,u=c.directionsPreview,s=c.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function v(){return l("cycle_style",{offset:-1})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:m,selected:i,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function v(g){return l("select_style",{style:g})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function v(){return l("cycle_style",{offset:1})}return v}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{image:s[v],isSelected:i===v,onSelect:function(){function g(){return l("select_style",{style:v})}return g}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[v+"west",v,v+"east"].map(function(g){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:g===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{image:u[g],isSelected:g===d,onSelect:function(){function C(){return l("select_direction",{direction:g})}return C}()})},g)})},v)})})})})]})})})}return k}()},5090:function(I,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=function(i){return i?"("+i.join(", ")+")":"ERROR"},k=function(i,d){if(!(!i||!d)){if(i[2]!==d[2])return null;var u=Math.atan2(d[1]-i[1],d[0]-i[0]),s=Math.sqrt(Math.pow(d[1]-i[1],2)+Math.pow(d[0]-i[0],2));return{angle:(0,a.rad2deg)(u),distance:s}}},S=r.GPS=function(){function m(i,d){var u=(0,t.useBackend)(d),s=u.data,v=s.emped,g=s.active,C=s.area,h=s.position,N=s.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:v?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,y,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),g?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{area:C,position:h})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{title:"Saved Position",position:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,y)],0)})})})}return m}(),y=function(i,d){var u=i.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:u?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),u?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},p=function(i,d){var u=(0,t.useBackend)(d),s=u.act,v=u.data,g=v.active,C=v.tag,h=v.same_z,N=(0,t.useLocalState)(d,"newTag",C),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"On":"Off",onClick:function(){function L(){return s("toggle")}return L}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:C,onEnter:function(){function L(){return s("tag",{newtag:b})}return L}(),onInput:function(){function L(w,T){return B(T)}return L}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:C===b,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function L(){return s("tag",{newtag:b})}return L}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"compress":"expand",content:h?"Local Sector":"Global",onClick:function(){function L(){return s("same_z")}return L}()})})]})})},l=function(i,d){var u=i.title,s=i.area,v=i.position;return(0,e.createComponentVNode)(2,o.Section,{title:u||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[s&&(0,e.createFragment)([s,(0,e.createVNode)(1,"br")],0),V(v)]})})},c=function(i,d){var u=(0,t.useBackend)(d),s=u.data,v=s.position,g=s.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},i,{children:(0,e.createComponentVNode)(2,o.Table,{children:g.map(function(C){return Object.assign({},C,k(v,C.position))}).map(function(C,h){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:h%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:C.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:C.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:C.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(C.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:C.distance>0?"arrow-right":"circle",rotation:-C.angle}),"\xA0",Math.floor(C.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:V(C.position)})]},h)})})})))}},1055:function(I,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(22677),f=n(84947),V=r.GeneModder=function(){function i(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),g===0?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)]})})})}return i}(),k=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Insert Gene from Disk",disabled:!C||!C.can_insert||C.is_core,icon:"arrow-circle-down",onClick:function(){function h(){return v("insert")}return h}()}),children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})},S=function(d,u){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},y=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.has_seed,h=g.seed,N=g.has_disk,b=g.disk,B,L;return C?B=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+h.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:h.name,onClick:function(){function w(){return v("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return v("variant_name")}return w}()})]}):B=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return v("eject_seed")}return w}()})}),N?L=b.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,onClick:function(){function w(){return v("eject_disk")}return w}()})})})]})})},p=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.disk,h=g.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:h.map(function(N){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:N.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(C!=null&&C.can_extract),icon:"save",onClick:function(){function b(){return v("extract",{id:N.id})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Replace",disabled:!N.is_type||!C.can_insert,icon:"arrow-circle-down",onClick:function(){function b(){return v("replace",{id:N.id})}return b}()})})]},N)})},"Core Genes")},l=function(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.reagent_genes,C=v.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:g,do_we_show:C})},c=function(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.trait_genes,C=v.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:g,do_we_show:C})},m=function(d,u){var s=d.title,v=d.gene_set,g=d.do_we_show,C=(0,a.useBackend)(u),h=C.act,N=C.data,b=N.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:s,open:!0,children:g?v.map(function(B){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:B.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(b!=null&&b.can_extract),icon:"save",onClick:function(){function L(){return h("extract",{id:B.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return h("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},s)}},14232:function(I,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(28823),a=n(2971),t=n(84947),o=n(692),f=r.GenericCrewManifest=function(){function V(k,S){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return V}()},86268:function(I,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GhostHudPanel=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.security,m=l.medical,i=l.diagnostic,d=l.radioactivity,u=l.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,V,{label:"Medical",type:"medical",is_active:m}),(0,e.createComponentVNode)(2,V,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,V,{label:"Diagnostic",type:"diagnostic",is_active:i}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,V,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,V,{label:"Antag HUD",is_active:u,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=S.label,m=S.type,i=m===void 0?null:m,d=S.is_active,u=S.act_on,s=u===void 0?"hud_on":u,v=S.act_off,g=v===void 0?"hud_off":v;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function C(){return l(d?g:s,{hud_type:i})}return C}()})})]})}},8977:function(I,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GlandDispenser=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.glands,m=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:i.color,content:i.amount||"0",disabled:!i.amount,onClick:function(){function d(){return p("dispense",{gland_id:i.id})}return d}()},i.id)})})})})}return V}()},70309:function(I,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GravityGen=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.charging_state,m=l.charge_count,i=l.breaker,d=l.ext_power,u=function(){function v(g){return g>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",g===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}return v}(),s=function(){function v(g){if(g>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return v}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[s(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"Online":"Offline",color:i?"green":"red",px:1.5,onClick:function(){function v(){return p("breaker")}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:d?"good":"bad",children:u(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return V}()},64769:function(I,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(14635),V=r.GuestPass=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function m(){return l("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return l("mode",{mode:1})}return m}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function m(){return l("scan")}return m}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("giv_name")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("reason")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return l("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(i){return l("access",{access:i})}return m}(),grantAll:function(){function m(){return l("grant_all")}return m}(),denyAll:function(){function m(){return l("clear_all")}return m}(),grantDep:function(){function m(i){return l("grant_region",{region:i})}return m}(),denyDep:function(){function m(i){return l("deny_region",{region:i})}return m}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function m(){return l("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},i)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return k}()},12219:function(I,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=[1,5,10,20,30,50],V=null,k=r.HandheldChemDispenser=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.amount,s=d.energy,v=d.maxEnergy,g=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:s,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[s," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(C,h){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:u===C,content:C,onClick:function(){function N(){return i("amount",{amount:C})}return N}()})},h)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"dispense"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"remove"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"isolate"})}return C}()})]})})]})})})},y=function(l,c){for(var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.chemicals,s=u===void 0?[]:u,v=d.current_reagent,g=[],C=0;C<(s.length+1)%3;C++)g.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d.glass?"Drink Selector":"Chemical Selector",children:[s.map(function(h,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===h.id,content:h.title,style:{"margin-left":"2px"},onClick:function(){function b(){return i("dispense",{reagent:h.id})}return b}()},N)}),g.map(function(h,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},53917:function(I,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.HealthSensor=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.on,d=m.user_health,u=m.minHealth,s=m.maxHealth,v=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:i?"On":"Off",color:i?null:"red",selected:i,onClick:function(){function g(){return c("scan_toggle")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:u,maxValue:s,value:v,format:function(){function g(C){return(0,a.toFixed)(C,1)}return g}(),width:"80px",onDrag:function(){function g(C,h){return c("alarm_health",{alarm_health:h})}return g}()})}),d!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),bold:d>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:d})})})]})})})})}return S}(),k=function(y){return y>50?"green":y>0?"orange":"red"}},93116:function(I,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Holodeck=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=(0,a.useLocalState)(y,"currentDeck",""),i=m[0],d=m[1],u=(0,a.useLocalState)(y,"showReload",!1),s=u[0],v=u[1],g=c.decks,C=c.ai_override,h=c.emagged,N=function(){function b(B){l("select_deck",{deck:B}),d(B),v(!0),setTimeout(function(){v(!1)},3e3)}return b}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[s&&(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",i]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[g.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:b,selected:b===i,onClick:function(){function B(){return N(b)}return B}()},b)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!C&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"Turn On":"Turn Off",color:h?"good":"bad",onClick:function(){function b(){return l("ai_override")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:h?"bad":"good",children:[h?"Off":"On",!!h&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function b(){return l("wildlifecarp")}return b}()})]})})]})]})})]})})]})}return k}(),V=function(S,y){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},77209:function(I,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.Instrument=function(){function l(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p)]})})]})}return l}(),k=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.help;if(s)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function v(){return d("help")}return v}()})]})})})},S=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.lines,v=u.playing,g=u.repeat,C=u.maxRepeats,h=u.tempo,N=u.minTempo,b=u.maxTempo,B=u.tickLag,L=u.volume,w=u.minVolume,T=u.maxVolume,A=u.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return d("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return d("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return d("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:v,disabled:s.length===0||g<0,icon:"play",content:"Play",onClick:function(){function x(){return d("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function x(){return d("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:C,value:g,stepPixelSize:59,onChange:function(){function x(E,P){return d("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:h>=b,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return d("tempo",{new:h+B})}return x}()}),(0,a.round)(600/h)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:h<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return d("tempo",{new:h-B})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:w,maxValue:T,value:L,stepPixelSize:6,onDrag:function(){function x(E,P){return d("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,y)]})},y=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.allowedInstrumentNames,v=u.instrumentLoaded,g=u.instrument,C=u.canNoteShift,h=u.noteShift,N=u.noteShiftMin,b=u.noteShiftMax,B=u.sustainMode,L=u.sustainLinearDuration,w=u.sustainExponentialDropoff,T=u.legacy,A=u.sustainDropoffVolume,x=u.sustainHeldNote,E,P;return B===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:L,step:.5,stepPixelSize:85,format:function(){function R(M){return(0,a.round)(M*100)/100+" seconds"}return R}(),onChange:function(){function R(M,D){return d("setlinearfalloff",{new:D/10})}return R}()})):B===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:w,step:.01,format:function(){function R(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return R}(),onChange:function(){function R(M,D){return d("setexpfalloff",{new:D})}return R}()})),s.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:T?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:s,selected:g,width:"50%",onSelected:function(){function R(M){return d("switchinstrument",{name:M})}return R}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!T&&C)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:b,value:h,stepPixelSize:2,format:function(){function R(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return R}(),onChange:function(){function R(M,D){return d("setnoteshift",{new:D})}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function R(M){return d("setsustainmode",{new:M})}return R}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function R(M,D){return d("setdropoffvolume",{new:D})}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function R(){return d("togglesustainhold")}return R}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function R(){return d("reset")}return R}()})]})})})},p=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.playing,v=u.lines,g=u.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!g||s,icon:"plus",content:"Add Line",onClick:function(){function C(){return d("newline",{line:v.length+1})}return C}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!g,icon:g?"chevron-up":"chevron-down",onClick:function(){function C(){return d("edit")}return C}()})],4),children:!!g&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(C,h){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:s,icon:"pen",onClick:function(){function N(){return d("modifyline",{line:h+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:s,icon:"trash",onClick:function(){function N(){return d("deleteline",{line:h+1})}return N}()})],4),children:C},h)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},28847:function(I,r,n){"use strict";r.__esModule=!0,r.Jukebox=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(91819),f=n(2971),V=n(84947),k=r.Jukebox=function(){function p(l,c){var m=(0,o.useBackend)(c),i=m.act,d=m.data,u=d.active,s=d.looping,v=d.track_selected,g=d.volume,C=d.max_volume,h=d.songs,N=d.startTime,b=d.endTime,B=d.worldTime,L=d.need_coin,w=d.payment,T=d.advanced_admin,A=35,x=!w&&L&&!T,E=(0,t.flow)([(0,a.sortBy)(function(F){return F.name})])(h),P=h.find(function(F){return F.name===v}),R=E.length,M=P?E.findIndex(function(F){return F.name===P.name})+1:0,D=function(){function F(W){var K=Math.floor(W/60),_=W%60,$=String(K).padStart(2,"0")+":"+String(_).padStart(2,"0");return $}return F}(),j=(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[u?s?"\u221E":D(Math.round((B-N)/10)):s?"\u221E":D(P.length)," ","/ ",s?"\u221E":D(P.length)]});return(0,e.createComponentVNode)(2,V.Window,{width:350,height:435,title:"\u041C\u0443\u0437\u044B\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442",children:[x?(0,e.createComponentVNode)(2,y):null,(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"\u041F\u0440\u043E\u0438\u0433\u0440\u044B\u0432\u0430\u0442\u0435\u043B\u044C",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{bold:!0,maxWidth:"240px",children:P.name.length>A?(0,e.createVNode)(1,"marquee",null,P.name,0):P.name}),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,mt:1.5,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:u?"pause":"play",color:"transparent",content:u?"\u0421\u0442\u043E\u043F":"\u0421\u0442\u0430\u0440\u0442",selected:u,onClick:function(){function F(){return i("toggle")}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,f.Button.Checkbox,{fluid:!0,icon:"undo",content:"\u041F\u043E\u0432\u0442\u043E\u0440",disabled:u||L&&!T,tooltip:L&&!T?"\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440 \u0437\u0430 \u043C\u043E\u043D\u0435\u0442\u043A\u0443":null,checked:s,onClick:function(){function F(){return i("loop",{looping:!s})}return F}()})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:N,current:s?b:B,end:b,children:j})})]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{children:[u?(0,e.createComponentVNode)(2,S):null,(0,e.createComponentVNode)(2,f.Stack,{fill:!0,mb:1.5,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"fast-backward",onClick:function(){function F(){return i("set_volume",{volume:"min"})}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"undo",onClick:function(){function F(){return i("set_volume",{volume:"reset"})}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:0,textAlign:"right",children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"fast-forward",onClick:function(){function F(){return i("set_volume",{volume:"max"})}return F}()})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"center",textColor:"label",children:[(0,e.createComponentVNode)(2,f.Knob,{size:2,color:g<=25?"green":g<=50?"":g<=75?"orange":"red",value:g,unit:"%",minValue:0,maxValue:C,step:1,stepPixelSize:5,onDrag:function(){function F(W,K){return i("set_volume",{volume:K})}return F}()}),"Volume"]})]})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0442\u0440\u0435\u043A\u0438",buttons:(0,e.createComponentVNode)(2,f.Button,{bold:!0,icon:"random",color:"transparent",content:M+"/"+R,tooltip:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0442\u0440\u0435\u043A",tooltipPosition:"top-end",onClick:function(){function F(){var W=Math.floor(Math.random()*R),K=E[W];i("select_track",{track:K.name})}return F}()}),children:E.map(function(F){return(0,e.createComponentVNode)(2,f.Stack.Item,{mb:.5,textAlign:"left",children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,selected:P.name===F.name,color:"translucent",content:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:F.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:D(F.length)})]}),onClick:function(){function W(){i("select_track",{track:F.name})}return W}()})},F.name)})})})]})})]})}return p}(),S=function(){return(0,e.createComponentVNode)(2,f.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"music",size:"3",color:"gray",mb:1}),(0,e.createComponentVNode)(2,f.Box,{color:"label",bold:!0,children:"\u0418\u0433\u0440\u0430\u0435\u0442 \u043C\u0443\u0437\u044B\u043A\u0430"})]})},y=function(){return(0,e.createComponentVNode)(2,f.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"coins",size:"6",color:"gold",mr:1}),(0,e.createComponentVNode)(2,f.Box,{color:"label",bold:!0,mt:5,fontSize:2,children:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043C\u043E\u043D\u0435\u0442\u043A\u0443"})]})}},64261:function(I,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.KeycardAuth=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!l.swiping&&!l.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){function i(){return p("triggerevent",{triggerevent:"Red Alert"})}return i}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Emergency Response Team"})}return i}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return i}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return i}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!l.hasSwiped&&!l.ertreason&&l.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):l.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,l.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){function i(){return p("ert")}return i}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:l.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){function i(){return p("reset")}return i}()}),children:m})]})})}return V}()},34898:function(I,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48154),V=r.KitchenMachine=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=l.config,i=c.ingredients,d=c.operating,u=m.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:d,name:u}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:i.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:s.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[s.amount," ",s.units]}),2)]},s.name)})})})})]})})})}return S}(),k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.inactive,d=m.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:i,tooltip:i?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function u(){return c("cook")}return u}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:i,tooltip:i?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function u(){return c("eject")}return u}()})})]})})}},52564:function(I,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.LawManager=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.isAdmin,u=i.isSlaved,s=i.isMalf,v=i.isAIMalf,g=i.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:s?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&u)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",u,"."]}),!!(s||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:g===0,onClick:function(){function C(){return m("set_view",{set_view:0})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:g===1,onClick:function(){function C(){return m("set_view",{set_view:1})}return C}()})]}),g===0&&(0,e.createComponentVNode)(2,V),g===1&&(0,e.createComponentVNode)(2,k)]})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,v=i.ion_laws,g=i.ion_law_nr,C=i.has_inherent_laws,h=i.inherent_laws,N=i.has_supplied_laws,b=i.supplied_laws,B=i.channels,L=i.channel,w=i.isMalf,T=i.isAdmin,A=i.zeroth_law,x=i.ion_law,E=i.inherent_law,P=i.supplied_law,R=i.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,S,{title:"ERR_NULL_VALUE",laws:u,ctx:l}),!!s&&(0,e.createComponentVNode)(2,S,{title:g,laws:v,ctx:l}),!!C&&(0,e.createComponentVNode)(2,S,{title:"Inherent",laws:h,ctx:l}),!!N&&(0,e.createComponentVNode)(2,S,{title:"Supplied",laws:b,ctx:l}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:B.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===L,onClick:function(){function D(){return m("law_channel",{law_channel:M.channel})}return D}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return m("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return m("notify_laws")}return M}()})})]})}),!!w&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(T&&!d)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:R,onClick:function(){function M(){return m("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name+" - "+u.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function s(){return m("transfer_laws",{transfer_laws:u.ref})}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.laws.has_ion_laws>0&&u.laws.ion_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_zeroth_laws>0&&u.laws.zeroth_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_inherent_laws>0&&u.laws.inherent_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_supplied_laws>0&&u.laws.inherent_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)})]})},u.name)})})},S=function(p,l){var c=(0,a.useBackend)(p.ctx),m=c.act,i=c.data,d=i.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:p.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),p.laws.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:u.state?"Yes":"No",selected:u.state,onClick:function(){function s(){return m("state_law",{ref:u.ref,state_law:u.state?0:1})}return s}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function s(){return m("edit_law",{edit_law:u.ref})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function s(){return m("delete_law",{delete_law:u.ref})}return s}()})],4)]})]},u.law)})]})})}},55499:function(I,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.LibraryComputer=function(){function g(C,h){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})]})}return g}(),k=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:L.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:L.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[L.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!L.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:L.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),w===L.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:L.isProgrammatic,onClick:function(){function T(){return b("delete_book",{bookid:L.id,user_ckey:w})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:L.isProgrammatic,onClick:function(){function T(){return(0,f.modalOpen)(h,"report_book",{bookid:L.id})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:L.isProgrammatic,onClick:function(){function T(){return(0,f.modalOpen)(h,"rate_info",{bookid:L.id})}return T}()})]})},S=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.selected_report,T=B.report_categories,A=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:T.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===w,onClick:function(){function P(){return b("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return b("submit_report",{bookid:L.id,user_ckey:A})}return x}()})]})},y=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.selected_rating,w=Array(10).fill().map(function(T,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[w.map(function(T,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:L>=T?"caution":"default",onClick:function(){function x(){return b("set_rating",{rating_value:T})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[L+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},p=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:L.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[L.current_rating?L.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:L.total_ratings?L.total_ratings:0})]}),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function T(){return b("rate_book",{bookid:L.id,user_ckey:w})}return T}()})]})},l=function(C,h){var N=(0,a.useBackend)(h),b=N.data,B=(0,a.useLocalState)(h,"tabIndex",0),L=B[0],w=B[1],T=b.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===0,onClick:function(){function A(){return w(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===1,onClick:function(){function A(){return w(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===2,onClick:function(){function A(){return w(2)}return A}(),children:"Upload Book"}),T===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===3,onClick:function(){function A(){return w(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===4,onClick:function(){function A(){return w(4)}return A}(),children:"Inventory"})]})})},c=function(C,h){var N=(0,a.useLocalState)(h,"tabIndex",0),b=N[0];switch(b){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,u);case 3:return(0,e.createComponentVNode)(2,s);case 4:return(0,e.createComponentVNode)(2,v);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.searchcontent,w=B.book_categories,T=B.user_ckey,A=[];return w.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:L.title||"Input Title",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:L.author||"Input Author",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:L.ratingmin,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:L.ratingmax,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:w.map(function(x){return x.description}),onSelected:function(){function x(E){return b("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),w.filter(function(x){return L.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return b("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return b("clear_search")}return x}()}),L.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return b("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return b("find_users_books",{user_ckey:T})}return x}()})]})]})},i=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.external_booklist,w=B.archive_pagenumber,T=B.num_pages,A=B.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:w===1,onClick:function(){function x(){return b("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:w===1,onClick:function(){function x(){return b("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:w,onClick:function(){function x(){return(0,f.modalOpen)(h,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:w===T,onClick:function(){function x(){return b("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:w===T,onClick:function(){function x(){return b("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,m),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),L.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return b("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,f.modalOpen)(h,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},d=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.programmatic_booklist,w=B.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),L.map(function(T,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:T.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),T.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:T.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[w===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return b("order_programmatic_book",{bookid:T.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,f.modalOpen)(h,"expand_info",{bookid:T.id})}return x}()})]})]},A)})]})})},u=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.selectedbook,w=B.book_categories,T=B.user_ckey,A=[];return w.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:L.copyright,content:"Upload Book",onClick:function(){function x(){return b("uploadbook",{user_ckey:T})}return x}()}),children:[L.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:L.copyright,content:L.title,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:L.copyright,content:L.author,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:w.map(function(x){return x.description}),onSelected:function(){function x(E){return b("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),w.filter(function(x){return L.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:L.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return b("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:L.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:L.summary})]})})]})]})},s=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),L.map(function(w,T){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),w.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.timeleft>=0?w.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:w.timeleft>=0,onClick:function(){function A(){return b("reportlost",{libraryid:w.libraryid})}return A}()})})]},T)})]})})},v=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),L.map(function(w,T){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.checked_out?"Checked Out":"Available"})]},T)})]})})};(0,f.modalRegisterBodyOverride)("expand_info",k),(0,f.modalRegisterBodyOverride)("report_book",S),(0,f.modalRegisterBodyOverride)("rate_info",p)},92682:function(I,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.LibraryManager=function(){function l(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,k)})]})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.pagestate;switch(s){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,p);case 3:return(0,e.createComponentVNode)(2,y);default:return"WE SHOULDN'T BE HERE!"}},S=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return s}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ckey_search")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function s(){return d("view_reported_books")}return s}()})]})},y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function v(){return d("return")}return v}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),v.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function g(){return d("delete_book",{bookid:v.id})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function g(){return d("unflag_book",{bookid:v.id})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function g(){return d("view_book",{bookid:v.id})}return g}()})]})]},v.id)})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.ckey,v=u.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",s,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function g(){return d("return")}return g}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),v.map(function(g){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:g.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),g.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:g.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function C(){return d("delete_book",{bookid:g.id})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function C(){return d("view_book",{bookid:g.id})}return C}()})]})]},g.id)})]})})}},68e3:function(I,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(2971),f=n(91819),V=n(31068),k=n(84947),S=r.ListInputModal=function(){function l(c,m){var i=(0,f.useBackend)(m),d=i.act,u=i.data,s=u.items,v=s===void 0?[]:s,g=u.message,C=g===void 0?"":g,h=u.init_value,N=u.timeout,b=u.title,B=(0,f.useLocalState)(m,"selected",v.indexOf(h)),L=B[0],w=B[1],T=(0,f.useLocalState)(m,"searchBarVisible",v.length>10),A=T[0],x=T[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],R=E[1],M=function(){function z(Y){var Z=_.length-1;if(Y===V.KEY_DOWN)if(L===null||L===Z){var ie;w(0),(ie=document.getElementById("0"))==null||ie.scrollIntoView()}else{var ae;w(L+1),(ae=document.getElementById((L+1).toString()))==null||ae.scrollIntoView()}else if(Y===V.KEY_UP)if(L===null||L===0){var se;w(Z),(se=document.getElementById(Z.toString()))==null||se.scrollIntoView()}else{var he;w(L-1),(he=document.getElementById((L-1).toString()))==null||he.scrollIntoView()}}return z}(),D=function(){function z(Y){Y!==L&&w(Y)}return z}(),j=function(){function z(){x(!1),x(!0)}return z}(),F=function(){function z(Y){var Z=String.fromCharCode(Y),ie=v.find(function(he){return he==null?void 0:he.toLowerCase().startsWith(Z==null?void 0:Z.toLowerCase())});if(ie){var ae,se=v.indexOf(ie);w(se),(ae=document.getElementById(se.toString()))==null||ae.scrollIntoView()}}return z}(),W=function(){function z(Y){var Z;Y!==P&&(R(Y),w(0),(Z=document.getElementById("0"))==null||Z.scrollIntoView())}return z}(),K=function(){function z(){x(!A),R("")}return z}(),_=v.filter(function(z){return z==null?void 0:z.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(C.length/3);return A||setTimeout(function(){var z;return(z=document.getElementById(L.toString()))==null?void 0:z.focus()},1),(0,e.createComponentVNode)(2,k.Window,{title:b,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function z(Y){var Z=window.event?Y.which:Y.keyCode;(Z===V.KEY_DOWN||Z===V.KEY_UP)&&(Y.preventDefault(),M(Z)),Z===V.KEY_ENTER&&(Y.preventDefault(),d("submit",{entry:_[L]})),!A&&Z>=V.KEY_A&&Z<=V.KEY_Z&&(Y.preventDefault(),F(Z)),Z===V.KEY_ESCAPE&&(Y.preventDefault(),d("cancel"))}return z}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function z(){return K()}return z}()}),className:"ListInput__Section",fill:!0,title:C,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y,{filteredItems:_,onClick:D,onFocusSearch:j,searchBarVisible:A,selected:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,p,{filteredItems:_,onSearch:W,searchQuery:P,selected:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:_[L]})})]})})})]})}return l}(),y=function(c,m){var i=(0,f.useBackend)(m),d=i.act,u=c.filteredItems,s=c.onClick,v=c.onFocusSearch,g=c.searchBarVisible,C=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:u.map(function(h,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function b(){return s(N)}return b}(),onDblClick:function(){function b(B){B.preventDefault(),d("submit",{entry:u[C]})}return b}(),onKeyDown:function(){function b(B){var L=window.event?B.which:B.keyCode;g&&L>=V.KEY_A&&L<=V.KEY_Z&&(B.preventDefault(),v())}return b}(),selected:N===C,style:{animation:"none",transition:"none"},children:h.replace(/^\w/,function(b){return b.toUpperCase()})},N)})})},p=function(c,m){var i=(0,f.useBackend)(m),d=i.act,u=c.filteredItems,s=c.onSearch,v=c.searchQuery,g=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function C(h){h.preventDefault(),d("submit",{entry:u[g]})}return C}(),onInput:function(){function C(h,N){return s(N)}return C}(),placeholder:"Search...",value:v})}},75965:function(I,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function R(M,D){return P("configure",{key:T,value:D,ref:x})}return R}()})},V=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function R(){return P("configure",{key:T,value:!A,ref:x})}return R}()})},k=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function R(){return P("configure",{key:T,ref:x})}return R}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},S=function(L,w){var T=L.name,A=L.value,x=L.values,E=L.module_ref,P=(0,a.useBackend)(w),R=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(D){return R("configure",{key:T,value:D,ref:E})}return M}()})},y=function(L,w){var T=L.name,A=L.display_name,x=L.type,E=L.value,P=L.values,R=L.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,Object.assign({},L))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,V,Object.assign({},L))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,k,Object.assign({},L))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,S,Object.assign({},L)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},p=function(L,w){var T=L.active,A=L.userradiated,x=L.usertoxins,E=L.usermaxtoxins,P=L.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:T&&A?"bad":"good",children:T&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:T&&P?"bad":"good",bold:!0,children:T&&P?P:0})})]})},l=function(L,w){var T=L.active,A=L.userhealth,x=L.usermaxhealth,E=L.userbrute,P=L.userburn,R=L.usertoxin,M=L.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?R/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?R:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?M:0})})})})]})],4)},c=function(L,w){var T=L.active,A=L.statustime,x=L.statusid,E=L.statushealth,P=L.statusmaxhealth,R=L.statusbrute,M=L.statusburn,D=L.statustoxin,j=L.statusoxy,F=L.statustemp,W=L.statusnutrition,K=L.statusfingerprints,_=L.statusdna,$=L.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:T?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:T?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?R:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:D})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?j/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:j})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:T?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:T?W:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:T?K:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:T?_:"???"})]})}),!!T&&!!$&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),$.map(function(z){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[z.stage,"/",z.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.cure})]},z.name)})]})})],0)},m={rad_counter:p,health_analyzer:l,status_readout:c},i=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},d=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},u=function(L,w){var T=L.configuration_data,A=L.module_ref,x=Object.keys(T);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=T[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:L.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},s=function(L){switch(L){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},v=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.malfunctioning,R=x.locked,M=x.open,D=x.selected_module,j=x.complexity,F=x.complexity_max,W=x.wearer_name,K=x.wearer_job,_=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function $(){return A("activate")}return $}()}),children:_}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:R?"lock-open":"lock",content:R?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:R?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[j," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[W,", ",K]})]})})},g=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.control,R=x.helmet,M=x.chestplate,D=x.gauntlets,j=x.boots,F=x.core,W=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:j||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:W/100,content:W+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},C=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.modules,R=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:R.length!==0&&R.map(function(M){var D=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,d),(0,e.normalizeProps)((0,e.createComponentVNode)(2,D,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},h=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.complexity_max,P=x.modules,R=(0,a.useLocalState)(w,"module_configuration",null),M=R[0],D=R[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(j){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:j.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===j.ref&&(0,e.createComponentVNode)(2,u,{configuration_data:j.configuration_data,module_ref:j.ref,onExit:function(){function F(){return D(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[j.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[j.cooldown>0&&j.cooldown/10||"0","/",j.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:j.ref})}return F}(),icon:"bullseye",selected:j.module_active,tooltip:s(j.module_type),tooltipPosition:"left",disabled:!j.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return D(j.ref)}return F}(),icon:"cog",selected:M===j.ref,tooltip:"Configure",tooltipPosition:"left",disabled:j.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:j.ref})}return F}(),icon:"thumbtack",selected:j.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!j.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:j.description})]})})},j.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=r.MODsuitContent=function(){function B(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,i)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,h)})]})})}return B}(),b=r.MODsuit=function(){function B(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,N)})})})}return B}()},86322:function(I,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=n(22677),k=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),S=r.MagnetController=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,d=i.autolink,u=i.code,s=i.frequency,v=i.linkedMagnets,g=i.magnetConfiguration,C=i.path,h=i.pathPosition,N=i.probing,b=i.powerState,B=i.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!d&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function L(){return m("probe_magnets")}return L}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(s/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:u})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:b?"power-off":"times",content:b?"On":"Off",selected:b,onClick:function(){function L(){return m("toggle_power")}return L}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:B.value,minValue:B.min,maxValue:B.max,onChange:function(){function L(w,T){return m("set_speed",{speed:T})}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(k.entries()).map(function(L){var w=L[0],T=L[1],A=T.icon,x=T.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return m("path_add",{code:w})}return E}()},w)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function L(){return m("path_clear")}return L}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function L(){return(0,V.modalOpen)(l,"path_custom_input")}return L}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:C.map(function(L,w){var T=k.get(L)||{icon:"question"},A=T.icon,x=T.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:w+2===h,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:w+1,code:L})}return E}()},w)})})]})]})}),v.map(function(L,w){var T=L.uid,A=L.powerState,x=L.electricityLevel,E=L.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(w+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return m("toggle_magnet_power",{id:T})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:g.electricityLevel.min,maxValue:g.electricityLevel.max,onChange:function(){function P(R,M){return m("set_electricity_level",{id:T,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:g.magneticField.min,maxValue:g.magneticField.max,onChange:function(){function P(R,M){return m("set_magnetic_field",{id:T,magneticField:M})}return P}()})})]})},T)})]})]})}return y}()},54374:function(I,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.MechBayConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.recharge_port,m=c&&c.mech,i=m&&m.cell,d=m&&m.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function u(){return p("reconnect")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!i&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.charge/i.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.charge})," / "+i.maxcharge]})})]})})})})}return V}()},14823:function(I,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=n(37843),k=r.MechaControlConsole=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.beacons,d=m.stored_data;return d.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function u(){return c("clear_log")}return u}()}),children:d.map(function(u){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",u.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,V.decodeHtmlEntities)(u.message)})]},u.time)})})})}):(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:i.length&&i.map(function(u){return(0,e.createComponentVNode)(2,o.Section,{title:u.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function s(){return c("send_message",{mt:u.uid})}return s}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function s(){return c("get_log",{mt:u.uid})}return s}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function s(){return c("shock",{mt:u.uid})}return s}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[u.maxHealth*.75,1/0],average:[u.maxHealth*.5,u.maxHealth*.75],bad:[-1/0,u.maxHealth*.5]},value:u.health,maxValue:u.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:u.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[u.cellMaxCharge*.75,1/0],average:[u.cellMaxCharge*.5,u.cellMaxCharge*.75],bad:[-1/0,u.cellMaxCharge*.5]},value:u.cellCharge,maxValue:u.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[u.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:u.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,V.toTitleCase)(u.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:u.active||"None"}),u.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[u.cargoMax*.75,1/0],average:[u.cargoMax*.5,u.cargoMax*.75],good:[-1/0,u.cargoMax*.5]},value:u.cargoUsed,maxValue:u.cargoMax})})||null]})},u.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return S}()},16189:function(I,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(22677),V=n(84947),k=n(51185),S=n(69774),y=n(76519),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},l={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(w,T){(0,f.modalOpen)(w,"edit",{field:T.edit,value:T.value})},m=function(w,T){var A=w.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:A.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:A.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[A.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:A.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:A.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:p[A.severity],children:A.severity})]})})})},i=r.MedicalRecords=function(){function L(w,T){var A=(0,t.useBackend)(T),x=A.data,E=x.loginState,P=x.screen;if(!E.logged_in)return(0,e.createComponentVNode)(2,V.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});var R;return P===2?R=(0,e.createComponentVNode)(2,d):P===3?R=(0,e.createComponentVNode)(2,u):P===4?R=(0,e.createComponentVNode)(2,s):P===5?R=(0,e.createComponentVNode)(2,C):P===6&&(R=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,V.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,y.TemporaryNotice),(0,e.createComponentVNode)(2,B),R]})})]})}return L}(),d=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.records,R=(0,t.useLocalState)(T,"searchText",""),M=R[0],D=R[1],j=(0,t.useLocalState)(T,"sortId","name"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"sortOrder",!0),_=K[0],$=K[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function z(){return x("screen",{screen:3})}return z}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function z(Y,Z){return D(Z)}return z}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"Mental Status"})]}),P.filter((0,a.createSearch)(M,function(z){return z.name+"|"+z.id+"|"+z.rank+"|"+z.p_stat+"|"+z.m_stat})).sort(function(z,Y){var Z=_?1:-1;return z[F].localeCompare(Y[F])*Z}).map(function(z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+l[z.p_stat],onClick:function(){function Y(){return x("view_record",{view_record:z.ref})}return Y}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.m_stat})]},z.id)})]})})})],4)},u=function(w,T){var A=(0,t.useBackend)(T),x=A.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,lineHeight:3,icon:"trash",color:"translucent",content:"Delete All Medical Records",onClick:function(){function E(){return x("del_all_med_records")}return E}()})})]})})},s=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medical,R=E.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function M(){return x("print_record")}return M}()}),children:(0,e.createComponentVNode)(2,v)})}),!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function M(){return x("new_med_record")}return M}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!P.empty,content:"Delete Medical Record",onClick:function(){function M(){return x("del_med_record")}return M}()})})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(w,T){var A=(0,t.useBackend)(T),x=A.data,E=x.general;return!E||!E.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:E.fields.map(function(P,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:P.value}),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function M(){return c(T,P)}return M}()})]},R)})})}),!!E.has_photos&&E.photos.map(function(P,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:P,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},g=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,f.modalOpen)(T,"add_comment")}return R}()}),children:P.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):P.comments.map(function(R,M){return(0,e.createComponentVNode)(2,o.Box,{prewrap:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function D(){return x("del_comment",{del_comment:M+1})}return D}()})]},M)})})})},C=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.virus,R=(0,t.useLocalState)(T,"searchText",""),M=R[0],D=R[1],j=(0,t.useLocalState)(T,"sortId2","name"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"sortOrder2",!0),_=K[0],$=K[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function z(Y,Z){return D(Z)}return z}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,b,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,b,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,b,{id:"severity",children:"Severity"})]}),P.filter((0,a.createSearch)(M,function(z){return z.name+"|"+z.max_stages+"|"+z.severity})).sort(function(z,Y){var Z=_?1:-1;return z[F].localeCompare(Y[F])*Z}).map(function(z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+z.severity,onClick:function(){function Y(){return x("vir",{vir:z.D})}return Y}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:p[z.severity],children:z.severity})]},z.id)})]})})})})],4)},h=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medbots;return P.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),P.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},N=function(w,T){var A=(0,t.useLocalState)(T,"sortId","name"),x=A[0],E=A[1],P=(0,t.useLocalState)(T,"sortOrder",!0),R=P[0],M=P[1],D=w.id,j=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:x!==D&&"transparent",onClick:function(){function F(){x===D?M(!R):(E(D),M(!0))}return F}(),children:[j,x===D&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(w,T){var A=(0,t.useLocalState)(T,"sortId2","name"),x=A[0],E=A[1],P=(0,t.useLocalState)(T,"sortOrder2",!0),R=P[0],M=P[1],D=w.id,j=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:x!==D&&"transparent",onClick:function(){function F(){x===D?M(!R):(E(D),M(!0))}return F}(),children:[j,x===D&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.screen,R=E.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:P===2,onClick:function(){function M(){x("screen",{screen:2})}return M}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:P===5,onClick:function(){function M(){x("screen",{screen:5})}return M}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:P===6,onClick:function(){function M(){return x("screen",{screen:6})}return M}(),children:"Medibot Tracking"}),P===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:P===3,children:"Record Maintenance"}),P===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:P===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},44482:function(I,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=p.product,u=p.productImage,s=p.productCategory,v=i.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:d.price>v,icon:"shopping-cart",content:d.price,textAlign:"left",onClick:function(){function g(){return m("purchase",{name:d.name,category:s})}return g}()})})]})},V=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),d=i[0],u=m.products,s=m.imagelist,v=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:u[v[d]].map(function(g){return(0,e.createComponentVNode)(2,f,{product:g,productImage:s[g.path],productCategory:v[d]},g.name)})})},k=r.MerchVendor=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.user_cash,u=i.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,u,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function s(){return m("change")}return s}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives.",d!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[d||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,V)]})})]})})})}return y}(),S=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),d=i[0],u=i[1],s=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:d===1,onClick:function(){function v(){return u(1)}return v}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:d===2,onClick:function(){function v(){return u(2)}return v}(),children:"Decorations"})]})}},53551:function(I,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=["title","items"];function k(i,d){if(i==null)return{};var u={},s=Object.keys(i),v,g;for(g=0;g=0)&&(u[v]=i[v]);return u}var S={Alphabetical:function(){function i(d,u){return d-u}return i}(),Availability:function(){function i(d,u){return-(d.affordable-u.affordable)}return i}(),Price:function(){function i(d,u){return d.price-u.price}return i}()},y=r.MiningVendor=function(){function i(d,u){return(0,e.createComponentVNode)(2,f.Window,{width:400,height:455,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)]})})})}return i}(),p=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.has_id,h=g.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:C,children:C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",h.name,".",(0,e.createVNode)(1,"br"),"You have ",h.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return v("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},l=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.has_id,h=g.id,N=g.items,b=(0,t.useLocalState)(u,"search",""),B=b[0],L=b[1],w=(0,t.useLocalState)(u,"sort","Alphabetical"),T=w[0],A=w[1],x=(0,t.useLocalState)(u,"descending",!1),E=x[0],P=x[1],R=(0,a.createSearch)(B,function(j){return j[0]}),M=!1,D=Object.entries(N).map(function(j,F){var W=Object.entries(j[1]).filter(R).map(function(K){return K[1].affordable=C&&h.points>=K[1].price,K[1]}).sort(S[T]);if(W.length!==0)return E&&(W=W.reverse()),M=!0,(0,e.createComponentVNode)(2,m,{title:j[0],items:W},j[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:M?D:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(d,u){var s=(0,t.useLocalState)(u,"search",""),v=s[0],g=s[1],C=(0,t.useLocalState)(u,"sort",""),h=C[0],N=C[1],b=(0,t.useLocalState)(u,"descending",!1),B=b[0],L=b[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function w(T,A){return g(A)}return w}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(S),width:"100%",onSelected:function(){function w(T){return N(T)}return w}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:B?"arrow-down":"arrow-up",height:"21px",tooltip:B?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function w(){return L(!B)}return w}()})})]})})},m=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=d.title,h=d.items,N=k(d,V);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:C},N,{children:h.map(function(b){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:b.name}),(0,e.createComponentVNode)(2,o.Button,{disabled:!g.has_id||g.id.points0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+d+'"':"\u0412\u0441\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 - "+m.length,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:m.filter(function(v){return v.name&&(d.length>0?v.name.toLowerCase().includes(d.toLowerCase())||v.desc.toLowerCase().includes(d.toLowerCase())||v.author.toLowerCase().includes(d.toLowerCase()):!0)}).map(function(v){return(0,e.createComponentVNode)(2,o.Collapsible,{title:v.name,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u0410\u0432\u0442\u043E\u0440\u044B",children:v.author}),(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",children:v.desc})]},v.name)})})})})})],4)}return k}()},61100:function(I,r,n){"use strict";r.__esModule=!0,r.NTRecruiter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.NTRecruiter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.gamestatus,m=l.cand_name,i=l.cand_gender,d=l.cand_age,u=l.cand_species,s=l.cand_planet,v=l.cand_job,g=l.cand_records,C=l.cand_curriculum,h=l.total_curriculums,N=l.reason;if(c===0)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){function b(){return p("start_game")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){function b(){return p("instructions")}return b}()})]})]})})});if(c===1)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,color:"grey",title:"Guide",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){function b(){return p("back_to_menu")}return b}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,e.createVNode)(1,"b",null,h,0)," candidates, one wrongly made choice leads to a game over."]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"3#",color:"silver",children:[(0,e.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,e.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,e.createVNode)(1,"b",null,"typos",16)," and ",(0,e.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,e.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,e.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,e.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})})});if(c===2)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",C]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",color:"silver",children:(0,e.createVNode)(1,"b",null,m,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",color:"silver",children:(0,e.createVNode)(1,"b",null,i,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",color:"silver",children:(0,e.createVNode)(1,"b",null,d,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",color:"silver",children:(0,e.createVNode)(1,"b",null,u,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Planet of Origin",color:"silver",children:(0,e.createVNode)(1,"b",null,s,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requested Job",color:"silver",children:(0,e.createVNode)(1,"b",null,v,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Employment Records",color:"silver",children:(0,e.createVNode)(1,"b",null,g,0)})]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){function b(){return p("dismiss")}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){function b(){return p("hire")}return b}()})})]})})})]})})});if(c===3)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{pt:"40%",fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"15px",color:"label",textAlign:"center",children:N}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",C-1,"/",h]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){function b(){return p("back_to_menu")}return b}()})})]})})})}return V}()},6802:function(I,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(30381),V=n(84947),k=n(22677),S=n(76519),y=["icon","iconSpin","selected","security","onClick","title","children"],p=["name"];function l(L,w){if(L==null)return{};var T={},A=Object.keys(L),x,E;for(E=0;E=0)&&(T[x]=L[x]);return T}var c=128,m=["security","engineering","medical","science","service","supply"],i={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}},d=r.Newscaster=function(){function L(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.is_security,R=E.is_admin,M=E.is_silent,D=E.is_printing,j=E.screen,F=E.channels,W=E.channel_idx,K=W===void 0?-1:W,_=(0,t.useLocalState)(T,"menuOpen",!1),$=_[0],z=_[1],Y=(0,t.useLocalState)(T,"viewingPhoto",""),Z=Y[0],ie=Y[1],ae=(0,t.useLocalState)(T,"censorMode",!1),se=ae[0],he=ae[1],ye;j===0||j===2?ye=(0,e.createComponentVNode)(2,s):j===1&&(ye=(0,e.createComponentVNode)(2,v));var Le=F.reduce(function(pe,oe){return pe+oe.unread},0);return(0,e.createComponentVNode)(2,V.Window,{theme:P&&"security",width:800,height:600,children:[Z?(0,e.createComponentVNode)(2,h):(0,e.createComponentVNode)(2,k.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",$&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,u,{icon:"bars",title:"Toggle Menu",onClick:function(){function pe(){return z(!$)}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:"newspaper",title:"Headlines",selected:j===0,onClick:function(){function pe(){return x("headlines")}return pe}(),children:Le>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Le>=10?"9+":Le})}),(0,e.createComponentVNode)(2,u,{icon:"briefcase",title:"Job Openings",selected:j===1,onClick:function(){function pe(){return x("jobs")}return pe}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(pe){return(0,e.createComponentVNode)(2,u,{icon:pe.icon,title:pe.name,selected:j===2&&F[K-1]===pe,onClick:function(){function oe(){return x("channel",{uid:pe.uid})}return oe}(),children:pe.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:pe.unread>=10?"9+":pe.unread})},pe)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!R)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function pe(){return(0,k.modalOpen)(T,"wanted_notice")}return pe}()}),(0,e.createComponentVNode)(2,u,{security:!0,icon:se?"minus-square":"minus-square-o",title:"Censor Mode: "+(se?"On":"Off"),mb:"0.5rem",onClick:function(){function pe(){return he(!se)}return pe}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,u,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function pe(){return(0,k.modalOpen)(T,"create_story")}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:"plus-circle",title:"New Channel",onClick:function(){function pe(){return(0,k.modalOpen)(T,"create_channel")}return pe}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,u,{icon:D?"spinner":"print",iconSpin:D,title:D?"Printing...":"Print Newspaper",onClick:function(){function pe(){return x("print_newspaper")}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function pe(){return x("toggle_mute")}return pe}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,S.TemporaryNotice),ye]})]})})]})}return L}(),u=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=w.icon,P=E===void 0?"":E,R=w.iconSpin,M=w.selected,D=M===void 0?!1:M,j=w.security,F=j===void 0?!1:j,W=w.onClick,K=w.title,_=w.children,$=l(w,y);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",D&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:W},$,{children:[D&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:R,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:K}),_]})))},s=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.screen,R=E.is_admin,M=E.channel_idx,D=E.channel_can_manage,j=E.channels,F=E.stories,W=E.wanted,K=(0,t.useLocalState)(T,"fullStories",[]),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"censorMode",!1),Y=z[0],Z=z[1],ie=P===2&&M>-1?j[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!W&&(0,e.createComponentVNode)(2,g,{story:W,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:ie?ie.icon:"newspaper",mr:"0.5rem"}),ie?ie.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ae){return!_.includes(ae.uid)&&ae.body.length+3>c?Object.assign({},ae,{body_short:ae.body.substr(0,c-4)+"..."}):ae}).map(function(ae,se){return(0,e.createComponentVNode)(2,g,{story:ae},se)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!ie&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Y&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!ie.admin&&!R,selected:ie.censored,icon:ie.censored?"comment-slash":"comment",content:ie.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ae(){return x("censor_channel",{uid:ie.uid})}return ae}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!D,icon:"cog",content:"Manage",onClick:function(){function ae(){return(0,k.modalOpen)(T,"manage_channel",{uid:ie.uid})}return ae}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:ie.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:ie.author||"N/A"}),!!R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:ie.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:ie.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ae,se){return ae+se.view_count},0).toLocaleString()]})]})})]})},v=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.jobs,R=E.wanted,M=Object.entries(P).reduce(function(D,j){var F=j[0],W=j[1];return D+W.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!R&&(0,e.createComponentVNode)(2,g,{story:R,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?m.map(function(D){return Object.assign({},i[D],{id:D,jobs:P[D]})}).filter(function(D){return!!D&&D.jobs.length>0}).map(function(D){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+D.id]),title:D.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:D.fluff_text}),children:D.jobs.map(function(j){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!j.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",j.title]},j.title)})},D.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},g=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=w.story,R=w.wanted,M=R===void 0?!1:R,D=E.is_admin,j=(0,t.useLocalState)(T,"fullStories",[]),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"censorMode",!1),_=K[0],$=K[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&_&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function z(){return x("censor_story",{uid:P.uid})}return z}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!D&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("|\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,f.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,C,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(z,Y){return(0,e.createComponentVNode)(2,o.Box,{children:z||(0,e.createVNode)(1,"br")},Y)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function z(){return W([].concat(F,[P.uid]))}return z}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},C=function(w,T){var A=w.name,x=l(w,p),E=(0,t.useLocalState)(T,"viewingPhoto",""),P=E[0],R=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return R(A)}return M}()},x)))},h=function(w,T){var A=(0,t.useLocalState)(T,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},N=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=!!w.args.uid&&E.channels.filter(function(q){return q.uid===w.args.uid}).pop();if(w.id==="manage_channel"&&!P){(0,k.modalClose)(T);return}var R=w.id==="manage_channel",M=!!w.args.is_admin,D=w.args.scanned_user,j=(0,t.useLocalState)(T,"author",(P==null?void 0:P.author)||D||"Unknown"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"name",(P==null?void 0:P.name)||""),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"description",(P==null?void 0:P.description)||""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"icon",(P==null?void 0:P.icon)||"newspaper"),ae=ie[0],se=ie[1],he=(0,t.useLocalState)(T,"isPublic",R?!!(P!=null&&P.public):!1),ye=he[0],Le=he[1],pe=(0,t.useLocalState)(T,"adminLocked",(P==null?void 0:P.admin)===1||!1),oe=pe[0],Q=pe[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:R?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function q(ue,me){return W(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:_,onInput:function(){function q(ue,me){return $(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Y,onInput:function(){function q(ue,me){return Z(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ae,width:"35%",mr:"0.5rem",onInput:function(){function q(ue,me){return se(me)}return q}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ae,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:ye,icon:ye?"toggle-on":"toggle-off",content:ye?"Yes":"No",onClick:function(){function q(){return Le(!ye)}return q}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return Q(!oe)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||_.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,k.modalAnswer)(T,w.id,"",{author:F,name:_.substr(0,49),description:Y.substr(0,128),icon:ae,public:ye?1:0,admin_locked:oe?1:0})}return q}()})]})},b=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.photo,R=E.channels,M=E.channel_idx,D=M===void 0?-1:M,j=!!w.args.is_admin,F=w.args.scanned_user,W=R.slice().sort(function(q,ue){if(D<0)return 0;var me=R[D-1];if(me.uid===q.uid)return-1;if(me.uid===ue.uid)return 1}).filter(function(q){return j||!q.frozen&&(q.author===F||!!q.public)}),K=(0,t.useLocalState)(T,"author",F||"Unknown"),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"channel",W.length>0?W[0].name:""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"title",""),ae=ie[0],se=ie[1],he=(0,t.useLocalState)(T,"body",""),ye=he[0],Le=he[1],pe=(0,t.useLocalState)(T,"adminLocked",!1),oe=pe[0],Q=pe[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!j,width:"100%",value:_,onInput:function(){function q(ue,me){return $(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Y,options:W.map(function(q){return q.name}),mb:"0",width:"100%",onSelected:function(){function q(ue){return Z(ue)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ae,onInput:function(){function q(ue,me){return se(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:ye,onInput:function(){function q(ue,me){return Le(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function q(){return x(P?"eject_photo":"attach_photo")}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ae,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,C,{name:"inserted_photo_"+P.uid+".png",float:"right"}),ye.split("\n").map(function(q,ue){return(0,e.createComponentVNode)(2,o.Box,{children:q||(0,e.createVNode)(1,"br")},ue)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return Q(!oe)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:_.trim().length===0||Y.trim().length===0||ae.trim().length===0||ye.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,k.modalAnswer)(T,"create_story","",{author:_,channel:Y,title:ae.substr(0,127),body:ye.substr(0,1023),admin_locked:oe?1:0})}return q}()})]})},B=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.photo,R=E.wanted,M=!!w.args.is_admin,D=w.args.scanned_user,j=(0,t.useLocalState)(T,"author",(R==null?void 0:R.author)||D||"Unknown"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"name",(R==null?void 0:R.title.substr(8))||""),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"description",(R==null?void 0:R.body)||""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"adminLocked",(R==null?void 0:R.admin_locked)===1||!1),ae=ie[0],se=ie[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function he(ye,Le){return W(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:_,maxLength:"128",onInput:function(){function he(ye,Le){return $(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Y,maxLength:"512",rows:"4",onInput:function(){function he(ye,Le){return Z(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function he(){return x(P?"eject_photo":"attach_photo")}return he}()}),!!P&&(0,e.createComponentVNode)(2,C,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ae,icon:ae?"lock":"lock-open",content:ae?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function he(){return se(!ae)}return he}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!R,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function he(){x("clear_wanted_notice"),(0,k.modalClose)(T)}return he}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||_.trim().length===0||Y.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function he(){(0,k.modalAnswer)(T,w.id,"",{author:F,name:_.substr(0,127),description:Y.substr(0,511),admin_locked:ae?1:0})}return he}()})]})};(0,k.modalRegisterBodyOverride)("create_channel",N),(0,k.modalRegisterBodyOverride)("manage_channel",N),(0,k.modalRegisterBodyOverride)("create_story",b),(0,k.modalRegisterBodyOverride)("wanted_notice",B)},64639:function(I,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.NuclearBomb=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return l.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return p("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){function c(){return p("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){function c(){return p("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){function c(){return p("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return p("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return p("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return p("deploy")}return c}()})})})})}return V}()},45523:function(I,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(31068),f=n(91819),V=n(2971),k=n(84947),S=r.NumberInputModal=function(){function p(l,c){var m=(0,f.useBackend)(c),i=m.act,d=m.data,u=d.init_value,s=d.large_buttons,v=d.message,g=v===void 0?"":v,C=d.timeout,h=d.title,N=(0,f.useLocalState)(c,"input",u),b=N[0],B=N[1],L=function(){function A(x){x!==b&&B(x)}return A}(),w=function(){function A(x){x!==b&&B(x)}return A}(),T=120+(g.length>30?Math.ceil(g.length/3):0);return(0,e.createComponentVNode)(2,k.Window,{title:h,width:270,height:T,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&i("submit",{entry:b}),E===o.KEY_ESCAPE&&i("cancel")}return A}(),children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Box,{color:"label",children:g})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,y,{input:b,onClick:w,onChange:L})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:b})})]})})})]})}return p}(),y=function(l,c){var m=(0,f.useBackend)(c),i=m.act,d=m.data,u=d.min_value,s=d.max_value,v=d.init_value,g=d.round_value,C=l.input,h=l.onClick,N=l.onChange,b=Math.round(C!==u?Math.max(C/2,u):s/2),B=C===u&&u>0||C===1;return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===u,icon:"angle-double-left",onClick:function(){function L(){return h(u)}return L}(),tooltip:C===u?"Min":"Min ("+u+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!g,minValue:u,maxValue:s,onChange:function(){function L(w,T){return N(T)}return L}(),onEnter:function(){function L(w,T){return i("submit",{entry:T})}return L}(),value:C})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===s,icon:"angle-double-right",onClick:function(){function L(){return h(s)}return L}(),tooltip:C===s?"Max":"Max ("+s+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:B,icon:"divide",onClick:function(){function L(){return h(b)}return L}(),tooltip:B?"Split":"Split ("+b+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===v,icon:"redo",onClick:function(){function L(){return h(v)}return L}(),tooltip:v?"Reset ("+v+")":"Reset"})})]})}},48314:function(I,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(84947),f=n(2971),V=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],k=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},y=["bad","average","average","good","average","average","bad"],p=r.OperatingComputer=function(){function i(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.hasOccupant,h=g.choice,N;return h?N=(0,e.createComponentVNode)(2,m):N=C?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!h,icon:"user",onClick:function(){function b(){return v("choiceOff")}return b}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!h,icon:"cog",onClick:function(){function b(){return v("choiceOn")}return b}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return i}(),l=function(d,u){var s=(0,t.useBackend)(u),v=s.data,g=v.occupant;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:g.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.maxHealth,value:g.health/g.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),k.map(function(C,h){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:C[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:g[C[1]]/100,ranges:S,children:(0,a.round)(g[C[1]])},h)},h)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.maxTemp,value:g.bodyTemperature/g.maxTemp,color:y[g.temperatureSuitability+3],children:[(0,a.round)(g.btCelsius),"\xB0C, ",(0,a.round)(g.btFaren),"\xB0F"]})}),!!g.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.bloodMax,value:g.bloodLevel/g.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[g.bloodPercent,"%, ",g.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[g.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Current Procedure",level:"2",children:g.inSurgery?(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Procedure",children:g.surgeryName}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:g.stepName})]}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.verbose,h=g.health,N=g.healthAlarm,b=g.oxy,B=g.oxyAlarm,L=g.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"On":"Off",onClick:function(){function w(){return v(C?"verboseOff":"verboseOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function w(){return v(h?"healthOff":"healthOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function w(T,A){return v("health_adj",{new:A})}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:b,icon:b?"toggle-on":"toggle-off",content:b?"On":"Off",onClick:function(){function w(){return v(b?"oxyOff":"oxyOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:B,stepPixelSize:5,ml:"0",onChange:function(){function w(T,A){return v("oxy_adj",{new:A})}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:L?"On":"Off",onClick:function(){function w(){return v(L?"critOff":"critOn")}return w}()})})]})}},87511:function(I,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947);function V(u,s){var v=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(v)return(v=v.call(u)).next.bind(v);if(Array.isArray(u)||(v=k(u))||s&&u&&typeof u.length=="number"){v&&(u=v);var g=0;return function(){return g>=u.length?{done:!0}:{done:!1,value:u[g++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(u,s){if(u){if(typeof u=="string")return S(u,s);var v=Object.prototype.toString.call(u).slice(8,-1);if(v==="Object"&&u.constructor&&(v=u.constructor.name),v==="Map"||v==="Set")return Array.from(u);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return S(u,s)}}function S(u,s){(s==null||s>u.length)&&(s=u.length);for(var v=0,g=new Array(s);vv},c=function(s,v){var g=s.name,C=v.name;if(!g||!C)return 0;var h=g.match(y),N=C.match(y);if(h&&N&&g.replace(y,"")===C.replace(y,"")){var b=parseInt(h[1],10),B=parseInt(N[1],10);return b-B}return l(g,C)},m=function(s,v){var g=s.searchText,C=s.source,h=s.title,N=s.color,b=s.sorted,B=C.filter(p(g));return b&&B.sort(c),C.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:h+" - ("+C.length+")",children:B.map(function(L){return(0,e.createComponentVNode)(2,i,{thing:L,color:N},L.name)})})},i=function(s,v){var g=(0,t.useBackend)(v),C=g.act,h=s.color,N=s.thing;return(0,e.createComponentVNode)(2,o.Button,{color:h,onClick:function(){function b(){return C("orbit",{ref:N.ref})}return b}(),children:[N.name,N.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",N.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},d=r.Orbit=function(){function u(s,v){for(var g=(0,t.useBackend)(v),C=g.act,h=g.data,N=h.alive,b=h.antagonists,B=h.highlights,L=h.response_teams,w=h.auto_observe,T=h.dead,A=h.ghosts,x=h.misc,E=h.npcs,P=(0,t.useLocalState)(v,"searchText",""),R=P[0],M=P[1],D={},j=V(b),F;!(F=j()).done;){var W=F.value;D[W.antag]===void 0&&(D[W.antag]=[]),D[W.antag].push(W)}var K=Object.entries(D);K.sort(function($,z){return l($[0],z[0])});var _=function(){function $(z){for(var Y=0,Z=[K.map(function(se){var he=se[0],ye=se[1];return ye}),B,N,A,T,E,x];Y0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:K.map(function($){var z=$[0],Y=$[1];return(0,e.createComponentVNode)(2,o.Section,{title:z+" - ("+Y.length+")",level:2,children:Y.filter(p(R)).sort(c).map(function(Z){return(0,e.createComponentVNode)(2,i,{color:"bad",thing:Z},Z.name)})},z)})}),B.length>0&&(0,e.createComponentVNode)(2,m,{title:"Highlights",source:B,searchText:R,color:"teal"}),(0,e.createComponentVNode)(2,m,{title:"Response Teams",source:L,searchText:R,color:"purple"}),(0,e.createComponentVNode)(2,m,{title:"Alive",source:N,searchText:R,color:"good"}),(0,e.createComponentVNode)(2,m,{title:"Ghosts",source:A,searchText:R,color:"grey"}),(0,e.createComponentVNode)(2,m,{title:"Dead",source:T,searchText:R,sorted:!1}),(0,e.createComponentVNode)(2,m,{title:"NPCs",source:E,searchText:R,sorted:!1}),(0,e.createComponentVNode)(2,m,{title:"Misc",source:x,searchText:R,sorted:!1})]})})}return u}()},54528:function(I,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(84947),V=n(50175);function k(s){if(s==null)throw new TypeError("Cannot destructure "+s)}var S=(0,V.createLogger)("OreRedemption"),y=function(v){return v.toLocaleString("en-US")+" pts"},p=r.OreRedemption=function(){function s(v,g){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.id,B=N.points,L=N.disk,w=Object.assign({},(k(v),v));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},w,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID card",children:b?(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:b.name,tooltip:"Ejects the ID card.",onClick:function(){function T(){return h("eject_id")}return T}(),style:{"white-space":"pre-wrap"}}):(0,e.createComponentVNode)(2,o.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){function T(){return h("insert_id")}return T}()})}),b&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:y(b.points)})}),b&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:y(b.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:B>0?"good":"grey",bold:B>0&&"good",children:y(B)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!b,icon:"hand-holding-usd",content:"Claim",onClick:function(){function T(){return h("claim")}return T}()})})]}),(0,e.createComponentVNode)(2,o.Divider),L?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:L.name,tooltip:"Ejects the design disk.",onClick:function(){function T(){return h("eject_disk")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L.design||!L.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function T(){return h("download")}return T}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:L.design&&(L.compatible?"good":"bad"),children:L.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.sheets,B=Object.assign({},(k(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},B,{children:[(0,e.createComponentVNode)(2,i,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),b.map(function(L){return(0,e.createComponentVNode)(2,d,{ore:L},L.id)})]})))})},m=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.alloys,B=Object.assign({},(k(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},B,{children:[(0,e.createComponentVNode)(2,i,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),b.map(function(L){return(0,e.createComponentVNode)(2,u,{ore:L},L.id)})]})))})},i=function(v,g){var C;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:v.title}),(C=v.columns)==null?void 0:C.map(function(h){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:h[1],textAlign:"center",color:"label",bold:!0,children:h[0]},h)})]})})},d=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=v.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function b(B,L){return h(N.value?"sheet":"alloy",{id:N.id,amount:L})}return b}()})})]})})},u=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=v.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function b(B,L){return h(N.value?"sheet":"alloy",{id:N.id,amount:L})}return b}()})})]})})}},55686:function(I,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(76521),V=n(33115),k=function(p){var l;try{l=V("./"+p+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",p);throw m}var c=l[p];return c||(0,f.routingError)("missingExport",p)},S=r.PAI=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.app_template,u=i.app_icon,s=i.app_title,v=k(d);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:u,mr:1}),s,d!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function g(){return m("Back")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function g(){return m("MASTER_back")}return g}()})],4)]}),children:(0,e.createComponentVNode)(2,v)})})})})})}return y}()},58717:function(I,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(76521),V=n(75168),k=function(c){var m;try{m=V("./"+c+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw d}var i=m[c];return i||(0,f.routingError)("missingExport",c)},S=r.PDA=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.app,v=u.owner;if(!v)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var g=k(s.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s.icon,mr:1}),s.name]}),children:(0,e.createComponentVNode)(2,g)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,p)})]})})})}return l}(),y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.idInserted,v=u.idLink,g=u.stationTime,C=u.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function h(){return d("Authenticate")}return h}(),content:s?v:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function h(){return d("Eject")}return h}(),content:C?["Eject "+C]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:g})]})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!s.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:s.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return d("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:s.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:s.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){d("Home")}return v}()})})]})})}},78062:function(I,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48300),V=r.Pacman=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.active,i=c.anchored,d=c.broken,u=c.emagged,s=c.fuel_type,v=c.fuel_usage,g=c.fuel_stored,C=c.fuel_cap,h=c.is_ai,N=c.tmp_current,b=c.tmp_max,B=c.tmp_overheat,L=c.output_max,w=c.power_gen,T=c.output_set,A=c.has_fuel,x=g/C,E=N/b,P=T*w,R=Math.round(g/v),M=Math.round(R/60),D=R>120?M+" minutes":R+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(d||!i)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!d&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!i&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!i&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function j(){return l("toggle_power")}return j}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:T,minValue:1,maxValue:L*(u?2.5:1),step:1,className:"mt-1",onDrag:function(){function j(F,W){return l("change_power",{change_power:W})}return j}()}),"(",(0,f.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[N," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[B>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),B>20&&B<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),B>1&&B<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),B===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:m||h||!A,onClick:function(){function j(){return l("eject_fuel")}return j}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(g/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[v/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(v?D:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return k}()},65823:function(I,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ParticleAccelerator=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.assembled,m=l.power,i=l.strength,d=l.max_strength;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Connect",onClick:function(){function u(){return p("scan")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:c?"good":"bad",children:c?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,disabled:!c,onClick:function(){function u(){return p("power")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!c||i===0,onClick:function(){function u(){return p("remove_strength")}return u}(),mr:"4px"}),i,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!c||i===d,onClick:function(){function u(){return p("add_strength")}return u}(),ml:"4px"})]})]})})})})}return V}()},67572:function(I,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.PdaPainter=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,V)})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function i(){return m("insert_pda")}return i}()})]})})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,S)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(d).map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function s(){return m("choose_pda",{selectedPda:u})}return s}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+d[u][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u})]},u)})})})})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.current_appearance,u=i.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function s(){return m("eject_pda")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function s(){return m("paint_pda")}return s}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},12456:function(I,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.PersonalCrafting=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.busy,d=m.category,u=m.display_craftable_only,s=m.display_compact,v=m.prev_cat,g=m.next_cat,C=m.subcategory,h=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!i&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:d,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:u?"check-square-o":"square-o",selected:u,onClick:function(){function b(){return c("toggle_recipes")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function b(){return c("toggle_compact")}return b}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"arrow-left",onClick:function(){function b(){return c("backwardCat")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function b(){return c("forwardCat")}return b}()})]}),C&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function b(){return c("backwardSubCat")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function b(){return c("forwardSubCat")}return b}()})]}),s?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,k)]})]})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.display_craftable_only,d=m.can_craft,u=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:s.ref})}return v}()}),s.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:s.req_text,content:"Requirements",color:"transparent"}),s.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.tool_text,content:"Tools",color:"transparent"})]},s.name)}),!i&&u.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),s.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:s.req_text,content:"Requirements",color:"transparent"}),s.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.tool_text,content:"Tools",color:"transparent"})]},s.name)})]})})},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.display_craftable_only,d=m.can_craft,u=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:s.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:s.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:s.req_text}),s.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:s.tool_text})]})},s.name)}),!i&&u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:s.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:s.req_text}),s.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:s.tool_text})]})},s.name)})]})}},72143:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Photocopier=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:m.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function i(){return c("minus")}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function i(){return c("add")}return i}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:m.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function i(){return c("removedocument")}return i}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function i(){return c("removefolder")}return i}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,V)}),(0,e.createComponentVNode)(2,k)]})})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function d(){return c("copy")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function d(){return c("scandocument")}return d}()}),!!i&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function d(){return c("ai_text")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function d(){return c("ai_pic")}return d}()})],4)],0)},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function d(){return c("filecopy",{uid:i.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function d(){return c("deletefile",{uid:i.uid})}return d}()})]})},i.name)})})}},82020:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier220=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(72026),V=n(90955),k=n(37843);function S(m,i){var d=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(d)return(d=d.call(m)).next.bind(d);if(Array.isArray(m)||(d=y(m))||i&&m&&typeof m.length=="number"){d&&(m=d);var u=0;return function(){return u>=m.length?{done:!0}:{done:!1,value:m[u++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(m,i){if(m){if(typeof m=="string")return p(m,i);var d=Object.prototype.toString.call(m).slice(8,-1);if(d==="Object"&&m.constructor&&(d=m.constructor.name),d==="Map"||d==="Set")return Array.from(m);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return p(m,i)}}function p(m,i){(i==null||i>m.length)&&(i=m.length);for(var d=0,u=new Array(i);dm?this.substring(0,m)+"...":this};var l=function(i,d){d===void 0&&(d="");var u=(0,k.createSearch)(d,function(s){return s.altername});return(0,V.flow)([(0,f.filter)(function(s){return s==null?void 0:s.altername}),d&&(0,f.filter)(u),(0,f.sortBy)(function(s){return s.id})])(i)},c=r.Photocopier220=function(){function m(i,d){for(var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.copies,C=v.maxcopies,h=(0,a.useLocalState)(d,"searchText",""),N=h[0],b=h[1],B=l((0,f.sortBy)(function(M){return M.category})(v.forms||[]),N),L=[],w=S(B),T;!(T=w()).done;){var A=T.value;L.includes(A.category)||L.push(A.category)}var x=(0,a.useLocalState)(d,"number",0),E=x[0],P=x[1],R;return v.category===""?R=B:R=B.filter(function(M){return M.category===v.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:v.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:v.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:v.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":v.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.copyitem&&!v.mob,icon:v.copyitem||v.mob?"eject":"times",content:v.copyitem?v.copyitem:v.mob?"\u0416\u043E\u043F\u0430 "+v.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function M(){return s("removedocument")}return M}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.folder,icon:v.folder?"eject":"times",content:v.folder?v.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function M(){return s("removefolder")}return M}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:v.toner===0||v.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function M(){return s("print_form")}return M}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:v.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function M(){return s("ai_pic")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:v.toner===0||!v.copyitem&&!v.mob,onClick:function(){function M(){return s("copy")}return M}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:v.toner===0,onClick:function(){function M(){return s("ai_text")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:C,value:g,stepPixelSize:10,onChange:function(){function M(D,j){return s("copies",{new:j})}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!v.category,onClick:function(){function M(){return s("choose_category",{category:""})}return M}()})}),L.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:M,selected:v.category===M,onClick:function(){function D(){return s("choose_category",{category:M})}return D}()},M)},M)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:v.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function M(D,j){return b(j)}return M}()}),children:R.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:M.altername.trimLongStr(37),tooltip:M.altername,selected:v.form_id===M.id,onClick:function(){function D(){return s("choose_form",{path:M.path,id:M.id})}return D}()})},M.path)})})})]})})})}return m}()},47051:function(I,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=["tempKey"];function V(p,l){if(p==null)return{};var c={},m=Object.keys(p),i,d;for(d=0;d=0)&&(c[i]=p[i]);return c}var k={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},S=function(l,c){var m=l.tempKey,i=V(l,f),d=k[m];if(!d)return null;var u=(0,a.useBackend)(c),s=u.data,v=u.act,g=s.currentTemp,C=d.label,h=d.icon,N=m===g,b=function(){v("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:b},i,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:h}),C]})))},y=r.PoolController=function(){function p(l,c){for(var m=(0,a.useBackend)(c),i=m.data,d=i.emagged,u=i.currentTemp,s=k[u]||k.normal,v=s.label,g=s.color,C=[],h=0,N=Object.entries(k);h50?"battery-half":"battery-quarter")||g==="C"&&"bolt"||g==="F"&&"battery-full"||g==="M"&&"slash",color:g==="N"&&(C>50?"yellow":"red")||g==="C"&&"yellow"||g==="F"&&"green"||g==="M"&&"orange"}),(0,e.createComponentVNode)(2,S.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(C)+"%"})],4)};d.defaultHooks=f.pureComponentHooks;var u=function(v){var g,C,h=v.status;switch(h){case"AOn":g=!0,C=!0;break;case"AOff":g=!0,C=!1;break;case"On":g=!1,C=!0;break;case"Off":g=!1,C=!1;break}var N=(C?"On":"Off")+(" ["+(g?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,S.ColorBox,{color:C?"good":"bad",content:g?void 0:"M",title:N})};u.defaultHooks=f.pureComponentHooks},15164:function(I,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(88488),f=n(22677),V=n(51185),k=n(69774),S=n(84947),y=r.PrisonerImplantManager=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.loginState,s=d.prisonerInfo,v=d.chemicalInfo,g=d.trackingInfo,C;if(!u.logged_in)return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.LoginScreen)})});var h=[1,5,10];return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:s.name?"eject":"id-card",selected:s.name,content:s.name?s.name:"-----",tooltip:s.name?"Eject ID":"Insert ID",onClick:function(){function N(){return i("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[s.points!==null?s.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:s.points===null,content:"Reset",onClick:function(){function N(){return i("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[s.goal!==null?s.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:s.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:s.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:g.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function b(){return(0,f.modalOpen)(c,"warn",{uid:N.uid})}return b}()})})]})]},N.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:v.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:N.volume})}),h.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volume0?"envelope-open-text":"envelope",onClick:function(){function b(){return s("setScreen",{setScreen:6})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Request Assistance",icon:"hand-paper",onClick:function(){function b(){return s("setScreen",{setScreen:1})}return b}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Request Supplies",icon:"box",onClick:function(){function b(){return s("setScreen",{setScreen:2})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Relay Anonymous Information",icon:"comment",onClick:function(){function b(){return s("setScreen",{setScreen:3})}return b}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Print Shipping Label",icon:"tag",onClick:function(){function b(){return s("setScreen",{setScreen:9})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function b(){return s("setScreen",{setScreen:10})}return b}()})]})}),!!C&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function b(){return s("setScreen",{setScreen:8})}return b}()})})]})})},k=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.department,C=[],h;switch(i.purpose){case"ASSISTANCE":C=v.assist_dept,h="Request assistance from another department";break;case"SUPPLIES":C=v.supply_dept,h="Request supplies from another department";break;case"INFO":C=v.info_dept,h="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return s("setScreen",{setScreen:0})}return N}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:C.filter(function(N){return N!==g}).map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function b(){return s("writeInput",{write:N,priority:"1"})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function b(){return s("writeInput",{write:N,priority:"2"})}return b}()})]},N)})})})})},S=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g;switch(i.type){case"SUCCESS":g="Message sent successfully";break;case"FAIL":g="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return s("setScreen",{setScreen:0})}return C}()})})},y=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g,C;switch(i.type){case"MESSAGES":g=v.message_log,C="Message Log";break;case"SHIPPING":g=v.shipping_log,C="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:C,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return s("setScreen",{setScreen:0})}return h}()}),children:g.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[h.map(function(N,b){return(0,e.createVNode)(1,"div",null,N,0,null,b)}),(0,e.createVNode)(1,"hr")]},h)})})})},p=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.recipient,C=v.message,h=v.msgVerified,N=v.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function b(){return s("setScreen",{setScreen:0})}return b}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:C}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:N})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function b(){return s("department",{department:g})}return b}()})})})],4)},l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.message,C=v.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return s("setScreen",{setScreen:0})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function h(){return s("writeAnnouncement")}return h}()})],4),children:g})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[C?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(C&&g),onClick:function(){function h(){return s("sendAnnouncement")}return h}()})]})})],4)},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.shipDest,C=v.msgVerified,h=v.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return s("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:C})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(g&&C),onClick:function(){function N(){return s("printLabel")}return N}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:g===N?"Selected":"Select",selected:g===N,onClick:function(){function b(){return s("shipSelect",{shipSelect:N})}return b}()})},N)})})})})],4)}},51939:function(I,r,n){"use strict";r.__esModule=!0,r.SUBMENU=r.RndConsole=r.MENU=void 0;var e=n(28823),a=n(91819),t=n(84947),o=n(2971),f=n(63752),V=r.MENU={MAIN:0,LEVELS:1,DISK:2,DESTROY:3,LATHE:4,IMPRINTER:5,SETTINGS:6},k=r.SUBMENU={MAIN:0,DISK_COPY:1,LATHE_CATEGORY:1,LATHE_MAT_STORAGE:2,LATHE_CHEM_STORAGE:3,SETTINGS_DEVICES:1},S=r.RndConsole=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,f.RndNavbar),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.MAIN,render:function(){function d(){return(0,e.createComponentVNode)(2,f.MainMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.LEVELS,render:function(){function d(){return(0,e.createComponentVNode)(2,f.CurrentLevels)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.DISK,render:function(){function d(){return(0,e.createComponentVNode)(2,f.DataDiskMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.DESTROY,render:function(){function d(){return(0,e.createComponentVNode)(2,f.DeconstructionMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:function(){function d(u){return u===V.LATHE||u===V.IMPRINTER}return d}(),render:function(){function d(){return(0,e.createComponentVNode)(2,f.LatheMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.SETTINGS,render:function(){function d(){return(0,e.createComponentVNode)(2,f.SettingsMenu)}return d}()}),i?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:i})})}):null]})})})}return y}()},50239:function(I,r,n){"use strict";r.__esModule=!0,r.CurrentLevels=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.CurrentLevels=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=y.tech_levels;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"h3",null,"Current Research Levels:",16),p.map(function(l,c){var m=l.name,i=l.level,d=l.desc;return(0,e.createComponentVNode)(2,t.Box,{children:[c>0?(0,e.createComponentVNode)(2,t.Divider):null,(0,e.createComponentVNode)(2,t.Box,{children:m}),(0,e.createComponentVNode)(2,t.Box,{children:["* Level: ",i]}),(0,e.createComponentVNode)(2,t.Box,{children:["* Summary: ",d]})]},m)})]})}return f}()},24183:function(I,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V="design",k="tech",S=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_data;return h?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:h.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:h.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:h.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function N(){return C("updt_tech")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Disk",icon:"trash",onClick:function(){function N(){return C("clear_tech")}return N}()}),(0,e.createComponentVNode)(2,l)]})]}):null},y=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_data;if(!h)return null;var N=h.name,b=h.lathe_types,B=h.materials,L=b.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:N}),L?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:L}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),B.map(function(w){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,w.name,0,{style:{"text-transform":"capitalize"}})," x ",w.amount]},w.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function w(){return C("updt_design")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Disk",icon:"trash",onClick:function(){function w(){return C("clear_design")}return w}()}),(0,e.createComponentVNode)(2,l)]})]})},p=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_type;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"This disk is empty."}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,o.RndNavButton,{submenu:f.SUBMENU.DISK_COPY,icon:"arrow-down",content:C===k?"Load Tech to Disk":"Load Design to Disk"}),(0,e.createComponentVNode)(2,l)]})]})},l=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_type;return h?(0,e.createComponentVNode)(2,t.Button,{content:"Eject Disk",icon:"eject",onClick:function(){function N(){var b=h===k?"eject_tech":"eject_design";C(b)}return N}()}):null},c=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_data,h=g.disk_type,N=function(){if(!C)return(0,e.createComponentVNode)(2,p);switch(h){case V:return(0,e.createComponentVNode)(2,y);case k:return(0,e.createComponentVNode)(2,S);default:return null}};return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk Contents",children:N()})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_type,N=g.to_copy;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:N.sort(function(b,B){return b.name.localeCompare(B.name)}).map(function(b){var B=b.name,L=b.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:B,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function w(){h===k?C("copy_tech",{id:L}):C("copy_design",{id:L})}return w}()})},L)})})})})},i=r.DataDiskMenu=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_type;return C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.MAIN,render:function(){function h(){return(0,e.createComponentVNode)(2,c)}return h}()}),(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.DISK_COPY,render:function(){function h(){return(0,e.createComponentVNode)(2,m)}return h}()})],4):null}return d}()},72751:function(I,r,n){"use strict";r.__esModule=!0,r.DeconstructionMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.DeconstructionMenu=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_item,c=y.linked_destroy;return c?l?(0,e.createComponentVNode)(2,t.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:["Name: ",l.name]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.origin_tech.map(function(m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+m.name,children:[m.object_level," ",m.current_level?(0,e.createFragment)([(0,e.createTextVNode)("(Current: "),m.current_level,(0,e.createTextVNode)(")")],0):null]},m.name)})}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createVNode)(1,"h3",null,"Options:",16)}),(0,e.createComponentVNode)(2,t.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){function m(){p("deconstruct")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Item",icon:"eject",onClick:function(){function m(){p("eject_item")}return m}()})]}):(0,e.createComponentVNode)(2,t.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,t.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}return f}()},51802:function(I,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=r.LatheCategory=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.data,l=y.act,c=p.category,m=p.matching_designs,i=p.menu,d=i===4,u=d?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:m.map(function(s){var v=s.id,g=s.name,C=s.can_build,h=s.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:g,disabled:C<1,onClick:function(){function N(){return l(u,{id:v,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return l(u,{id:v,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return l(u,{id:v,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},v)})})]})}return V}()},47349:function(I,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheChemicalStorage=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_chemicals,c=y.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function m(){var i=c?"disposeallP":"disposeallI";p(i)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(m){var i=m.volume,d=m.name,u=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+i+" of "+d,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function s(){var v=c?"disposeP":"disposeI";p(v,{id:u})}return s}()})},u)})})]})}return f}()},73492:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=r.LatheMainMenu=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.data,l=y.act,c=p.menu,m=p.categories,i=c===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:i+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,o.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:m.map(function(d){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:d,onClick:function(){function u(){l("setCategory",{category:d})}return u}()})},d)})})]})}return V}()},87115:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheMaterialStorage=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:l.map(function(c){var m=c.id,i=c.amount,d=c.name,u=function(){function C(h){var N=y.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";p(N,{id:m,amount:h})}return C}(),s=Math.floor(i/2e3),v=i<1,g=s===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:v?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",i," of ",d]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",s," sheet",g,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function C(){return u(1)}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function C(){return u("custom")}return C}()}),i>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function C(){return u(5)}return C}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function C(){return u(50)}return C}()})],0):null})]},m)})})})}return f}()},2345:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheMaterials=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=y.total_materials,l=y.max_materials,c=y.max_chemicals,m=y.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p}),l?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+l}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},45805:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(28823),a=n(91819),t=n(28078),o=n(63752),f=n(2971),V=n(51939),k=r.LatheMenu=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=c.menu,i=c.linked_lathe,d=c.linked_imprinter;return m===4&&!i?(0,e.createComponentVNode)(2,f.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):m===5&&!d?(0,e.createComponentVNode)(2,f.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.MAIN,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheMainMenu)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_CATEGORY,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheCategory)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_MAT_STORAGE,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheMaterialStorage)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_CHEM_STORAGE,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheChemicalStorage)}return u}()})]})}return S}()},92497:function(I,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheSearch=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function p(l,c){return y("search",{to_search:c})}return p}()})})}return f}()},25242:function(I,r,n){"use strict";r.__esModule=!0,r.MainMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V=r.MainMenu=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.disk_type,m=l.linked_destroy,i=l.linked_lathe,d=l.linked_imprinter,u=l.tech_levels;return(0,e.createComponentVNode)(2,t.Section,{title:"Main Menu",children:[(0,e.createComponentVNode)(2,t.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!c,menu:f.MENU.DISK,submenu:f.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!m,menu:f.MENU.DESTROY,submenu:f.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!i,menu:f.MENU.LATHE,submenu:f.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!d,menu:f.MENU.IMPRINTER,submenu:f.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{menu:f.MENU.SETTINGS,submenu:f.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"12px"}),(0,e.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s){var v=s.name,g=s.level;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:v,children:g},v)})})]})}return k}()},29933:function(I,r,n){"use strict";r.__esModule=!0,r.RndNavButton=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.RndNavButton=function(){function f(V,k){var S=V.icon,y=V.children,p=V.disabled,l=V.content,c=(0,a.useBackend)(k),m=c.data,i=c.act,d=m.menu,u=m.submenu,s=d,v=u;return V.menu!==null&&V.menu!==void 0&&(s=V.menu),V.submenu!==null&&V.submenu!==void 0&&(v=V.submenu),(0,e.createComponentVNode)(2,t.Button,{content:l,icon:S,disabled:p,onClick:function(){function g(){i("nav",{menu:s,submenu:v})}return g}(),children:y})}return f}()},59959:function(I,r,n){"use strict";r.__esModule=!0,r.RndNavbar=void 0;var e=n(28823),a=n(63752),t=n(2971),o=n(51939),f=r.RndNavbar=function(){function V(){return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__RndNavbar",children:[(0,e.createComponentVNode)(2,a.RndRoute,{menu:function(){function k(S){return S!==o.MENU.MAIN}return k}(),render:function(){function k(){return(0,e.createComponentVNode)(2,a.RndNavButton,{menu:o.MENU.MAIN,submenu:o.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}return k}()}),(0,e.createComponentVNode)(2,a.RndRoute,{submenu:function(){function k(S){return S!==o.SUBMENU.MAIN}return k}(),render:function(){function k(){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.DISK,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.LATHE,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.IMPRINTER,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.SETTINGS,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}return S}()})]})}return k}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:function(){function k(S){return S===o.MENU.LATHE||S===o.MENU.IMPRINTER}return k}(),submenu:o.SUBMENU.MAIN,render:function(){function k(){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}return k}()})]})}return V}()},28078:function(I,r,n){"use strict";r.__esModule=!0,r.RndRoute=void 0;var e=n(91819),a=r.RndRoute=function(){function t(o,f){var V=o.render,k=(0,e.useBackend)(f),S=k.data,y=S.menu,p=S.submenu,l=function(){function m(i,d){return i==null?!0:typeof i=="function"?i(d):i===d}return m}(),c=l(o.menu,y)&&l(o.submenu,p);return c?V():null}return t}()},59991:function(I,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V=r.SettingsMenu=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=p.act,m=l.sync,i=l.admin,d=l.linked_destroy,u=l.linked_lathe,s=l.linked_imprinter;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.MAIN,render:function(){function v(){return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Sync Database with Network",icon:"sync",disabled:!m,onClick:function(){function g(){c("sync")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Connect to Research Network",icon:"plug",disabled:m,onClick:function(){function g(){c("togglesync")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!m,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function g(){c("togglesync")}return g}()}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!m,content:"Device Linkage Menu",icon:"link",menu:f.MENU.SETTINGS,submenu:f.SUBMENU.SETTINGS_DEVICES}),i===1?(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){function g(){return c("maxresearch")}return g}()}):null]})})}return v}()}),(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.SETTINGS_DEVICES,render:function(){function v(){return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage Menu",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function g(){return c("find_device")}return g}()}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",children:(0,e.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[d?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){return c("disconnect",{item:"destroy"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),u?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){c("disconnect",{item:"lathe"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),s?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){return c("disconnect",{item:"imprinter"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}return v}()})]})}return k}()},63752:function(I,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=r.RndRoute=r.RndNavbar=r.RndNavButton=r.MainMenu=r.LatheSearch=r.LatheMenu=r.LatheMaterials=r.LatheMaterialStorage=r.LatheMainMenu=r.LatheChemicalStorage=r.LatheCategory=r.DeconstructionMenu=r.DataDiskMenu=r.CurrentLevels=void 0;var e=n(50239);r.CurrentLevels=e.CurrentLevels;var a=n(24183);r.DataDiskMenu=a.DataDiskMenu;var t=n(72751);r.DeconstructionMenu=t.DeconstructionMenu;var o=n(51802);r.LatheCategory=o.LatheCategory;var f=n(47349);r.LatheChemicalStorage=f.LatheChemicalStorage;var V=n(73492);r.LatheMainMenu=V.LatheMainMenu;var k=n(2345);r.LatheMaterials=k.LatheMaterials;var S=n(87115);r.LatheMaterialStorage=S.LatheMaterialStorage;var y=n(45805);r.LatheMenu=y.LatheMenu;var p=n(92497);r.LatheSearch=p.LatheSearch;var l=n(25242);r.MainMenu=l.MainMenu;var c=n(59959);r.RndNavbar=c.RndNavbar;var m=n(29933);r.RndNavButton=m.RndNavButton;var i=n(28078);r.RndRoute=i.RndRoute;var d=n(59991);r.SettingsMenu=d.SettingsMenu},73407:function(I,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(37843),V=function(y,p){var l=y/p;return l<=.2?"good":l<=.5?"average":"bad"},k=r.RobotSelfDiagnosis=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:m.map(function(i,d){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(i.name),children:i.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:i.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:V(i.brute_damage,i.max_damage),children:i.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:V(i.electronic_damage,i.max_damage),children:i.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:i.powered?"good":"bad",children:i.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:i.status?"good":"bad",children:i.status?"Yes":"No"})]})})]})},d)})})})}return S}()},48356:function(I,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.RoboticsControlConsole=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.can_hack,i=c.safety,d=c.show_lock_all,u=c.cyborgs,s=u===void 0?[]:u;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!d&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i?"lock":"unlock",content:i?"Disable Safety":"Enable Safety",selected:i,onClick:function(){function v(){return l("arm",{})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:i,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function v(){return l("masslock",{})}return v}()})]}),(0,e.createComponentVNode)(2,V,{cyborgs:s,can_hack:m})]})})}return k}(),V=function(S,y){var p=S.cyborgs,l=S.can_hack,c=(0,a.useBackend)(y),m=c.act,i=c.data,d="Detonate";return i.detonate_cooldown>0&&(d+=" ("+i.detonate_cooldown+"s)"),p.length?p.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,buttons:(0,e.createFragment)([!!u.hackable&&!u.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function s(){return m("hackbot",{uid:u.uid})}return s}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:u.locked_down?"unlock":"lock",color:u.locked_down?"good":"default",content:u.locked_down?"Release":"Lockdown",disabled:!i.auth,onClick:function(){function s(){return m("stopbot",{uid:u.uid})}return s}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:d,disabled:!i.auth||i.detonate_cooldown>0,color:"bad",onClick:function(){function s(){return m("killbot",{uid:u.uid})}return s}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:u.status?"bad":u.locked_down?"average":"good",children:u.status?"Not Responding":u.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:u.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:u.health>50?"good":"bad",value:u.health/100})}),typeof u.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:u.charge>30?"good":"bad",value:u.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:u.cell_capacity<3e4?"average":"good",children:u.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!u.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:u.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:u.synchronization?"default":"average",children:u.synchronization||"None"})})]})},u.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},33122:function(I,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Safe=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.dial,u=i.open,s=i.locked,v=i.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),u?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*d+"deg)","z-index":0}})]}),!u&&(0,e.createComponentVNode)(2,S)]})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.dial,u=i.open,s=i.locked,v=function(C,h){return(0,e.createComponentVNode)(2,t.Button,{disabled:u||h&&!s,icon:"arrow-"+(h?"right":"left"),content:(h?"Right":"Left")+" "+C,iconRight:h,onClick:function(){function N(){return m(h?"turnleft":"turnright",{num:C})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:s,icon:u?"lock":"lock-open",content:u?"Close":"Open",mb:"0.5rem",onClick:function(){function g(){return m("open")}return g}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[v(50),v(10),v(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[v(1,!0),v(10,!0),v(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:d})]})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:d.map(function(u,s){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function v(){return m("retrieve",{index:s+1})}return v}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:u.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),u.name]}),(0,e.createVNode)(1,"br")],4,u)})})},S=function(p,l){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},46748:function(I,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SatelliteControl=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.satellites,m=l.notice,i=l.meteor_shield,d=l.meteor_shield_coverage,u=l.meteor_shield_coverage_max,s=l.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[i&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s>=100?"good":"average",value:d,maxValue:u,children:[s," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),c.map(function(v){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+v.id,children:[v.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:v.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function g(){return p("toggle",{id:v.id})}return g}()})]},v.id)})]})})]})})}return V}()},46504:function(I,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(84947),V=n(99753),k=n(31068),S=r.SecureStorage=function(){function c(m,i){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})})})})}return c}(),y=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=window.event?m.which:m.keyCode;if(s===k.KEY_ENTER){m.preventDefault(),u("keypad",{digit:"E"});return}if(s===k.KEY_ESCAPE){m.preventDefault(),u("keypad",{digit:"C"});return}if(s===k.KEY_BACKSPACE){m.preventDefault(),u("backspace");return}if(s>=k.KEY_0&&s<=k.KEY_9){m.preventDefault(),u("keypad",{digit:s-k.KEY_0});return}if(s>=k.KEY_NUMPAD_0&&s<=k.KEY_NUMPAD_9){m.preventDefault(),u("keypad",{digit:s-k.KEY_NUMPAD_0});return}},p=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.locked,g=s.no_passcode,C=s.emagged,h=s.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],b=g?"":v?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function B(L){return y(L,i)}return B}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+b]),height:"100%",children:C?"ERROR":h})}),(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(B){return(0,e.createComponentVNode)(2,V.TableRow,{children:B.map(function(L){return(0,e.createComponentVNode)(2,V.TableCell,{children:(0,e.createComponentVNode)(2,l,{number:L})},L)})},B[0])})})]})},l=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:v,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+v]),onClick:function(){function g(){return u("keypad",{digit:v})}return g}()})}},54529:function(I,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=n(22677),k=n(51185),S=n(69774),y=n(76519),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},l=function(h,N){(0,V.modalOpen)(h,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function C(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.loginState,T=L.currentPage,A;if(w.logged_in)T===1?A=(0,e.createComponentVNode)(2,i):T===2&&(A=(0,e.createComponentVNode)(2,s));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,y.TemporaryNotice),(0,e.createComponentVNode)(2,m),A]})})]})}return C}(),m=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.currentPage,T=L.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:w===1,onClick:function(){function A(){return B("page",{page:1})}return A}(),children:"List Records"}),w===2&&T&&!T.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:w===2,children:["Record: ",T.fields[0].value]})]})})},i=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.records,T=(0,t.useLocalState)(N,"searchText",""),A=T[0],x=T[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],R=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),D=M[0],j=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,u)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,d,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,d,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,d,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,d,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,d,{id:"status",children:"Criminal Status"})]}),w.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,W){var K=D?1:-1;return F[P].localeCompare(W[P])*K}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+p[F.status],onClick:function(){function W(){return B("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return W}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},d=function(h,N){var b=(0,t.useLocalState)(N,"sortId","name"),B=b[0],L=b[1],w=(0,t.useLocalState)(N,"sortOrder",!0),T=w[0],A=w[1],x=h.id,E=h.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:B!==x&&"transparent",fluid:!0,onClick:function(){function P(){B===x?A(!T):(L(x),A(!0))}return P}(),children:[E,B===x&&(0,e.createComponentVNode)(2,o.Icon,{name:T?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},u=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.isPrinting,T=(0,t.useLocalState)(N,"searchText",""),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return B("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:w,icon:w?"spinner":"print",iconSpin:!!w,content:"Print Cell Log",onClick:function(){function E(){return(0,V.modalOpen)(N,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,R){return x(R)}return E}()})})]})},s=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.isPrinting,T=L.general,A=L.security;return!T||!T.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:w,icon:w?"spinner":"print",iconSpin:!!w,content:"Print Record",onClick:function(){function x(){return B("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return B("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,v)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return B("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return B("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,prewrap:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return l(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(h,N){var b=(0,t.useBackend)(N),B=b.data,L=B.general;return!L||!L.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:L.fields.map(function(w,T){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:w.field,prewrap:!0,children:[(0,a.decodeHtmlEntities)(""+w.value),!!w.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:w.line_break?"1rem":"initial",onClick:function(){function A(){return l(N,w)}return A}()})]},T)})})}),!!L.has_photos&&L.photos.map(function(w,T){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:w,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createVNode)(1,"br"),"Photo #",T+1]},T)})]})},g=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function T(){return(0,V.modalOpen)(N,"comment_add")}return T}()}),children:w.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):w.comments.map(function(T,A){return(0,e.createComponentVNode)(2,o.Box,{prewrap:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:T.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),T.text||T,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return B("comment_delete",{id:A+1})}return x}()})]},A)})})})}},79315:function(I,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SeedExtractor=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.stored_seeds,i=c.vend_amount;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Stored Seeds",buttons:(0,e.createFragment)([(0,e.createTextVNode)("Set Amount to be Vended:\xA0"),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:i,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(){function d(u,s){return l("set_vend_amount",{vend_amount:s})}return d}()})],4),children:m!=null&&m.length?(0,e.createComponentVNode)(2,V):"No Seeds"})})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.stored_seeds;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Lifespan"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Endurance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Maturation"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Production"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Yield"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Potency"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stock"})]}),m.map(function(i,d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+i.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),i.name,i.variant?" ("+i.variant+")":""]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.lifespan}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.endurance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.maturation}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.production}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.yield}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.potency}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:["(",i.amount," Left)\xA0",(0,e.createComponentVNode)(2,t.Button,{ml:1,content:"Vend",icon:"arrow-circle-down",onClick:function(){function u(){return l("vend",{seedid:i.id,seedvariant:i.variant})}return u}()})]})]},d)})]})}},58578:function(I,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ShuttleConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:l.status?l.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!l.shuttle&&(!!l.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:l.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return p("move",{move:c.id})}return m}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!l.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!l.status,onClick:function(){function c(){return p("request")}return c}()})})],0))]})})})})}return V}()},11154:function(I,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ShuttleManipulator=function(){function y(p,l){var c=(0,a.useLocalState)(l,"tabIndex",0),m=c[0],i=c[1],d=function(){function u(s){switch(s){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);case 2:return(0,e.createComponentVNode)(2,S);default:return"WE SHOULDN'T BE HERE!"}}return u}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===0,onClick:function(){function u(){return i(0)}return u}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function u(){return i(1)}return u}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function u(){return i(2)}return u}(),icon:"tools",children:"Modification"},"Modification")]}),d(m)]})})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:u.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:u.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:u.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:u.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function s(){return m("jump_to",{type:"mobile",id:u.id})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function s(){return m("fast_travel",{id:u.id})}return s}()})]})]})},u.name)})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.templates_tabs,u=i.existing_shuttle,s=i.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:d.map(function(v){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===u.id,icon:"file",onClick:function(){function g(){return m("select_template_category",{cat:v})}return g}(),children:v},v)})}),!!u&&s[u.id].templates.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:v.description}),v.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:v.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function g(){return m("select_template",{shuttle_id:v.shuttle_id})}return g}()})})]})},v.name)})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.existing_shuttle,u=i.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[d?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+d.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d.status}),d.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:d.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function s(){return m("jump_to",{type:"mobile",id:d.id})}return s}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:u.description}),u.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:u.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function s(){return m("preview",{shuttle_id:u.shuttle_id})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function s(){return m("load",{shuttle_id:u.shuttle_id})}return s}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},80699:function(I,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},y=["bad","average","average","good","average","average","bad"],p=r.Sleeper=function(){function s(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.hasOccupant,B=b?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,u);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:B}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i)})]})})})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,d)],4)},c=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant,B=N.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:B?"toggle-on":"toggle-off",selected:B,content:B?"On":"Off",onClick:function(){function L(){return h("auto_eject_dead_"+(B?"off":"on"))}return L}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function L(){return h("ejectify")}return L}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:b.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.maxHealth,value:b.health/b.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(b.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:V[b.stat][0],children:V[b.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.maxTemp,value:b.bodyTemperature/b.maxTemp,color:y[b.temperatureSuitability+3],children:[(0,a.round)(b.btCelsius,0),"\xB0C,",(0,a.round)(b.btFaren,0),"\xB0F"]})}),!!b.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.bloodMax,value:b.bloodLevel/b.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[b.bloodPercent,"%, ",b.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[b.pulse," BPM"]})],4)]})})},m=function(v,g){var C=(0,t.useBackend)(g),h=C.data,N=h.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:k.map(function(b,B){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:b[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:N[b[1]]/100,ranges:S,children:(0,a.round)(N[b[1]],0)},B)},B)})})})},i=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.hasOccupant,B=N.isBeakerLoaded,L=N.beakerMaxSpace,w=N.beakerFreeSpace,T=N.dialysis,A=T&&w>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!B||w<=0||!b,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return h("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B,icon:"eject",content:"Eject",onClick:function(){function x(){return h("removebeaker")}return x}()})],4),children:B?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:L,value:w/L,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[w,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},d=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant,B=N.chemicals,L=N.maxchem,w=N.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:B.map(function(T,A){var x="",E;return T.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):T.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:T.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:L,value:T.occ_amount/L,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[T.pretty_amount,"/",L,"u"]}),w.map(function(P,R){return(0,e.createComponentVNode)(2,o.Button,{disabled:!T.injectable||T.occ_amount+P>L||b.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+T.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return h("chemical",{chemid:T.id,amount:P})}return M}()},R)})]})})},A)})})},u=function(v,g){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},42439:function(I,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SlotMachine=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;if(l.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return l.plays===1?c=l.plays+" player has tried their luck today!":c=l.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:l.working,content:l.working?"Spinning...":"Spin",onClick:function(){function m(){return p("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:l.resultlvl,children:l.result})]})})})}return V}()},280:function(I,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Smartfridge=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.secure,m=l.can_dry,i=l.drying,d=l.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:i?"power-off":"times",content:i?"On":"Off",selected:i,onClick:function(){function u(){return p("drying")}return u}()}),children:[!d&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!d&&d.slice().sort(function(u,s){return u.display_name.localeCompare(s.display_name)}).map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:u.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",u.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function s(){return p("vend",{index:u.vend,amount:1})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:u.quantity,step:1,stepPixelSize:3,onChange:function(){function s(v,g){return p("vend",{index:u.vend,amount:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function s(){return p("vend",{index:u.vend,amount:u.quantity})}return s}()})]})]},u)})]})]})})})}return V}()},47606:function(I,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(48300),f=n(84947),V=1e3,k=r.Smes=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.capacityPercent,d=m.capacity,u=m.charge,s=m.inputAttempt,v=m.inputting,g=m.inputLevel,C=m.inputLevelMax,h=m.inputAvailable,N=m.outputAttempt,b=m.outputting,B=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,T=i>=100&&"good"||v&&"average"||"bad",A=b&&"good"||u>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"sync-alt":"times",selected:s,onClick:function(){function x(){return c("tryinput")}return x}(),children:s?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:T,children:i>=100&&"Fully Charged"||v&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:g===0,onClick:function(){function x(){return c("input",{target:"min"})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:g===0,onClick:function(){function x(){return c("input",{adjust:-1e4})}return x}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:g/V,fillValue:h/V,minValue:0,maxValue:C/V,step:5,stepPixelSize:4,format:function(){function x(E){return(0,o.formatPower)(E*V,1)}return x}(),onChange:function(){function x(E,P){return c("input",{target:P*V})}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:g===C,onClick:function(){function x(){return c("input",{adjust:1e4})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:g===C,onClick:function(){function x(){return c("input",{target:"max"})}return x}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(h)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){function x(){return c("tryoutput")}return x}(),children:N?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:b?"Sending":u>0?"Not Sending":"No Charge"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:B===0,onClick:function(){function x(){return c("output",{target:"min"})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:B===0,onClick:function(){function x(){return c("output",{adjust:-1e4})}return x}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:B/V,minValue:0,maxValue:L/V,step:5,stepPixelSize:4,format:function(){function x(E){return(0,o.formatPower)(E*V,1)}return x}(),onChange:function(){function x(E,P){return c("output",{target:P*V})}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:B===L,onClick:function(){function x(){return c("output",{adjust:1e4})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:B===L,onClick:function(){function x(){return c("output",{target:"max"})}return x}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return S}()},66527:function(I,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SolarControl=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=0,m=1,i=2,d=l.generated,u=l.generated_ratio,s=l.tracking_state,v=l.tracking_rate,g=l.connected_panels,C=l.connected_tracker,h=l.cdir,N=l.direction,b=l.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function B(){return p("refresh")}return B}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:C?"good":"bad",children:C?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:g>0?"good":"bad",children:g})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[h,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[s===i&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),s===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",v,"\xB0/h (",b,")"," "]}),s===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[s!==i&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:h,onDrag:function(){function B(L,w){return p("cdir",{cdir:w})}return B}()}),s===i&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:s===c,onClick:function(){function B(){return p("track",{track:c})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:s===m,onClick:function(){function B(){return p("track",{track:m})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:s===i,disabled:!C,onClick:function(){function B(){return p("track",{track:i})}return B}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[s===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:v,format:function(){function B(L){var w=Math.sign(L)>0?"+":"-";return w+Math.abs(L)}return B}(),onDrag:function(){function B(L,w){return p("tdir",{tdir:w})}return B}()}),s===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),s===i&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return V}()},27478:function(I,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SpawnersMenu=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function i(){return p("jump",{ID:m.uids})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function i(){return p("spawn",{ID:m.uids})}return i}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.name)})})})})}return V}()},15565:function(I,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SpecMenu=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),V=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("hemomancer")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4)]})})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("umbrae")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("gargantua")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("dantalion")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},31752:function(I,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.StationAlertConsole=function(){function k(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V)})})}return k}(),V=r.StationAlertConsoleContent=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.alarms||[],m=c.Fire||[],i=c.Atmosphere||[],d=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[i.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),i.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[d.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),d.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)})],4)}return k}()},64323:function(I,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(28823),a=n(72026),t=n(98644),o=n(91819),f=n(2971),V=n(84947),k=function(l){return l[l.SetupFutureStationTraits=0]="SetupFutureStationTraits",l[l.ViewStationTraits=1]="ViewStationTraits",l}(k||{}),S=function(c,m){var i=(0,o.useBackend)(m),d=i.act,u=i.data,s=u.future_station_traits,v=(0,o.useLocalState)(m,"selectedFutureTrait",null),g=v[0],C=v[1],h=Object.fromEntries(u.valid_station_traits.map(function(b){return[b.name,b.path]})),N=Object.keys(h);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!g&&"Select trait to add...",onSelected:C,options:N,selected:g,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function b(){if(g){var B=h[g],L=[B];if(s){var w,T=s.map(function(A){return A.path});if(T.indexOf(B)!==-1)return;L=(w=L).concat.apply(w,T)}d("setup_future_traits",{station_traits:L})}}return b}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(s)?s.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.map(function(b){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:b.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function B(){d("setup_future_traits",{station_traits:(0,a.filterMap)(s,function(L){if(L.path!==b.path)return L.path})})}return B}(),children:"Delete"})})]})},b.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function b(){return d("clear_future_traits")}return b}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function b(){return d("setup_future_traits",{station_traits:[]})}return b}(),children:"Prevent station traits from running next round"})]})]})},y=function(c,m){var i=(0,o.useBackend)(m),d=i.act,u=i.data;return u.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:u.current_traits.map(function(s){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:s.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:u.too_late_to_revert||!s.can_revert,tooltip:!s.can_revert&&"This trait is not revertable."||u.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function v(){return d("revert",{ref:s.ref})}return v}()})})]})},s.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},p=r.StationTraitsPanel=function(){function l(c,m){var i=(0,o.useLocalState)(m,"station_traits_tab",k.ViewStationTraits),d=i[0],u=i[1],s;switch(d){case k.SetupFutureStationTraits:s=(0,e.createComponentVNode)(2,S);break;case k.ViewStationTraits:s=(0,e.createComponentVNode)(2,y);break;default:(0,t.exhaustiveCheck)(d)}return(0,e.createComponentVNode)(2,V.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:d===k.ViewStationTraits,onClick:function(){function v(){return u(k.ViewStationTraits)}return v}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:d===k.SetupFutureStationTraits,onClick:function(){function v(){return u(k.SetupFutureStationTraits)}return v}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),s]})]})})})}return l}()},57633:function(I,r,n){"use strict";r.__esModule=!0,r.SuitStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SuitStorage=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.uv;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!i&&(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,e.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,S)]})})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.helmet,u=i.suit,s=i.magboots,v=i.mask,g=i.storage,C=i.open,h=i.locked;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored Items",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){function N(){return m("cook")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:h?"Unlock":"Lock",icon:h?"unlock":"lock",disabled:C,onClick:function(){function N(){return m("toggle_lock")}return N}()})],4),children:C&&!h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,k,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,e.createComponentVNode)(2,k,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,e.createComponentVNode)(2,k,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,e.createComponentVNode)(2,k,{object:v,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,e.createComponentVNode)(2,k,{object:g,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:h?"lock":"exclamation-circle",size:"5",mb:3}),(0,e.createVNode)(1,"br"),h?"The unit is locked.":"The unit is closed."]})})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=p.object,u=p.label,s=p.missingText,v=p.eject;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u,children:(0,e.createComponentVNode)(2,t.Box,{my:.5,children:d?(0,e.createComponentVNode)(2,t.Button,{my:-1,icon:"eject",content:d,onClick:function(){function g(){return m(v)}return g}()}):(0,e.createComponentVNode)(2,t.Box,{color:"silver",bold:!0,children:["No ",s," found."]})})})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.open,u=i.locked;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:d?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:d?"times-circle":"expand",color:d?"red":"green",disabled:u,textAlign:"center",onClick:function(){function s(){return m("toggle_open")}return s}()})})}},72217:function(I,r,n){"use strict";r.__esModule=!0,r.SupermatterMonitor=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(58331),f=n(91819),V=n(2971),k=n(30381),S=n(84947),y=n(99753),p=r.SupermatterMonitor=function(){function i(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data;return g.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return i}(),l=function(d){return Math.log2(16+Math.max(0,d))-4},c=function(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data,C=g.supermatters,h=C===void 0?[]:C;return(0,e.createComponentVNode)(2,S.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,S.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,title:"Detected Supermatters",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return v("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,V.Table,{children:h.map(function(N){return(0,e.createComponentVNode)(2,V.Table.Row,{children:[(0,e.createComponentVNode)(2,V.Table.Cell,{children:N.supermatter_id+". "+N.area_name}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:N.integrity/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,V.Button,{content:"Details",onClick:function(){function b(){return v("view",{view:N.supermatter_id})}return b}()})})]},N.supermatter_id)})})})})})},m=function(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data,C=g.active,h=g.SM_integrity,N=g.SM_power,b=g.SM_ambienttemp,B=g.SM_ambientpressure,L=(0,t.flow)([function(T){return T.filter(function(A){return A.amount>=.01})},(0,a.sortBy)(function(T){return-T.amount})])(g.gases||[]),w=Math.max.apply(Math,[1].concat(L.map(function(T){return T.amount})));return(0,e.createComponentVNode)(2,S.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:l(b),minValue:0,maxValue:l(1e4),ranges:{teal:[-1/0,l(80)],good:[l(80),l(373)],average:[l(373),l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(b)+" K"})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:l(B),minValue:0,maxValue:l(5e4),ranges:{good:[l(1),l(300)],average:[-1/0,l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(B)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"arrow-left",content:"Back",onClick:function(){function T(){return v("back")}return T}()}),children:(0,e.createComponentVNode)(2,V.LabeledList,{children:L.map(function(T){return(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:(0,k.getGasLabel)(T.name),children:(0,e.createComponentVNode)(2,V.ProgressBar,{color:(0,k.getGasColor)(T.name),value:T.amount,minValue:0,maxValue:w,children:(0,o.toFixed)(T.amount,2)+"%"})},T.name)})})})})]})})})}},55055:function(I,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SyndicateComputerSimple=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function m(){return p(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},c.title)})})})}return V}()},61225:function(I,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S){return S.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},V=r.TEG=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function m(){return l("check")}return m}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[f(c.cold_inlet_temp)," K,"," ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K,"," ",f(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[f(c.hot_inlet_temp)," K,"," ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K,"," ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return k}()},61424:function(I,r,n){"use strict";r.__esModule=!0,r.TTSSeedsExplorerContent=r.TTSSeedsExplorer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f={0:"\u0411\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u044B\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},V={male:"\u041C\u0443\u0436\u0441\u043A\u043E\u0439",female:"\u0416\u0435\u043D\u0441\u043A\u0438\u0439"},k={\u041C\u0443\u0436\u0441\u043A\u043E\u0439:{icon:"mars",color:"blue"},\u0416\u0435\u043D\u0441\u043A\u0438\u0439:{icon:"venus",color:"purple"},\u041B\u044E\u0431\u043E\u0439:{icon:"venus-mars",color:"white"}},S=function(c,m,i,d){return d===void 0&&(d=null),c.map(function(u){var s,v=(s=u[d])!=null?s:u;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:m.includes(u),content:v,onClick:function(){function g(){m.includes(u)?i(m.filter(function(C){var h;return((h=C[d])!=null?h:C)!==u})):i([u].concat(m))}return g}()},v)})},y=r.TTSSeedsExplorer=function(){function l(){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,p)})})})}return l}(),p=r.TTSSeedsExplorerContent=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.providers,v=u.seeds,g=u.selected_seed,C=u.phrases,h=u.donator_level,N=u.character_gender,b=v.map(function(Q){return Q.category}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}),B=v.map(function(Q){return Q.gender}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}),L=v.map(function(Q){return Q.required_donator_level}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}).sort(function(Q,q){return Q-q}).map(function(Q){return f[Q]}),w=(0,a.useLocalState)(m,"selectedProviders",s),T=w[0],A=w[1],x=(0,a.useLocalState)(m,"selectedGenders",B.includes(V[N])?[V[N]]:B),E=x[0],P=x[1],R=(0,a.useLocalState)(m,"selectedCategories",b),M=R[0],D=R[1],j=(0,a.useLocalState)(m,"selectedDonatorLevels",L.includes(f[h])?L.slice(0,L.indexOf(f[h])+1):L),F=j[0],W=j[1],K=(0,a.useLocalState)(m,"selectedPhrase",C[0]),_=K[0],$=K[1],z=(0,a.useLocalState)(m,"searchtext",""),Y=z[0],Z=z[1],ie=S(s,T,A,"name"),ae=S(B,E,P),se=S(b,M,D),he=S(L,F,W),ye=(0,e.createComponentVNode)(2,t.Dropdown,{options:C,selected:_.replace(/(.{60})..+/,"$1..."),width:"445px",onSelected:function(){function Q(q){return $(q)}return Q}()}),Le=(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435...",width:"100%",onInput:function(){function Q(q,ue){return Z(ue)}return Q}()}),pe=v.sort(function(Q,q){var ue=Q.name.toLowerCase(),me=q.name.toLowerCase();return ue>me?1:ue0&&g!==Q.name?"orange":"white",children:Q.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:g===Q.name?.5:.25,textAlign:"left",children:Q.category}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:g===Q.name?"white":k[Q.gender].color,textAlign:"left",children:(0,e.createComponentVNode)(2,t.Icon,{mx:1,size:1.2,name:k[Q.gender].icon})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:Q.required_donator_level>0&&(0,e.createFragment)([f[Q.required_donator_level],(0,e.createComponentVNode)(2,t.Icon,{ml:1,mr:2,name:"coins"})],0)})]},Q.name)});return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{height:"175px",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B",children:ie}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:ae}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u0438",children:he}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:ye}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u0438\u0441\u043A",children:Le})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u0423\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451",disabled:M.length===0,onClick:function(){function Q(){return D([])}return Q}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451",disabled:M.length===b.length,onClick:function(){function Q(){return D(b)}return Q}()})],4),children:se})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0413\u043E\u043B\u043E\u0441\u0430 ("+pe.length+"/"+v.length+")",children:(0,e.createComponentVNode)(2,t.Table,{children:oe})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.BlockQuote,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0414\u043B\u044F \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432 \u0447\u0430\u0441\u0442\u044C \u0433\u043E\u043B\u043E\u0441\u043E\u0432 \u043F\u0440\u0438\u0448\u043B\u043E\u0441\u044C \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0437\u0430 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044C\u043D\u0443\u044E \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,e.createComponentVNode)(2,t.Box,{mt:2,italic:!0,children:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u043E\u0431 \u044D\u0442\u043E\u043C \u043C\u043E\u0436\u043D\u043E \u0443\u0437\u043D\u0430\u0442\u044C \u0432 \u043D\u0430\u0448\u0435\u043C Discord-\u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})})],4)}return l}()},97552:function(I,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TachyonArray=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.records,i=m===void 0?[]:m,d=c.explosion_target,u=c.toxins_tech,s=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!i.length||s,align:"center",onClick:function(){function v(){return l("print_logs")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!i.length,color:"bad",align:"center",onClick:function(){function v(){return l("delete_logs")}return v}()})]})]})}),i.length?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return k}(),V=r.TachyonArrayContent=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.records,i=m===void 0?[]:m;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),i.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function u(){return l("delete_record",{index:d.index})}return u}()})})]},d.index)})]})})})})}return k}()},33291:function(I,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Tank=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c;return l.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:l.connected?"check":"times",content:l.connected?"Internals On":"Internals Off",selected:l.connected,onClick:function(){function m(){return p("internals")}return m}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:l.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:l.ReleasePressure===l.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return p("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(l.releasePressure),width:"65px",unit:"kPa",minValue:l.minReleasePressure,maxValue:l.maxReleasePressure,onChange:function(){function m(i,d){return p("pressure",{pressure:d})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:l.ReleasePressure===l.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return p("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:l.ReleasePressure===l.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return p("pressure",{pressure:"reset"})}return m}()})]}),c]})})})})}return V}()},75480:function(I,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TankDispenser=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.o_tanks,m=l.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function i(){return p("oxygen")}return i}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function i(){return p("plasma")}return i}()})})]})})})}return V}()},62291:function(I,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TcommsCore=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.ion,s=(0,a.useLocalState)(c,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,y);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u===1&&(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:v===2,onClick:function(){function h(){return g(2)}return h}(),children:"User Filtering"},"FilterPage")]}),C(v)]})})}return p}(),V=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.active,s=d.sectors_available,v=d.nttc_toggle_jobs,g=d.nttc_toggle_job_color,C=d.nttc_toggle_name_color,h=d.nttc_toggle_command_bold,N=d.nttc_job_indicator_type,b=d.nttc_setting_language,B=d.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function L(){return i("toggle_active")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:s})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function L(){return i("nttc_toggle_jobs")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:g?"On":"Off",selected:g,icon:"clipboard-list",onClick:function(){function L(){return i("nttc_toggle_job_color")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"user-tag",onClick:function(){function L(){return i("nttc_toggle_name_color")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"volume-up",onClick:function(){function L(){return i("nttc_toggle_command_bold")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function L(){return i("nttc_job_indicator_type")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:b||"Unset",selected:b,icon:"globe",onClick:function(){function L(){return i("nttc_setting_language")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:B||"Unset",selected:B,icon:"server",onClick:function(){function L(){return i("network_id")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function L(){return i("import")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function L(){return i("export")}return L}()})]})],4)},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.link_password,s=d.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"Unset",selected:u,icon:"lock",onClick:function(){function v(){return i("change_password")}return v}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function g(){return i("unlink",{addr:v.addr})}return g}()})})]},v.addr)})]})]})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function s(){return i("add_filter")}return s}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function v(){return i("remove_filter",{user:s})}return v}()})})]},s)})]})})}},82905:function(I,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TcommsRelay=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.linked,d=m.active,u=m.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function s(){return c("toggle_active")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"Unset",selected:u,icon:"server",onClick:function(){function s(){return c("network_id")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:i===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),i===1?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.linked_core_id,d=m.linked_core_addr,u=m.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){function s(){return c("toggle_hidden_link")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return c("unlink")}return s}()})})]})})},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),i.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return c("link",{addr:d.addr})}return u}()})})]},d.addr)})]})})}},87692:function(I,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Teleporter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.targetsTeleport?l.targetsTeleport:{},m=0,i=1,d=2,u=l.calibrated,s=l.calibrating,v=l.powerstation,g=l.regime,C=l.teleporterhub,h=l.target,N=l.locked;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!v||!C)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[C,!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),v&&!C&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),v&&C&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[g===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:h,options:Object.keys(c),color:h!=="None"?"default":"bad",onSelected:function(){function b(B){return p("settarget",{x:c[B].x,y:c[B].y,z:c[B].z})}return b}()}),g===i&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:h,options:Object.keys(c),color:h!=="None"?"default":"bad",onSelected:function(){function b(B){return p("settarget",{x:c[B].x,y:c[B].y,z:c[B].z})}return b}()}),g===d&&(0,e.createComponentVNode)(2,t.Box,{children:h})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:g===i?"good":null,onClick:function(){function b(){return p("setregime",{regime:i})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:g===m?"good":null,onClick:function(){function b(){return p("setregime",{regime:m})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:g===d?"good":null,disabled:!N,onClick:function(){function b(){return p("setregime",{regime:d})}return b}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[h!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||u&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(u||s),onClick:function(){function b(){return p("calibrate")}return b}()})})]}),h==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&v&&C&&g===d)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function b(){return p("load")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function b(){return p("eject")}return b}()})]})})]})})})})}return V}()},40759:function(I,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.TempGun=function(){function p(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.target_temperature,s=d.temperature,v=d.max_temp,g=d.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:g,maxValue:v,value:u,format:function(){function C(h){return(0,a.toFixed)(h,2)}return C}(),width:"50px",onDrag:function(){function C(h,N){return i("target_temperature",{target_temperature:N})}return C}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:k(s),bold:s>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(s,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:y(s),children:S(s)})})]})})})})}return p}(),k=function(l){return l<=-100?"blue":l<=0?"teal":l<=100?"green":l<=200?"orange":"red"},S=function(l){return l<=100-273.15?"High":l<=250-273.15?"Medium":l<=300-273.15?"Low":l<=400-273.15?"Medium":"High"},y=function(l){return l<=100-273.15?"red":l<=250-273.15?"orange":l<=300-273.15?"green":l<=400-273.15?"orange":"red"}},32369:function(I,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(91819),f=n(31068),V=n(2971),k=n(84947),S=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),y=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),p=r.TextInputModal=function(){function c(m,i){var d=(0,o.useBackend)(i),u=d.act,s=d.data,v=s.max_length,g=s.message,C=g===void 0?"":g,h=s.multiline,N=s.placeholder,b=s.timeout,B=s.title,L=(0,o.useLocalState)(i,"input",N||""),w=L[0],T=L[1],A=function(){function P(R){if(R!==w){var M=h?S(R):y(R);T(M)}}return P}(),x=h||w.length>=40,E=130+(C.length>40?Math.ceil(C.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,k.Window,{title:B,width:325,height:E,children:[b&&(0,e.createComponentVNode)(2,a.Loader,{value:b}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function P(R){var M=window.event?R.which:R.keyCode;M===f.KEY_ENTER&&(!x||!R.shiftKey)&&u("submit",{entry:w}),M===f.KEY_ESCAPE&&u("cancel")}return P}(),children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Box,{color:"label",children:C})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{input:w,onType:A})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:w,message:w.length+"/"+v})})]})})})]})}return c}(),l=function(m,i){var d=(0,o.useBackend)(i),u=d.act,s=d.data,v=s.max_length,g=s.multiline,C=m.input,h=m.onType,N=g||C.length>=40;return(0,e.createComponentVNode)(2,V.TextArea,{autoFocus:!0,autoSelect:!0,height:g||C.length>=40?"100%":"1.8rem",maxLength:v,onEscape:function(){function b(){return u("cancel")}return b}(),onEnter:function(){function b(B){N&&B.shiftKey||(B.preventDefault(),u("submit",{entry:C}))}return b}(),onInput:function(){function b(B,L){return h(L)}return b}(),placeholder:"Type something...",value:C})}},82296:function(I,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.ThermoMachine=function(){function k(S,y){var p=(0,t.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function m(){return l("power")}return m}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function m(){return l("cooling")}return m}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function m(){return l("target",{target:c.min})}return m}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function m(i,d){return l("target",{target:d})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return l("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return l("target",{target:c.initial})}return m}()})]})]})})]})})}return k}()},68488:function(I,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TransferValve=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.tank_one,m=l.tank_two,i=l.attached_device,d=l.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!m,onClick:function(){function u(){return p("toggle")}return u}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!i,onClick:function(){function u(){return p("device")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:i?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:i,disabled:!i,onClick:function(){function u(){return p("remove_device")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function u(){return p("tankone")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function u(){return p("tanktwo")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return V}()},26868:function(I,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(58331),V=r.TurbineComputer=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.compressor,u=i.compressor_broken,s=i.turbine,v=i.turbine_broken,g=i.online,C=!!(d&&!u&&s&&!v);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:g?"power-off":"times",content:g?"Online":"Offline",selected:g,disabled:!C,onClick:function(){function h(){return m("toggle_power")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function h(){return m("disconnect")}return h}()})],4),children:C?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)})})})}return y}(),k=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.compressor,d=m.compressor_broken,u=m.turbine,s=m.turbine_broken,v=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!i||d?"bad":"good",children:d?i?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!u||s?"bad":"good",children:s?u?"Offline":"Missing":"Online"})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.rpm,d=m.temperature,u=m.power,s=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[i," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[d," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[u," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:s,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(s)+"%"})})]})}},30778:function(I,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(37843),f=n(91819),V=n(2971),k=n(84947),S=n(22677),y=function(g){switch(g){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,s);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},p=r.Uplink=function(){function v(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cart,L=(0,f.useLocalState)(C,"tabIndex",0),w=L[0],T=L[1],A=(0,f.useLocalState)(C,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,k.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,S.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Tabs,{children:[(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===0,onClick:function(){function P(){T(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===1,onClick:function(){function P(){T(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart"," ",B&&B.length?"("+B.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===2,onClick:function(){function P(){T(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{onClick:function(){function P(){return N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:y(w)})]})})]})}return v}(),l=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.crystals,L=b.cats,w=(0,f.useLocalState)(C,"uplinkItems",L[0].items),T=w[0],A=w[1],x=(0,f.useLocalState)(C,"searchText",""),E=x[0],P=x[1],R=function(K,_){_===void 0&&(_="");var $=(0,o.createSearch)(_,function(z){var Y=z.hijack_only===1?"|hijack":"";return z.name+"|"+z.desc+"|"+z.cost+"tc"+Y});return(0,t.flow)([(0,a.filter)(function(z){return z==null?void 0:z.name}),_&&(0,a.filter)($),(0,a.sortBy)(function(z){return z==null?void 0:z.name})])(K)},M=function(K){if(P(K),K==="")return A(L[0].items);A(R(L.map(function(_){return _.items}).flat(),K))},D=(0,f.useLocalState)(C,"showDesc",1),j=D[0],F=D[1];return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Section,{title:"Current Balance: "+B+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button.Checkbox,{content:"Show Descriptions",checked:j,onClick:function(){function W(){return F(!j)}return W}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Random Item",icon:"question",onClick:function(){function W(){return N("buyRandom")}return W}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function W(){return N("refund")}return W}()})],4),children:(0,e.createComponentVNode)(2,V.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function W(K,_){M(_)}return W}(),value:E})})})}),(0,e.createComponentVNode)(2,V.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V.Tabs,{vertical:!0,children:L.map(function(W){return(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:E!==""?!1:W.items===T,onClick:function(){function K(){A(W.items),P("")}return K}(),children:W.cat},W)})})})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:T.map(function(W){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:W,showDecription:j},(0,o.decodeHtmlEntities)(W.name))},(0,o.decodeHtmlEntities)(W.name))})})})})]})]})},c=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cart,L=b.crystals,w=b.cart_price,T=(0,f.useLocalState)(C,"showDesc",0),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+L+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return N("empty_cart")}return E}(),disabled:!B}),(0,e.createComponentVNode)(2,V.Button,{content:"Purchase Cart ("+w+"TC)",icon:"shopping-cart",onClick:function(){function E(){return N("purchase_cart")}return E}(),disabled:!B||w>L})],4),children:(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:B?B.map(function(E){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,u,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,V.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,m)]})},m=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cats,L=b.lucky_numbers;return(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function w(){return N("shuffle_lucky_numbers")}return w}()}),children:(0,e.createComponentVNode)(2,V.Stack,{wrap:!0,children:L.map(function(w){return B[w.cat].items[w.item]}).filter(function(w){return w!=null}).map(function(w,T){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,i,{grow:!0,i:w})},T)})})})})},i=function(g,C){var h=g.i,N=g.showDecription,b=N===void 0?1:N,B=g.buttons,L=B===void 0?(0,e.createComponentVNode)(2,d,{i:h}):B;return(0,e.createComponentVNode)(2,V.Section,{title:(0,o.decodeHtmlEntities)(h.name),showBottom:b,buttons:L,children:b?(0,e.createComponentVNode)(2,V.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(h.desc)}):null})},d=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=g.i,L=b.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button,{icon:"shopping-cart",color:B.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function w(){return N("add_to_cart",{item:B.obj_path})}return w}(),disabled:B.cost>L}),(0,e.createComponentVNode)(2,V.Button,{content:"Buy ("+B.cost+"TC)"+(B.refundable?" [Refundable]":""),color:B.hijack_only===1&&"red",tooltip:B.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function w(){return N("buyItem",{item:B.obj_path})}return w}(),disabled:B.cost>L})],4)},u=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=g.i,L=b.exploitable;return(0,e.createComponentVNode)(2,V.Stack,{children:[(0,e.createComponentVNode)(2,V.Button,{icon:"times",content:"("+B.cost*B.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function w(){return N("remove_from_cart",{item:B.obj_path})}return w}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"minus",tooltip:B.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function w(){return N("set_cart_item_quantity",{item:B.obj_path,quantity:--B.amount})}return w}(),disabled:B.amount<=0}),(0,e.createComponentVNode)(2,V.Button.Input,{content:B.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:B.limit===0&&"Discount already redeemed!",onCommit:function(){function w(T,A){return N("set_cart_item_quantity",{item:B.obj_path,quantity:A})}return w}(),disabled:B.limit!==-1&&B.amount>=B.limit&&B.amount<=0}),(0,e.createComponentVNode)(2,V.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:B.limit===0&&"Discount already redeemed!",onClick:function(){function w(){return N("set_cart_item_quantity",{item:B.obj_path,quantity:++B.amount})}return w}(),disabled:B.limit!==-1&&B.amount>=B.limit})]})},s=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.exploitable,L=(0,f.useLocalState)(C,"selectedRecord",B[0]),w=L[0],T=L[1],A=(0,f.useLocalState)(C,"searchText",""),x=A[0],E=A[1],P=function(D,j){j===void 0&&(j="");var F=(0,o.createSearch)(j,function(W){return W.name});return(0,t.flow)([(0,a.filter)(function(W){return W==null?void 0:W.name}),j&&(0,a.filter)(F),(0,a.sortBy)(function(W){return W.name})])(D)},R=P(B,x);return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,V.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(D,j){return E(j)}return M}()}),(0,e.createComponentVNode)(2,V.Tabs,{vertical:!0,children:R.map(function(M){return(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:M===w,onClick:function(){function D(){return T(M)}return D}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:w.name,children:(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Age",children:w.age}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Fingerprint",children:w.fingerprint}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Rank",children:w.rank}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Sex",children:w.sex}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Species",children:w.species})]})})})]})}},7307:function(I,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.product,i=S.productStock,d=S.productImage,u=c.chargesMoney,s=c.user,v=c.usermoney,g=c.inserted_cash,C=c.vend_ready,h=c.inserted_item_name,N=!u||m.price===0,b="ERROR!",B="";N?(b="FREE",B="arrow-circle-down"):(b=m.price,B="shopping-cart");var L=!C||i===0||!N&&m.price>v&&m.price>g;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:i<=0&&"bad"||i<=m.max_amount/2&&"average"||"good",children:[i," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:B,content:b,textAlign:"left",onClick:function(){function w(){return l("vend",{inum:m.inum})}return w}()})})]})},V=r.Vending=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.user,i=c.usermoney,d=c.inserted_cash,u=c.chargesMoney,s=c.product_records,v=s===void 0?[]:s,g=c.hidden_records,C=g===void 0?[]:g,h=c.stock,N=c.vend_ready,b=c.inserted_item_name,B=c.panel_open,L=c.speaker,w=c.imagelist,T;return T=[].concat(v),c.extended_inventory&&(T=[].concat(T,C)),T=T.filter(function(A){return!!A}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((u?171:89)+T.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!b&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,b,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function A(){return l("eject_item",{})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!d,icon:"money-bill-wave-alt",content:d?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,d,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:d?"Dispense Change":null,textAlign:"left",onClick:function(){function A(){return l("change")}return A}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),","," ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[i,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!B&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:L?"check":"volume-mute",selected:L,content:"Speaker",textAlign:"left",onClick:function(){function A(){return l("toggle_voice",{})}return A}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:T.map(function(A){return(0,e.createComponentVNode)(2,f,{product:A,productStock:h[A.name],productImage:w[A.path]},A.name)})})})})]})})})}return k}()},25485:function(I,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.VolumeMixer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(m,i){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:i>0&&"0.5rem",children:m.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return p("volume",{channel:m.num,volume:0})}return d}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:m.volume,onChange:function(){function d(u,s){return p("volume",{channel:m.num,volume:s})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return p("volume",{channel:m.num,volume:100})}return d}()})})})]})})],4,m.num)})})})})}return V}()},26564:function(I,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.VotePanel=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.remaining,m=l.question,i=l.choices,d=l.user_vote,u=l.counts,s=l.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,lineHeight:3,color:"translucent",multiLine:v,content:v+(s?" ("+(u[v]||0)+")":""),onClick:function(){function g(){return p("vote",{target:v})}return g}(),selected:v===d})},v)})]})})})}return V}()},496:function(I,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Wires=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.wires||[],m=l.status||[],i=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:i,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:d.color_name,labelColor:d.seen_color,color:d.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d.cut?"Mend":"Cut",onClick:function(){function u(){return p("cut",{wire:d.color})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function u(){return p("pulse",{wire:d.color})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:d.attached?"Detach":"Attach",onClick:function(){function u(){return p("attach",{wire:d.color})}return u}()})],4),children:!!d.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),d.wire,(0,e.createTextVNode)(")")],0)},d.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:d},d)})})})]})})})}return V}()},28919:function(I,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.WizardApprenticeContract=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("fire")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("translocation")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("restoration")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("stealth")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping. ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("honk")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return V}()},14635:function(I,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971);function f(p,l){var c=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(c)return(c=c.call(p)).next.bind(c);if(Array.isArray(p)||(c=V(p))||l&&p&&typeof p.length=="number"){c&&(p=c);var m=0;return function(){return m>=p.length?{done:!0}:{done:!1,value:p[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V(p,l){if(p){if(typeof p=="string")return k(p,l);var c=Object.prototype.toString.call(p).slice(8,-1);if(c==="Object"&&p.constructor&&(c=p.constructor.name),c==="Map"||c==="Set")return Array.from(p);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return k(p,l)}}function k(p,l){(l==null||l>p.length)&&(l=p.length);for(var c=0,m=new Array(l);c0&&!b.includes(j.ref)&&!h.includes(j.ref),checked:h.includes(j.ref),onClick:function(){function F(){return B(j.ref)}return F}()},j.desc)})]})]})})}return p}()},29136:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971),f=function(S,y,p,l,c){return Sl?"average":S>c?"bad":"good"},V=r.AtmosScan=function(){function k(S,y){var p=S.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(l){return l.val!=="0"||l.entry==="Pressure"||l.entry==="Temperature"})(p).map(function(l){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:l.entry,color:f(l.val,l.bad_low,l.poor_low,l.poor_high,l.bad_high),children:[l.val,l.units]},l.entry)})})})}return k}()},83326:function(I,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(28823),a=n(2971),t=n(64635),o=function(k){return k+" unit"+(k===1?"":"s")},f=r.BeakerContents=function(){function V(k){var S=k.beakerLoaded,y=k.beakerContents,p=y===void 0?[]:y,l=k.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!S&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||p.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),p.map(function(c,m){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!l&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:l(c,m)})]},c.name)})]})}return V}();f.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},86041:function(I,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.BotStatus=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.locked,c=p.noaccess,m=p.maintpanel,i=p.on,d=p.autopatrol,u=p.canhack,s=p.emagged,v=p.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",l?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"On":"Off",selected:i,disabled:c,onClick:function(){function g(){return y("power")}return g}()})}),d!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){function g(){return y("autopatrol")}return g}()})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:s?"bad":"good",children:s?"DISABLED!":"Enabled"})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:s?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function g(){return y("hack")}return g}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!v,content:"AI Remote Control",disabled:c,onClick:function(){function g(){return y("disableremote")}return g}()})})]})})],4)}return f}()},22677:function(I,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(28823),a=n(91819),t=n(2971),o={},f=r.modalOpen=function(){function p(l,c,m){var i=(0,a.useBackend)(l),d=i.act,u=i.data,s=Object.assign(u.modal?u.modal.args:{},m||{});d("modal_open",{id:c,arguments:JSON.stringify(s)})}return p}(),V=r.modalRegisterBodyOverride=function(){function p(l,c){o[l]=c}return p}(),k=r.modalAnswer=function(){function p(l,c,m,i){var d=(0,a.useBackend)(l),u=d.act,s=d.data;if(s.modal){var v=Object.assign(s.modal.args||{},i||{});u("modal_answer",{id:c,answer:m,arguments:JSON.stringify(v)})}}return p}(),S=r.modalClose=function(){function p(l,c){var m=(0,a.useBackend)(l),i=m.act;i("modal_close",{id:c})}return p}(),y=r.ComplexModal=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.data;if(i.modal){var d=i.modal,u=d.id,s=d.text,v=d.type,g,C=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function w(){return S(c)}return w}()}),h,N,b="auto";if(o[u])h=o[u](i.modal,c);else if(v==="input"){var B=i.modal.value;g=function(){function w(T){return k(c,u,B)}return w}(),h=(0,e.createComponentVNode)(2,t.Input,{value:i.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function w(T,A){B=A}return w}()}),N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function w(){return S(c)}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function w(){return k(c,u,B)}return w}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(v==="choice"){var L=typeof i.modal.choices=="object"?Object.values(i.modal.choices):i.modal.choices;h=(0,e.createComponentVNode)(2,t.Dropdown,{options:L,selected:i.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function w(T){return k(c,u,T)}return w}()}),b="initial"}else v==="bento"?h=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:i.modal.choices.map(function(w,T){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:T+1===parseInt(i.modal.value,10),onClick:function(){function A(){return k(c,u,T+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:w})})},T)})}):v==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:i.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function w(){return k(c,u,0)}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:i.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function w(){return k(c,u,1)}return w}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:l.maxWidth||window.innerWidth/2+"px",maxHeight:l.maxHeight||window.innerHeight/2+"px",onEnter:g,mx:"auto",overflowY:b,"padding-bottom":"5px",children:[s&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:s}),o[u]&&C,h,N]})}}return p}()},692:function(I,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(37843),f=n(30381),V=f.COLORS.department,k=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],S=function(m){return k.indexOf(m)!==-1?"green":"orange"},y=function(m){if(k.indexOf(m)!==-1)return!0},p=function(m){return m.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{color:S(i.rank),bold:y(i.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.active})]},i.name+i.rank)})]})},l=r.CrewManifest=function(){function c(m,i){var d=(0,a.useBackend)(i),u=d.act,s;if(m.data)s=m.data;else{var v=(0,a.useBackend)(i),g=v.data;s=g}var C=s,h=C.manifest,N=h.heads,b=h.sec,B=h.eng,L=h.med,w=h.sci,T=h.ser,A=h.sup,x=h.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:p(N)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:p(b)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:p(B)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:p(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:p(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:p(T)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:p(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:p(x)})]})}return c}()},98658:function(I,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(28823),a=n(2971),t=n(91819),o=r.InputButtons=function(){function f(V,k){var S=(0,t.useBackend)(k),y=S.act,p=S.data,l=p.large_buttons,c=p.swapped_buttons,m=V.input,i=V.message,d=V.disabled,u=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!l,fluid:!!l,onClick:function(){function v(){return y("submit",{entry:m})}return v}(),textAlign:"center",tooltip:l&&i,disabled:d,width:!l&&6}),s=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!l,fluid:!!l,onClick:function(){function v(){return y("cancel")}return v}(),textAlign:"center",width:!l&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s}),!l&&i&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:i})}),l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:u}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:u})]})}return f}()},29723:function(I,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.InterfaceLockNoticeBox=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=V.siliconUser,c=l===void 0?p.siliconUser:l,m=V.locked,i=m===void 0?p.locked:m,d=V.normallyLocked,u=d===void 0?p.normallyLocked:d,s=V.onLockStatusChange,v=s===void 0?function(){return y("lock")}:s,g=V.accessText,C=g===void 0?"an ID card":g;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:u?"red":"green",icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",onClick:function(){function h(){v&&v(!i)}return h}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",C," to ",i?"unlock":"lock"," this interface."]})}return f}()},2146:function(I,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(28823),a=n(58331),t=n(2971),o=r.Loader=function(){function f(V){var k=V.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(k)*100+"%"}}),2)}return f}()},51185:function(I,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LoginInfo=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.loginState;if(p)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",l.name," (",l.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!l.id,content:"Eject ID",color:"good",onClick:function(){function c(){return y("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return y("login_logout")}return c}()})]})]})})}return f}()},69774:function(I,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LoginScreen=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.loginState,c=p.isAI,m=p.isRobot,i=p.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){function d(){return y("login_insert")}return d}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){function d(){return y("login_login",{login_type:1})}return d}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function d(){return y("login_login",{login_type:2})}return d}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function d(){return y("login_login",{login_type:3})}return d}()}),!!i&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function d(){return y("login_login",{login_type:4})}return d}()})]})})})}return f}()},48154:function(I,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(28823),a=n(2971),t=n(64635),o=r.Operating=function(){function f(V){var k=V.operating,S=V.name;if(k)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",S," is processing..."]})})})}return f}();o.propTypes={operating:t.bool,name:t.string}},92149:function(I,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=r.Signaler=function(){function V(k,S){var y=(0,t.useBackend)(S),p=y.act,l=k.data,c=l.code,m=l.frequency,i=l.minFrequency,d=l.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:i/10,maxValue:d/10,value:m/10,format:function(){function u(s){return(0,a.toFixed)(s,1)}return u}(),width:"80px",onDrag:function(){function u(s,v){return p("freq",{freq:v})}return u}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function u(s,v){return p("code",{code:v})}return u}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function u(){return p("signal")}return u}()})]})}return V}()},79969:function(I,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(28823),a=n(91819),t=n(37843),o=n(90955),f=n(72026),V=n(2971),k=r.SimpleRecords=function(){function p(l,c){var m=l.data.records;return(0,e.createComponentVNode)(2,V.Box,{children:m?(0,e.createComponentVNode)(2,y,{data:l.data,recordType:l.recordType}):(0,e.createComponentVNode)(2,S,{data:l.data})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=l.data.recordsList,u=(0,a.useLocalState)(c,"searchText",""),s=u[0],v=u[1],g=function(N,b){b===void 0&&(b="");var B=(0,t.createSearch)(b,function(L){return L.Name});return(0,o.flow)([(0,f.filter)(function(L){return L==null?void 0:L.Name}),b&&(0,f.filter)(B),(0,f.sortBy)(function(L){return L.Name})])(d)},C=g(d,s);return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createComponentVNode)(2,V.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function h(N,b){return v(b)}return h}()}),C.map(function(h){return(0,e.createComponentVNode)(2,V.Box,{children:(0,e.createComponentVNode)(2,V.Button,{mb:.5,content:h.Name,icon:"user",onClick:function(){function N(){return i("Records",{target:h.uid})}return N}()})},h)})]})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=l.data.records,u=d.general,s=d.medical,v=d.security,g;switch(l.recordType){case"MED":g=(0,e.createComponentVNode)(2,V.Section,{level:2,title:"Medical Data",children:s?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Blood Type",children:s.blood_type}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Minor Disabilities",children:s.mi_dis}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.mi_dis_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Major Disabilities",children:s.ma_dis}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.ma_dis_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Allergies",children:s.alg}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.alg_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Current Diseases",children:s.cdi}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.cdi_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Important Notes",children:s.notes})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":g=(0,e.createComponentVNode)(2,V.Section,{level:2,title:"Security Data",children:v?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Criminal Status",children:v.criminal}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Minor Crimes",children:v.mi_crim}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:v.mi_crim_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Major Crimes",children:v.ma_crim}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:v.ma_crim_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Important Notes",children:v.notes})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createComponentVNode)(2,V.Section,{title:"General Data",children:u?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Name",children:u.name}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Sex",children:u.sex}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Species",children:u.species}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Age",children:u.age}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Rank",children:u.rank}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Fingerprint",children:u.fingerprint}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Physical Status",children:u.p_stat}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Mental Status",children:u.m_stat})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"General record lost!"})}),g]})}},76519:function(I,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.TemporaryNotice=function(){function f(V,k){var S,y=(0,a.useBackend)(k),p=y.act,l=y.data,c=l.temp;if(c){var m=(S={},S[c.style]=!0,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function i(){return p("cleartemp")}return i}()})})]})})))}}return f}()},98638:function(I,r,n){"use strict";r.__esModule=!0,r.pai_atmosphere=void 0;var e=n(28823),a=n(91819),t=n(29136),o=r.pai_atmosphere=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:p.app_data})}return f}()},56601:function(I,r,n){"use strict";r.__esModule=!0,r.pai_bioscan=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_bioscan=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.holder,m=l.dead,i=l.health,d=l.brute,u=l.oxy,s=l.tox,v=l.burn,g=l.temp;return c?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:m?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"Dead"}):(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"green",children:"Alive"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:0,max:1,value:i/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"blue",children:u})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxin Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"green",children:s})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:v})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"red",children:d})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Error: No biological host found."})}return f}()},48047:function(I,r,n){"use strict";r.__esModule=!0,r.pai_directives=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_directives=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.master,m=l.dna,i=l.prime,d=l.supplemental;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master",children:c?c+" ("+m+")":"None"}),c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Request DNA",children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){function u(){return y("getdna")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Prime Directive",children:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Supplemental Directives",children:d||"None"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}return f}()},4646:function(I,r,n){"use strict";r.__esModule=!0,r.pai_doorjack=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_doorjack=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.cable,m=l.machine,i=l.inprogress,d=l.progress,u=l.aborted,s;m?s=(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Connected"}):s=(0,e.createComponentVNode)(2,t.Button,{content:c?"Extended":"Retracted",color:c?"orange":null,onClick:function(){function g(){return y("cable")}return g}()});var v;return m&&(v=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hack",children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:d,maxValue:100}),i?(0,e.createComponentVNode)(2,t.Button,{mt:1,color:"red",content:"Abort",onClick:function(){function g(){return y("cancel")}return g}()}):(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Start",onClick:function(){function g(){return y("jack")}return g}()})]})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cable",children:s}),v]})}return f}()},94648:function(I,r,n){"use strict";r.__esModule=!0,r.pai_main_menu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_main_menu=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.available_software,m=l.installed_software,i=l.installed_toggles,d=l.available_ram,u=l.emotions,s=l.current_emotion,v=l.speech_verbs,g=l.current_speech_verb,C=l.available_chassises,h=l.current_chassis,N=[];return m.map(function(b){return N[b.key]=b.name}),i.map(function(b){return N[b.key]=b.name}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available RAM",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Software",children:[c.filter(function(b){return!N[b.key]}).map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name+" ("+b.cost+")",icon:b.icon,disabled:b.cost>d,onClick:function(){function B(){return y("purchaseSoftware",{key:b.key})}return B}()},b.key)}),c.filter(function(b){return!N[b.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[m.filter(function(b){return b.key!=="mainmenu"}).map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,icon:b.icon,onClick:function(){function B(){return y("startSoftware",{software_key:b.key})}return B}()},b.key)}),m.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[i.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,icon:b.icon,selected:b.active,onClick:function(){function B(){return y("setToggle",{toggle_key:b.key})}return B}()},b.key)}),i.length===0&&"No toggles installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Emotion",children:u.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.id===s,onClick:function(){function B(){return y("setEmotion",{emotion:b.id})}return B}()},b.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Speaking State",children:v.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.name===g,onClick:function(){function B(){return y("setSpeechStyle",{speech_state:b.name})}return B}()},b.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Chassis Type",children:C.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.icon===h,onClick:function(){function B(){return y("setChassis",{chassis_to_change:b.icon})}return B}()},b.id)})})]})})}return f}()},45549:function(I,r,n){"use strict";r.__esModule=!0,r.pai_manifest=void 0;var e=n(28823),a=n(91819),t=n(692),o=r.pai_manifest=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:p.app_data})}return f}()},53434:function(I,r,n){"use strict";r.__esModule=!0,r.pai_medrecords=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pai_medrecords=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y.app_data,recordType:"MED"})}return f}()},7328:function(I,r,n){"use strict";r.__esModule=!0,r.pai_messenger=void 0;var e=n(28823),a=n(91819),t=n(38467),o=r.pai_messenger=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data.active_convo;return l?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:p.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:p.app_data})}return f}()},32036:function(I,r,n){"use strict";r.__esModule=!0,r.pai_radio=void 0;var e=n(28823),a=n(91819),t=n(58331),o=n(2971),f=r.pai_radio=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.app_data,m=c.minFrequency,i=c.maxFrequency,d=c.frequency,u=c.broadcasting;return(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:m/10,maxValue:i/10,value:d/10,format:function(){function s(v){return(0,t.toFixed)(v,1)}return s}(),onChange:function(){function s(v,g){return p("freq",{freq:g})}return s}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function s(){return p("freq",{freq:"145.9"})}return s}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function s(){return p("toggleBroadcast")}return s}(),selected:u,content:u?"Enabled":"Disabled"})})]})}return V}()},76020:function(I,r,n){"use strict";r.__esModule=!0,r.pai_secrecords=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pai_secrecords=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y.app_data,recordType:"SEC"})}return f}()},11562:function(I,r,n){"use strict";r.__esModule=!0,r.pai_signaler=void 0;var e=n(28823),a=n(91819),t=n(92149),o=r.pai_signaler=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:p.app_data})}return f}()},29539:function(I,r,n){"use strict";r.__esModule=!0,r.pda_atmos_scan=void 0;var e=n(28823),a=n(91819),t=n(29136),o=r.pda_atmos_scan=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:y})}return f}()},92180:function(I,r,n){"use strict";r.__esModule=!0,r.pda_janitor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pda_janitor=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.janitor,c=l.user_loc,m=l.mops,i=l.buckets,d=l.cleanbots,u=l.carts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:m.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - ",s.status]},s)})}),i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:i.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - [",s.volume,"/",s.max_volume,"]"]},s)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - ",s.status]},s)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - [",s.volume,"/",s.max_volume,"]"]},s)})})]})}return f}()},57725:function(I,r,n){"use strict";r.__esModule=!0,r.pda_main_menu=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=r.pda_main_menu=function(){function V(k,S){var y=(0,t.useBackend)(S),p=y.act,l=y.data,c=l.owner,m=l.ownjob,i=l.idInserted,d=l.categories,u=l.pai,s=l.notifying;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",color:"average",children:[c,", ",m]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!i,onClick:function(){function v(){return p("UpdateInfo")}return v}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:d.map(function(v){var g=l.apps[v];return!g||!g.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:v,children:g.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{icon:C.uid in s?C.notify_icon:C.icon,iconSpin:C.uid in s,color:C.uid in s?"red":"transparent",content:C.name,onClick:function(){function h(){return p("StartProgram",{program:C.uid})}return h}()},C.uid)})},v)})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!u&&(0,e.createComponentVNode)(2,o.Section,{title:"pAI",children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){function v(){return p("pai",{option:1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function v(){return p("pai",{option:2})}return v}()})]})})]})}return V}()},29978:function(I,r,n){"use strict";r.__esModule=!0,r.pda_manifest=void 0;var e=n(28823),a=n(91819),t=n(692),o=r.pda_manifest=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return f}()},20567:function(I,r,n){"use strict";r.__esModule=!0,r.pda_medical=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pda_medical=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y,recordType:"MED"})}return f}()},38467:function(I,r,n){"use strict";r.__esModule=!0,r.pda_messenger=r.MessengerList=r.ActiveConversation=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971),f=r.pda_messenger=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,d=i.active_convo;return d?(0,e.createComponentVNode)(2,V,{data:i}):(0,e.createComponentVNode)(2,k,{data:i})}return y}(),V=r.ActiveConversation=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=i.convo_name,u=i.convo_job,s=i.messages,v=i.active_convo,g=(0,t.useLocalState)(l,"clipboardMode",!1),C=g[0],h=g[1],N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+u+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function b(){return h(!C)}return b}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function b(){return m("Message",{target:v})}return b}(),content:"Reply"})],4),children:(0,a.filter)(function(b){return b.target===v})(s).map(function(b,B){return(0,e.createComponentVNode)(2,o.Box,{textAlign:b.sent?"right":"left",position:"relative",mb:1,children:[(0,e.createComponentVNode)(2,o.Icon,{fontSize:2.5,color:b.sent?"#4d9121":"#cd7a0d",position:"absolute",left:b.sent?null:"0px",right:b.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:b.sent?"scale(-1, 1)":null},name:"comment"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,backgroundColor:b.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:b.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[b.sent?"You:":"Them:"," ",b.message]})]},B)})});return C&&(N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+u+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function b(){return h(!C)}return b}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function b(){return m("Message",{target:v})}return b}(),content:"Reply"})],4),children:(0,a.filter)(function(b){return b.target===v})(s).map(function(b,B){return(0,e.createComponentVNode)(2,o.Box,{color:b.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[b.sent?"You:":"Them:"," ",(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:b.message})]},B)})})),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:.5,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Delete Conversations",confirmContent:"Are you sure?",icon:"trash",confirmIcon:"trash",onClick:function(){function b(){return m("Clear",{option:"Convo"})}return b}()})})})}),N]})}return y}(),k=r.MessengerList=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=i.convopdas,u=i.pdas,s=i.charges,v=i.silent,g=i.toff,C=i.ringtone_list,h=i.ringtone,N=(0,t.useLocalState)(l,"searchTerm",""),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:5,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!v,icon:v?"volume-mute":"volume-up",onClick:function(){function L(){return m("Toggle Ringer")}return L}(),children:["Ringer: ",v?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:g?"bad":"green",icon:"power-off",onClick:function(){function L(){return m("Toggle Messenger")}return L}(),children:["Messenger: ",g?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function L(){return m("Clear",{option:"All"})}return L}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function L(){return m("Ringtone")}return L}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Button,{children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:h,width:"100px",options:Object.keys(C),onSelected:function(){function L(w){return m("Available_Ringtones",{selected_ringtone:w})}return L}()})})]})}),!g&&(0,e.createComponentVNode)(2,o.Box,{children:[!!s&&(0,e.createComponentVNode)(2,o.Box,{mt:.5,mb:1,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cartridge Special Function",children:[s," charges left."]})})}),!d.length&&!u.length&&(0,e.createComponentVNode)(2,o.Box,{children:"No current conversations"})||(0,e.createComponentVNode)(2,o.Box,{children:["Search:"," ",(0,e.createComponentVNode)(2,o.Input,{mt:.5,value:b,onInput:function(){function L(w,T){B(T)}return L}()})]})]})||(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Messenger Offline."})]}),(0,e.createComponentVNode)(2,S,{title:"Current Conversations",data:i,pdas:d,msgAct:"Select Conversation",searchTerm:b}),(0,e.createComponentVNode)(2,S,{title:"Other PDAs",pdas:u,msgAct:"Message",data:i,searchTerm:b})]})}return y}(),S=function(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=p.pdas,u=p.title,s=p.msgAct,v=p.searchTerm,g=i.charges,C=i.plugins;return!d||!d.length?(0,e.createComponentVNode)(2,o.Section,{title:u,children:"No PDAs found."}):(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:u,children:d.filter(function(h){return h.Name.toLowerCase().includes(v.toLowerCase())}).map(function(h){return(0,e.createComponentVNode)(2,o.Stack,{m:.5,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"arrow-circle-down",content:h.Name,onClick:function(){function N(){return m(s,{target:h.uid})}return N}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!g&&C.map(function(N){return(0,e.createComponentVNode)(2,o.Button,{icon:N.icon,content:N.name,onClick:function(){function b(){return m("Messenger Plugin",{plugin:N.uid,target:h.uid})}return b}()},N.uid)})})]},h.uid)})})}},54291:function(I,r,n){"use strict";r.__esModule=!0,r.pda_mob_hunt=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(96820),f=r.pda_mob_hunt=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.connected,m=l.wild_captures,i=l.no_collection,d=l.entry;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connection Status",children:c?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:["Connected",(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){function u(){return p("Disconnect")}return u}()})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:["Disconnected",(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){function u(){return p("Reconnect")}return u}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Wild Captures",children:m})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Collection",mt:2,buttons:(0,e.createComponentVNode)(2,t.Box,{children:!i&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Previous",icon:"arrow-left",onClick:function(){function u(){return p("Prev")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Next",icon:"arrow-right",onClick:function(){function u(){return p("Next")}return u}()})]})}),children:i?"Your collection is empty! Go capture some Nano-Mobs!":d?(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createVNode)(1,"img",null,null,1,{src:(0,o.resolveAsset)(d.sprite),style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,basis:0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.nickname&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nickname",children:d.nickname}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:d.real_name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Primary Type",children:d.type1}),d.type2&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Secondary Type",children:d.type2}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sd-card",onClick:function(){function u(){return p("Transfer")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Release",icon:"arrow-up",onClick:function(){function u(){return p("Release")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){function u(){return p("Rename")}return u}()}),!!d.is_hacked&&(0,e.createComponentVNode)(2,t.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){function u(){return p("Set_Trap")}return u}()})]})]})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Mob entry missing!"})})]})}return V}()},31112:function(I,r,n){"use strict";r.__esModule=!0,r.pda_mule=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pda_mule=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.active;return(0,e.createComponentVNode)(2,t.Box,{children:i?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,f)})}return k}(),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.bots;return i.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:d.Name,icon:"cog",onClick:function(){function u(){return l("control",{bot:d.uid})}return u}()})},d.Name)})},V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.botstatus,d=m.active,u=i.mode,s=i.loca,v=i.load,g=i.powr,C=i.dest,h=i.home,N=i.retn,b=i.pick,B;switch(u){case 0:B="Ready";break;case 1:B="Loading/Unloading";break;case 2:case 12:B="Navigating to delivery location";break;case 3:B="Navigating to Home";break;case 4:B="Waiting for clear path";break;case 5:case 6:B="Calculating navigation path";break;case 7:B="Unable to locate destination";break;default:B=u;break}return(0,e.createComponentVNode)(2,t.Section,{title:d,children:[u===-1&&(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[g,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:C?C+" (Set)":"None (Set)",onClick:function(){function L(){return l("target")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Unload)":"None",disabled:!v,onClick:function(){function L(){return l("unload")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Pickup",children:(0,e.createComponentVNode)(2,t.Button,{content:b?"Yes":"No",selected:b,onClick:function(){function L(){return l("set_pickup_type",{autopick:b?0:1})}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Return",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"Yes":"No",selected:N,onClick:function(){function L(){return l("set_auto_return",{autoret:N?0:1})}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Stop",icon:"stop",onClick:function(){function L(){return l("stop")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function L(){return l("start")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function L(){return l("home")}return L}()})]})]})]})}},2817:function(I,r,n){"use strict";r.__esModule=!0,r.pda_nanobank=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=r.pda_nanobank=function(){function c(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.logged_in,g=s.owner_name,C=s.money;return v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Name",children:g}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",C]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})],4):(0,e.createComponentVNode)(2,l)}return c}(),V=function(m,i){var d=(0,t.useBackend)(i),u=d.data,s=(0,t.useLocalState)(i,"tabIndex",1),v=s[0],g=s[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===1,onClick:function(){function C(){return g(1)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===2,onClick:function(){function C(){return g(2)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===3,onClick:function(){function C(){return g(3)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]})]})},k=function(m,i){var d=(0,t.useLocalState)(i,"tabIndex",1),u=d[0],s=(0,t.useBackend)(i),v=s.data,g=v.db_status;if(!g)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(u){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,y);case 3:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},S=function(m,i){var d,u=(0,t.useBackend)(i),s=u.act,v=u.data,g=v.requests,C=v.available_accounts,h=v.money,N=(0,t.useLocalState)(i,"selectedAccount"),b=N[0],B=N[1],L=(0,t.useLocalState)(i,"transferAmount"),w=L[0],T=L[1],A=(0,t.useLocalState)(i,"searchText",""),x=A[0],E=A[1],P=[];return C.map(function(R){return P[R.name]=R.UID}),(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account",children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account name",onInput:function(){function R(M,D){return E(D)}return R}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:C.filter((0,a.createSearch)(x,function(R){return R.name})).map(function(R){return R.name}),selected:(d=C.filter(function(R){return R.UID===b})[0])==null?void 0:d.name,onSelected:function(){function R(M){return B(P[M])}return R}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function R(M,D){return T(D)}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:h0&&s.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["#",g.Number,' - "',g.Name,'" for "',g.OrderedBy,'"']},g)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:u>0&&d.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["#",g.Number,' - "',g.Name,'" for "',g.ApprovedBy,'"']},g)})})]})}return f}()},73786:function(I,r,n){"use strict";r.__esModule=!0,r.Layout=void 0;var e=n(28823),a=n(66586),t=n(93843),o=n(33053),f=["className","theme","children"],V=["className","scrollable","children"];/** + */var V=(0,t.createLogger)("hotkeys"),k={},S=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],y={},p=function(s){if(s===16)return"Shift";if(s===17)return"Ctrl";if(s===18)return"Alt";if(s===33)return"Northeast";if(s===34)return"Southeast";if(s===35)return"Southwest";if(s===36)return"Northwest";if(s===37)return"West";if(s===38)return"North";if(s===39)return"East";if(s===40)return"South";if(s===45)return"Insert";if(s===46)return"Delete";if(s>=48&&s<=57||s>=65&&s<=90)return String.fromCharCode(s);if(s>=96&&s<=105)return"Numpad"+(s-96);if(s>=112&&s<=123)return"F"+(s-111);if(s===188)return",";if(s===189)return"-";if(s===190)return"."},l=function(s){var v=String(s);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(s.event.defaultPrevented||s.isModifierKey()||S.includes(s.code))){v==="F5"&&(s.event.preventDefault(),s.event.returnValue=!1);var g=p(s.code);if(g){var C=k[g];if(C)return V.debug("macro",C),Byond.command(C);if(s.isDown()&&!y[g]){y[g]=!0;var h='Key_Down "'+g+'"';return V.debug(h),Byond.command(h)}if(s.isUp()&&y[g]){y[g]=!1;var N='Key_Up "'+g+'"';return V.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function u(s){S.push(s)}return u}(),m=r.releaseHotKey=function(){function u(s){var v=S.indexOf(s);v>=0&&S.splice(v,1)}return u}(),i=r.releaseHeldKeys=function(){function u(){for(var s=0,v=Object.keys(y);s=75?c="green":l.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:l.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:l.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,l.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(m,i){return(0,e.createComponentVNode)(2,t.Box,{children:m},i)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){function m(){return p("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){function m(){return p("radio")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||l.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return p("wipe")}return m}()})})]})})})]})})})}return V}()},46817:function(I,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AIFixer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;if(l.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(l.stat===2||l.stat===null)&&(c=!1);var m=null;l.integrity>=75?m="green":l.integrity>=25?m="yellow":m="red";var i=!0;return l.integrity>=100&&l.stat!==2&&(i=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:l.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:m,value:l.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(d,u){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d},u)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){function d(){return p("wireless")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){function d(){return p("radio")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!i||l.active,content:!i||l.active?"Already Repaired":"Repair",onClick:function(){function d(){return p("fix")}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})})]})})})}return V}()},20420:function(I,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(29723),V=r.APC=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,y)})})}return p}(),k={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},S={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.locked&&!d.siliconUser,s=d.normallyLocked,v=k[d.externalPower]||k[0],g=k[d.chargingStatus]||k[0],C=d.powerChannels||[],h=S[d.malfStatus]||S[0],N=d.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!u,color:d.isOperating?"":"bad",disabled:u,onClick:function(){function b(){return i("breaker")}return b}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:g.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:u,onClick:function(){function b(){return i("charge")}return b}()}),children:["[ ",g.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[C.map(function(b){var B=b.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:b.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:b.status>=2?"good":"bad",children:b.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!u&&(b.status===1||b.status===3),disabled:u,onClick:function(){function L(){return i("channel",B.auto)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!u&&b.status===2,disabled:u,onClick:function(){function L(){return i("channel",B.on)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!u&&b.status===0,disabled:u,onClick:function(){function L(){return i("channel",B.off)}return L}()})],4),children:[b.powerLoad," W"]},b.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[d.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,e.createFragment)([!!d.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){function b(){return i(h.action)}return b}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function b(){return i("overload")}return b}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",disabled:u,onClick:function(){function b(){return i("cover")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:d.emergencyLights?"Enabled":"Disabled",disabled:u,onClick:function(){function b(){return i("emergency_lighting")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",onClick:function(){function b(){return i("toggle_nightshift")}return b}()})})]})})],4)}},16822:function(I,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ATM=function(){function m(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.view_screen,C=v.authenticated_account,h=v.ticks_left_locked_down,N=v.linked_db,b;if(h>0)b=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)b=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(C)switch(g){case 1:b=(0,e.createComponentVNode)(2,k);break;case 2:b=(0,e.createComponentVNode)(2,S);break;case 3:b=(0,e.createComponentVNode)(2,l);break;default:b=(0,e.createComponentVNode)(2,y)}else b=(0,e.createComponentVNode)(2,p);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Section,{children:b})]})})}return m}(),V=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.machine_id,C=v.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"eject",onClick:function(){function h(){return s("insert_card")}return h}()})})})]})},k=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:g===0,onClick:function(){function C(){return s("change_security_level",{new_security_level:1})}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:g===2,onClick:function(){function C(){return s("change_security_level",{new_security_level:2})}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},S=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"targetAccNumber",0),C=g[0],h=g[1],N=(0,a.useLocalState)(d,"fundsAmount",0),b=N[0],B=N[1],L=(0,a.useLocalState)(d,"purpose",0),w=L[0],T=L[1],A=v.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return h(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return B(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return T(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return s("transfer",{target_acc_number:C,funds_amount:b,purpose:w})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},y=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"fundsAmount",0),C=g[0],h=g[1],N=v.owner_name,b=v.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function B(){return s("logout")}return B}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function B(L,w){return h(w)}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function B(){return s("withdrawal",{funds_amount:C})}return B}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function B(){return s("view_screen",{view_screen:1})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function B(){return s("view_screen",{view_screen:2})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function B(){return s("view_screen",{view_screen:3})}return B}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function B(){return s("balance_statement")}return B}()})})]})],4)},p=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=(0,a.useLocalState)(d,"accountID",null),C=g[0],h=g[1],N=(0,a.useLocalState)(d,"accountPin",null),b=N[0],B=N[1],L=v.machine_id,w=v.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function T(A,x){return h(x)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function T(A,x){return B(x)}return T}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function T(){return s("attempt_auth",{account_num:C,account_pin:b})}return T}()})})]})})},l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),g.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:C.is_deposit?"green":"red",children:["$",C.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.target_name})]},C)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function g(){return s("view_screen",{view_screen:0})}return g}()})}},90698:function(I,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(99753),V=n(84947),k=n(51185),S=n(69774),y=r.AccountsUplinkTerminal=function(){function v(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.loginState,L=b.currentPage,w;if(B.logged_in)L===1?w=(0,e.createComponentVNode)(2,l):L===2?w=(0,e.createComponentVNode)(2,u):L===3&&(w=(0,e.createComponentVNode)(2,s));else return(0,e.createComponentVNode)(2,V.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,S.LoginScreen)})})});return(0,e.createComponentVNode)(2,V.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:w})]})})})}return v}(),p=function(g,C){var h=(0,t.useBackend)(C),N=h.data,b=(0,t.useLocalState)(C,"tabIndex",0),B=b[0],L=b[1],w=N.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:B===0,onClick:function(){function T(){return L(0)}return T}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:B===1,onClick:function(){function T(){return L(1)}return T}(),children:"Department Accounts"})]})})})},l=function(g,C){var h=(0,t.useLocalState)(C,"tabIndex",0),N=h[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.accounts,L=(0,t.useLocalState)(C,"searchText",""),w=L[0],T=L[1],A=(0,t.useLocalState)(C,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(C,"sortOrder",!0),R=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),B.filter((0,a.createSearch)(w,function(D){return D.owner_name+"|"+D.account_number+"|"+D.suspended+"|"+D.money})).sort(function(D,j){var F=R?1:-1;return D[x].localeCompare(j[x])*F}).map(function(D){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+D.suspended,onClick:function(){function j(){return N("view_account_detail",{account_num:D.account_number})}return j}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",D.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",D.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:D.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:D.money})]},D.account_number)})]})})})]})},m=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Balance"})]}),B.map(function(L){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+L.suspended,onClick:function(){function w(){return N("view_account_detail",{account_num:L.account_number})}return w}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",L.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",L.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:L.money})]},L.account_number)})]})})})})},i=function(g,C){var h=(0,t.useLocalState)(C,"sortId","name"),N=h[0],b=h[1],B=(0,t.useLocalState)(C,"sortOrder",!0),L=B[0],w=B[1],T=g.id,A=g.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==T&&"transparent",width:"100%",onClick:function(){function x(){N===T?w(!L):(b(T),w(!0))}return x}(),children:[A,N===T&&(0,e.createComponentVNode)(2,o.Icon,{name:L?"sort-up":"sort-down",ml:"0.25rem;"})]})})},d=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.is_printing,L=(0,t.useLocalState)(C,"searchText",""),w=L[0],T=L[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return N("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return T(E)}return A}()})})]})},u=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=b.account_number,L=b.owner_name,w=b.money,T=b.suspended,A=b.transactions,x=b.account_pin,E=b.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+B+" / "+L,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return N("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",B]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return N("set_account_pin",{account_number:B})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:w}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:T?"red":"green",children:[T?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:T?"Unsuspend":"Suspend",icon:T?"unlock":"lock",onClick:function(){function P(){return N("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},s=function(g,C){var h=(0,t.useBackend)(C),N=h.act,b=h.data,B=(0,t.useLocalState)(C,"accName",""),L=B[0],w=B[1],T=(0,t.useLocalState)(C,"accDeposit",""),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return N("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,R){return w(R)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,R){return x(R)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:L,starting_funds:A})}return E}()})]})}},66895:function(I,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AgentCard=function(){function S(y,p){var l=(0,a.useLocalState)(p,"tabIndex",0),c=l[0],m=l[1],i=function(){function d(u){switch(u){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);default:return(0,e.createComponentVNode)(2,V)}}return d}();return(0,e.createComponentVNode)(2,o.Window,{width:425,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:c===0,onClick:function(){function d(){return m(0)}return d}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:c===1,onClick:function(){function d(){return m(1)}return d}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),i(c)]})})})}return S}(),V=r.AgentCardInfo=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.registered_name,d=m.sex,u=m.age,s=m.assignment,v=m.associated_account_number,g=m.blood_type,C=m.dna_hash,h=m.fingerprint_hash,N=m.photo,b=m.ai_tracking;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,t.Button,{content:i||"[UNSET]",onClick:function(){function B(){return c("change_name")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Button,{iconRight:!1,content:d||"[UNSET]",onClick:function(){function B(){return c("change_sex")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"[UNSET]",onClick:function(){function B(){return c("change_age")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"[UNSET]",onClick:function(){function B(){return c("change_occupation")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:(0,e.createComponentVNode)(2,t.Button,{content:h||"[UNSET]",onClick:function(){function B(){return c("change_fingerprints")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Button,{content:g||"[UNSET]",onClick:function(){function B(){return c("change_blood_type")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"DNA Hash",children:(0,e.createComponentVNode)(2,t.Button,{content:C||"[UNSET]",onClick:function(){function B(){return c("change_dna_hash")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Money Account",children:(0,e.createComponentVNode)(2,t.Button,{content:v||"[UNSET]",onClick:function(){function B(){return c("change_money_account")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"Update":"[UNSET]",onClick:function(){function B(){return c("change_photo")}return B}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button,{content:"Delete Card Info",onClick:function(){function B(){return c("delete_info")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button,{content:"Reset Access",onClick:function(){function B(){return c("clear_access")}return B}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{content:b?"Untrackable":"Trackable",onClick:function(){function B(){return c("change_ai_tracking")}return B}()})})]})})})],4)}return S}(),k=r.AgentCardAppearances=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=(0,a.useLocalState)(p,"selectedAppearance",null),d=i[0],u=i[1],s=m.appearances;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:s.map(function(v){return(0,e.createComponentVNode)(2,t.Button,{compact:!0,m:.5,color:"translucent",selected:v===d,content:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+v.image,style:{width:"64px","vertical-align":"middle","-ms-interpolation-mode":"nearest-neighbor"},onClick:function(){function g(){u(v),c("change_appearance",{new_appearance:v.name})}return g}()})},v.name)})})})}return S}()},26354:function(I,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},V=r.AiAirlock=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=f[c.power.main]||f[0],i=f[c.power.backup]||f[0],d=f[c.shock]||f[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function u(){return l("disrupt-main")}return u}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:i.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function u(){return l("disrupt-backup")}return u}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:d.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function u(){return l("shock-restore")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function u(){return l("shock-temp")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function u(){return l("shock-perm")}return u}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function u(){return l("idscan-toggle")}return u}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function u(){return l("emergency-toggle")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function u(){return l("bolt-toggle")}return u}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function u(){return l("light-toggle")}return u}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function u(){return l("safe-toggle")}return u}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function u(){return l("speed-toggle")}return u}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function u(){return l("open-close")}return u}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return k}()},26673:function(I,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(29723),V=r.AirAlarm=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:h?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,S),!h&&(0,e.createFragment)([(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p)],4)]})})}return d}(),k=function(u){return u===0?"green":u===1?"orange":"red"},S=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.air,N=C.mode,b=C.atmos_alarm,B=C.locked,L=C.alarmActivated,w=C.rcon,T=C.target_temp,A;return h.danger.overall===0?b===0?A="Optimal":A="Caution: Atmos alert in area":h.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.pressure})," kPa",!B&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return g("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.oxygen/100,fractionDigits:"1",color:k(h.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.nitrogen/100,fractionDigits:"1",color:k(h.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.co2/100,fractionDigits:"1",color:k(h.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.plasma/100,fractionDigits:"1",color:k(h.danger.plasma)})}),h.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.n2o/100,fractionDigits:"1",color:k(h.danger.n2o)})}),h.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h.contents.other/100,fractionDigits:"1",color:k(h.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature})," K /"," ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:T+" C",onClick:function(){function x(){return g("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:h.thermostat_state?"On":"Off",selected:h.thermostat_state,icon:"power-off",onClick:function(){function x(){return g("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:k(h.danger.overall),children:[A,!B&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:L?"Reset Alarm":"Activate Alarm",selected:L,onClick:function(){function x(){return g(L?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:w===1,onClick:function(){function x(){return g("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:w===2,onClick:function(){function x(){return g("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:w===3,onClick:function(){function x(){return g("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},y=function(u,s){var v=(0,a.useLocalState)(s,"tabIndex",0),g=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===0,onClick:function(){function h(){return C(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===1,onClick:function(){function h(){return C(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===2,onClick:function(){function h(){return C(2)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:g===3,onClick:function(){function h(){return C(3)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},p=function(u,s){var v=(0,a.useLocalState)(s,"tabIndex",0),g=v[0],C=v[1];switch(g){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,i);default:return"WE SHOULDN'T BE HERE!"}},l=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.vents;return h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function b(){return g("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function b(){return g("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function b(){return g("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function b(){return g("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function b(){return g("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function b(){return g("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return b}()})]})]})},N.name)})},c=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.scrubbers;return h.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function b(){return g("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function b(){return g("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return b}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function b(){return g("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function b(){return g("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function b(){return g("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function b(){return g("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function b(){return g("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function b(){return g("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return b}()})]})]})},N.name)})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.modes,N=C.presets,b=C.emagged,B=C.mode,L=C.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:h.map(function(w){return(!w.emagonly||w.emagonly&&!!b)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:w.name,icon:"cog",selected:w.id===B,onClick:function(){function T(){return g("mode",{mode:w.id})}return T}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:N.map(function(w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:w.name,icon:"cog",selected:w.id===L,onClick:function(){function T(){return g("preset",{preset:w.id})}return T}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.name)})})]})],4)},i=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.settings.map(function(b){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:b.selected===-1?"Off":b.selected,onClick:function(){function B(){return g("command",{cmd:"set_threshold",env:b.env,var:b.val})}return B}()})},b.val)})]},N.name)})]})})}},98565:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AirlockAccessController=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.exterior_status,m=l.interior_status,i=l.processing,d,u;return c==="open"?d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:i,onClick:function(){function s(){return p("force_ext")}return s}()}):d=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:i,onClick:function(){function s(){return p("cycle_ext_door")}return s}()}),m==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:i,color:m==="open"?"red":i?"yellow":null,onClick:function(){function s(){return p("force_int")}return s}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:i,onClick:function(){function s(){return p("cycle_int_door")}return s}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[d,u]})})]})})}return V}()},76385:function(I,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(14635),V=1,k=2,S=4,y=8,p=r.AirlockElectronics=function(){function m(i,d){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})})}return m}(),l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:g&S?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:S})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:g&k?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:k})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:g&y?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:y})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:g&V?"selected":null,onClick:function(){function C(){return s("unrestricted_access",{unres_dir:V})}return C}()})})]})]})})},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.selected_accesses,C=v.one_access,h=v.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:C,content:"One",onClick:function(){function N(){return s("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!C,content:"All",onClick:function(){function N(){return s("set_one_access",{access:"all"})}return N}()})],4),accesses:h,selectedList:g,accessMod:function(){function N(b){return s("set",{access:b})}return N}(),grantAll:function(){function N(){return s("grant_all")}return N}(),denyAll:function(){function N(){return s("clear_all")}return N}(),grantDep:function(){function N(b){return s("grant_region",{region:b})}return N}(),denyDep:function(){function N(b){return s("deny_region",{region:b})}return N}()})}},55666:function(I,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(28823),a=n(2146),t=n(91819),o=n(31068),f=n(2971),V=n(84947),k=-1,S=1,y=r.AlertModal=function(){function c(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.autofocus,g=s.buttons,C=g===void 0?[]:g,h=s.large_buttons,N=s.message,b=N===void 0?"":N,B=s.timeout,L=s.title,w=(0,t.useLocalState)(i,"selected",0),T=w[0],A=w[1],x=110+(b.length>30?Math.ceil(b.length/4):0)+(b.length&&h?5:0),E=325+(C.length>2?100:0),P=function(){function R(M){T===0&&M===k?A(C.length-1):T===C.length-1&&M===S?A(0):A(T+M)}return R}();return(0,e.createComponentVNode)(2,V.Window,{title:L,height:x,width:E,children:[!!B&&(0,e.createComponentVNode)(2,a.Loader,{value:B}),(0,e.createComponentVNode)(2,V.Window.Content,{onKeyDown:function(){function R(M){var D=window.event?M.which:M.keyCode;D===o.KEY_SPACE||D===o.KEY_ENTER?u("choose",{choice:C[T]}):D===o.KEY_ESCAPE?u("cancel"):D===o.KEY_LEFT?(M.preventDefault(),P(k)):(D===o.KEY_TAB||D===o.KEY_RIGHT)&&(M.preventDefault(),P(S))}return R}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:b})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,p,{selected:T})]})]})})})]})}return c}(),p=function(m,i){var d=(0,t.useBackend)(i),u=d.data,s=u.buttons,v=s===void 0?[]:s,g=u.large_buttons,C=u.swapped_buttons,h=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:C?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(N,b){return g&&v.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{button:N,id:b.toString(),selected:h===b})},b):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:g?1:0,children:(0,e.createComponentVNode)(2,l,{button:N,id:b.toString(),selected:h===b})},b)})})},l=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.large_buttons,g=m.button,C=m.selected,h=g.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:v?1:0,pt:v?.33:0,content:g,fluid:!!v,onClick:function(){function N(){return u("choose",{choice:g})}return N}(),selected:C,textAlign:"center",height:!!v&&2,width:!v&&h})}},16504:function(I,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AppearanceChanger=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.change_race,i=c.species,d=c.specimen,u=c.change_gender,s=c.gender,v=c.has_gender,g=c.change_eye_color,C=c.change_skin_tone,h=c.change_skin_color,N=c.change_head_accessory_color,b=c.change_hair_color,B=c.change_secondary_hair_color,L=c.change_facial_hair_color,w=c.change_secondary_facial_hair_color,T=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,R=c.head_accessory_style,M=c.change_hair,D=c.hair_styles,j=c.hair_style,F=c.change_hair_gradient,W=c.change_facial_hair,K=c.facial_hair_styles,_=c.facial_hair_style,$=c.change_head_markings,z=c.head_marking_styles,Y=c.head_marking_style,Z=c.change_body_markings,ie=c.body_marking_styles,ae=c.body_marking_style,se=c.change_tail_markings,he=c.tail_marking_styles,ye=c.tail_marking_style,Le=c.change_body_accessory,pe=c.body_accessory_styles,oe=c.body_accessory_style,Q=c.change_alt_head,q=c.alt_head_styles,ue=c.alt_head_style,me=!1;return(g||C||h||N||b||B||L||w||T||A||x)&&(me=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:i.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.specimen,selected:ne.specimen===d,onClick:function(){function be(){return l("race",{race:ne.specimen})}return be}()},ne.specimen)})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:s==="male",onClick:function(){function ne(){return l("gender",{gender:"male"})}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:s==="female",onClick:function(){function ne(){return l("gender",{gender:"female"})}return ne}()}),!v&&(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:s==="plural",onClick:function(){function ne(){return l("gender",{gender:"plural"})}return ne}()})]}),!!me&&(0,e.createComponentVNode)(2,V),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.headaccessorystyle,selected:ne.headaccessorystyle===R,onClick:function(){function be(){return l("head_accessory",{head_accessory:ne.headaccessorystyle})}return be}()},ne.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:D.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.hairstyle,selected:ne.hairstyle===j,onClick:function(){function be(){return l("hair",{hair:ne.hairstyle})}return be}()},ne.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function ne(){return l("hair_gradient")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ne(){return l("hair_gradient_offset")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ne(){return l("hair_gradient_colour")}return ne}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ne(){return l("hair_gradient_alpha")}return ne}()})]}),!!W&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:K.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.facialhairstyle,selected:ne.facialhairstyle===_,onClick:function(){function be(){return l("facial_hair",{facial_hair:ne.facialhairstyle})}return be}()},ne.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:z.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.headmarkingstyle,selected:ne.headmarkingstyle===Y,onClick:function(){function be(){return l("head_marking",{head_marking:ne.headmarkingstyle})}return be}()},ne.headmarkingstyle)})}),!!Z&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:ie.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.bodymarkingstyle,selected:ne.bodymarkingstyle===ae,onClick:function(){function be(){return l("body_marking",{body_marking:ne.bodymarkingstyle})}return be}()},ne.bodymarkingstyle)})}),!!se&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:he.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.tailmarkingstyle,selected:ne.tailmarkingstyle===ye,onClick:function(){function be(){return l("tail_marking",{tail_marking:ne.tailmarkingstyle})}return be}()},ne.tailmarkingstyle)})}),!!Le&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:pe.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.bodyaccessorystyle,selected:ne.bodyaccessorystyle===oe,onClick:function(){function be(){return l("body_accessory",{body_accessory:ne.bodyaccessorystyle})}return be}()},ne.bodyaccessorystyle)})}),!!Q&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:q.map(function(ne){return(0,e.createComponentVNode)(2,t.Button,{content:ne.altheadstyle,selected:ne.altheadstyle===ue,onClick:function(){function be(){return l("alt_head",{alt_head:ne.altheadstyle})}return be}()},ne.altheadstyle)})})]})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:m.map(function(i){return!!c[i.key]&&(0,e.createComponentVNode)(2,t.Button,{content:i.text,onClick:function(){function d(){return l(i.action)}return d}()},i.key)})})}},77280:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosAlertConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.priority||[],m=l.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(i){return(0,e.createVNode)(1,"li","color-bad",i,0,null,i)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(i){return(0,e.createVNode)(1,"li","color-average",i,0,null,i)})],0)})})})}return V}()},66274:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(99753),f=n(84947),V=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},k=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},S=r.AtmosControl=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=(0,a.useLocalState)(m,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,p);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:v===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),C(v)]})})})}return l}(),y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:V(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function g(){return d("open_alarm",{aref:v.ref})}return g}()})})]},v.name)})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.data,u=(0,a.useLocalState)(m,"zoom",1),s=u[0],v=u[1],g=d.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{onZoom:function(){function C(h){return v(h)}return C}(),children:g.filter(function(C){return C.z===3}).map(function(C){return(0,e.createComponentVNode)(2,t.NanoMap.Marker,{x:C.x,y:C.y,zoom:s,icon:"circle",tooltip:C.name,color:k(C.danger)},C.ref)})})})}},90588:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosFilter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.on,m=l.pressure,i=l.max_pressure,d=l.filter_type,u=l.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function s(){return p("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function s(){return p("min_pressure")}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:i,value:m,onDrag:function(){function s(v,g){return p("custom_pressure",{pressure:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function s(){return p("max_pressure")}return s}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Button,{selected:s.gas_type===d,content:s.label,onClick:function(){function v(){return p("set_filter",{filter:s.gas_type})}return v}()},s.label)})})]})})})})}return V}()},87486:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosMixer=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.on,i=c.pressure,d=c.max_pressure,u=c.node1_concentration,s=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:i===0,width:2.2,onClick:function(){function v(){return l("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:i,onDrag:function(){function v(g,C){return l("custom_pressure",{pressure:C})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:i===d,width:2.2,onClick:function(){function v(){return l("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,V,{node_name:"Node 1",node_ref:u}),(0,e.createComponentVNode)(2,V,{node_name:"Node 2",node_ref:s})]})})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.node_name,i=S.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:i===0,onClick:function(){function d(){return l("set_node",{node_name:m,concentration:(i-10)/100})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:i,onChange:function(){function d(u,s){return l("set_node",{node_name:m,concentration:s/100})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:i===100,onClick:function(){function d(){return l("set_node",{node_name:m,concentration:(i+10)/100})}return d}()})]})}},46714:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.AtmosPump=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.on,m=l.rate,i=l.max_rate,d=l.gas_unit,u=l.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function s(){return p("power")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function s(){return p("min_rate")}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:u,minValue:0,maxValue:i,value:m,onDrag:function(){function s(v,g){return p("custom_rate",{rate:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function s(){return p("max_rate")}return s}()})]})]})})})})}return V}()},66032:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(58331),f=n(30381),V=n(84947),k=r.AtmosTankControl=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.sensors||{};return(0,e.createComponentVNode)(2,V.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:[Object.keys(i).map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(i[d]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[i[d].pressure," kpa"]}):"",Object.keys(i[d]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[i[d].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(u){return Object.keys(i[d]).indexOf(u)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(u),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(u),value:i[d][u],minValue:0,maxValue:100,children:(0,o.toFixed)(i[d][u],2)+"%"})},(0,f.getGasLabel)(u)):""})]})},d)}),m.inlet&&Object.keys(m.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"inlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:m.inlet.rate,onDrag:function(){function d(u,s){return c("set_pressure",{dev:"inlet",val:s})}return d}()})})]})}):"",m.outlet&&Object.keys(m.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function d(){return c("toggle_active",{dev:"outlet"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:m.outlet.rate,onDrag:function(){function d(u,s){return c("set_pressure",{dev:"outlet",val:s})}return d}()})})]})}):""]})})}return S}()},62343:function(I,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(28823),a=n(90955),t=n(72026),o=n(91819),f=n(2971),V=n(84947),k=n(37843),S=function(l,c,m,i){return l.requirements===null?!0:!(l.requirements.metal*i>c||l.requirements.glass*i>m)},y=r.Autolathe=function(){function p(l,c){var m=(0,o.useBackend)(c),i=m.act,d=m.data,u=d.total_amount,s=d.max_amount,v=d.metal_amount,g=d.glass_amount,C=d.busyname,h=d.busyamt,N=d.showhacked,b=d.buildQueue,B=d.buildQueueLen,L=d.recipes,w=d.categories,T=(0,o.useSharedState)(c,"category",0),A=T[0],x=T[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=g.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),R=u.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),D=M[0],j=M[1],F=(0,k.createSearch)(D,function($){return $.name}),W="";B>0&&(W=b.map(function($,z){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:b[z][0],onClick:function(){function Y(){return i("remove_from_queue",{remove_from_queue:b.indexOf($)+1})}return Y}()},$)},z)}));var K=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||D)&&(d.showhacked||!$.hacked)}),D&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(L),_="Build";return D?_="Results for: '"+D+"':":A&&(_="Build ("+A+")"),(0,e.createComponentVNode)(2,V.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:_,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:w,selected:A,onSelected:function(){function $(z){return x(z)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(z,Y){return j(Y)}return $}(),mb:1}),K.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===1,disabled:!S($,d.metal_amount,d.glass_amount,1),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:1})}return z}(),children:(0,k.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===10,disabled:!S($,d.metal_amount,d.glass_amount,10),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:10})}return z}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===25,disabled:!S($,d.metal_amount,d.glass_amount,25),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:25})}return z}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:d.busyname===$.name&&d.busyamt===$.max_multiplier,disabled:!S($,d.metal_amount,d.glass_amount,$.max_multiplier),onClick:function(){function z(){return i("make",{make:$.uid,multiplier:$.max_multiplier})}return z}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(z){return(0,k.toTitleCase)(z)+": "+$.requirements[z]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:R}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[d.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[W,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!d.buildQueueLen,onClick:function(){function $(){return i("clear_queue")}return $}()})]})]})]})})})}return p}()},13940:function(I,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.BioChipPad=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.implant,m=l.contains_case;return(0,e.createComponentVNode)(2,o.Window,{width:410,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Bio-chip Mini-Computer",children:[c&&m?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function})]})],4):m?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"}),(0,e.createComponentVNode)(2,t.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!m,onClick:function(){function i(){return p("eject_case")}return i}()})]})})})}return V}()},55295:function(I,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48154),V=r.Biogenerator=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.data,u=i.config,s=d.container,v=d.processing,g=u.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:v,name:g}),(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y),s?(0,e.createComponentVNode)(2,p):(0,e.createComponentVNode)(2,k)]})})})}return l}(),k=function(c,m){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},S=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.biomass,v=u.container,g=u.container_curr_reagents,C=u.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:s}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),v?(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,maxValue:C,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:g+" / "+C+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.has_plants,v=u.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!s,tooltip:s?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function g(){return d("activate")}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!v,tooltip:v?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function g(){return d("detach_container")}return g}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!s,tooltip:s?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function g(){return d("eject_plants")}return g}()})})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.biomass,v=u.product_list,g=(0,a.useSharedState)(m,"vendAmount",1),C=g[0],h=g[1],N=Object.entries(v).map(function(b,B){var L=Object.entries(b[1]).map(function(w){return w[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:b[0],open:!0,children:L.map(function(w){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:w.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[w.cost*C,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:sd&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!h&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),d>N&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Level",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i===0,tooltip:"Set to 0",onClick:function(){function L(){return l("set",{set_level:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:i===0,onClick:function(){function L(){return l("set",{set_level:d})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:i===0,tooltip:"Decrease one step",onClick:function(){function L(){return l("decrease")}return L}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,mx:1,children:(0,e.createComponentVNode)(2,t.Slider,{value:i,fillValue:d,minValue:0,color:B,maxValue:C,stepPixelSize:20,step:1,onChange:function(){function L(w,T){return l("set",{set_level:T})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:i===C,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){function L(){return l("increase")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i===C,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){function L(){return l("set",{set_level:C})}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Power Use",children:(0,f.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power for next level",children:(0,f.formatPower)(b)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(g)})]})})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:s})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:m.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:L.price>=u,onClick:function(){function w(){return l("vend",{target:L.key})}return w}(),content:L.price})},L.key)})})})})]})})]})})})}return k}()},31876:function(I,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],S=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],y={average:[.25,.5],bad:[.5,1/0]},p=function(b,B){for(var L=[],w=0;w0?b.filter(function(B){return!!B}).reduce(function(B,L){return(0,e.createFragment)([B,(0,e.createComponentVNode)(2,o.Box,{children:L},L)],0)},null):null},c=function(b){if(b>100){if(b<300)return"mild infection";if(b<400)return"mild infection+";if(b<500)return"mild infection++";if(b<700)return"acute infection";if(b<800)return"acute infection+";if(b<900)return"acute infection++";if(b>=900)return"septic"}return""},m=r.BodyScanner=function(){function N(b,B){var L=(0,t.useBackend)(B),w=L.data,T=w.occupied,A=w.occupant,x=A===void 0?{}:A,E=T?(0,e.createComponentVNode)(2,i,{occupant:x}):(0,e.createComponentVNode)(2,h);return(0,e.createComponentVNode)(2,f.Window,{width:690,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:E})})}return N}(),i=function(b){var B=b.occupant;return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,d,{occupant:B}),(0,e.createComponentVNode)(2,u,{occupant:B}),(0,e.createComponentVNode)(2,s,{occupant:B}),(0,e.createComponentVNode)(2,g,{organs:B.extOrgan}),(0,e.createComponentVNode)(2,C,{organs:B.intOrgan})]})},d=function(b,B){var L=(0,t.useBackend)(B),w=L.act,T=L.data,A=T.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"print",onClick:function(){function x(){return w("print_p")}return x}(),children:"Print Report"}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",onClick:function(){function x(){return w("ejectify")}return x}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:A.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:A.maxHealth,value:A.health/A.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:V[A.stat][0],children:V[A.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(A.bodyTempC,0)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(A.bodyTempF,0)}),"\xB0F"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Implants",children:A.implant_len?(0,e.createComponentVNode)(2,o.Box,{children:A.implant.map(function(x){return x.name}).join(", ")}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"None"})})]})})},u=function(b){var B=b.occupant;return B.hasBorer||B.blind||B.colourblind||B.nearsighted||B.hasVirus?(0,e.createComponentVNode)(2,o.Section,{title:"Abnormalities",children:k.map(function(L,w){if(B[L[0]])return(0,e.createComponentVNode)(2,o.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,o.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No abnormalities found."})})},s=function(b){var B=b.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,o.Table,{children:p(S,function(L,w,T){return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,v,{value:B[L[1]],marginBottom:T100)&&"average"||!!B.status.robotic&&"label",width:"33%",children:B.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",q:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:B.maxHealth,mt:L>0&&"0.5rem",value:B.totalLoss/B.maxHealth,ranges:y,children:[(0,e.createComponentVNode)(2,o.Box,{float:"left",inline:!0,children:[!!B.bruteLoss&&(0,e.createComponentVNode)(2,o.Tooltip,{position:"top",content:"Brute damage",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"bone"}),(0,a.round)(B.bruteLoss,0),"\xA0"]})}),!!B.fireLoss&&(0,e.createComponentVNode)(2,o.Tooltip,{position:"top",content:"Burn damage",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"fire"}),(0,a.round)(B.fireLoss,0)]})})]}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,a.round)(B.totalLoss,0)})]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",inline:!0,children:l([!!B.internalBleeding&&"Internal bleeding",!!B.burnWound&&"Critical tissue burns",!!B.lungRuptured&&"Ruptured lung",!!B.status.broken&&B.status.broken,c(B.germ_level),!!B.open&&"Open incision"])}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[l([!!B.status.splinted&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Splinted"}),!!B.status.robotic&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Robotic"}),!!B.status.dead&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",bold:!0,children:"DEAD"})]),l(B.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},C=function(b){return b.organs.length===0?(0,e.createComponentVNode)(2,o.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,o.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",children:"Injuries"})]}),b.organs.map(function(B,L){return(0,e.createComponentVNode)(2,o.Table.Row,{textTransform:"capitalize",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{color:!!B.dead&&"bad"||B.germ_level>100&&"average"||B.robotic>0&&"label",width:"33%",children:B.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:B.maxHealth,value:B.damage/B.maxHealth,mt:L>0&&"0.5rem",ranges:y,children:(0,a.round)(B.damage,0)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",inline:!0,children:l([c(B.germ_level)])}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:l([B.robotic===1&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Robotic"}),B.robotic===2&&(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Assisted"}),!!B.dead&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},h=function(){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},73440:function(I,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=n(92462),k=r.BookBinder=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.selectedbook,d=m.book_categories,u=[];return d.map(function(s){return u[s.description]=s.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function s(){return c("print_book")}return s}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.title,onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_title")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.author,onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_author")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:d.map(function(s){return s.description}),onSelected:function(){function s(v){return c("toggle_binder_category",{category_id:u[v]})}return s}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function s(){return(0,f.modalOpen)(p,"edit_selected_summary")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:i.summary})]}),(0,e.createVNode)(1,"br"),d.filter(function(s){return i.categories.includes(s.category_id)}).map(function(s){return(0,e.createComponentVNode)(2,t.Button,{content:s.description,selected:!0,icon:"unlink",onClick:function(){function v(){return c("toggle_binder_category",{category_id:s.category_id})}return v}()},s.category_id)})]})})]})})})]})}return S}()},40730:function(I,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotClean=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.locked,i=c.noaccess,d=c.maintpanel,u=c.on,s=c.autopatrol,v=c.canhack,g=c.emagged,C=c.remote_disabled,h=c.painame,N=c.cleanblood;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:310,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:i,onClick:function(){function b(){return l("blood")}return b}()})}),h&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:h,disabled:i,onClick:function(){function b(){return l("ejectpai")}return b}()})})]})})}return k}()},36078:function(I,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotFloor=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.noaccess,i=c.painame,d=c.hullplating,u=c.replace,s=c.eat,v=c.make,g=c.fixfloor,C=c.nag_empty,h=c.magnet,N=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",disabled:m,onClick:function(){function b(){return l("autotile")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Replace floor tiles",disabled:m,onClick:function(){function b(){return l("replacetiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function b(){return l("fixfloors")}return b}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Finds tiles",disabled:m,onClick:function(){function b(){return l("eattiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function b(){return l("maketiles")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Transmit notice when empty",disabled:m,onClick:function(){function b(){return l("nagonempty")}return b}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Traction Magnets",disabled:m,onClick:function(){function b(){return l("anchored")}return b}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function b(){return l("ejectpai")}return b}()})})]})})}return k}()},89121:function(I,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotHonk=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.BotStatus)})})}return k}()},39805:function(I,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotMed=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.locked,i=c.noaccess,d=c.maintpanel,u=c.on,s=c.autopatrol,v=c.canhack,g=c.emagged,C=c.remote_disabled,h=c.painame,N=c.shut_up,b=c.declare_crit,B=c.stationary_mode,L=c.heal_threshold,w=c.injection_amount,T=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:i,onClick:function(){function E(){return l("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:b,disabled:i,onClick:function(){function E(){return l("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,disabled:i,onChange:function(){function E(P,R){return l("set_heal_threshold",{target:R})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:w.value,minValue:w.min,maxValue:w.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:i,onChange:function(){function E(P,R){return l("set_injection_amount",{target:R})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:T?"Beaker":"Internal Synthesizer",icon:T?"flask":"cogs",disabled:i,onClick:function(){function E(){return l("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:i,onClick:function(){function E(){return l("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:i,onClick:function(){function E(){return l("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:B,disabled:i,onClick:function(){function E(){return l("toggle_stationary_mode")}return E}()})]}),h&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:h,disabled:i,onClick:function(){function E(){return l("ejectpai")}return E}()})})]})})})}return k}()},35519:function(I,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(86041),V=r.BotSecurity=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.noaccess,i=c.painame,d=c.check_id,u=c.check_weapons,s=c.check_warrant,v=c.arrest_mode,g=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:m,onClick:function(){function C(){return l("authid")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unauthorized Weapons",disabled:m,onClick:function(){function C(){return l("authweapon")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Wanted Criminals",disabled:m,onClick:function(){function C(){return l("authwarrant")}return C}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function C(){return l("arrtype")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:g,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function C(){return l("arrdeclare")}return C}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function C(){return l("ejectpai")}return C}()})})]})})}return k}()},71169:function(I,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(28823),a=n(84947),t=n(2971),o=n(91819),f=function(y,p){var l=y.cell,c=(0,o.useBackend)(p),m=c.act,i=l.cell_id,d=l.occupant,u=l.crimes,s=l.brigged_by,v=l.time_left_seconds,g=l.time_set_seconds,C=l.ref,h="";v>0&&(h+=" BrigCells__listRow--active");var N=function(){m("release",{ref:C})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:h,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:g})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},V=function(y){var p=y.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),p.map(function(l){return(0,e.createComponentVNode)(2,f,{cell:l},l.ref)})]})},k=r.BrigCells=function(){function S(y,p){var l=(0,o.useBackend)(p),c=l.act,m=l.data,i=m.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V,{cells:i})})})})})}return S}()},19070:function(I,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.BrigTimer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.occupant}):l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:l.occupant}));var c="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(c="exclamation-triangle"));var m=[],i=0;for(i=0;im?this.substring(0,m)+"...":this};var y=function(i,d){var u,s;if(!d)return[];var v=i.findIndex(function(g){return g.name===d.name});return[(u=i[v-1])==null?void 0:u.name,(s=i[v+1])==null?void 0:s.name]},p=function(i,d){d===void 0&&(d="");var u=(0,f.createSearch)(d,function(s){return s.name});return(0,t.flow)([(0,a.filter)(function(s){return s==null?void 0:s.name}),d&&(0,a.filter)(u),(0,a.sortBy)(function(s){return s.name})])(i)},l=r.CameraConsole=function(){function m(i,d){var u=(0,V.useBackend)(d),s=u.act,v=u.data,g=u.config,C=v.mapRef,h=v.activeCamera,N=p(v.cameras),b=y(N,h),B=b[0],L=b[1];return(0,e.createComponentVNode)(2,S.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),h&&h.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!B,onClick:function(){function w(){return s("switch_camera",{name:B})}return w}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!L,onClick:function(){function w(){return s("switch_camera",{name:L})}return w}()})],4),(0,e.createComponentVNode)(2,k.ByondUi,{className:"CameraConsole__map",params:{id:C,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(i,d){var u=(0,V.useBackend)(d),s=u.act,v=u.data,g=(0,V.useLocalState)(d,"searchText",""),C=g[0],h=g[1],N=v.activeCamera,b=p(v.cameras,C);return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function B(L,w){return h(w)}return B}()})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,scrollable:!0,children:b.map(function(B){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",N&&B.name===N.name&&"Button--selected"]),B.name.trimLongStr(23),0,{title:B.name,onClick:function(){function L(){return s("switch_camera",{name:B.name})}return L}()},B.name)})})})]})}return m}()},64487:function(I,r,n){"use strict";r.__esModule=!0,r.CameraConsoleOldContent=r.CameraConsoleMapContent=r.CameraConsole220=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(66586),f=n(37843),V=n(91819),k=n(2971),S=n(84947),y=function(d,u){var s,v;if(!u)return[];var g=d.findIndex(function(C){return C.name===u.name});return[(s=d[g-1])==null?void 0:s.name,(v=d[g+1])==null?void 0:v.name]},p=function(d,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(v){return v.name});return(0,t.flow)([(0,a.filter)(function(v){return v==null?void 0:v.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(v){return v.name})])(d)},l=r.CameraConsole220=function(){function i(d,u){var s=(0,V.useLocalState)(u,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,S.Window,{width:1170,height:755,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{children:(0,e.createComponentVNode)(2,k.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{width:v===1?"222px":"475px",textAlign:"center",children:(0,e.createComponentVNode)(2,k.Tabs,{fluid:!0,ml:v===1?1:0,mt:v===1?1:0,children:[(0,e.createComponentVNode)(2,k.Tabs.Tab,{selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:[(0,e.createComponentVNode)(2,k.Icon,{name:"map-marked-alt"})," \u041A\u0430\u0440\u0442\u0430"]},"Map"),(0,e.createComponentVNode)(2,k.Tabs.Tab,{selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:[(0,e.createComponentVNode)(2,k.Icon,{name:"table"})," \u0421\u043F\u0438\u0441\u043E\u043A"]},"List")]})}),C(v)]})})})})}return i}(),c=r.CameraConsoleMapContent=function(){function i(d,u){var s=(0,V.useBackend)(u),v=s.act,g=s.data,C=s.config,h=p(g.cameras),N=(0,V.useLocalState)(u,"zoom",1),b=N[0],B=N[1],L=g.mapRef,w=g.activeCamera,T=g.stationLevel,A=y(h,w),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,style:{display:"flex"},children:[(0,e.createComponentVNode)(2,k.Stack.Item,{height:"100%",style:{display:"flex",flex:"0 0 475px"},children:(0,e.createComponentVNode)(2,k.NanoMap,{onZoom:function(){function P(R){return B(R)}return P}(),children:h.filter(function(P){return P.z===T}).map(function(P){return(0,e.createComponentVNode)(2,k.NanoMap.NanoButton,{activeCamera:w,x:P.x,y:P.y,context:u,zoom:b,icon:"circle",tooltip:P.name,name:P.name,color:"blue",status:P.status},P.ref)})})}),(0,e.createComponentVNode)(2,k.Stack.Item,{height:"100%",resizable:!0,className:"CameraConsole__right_map",children:[(0,e.createVNode)(1,"div","CameraConsole__header",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),w&&w.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!x,onClick:function(){function P(){return v("switch_camera",{name:x})}return P}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!E,onClick:function(){function P(){return v("switch_camera",{name:E})}return P}()})],4)],4),(0,e.createComponentVNode)(2,k.ByondUi,{resizable:!0,className:"CameraConsole__map",overflow:"hidden",params:{id:L,type:"map"}})]})]})}return i}(),m=r.CameraConsoleOldContent=function(){function i(d,u){var s=(0,V.useBackend)(u),v=s.act,g=s.data,C=s.config,h=g.mapRef,N=g.activeCamera,b=(0,V.useLocalState)(u,"searchText",""),B=b[0],L=b[1],w=p(g.cameras,B),T=y(w,N),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,k.Stack.Item,{children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.Stack.Item,{children:(0,e.createComponentVNode)(2,k.Input,{width:"215px",placeholder:"\u041D\u0430\u0439\u0442\u0438 \u043A\u0430\u043C\u0435\u0440\u0443",onInput:function(){function E(P,R){return L(R)}return E}()})}),(0,e.createComponentVNode)(2,k.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k.Section,{fill:!0,scrollable:!0,children:w.map(function(E){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid",E.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",N&&E.name===N.name&&"Button--selected"]),E.name,0,{title:E.name,onClick:function(){function P(){return v("switch_camera",{name:E.name})}return P}()},E.name)})})})]})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"\u041A\u0430\u043C\u0435\u0440\u0430: ",16),N&&N.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-left",disabled:!A,onClick:function(){function E(){return v("switch_camera",{name:A})}return E}()}),(0,e.createComponentVNode)(2,k.Button,{icon:"chevron-right",disabled:!x,onClick:function(){function E(){return v("switch_camera",{name:x})}return E}()})],4),(0,e.createComponentVNode)(2,k.ByondUi,{className:"CameraConsole__map",params:{id:h,type:"map"}})],4)]})}return i}()},21348:function(I,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(48300),V=n(84947),k=r.Canister=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.portConnected,d=m.tankPressure,u=m.releasePressure,s=m.defaultReleasePressure,v=m.minReleasePressure,g=m.maxReleasePressure,C=m.valveOpen,h=m.name,N=m.canLabel,b=m.colorContainer,B=m.color_index,L=m.hasHoldingTank,w=m.holdingTank,T="";B.prim&&(T=b.prim.options[B.prim].name);var A="";B.sec&&(A=b.sec.options[B.sec].name);var x="";B.ter&&(x=b.ter.options[B.ter].name);var E="";B.quart&&(E=b.quart.options[B.quart].name);var P=[],R=[],M=[],D=[],j=0;for(j=0;jh.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:h.total_positions-h.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:s.cooldown_time||!h.can_close,onClick:function(){function N(){return u("make_job_unavailable",{job:h.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:s.cooldown_time||!h.can_open,onClick:function(){function N(){return u("make_job_available",{job:h.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:s.priority_jobs.indexOf(h.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:h.is_priority?"Yes":"No",selected:h.is_priority,disabled:s.cooldown_time||!h.can_prioritize,onClick:function(){function N(){return u("prioritize_job",{job:h.title})}return N}()})})]},h.title)})]})})]}):C=(0,e.createComponentVNode)(2,S);break;case 2:!s.authenticated||!s.scan_name?C=(0,e.createComponentVNode)(2,S):s.modify_name?C=(0,e.createComponentVNode)(2,f.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(){function h(N){return u("set",{access:N})}return h}(),grantAll:function(){function h(){return u("grant_all")}return h}(),denyAll:function(){function h(){return u("clear_all")}return h}(),grantDep:function(){function h(N){return u("grant_region",{region:N})}return h}(),denyDep:function(){function h(N){return u("deny_region",{region:N})}return h}()}):C=(0,e.createComponentVNode)(2,y);break;case 3:s.authenticated?s.records.length?C=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||s.records.length===0||s.target_dept,onClick:function(){function h(){return u("wipe_all_logs")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.reason}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.deletedby})]},h.timestamp)})]}),!!s.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||s.records.length===0,onClick:function(){function h(){return u("wipe_my_logs")}return h}()})})]}):C=(0,e.createComponentVNode)(2,p):C=(0,e.createComponentVNode)(2,S);break;case 4:!s.authenticated||!s.scan_name?C=(0,e.createComponentVNode)(2,S):C=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:h.buttontext,disabled:!h.demotable,onClick:function(){function N(){return u("remote_demote",{remote_demote:h.name})}return N}()})})]},h.title)})]})});break;default:C=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:g}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:C})]})})})}return c}()},62486:function(I,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(28823),a=n(90955),t=n(72026),o=n(91819),f=n(2971),V=n(84947),k=n(37843),S=r.CargoConsole=function(){function d(u,s){return(0,e.createComponentVNode)(2,V.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return d}(),y=function(u,s){var v=(0,o.useLocalState)(s,"contentsModal",null),g=v[0],C=v[1],h=(0,o.useLocalState)(s,"contentsModalTitle",null),N=h[0],b=h[1];if(g!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:g.map(function(B){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",B]},B)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function B(){C(null),b(null)}return B}()})})]})},p=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.is_public,N=C.timeleft,b=C.moving,B=C.at_station,L,w;return!b&&!B?(L="Docked off-station",w="Call Shuttle"):!b&&B?(L="Docked at the station",w="Return Shuttle"):b&&(w="In Transit...",N!==1?L="Shuttle is en route (ETA: "+N+" minutes)":L="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:L}),h===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:w,disabled:b,onClick:function(){function T(){return g("moveShuttle")}return T}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function T(){return g("showMessages")}return T}()})]})]})})})},l=function(u,s){var v,g=(0,o.useBackend)(s),C=g.act,h=g.data,N=h.accounts,b=(0,o.useLocalState)(s,"selectedAccount"),B=b[0],L=b[1],w=[];return N.map(function(T){return w[T.name]=T.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(T){return T.name}),selected:(v=N.filter(function(T){return T.account_UID===B})[0])==null?void 0:v.name,onSelected:function(){function T(A){return L(w[A])}return T}()}),N.filter(function(T){return T.account_UID===B}).map(function(T){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:T.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:T.balance})})]},T.account_UID)})]})})},c=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.categories,N=C.supply_packs,b=(0,o.useSharedState)(s,"category","Emergency"),B=b[0],L=b[1],w=(0,o.useSharedState)(s,"search_text",""),T=w[0],A=w[1],x=(0,o.useLocalState)(s,"contentsModal",null),E=x[0],P=x[1],R=(0,o.useLocalState)(s,"contentsModalTitle",null),M=R[0],D=R[1],j=(0,k.createSearch)(T,function(z){return z.name}),F=(0,o.useLocalState)(s,"selectedAccount"),W=F[0],K=F[1],_=(0,a.flow)([(0,t.filter)(function(z){return z.cat===h.filter(function(Y){return Y.name===B})[0].category||T}),T&&(0,t.filter)(j),(0,t.sortBy)(function(z){return z.name.toLowerCase()})])(N),$="Crate Catalogue";return T?$="Results for '"+T+"':":B&&($="Browsing "+B),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:$,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:h.map(function(z){return z.name}),selected:B,onSelected:function(){function z(Y){return L(Y)}return z}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function z(Y,Z){return A(Z)}return z}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:_.map(function(z){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[z.name," (",z.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!W,onClick:function(){function Y(){return g("order",{crate:z.ref,multiple:!1,account:W})}return Y}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!W,onClick:function(){function Y(){return g("order",{crate:z.ref,multiple:!0,account:W})}return Y}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function Y(){P(z.contents),D(z.name)}return Y}()})]})]},z.name)})})})]})})},m=function(u,s){var v=u.request,g,C;switch(v.department){case"Engineering":C="CE",g="orange";break;case"Medical":C="CMO",g="teal";break;case"Science":C="RD",g="purple";break;case"Supply":C="CT",g="brown";break;case"Service":C="HOP",g="olive";break;case"Security":C="HOS",g="red";break;case"Command":C="CAP",g="blue";break;case"Assistant":C="Any Head",g="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!v.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!v.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:g,content:C,disabled:v.req_cargo_approval,icon:"user-tie",tooltip:v.req_cargo_approval?"This Order first requires approval from the QM before the "+C+" can approve it":"This Order requires approval from the "+C+" still"})})]})},i=function(u,s){var v=(0,o.useBackend)(s),g=v.act,C=v.data,h=C.requests,N=C.orders,b=C.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:h.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.Box,{children:["Order #",B.ordernum,": ",B.supply_type," (",B.cost," credits) for"," ",(0,e.createVNode)(1,"b",null,B.orderedby,0)," with"," ",B.department?"The "+B.department+" Department":"Their Personal"," ","Account"]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]}),(0,e.createComponentVNode)(2,m,{request:B})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!B.can_approve,onClick:function(){function L(){return g("approve",{ordernum:B.ordernum})}return L}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!B.can_deny,onClick:function(){function L(){return g("deny",{ordernum:B.ordernum})}return L}()})]})]},B.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",B.ordernum,": ",B.supply_type," for ",(0,e.createVNode)(1,"b",null,B.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]})]})},B.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:b.map(function(B){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",B.ordernum,": ",B.supply_type," for ",(0,e.createVNode)(1,"b",null,B.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",B.comment]})]})},B.ordernum)})})]})}},86885:function(I,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ChangelogView=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=(0,a.useLocalState)(S,"onlyRecent",0),m=c[0],i=c[1],d=l.cl_data,u=l.last_cl,s={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},v=function(){function g(C){return C in s?s[C]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return g}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function g(){return i(!m)}return g}()}),children:d.map(function(g){return!m&&g.merge_ts<=u||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:g.author+" - Merged on "+g.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+g.num,onClick:function(){function C(){return p("open_pr",{pr_number:g.num})}return C}()}),children:g.entries.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[v(C.etype)," ",C.etext]},C)})},g)})})})})}return V}()},56975:function(I,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(83326),f=n(84947),V=[1,5,10,20,30,50],k=[1,5,10],S=r.ChemDispenser=function(){function c(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+v.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l)]})})})}return c}(),y=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.amount,g=s.energy,C=s.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[g," / ",C," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:V.map(function(h,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===h,content:h,onClick:function(){function b(){return u("amount",{amount:h})}return b}()})},N)})})})]})})})},p=function(m,i){for(var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.chemicals,g=v===void 0?[]:v,C=[],h=0;h<(g.length+1)%3;h++)C.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:s.glass?"Drink Dispenser":"Chemical Dispenser",children:[g.map(function(N,b){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function B(){return u("dispense",{reagent:N.id})}return B}()},b)}),C.map(function(N,b){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},b)})]})})},l=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.isBeakerLoaded,g=s.beakerCurrentVolume,C=s.beakerMaxVolume,h=s.beakerContents,N=h===void 0?[]:h;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:s.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[g," / ",C," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function b(){return u("ejectBeaker")}return b}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:N,buttons:function(){function b(B){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function L(){return u("remove",{reagent:B.id,amount:-1})}return L}()}),k.map(function(L,w){return(0,e.createComponentVNode)(2,t.Button,{content:L,onClick:function(){function T(){return u("remove",{reagent:B.id,amount:L})}return T}()},w)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function L(){return u("remove",{reagent:B.id,amount:B.volume})}return L}()})],0)}return b}()})})})}},48734:function(I,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(83326),V=n(84947),k=r.ChemHeater=function(){function p(l,c){return(0,e.createComponentVNode)(2,V.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),S=function(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.targetTemp,s=d.targetTempReached,v=d.autoEject,g=d.isActive,C=d.currentTemp,h=d.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function N(){return i("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:g?"On":"Off",icon:"power-off",selected:g,disabled:!h,onClick:function(){function N(){return i("toggle_on")}return N}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(u,0),minValue:0,maxValue:1e3,onDrag:function(){function N(b,B){return i("adjust_temperature",{target:B})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:C,format:function(){function N(b){return(0,a.toFixed)(b)+" K"}return N}()})||"\u2014"})]})})})},y=function(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.isBeakerLoaded,s=d.beakerCurrentVolume,v=d.beakerMaxVolume,g=d.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!u&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[s," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function C(){return i("eject_beaker")}return C}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:u,beakerContents:g})})})}},35918:function(I,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(83326),V=n(22677),k=n(66586),S=n(50175),y=["icon"];function p(x,E){if(x==null)return{};var P={},R=Object.keys(x),M,D;for(D=0;D=0)&&(P[M]=x[M]);return P}function l(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,c(x,E)}function c(x,E){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(){function P(R,M){return R.__proto__=M,R}return P}(),c(x,E)}var m=(0,S.createLogger)("ChemMaster"),i=[1,5,10],d=function(E,P){var R=(0,a.useBackend)(P),M=R.act,D=R.data,j=E.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:D.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:j.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(j.desc||"").length>0?j.desc:"N/A"}),j.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:j.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:j.blood_dna})],4),!D.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:D.printing?"spinner":"print",disabled:D.printing,iconSpin:!!D.printing,ml:"0.5rem",content:"Print",onClick:function(){function F(){return M("print",{idx:j.idx,beaker:E.args.beaker})}return F}()})]})})})})},u=r.ChemMaster=function(){function x(E,P){var R=(0,a.useBackend)(P),M=R.data,D=M.condi,j=M.beaker,F=M.beaker_reagents,W=F===void 0?[]:F,K=M.buffer_reagents,_=K===void 0?[]:K,$=M.mode;return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s,{beaker:j,beakerReagents:W,bufferNonEmpty:_.length>0}),(0,e.createComponentVNode)(2,v,{mode:$,bufferReagents:_}),(0,e.createComponentVNode)(2,g,{isCondiment:D,bufferNonEmpty:_.length>0}),(0,e.createComponentVNode)(2,A)]})})]})}return x}(),s=function(E,P){var R=(0,a.useBackend)(P),M=R.act,D=E.beaker,j=E.beakerReagents,F=E.bufferNonEmpty;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:F?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!D,content:"Eject and Clear Buffer",onClick:function(){function W(){return M("eject")}return W}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!D,content:"Eject and Clear Buffer",onClick:function(){function W(){return M("eject")}return W}()}),children:D?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:j,buttons:function(){function W(K,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:F,buttons:function(){function W(K,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_1?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.oxy,inline:!0,children:x[0]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.toxin,inline:!0,children:x[2]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.brute,inline:!0,children:x[3]}),(0,e.createTextVNode)("\xA0|\xA0"),(0,e.createComponentVNode)(2,o.Box,{color:f.COLORS.damageType.burn,inline:!0,children:x[1]})],4):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Unknown"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:T}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:A}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button,{disabled:!N.podready,icon:"user-plus",content:"Clone",onClick:function(){function E(){return h("clone",{ref:B})}return E}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",content:"Delete",onClick:function(){function E(){return h("del_rec")}return E}()})]})]})})},p=r.CloningConsole=function(){function s(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.menu;return(0,V.modalRegisterBodyOverride)("view_rec",y),(0,e.createComponentVNode)(2,k.Window,{width:535,height:440,children:[(0,e.createComponentVNode)(2,V.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,e.createComponentVNode)(2,k.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,c)})})]})})]})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.menu;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:b===1,icon:"home",onClick:function(){function B(){return h("menu",{num:1})}return B}(),children:"Main"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:b===2,icon:"folder",onClick:function(){function B(){return h("menu",{num:2})}return B}(),children:"Records"})]})})},c=function(v,g){var C=(0,t.useBackend)(g),h=C.data,N=h.menu,b;return N===1?b=(0,e.createComponentVNode)(2,m):N===2&&(b=(0,e.createComponentVNode)(2,i)),b},m=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.loading,B=N.scantemp,L=N.occupant,w=N.locked,T=N.can_brainscan,A=N.scan_mode,x=N.numberofpods,E=N.pods,P=N.selected_pod,R=w&&!!L;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Scanner",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Scanner Lock:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L,selected:R,icon:R?"toggle-on":"toggle-off",content:R?"Engaged":"Disengaged",onClick:function(){function M(){return h("lock")}return M}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:R||!L,icon:"user-slash",content:"Eject Occupant",onClick:function(){function M(){return h("eject")}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:b?(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"spinner",spin:!0}),"\xA0 Scanning..."]}):(0,e.createComponentVNode)(2,o.Box,{color:B.color,children:B.text})}),!!T&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scan Mode",children:(0,e.createComponentVNode)(2,o.Button,{icon:A?"brain":"male",content:A?"Brain":"Body",onClick:function(){function M(){return h("toggle_mode")}return M}()})})]}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L||b,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){function M(){return h("scan")}return M}()})]}),(0,e.createComponentVNode)(2,o.Section,{title:"Pods",children:x?E.map(function(M,D){var j;return M.status==="cloning"?j=(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:M.progress/100,ranges:{good:[.75,1/0],average:[.25,.75],bad:[-1/0,.25]},mt:"0.5rem",children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:(0,a.round)(M.progress,0)+"%"})}):M.status==="mess"?j=(0,e.createComponentVNode)(2,o.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):j=(0,e.createComponentVNode)(2,o.Button,{selected:P===M.pod,icon:P===M.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){function F(){return h("selectpod",{ref:M.pod})}return F}()}),(0,e.createComponentVNode)(2,o.Box,{width:"64px",textAlign:"center",inline:!0,mr:"0.5rem",mt:1,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,S.resolveAsset)("pod_"+M.status+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["Pod #",D+1]}),(0,e.createComponentVNode)(2,o.Box,{bold:!0,mt:.75,color:M.biomass>=150?"good":"bad",inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:M.biomass>=150?"circle":"circle-o"}),"\xA0",M.biomass]}),j]},D)}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},i=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.records;return b.length?(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:b.map(function(B,L){return(0,e.createComponentVNode)(2,o.Button,{icon:"user",mb:"0.5rem",content:B.realname,onClick:function(){function w(){return h("view_rec",{ref:B.record})}return w}()},L)})}):(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No records found."]})})},d=function(v,g){var C,h=(0,t.useBackend)(g),N=h.act,b=h.data,B=b.temp;if(!(!B||!B.text||B.text.length<=0)){var L=(C={},C[B.style]=!0,C);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.NoticeBox,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",children:B.text}),(0,e.createComponentVNode)(2,o.Button,{icon:"times-circle",float:"right",onClick:function(){function w(){return N("cleartemp")}return w}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"both"})]})))}},u=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.scanner,B=N.numberofpods,L=N.autoallowed,w=N.autoprocess,T=N.disk;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Status",buttons:(0,e.createFragment)(!!L&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",children:"Auto-processing:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Enabled":"Disabled",onClick:function(){function A(){return h("autoprocess",{on:w?0:1})}return A}()})],4),0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanner",children:b?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Connected"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Not connected!"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pods",children:B?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[B," connected"]}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None connected!"})})]})})})}},14283:function(I,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ColourMatrixTester=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.colour_data,m=[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Modify Matrix",children:m.map(function(i){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:i.map(function(d){return(0,e.createFragment)([d.name,(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.NumberInput,{value:c[d.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(){function u(s,v){return p("setvalue",{idx:d.idx+1,value:v})}return u}()})],0,d.name)})},i)})})})})}return V}()},98577:function(I,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(u){switch(u){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,l);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,i);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},V=r.CommunicationsComputer=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),f(h)]})})})}return d}(),k=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.authenticated,N=C.noauthbutton,b=C.esc_section,B=C.esc_callable,L=C.esc_recallable,w=C.esc_status,T=C.authhead,A=C.is_ai,x=C.lastCallLoc,E=!1,P;return h?h===1?P="Command":h===2?P="Captain":h===3?P="CentComm Officer":h===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:h?"sign-out-alt":"id-card",selected:h,disabled:N,content:h?"Log Out ("+P+")":"Log In",onClick:function(){function R(){return g("auth")}return R}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!b&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!w&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:w}),!!B&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!T,onClick:function(){function R(){return g("callshuttle")}return R}()})}),!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!T||A,onClick:function(){function R(){return g("cancelshuttle")}return R}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},S=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin;return h?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,p)},y=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin,N=C.gamma_armory_location,b=C.admin_levels,B=C.authenticated,L=C.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:b,required_access:h,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!h,onClick:function(){function w(){return g("send_to_cc_announcement_page")}return w}()}),B===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!h,onClick:function(){function w(){return g("make_other_announcement")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!h,onClick:function(){function w(){return g("dispatch_ert")}return w}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:L,content:L?"ERT calling enabled":"ERT calling disabled",tooltip:L?"Command can request an ERT":"ERTs cannot be requested",disabled:!h,onClick:function(){function w(){return g("toggle_ert_allowed")}return w}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!h,onClick:function(){function w(){return g("send_nuke_codes")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!h,onClick:function(){function w(){return g("move_gamma_armory")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!h,onClick:function(){function w(){return g("view_econ")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!h,onClick:function(){function w(){return g("view_fax")}return w}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,p)})]})},p=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.msg_cooldown,N=C.emagged,b=C.cc_cooldown,B=C.security_level_color,L=C.str_security_level,w=C.levels,T=C.authcapt,A=C.authhead,x=C.messages,E="Make Priority Announcement";h>0&&(E+=" ("+h+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",R="Request Authentication Codes";return b>0&&(P+=" ("+b+"s)",R+=" ("+b+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:B,children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:w,required_access:T})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!T||h>0,onClick:function(){function M(){return g("announce")}return M}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!T||b>0,onClick:function(){function M(){return g("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!T,onClick:function(){function M(){return g("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!T||b>0,onClick:function(){function M(){return g("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:R,disabled:!T||b>0,onClick:function(){function M(){return g("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return g("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return g("messagelist")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Misc",children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!A,onClick:function(){function M(){return g("RestartNanoMob")}return M}()})})]})})})],4)},l=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.stat_display,N=C.authhead,b=C.current_message_title,B=h.presets.map(function(w){return(0,e.createComponentVNode)(2,t.Button,{content:w.label,selected:w.name===h.type,disabled:!N,onClick:function(){function T(){return g("setstat",{statdisp:w.name})}return T}()},w.name)}),L=h.alerts.map(function(w){return(0,e.createComponentVNode)(2,t.Button,{content:w.label,selected:w.alert===h.icon,disabled:!N,onClick:function(){function T(){return g("setstat",{statdisp:3,alert:w.alert})}return T}()},w.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function w(){return g("main")}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:h.line_1,disabled:!N,onClick:function(){function w(){return g("setmsg1")}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:h.line_2,disabled:!N,onClick:function(){function w(){return g("setmsg2")}return w}()})})]})})})},c=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.authhead,N=C.current_message_title,b=C.current_message,B=C.messages,L=C.security_level,w;if(N)w=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!h,onClick:function(){function A(){return g("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:b})})});else{var T=B.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!h||N===A.title,onClick:function(){function x(){return g("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!h,onClick:function(){function x(){return g("delmessage",{msgid:A.id})}return x}()})]},A.id)});w=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return g("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:T})})}return(0,e.createComponentVNode)(2,t.Box,{children:w})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=u.levels,N=u.required_access,b=u.use_confirm,B=C.security_level;return b?h.map(function(L){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function w(){return g("newalertlevel",{level:L.id})}return w}()},L.name)}):h.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{icon:L.icon,content:L.name,disabled:!N||L.id===B,tooltip:L.tooltip,onClick:function(){function w(){return g("newalertlevel",{level:L.id})}return w}()},L.name)})},i=function(u,s){var v=(0,a.useBackend)(s),g=v.act,C=v.data,h=C.is_admin,N=C.possible_cc_sounds;if(!h)return g("main");var b=(0,a.useLocalState)(s,"subtitle",""),B=b[0],L=b[1],w=(0,a.useLocalState)(s,"text",""),T=w[0],A=w[1],x=(0,a.useLocalState)(s,"classified",0),E=x[0],P=x[1],R=(0,a.useLocalState)(s,"beepsound","Beep"),M=R[0],D=R[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function j(){return g("main")}return j}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:B,onChange:function(){function j(F,W){return L(W)}return j}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:T,onChange:function(){function j(F,W){return A(W)}return j}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function j(){return g("make_cc_announcement",{subtitle:B,text:T,classified:E,beepsound:M})}return j}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:N,selected:M,onSelected:function(){function j(F){return D(F)}return j}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function j(){return g("test_sound",{sound:M})}return j}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function j(){return P(!E)}return j}()})})]})]})})}},70611:function(I,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.CompostBin=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.biomass,m=l.compost,i=l.biomass_capacity,d=l.compost_capacity,u=(0,a.useSharedState)(S,"vendAmount",1),s=u[0],v=u[1];return(0,e.createComponentVNode)(2,o.Window,{width:300,height:175,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:[(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:1,width:17,value:c,minValue:0,maxValue:i,ranges:{good:[i*.5,1/0],average:[i*.25,i*.5],bad:[-1/0,i*.25]},children:[c," / ",i," Units"]})})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:17,value:m,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[m," / ",d," Units"]})})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:s,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function g(C,h){return v(h)}return g}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:m<25*s,icon:"arrow-circle-down",onClick:function(){function g(){return p("create",{amount:s})}return g}()})})})]})})})}return V}()},73744:function(I,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(73712),V=n(84947);function k(g,C){g.prototype=Object.create(C.prototype),g.prototype.constructor=g,S(g,C)}function S(g,C){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(){function h(N,b){return N.__proto__=b,N}return h}(),S(g,C)}var y={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},p=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],l=r.Contractor=function(){function g(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L;B.unauthorized?L=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,s,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):B.load_animation_completed?L=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:B.page===1?(0,e.createComponentVNode)(2,i,{height:"100%"}):(0,e.createComponentVNode)(2,u,{height:"100%"})})],4):L=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,s,{height:"100%",allMessages:p,finishedTimeout:3e3,onFinished:function(){function x(){return b("complete_load_animation")}return x}()})});var w=(0,t.useLocalState)(h,"viewingPhoto",""),T=w[0],A=w[1];return(0,e.createComponentVNode)(2,V.Window,{theme:"syndicate",width:500,height:600,children:[T&&(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,V.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:L})})]})}return g}(),c=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.tc_available,w=B.tc_paid_out,T=B.completed_contracts,A=B.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},C,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[L," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:L<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return b("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[w," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:T})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},m=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},C,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function w(){return b("page",{page:1})}return w}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function w(){return b("page",{page:2})}return w}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},i=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.contracts,w=B.contract_active,T=B.can_extract,A=!!w&&L.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(h,"viewingPhoto",""),P=E[0],R=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!T||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,f.Countdown,{timeLeft:A.time_left,format:function(){function M(D,j){return" ("+j.substr(3)+")"}return M}()})],onClick:function(){function M(){return b("extract")}return M}()})},C,{children:L.slice().sort(function(M,D){return M.status===1?-1:D.status===1?1:M.status-D.status}).map(function(M){var D;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function j(){return R("target_photo_"+M.uid+".png")}return j}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!y[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:y[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:y[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function j(){return b("abort")}return j}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",d(M)]}),(D=M.difficulties)==null?void 0:D.map(function(j,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!w,content:j.name+" ("+j.reward+" TC)",onClick:function(){function W(){return b("activate",{uid:M.uid,difficulty:F+1})}return W}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},d=function(C){if(!(!C.objective||C.status>1)){var h=C.objective.locs.user_area_id,N=C.objective.locs.user_coords,b=C.objective.locs.target_area_id,B=C.objective.locs.target_coords,L=h===b;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:L?"dot-circle-o":"arrow-alt-circle-right-o",color:L?"green":"yellow",rotation:L?null:-(0,a.rad2deg)(Math.atan2(B[1]-N[1],B[0]-N[0])),lineHeight:L?null:"0.85",size:"1.5"})})}},u=function(C,h){var N=(0,t.useBackend)(h),b=N.act,B=N.data,L=B.rep,w=B.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},C,{children:w.map(function(T){return(0,e.createComponentVNode)(2,o.Section,{title:T.name,children:[T.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:L-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:T.stock===0?"bad":"good",ml:"0.5rem",children:[T.stock," in stock"]})]},T.uid)})})))},s=function(g){k(C,g);function C(N){var b;return b=g.call(this,N)||this,b.timer=null,b.state={currentIndex:0,currentDisplay:[]},b}var h=C.prototype;return h.tick=function(){function N(){var b=this.props,B=this.state;if(B.currentIndex<=b.allMessages.length){this.setState(function(w){return{currentIndex:w.currentIndex+1}});var L=B.currentDisplay;L.push(b.allMessages[B.currentIndex])}else clearTimeout(this.timer),setTimeout(b.onFinished,b.finishedTimeout)}return N}(),h.componentDidMount=function(){function N(){var b=this,B=this.props.linesPerSecond,L=B===void 0?2.5:B;this.timer=setInterval(function(){return b.tick()},1e3/L)}return N}(),h.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),h.render=function(){function N(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(b){return(0,e.createFragment)([b,(0,e.createVNode)(1,"br")],0,b)})})}return N}(),C}(e.Component),v=function(C,h){var N=(0,t.useLocalState)(h,"viewingPhoto",""),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:b}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function L(){return B("")}return L}()})]})}},57392:function(I,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ConveyorSwitch=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.slowFactor,m=l.oneWay,i=l.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:i>0?"forward":i<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function d(){return p("toggleOneWay")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function d(){return p("slowFactor",{value:c-5})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function d(){return p("slowFactor",{value:c-1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function d(u){return u+"x"}return d}(),onChange:function(){function d(u,s){return p("slowFactor",{value:s})}return d}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function d(){return p("slowFactor",{value:c+1})}return d}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function d(){return p("slowFactor",{value:c+5})}return d}()})," "]})]})})]})})})})}return V}()},91413:function(I,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(28823),a=n(72026),t=n(37843),o=n(91819),f=n(2971),V=n(99753),k=n(30381),S=n(84947),y=function(d,u){return d.dead?"Deceased":parseInt(d.health,10)<=u?"Critical":parseInt(d.stat,10)===1?"Unconscious":"Living"},p=function(d,u){return d.dead?"red":parseInt(d.health,10)<=u?"orange":parseInt(d.stat,10)===1?"blue":"green"},l=r.CrewMonitor=function(){function i(d,u){var s=(0,o.useBackend)(u),v=s.act,g=s.data,C=(0,o.useLocalState)(u,"tabIndex",0),h=C[0],N=C[1],b=function(){function B(L){switch(L){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"WE SHOULDN'T BE HERE!"}}return B}();return(0,e.createComponentVNode)(2,S.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:h===0,onClick:function(){function B(){return N(0)}return B}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"map-marked-alt",selected:h===1,onClick:function(){function B(){return N(1)}return B}(),children:"Map View"},"MapView")]})}),b(h)]})})})}return i}(),c=function(d,u){var s=(0,o.useBackend)(u),v=s.act,g=s.data,C=(0,a.sortBy)(function(A){return A.name})(g.crewmembers||[]),h=g.possible_levels,N=g.viewing_current_z_level,b=g.is_advanced,B=(0,o.useLocalState)(u,"search",""),L=B[0],w=B[1],T=(0,t.createSearch)(L,function(A){return A.name+"|"+A.assignment+"|"+A.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:b?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:h,selected:N,onSelected:function(){function A(x){return v("switch_level",{new_level:x})}return A}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),C.filter(T).map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{bold:!!A.is_command,children:[(0,e.createComponentVNode)(2,V.TableCell,{children:[A.name," (",A.assignment,")"]}),(0,e.createComponentVNode)(2,V.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:p(A,g.critThreshold),children:y(A,g.critThreshold)}),A.sensor_type>=2?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.oxy,children:A.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.toxin,children:A.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.burn,children:A.fire}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:k.COLORS.damageType.brute,children:A.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,V.TableCell,{children:A.sensor_type===3?g.isAI?(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"location-arrow",content:A.area+" ("+A.x+", "+A.y+")",onClick:function(){function x(){return v("track",{track:A.ref})}return x}()}):A.area+" ("+A.x+", "+A.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},A.name)})]})]})},m=function(d,u){var s=(0,o.useBackend)(u),v=s.data,g=(0,o.useLocalState)(u,"zoom",1),C=g[0],h=g[1];return(0,e.createComponentVNode)(2,f.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{onZoom:function(){function N(b){return h(b)}return N}(),children:v.crewmembers.filter(function(N){return N.sensor_type===3}).map(function(N){return(0,e.createComponentVNode)(2,f.NanoMap.Marker,{x:N.x,y:N.y,zoom:C,icon:"circle",tooltip:N.name+" ("+N.assignment+")",color:p(N,v.critThreshold)},N.ref)})})})}},55104:function(I,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],V=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],k=r.Cryo=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,S)})})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.isOperating,s=d.hasOccupant,v=d.occupant,g=v===void 0?[]:v,C=d.cellTemperature,h=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,B=d.auto_eject_healthy,L=d.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function w(){return i("ejectOccupant")}return w}(),disabled:!s,children:"Eject"}),children:s?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:g.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:g.health,max:g.maxHealth,value:g.health/g.maxHealth,color:g.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:g[w.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(g[w.type])})})},w.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function w(){return i("ejectBeaker")}return w}(),disabled:!N,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function w(){return i(u?"switchOff":"switchOn")}return w}(),selected:u,children:u?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:h,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:B?"toggle-on":"toggle-off",selected:B,onClick:function(){function w(){return i(B?"auto_eject_healthy_off":"auto_eject_healthy_on")}return w}(),children:B?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:L?"toggle-on":"toggle-off",selected:L,onClick:function(){function w(){return i(L?"auto_eject_dead_off":"auto_eject_dead_on")}return w}(),children:L?"On":"Off"})})]})})})],4)},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.isBeakerLoaded,s=d.beakerLabel,v=d.beakerVolume;return u?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!s&&"average",children:[s||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!v&&"bad",ml:1,children:v?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v,format:function(){function g(C){return Math.round(C)+" units remaining"}return g}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},1763:function(I,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(37843),V=r.CryopodConsole=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.account_name,d=m.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,k),!!d&&(0,e.createComponentVNode)(2,S)]})})}return y}(),k=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:i.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(d,u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:d.rank},u)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.frozen_items,u=function(v){var g=v.toString();return g.startsWith("the ")&&(g=g.slice(4,g.length)),(0,f.toTitleCase)(g)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:d.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:d.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u(s.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return m("one_item",{item:s.uid})}return v}()})},s)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function s(){return m("all_items")}return s}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},69055:function(I,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],S=[5,10,20,30,50],y=r.DNAModifier=function(){function h(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.irradiating,A=w.dnaBlockSize,x=w.occupant;b.dnaBlockSize=A,b.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return T&&(E=(0,e.createComponentVNode)(2,g,{duration:T})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)})]})})]})}return h}(),p=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.locked,A=w.hasOccupant,x=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:T,icon:T?"toggle-on":"toggle-off",content:T?"Engaged":"Disengaged",onClick:function(){function E(){return L("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||T,icon:"user-slash",content:"Eject",onClick:function(){function E(){return L("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V[x.stat][0],children:V[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),b.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w.occupant.uniqueEnzymes?w.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},l=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedMenuKey,A=w.hasOccupant,x=w.occupant;if(A){if(b.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return T==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)],4):T==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)],4):T==="buffer"?E=(0,e.createComponentVNode)(2,d):T==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:k.map(function(P,R){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:T===P[0],onClick:function(){function M(){return L("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},R)})}),E]})},c=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedUIBlock,A=w.selectedUISubBlock,x=w.selectedUITarget,E=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,C,{dnaString:E.uniqueIdentity,selectedBlock:T,selectedSubblock:A,blockSize:b.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(R){return R.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(R,M){return L("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return L("pulseUIRadiation")}return P}()})]})},m=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.selectedSEBlock,A=w.selectedSESubBlock,x=w.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,C,{dnaString:x.structuralEnzymes,selectedBlock:T,selectedSubblock:A,blockSize:b.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return L("pulseSERadiation")}return E}()})]})},i=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.radiationIntensity,A=w.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:T,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return L("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return L("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return L("pulseRadiation")}return x}()})]})},d=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.buffers,A=T.map(function(x,E){return(0,e.createComponentVNode)(2,u,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,s)})]})},u=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=N.id,A=N.name,x=N.buffer,E=w.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function R(){return L("bufferOption",{option:"clear",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function R(){return L("bufferOption",{option:"changeLabel",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!w.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function R(){return L("bufferOption",{option:"saveDisk",id:T})}return R}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveUI",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveUIAndUE",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"saveSE",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w.hasDisk||!w.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"loadDisk",id:T})}return R}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"createInjector",id:T})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"createInjector",id:T,block:1})}return R}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function R(){return L("bufferOption",{option:"transfer",id:T})}return R}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},s=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.hasDisk,A=w.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!T||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return L("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"Eject",onClick:function(){function x(){return L("ejectDisk")}return x}()})],4),children:T?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},v=function(N,b){var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=w.isBeakerLoaded,A=w.beakerVolume,x=w.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!T,icon:"eject",content:"Eject",onClick:function(){function E(){return L("ejectBeaker")}return E}()}),children:T?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[S.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function R(){return L("injectRejuvenators",{amount:E})}return R}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return L("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},g=function(N,b){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},C=function(N,b){for(var B=(0,a.useBackend)(b),L=B.act,w=B.data,T=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,R=T.split(""),M=0,D=[],j=function(){for(var K=F/E+1,_=[],$=function(){var Z=z+1;_.push((0,e.createComponentVNode)(2,t.Button,{selected:A===K&&x===Z,content:R[F+z],mb:"0",onClick:function(){function ie(){return L(P,{block:K,subblock:Z})}return ie}()}))},z=0;zs.spawnpoints?"red":"green",children:[s.total," total, versus ",s.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function N(){return u("dispatch_ert",{silent:C})}return N}()})})]})})})},p=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=s.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:v&&v.length?v.map(function(g){return(0,e.createComponentVNode)(2,t.Section,{title:g.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:g.sender_real_name,onClick:function(){function C(){return u("view_player_panel",{uid:g.sender_uid})}return C}(),tooltip:"View player panel"}),children:g.message},(0,f.decodeHtmlEntities)(g.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},l=function(m,i){var d=(0,a.useBackend)(i),u=d.act,s=d.data,v=(0,a.useLocalState)(i,"text",""),g=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:g,onChange:function(){function h(N,b){return C(b)}return h}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function h(){return u("deny_ert",{reason:g})}return h}()})]})})}},77877:function(I,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.EconomyManager=function(){function S(y,p){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:350,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,k)})]})}return S}(),k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"global"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"department_members"})}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function d(){return c("payroll_modification",{mod_type:"crew_member"})}return d}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function d(){return c("delay_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function d(){return c("set_payroll")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function d(){return c("accelerate_payroll")}return d}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},10707:function(I,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.Electropack=function(){function k(S,y){var p=(0,t.useBackend)(y),l=p.act,c=p.data,m=c.power,i=c.code,d=c.frequency,u=c.minFrequency,s=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:u/10,maxValue:s/10,value:d/10,format:function(){function v(g){return(0,a.toFixed)(g,1)}return v}(),width:"80px",onChange:function(){function v(g,C){return l("freq",{freq:C})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:i,width:"80px",onChange:function(){function v(g,C){return l("code",{code:C})}return v}()})})]})})})})}return k}()},85307:function(I,r,n){"use strict";r.__esModule=!0,r.EmotePanelContent=r.EmotePanel=void 0;var e=n(28823),a=n(91819),t=n(84947),o=n(2971),f=n(37843),V=r.EmotePanel=function(){function S(y,p){return(0,e.createComponentVNode)(2,t.Window,{width:500,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,k)})})})}return S}(),k=r.EmotePanelContent=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.emotes,d=(0,a.useLocalState)(p,"searchText",""),u=d[0],s=d[1],v=(0,a.useLocalState)(p,"filterVisible",""),g=v[0],C=v[1],h=(0,a.useLocalState)(p,"filterAudible",""),N=h[0],b=h[1],B=(0,a.useLocalState)(p,"filterSound",""),L=B[0],w=B[1],T=(0,a.useLocalState)(p,"filterHands",""),A=T[0],x=T[1],E=(0,a.useLocalState)(p,"filterTargettable",""),P=E[0],R=E[1],M=(0,a.useLocalState)(p,"useTarget",""),D=M[0],j=M[1],F=(0,e.createComponentVNode)(2,o.Input,{placeholder:"\u0418\u0441\u043A\u0430\u0442\u044C \u044D\u043C\u043E\u0446\u0438\u044E...",fluid:!0,onInput:function(){function W(K,_){return s(_)}return W}()});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Button,{icon:"eye",align:"center",tooltip:"\u0412\u0438\u0434\u0438\u043C\u044B\u0439",selected:g,onClick:function(){function W(){return C(!g)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",align:"center",tooltip:"\u0421\u043B\u044B\u0448\u0438\u043C\u044B\u0439",selected:N,onClick:function(){function W(){return b(!N)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"volume-up",align:"center",tooltip:"\u0417\u0432\u0443\u043A",selected:L,onClick:function(){function W(){return w(!L)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"hand-paper",align:"center",tooltip:"\u0420\u0443\u043A\u0438",selected:A,onClick:function(){function W(){return x(!A)}return W}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",height:"100%",align:"center",tooltip:"\u0426\u0435\u043B\u044C",selected:P,onClick:function(){function W(){return R(!P)}return W}()})]}),children:F})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:u.length>0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+u+'"':"\u0412\u0441\u0435 \u044D\u043C\u043E\u0446\u0438\u0438",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"crosshairs",selected:D,onClick:function(){function W(){return j(!D)}return W}(),children:"\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u0446\u0435\u043B\u044C"}),children:(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:i.filter(function(W){return W.key&&(u.length>0?W.key.toLowerCase().includes(u.toLowerCase())||W.name.toLowerCase().includes(u.toLowerCase()):!0)&&(g?W.visible:!0)&&(N?W.audible:!0)&&(L?W.sound:!0)&&(A?W.hands:!0)&&(P?W.targettable:!0)}).map(function(W){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function K(){return c("play_emote",{emote_key:W.key,useTarget:D})}return K}(),children:[W.visible?(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}):"",W.audible?(0,e.createComponentVNode)(2,o.Icon,{name:"comment"}):"",W.sound?(0,e.createComponentVNode)(2,o.Icon,{name:"volume-up"}):"",W.hands?(0,e.createComponentVNode)(2,o.Icon,{name:"hand-paper"}):"",W.targettable?(0,e.createComponentVNode)(2,o.Icon,{name:"crosshairs"}):"",W.name]},W.name)})})})})})],4)}return S}()},52640:function(I,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=n(90955),k=n(72026),S=r.EvolutionMenu=function(){function l(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,p)]})})})}return l}(),y=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.evo_points,v=u.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:s}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!v,content:"Readapt",icon:"sync",onClick:function(){function g(){return d("readapt")}return g}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},p=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.evo_points,v=u.ability_tabs,g=u.purchased_abilities,C=u.view_mode,h=(0,t.useLocalState)(m,"selectedTab",v[0]),N=h[0],b=h[1],B=(0,t.useLocalState)(m,"searchText",""),L=B[0],w=B[1],T=(0,t.useLocalState)(m,"ability_tabs",v[0].abilities),A=T[0],x=T[1],E=function(D,j){if(j===void 0&&(j=""),!D||D.length===0)return[];var F=(0,a.createSearch)(j,function(W){return W.name+"|"+W.description});return(0,V.flow)([(0,k.filter)(function(W){return W==null?void 0:W.name}),(0,k.filter)(F),(0,k.sortBy)(function(W){return W==null?void 0:W.name})])(D)},P=function(D){if(w(D),D==="")return x(N.abilities);x(E(v.map(function(j){return j.abilities}).flat(),D))},R=function(D){b(D),x(D.abilities),w("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(D,j){P(j)}return M}(),value:L}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"square-o":"check-square-o",selected:!C,content:"Compact",onClick:function(){function M(){return d("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"check-square-o":"square-o",selected:C,content:"Expanded",onClick:function(){function M(){return d("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:v.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===""&&N===M,onClick:function(){function D(){R(M)}return D}(),children:M.category},M)})}),A.map(function(M,D){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),g.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>s||g.includes(M.power_path),content:"Evolve",onClick:function(){function j(){return d("purchase",{power_path:M.power_path})}return j}()})})]}),!!C&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},D)})]})})}},70672:function(I,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(28823),a=n(66586),t=n(37843),o=n(91819),f=n(2971),V=n(73712),k=n(84947),S=["id","amount","lineDisplay","onClick"];function y(g,C){if(g==null)return{};var h={},N=Object.keys(g),b,B;for(B=0;B=0)&&(h[b]=g[b]);return h}var p=2e3,l={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function g(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.building;return(0,e.createComponentVNode)(2,k.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,k.Window.Content,{className:"Exofab",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)}),L&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,d)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,u)})]})})]})})})}return g}(),m=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.materials,w=B.capacity,T=Object.values(L).reduce(function(A,x){return A+x},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.Box,{color:"label",mt:"0.25rem",children:[(T/w*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(A){return(0,e.createComponentVNode)(2,s,{mt:-2,id:A,bold:A==="metal"||A==="glass",onClick:function(){function x(){return b("withdraw",{id:A})}return x}()},A)})})},i=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.curCategory,w=B.categories,T=B.designs,A=B.syncing,x=(0,o.useLocalState)(h,"searchText",""),E=x[0],P=x[1],R=(0,t.createSearch)(E,function(D){return D.name}),M=T.filter(R);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{className:"Exofab__dropdown",selected:L,options:w,onSelected:function(){function D(j){return b("category",{cat:j})}return D}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function D(){return b("queueall")}return D}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:A,iconSpin:A,icon:"sync-alt",content:A?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){function D(){return b("sync")}return D}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function D(j,F){return P(F)}return D}()}),M.map(function(D){return(0,e.createComponentVNode)(2,v,{design:D},D.id)}),M.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},d=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.building,w=B.buildStart,T=B.buildEnd,A=B.worldTime;return(0,e.createComponentVNode)(2,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:w,current:A,end:T,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",L,"\xA0(",(0,e.createComponentVNode)(2,V.Countdown,{current:A,timeLeft:T-A,format:function(){function x(E,P){return P.substr(3)}return x}()}),")"]})]})})})},u=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=B.queue,w=B.processingQueue,T=Object.entries(B.queueDeficit).filter(function(x){return x[1]<0}),A=L.reduce(function(x,E){return x+E.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:"Process",onClick:function(){function x(){return b("process")}return x}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:L.length===0,icon:"eraser",content:"Clear",onClick:function(){function x(){return b("unqueueall")}return x}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:L.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:L.map(function(x,E){return(0,e.createComponentVNode)(2,f.Box,{color:x.notEnough&&"bad",children:[E+1,". ",x.name,E>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function P(){return b("queueswap",{from:E+1,to:E})}return P}()}),E0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(A/10*1e3).toISOString().substr(14,5)})]}),Object.keys(T).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",T.map(function(x){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,s,{id:x[0],amount:-x[1],lineDisplay:!0})},x[0])})]})],0)})})},s=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=C.id,w=C.amount,T=C.lineDisplay,A=C.onClick,x=y(C,S),E=B.materials[L]||0,P=w||E;if(!(P<=0&&!(L==="metal"||L==="glass"))){var R=w&&w>E;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",T&&"Exofab__material--line"])},x,{children:T?(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:(0,a.classes)(["materials32x32",L])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:P.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:A,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",L])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:L}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[P.toLocaleString("en-US")," cm\xB3 (",Math.round(P/p*10)/10," ","sheets)"]})]})],4)})))}},v=function(C,h){var N=(0,o.useBackend)(h),b=N.act,B=N.data,L=C.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.Button,{disabled:L.notEnough||B.building,icon:"cog",content:L.name,onClick:function(){function w(){return b("build",{id:L.id})}return w}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"plus-circle",onClick:function(){function w(){return b("queue",{id:L.id})}return w}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(L.cost).map(function(w){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,s,{id:w[0],amount:w[1],lineDisplay:!0})},w[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),L.time>0?(0,e.createFragment)([L.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})}},25627:function(I,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),V=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),k=r.ExperimentConsole=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.open,d=m.feedback,u=m.occupant,s=m.occupant_name,v=m.occupant_status,g=function(){function h(){if(!u)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function B(){return f.get(v)}return B}(),b=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b.color,children:b.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(B){return(0,e.createComponentVNode)(2,t.Button,{icon:V.get(B).icon,content:V.get(B).label,onClick:function(){function L(){return c("experiment",{experiment_type:B})}return L}()},B)})})]})}return h}(),C=g();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!i,onClick:function(){function h(){return c("door")}return h}()}),children:C})]})})}return S}()},14172:function(I,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=0,V=1013,k=function(p){var l="good",c=80,m=95,i=110,d=120;return pi?l="average":p>d&&(l="bad"),l},S=r.ExternalAirlockController=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.chamber_pressure,u=i.exterior_status,s=i.interior_status,v=i.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:k(d),value:d,minValue:f,maxValue:V,children:[d," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function g(){return m("abort")}return g}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:v,onClick:function(){function g(){return m("cycle_ext")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function g(){return m("cycle_int")}return g}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:s==="open"?"red":v?"yellow":null,onClick:function(){function g(){return m("force_ext")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:s==="open"?"red":v?"yellow":null,onClick:function(){function g(){return m("force_int")}return g}()})]})]})]})})}return y}()},61893:function(I,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.FaxMachine=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return p("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){function c(){return p("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:l.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){function c(){return p("paper")}return c}()}),!!l.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return p("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){function c(){return p("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){function c(){return p("send")}return c}()})})]})})]})})}return V}()},80031:function(I,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.FilingCabinet=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=y.config,m=l.contents,i=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!m&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",i," is empty."]})}),!!m&&m.slice().map(function(d){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:d.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function u(){return p("retrieve",{index:d.index})}return u}()})})]},d)})]})})})})}return V}()},39552:function(I,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.image,i=S.isSelected,d=S.onSelect;return(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+m,style:{"border-style":i&&"solid"||"none","border-width":"2px","border-color":"orange",padding:i&&"2px"||"4px"},onClick:d})},V=r.FloorPainter=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.availableStyles,i=c.selectedStyle,d=c.selectedDir,u=c.directionsPreview,s=c.allStylesPreview;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function v(){return l("cycle_style",{offset:-1})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:m,selected:i,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(){function v(g){return l("select_style",{style:g})}return v}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function v(){return l("cycle_style",{offset:1})}return v}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{image:s[v],isSelected:i===v,onSelect:function(){function g(){return l("select_style",{style:v})}return g}()})},"{style}")})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:["north","","south"].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[v+"west",v,v+"east"].map(function(g){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:g===""?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{image:u[g],isSelected:g===d,onSelect:function(){function C(){return l("select_direction",{direction:g})}return C}()})},g)})},v)})})})})]})})})}return k}()},5090:function(I,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=function(i){return i?"("+i.join(", ")+")":"ERROR"},k=function(i,d){if(!(!i||!d)){if(i[2]!==d[2])return null;var u=Math.atan2(d[1]-i[1],d[0]-i[0]),s=Math.sqrt(Math.pow(d[1]-i[1],2)+Math.pow(d[0]-i[0],2));return{angle:(0,a.rad2deg)(u),distance:s}}},S=r.GPS=function(){function m(i,d){var u=(0,t.useBackend)(d),s=u.data,v=s.emped,g=s.active,C=s.area,h=s.position,N=s.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:v?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,y,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,p)}),g?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{area:C,position:h})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{title:"Saved Position",position:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,y)],0)})})})}return m}(),y=function(i,d){var u=i.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:u?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),u?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},p=function(i,d){var u=(0,t.useBackend)(d),s=u.act,v=u.data,g=v.active,C=v.tag,h=v.same_z,N=(0,t.useLocalState)(d,"newTag",C),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"On":"Off",onClick:function(){function L(){return s("toggle")}return L}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:C,onEnter:function(){function L(){return s("tag",{newtag:b})}return L}(),onInput:function(){function L(w,T){return B(T)}return L}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:C===b,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function L(){return s("tag",{newtag:b})}return L}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"compress":"expand",content:h?"Local Sector":"Global",onClick:function(){function L(){return s("same_z")}return L}()})})]})})},l=function(i,d){var u=i.title,s=i.area,v=i.position;return(0,e.createComponentVNode)(2,o.Section,{title:u||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[s&&(0,e.createFragment)([s,(0,e.createVNode)(1,"br")],0),V(v)]})})},c=function(i,d){var u=(0,t.useBackend)(d),s=u.data,v=s.position,g=s.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},i,{children:(0,e.createComponentVNode)(2,o.Table,{children:g.map(function(C){return Object.assign({},C,k(v,C.position))}).map(function(C,h){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:h%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:C.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:C.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:C.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(C.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:C.distance>0?"arrow-right":"circle",rotation:-C.angle}),"\xA0",Math.floor(C.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:V(C.position)})]},h)})})})))}},1055:function(I,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(22677),f=n(84947),V=r.GeneModder=function(){function i(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:500,height:650,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),g===0?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)]})})})}return i}(),k=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Insert Gene from Disk",disabled:!C||!C.can_insert||C.is_core,icon:"arrow-circle-down",onClick:function(){function h(){return v("insert")}return h}()}),children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})},S=function(d,u){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},y=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.has_seed,h=g.seed,N=g.has_disk,b=g.disk,B,L;return C?B=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+h.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:h.name,onClick:function(){function w(){return v("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return v("variant_name")}return w}()})]}):B=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return v("eject_seed")}return w}()})}),N?L=b.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,onClick:function(){function w(){return v("eject_disk")}return w}()})})})]})})},p=function(d,u){var s=(0,a.useBackend)(u),v=s.act,g=s.data,C=g.disk,h=g.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:h.map(function(N){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:N.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(C!=null&&C.can_extract),icon:"save",onClick:function(){function b(){return v("extract",{id:N.id})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Replace",disabled:!N.is_type||!C.can_insert,icon:"arrow-circle-down",onClick:function(){function b(){return v("replace",{id:N.id})}return b}()})})]},N)})},"Core Genes")},l=function(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.reagent_genes,C=v.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:g,do_we_show:C})},c=function(d,u){var s=(0,a.useBackend)(u),v=s.data,g=v.trait_genes,C=v.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:g,do_we_show:C})},m=function(d,u){var s=d.title,v=d.gene_set,g=d.do_we_show,C=(0,a.useBackend)(u),h=C.act,N=C.data,b=N.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:s,open:!0,children:g?v.map(function(B){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:B.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(b!=null&&b.can_extract),icon:"save",onClick:function(){function L(){return h("extract",{id:B.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return h("remove",{id:B.id})}return L}()})})]},B)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},s)}},14232:function(I,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(28823),a=n(2971),t=n(84947),o=n(692),f=r.GenericCrewManifest=function(){function V(k,S){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return V}()},86268:function(I,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GhostHudPanel=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.security,m=l.medical,i=l.diagnostic,d=l.radioactivity,u=l.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,V,{label:"Medical",type:"medical",is_active:m}),(0,e.createComponentVNode)(2,V,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,V,{label:"Diagnostic",type:"diagnostic",is_active:i}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,V,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,V,{label:"Antag HUD",is_active:u,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=S.label,m=S.type,i=m===void 0?null:m,d=S.is_active,u=S.act_on,s=u===void 0?"hud_on":u,v=S.act_off,g=v===void 0?"hud_off":v;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){function C(){return l(d?g:s,{hud_type:i})}return C}()})})]})}},8977:function(I,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GlandDispenser=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.glands,m=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:i.color,content:i.amount||"0",disabled:!i.amount,onClick:function(){function d(){return p("dispense",{gland_id:i.id})}return d}()},i.id)})})})})}return V}()},70309:function(I,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.GravityGen=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.charging_state,m=l.charge_count,i=l.breaker,d=l.ext_power,u=function(){function v(g){return g>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",g===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}return v}(),s=function(){function v(g){if(g>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return v}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[s(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"Online":"Offline",color:i?"green":"red",px:1.5,onClick:function(){function v(){return p("breaker")}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:d?"good":"bad",children:u(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return V}()},64769:function(I,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(14635),V=r.GuestPass=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function m(){return l("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return l("mode",{mode:1})}return m}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function m(){return l("scan")}return m}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("giv_name")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("reason")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function m(){return l("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return l("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(i){return l("access",{access:i})}return m}(),grantAll:function(){function m(){return l("grant_all")}return m}(),denyAll:function(){function m(){return l("clear_all")}return m}(),grantDep:function(){function m(i){return l("grant_region",{region:i})}return m}(),denyDep:function(){function m(i){return l("deny_region",{region:i})}return m}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function m(){return l("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},i)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return k}()},12219:function(I,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=[1,5,10,20,30,50],V=null,k=r.HandheldChemDispenser=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.amount,s=d.energy,v=d.maxEnergy,g=d.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:s,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[s," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(C,h){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:u===C,content:C,onClick:function(){function N(){return i("amount",{amount:C})}return N}()})},h)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"dispense"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"remove"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:g==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"isolate"})}return C}()})]})})]})})})},y=function(l,c){for(var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.chemicals,s=u===void 0?[]:u,v=d.current_reagent,g=[],C=0;C<(s.length+1)%3;C++)g.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d.glass?"Drink Selector":"Chemical Selector",children:[s.map(function(h,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===h.id,content:h.title,style:{"margin-left":"2px"},onClick:function(){function b(){return i("dispense",{reagent:h.id})}return b}()},N)}),g.map(function(h,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},53917:function(I,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.HealthSensor=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.on,d=m.user_health,u=m.minHealth,s=m.maxHealth,v=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:i?"On":"Off",color:i?null:"red",selected:i,onClick:function(){function g(){return c("scan_toggle")}return g}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:u,maxValue:s,value:v,format:function(){function g(C){return(0,a.toFixed)(C,1)}return g}(),width:"80px",onDrag:function(){function g(C,h){return c("alarm_health",{alarm_health:h})}return g}()})}),d!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),bold:d>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:d})})})]})})})})}return S}(),k=function(y){return y>50?"green":y>0?"orange":"red"}},93116:function(I,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Holodeck=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=(0,a.useLocalState)(y,"currentDeck",""),i=m[0],d=m[1],u=(0,a.useLocalState)(y,"showReload",!1),s=u[0],v=u[1],g=c.decks,C=c.ai_override,h=c.emagged,N=function(){function b(B){l("select_deck",{deck:B}),d(B),v(!0),setTimeout(function(){v(!1)},3e3)}return b}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[s&&(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",i]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[g.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:b,selected:b===i,onClick:function(){function B(){return N(b)}return B}()},b)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!C&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"Turn On":"Turn Off",color:h?"good":"bad",onClick:function(){function b(){return l("ai_override")}return b}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:h?"bad":"good",children:[h?"Off":"On",!!h&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function b(){return l("wildlifecarp")}return b}()})]})})]})]})})]})})]})}return k}(),V=function(S,y){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},77209:function(I,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.Instrument=function(){function l(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,p)]})})]})}return l}(),k=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.help;if(s)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen:"),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function v(){return d("help")}return v}()})]})})})},S=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.lines,v=u.playing,g=u.repeat,C=u.maxRepeats,h=u.tempo,N=u.minTempo,b=u.maxTempo,B=u.tickLag,L=u.volume,w=u.minVolume,T=u.maxVolume,A=u.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return d("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return d("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return d("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:v,disabled:s.length===0||g<0,icon:"play",content:"Play",onClick:function(){function x(){return d("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function x(){return d("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:C,value:g,stepPixelSize:59,onChange:function(){function x(E,P){return d("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:h>=b,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return d("tempo",{new:h+B})}return x}()}),(0,a.round)(600/h)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:h<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return d("tempo",{new:h-B})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:w,maxValue:T,value:L,stepPixelSize:6,onDrag:function(){function x(E,P){return d("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,y)]})},y=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.allowedInstrumentNames,v=u.instrumentLoaded,g=u.instrument,C=u.canNoteShift,h=u.noteShift,N=u.noteShiftMin,b=u.noteShiftMax,B=u.sustainMode,L=u.sustainLinearDuration,w=u.sustainExponentialDropoff,T=u.legacy,A=u.sustainDropoffVolume,x=u.sustainHeldNote,E,P;return B===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:L,step:.5,stepPixelSize:85,format:function(){function R(M){return(0,a.round)(M*100)/100+" seconds"}return R}(),onChange:function(){function R(M,D){return d("setlinearfalloff",{new:D/10})}return R}()})):B===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:w,step:.01,format:function(){function R(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return R}(),onChange:function(){function R(M,D){return d("setexpfalloff",{new:D})}return R}()})),s.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:T?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:s,selected:g,width:"50%",onSelected:function(){function R(M){return d("switchinstrument",{name:M})}return R}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!T&&C)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:b,value:h,stepPixelSize:2,format:function(){function R(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return R}(),onChange:function(){function R(M,D){return d("setnoteshift",{new:D})}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,onSelected:function(){function R(M){return d("setsustainmode",{new:M})}return R}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function R(M,D){return d("setdropoffvolume",{new:D})}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function R(){return d("togglesustainhold")}return R}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function R(){return d("reset")}return R}()})]})})})},p=function(c,m){var i=(0,t.useBackend)(m),d=i.act,u=i.data,s=u.playing,v=u.lines,g=u.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!g||s,icon:"plus",content:"Add Line",onClick:function(){function C(){return d("newline",{line:v.length+1})}return C}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!g,icon:g?"chevron-up":"chevron-down",onClick:function(){function C(){return d("edit")}return C}()})],4),children:!!g&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(C,h){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:h+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:s,icon:"pen",onClick:function(){function N(){return d("modifyline",{line:h+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:s,icon:"trash",onClick:function(){function N(){return d("deleteline",{line:h+1})}return N}()})],4),children:C},h)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},28847:function(I,r,n){"use strict";r.__esModule=!0,r.Jukebox=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(91819),f=n(2971),V=n(84947),k=r.Jukebox=function(){function p(l,c){var m=(0,o.useBackend)(c),i=m.act,d=m.data,u=d.active,s=d.looping,v=d.track_selected,g=d.volume,C=d.max_volume,h=d.songs,N=d.startTime,b=d.endTime,B=d.worldTime,L=d.need_coin,w=d.payment,T=d.advanced_admin,A=35,x=!w&&L&&!T,E=(0,t.flow)([(0,a.sortBy)(function(F){return F.name})])(h),P=h.find(function(F){return F.name===v}),R=E.length,M=P?E.findIndex(function(F){return F.name===P.name})+1:0,D=function(){function F(W){var K=Math.floor(W/60),_=W%60,$=String(K).padStart(2,"0")+":"+String(_).padStart(2,"0");return $}return F}(),j=(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[u?s?"\u221E":D(Math.round((B-N)/10)):s?"\u221E":D(P.length)," ","/ ",s?"\u221E":D(P.length)]});return(0,e.createComponentVNode)(2,V.Window,{width:350,height:435,title:"\u041C\u0443\u0437\u044B\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442",children:[x?(0,e.createComponentVNode)(2,y):null,(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"\u041F\u0440\u043E\u0438\u0433\u0440\u044B\u0432\u0430\u0442\u0435\u043B\u044C",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{bold:!0,maxWidth:"240px",children:P.name.length>A?(0,e.createVNode)(1,"marquee",null,P.name,0):P.name}),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,mt:1.5,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:u?"pause":"play",color:"transparent",content:u?"\u0421\u0442\u043E\u043F":"\u0421\u0442\u0430\u0440\u0442",selected:u,onClick:function(){function F(){return i("toggle")}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,f.Button.Checkbox,{fluid:!0,icon:"undo",content:"\u041F\u043E\u0432\u0442\u043E\u0440",disabled:u||L&&!T,tooltip:L&&!T?"\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440 \u0437\u0430 \u043C\u043E\u043D\u0435\u0442\u043A\u0443":null,checked:s,onClick:function(){function F(){return i("loop",{looping:!s})}return F}()})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:N,current:s?b:B,end:b,children:j})})]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{children:[u?(0,e.createComponentVNode)(2,S):null,(0,e.createComponentVNode)(2,f.Stack,{fill:!0,mb:1.5,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"fast-backward",onClick:function(){function F(){return i("set_volume",{volume:"min"})}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"undo",onClick:function(){function F(){return i("set_volume",{volume:"reset"})}return F}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:0,textAlign:"right",children:(0,e.createComponentVNode)(2,f.Button,{color:"transparent",icon:"fast-forward",onClick:function(){function F(){return i("set_volume",{volume:"max"})}return F}()})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"center",textColor:"label",children:[(0,e.createComponentVNode)(2,f.Knob,{size:2,color:g<=25?"green":g<=50?"":g<=75?"orange":"red",value:g,unit:"%",minValue:0,maxValue:C,step:1,stepPixelSize:5,onDrag:function(){function F(W,K){return i("set_volume",{volume:K})}return F}()}),"Volume"]})]})})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0442\u0440\u0435\u043A\u0438",buttons:(0,e.createComponentVNode)(2,f.Button,{bold:!0,icon:"random",color:"transparent",content:M+"/"+R,tooltip:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0442\u0440\u0435\u043A",tooltipPosition:"top-end",onClick:function(){function F(){var W=Math.floor(Math.random()*R),K=E[W];i("select_track",{track:K.name})}return F}()}),children:E.map(function(F){return(0,e.createComponentVNode)(2,f.Stack.Item,{mb:.5,textAlign:"left",children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,selected:P.name===F.name,color:"translucent",content:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:F.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:D(F.length)})]}),onClick:function(){function W(){i("select_track",{track:F.name})}return W}()})},F.name)})})})]})})]})}return p}(),S=function(){return(0,e.createComponentVNode)(2,f.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"music",size:"3",color:"gray",mb:1}),(0,e.createComponentVNode)(2,f.Box,{color:"label",bold:!0,children:"\u0418\u0433\u0440\u0430\u0435\u0442 \u043C\u0443\u0437\u044B\u043A\u0430"})]})},y=function(){return(0,e.createComponentVNode)(2,f.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"coins",size:"6",color:"gold",mr:1}),(0,e.createComponentVNode)(2,f.Box,{color:"label",bold:!0,mt:5,fontSize:2,children:"\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043C\u043E\u043D\u0435\u0442\u043A\u0443"})]})}},64261:function(I,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.KeycardAuth=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!l.swiping&&!l.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){function i(){return p("triggerevent",{triggerevent:"Red Alert"})}return i}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Emergency Response Team"})}return i}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return i}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return p("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return i}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!l.hasSwiped&&!l.ertreason&&l.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):l.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,l.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){function i(){return p("ert")}return i}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:l.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){function i(){return p("reset")}return i}()}),children:m})]})})}return V}()},34898:function(I,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48154),V=r.KitchenMachine=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=l.config,i=c.ingredients,d=c.operating,u=m.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:d,name:u}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:i.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:s.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[s.amount," ",s.units]}),2)]},s.name)})})})})]})})})}return S}(),k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.inactive,d=m.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:i,tooltip:i?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function u(){return c("cook")}return u}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:i,tooltip:i?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function u(){return c("eject")}return u}()})})]})})}},52564:function(I,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.LawManager=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.isAdmin,u=i.isSlaved,s=i.isMalf,v=i.isAIMalf,g=i.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:s?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(d&&u)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",u,"."]}),!!(s||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:g===0,onClick:function(){function C(){return m("set_view",{set_view:0})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:g===1,onClick:function(){function C(){return m("set_view",{set_view:1})}return C}()})]}),g===0&&(0,e.createComponentVNode)(2,V),g===1&&(0,e.createComponentVNode)(2,k)]})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,v=i.ion_laws,g=i.ion_law_nr,C=i.has_inherent_laws,h=i.inherent_laws,N=i.has_supplied_laws,b=i.supplied_laws,B=i.channels,L=i.channel,w=i.isMalf,T=i.isAdmin,A=i.zeroth_law,x=i.ion_law,E=i.inherent_law,P=i.supplied_law,R=i.supplied_law_position;return(0,e.createFragment)([!!d&&(0,e.createComponentVNode)(2,S,{title:"ERR_NULL_VALUE",laws:u,ctx:l}),!!s&&(0,e.createComponentVNode)(2,S,{title:g,laws:v,ctx:l}),!!C&&(0,e.createComponentVNode)(2,S,{title:"Inherent",laws:h,ctx:l}),!!N&&(0,e.createComponentVNode)(2,S,{title:"Supplied",laws:b,ctx:l}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:B.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===L,onClick:function(){function D(){return m("law_channel",{law_channel:M.channel})}return D}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return m("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return m("notify_laws")}return M}()})})]})}),!!w&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(T&&!d)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:R,onClick:function(){function M(){return m("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name+" - "+u.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function s(){return m("transfer_laws",{transfer_laws:u.ref})}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.laws.has_ion_laws>0&&u.laws.ion_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_zeroth_laws>0&&u.laws.zeroth_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_inherent_laws>0&&u.laws.inherent_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)}),u.laws.has_supplied_laws>0&&u.laws.inherent_laws.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.index,children:s.law},s.index)})]})},u.name)})})},S=function(p,l){var c=(0,a.useBackend)(p.ctx),m=c.act,i=c.data,d=i.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:p.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),p.laws.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:u.state?"Yes":"No",selected:u.state,onClick:function(){function s(){return m("state_law",{ref:u.ref,state_law:u.state?0:1})}return s}()}),!!d&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function s(){return m("edit_law",{edit_law:u.ref})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function s(){return m("delete_law",{delete_law:u.ref})}return s}()})],4)]})]},u.law)})]})})}},55499:function(I,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.LibraryComputer=function(){function g(C,h){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})]})}return g}(),k=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:L.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:L.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[L.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!L.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:L.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),w===L.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:L.isProgrammatic,onClick:function(){function T(){return b("delete_book",{bookid:L.id,user_ckey:w})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:L.isProgrammatic,onClick:function(){function T(){return(0,f.modalOpen)(h,"report_book",{bookid:L.id})}return T}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:L.isProgrammatic,onClick:function(){function T(){return(0,f.modalOpen)(h,"rate_info",{bookid:L.id})}return T}()})]})},S=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.selected_report,T=B.report_categories,A=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:T.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===w,onClick:function(){function P(){return b("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return b("submit_report",{bookid:L.id,user_ckey:A})}return x}()})]})},y=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.selected_rating,w=Array(10).fill().map(function(T,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[w.map(function(T,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:L>=T?"caution":"default",onClick:function(){function x(){return b("set_rating",{rating_value:T})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[L+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},p=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=C.args,w=B.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:L.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:L.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[L.current_rating?L.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:L.total_ratings?L.total_ratings:0})]}),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function T(){return b("rate_book",{bookid:L.id,user_ckey:w})}return T}()})]})},l=function(C,h){var N=(0,a.useBackend)(h),b=N.data,B=(0,a.useLocalState)(h,"tabIndex",0),L=B[0],w=B[1],T=b.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===0,onClick:function(){function A(){return w(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===1,onClick:function(){function A(){return w(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===2,onClick:function(){function A(){return w(2)}return A}(),children:"Upload Book"}),T===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===3,onClick:function(){function A(){return w(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:L===4,onClick:function(){function A(){return w(4)}return A}(),children:"Inventory"})]})})},c=function(C,h){var N=(0,a.useLocalState)(h,"tabIndex",0),b=N[0];switch(b){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,d);case 2:return(0,e.createComponentVNode)(2,u);case 3:return(0,e.createComponentVNode)(2,s);case 4:return(0,e.createComponentVNode)(2,v);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.searchcontent,w=B.book_categories,T=B.user_ckey,A=[];return w.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:L.title||"Input Title",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:L.author||"Input Author",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:L.ratingmin,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:L.ratingmax,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:w.map(function(x){return x.description}),onSelected:function(){function x(E){return b("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),w.filter(function(x){return L.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return b("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return b("clear_search")}return x}()}),L.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return b("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return b("find_users_books",{user_ckey:T})}return x}()})]})]})},i=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.external_booklist,w=B.archive_pagenumber,T=B.num_pages,A=B.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:w===1,onClick:function(){function x(){return b("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:w===1,onClick:function(){function x(){return b("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:w,onClick:function(){function x(){return(0,f.modalOpen)(h,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:w===T,onClick:function(){function x(){return b("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:w===T,onClick:function(){function x(){return b("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,m),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),L.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return b("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,f.modalOpen)(h,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},d=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.programmatic_booklist,w=B.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),L.map(function(T,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:T.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),T.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:T.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[w===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return b("order_programmatic_book",{bookid:T.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,f.modalOpen)(h,"expand_info",{bookid:T.id})}return x}()})]})]},A)})]})})},u=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.selectedbook,w=B.book_categories,T=B.user_ckey,A=[];return w.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:L.copyright,content:"Upload Book",onClick:function(){function x(){return b("uploadbook",{user_ckey:T})}return x}()}),children:[L.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:L.copyright,content:L.title,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:L.copyright,content:L.author,onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:w.map(function(x){return x.description}),onSelected:function(){function x(E){return b("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),w.filter(function(x){return L.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:L.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return b("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:L.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,f.modalOpen)(h,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:L.summary})]})})]})]})},s=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),L.map(function(w,T){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),w.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.timeleft>=0?w.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:w.timeleft>=0,onClick:function(){function A(){return b("reportlost",{libraryid:w.libraryid})}return A}()})})]},T)})]})})},v=function(C,h){var N=(0,a.useBackend)(h),b=N.act,B=N.data,L=B.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),L.map(function(w,T){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.checked_out?"Checked Out":"Available"})]},T)})]})})};(0,f.modalRegisterBodyOverride)("expand_info",k),(0,f.modalRegisterBodyOverride)("report_book",S),(0,f.modalRegisterBodyOverride)("rate_info",p)},92682:function(I,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(22677),V=r.LibraryManager=function(){function l(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,k)})]})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.pagestate;switch(s){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,p);case 3:return(0,e.createComponentVNode)(2,y);default:return"WE SHOULDN'T BE HERE!"}},S=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return s}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function s(){return(0,f.modalOpen)(m,"specify_ckey_search")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function s(){return d("view_reported_books")}return s}()})]})},y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function v(){return d("return")}return v}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),v.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function g(){return d("delete_book",{bookid:v.id})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function g(){return d("unflag_book",{bookid:v.id})}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function g(){return d("view_book",{bookid:v.id})}return g}()})]})]},v.id)})]})})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.ckey,v=u.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",s,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function g(){return d("return")}return g}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),v.map(function(g){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:g.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),g.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:g.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function C(){return d("delete_book",{bookid:g.id})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function C(){return d("view_book",{bookid:g.id})}return C}()})]})]},g.id)})]})})}},68e3:function(I,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(2971),f=n(91819),V=n(31068),k=n(84947),S=r.ListInputModal=function(){function l(c,m){var i=(0,f.useBackend)(m),d=i.act,u=i.data,s=u.items,v=s===void 0?[]:s,g=u.message,C=g===void 0?"":g,h=u.init_value,N=u.timeout,b=u.title,B=(0,f.useLocalState)(m,"selected",v.indexOf(h)),L=B[0],w=B[1],T=(0,f.useLocalState)(m,"searchBarVisible",v.length>10),A=T[0],x=T[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],R=E[1],M=function(){function z(Y){var Z=_.length-1;if(Y===V.KEY_DOWN)if(L===null||L===Z){var ie;w(0),(ie=document.getElementById("0"))==null||ie.scrollIntoView()}else{var ae;w(L+1),(ae=document.getElementById((L+1).toString()))==null||ae.scrollIntoView()}else if(Y===V.KEY_UP)if(L===null||L===0){var se;w(Z),(se=document.getElementById(Z.toString()))==null||se.scrollIntoView()}else{var he;w(L-1),(he=document.getElementById((L-1).toString()))==null||he.scrollIntoView()}}return z}(),D=function(){function z(Y){Y!==L&&w(Y)}return z}(),j=function(){function z(){x(!1),x(!0)}return z}(),F=function(){function z(Y){var Z=String.fromCharCode(Y),ie=v.find(function(he){return he==null?void 0:he.toLowerCase().startsWith(Z==null?void 0:Z.toLowerCase())});if(ie){var ae,se=v.indexOf(ie);w(se),(ae=document.getElementById(se.toString()))==null||ae.scrollIntoView()}}return z}(),W=function(){function z(Y){var Z;Y!==P&&(R(Y),w(0),(Z=document.getElementById("0"))==null||Z.scrollIntoView())}return z}(),K=function(){function z(){x(!A),R("")}return z}(),_=v.filter(function(z){return z==null?void 0:z.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(C.length/3);return A||setTimeout(function(){var z;return(z=document.getElementById(L.toString()))==null?void 0:z.focus()},1),(0,e.createComponentVNode)(2,k.Window,{title:b,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function z(Y){var Z=window.event?Y.which:Y.keyCode;(Z===V.KEY_DOWN||Z===V.KEY_UP)&&(Y.preventDefault(),M(Z)),Z===V.KEY_ENTER&&(Y.preventDefault(),d("submit",{entry:_[L]})),!A&&Z>=V.KEY_A&&Z<=V.KEY_Z&&(Y.preventDefault(),F(Z)),Z===V.KEY_ESCAPE&&(Y.preventDefault(),d("cancel"))}return z}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function z(){return K()}return z}()}),className:"ListInput__Section",fill:!0,title:C,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y,{filteredItems:_,onClick:D,onFocusSearch:j,searchBarVisible:A,selected:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,p,{filteredItems:_,onSearch:W,searchQuery:P,selected:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:_[L]})})]})})})]})}return l}(),y=function(c,m){var i=(0,f.useBackend)(m),d=i.act,u=c.filteredItems,s=c.onClick,v=c.onFocusSearch,g=c.searchBarVisible,C=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:u.map(function(h,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function b(){return s(N)}return b}(),onDblClick:function(){function b(B){B.preventDefault(),d("submit",{entry:u[C]})}return b}(),onKeyDown:function(){function b(B){var L=window.event?B.which:B.keyCode;g&&L>=V.KEY_A&&L<=V.KEY_Z&&(B.preventDefault(),v())}return b}(),selected:N===C,style:{animation:"none",transition:"none"},children:h.replace(/^\w/,function(b){return b.toUpperCase()})},N)})})},p=function(c,m){var i=(0,f.useBackend)(m),d=i.act,u=c.filteredItems,s=c.onSearch,v=c.searchQuery,g=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function C(h){h.preventDefault(),d("submit",{entry:u[g]})}return C}(),onInput:function(){function C(h,N){return s(N)}return C}(),placeholder:"Search...",value:v})}},75965:function(I,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function R(M,D){return P("configure",{key:T,value:D,ref:x})}return R}()})},V=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function R(){return P("configure",{key:T,value:!A,ref:x})}return R}()})},k=function(L,w){var T=L.name,A=L.value,x=L.module_ref,E=(0,a.useBackend)(w),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function R(){return P("configure",{key:T,ref:x})}return R}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},S=function(L,w){var T=L.name,A=L.value,x=L.values,E=L.module_ref,P=(0,a.useBackend)(w),R=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(D){return R("configure",{key:T,value:D,ref:E})}return M}()})},y=function(L,w){var T=L.name,A=L.display_name,x=L.type,E=L.value,P=L.values,R=L.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,Object.assign({},L))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,V,Object.assign({},L))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,k,Object.assign({},L))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,S,Object.assign({},L)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},p=function(L,w){var T=L.active,A=L.userradiated,x=L.usertoxins,E=L.usermaxtoxins,P=L.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:T&&A?"bad":"good",children:T&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:T&&P?"bad":"good",bold:!0,children:T&&P?P:0})})]})},l=function(L,w){var T=L.active,A=L.userhealth,x=L.usermaxhealth,E=L.userbrute,P=L.userburn,R=L.usertoxin,M=L.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?R/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?R:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?M:0})})})})]})],4)},c=function(L,w){var T=L.active,A=L.statustime,x=L.statusid,E=L.statushealth,P=L.statusmaxhealth,R=L.statusbrute,M=L.statusburn,D=L.statustoxin,j=L.statusoxy,F=L.statustemp,W=L.statusnutrition,K=L.statusfingerprints,_=L.statusdna,$=L.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:T?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:T?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?R:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:T?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:D})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:T?j/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:j})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:T?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:T?W:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:T?K:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:T?_:"???"})]})}),!!T&&!!$&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),$.map(function(z){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[z.stage,"/",z.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:z.cure})]},z.name)})]})})],0)},m={rad_counter:p,health_analyzer:l,status_readout:c},i=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},d=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},u=function(L,w){var T=L.configuration_data,A=L.module_ref,x=Object.keys(T);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=T[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:L.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},s=function(L){switch(L){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},v=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.malfunctioning,R=x.locked,M=x.open,D=x.selected_module,j=x.complexity,F=x.complexity_max,W=x.wearer_name,K=x.wearer_job,_=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function $(){return A("activate")}return $}()}),children:_}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:R?"lock-open":"lock",content:R?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:R?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[j," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[W,", ",K]})]})})},g=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.control,R=x.helmet,M=x.chestplate,D=x.gauntlets,j=x.boots,F=x.core,W=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:j||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:W/100,content:W+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},C=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.active,P=x.modules,R=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:R.length!==0&&R.map(function(M){var D=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,d),(0,e.normalizeProps)((0,e.createComponentVNode)(2,D,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},h=function(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.complexity_max,P=x.modules,R=(0,a.useLocalState)(w,"module_configuration",null),M=R[0],D=R[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(j){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:j.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===j.ref&&(0,e.createComponentVNode)(2,u,{configuration_data:j.configuration_data,module_ref:j.ref,onExit:function(){function F(){return D(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[j.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:j.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[j.cooldown>0&&j.cooldown/10||"0","/",j.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:j.ref})}return F}(),icon:"bullseye",selected:j.module_active,tooltip:s(j.module_type),tooltipPosition:"left",disabled:!j.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return D(j.ref)}return F}(),icon:"cog",selected:M===j.ref,tooltip:"Configure",tooltipPosition:"left",disabled:j.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:j.ref})}return F}(),icon:"thumbtack",selected:j.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!j.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:j.description})]})})},j.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=r.MODsuitContent=function(){function B(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,i)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,h)})]})})}return B}(),b=r.MODsuit=function(){function B(L,w){var T=(0,a.useBackend)(w),A=T.act,x=T.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,N)})})})}return B}()},86322:function(I,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=n(22677),k=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),S=r.MagnetController=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,d=i.autolink,u=i.code,s=i.frequency,v=i.linkedMagnets,g=i.magnetConfiguration,C=i.path,h=i.pathPosition,N=i.probing,b=i.powerState,B=i.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!d&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function L(){return m("probe_magnets")}return L}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(s/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:u})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:b?"power-off":"times",content:b?"On":"Off",selected:b,onClick:function(){function L(){return m("toggle_power")}return L}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:B.value,minValue:B.min,maxValue:B.max,onChange:function(){function L(w,T){return m("set_speed",{speed:T})}return L}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(k.entries()).map(function(L){var w=L[0],T=L[1],A=T.icon,x=T.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return m("path_add",{code:w})}return E}()},w)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function L(){return m("path_clear")}return L}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function L(){return(0,V.modalOpen)(l,"path_custom_input")}return L}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:C.map(function(L,w){var T=k.get(L)||{icon:"question"},A=T.icon,x=T.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:w+2===h,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:w+1,code:L})}return E}()},w)})})]})]})}),v.map(function(L,w){var T=L.uid,A=L.powerState,x=L.electricityLevel,E=L.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(w+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return m("toggle_magnet_power",{id:T})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:g.electricityLevel.min,maxValue:g.electricityLevel.max,onChange:function(){function P(R,M){return m("set_electricity_level",{id:T,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:g.magneticField.min,maxValue:g.magneticField.max,onChange:function(){function P(R,M){return m("set_magnetic_field",{id:T,magneticField:M})}return P}()})})]})},T)})]})]})}return y}()},54374:function(I,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.MechBayConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.recharge_port,m=c&&c.mech,i=m&&m.cell,d=m&&m.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:d?"Mech status: "+d:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function u(){return p("reconnect")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!i&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.charge/i.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.charge})," / "+i.maxcharge]})})]})})})})}return V}()},14823:function(I,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=n(37843),k=r.MechaControlConsole=function(){function S(y,p){var l=(0,t.useBackend)(p),c=l.act,m=l.data,i=m.beacons,d=m.stored_data;return d.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function u(){return c("clear_log")}return u}()}),children:d.map(function(u){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",u.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,V.decodeHtmlEntities)(u.message)})]},u.time)})})})}):(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:i.length&&i.map(function(u){return(0,e.createComponentVNode)(2,o.Section,{title:u.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function s(){return c("send_message",{mt:u.uid})}return s}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function s(){return c("get_log",{mt:u.uid})}return s}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function s(){return c("shock",{mt:u.uid})}return s}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[u.maxHealth*.75,1/0],average:[u.maxHealth*.5,u.maxHealth*.75],bad:[-1/0,u.maxHealth*.5]},value:u.health,maxValue:u.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:u.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[u.cellMaxCharge*.75,1/0],average:[u.cellMaxCharge*.5,u.cellMaxCharge*.75],bad:[-1/0,u.cellMaxCharge*.5]},value:u.cellCharge,maxValue:u.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[u.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:u.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,V.toTitleCase)(u.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:u.active||"None"}),u.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[u.cargoMax*.75,1/0],average:[u.cargoMax*.5,u.cargoMax*.75],good:[-1/0,u.cargoMax*.5]},value:u.cargoUsed,maxValue:u.cargoMax})})||null]})},u.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return S}()},16189:function(I,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(22677),V=n(84947),k=n(51185),S=n(69774),y=n(76519),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},l={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(w,T){(0,f.modalOpen)(w,"edit",{field:T.edit,value:T.value})},m=function(w,T){var A=w.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:A.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:A.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[A.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:A.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:A.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:p[A.severity],children:A.severity})]})})})},i=r.MedicalRecords=function(){function L(w,T){var A=(0,t.useBackend)(T),x=A.data,E=x.loginState,P=x.screen;if(!E.logged_in)return(0,e.createComponentVNode)(2,V.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});var R;return P===2?R=(0,e.createComponentVNode)(2,d):P===3?R=(0,e.createComponentVNode)(2,u):P===4?R=(0,e.createComponentVNode)(2,s):P===5?R=(0,e.createComponentVNode)(2,C):P===6&&(R=(0,e.createComponentVNode)(2,h)),(0,e.createComponentVNode)(2,V.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,y.TemporaryNotice),(0,e.createComponentVNode)(2,B),R]})})]})}return L}(),d=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.records,R=(0,t.useLocalState)(T,"searchText",""),M=R[0],D=R[1],j=(0,t.useLocalState)(T,"sortId","name"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"sortOrder",!0),_=K[0],$=K[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function z(){return x("screen",{screen:3})}return z}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function z(Y,Z){return D(Z)}return z}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,N,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,N,{id:"m_stat",children:"Mental Status"})]}),P.filter((0,a.createSearch)(M,function(z){return z.name+"|"+z.id+"|"+z.rank+"|"+z.p_stat+"|"+z.m_stat})).sort(function(z,Y){var Z=_?1:-1;return z[F].localeCompare(Y[F])*Z}).map(function(z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+l[z.p_stat],onClick:function(){function Y(){return x("view_record",{view_record:z.ref})}return Y}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.m_stat})]},z.id)})]})})})],4)},u=function(w,T){var A=(0,t.useBackend)(T),x=A.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,lineHeight:3,color:"translucent",icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,lineHeight:3,icon:"trash",color:"translucent",content:"Delete All Medical Records",onClick:function(){function E(){return x("del_all_med_records")}return E}()})})]})})},s=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medical,R=E.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function M(){return x("print_record")}return M}()}),children:(0,e.createComponentVNode)(2,v)})}),!P||!P.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function M(){return x("new_med_record")}return M}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!P.empty,content:"Delete Medical Record",onClick:function(){function M(){return x("del_med_record")}return M}()})})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(w,T){var A=(0,t.useBackend)(T),x=A.data,E=x.general;return!E||!E.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:E.fields.map(function(P,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:P.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:P.value}),!!P.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function M(){return c(T,P)}return M}()})]},R)})})}),!!E.has_photos&&E.photos.map(function(P,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:P,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},g=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,f.modalOpen)(T,"add_comment")}return R}()}),children:P.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):P.comments.map(function(R,M){return(0,e.createComponentVNode)(2,o.Box,{prewrap:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function D(){return x("del_comment",{del_comment:M+1})}return D}()})]},M)})})})},C=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.virus,R=(0,t.useLocalState)(T,"searchText",""),M=R[0],D=R[1],j=(0,t.useLocalState)(T,"sortId2","name"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"sortOrder2",!0),_=K[0],$=K[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function z(Y,Z){return D(Z)}return z}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,b,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,b,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,b,{id:"severity",children:"Severity"})]}),P.filter((0,a.createSearch)(M,function(z){return z.name+"|"+z.max_stages+"|"+z.severity})).sort(function(z,Y){var Z=_?1:-1;return z[F].localeCompare(Y[F])*Z}).map(function(z){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+z.severity,onClick:function(){function Y(){return x("vir",{vir:z.D})}return Y}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",z.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:z.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:p[z.severity],children:z.severity})]},z.id)})]})})})})],4)},h=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.medbots;return P.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),P.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},N=function(w,T){var A=(0,t.useLocalState)(T,"sortId","name"),x=A[0],E=A[1],P=(0,t.useLocalState)(T,"sortOrder",!0),R=P[0],M=P[1],D=w.id,j=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:x!==D&&"transparent",onClick:function(){function F(){x===D?M(!R):(E(D),M(!0))}return F}(),children:[j,x===D&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(w,T){var A=(0,t.useLocalState)(T,"sortId2","name"),x=A[0],E=A[1],P=(0,t.useLocalState)(T,"sortOrder2",!0),R=P[0],M=P[1],D=w.id,j=w.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:x!==D&&"transparent",onClick:function(){function F(){x===D?M(!R):(E(D),M(!0))}return F}(),children:[j,x===D&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},B=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.screen,R=E.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:P===2,onClick:function(){function M(){x("screen",{screen:2})}return M}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:P===5,onClick:function(){function M(){x("screen",{screen:5})}return M}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:P===6,onClick:function(){function M(){return x("screen",{screen:6})}return M}(),children:"Medibot Tracking"}),P===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:P===3,children:"Record Maintenance"}),P===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:P===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},44482:function(I,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=p.product,u=p.productImage,s=p.productCategory,v=i.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:d.price>v,icon:"shopping-cart",content:d.price,textAlign:"left",onClick:function(){function g(){return m("purchase",{name:d.name,category:s})}return g}()})})]})},V=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),d=i[0],u=m.products,s=m.imagelist,v=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:u[v[d]].map(function(g){return(0,e.createComponentVNode)(2,f,{product:g,productImage:s[g.path],productCategory:v[d]},g.name)})})},k=r.MerchVendor=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.user_cash,u=i.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,u,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function s(){return m("change")}return s}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives.",d!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[d||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,V)]})})]})})})}return y}(),S=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),d=i[0],u=i[1],s=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:d===1,onClick:function(){function v(){return u(1)}return v}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:d===2,onClick:function(){function v(){return u(2)}return v}(),children:"Decorations"})]})}},53551:function(I,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=["title","items"];function k(i,d){if(i==null)return{};var u={},s=Object.keys(i),v,g;for(g=0;g=0)&&(u[v]=i[v]);return u}var S={Alphabetical:function(){function i(d,u){return d-u}return i}(),Availability:function(){function i(d,u){return-(d.affordable-u.affordable)}return i}(),Price:function(){function i(d,u){return d.price-u.price}return i}()},y=r.MiningVendor=function(){function i(d,u){return(0,e.createComponentVNode)(2,f.Window,{width:400,height:455,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,p),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)]})})})}return i}(),p=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.has_id,h=g.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:C,children:C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",h.name,".",(0,e.createVNode)(1,"br"),"You have ",h.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return v("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},l=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.has_id,h=g.id,N=g.items,b=(0,t.useLocalState)(u,"search",""),B=b[0],L=b[1],w=(0,t.useLocalState)(u,"sort","Alphabetical"),T=w[0],A=w[1],x=(0,t.useLocalState)(u,"descending",!1),E=x[0],P=x[1],R=(0,a.createSearch)(B,function(j){return j[0]}),M=!1,D=Object.entries(N).map(function(j,F){var W=Object.entries(j[1]).filter(R).map(function(K){return K[1].affordable=C&&h.points>=K[1].price,K[1]}).sort(S[T]);if(W.length!==0)return E&&(W=W.reverse()),M=!0,(0,e.createComponentVNode)(2,m,{title:j[0],items:W},j[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:M?D:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(d,u){var s=(0,t.useLocalState)(u,"search",""),v=s[0],g=s[1],C=(0,t.useLocalState)(u,"sort",""),h=C[0],N=C[1],b=(0,t.useLocalState)(u,"descending",!1),B=b[0],L=b[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function w(T,A){return g(A)}return w}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(S),width:"100%",onSelected:function(){function w(T){return N(T)}return w}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:B?"arrow-down":"arrow-up",height:"21px",tooltip:B?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function w(){return L(!B)}return w}()})})]})})},m=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=d.title,h=d.items,N=k(d,V);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:C},N,{children:h.map(function(b){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:b.name}),(0,e.createComponentVNode)(2,o.Button,{disabled:!g.has_id||g.id.points0?'\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 "'+d+'"':"\u0412\u0441\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 - "+m.length,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:m.filter(function(v){return v.name&&(d.length>0?v.name.toLowerCase().includes(d.toLowerCase())||v.desc.toLowerCase().includes(d.toLowerCase())||v.author.toLowerCase().includes(d.toLowerCase()):!0)}).map(function(v){return(0,e.createComponentVNode)(2,o.Collapsible,{title:v.name,children:[(0,e.createComponentVNode)(2,o.Section,{title:"\u0410\u0432\u0442\u043E\u0440\u044B",children:v.author}),(0,e.createComponentVNode)(2,o.Section,{title:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",children:v.desc})]},v.name)})})})})})],4)}return k}()},61100:function(I,r,n){"use strict";r.__esModule=!0,r.NTRecruiter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.NTRecruiter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.gamestatus,m=l.cand_name,i=l.cand_gender,d=l.cand_age,u=l.cand_species,s=l.cand_planet,v=l.cand_job,g=l.cand_records,C=l.cand_curriculum,h=l.total_curriculums,N=l.reason;if(c===0)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,e.createComponentVNode)(2,t.Stack.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){function b(){return p("start_game")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){function b(){return p("instructions")}return b}()})]})]})})});if(c===1)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,color:"grey",title:"Guide",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Main Menu",onClick:function(){function b(){return p("back_to_menu")}return b}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss"," ",(0,e.createVNode)(1,"b",null,h,0)," candidates, one wrongly made choice leads to a game over."]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"3#",color:"silver",children:[(0,e.createVNode)(1,"b",null,"Unique",16)," characters may appear, pay attention to them!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,e.createVNode)(1,"b",null,"company morals",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,e.createVNode)(1,"b",null,"typos",16)," and ",(0,e.createVNode)(1,"b",null,"missing words",16),", these do make for bad applications!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for ",(0,e.createVNode)(1,"b",null,"jobs",16)," that they"," ",(0,e.createVNode)(1,"b",null,"don't offer",16),"!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,e.createVNode)(1,"b",null,"naming schemes",16),", no company wants a Vox named Joe!"]})]})})})})});if(c===2)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",C]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",color:"silver",children:(0,e.createVNode)(1,"b",null,m,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",color:"silver",children:(0,e.createVNode)(1,"b",null,i,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",color:"silver",children:(0,e.createVNode)(1,"b",null,d,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",color:"silver",children:(0,e.createVNode)(1,"b",null,u,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Planet of Origin",color:"silver",children:(0,e.createVNode)(1,"b",null,s,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requested Job",color:"silver",children:(0,e.createVNode)(1,"b",null,v,0)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Employment Records",color:"silver",children:(0,e.createVNode)(1,"b",null,g,0)})]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){function b(){return p("dismiss")}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){function b(){return p("hire")}return b}()})})]})})})]})})});if(c===3)return(0,e.createComponentVNode)(2,o.Window,{width:400,height:550,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{pt:"40%",fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"15px",color:"label",textAlign:"center",children:N}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",C-1,"/",h]})]})}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{lineHeight:2,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){function b(){return p("back_to_menu")}return b}()})})]})})})}return V}()},6802:function(I,r,n){"use strict";r.__esModule=!0,r.Newscaster=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(30381),V=n(84947),k=n(22677),S=n(76519),y=["icon","iconSpin","selected","security","onClick","title","children"],p=["name"];function l(L,w){if(L==null)return{};var T={},A=Object.keys(L),x,E;for(E=0;E=0)&&(T[x]=L[x]);return T}var c=128,m=["security","engineering","medical","science","service","supply"],i={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}},d=r.Newscaster=function(){function L(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.is_security,R=E.is_admin,M=E.is_silent,D=E.is_printing,j=E.screen,F=E.channels,W=E.channel_idx,K=W===void 0?-1:W,_=(0,t.useLocalState)(T,"menuOpen",!1),$=_[0],z=_[1],Y=(0,t.useLocalState)(T,"viewingPhoto",""),Z=Y[0],ie=Y[1],ae=(0,t.useLocalState)(T,"censorMode",!1),se=ae[0],he=ae[1],ye;j===0||j===2?ye=(0,e.createComponentVNode)(2,s):j===1&&(ye=(0,e.createComponentVNode)(2,v));var Le=F.reduce(function(pe,oe){return pe+oe.unread},0);return(0,e.createComponentVNode)(2,V.Window,{theme:P&&"security",width:800,height:600,children:[Z?(0,e.createComponentVNode)(2,h):(0,e.createComponentVNode)(2,k.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,e.createComponentVNode)(2,V.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Section,{fill:!0,className:(0,a.classes)(["Newscaster__menu",$&&"Newscaster__menu--open"]),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,u,{icon:"bars",title:"Toggle Menu",onClick:function(){function pe(){return z(!$)}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:"newspaper",title:"Headlines",selected:j===0,onClick:function(){function pe(){return x("headlines")}return pe}(),children:Le>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:Le>=10?"9+":Le})}),(0,e.createComponentVNode)(2,u,{icon:"briefcase",title:"Job Openings",selected:j===1,onClick:function(){function pe(){return x("jobs")}return pe}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(pe){return(0,e.createComponentVNode)(2,u,{icon:pe.icon,title:pe.name,selected:j===2&&F[K-1]===pe,onClick:function(){function oe(){return x("channel",{uid:pe.uid})}return oe}(),children:pe.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:pe.unread>=10?"9+":pe.unread})},pe)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!R)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,u,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function pe(){return(0,k.modalOpen)(T,"wanted_notice")}return pe}()}),(0,e.createComponentVNode)(2,u,{security:!0,icon:se?"minus-square":"minus-square-o",title:"Censor Mode: "+(se?"On":"Off"),mb:"0.5rem",onClick:function(){function pe(){return he(!se)}return pe}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,u,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function pe(){return(0,k.modalOpen)(T,"create_story")}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:"plus-circle",title:"New Channel",onClick:function(){function pe(){return(0,k.modalOpen)(T,"create_channel")}return pe}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,u,{icon:D?"spinner":"print",iconSpin:D,title:D?"Printing...":"Print Newspaper",onClick:function(){function pe(){return x("print_newspaper")}return pe}()}),(0,e.createComponentVNode)(2,u,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function pe(){return x("toggle_mute")}return pe}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,S.TemporaryNotice),ye]})]})})]})}return L}(),u=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=w.icon,P=E===void 0?"":E,R=w.iconSpin,M=w.selected,D=M===void 0?!1:M,j=w.security,F=j===void 0?!1:j,W=w.onClick,K=w.title,_=w.children,$=l(w,y);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",D&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:W},$,{children:[D&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:R,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:K}),_]})))},s=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.screen,R=E.is_admin,M=E.channel_idx,D=E.channel_can_manage,j=E.channels,F=E.stories,W=E.wanted,K=(0,t.useLocalState)(T,"fullStories",[]),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"censorMode",!1),Y=z[0],Z=z[1],ie=P===2&&M>-1?j[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!W&&(0,e.createComponentVNode)(2,g,{story:W,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:ie?ie.icon:"newspaper",mr:"0.5rem"}),ie?ie.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ae){return!_.includes(ae.uid)&&ae.body.length+3>c?Object.assign({},ae,{body_short:ae.body.substr(0,c-4)+"..."}):ae}).map(function(ae,se){return(0,e.createComponentVNode)(2,g,{story:ae},se)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!ie&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([Y&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!ie.admin&&!R,selected:ie.censored,icon:ie.censored?"comment-slash":"comment",content:ie.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ae(){return x("censor_channel",{uid:ie.uid})}return ae}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!D,icon:"cog",content:"Manage",onClick:function(){function ae(){return(0,k.modalOpen)(T,"manage_channel",{uid:ie.uid})}return ae}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:ie.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:ie.author||"N/A"}),!!R&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:ie.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:ie.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ae,se){return ae+se.view_count},0).toLocaleString()]})]})})]})},v=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.jobs,R=E.wanted,M=Object.entries(P).reduce(function(D,j){var F=j[0],W=j[1];return D+W.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!R&&(0,e.createComponentVNode)(2,g,{story:R,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?m.map(function(D){return Object.assign({},i[D],{id:D,jobs:P[D]})}).filter(function(D){return!!D&&D.jobs.length>0}).map(function(D){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+D.id]),title:D.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:D.fluff_text}),children:D.jobs.map(function(j){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!j.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",j.title]},j.title)})},D.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},g=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=w.story,R=w.wanted,M=R===void 0?!1:R,D=E.is_admin,j=(0,t.useLocalState)(T,"fullStories",[]),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"censorMode",!1),_=K[0],$=K[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&_&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function z(){return x("censor_story",{uid:P.uid})}return z}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!D&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("|\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,f.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,C,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(z,Y){return(0,e.createComponentVNode)(2,o.Box,{children:z||(0,e.createVNode)(1,"br")},Y)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function z(){return W([].concat(F,[P.uid]))}return z}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},C=function(w,T){var A=w.name,x=l(w,p),E=(0,t.useLocalState)(T,"viewingPhoto",""),P=E[0],R=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return R(A)}return M}()},x)))},h=function(w,T){var A=(0,t.useLocalState)(T,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},N=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=!!w.args.uid&&E.channels.filter(function(q){return q.uid===w.args.uid}).pop();if(w.id==="manage_channel"&&!P){(0,k.modalClose)(T);return}var R=w.id==="manage_channel",M=!!w.args.is_admin,D=w.args.scanned_user,j=(0,t.useLocalState)(T,"author",(P==null?void 0:P.author)||D||"Unknown"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"name",(P==null?void 0:P.name)||""),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"description",(P==null?void 0:P.description)||""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"icon",(P==null?void 0:P.icon)||"newspaper"),ae=ie[0],se=ie[1],he=(0,t.useLocalState)(T,"isPublic",R?!!(P!=null&&P.public):!1),ye=he[0],Le=he[1],pe=(0,t.useLocalState)(T,"adminLocked",(P==null?void 0:P.admin)===1||!1),oe=pe[0],Q=pe[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:R?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function q(ue,me){return W(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:_,onInput:function(){function q(ue,me){return $(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:Y,onInput:function(){function q(ue,me){return Z(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ae,width:"35%",mr:"0.5rem",onInput:function(){function q(ue,me){return se(me)}return q}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ae,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:ye,icon:ye?"toggle-on":"toggle-off",content:ye?"Yes":"No",onClick:function(){function q(){return Le(!ye)}return q}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return Q(!oe)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||_.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,k.modalAnswer)(T,w.id,"",{author:F,name:_.substr(0,49),description:Y.substr(0,128),icon:ae,public:ye?1:0,admin_locked:oe?1:0})}return q}()})]})},b=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.photo,R=E.channels,M=E.channel_idx,D=M===void 0?-1:M,j=!!w.args.is_admin,F=w.args.scanned_user,W=R.slice().sort(function(q,ue){if(D<0)return 0;var me=R[D-1];if(me.uid===q.uid)return-1;if(me.uid===ue.uid)return 1}).filter(function(q){return j||!q.frozen&&(q.author===F||!!q.public)}),K=(0,t.useLocalState)(T,"author",F||"Unknown"),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"channel",W.length>0?W[0].name:""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"title",""),ae=ie[0],se=ie[1],he=(0,t.useLocalState)(T,"body",""),ye=he[0],Le=he[1],pe=(0,t.useLocalState)(T,"adminLocked",!1),oe=pe[0],Q=pe[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!j,width:"100%",value:_,onInput:function(){function q(ue,me){return $(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:Y,options:W.map(function(q){return q.name}),mb:"0",width:"100%",onSelected:function(){function q(ue){return Z(ue)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ae,onInput:function(){function q(ue,me){return se(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:ye,onInput:function(){function q(ue,me){return Le(me)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function q(){return x(P?"eject_photo":"attach_photo")}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ae,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,C,{name:"inserted_photo_"+P.uid+".png",float:"right"}),ye.split("\n").map(function(q,ue){return(0,e.createComponentVNode)(2,o.Box,{children:q||(0,e.createVNode)(1,"br")},ue)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),j&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:oe,icon:oe?"lock":"lock-open",content:oe?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return Q(!oe)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:_.trim().length===0||Y.trim().length===0||ae.trim().length===0||ye.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,k.modalAnswer)(T,"create_story","",{author:_,channel:Y,title:ae.substr(0,127),body:ye.substr(0,1023),admin_locked:oe?1:0})}return q}()})]})},B=function(w,T){var A=(0,t.useBackend)(T),x=A.act,E=A.data,P=E.photo,R=E.wanted,M=!!w.args.is_admin,D=w.args.scanned_user,j=(0,t.useLocalState)(T,"author",(R==null?void 0:R.author)||D||"Unknown"),F=j[0],W=j[1],K=(0,t.useLocalState)(T,"name",(R==null?void 0:R.title.substr(8))||""),_=K[0],$=K[1],z=(0,t.useLocalState)(T,"description",(R==null?void 0:R.body)||""),Y=z[0],Z=z[1],ie=(0,t.useLocalState)(T,"adminLocked",(R==null?void 0:R.admin_locked)===1||!1),ae=ie[0],se=ie[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function he(ye,Le){return W(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:_,maxLength:"128",onInput:function(){function he(ye,Le){return $(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:Y,maxLength:"512",rows:"4",onInput:function(){function he(ye,Le){return Z(Le)}return he}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function he(){return x(P?"eject_photo":"attach_photo")}return he}()}),!!P&&(0,e.createComponentVNode)(2,C,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ae,icon:ae?"lock":"lock-open",content:ae?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function he(){return se(!ae)}return he}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!R,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function he(){x("clear_wanted_notice"),(0,k.modalClose)(T)}return he}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||_.trim().length===0||Y.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function he(){(0,k.modalAnswer)(T,w.id,"",{author:F,name:_.substr(0,127),description:Y.substr(0,511),admin_locked:ae?1:0})}return he}()})]})};(0,k.modalRegisterBodyOverride)("create_channel",N),(0,k.modalRegisterBodyOverride)("manage_channel",N),(0,k.modalRegisterBodyOverride)("create_story",b),(0,k.modalRegisterBodyOverride)("wanted_notice",B)},64639:function(I,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.NuclearBomb=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return l.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return p("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){function c(){return p("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){function c(){return p("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){function c(){return p("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return p("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return p("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return p("deploy")}return c}()})})})})}return V}()},45523:function(I,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(31068),f=n(91819),V=n(2971),k=n(84947),S=r.NumberInputModal=function(){function p(l,c){var m=(0,f.useBackend)(c),i=m.act,d=m.data,u=d.init_value,s=d.large_buttons,v=d.message,g=v===void 0?"":v,C=d.timeout,h=d.title,N=(0,f.useLocalState)(c,"input",u),b=N[0],B=N[1],L=function(){function A(x){x!==b&&B(x)}return A}(),w=function(){function A(x){x!==b&&B(x)}return A}(),T=120+(g.length>30?Math.ceil(g.length/3):0);return(0,e.createComponentVNode)(2,k.Window,{title:h,width:270,height:T,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&i("submit",{entry:b}),E===o.KEY_ESCAPE&&i("cancel")}return A}(),children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Box,{color:"label",children:g})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,y,{input:b,onClick:w,onChange:L})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:b})})]})})})]})}return p}(),y=function(l,c){var m=(0,f.useBackend)(c),i=m.act,d=m.data,u=d.min_value,s=d.max_value,v=d.init_value,g=d.round_value,C=l.input,h=l.onClick,N=l.onChange,b=Math.round(C!==u?Math.max(C/2,u):s/2),B=C===u&&u>0||C===1;return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===u,icon:"angle-double-left",onClick:function(){function L(){return h(u)}return L}(),tooltip:C===u?"Min":"Min ("+u+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!g,minValue:u,maxValue:s,onChange:function(){function L(w,T){return N(T)}return L}(),onEnter:function(){function L(w,T){return i("submit",{entry:T})}return L}(),value:C})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===s,icon:"angle-double-right",onClick:function(){function L(){return h(s)}return L}(),tooltip:C===s?"Max":"Max ("+s+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:B,icon:"divide",onClick:function(){function L(){return h(b)}return L}(),tooltip:B?"Split":"Split ("+b+")"})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Button,{disabled:C===v,icon:"redo",onClick:function(){function L(){return h(v)}return L}(),tooltip:v?"Reset ("+v+")":"Reset"})})]})}},48314:function(I,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(84947),f=n(2971),V=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],k=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},y=["bad","average","average","good","average","average","bad"],p=r.OperatingComputer=function(){function i(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.hasOccupant,h=g.choice,N;return h?N=(0,e.createComponentVNode)(2,m):N=C?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!h,icon:"user",onClick:function(){function b(){return v("choiceOff")}return b}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!h,icon:"cog",onClick:function(){function b(){return v("choiceOn")}return b}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return i}(),l=function(d,u){var s=(0,t.useBackend)(u),v=s.data,g=v.occupant;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:g.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:V[g.stat][0],children:V[g.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.maxHealth,value:g.health/g.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),k.map(function(C,h){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:C[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:g[C[1]]/100,ranges:S,children:(0,a.round)(g[C[1]])},h)},h)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.maxTemp,value:g.bodyTemperature/g.maxTemp,color:y[g.temperatureSuitability+3],children:[(0,a.round)(g.btCelsius),"\xB0C, ",(0,a.round)(g.btFaren),"\xB0F"]})}),!!g.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:g.bloodMax,value:g.bloodLevel/g.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[g.bloodPercent,"%, ",g.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[g.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Current Procedure",level:"2",children:g.inSurgery?(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Procedure",children:g.surgeryName}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:g.stepName})]}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(d,u){var s=(0,t.useBackend)(u),v=s.act,g=s.data,C=g.verbose,h=g.health,N=g.healthAlarm,b=g.oxy,B=g.oxyAlarm,L=g.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"On":"Off",onClick:function(){function w(){return v(C?"verboseOff":"verboseOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function w(){return v(h?"healthOff":"healthOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function w(T,A){return v("health_adj",{new:A})}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:b,icon:b?"toggle-on":"toggle-off",content:b?"On":"Off",onClick:function(){function w(){return v(b?"oxyOff":"oxyOn")}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:B,stepPixelSize:5,ml:"0",onChange:function(){function w(T,A){return v("oxy_adj",{new:A})}return w}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:L,icon:L?"toggle-on":"toggle-off",content:L?"On":"Off",onClick:function(){function w(){return v(L?"critOff":"critOn")}return w}()})})]})}},87511:function(I,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947);function V(u,s){var v=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(v)return(v=v.call(u)).next.bind(v);if(Array.isArray(u)||(v=k(u))||s&&u&&typeof u.length=="number"){v&&(u=v);var g=0;return function(){return g>=u.length?{done:!0}:{done:!1,value:u[g++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(u,s){if(u){if(typeof u=="string")return S(u,s);var v=Object.prototype.toString.call(u).slice(8,-1);if(v==="Object"&&u.constructor&&(v=u.constructor.name),v==="Map"||v==="Set")return Array.from(u);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return S(u,s)}}function S(u,s){(s==null||s>u.length)&&(s=u.length);for(var v=0,g=new Array(s);vv},c=function(s,v){var g=s.name,C=v.name;if(!g||!C)return 0;var h=g.match(y),N=C.match(y);if(h&&N&&g.replace(y,"")===C.replace(y,"")){var b=parseInt(h[1],10),B=parseInt(N[1],10);return b-B}return l(g,C)},m=function(s,v){var g=s.searchText,C=s.source,h=s.title,N=s.color,b=s.sorted,B=C.filter(p(g));return b&&B.sort(c),C.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:h+" - ("+C.length+")",children:B.map(function(L){return(0,e.createComponentVNode)(2,i,{thing:L,color:N},L.name)})})},i=function(s,v){var g=(0,t.useBackend)(v),C=g.act,h=s.color,N=s.thing;return(0,e.createComponentVNode)(2,o.Button,{color:h,onClick:function(){function b(){return C("orbit",{ref:N.ref})}return b}(),children:[N.name,N.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",N.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},d=r.Orbit=function(){function u(s,v){for(var g=(0,t.useBackend)(v),C=g.act,h=g.data,N=h.alive,b=h.antagonists,B=h.highlights,L=h.response_teams,w=h.auto_observe,T=h.dead,A=h.ghosts,x=h.misc,E=h.npcs,P=(0,t.useLocalState)(v,"searchText",""),R=P[0],M=P[1],D={},j=V(b),F;!(F=j()).done;){var W=F.value;D[W.antag]===void 0&&(D[W.antag]=[]),D[W.antag].push(W)}var K=Object.entries(D);K.sort(function($,z){return l($[0],z[0])});var _=function(){function $(z){for(var Y=0,Z=[K.map(function(se){var he=se[0],ye=se[1];return ye}),B,N,A,T,E,x];Y0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:K.map(function($){var z=$[0],Y=$[1];return(0,e.createComponentVNode)(2,o.Section,{title:z+" - ("+Y.length+")",level:2,children:Y.filter(p(R)).sort(c).map(function(Z){return(0,e.createComponentVNode)(2,i,{color:"bad",thing:Z},Z.name)})},z)})}),B.length>0&&(0,e.createComponentVNode)(2,m,{title:"Highlights",source:B,searchText:R,color:"teal"}),(0,e.createComponentVNode)(2,m,{title:"Response Teams",source:L,searchText:R,color:"purple"}),(0,e.createComponentVNode)(2,m,{title:"Alive",source:N,searchText:R,color:"good"}),(0,e.createComponentVNode)(2,m,{title:"Ghosts",source:A,searchText:R,color:"grey"}),(0,e.createComponentVNode)(2,m,{title:"Dead",source:T,searchText:R,sorted:!1}),(0,e.createComponentVNode)(2,m,{title:"NPCs",source:E,searchText:R,sorted:!1}),(0,e.createComponentVNode)(2,m,{title:"Misc",source:x,searchText:R,sorted:!1})]})})}return u}()},54528:function(I,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(84947),V=n(50175);function k(s){if(s==null)throw new TypeError("Cannot destructure "+s)}var S=(0,V.createLogger)("OreRedemption"),y=function(v){return v.toLocaleString("en-US")+" pts"},p=r.OreRedemption=function(){function s(v,g){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.id,B=N.points,L=N.disk,w=Object.assign({},(k(v),v));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},w,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID card",children:b?(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:b.name,tooltip:"Ejects the ID card.",onClick:function(){function T(){return h("eject_id")}return T}(),style:{"white-space":"pre-wrap"}}):(0,e.createComponentVNode)(2,o.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){function T(){return h("insert_id")}return T}()})}),b&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:y(b.points)})}),b&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Mining Points",children:(0,e.createComponentVNode)(2,o.Box,{bold:!0,children:y(b.total_points)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:B>0?"good":"grey",bold:B>0&&"good",children:y(B)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:!b,icon:"hand-holding-usd",content:"Claim",onClick:function(){function T(){return h("claim")}return T}()})})]}),(0,e.createComponentVNode)(2,o.Divider),L?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:L.name,tooltip:"Ejects the design disk.",onClick:function(){function T(){return h("eject_disk")}return T}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!L.design||!L.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function T(){return h("download")}return T}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:L.design&&(L.compatible?"good":"bad"),children:L.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.sheets,B=Object.assign({},(k(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},B,{children:[(0,e.createComponentVNode)(2,i,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),b.map(function(L){return(0,e.createComponentVNode)(2,d,{ore:L},L.id)})]})))})},m=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.alloys,B=Object.assign({},(k(v),v));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},B,{children:[(0,e.createComponentVNode)(2,i,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),b.map(function(L){return(0,e.createComponentVNode)(2,u,{ore:L},L.id)})]})))})},i=function(v,g){var C;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:v.title}),(C=v.columns)==null?void 0:C.map(function(h){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:h[1],textAlign:"center",color:"label",bold:!0,children:h[0]},h)})]})})},d=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=v.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function b(B,L){return h(N.value?"sheet":"alloy",{id:N.id,amount:L})}return b}()})})]})})},u=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=v.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function b(B,L){return h(N.value?"sheet":"alloy",{id:N.id,amount:L})}return b}()})})]})})}},55686:function(I,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(76521),V=n(33115),k=function(p){var l;try{l=V("./"+p+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",p);throw m}var c=l[p];return c||(0,f.routingError)("missingExport",p)},S=r.PAI=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.app_template,u=i.app_icon,s=i.app_title,v=k(d);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:u,mr:1}),s,d!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function g(){return m("Back")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function g(){return m("MASTER_back")}return g}()})],4)]}),children:(0,e.createComponentVNode)(2,v)})})})})})}return y}()},58717:function(I,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(76521),V=n(75168),k=function(c){var m;try{m=V("./"+c+".js")}catch(d){if(d.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw d}var i=m[c];return i||(0,f.routingError)("missingExport",c)},S=r.PDA=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.app,v=u.owner;if(!v)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var g=k(s.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s.icon,mr:1}),s.name]}),children:(0,e.createComponentVNode)(2,g)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,p)})]})})})}return l}(),y=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.idInserted,v=u.idLink,g=u.stationTime,C=u.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function h(){return d("Authenticate")}return h}(),content:s?v:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function h(){return d("Eject")}return h}(),content:C?["Eject "+C]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:g})]})},p=function(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!s.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:s.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return d("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:s.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:s.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){d("Home")}return v}()})})]})})}},78062:function(I,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(48300),V=r.Pacman=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.active,i=c.anchored,d=c.broken,u=c.emagged,s=c.fuel_type,v=c.fuel_usage,g=c.fuel_stored,C=c.fuel_cap,h=c.is_ai,N=c.tmp_current,b=c.tmp_max,B=c.tmp_overheat,L=c.output_max,w=c.power_gen,T=c.output_set,A=c.has_fuel,x=g/C,E=N/b,P=T*w,R=Math.round(g/v),M=Math.round(R/60),D=R>120?M+" minutes":R+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(d||!i)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!d&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!i&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!i&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function j(){return l("toggle_power")}return j}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:T,minValue:1,maxValue:L*(u?2.5:1),step:1,className:"mt-1",onDrag:function(){function j(F,W){return l("change_power",{change_power:W})}return j}()}),"(",(0,f.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[N," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[B>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),B>20&&B<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),B>1&&B<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),B===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:m||h||!A,onClick:function(){function j(){return l("eject_fuel")}return j}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(g/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[v/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(v?D:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return k}()},65823:function(I,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ParticleAccelerator=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.assembled,m=l.power,i=l.strength,d=l.max_strength;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:160,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Connect",onClick:function(){function u(){return p("scan")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:c?"good":"bad",children:c?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,disabled:!c,onClick:function(){function u(){return p("power")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!c||i===0,onClick:function(){function u(){return p("remove_strength")}return u}(),mr:"4px"}),i,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!c||i===d,onClick:function(){function u(){return p("add_strength")}return u}(),ml:"4px"})]})]})})})})}return V}()},67572:function(I,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.PdaPainter=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,V)})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function i(){return m("insert_pda")}return i}()})]})})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,S)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(d).map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function s(){return m("choose_pda",{selectedPda:u})}return s}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+d[u][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u})]},u)})})})})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.current_appearance,u=i.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function s(){return m("eject_pda")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function s(){return m("paint_pda")}return s}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},12456:function(I,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.PersonalCrafting=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.busy,d=m.category,u=m.display_craftable_only,s=m.display_compact,v=m.prev_cat,g=m.next_cat,C=m.subcategory,h=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!i&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:d,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:u?"check-square-o":"square-o",selected:u,onClick:function(){function b(){return c("toggle_recipes")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function b(){return c("toggle_compact")}return b}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"arrow-left",onClick:function(){function b(){return c("backwardCat")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:g,icon:"arrow-right",onClick:function(){function b(){return c("forwardCat")}return b}()})]}),C&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-left",onClick:function(){function b(){return c("backwardSubCat")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function b(){return c("forwardSubCat")}return b}()})]}),s?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,k)]})]})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.display_craftable_only,d=m.can_craft,u=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:s.ref})}return v}()}),s.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:s.req_text,content:"Requirements",color:"transparent"}),s.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.tool_text,content:"Tools",color:"transparent"})]},s.name)}),!i&&u.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),s.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:s.req_text,content:"Requirements",color:"transparent"}),s.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:s.tool_text,content:"Tools",color:"transparent"})]},s.name)})]})})},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.display_craftable_only,d=m.can_craft,u=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[d.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:s.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:s.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:s.req_text}),s.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:s.tool_text})]})},s.name)}),!i&&u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:s.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:s.req_text}),s.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:s.tool_text})]})},s.name)})]})}},72143:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Photocopier=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:m.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function i(){return c("minus")}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function i(){return c("add")}return i}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:m.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function i(){return c("removedocument")}return i}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function i(){return c("removefolder")}return i}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,V)}),(0,e.createComponentVNode)(2,k)]})})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function d(){return c("copy")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function d(){return c("scandocument")}return d}()}),!!i&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function d(){return c("ai_text")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function d(){return c("ai_pic")}return d}()})],4)],0)},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function d(){return c("filecopy",{uid:i.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function d(){return c("deletefile",{uid:i.uid})}return d}()})]})},i.name)})})}},82020:function(I,r,n){"use strict";r.__esModule=!0,r.Photocopier220=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(72026),V=n(90955),k=n(37843);function S(m,i){var d=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(d)return(d=d.call(m)).next.bind(d);if(Array.isArray(m)||(d=y(m))||i&&m&&typeof m.length=="number"){d&&(m=d);var u=0;return function(){return u>=m.length?{done:!0}:{done:!1,value:m[u++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(m,i){if(m){if(typeof m=="string")return p(m,i);var d=Object.prototype.toString.call(m).slice(8,-1);if(d==="Object"&&m.constructor&&(d=m.constructor.name),d==="Map"||d==="Set")return Array.from(m);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return p(m,i)}}function p(m,i){(i==null||i>m.length)&&(i=m.length);for(var d=0,u=new Array(i);dm?this.substring(0,m)+"...":this};var l=function(i,d){d===void 0&&(d="");var u=(0,k.createSearch)(d,function(s){return s.altername});return(0,V.flow)([(0,f.filter)(function(s){return s==null?void 0:s.altername}),d&&(0,f.filter)(u),(0,f.sortBy)(function(s){return s.id})])(i)},c=r.Photocopier220=function(){function m(i,d){for(var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.copies,C=v.maxcopies,h=(0,a.useLocalState)(d,"searchText",""),N=h[0],b=h[1],B=l((0,f.sortBy)(function(M){return M.category})(v.forms||[]),N),L=[],w=S(B),T;!(T=w()).done;){var A=T.value;L.includes(A.category)||L.push(A.category)}var x=(0,a.useLocalState)(d,"number",0),E=x[0],P=x[1],R;return v.category===""?R=B:R=B.filter(function(M){return M.category===v.category}),(0,e.createComponentVNode)(2,o.Window,{width:550,height:575,theme:v.ui_theme,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"40%",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mt:.3,color:"grey",children:"\u0417\u0430\u0440\u044F\u0434 \u0442\u043E\u043D\u0435\u0440\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{minValue:0,maxValue:30,value:v.toner})})]}),(0,e.createComponentVNode)(2,t.Stack,{mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",mb:.3,color:"grey",children:"\u0424\u043E\u0440\u043C\u0430:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",textAlign:"center",bold:!0,children:v.form_id===""?"\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u0430":v.form_id})]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.copyitem&&!v.mob,icon:v.copyitem||v.mob?"eject":"times",content:v.copyitem?v.copyitem:v.mob?"\u0416\u043E\u043F\u0430 "+v.mob+"!":"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430",onClick:function(){function M(){return s("removedocument")}return M}()})})}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!v.folder,icon:v.folder?"eject":"times",content:v.folder?v.folder:"\u0421\u043B\u043E\u0442 \u0434\u043B\u044F \u043F\u0430\u043F\u043A\u0438",onClick:function(){function M(){return s("removefolder")}return M}()})})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"print",disabled:v.toner===0||v.form===null,content:"\u041F\u0435\u0447\u0430\u0442\u044C",onClick:function(){function M(){return s("print_form")}return M}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"image",disabled:v.toner<5,content:"\u0424\u043E\u0442\u043E",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0444\u043E\u0442\u043E \u0441 \u0411\u0430\u0437\u044B \u0414\u0430\u043D\u043D\u044B\u0445",onClick:function(){function M(){return s("ai_pic")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"copy",content:"\u041A\u043E\u043F\u0438\u044F",disabled:v.toner===0||!v.copyitem&&!v.mob,onClick:function(){function M(){return s("copy")}return M}()})}),!!v.isAI&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"100%",ml:"5px",mt:"3px",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"i-cursor",content:"\u0422\u0435\u043A\u0441\u0442",tooltip:"\u0420\u0430\u0441\u043F\u0435\u0447\u0430\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0442\u0435\u043A\u0441\u0442",disabled:v.toner===0,onClick:function(){function M(){return s("ai_text")}return M}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:1.5,mt:1.2,width:"50%",color:"grey",children:"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E:"}),(0,e.createComponentVNode)(2,t.Slider,{mt:.75,width:"50%",animated:!0,minValue:1,maxValue:C,value:g,stepPixelSize:10,onChange:function(){function M(D,j){return s("copies",{new:j})}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0411\u044E\u0440\u043E\u043A\u0440\u0430\u0442\u0438\u044F",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:-.5,icon:"chevron-right",color:"transparent",content:"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",selected:!v.category,onClick:function(){function M(){return s("choose_category",{category:""})}return M}()})}),L.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"chevron-right",mb:-.5,color:"transparent",content:M,selected:v.category===M,onClick:function(){function D(){return s("choose_category",{category:M})}return D}()},M)},M)})]})})})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"60%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:v.category||"\u0412\u0441\u0435 \u0444\u043E\u0440\u043C\u044B",buttons:(0,e.createComponentVNode)(2,t.Input,{mr:18.5,width:"100%",placeholder:"\u041F\u043E\u0438\u0441\u043A \u0444\u043E\u0440\u043C\u044B",onInput:function(){function M(D,j){return b(j)}return M}()}),children:R.map(function(M){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mb:.5,color:"transparent",content:M.altername.trimLongStr(37),tooltip:M.altername,selected:v.form_id===M.id,onClick:function(){function D(){return s("choose_form",{path:M.path,id:M.id})}return D}()})},M.path)})})})]})})})}return m}()},47051:function(I,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=["tempKey"];function V(p,l){if(p==null)return{};var c={},m=Object.keys(p),i,d;for(d=0;d=0)&&(c[i]=p[i]);return c}var k={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},S=function(l,c){var m=l.tempKey,i=V(l,f),d=k[m];if(!d)return null;var u=(0,a.useBackend)(c),s=u.data,v=u.act,g=s.currentTemp,C=d.label,h=d.icon,N=m===g,b=function(){v("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:b},i,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:h}),C]})))},y=r.PoolController=function(){function p(l,c){for(var m=(0,a.useBackend)(c),i=m.data,d=i.emagged,u=i.currentTemp,s=k[u]||k.normal,v=s.label,g=s.color,C=[],h=0,N=Object.entries(k);h50?"battery-half":"battery-quarter")||g==="C"&&"bolt"||g==="F"&&"battery-full"||g==="M"&&"slash",color:g==="N"&&(C>50?"yellow":"red")||g==="C"&&"yellow"||g==="F"&&"green"||g==="M"&&"orange"}),(0,e.createComponentVNode)(2,S.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(C)+"%"})],4)};d.defaultHooks=f.pureComponentHooks;var u=function(v){var g,C,h=v.status;switch(h){case"AOn":g=!0,C=!0;break;case"AOff":g=!0,C=!1;break;case"On":g=!1,C=!0;break;case"Off":g=!1,C=!1;break}var N=(C?"On":"Off")+(" ["+(g?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,S.ColorBox,{color:C?"good":"bad",content:g?void 0:"M",title:N})};u.defaultHooks=f.pureComponentHooks},15164:function(I,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(88488),f=n(22677),V=n(51185),k=n(69774),S=n(84947),y=r.PrisonerImplantManager=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.loginState,s=d.prisonerInfo,v=d.chemicalInfo,g=d.trackingInfo,C;if(!u.logged_in)return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,k.LoginScreen)})});var h=[1,5,10];return(0,e.createComponentVNode)(2,S.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:s.name?"eject":"id-card",selected:s.name,content:s.name?s.name:"-----",tooltip:s.name?"Eject ID":"Insert ID",onClick:function(){function N(){return i("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[s.points!==null?s.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:s.points===null,content:"Reset",onClick:function(){function N(){return i("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[s.goal!==null?s.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:s.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:s.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:g.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function b(){return(0,f.modalOpen)(c,"warn",{uid:N.uid})}return b}()})})]})]},N.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:v.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:N.volume})}),h.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volume0?"envelope-open-text":"envelope",onClick:function(){function b(){return s("setScreen",{setScreen:6})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Request Assistance",icon:"hand-paper",onClick:function(){function b(){return s("setScreen",{setScreen:1})}return b}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Request Supplies",icon:"box",onClick:function(){function b(){return s("setScreen",{setScreen:2})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Relay Anonymous Information",icon:"comment",onClick:function(){function b(){return s("setScreen",{setScreen:3})}return b}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Print Shipping Label",icon:"tag",onClick:function(){function b(){return s("setScreen",{setScreen:9})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function b(){return s("setScreen",{setScreen:10})}return b}()})]})}),!!C&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,lineHeight:3,color:"translucent",content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function b(){return s("setScreen",{setScreen:8})}return b}()})})]})})},k=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.department,C=[],h;switch(i.purpose){case"ASSISTANCE":C=v.assist_dept,h="Request assistance from another department";break;case"SUPPLIES":C=v.supply_dept,h="Request supplies from another department";break;case"INFO":C=v.info_dept,h="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:h,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return s("setScreen",{setScreen:0})}return N}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:C.filter(function(N){return N!==g}).map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function b(){return s("writeInput",{write:N,priority:"1"})}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function b(){return s("writeInput",{write:N,priority:"2"})}return b}()})]},N)})})})})},S=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g;switch(i.type){case"SUCCESS":g="Message sent successfully";break;case"FAIL":g="Request supplies from another department";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:g,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function C(){return s("setScreen",{setScreen:0})}return C}()})})},y=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g,C;switch(i.type){case"MESSAGES":g=v.message_log,C="Message Log";break;case"SHIPPING":g=v.shipping_log,C="Shipping label print log";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:C,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return s("setScreen",{setScreen:0})}return h}()}),children:g.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[h.map(function(N,b){return(0,e.createVNode)(1,"div",null,N,0,null,b)}),(0,e.createVNode)(1,"hr")]},h)})})})},p=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.recipient,C=v.message,h=v.msgVerified,N=v.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function b(){return s("setScreen",{setScreen:0})}return b}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:C}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:N})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function b(){return s("department",{department:g})}return b}()})})})],4)},l=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.message,C=v.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function h(){return s("setScreen",{setScreen:0})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function h(){return s("writeAnnouncement")}return h}()})],4),children:g})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[C?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(C&&g),onClick:function(){function h(){return s("sendAnnouncement")}return h}()})]})})],4)},c=function(i,d){var u=(0,a.useBackend)(d),s=u.act,v=u.data,g=v.shipDest,C=v.msgVerified,h=v.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function N(){return s("setScreen",{setScreen:0})}return N}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:g}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:C})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(g&&C),onClick:function(){function N(){return s("printLabel")}return N}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:h.map(function(N){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:N,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:g===N?"Selected":"Select",selected:g===N,onClick:function(){function b(){return s("shipSelect",{shipSelect:N})}return b}()})},N)})})})})],4)}},51939:function(I,r,n){"use strict";r.__esModule=!0,r.SUBMENU=r.RndConsole=r.MENU=void 0;var e=n(28823),a=n(91819),t=n(84947),o=n(2971),f=n(63752),V=r.MENU={MAIN:0,LEVELS:1,DISK:2,DESTROY:3,LATHE:4,IMPRINTER:5,SETTINGS:6},k=r.SUBMENU={MAIN:0,DISK_COPY:1,LATHE_CATEGORY:1,LATHE_MAT_STORAGE:2,LATHE_CHEM_STORAGE:3,SETTINGS_DEVICES:1},S=r.RndConsole=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,f.RndNavbar),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.MAIN,render:function(){function d(){return(0,e.createComponentVNode)(2,f.MainMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.LEVELS,render:function(){function d(){return(0,e.createComponentVNode)(2,f.CurrentLevels)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.DISK,render:function(){function d(){return(0,e.createComponentVNode)(2,f.DataDiskMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.DESTROY,render:function(){function d(){return(0,e.createComponentVNode)(2,f.DeconstructionMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:function(){function d(u){return u===V.LATHE||u===V.IMPRINTER}return d}(),render:function(){function d(){return(0,e.createComponentVNode)(2,f.LatheMenu)}return d}()}),(0,e.createComponentVNode)(2,f.RndRoute,{menu:V.SETTINGS,render:function(){function d(){return(0,e.createComponentVNode)(2,f.SettingsMenu)}return d}()}),i?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:i})})}):null]})})})}return y}()},50239:function(I,r,n){"use strict";r.__esModule=!0,r.CurrentLevels=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.CurrentLevels=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=y.tech_levels;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"h3",null,"Current Research Levels:",16),p.map(function(l,c){var m=l.name,i=l.level,d=l.desc;return(0,e.createComponentVNode)(2,t.Box,{children:[c>0?(0,e.createComponentVNode)(2,t.Divider):null,(0,e.createComponentVNode)(2,t.Box,{children:m}),(0,e.createComponentVNode)(2,t.Box,{children:["* Level: ",i]}),(0,e.createComponentVNode)(2,t.Box,{children:["* Summary: ",d]})]},m)})]})}return f}()},24183:function(I,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V="design",k="tech",S=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_data;return h?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:h.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:h.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:h.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function N(){return C("updt_tech")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Disk",icon:"trash",onClick:function(){function N(){return C("clear_tech")}return N}()}),(0,e.createComponentVNode)(2,l)]})]}):null},y=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_data;if(!h)return null;var N=h.name,b=h.lathe_types,B=h.materials,L=b.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:N}),L?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:L}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),B.map(function(w){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,w.name,0,{style:{"text-transform":"capitalize"}})," x ",w.amount]},w.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function w(){return C("updt_design")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Disk",icon:"trash",onClick:function(){function w(){return C("clear_design")}return w}()}),(0,e.createComponentVNode)(2,l)]})]})},p=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_type;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"This disk is empty."}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:[(0,e.createComponentVNode)(2,o.RndNavButton,{submenu:f.SUBMENU.DISK_COPY,icon:"arrow-down",content:C===k?"Load Tech to Disk":"Load Design to Disk"}),(0,e.createComponentVNode)(2,l)]})]})},l=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_type;return h?(0,e.createComponentVNode)(2,t.Button,{content:"Eject Disk",icon:"eject",onClick:function(){function N(){var b=h===k?"eject_tech":"eject_design";C(b)}return N}()}):null},c=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_data,h=g.disk_type,N=function(){if(!C)return(0,e.createComponentVNode)(2,p);switch(h){case V:return(0,e.createComponentVNode)(2,y);case k:return(0,e.createComponentVNode)(2,S);default:return null}};return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk Contents",children:N()})},m=function(u,s){var v=(0,a.useBackend)(s),g=v.data,C=v.act,h=g.disk_type,N=g.to_copy;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:N.sort(function(b,B){return b.name.localeCompare(B.name)}).map(function(b){var B=b.name,L=b.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:B,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function w(){h===k?C("copy_tech",{id:L}):C("copy_design",{id:L})}return w}()})},L)})})})})},i=r.DataDiskMenu=function(){function d(u,s){var v=(0,a.useBackend)(s),g=v.data,C=g.disk_type;return C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.MAIN,render:function(){function h(){return(0,e.createComponentVNode)(2,c)}return h}()}),(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.DISK_COPY,render:function(){function h(){return(0,e.createComponentVNode)(2,m)}return h}()})],4):null}return d}()},72751:function(I,r,n){"use strict";r.__esModule=!0,r.DeconstructionMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.DeconstructionMenu=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_item,c=y.linked_destroy;return c?l?(0,e.createComponentVNode)(2,t.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:["Name: ",l.name]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.origin_tech.map(function(m){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+m.name,children:[m.object_level," ",m.current_level?(0,e.createFragment)([(0,e.createTextVNode)("(Current: "),m.current_level,(0,e.createTextVNode)(")")],0):null]},m.name)})}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createVNode)(1,"h3",null,"Options:",16)}),(0,e.createComponentVNode)(2,t.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){function m(){p("deconstruct")}return m}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Item",icon:"eject",onClick:function(){function m(){p("eject_item")}return m}()})]}):(0,e.createComponentVNode)(2,t.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,t.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}return f}()},51802:function(I,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=r.LatheCategory=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.data,l=y.act,c=p.category,m=p.matching_designs,i=p.menu,d=i===4,u=d?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:m.map(function(s){var v=s.id,g=s.name,C=s.can_build,h=s.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:g,disabled:C<1,onClick:function(){function N(){return l(u,{id:v,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return l(u,{id:v,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return l(u,{id:v,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},v)})})]})}return V}()},47349:function(I,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheChemicalStorage=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_chemicals,c=y.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function m(){var i=c?"disposeallP":"disposeallI";p(i)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(m){var i=m.volume,d=m.name,u=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+i+" of "+d,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function s(){var v=c?"disposeP":"disposeI";p(v,{id:u})}return s}()})},u)})})]})}return f}()},73492:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=r.LatheMainMenu=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.data,l=y.act,c=p.menu,m=p.categories,i=c===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:i+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,o.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:m.map(function(d){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:d,onClick:function(){function u(){l("setCategory",{category:d})}return u}()})},d)})})]})}return V}()},87115:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheMaterialStorage=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=S.act,l=y.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:l.map(function(c){var m=c.id,i=c.amount,d=c.name,u=function(){function C(h){var N=y.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";p(N,{id:m,amount:h})}return C}(),s=Math.floor(i/2e3),v=i<1,g=s===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:v?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",i," of ",d]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",s," sheet",g,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function C(){return u(1)}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function C(){return u("custom")}return C}()}),i>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function C(){return u(5)}return C}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function C(){return u(50)}return C}()})],0):null})]},m)})})})}return f}()},2345:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheMaterials=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data,p=y.total_materials,l=y.max_materials,c=y.max_chemicals,m=y.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p}),l?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+l}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},45805:function(I,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(28823),a=n(91819),t=n(28078),o=n(63752),f=n(2971),V=n(51939),k=r.LatheMenu=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=c.menu,i=c.linked_lathe,d=c.linked_imprinter;return m===4&&!i?(0,e.createComponentVNode)(2,f.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):m===5&&!d?(0,e.createComponentVNode)(2,f.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.MAIN,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheMainMenu)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_CATEGORY,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheCategory)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_MAT_STORAGE,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheMaterialStorage)}return u}()}),(0,e.createComponentVNode)(2,t.RndRoute,{submenu:V.SUBMENU.LATHE_CHEM_STORAGE,render:function(){function u(){return(0,e.createComponentVNode)(2,o.LatheChemicalStorage)}return u}()})]})}return S}()},92497:function(I,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LatheSearch=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function p(l,c){return y("search",{to_search:c})}return p}()})})}return f}()},25242:function(I,r,n){"use strict";r.__esModule=!0,r.MainMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V=r.MainMenu=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.disk_type,m=l.linked_destroy,i=l.linked_lathe,d=l.linked_imprinter,u=l.tech_levels;return(0,e.createComponentVNode)(2,t.Section,{title:"Main Menu",children:[(0,e.createComponentVNode)(2,t.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!c,menu:f.MENU.DISK,submenu:f.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!m,menu:f.MENU.DESTROY,submenu:f.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!i,menu:f.MENU.LATHE,submenu:f.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!d,menu:f.MENU.IMPRINTER,submenu:f.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,e.createComponentVNode)(2,o.RndNavButton,{menu:f.MENU.SETTINGS,submenu:f.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"12px"}),(0,e.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s){var v=s.name,g=s.level;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:v,children:g},v)})})]})}return k}()},29933:function(I,r,n){"use strict";r.__esModule=!0,r.RndNavButton=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.RndNavButton=function(){function f(V,k){var S=V.icon,y=V.children,p=V.disabled,l=V.content,c=(0,a.useBackend)(k),m=c.data,i=c.act,d=m.menu,u=m.submenu,s=d,v=u;return V.menu!==null&&V.menu!==void 0&&(s=V.menu),V.submenu!==null&&V.submenu!==void 0&&(v=V.submenu),(0,e.createComponentVNode)(2,t.Button,{content:l,icon:S,disabled:p,onClick:function(){function g(){i("nav",{menu:s,submenu:v})}return g}(),children:y})}return f}()},59959:function(I,r,n){"use strict";r.__esModule=!0,r.RndNavbar=void 0;var e=n(28823),a=n(63752),t=n(2971),o=n(51939),f=r.RndNavbar=function(){function V(){return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__RndNavbar",children:[(0,e.createComponentVNode)(2,a.RndRoute,{menu:function(){function k(S){return S!==o.MENU.MAIN}return k}(),render:function(){function k(){return(0,e.createComponentVNode)(2,a.RndNavButton,{menu:o.MENU.MAIN,submenu:o.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}return k}()}),(0,e.createComponentVNode)(2,a.RndRoute,{submenu:function(){function k(S){return S!==o.SUBMENU.MAIN}return k}(),render:function(){function k(){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.DISK,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.LATHE,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.IMPRINTER,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}return S}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:o.MENU.SETTINGS,render:function(){function S(){return(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}return S}()})]})}return k}()}),(0,e.createComponentVNode)(2,a.RndRoute,{menu:function(){function k(S){return S===o.MENU.LATHE||S===o.MENU.IMPRINTER}return k}(),submenu:o.SUBMENU.MAIN,render:function(){function k(){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,e.createComponentVNode)(2,a.RndNavButton,{submenu:o.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}return k}()})]})}return V}()},28078:function(I,r,n){"use strict";r.__esModule=!0,r.RndRoute=void 0;var e=n(91819),a=r.RndRoute=function(){function t(o,f){var V=o.render,k=(0,e.useBackend)(f),S=k.data,y=S.menu,p=S.submenu,l=function(){function m(i,d){return i==null?!0:typeof i=="function"?i(d):i===d}return m}(),c=l(o.menu,y)&&l(o.submenu,p);return c?V():null}return t}()},59991:function(I,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(63752),f=n(51939),V=r.SettingsMenu=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=p.act,m=l.sync,i=l.admin,d=l.linked_destroy,u=l.linked_lathe,s=l.linked_imprinter;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.MAIN,render:function(){function v(){return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Sync Database with Network",icon:"sync",disabled:!m,onClick:function(){function g(){c("sync")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Connect to Research Network",icon:"plug",disabled:m,onClick:function(){function g(){c("togglesync")}return g}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!m,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function g(){c("togglesync")}return g}()}),(0,e.createComponentVNode)(2,o.RndNavButton,{disabled:!m,content:"Device Linkage Menu",icon:"link",menu:f.MENU.SETTINGS,submenu:f.SUBMENU.SETTINGS_DEVICES}),i===1?(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){function g(){return c("maxresearch")}return g}()}):null]})})}return v}()}),(0,e.createComponentVNode)(2,o.RndRoute,{submenu:f.SUBMENU.SETTINGS_DEVICES,render:function(){function v(){return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage Menu",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function g(){return c("find_device")}return g}()}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",children:(0,e.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[d?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){return c("disconnect",{item:"destroy"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),u?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){c("disconnect",{item:"lathe"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),s?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",content:"Unlink",onClick:function(){function g(){return c("disconnect",{item:"imprinter"})}return g}()})}):(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}return v}()})]})}return k}()},63752:function(I,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=r.RndRoute=r.RndNavbar=r.RndNavButton=r.MainMenu=r.LatheSearch=r.LatheMenu=r.LatheMaterials=r.LatheMaterialStorage=r.LatheMainMenu=r.LatheChemicalStorage=r.LatheCategory=r.DeconstructionMenu=r.DataDiskMenu=r.CurrentLevels=void 0;var e=n(50239);r.CurrentLevels=e.CurrentLevels;var a=n(24183);r.DataDiskMenu=a.DataDiskMenu;var t=n(72751);r.DeconstructionMenu=t.DeconstructionMenu;var o=n(51802);r.LatheCategory=o.LatheCategory;var f=n(47349);r.LatheChemicalStorage=f.LatheChemicalStorage;var V=n(73492);r.LatheMainMenu=V.LatheMainMenu;var k=n(2345);r.LatheMaterials=k.LatheMaterials;var S=n(87115);r.LatheMaterialStorage=S.LatheMaterialStorage;var y=n(45805);r.LatheMenu=y.LatheMenu;var p=n(92497);r.LatheSearch=p.LatheSearch;var l=n(25242);r.MainMenu=l.MainMenu;var c=n(59959);r.RndNavbar=c.RndNavbar;var m=n(29933);r.RndNavButton=m.RndNavButton;var i=n(28078);r.RndRoute=i.RndRoute;var d=n(59991);r.SettingsMenu=d.SettingsMenu},73407:function(I,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(37843),V=function(y,p){var l=y/p;return l<=.2?"good":l<=.5?"average":"bad"},k=r.RobotSelfDiagnosis=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.data,m=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:m.map(function(i,d){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(i.name),children:i.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:i.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:V(i.brute_damage,i.max_damage),children:i.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:V(i.electronic_damage,i.max_damage),children:i.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:i.powered?"good":"bad",children:i.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:i.status?"good":"bad",children:i.status?"Yes":"No"})]})})]})},d)})})})}return S}()},48356:function(I,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.RoboticsControlConsole=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.can_hack,i=c.safety,d=c.show_lock_all,u=c.cyborgs,s=u===void 0?[]:u;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!d&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i?"lock":"unlock",content:i?"Disable Safety":"Enable Safety",selected:i,onClick:function(){function v(){return l("arm",{})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:i,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function v(){return l("masslock",{})}return v}()})]}),(0,e.createComponentVNode)(2,V,{cyborgs:s,can_hack:m})]})})}return k}(),V=function(S,y){var p=S.cyborgs,l=S.can_hack,c=(0,a.useBackend)(y),m=c.act,i=c.data,d="Detonate";return i.detonate_cooldown>0&&(d+=" ("+i.detonate_cooldown+"s)"),p.length?p.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,buttons:(0,e.createFragment)([!!u.hackable&&!u.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function s(){return m("hackbot",{uid:u.uid})}return s}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:u.locked_down?"unlock":"lock",color:u.locked_down?"good":"default",content:u.locked_down?"Release":"Lockdown",disabled:!i.auth,onClick:function(){function s(){return m("stopbot",{uid:u.uid})}return s}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:d,disabled:!i.auth||i.detonate_cooldown>0,color:"bad",onClick:function(){function s(){return m("killbot",{uid:u.uid})}return s}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:u.status?"bad":u.locked_down?"average":"good",children:u.status?"Not Responding":u.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:u.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:u.health>50?"good":"bad",value:u.health/100})}),typeof u.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:u.charge>30?"good":"bad",value:u.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:u.cell_capacity<3e4?"average":"good",children:u.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!u.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:u.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:u.synchronization?"default":"average",children:u.synchronization||"None"})})]})},u.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},33122:function(I,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Safe=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.dial,u=i.open,s=i.locked,v=i.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),u?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*d+"deg)","z-index":0}})]}),!u&&(0,e.createComponentVNode)(2,S)]})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.dial,u=i.open,s=i.locked,v=function(C,h){return(0,e.createComponentVNode)(2,t.Button,{disabled:u||h&&!s,icon:"arrow-"+(h?"right":"left"),content:(h?"Right":"Left")+" "+C,iconRight:h,onClick:function(){function N(){return m(h?"turnleft":"turnright",{num:C})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:s,icon:u?"lock":"lock-open",content:u?"Close":"Open",mb:"0.5rem",onClick:function(){function g(){return m("open")}return g}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[v(50),v(10),v(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[v(1,!0),v(10,!0),v(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:d})]})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:d.map(function(u,s){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function v(){return m("retrieve",{index:s+1})}return v}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:u.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),u.name]}),(0,e.createVNode)(1,"br")],4,u)})})},S=function(p,l){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},46748:function(I,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SatelliteControl=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.satellites,m=l.notice,i=l.meteor_shield,d=l.meteor_shield_coverage,u=l.meteor_shield_coverage_max,s=l.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[i&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s>=100?"good":"average",value:d,maxValue:u,children:[s," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),c.map(function(v){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+v.id,children:[v.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:v.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function g(){return p("toggle",{id:v.id})}return g}()})]},v.id)})]})})]})})}return V}()},46504:function(I,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(28823),a=n(66586),t=n(91819),o=n(2971),f=n(84947),V=n(99753),k=n(31068),S=r.SecureStorage=function(){function c(m,i){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})})})})}return c}(),y=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=window.event?m.which:m.keyCode;if(s===k.KEY_ENTER){m.preventDefault(),u("keypad",{digit:"E"});return}if(s===k.KEY_ESCAPE){m.preventDefault(),u("keypad",{digit:"C"});return}if(s===k.KEY_BACKSPACE){m.preventDefault(),u("backspace");return}if(s>=k.KEY_0&&s<=k.KEY_9){m.preventDefault(),u("keypad",{digit:s-k.KEY_0});return}if(s>=k.KEY_NUMPAD_0&&s<=k.KEY_NUMPAD_9){m.preventDefault(),u("keypad",{digit:s-k.KEY_NUMPAD_0});return}},p=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.locked,g=s.no_passcode,C=s.emagged,h=s.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],b=g?"":v?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function B(L){return y(L,i)}return B}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+b]),height:"100%",children:C?"ERROR":h})}),(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(B){return(0,e.createComponentVNode)(2,V.TableRow,{children:B.map(function(L){return(0,e.createComponentVNode)(2,V.TableCell,{children:(0,e.createComponentVNode)(2,l,{number:L})},L)})},B[0])})})]})},l=function(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:v,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+v]),onClick:function(){function g(){return u("keypad",{digit:v})}return g}()})}},54529:function(I,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=n(84947),V=n(22677),k=n(51185),S=n(69774),y=n(76519),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},l=function(h,N){(0,V.modalOpen)(h,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function C(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.loginState,T=L.currentPage,A;if(w.logged_in)T===1?A=(0,e.createComponentVNode)(2,i):T===2&&(A=(0,e.createComponentVNode)(2,s));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,S.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,V.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k.LoginInfo),(0,e.createComponentVNode)(2,y.TemporaryNotice),(0,e.createComponentVNode)(2,m),A]})})]})}return C}(),m=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.currentPage,T=L.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:w===1,onClick:function(){function A(){return B("page",{page:1})}return A}(),children:"List Records"}),w===2&&T&&!T.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:w===2,children:["Record: ",T.fields[0].value]})]})})},i=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.records,T=(0,t.useLocalState)(N,"searchText",""),A=T[0],x=T[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],R=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),D=M[0],j=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,u)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,d,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,d,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,d,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,d,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,d,{id:"status",children:"Criminal Status"})]}),w.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,W){var K=D?1:-1;return F[P].localeCompare(W[P])*K}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+p[F.status],onClick:function(){function W(){return B("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return W}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},d=function(h,N){var b=(0,t.useLocalState)(N,"sortId","name"),B=b[0],L=b[1],w=(0,t.useLocalState)(N,"sortOrder",!0),T=w[0],A=w[1],x=h.id,E=h.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:B!==x&&"transparent",fluid:!0,onClick:function(){function P(){B===x?A(!T):(L(x),A(!0))}return P}(),children:[E,B===x&&(0,e.createComponentVNode)(2,o.Icon,{name:T?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},u=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.isPrinting,T=(0,t.useLocalState)(N,"searchText",""),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return B("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:w,icon:w?"spinner":"print",iconSpin:!!w,content:"Print Cell Log",onClick:function(){function E(){return(0,V.modalOpen)(N,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,R){return x(R)}return E}()})})]})},s=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.isPrinting,T=L.general,A=L.security;return!T||!T.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:w,icon:w?"spinner":"print",iconSpin:!!w,content:"Print Record",onClick:function(){function x(){return B("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return B("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,v)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return B("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return B("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,prewrap:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return l(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,g)],4)],0)},v=function(h,N){var b=(0,t.useBackend)(N),B=b.data,L=B.general;return!L||!L.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:L.fields.map(function(w,T){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:w.field,prewrap:!0,children:[(0,a.decodeHtmlEntities)(""+w.value),!!w.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:w.line_break?"1rem":"initial",onClick:function(){function A(){return l(N,w)}return A}()})]},T)})})}),!!L.has_photos&&L.photos.map(function(w,T){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:w,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,e.createVNode)(1,"br"),"Photo #",T+1]},T)})]})},g=function(h,N){var b=(0,t.useBackend)(N),B=b.act,L=b.data,w=L.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function T(){return(0,V.modalOpen)(N,"comment_add")}return T}()}),children:w.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):w.comments.map(function(T,A){return(0,e.createComponentVNode)(2,o.Box,{prewrap:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:T.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),T.text||T,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return B("comment_delete",{id:A+1})}return x}()})]},A)})})})}},79315:function(I,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SeedExtractor=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.stored_seeds,i=c.vend_amount;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Stored Seeds",buttons:(0,e.createFragment)([(0,e.createTextVNode)("Set Amount to be Vended:\xA0"),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:i,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(){function d(u,s){return l("set_vend_amount",{vend_amount:s})}return d}()})],4),children:m!=null&&m.length?(0,e.createComponentVNode)(2,V):"No Seeds"})})})})}return k}(),V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.stored_seeds;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Lifespan"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Endurance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Maturation"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Production"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Yield"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Potency"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stock"})]}),m.map(function(i,d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+i.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),i.name,i.variant?" ("+i.variant+")":""]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.lifespan}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.endurance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.maturation}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.production}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.yield}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.potency}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:["(",i.amount," Left)\xA0",(0,e.createComponentVNode)(2,t.Button,{ml:1,content:"Vend",icon:"arrow-circle-down",onClick:function(){function u(){return l("vend",{seedid:i.id,seedvariant:i.variant})}return u}()})]})]},d)})]})}},58578:function(I,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ShuttleConsole=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:l.status?l.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!l.shuttle&&(!!l.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:l.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return p("move",{move:c.id})}return m}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!l.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!l.status,onClick:function(){function c(){return p("request")}return c}()})})],0))]})})})})}return V}()},11154:function(I,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.ShuttleManipulator=function(){function y(p,l){var c=(0,a.useLocalState)(l,"tabIndex",0),m=c[0],i=c[1],d=function(){function u(s){switch(s){case 0:return(0,e.createComponentVNode)(2,V);case 1:return(0,e.createComponentVNode)(2,k);case 2:return(0,e.createComponentVNode)(2,S);default:return"WE SHOULDN'T BE HERE!"}}return u}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===0,onClick:function(){function u(){return i(0)}return u}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function u(){return i(1)}return u}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function u(){return i(2)}return u}(),icon:"tools",children:"Modification"},"Modification")]}),d(m)]})})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:d.map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:u.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:u.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:u.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:u.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function s(){return m("jump_to",{type:"mobile",id:u.id})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function s(){return m("fast_travel",{id:u.id})}return s}()})]})]})},u.name)})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.templates_tabs,u=i.existing_shuttle,s=i.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:d.map(function(v){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===u.id,icon:"file",onClick:function(){function g(){return m("select_template_category",{cat:v})}return g}(),children:v},v)})}),!!u&&s[u.id].templates.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:v.description}),v.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:v.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function g(){return m("select_template",{shuttle_id:v.shuttle_id})}return g}()})})]})},v.name)})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.existing_shuttle,u=i.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[d?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+d.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:d.status}),d.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:d.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function s(){return m("jump_to",{type:"mobile",id:d.id})}return s}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:u.description}),u.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:u.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function s(){return m("preview",{shuttle_id:u.shuttle_id})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function s(){return m("load",{shuttle_id:u.shuttle_id})}return s}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},80699:function(I,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=[["good","Alive"],["average","Critical"],["bad","DEAD"]],k=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],S={average:[.25,.5],bad:[.5,1/0]},y=["bad","average","average","good","average","average","bad"],p=r.Sleeper=function(){function s(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.hasOccupant,B=b?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,u);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:B}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i)})]})})})}return s}(),l=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,d)],4)},c=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant,B=N.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:B?"toggle-on":"toggle-off",selected:B,content:B?"On":"Off",onClick:function(){function L(){return h("auto_eject_dead_"+(B?"off":"on"))}return L}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function L(){return h("ejectify")}return L}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:b.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.maxHealth,value:b.health/b.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(b.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:V[b.stat][0],children:V[b.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.maxTemp,value:b.bodyTemperature/b.maxTemp,color:y[b.temperatureSuitability+3],children:[(0,a.round)(b.btCelsius,0),"\xB0C,",(0,a.round)(b.btFaren,0),"\xB0F"]})}),!!b.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:b.bloodMax,value:b.bloodLevel/b.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[b.bloodPercent,"%, ",b.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[b.pulse," BPM"]})],4)]})})},m=function(v,g){var C=(0,t.useBackend)(g),h=C.data,N=h.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:k.map(function(b,B){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:b[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:N[b[1]]/100,ranges:S,children:(0,a.round)(N[b[1]],0)},B)},B)})})})},i=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.hasOccupant,B=N.isBeakerLoaded,L=N.beakerMaxSpace,w=N.beakerFreeSpace,T=N.dialysis,A=T&&w>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!B||w<=0||!b,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return h("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!B,icon:"eject",content:"Eject",onClick:function(){function x(){return h("removebeaker")}return x}()})],4),children:B?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:L,value:w/L,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[w,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},d=function(v,g){var C=(0,t.useBackend)(g),h=C.act,N=C.data,b=N.occupant,B=N.chemicals,L=N.maxchem,w=N.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:B.map(function(T,A){var x="",E;return T.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):T.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:T.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:L,value:T.occ_amount/L,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[T.pretty_amount,"/",L,"u"]}),w.map(function(P,R){return(0,e.createComponentVNode)(2,o.Button,{disabled:!T.injectable||T.occ_amount+P>L||b.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+T.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return h("chemical",{chemid:T.id,amount:P})}return M}()},R)})]})})},A)})})},u=function(v,g){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},42439:function(I,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SlotMachine=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;if(l.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return l.plays===1?c=l.plays+" player has tried their luck today!":c=l.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:l.working,content:l.working?"Spinning...":"Spin",onClick:function(){function m(){return p("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:l.resultlvl,children:l.result})]})})})}return V}()},280:function(I,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Smartfridge=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.secure,m=l.can_dry,i=l.drying,d=l.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:i?"power-off":"times",content:i?"On":"Off",selected:i,onClick:function(){function u(){return p("drying")}return u}()}),children:[!d&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!d&&d.slice().sort(function(u,s){return u.display_name.localeCompare(s.display_name)}).map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:u.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",u.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function s(){return p("vend",{index:u.vend,amount:1})}return s}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:u.quantity,step:1,stepPixelSize:3,onChange:function(){function s(v,g){return p("vend",{index:u.vend,amount:g})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function s(){return p("vend",{index:u.vend,amount:u.quantity})}return s}()})]})]},u)})]})]})})})}return V}()},47606:function(I,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(48300),f=n(84947),V=1e3,k=r.Smes=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.capacityPercent,d=m.capacity,u=m.charge,s=m.inputAttempt,v=m.inputting,g=m.inputLevel,C=m.inputLevelMax,h=m.inputAvailable,N=m.outputAttempt,b=m.outputting,B=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,T=i>=100&&"good"||v&&"average"||"bad",A=b&&"good"||u>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:s?"sync-alt":"times",selected:s,onClick:function(){function x(){return c("tryinput")}return x}(),children:s?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:T,children:i>=100&&"Fully Charged"||v&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:g===0,onClick:function(){function x(){return c("input",{target:"min"})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:g===0,onClick:function(){function x(){return c("input",{adjust:-1e4})}return x}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:g/V,fillValue:h/V,minValue:0,maxValue:C/V,step:5,stepPixelSize:4,format:function(){function x(E){return(0,o.formatPower)(E*V,1)}return x}(),onChange:function(){function x(E,P){return c("input",{target:P*V})}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:g===C,onClick:function(){function x(){return c("input",{adjust:1e4})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:g===C,onClick:function(){function x(){return c("input",{target:"max"})}return x}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(h)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){function x(){return c("tryoutput")}return x}(),children:N?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:b?"Sending":u>0?"Not Sending":"No Charge"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:B===0,onClick:function(){function x(){return c("output",{target:"min"})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:B===0,onClick:function(){function x(){return c("output",{adjust:-1e4})}return x}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:B/V,minValue:0,maxValue:L/V,step:5,stepPixelSize:4,format:function(){function x(E){return(0,o.formatPower)(E*V,1)}return x}(),onChange:function(){function x(E,P){return c("output",{target:P*V})}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:B===L,onClick:function(){function x(){return c("output",{adjust:1e4})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:B===L,onClick:function(){function x(){return c("output",{target:"max"})}return x}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return S}()},66527:function(I,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SolarControl=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=0,m=1,i=2,d=l.generated,u=l.generated_ratio,s=l.tracking_state,v=l.tracking_rate,g=l.connected_panels,C=l.connected_tracker,h=l.cdir,N=l.direction,b=l.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function B(){return p("refresh")}return B}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:C?"good":"bad",children:C?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:g>0?"good":"bad",children:g})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[h,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[s===i&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),s===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",v,"\xB0/h (",b,")"," "]}),s===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[s!==i&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:h,onDrag:function(){function B(L,w){return p("cdir",{cdir:w})}return B}()}),s===i&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:s===c,onClick:function(){function B(){return p("track",{track:c})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:s===m,onClick:function(){function B(){return p("track",{track:m})}return B}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:s===i,disabled:!C,onClick:function(){function B(){return p("track",{track:i})}return B}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[s===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:v,format:function(){function B(L){var w=Math.sign(L)>0?"+":"-";return w+Math.abs(L)}return B}(),onDrag:function(){function B(L,w){return p("tdir",{tdir:w})}return B}()}),s===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),s===i&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return V}()},27478:function(I,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SpawnersMenu=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function i(){return p("jump",{ID:m.uids})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function i(){return p("spawn",{ID:m.uids})}return i}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.name)})})})})}return V}()},15565:function(I,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SpecMenu=function(){function p(l,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,y)]})})})}return p}(),V=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("hemomancer")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4)]})})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("umbrae")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("gargantua")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function s(){return i("dantalion")}return s}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},31752:function(I,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.StationAlertConsole=function(){function k(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V)})})}return k}(),V=r.StationAlertConsoleContent=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.data,c=l.alarms||[],m=c.Fire||[],i=c.Atmosphere||[],d=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[i.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),i.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[d.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),d.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)})],0)})],4)}return k}()},64323:function(I,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(28823),a=n(72026),t=n(98644),o=n(91819),f=n(2971),V=n(84947),k=function(l){return l[l.SetupFutureStationTraits=0]="SetupFutureStationTraits",l[l.ViewStationTraits=1]="ViewStationTraits",l}(k||{}),S=function(c,m){var i=(0,o.useBackend)(m),d=i.act,u=i.data,s=u.future_station_traits,v=(0,o.useLocalState)(m,"selectedFutureTrait",null),g=v[0],C=v[1],h=Object.fromEntries(u.valid_station_traits.map(function(b){return[b.name,b.path]})),N=Object.keys(h);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!g&&"Select trait to add...",onSelected:C,options:N,selected:g,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function b(){if(g){var B=h[g],L=[B];if(s){var w,T=s.map(function(A){return A.path});if(T.indexOf(B)!==-1)return;L=(w=L).concat.apply(w,T)}d("setup_future_traits",{station_traits:L})}}return b}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(s)?s.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.map(function(b){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:b.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function B(){d("setup_future_traits",{station_traits:(0,a.filterMap)(s,function(L){if(L.path!==b.path)return L.path})})}return B}(),children:"Delete"})})]})},b.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function b(){return d("clear_future_traits")}return b}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function b(){return d("setup_future_traits",{station_traits:[]})}return b}(),children:"Prevent station traits from running next round"})]})]})},y=function(c,m){var i=(0,o.useBackend)(m),d=i.act,u=i.data;return u.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:u.current_traits.map(function(s){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:s.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:u.too_late_to_revert||!s.can_revert,tooltip:!s.can_revert&&"This trait is not revertable."||u.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function v(){return d("revert",{ref:s.ref})}return v}()})})]})},s.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},p=r.StationTraitsPanel=function(){function l(c,m){var i=(0,o.useLocalState)(m,"station_traits_tab",k.ViewStationTraits),d=i[0],u=i[1],s;switch(d){case k.SetupFutureStationTraits:s=(0,e.createComponentVNode)(2,S);break;case k.ViewStationTraits:s=(0,e.createComponentVNode)(2,y);break;default:(0,t.exhaustiveCheck)(d)}return(0,e.createComponentVNode)(2,V.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,V.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:d===k.ViewStationTraits,onClick:function(){function v(){return u(k.ViewStationTraits)}return v}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:d===k.SetupFutureStationTraits,onClick:function(){function v(){return u(k.SetupFutureStationTraits)}return v}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),s]})]})})})}return l}()},57633:function(I,r,n){"use strict";r.__esModule=!0,r.SuitStorage=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SuitStorage=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.uv;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:260,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!i&&(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,e.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,S)]})})})}return y}(),V=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.helmet,u=i.suit,s=i.magboots,v=i.mask,g=i.storage,C=i.open,h=i.locked;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored Items",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){function N(){return m("cook")}return N}()}),(0,e.createComponentVNode)(2,t.Button,{content:h?"Unlock":"Lock",icon:h?"unlock":"lock",disabled:C,onClick:function(){function N(){return m("toggle_lock")}return N}()})],4),children:C&&!h?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,k,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,e.createComponentVNode)(2,k,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,e.createComponentVNode)(2,k,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,e.createComponentVNode)(2,k,{object:v,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,e.createComponentVNode)(2,k,{object:g,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:h?"lock":"exclamation-circle",size:"5",mb:3}),(0,e.createVNode)(1,"br"),h?"The unit is locked.":"The unit is closed."]})})})},k=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=p.object,u=p.label,s=p.missingText,v=p.eject;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u,children:(0,e.createComponentVNode)(2,t.Box,{my:.5,children:d?(0,e.createComponentVNode)(2,t.Button,{my:-1,icon:"eject",content:d,onClick:function(){function g(){return m(v)}return g}()}):(0,e.createComponentVNode)(2,t.Box,{color:"silver",bold:!0,children:["No ",s," found."]})})})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.open,u=i.locked;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:d?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:d?"times-circle":"expand",color:d?"red":"green",disabled:u,textAlign:"center",onClick:function(){function s(){return m("toggle_open")}return s}()})})}},72217:function(I,r,n){"use strict";r.__esModule=!0,r.SupermatterMonitor=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(58331),f=n(91819),V=n(2971),k=n(30381),S=n(84947),y=n(99753),p=r.SupermatterMonitor=function(){function i(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data;return g.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return i}(),l=function(d){return Math.log2(16+Math.max(0,d))-4},c=function(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data,C=g.supermatters,h=C===void 0?[]:C;return(0,e.createComponentVNode)(2,S.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,S.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,title:"Detected Supermatters",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return v("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,V.Table,{children:h.map(function(N){return(0,e.createComponentVNode)(2,V.Table.Row,{children:[(0,e.createComponentVNode)(2,V.Table.Cell,{children:N.supermatter_id+". "+N.area_name}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:N.integrity/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,V.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,V.Button,{content:"Details",onClick:function(){function b(){return v("view",{view:N.supermatter_id})}return b}()})})]},N.supermatter_id)})})})})})},m=function(d,u){var s=(0,f.useBackend)(u),v=s.act,g=s.data,C=g.active,h=g.SM_integrity,N=g.SM_power,b=g.SM_ambienttemp,B=g.SM_ambientpressure,L=(0,t.flow)([function(T){return T.filter(function(A){return A.amount>=.01})},(0,a.sortBy)(function(T){return-T.amount})])(g.gases||[]),w=Math.max.apply(Math,[1].concat(L.map(function(T){return T.amount})));return(0,e.createComponentVNode)(2,S.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:l(b),minValue:0,maxValue:l(1e4),ranges:{teal:[-1/0,l(80)],good:[l(80),l(373)],average:[l(373),l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(b)+" K"})}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,V.ProgressBar,{value:l(B),minValue:0,maxValue:l(5e4),ranges:{good:[l(1),l(300)],average:[-1/0,l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(B)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"arrow-left",content:"Back",onClick:function(){function T(){return v("back")}return T}()}),children:(0,e.createComponentVNode)(2,V.LabeledList,{children:L.map(function(T){return(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:(0,k.getGasLabel)(T.name),children:(0,e.createComponentVNode)(2,V.ProgressBar,{color:(0,k.getGasColor)(T.name),value:T.amount,minValue:0,maxValue:w,children:(0,o.toFixed)(T.amount,2)+"%"})},T.name)})})})})]})})})}},55055:function(I,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.SyndicateComputerSimple=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function m(){return p(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},c.title)})})})}return V}()},61225:function(I,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S){return S.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},V=r.TEG=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function m(){return l("check")}return m}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[f(c.cold_inlet_temp)," K,"," ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K,"," ",f(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[f(c.hot_inlet_temp)," K,"," ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K,"," ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return k}()},61424:function(I,r,n){"use strict";r.__esModule=!0,r.TTSSeedsExplorerContent=r.TTSSeedsExplorer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f={0:"\u0411\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u044B\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV",5:"Tier V"},V={male:"\u041C\u0443\u0436\u0441\u043A\u043E\u0439",female:"\u0416\u0435\u043D\u0441\u043A\u0438\u0439"},k={\u041C\u0443\u0436\u0441\u043A\u043E\u0439:{icon:"mars",color:"blue"},\u0416\u0435\u043D\u0441\u043A\u0438\u0439:{icon:"venus",color:"purple"},\u041B\u044E\u0431\u043E\u0439:{icon:"venus-mars",color:"white"}},S=function(c,m,i,d){return d===void 0&&(d=null),c.map(function(u){var s,v=(s=u[d])!=null?s:u;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:m.includes(u),content:v,onClick:function(){function g(){m.includes(u)?i(m.filter(function(C){var h;return((h=C[d])!=null?h:C)!==u})):i([u].concat(m))}return g}()},v)})},y=r.TTSSeedsExplorer=function(){function l(){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,p)})})})}return l}(),p=r.TTSSeedsExplorerContent=function(){function l(c,m){var i=(0,a.useBackend)(m),d=i.act,u=i.data,s=u.providers,v=u.seeds,g=u.selected_seed,C=u.phrases,h=u.donator_level,N=u.character_gender,b=v.map(function(Q){return Q.category}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}),B=v.map(function(Q){return Q.gender}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}),L=v.map(function(Q){return Q.required_donator_level}).filter(function(Q,q,ue){return ue.indexOf(Q)===q}).sort(function(Q,q){return Q-q}).map(function(Q){return f[Q]}),w=(0,a.useLocalState)(m,"selectedProviders",s),T=w[0],A=w[1],x=(0,a.useLocalState)(m,"selectedGenders",B.includes(V[N])?[V[N]]:B),E=x[0],P=x[1],R=(0,a.useLocalState)(m,"selectedCategories",b),M=R[0],D=R[1],j=(0,a.useLocalState)(m,"selectedDonatorLevels",L.includes(f[h])?L.slice(0,L.indexOf(f[h])+1):L),F=j[0],W=j[1],K=(0,a.useLocalState)(m,"selectedPhrase",C[0]),_=K[0],$=K[1],z=(0,a.useLocalState)(m,"searchtext",""),Y=z[0],Z=z[1],ie=S(s,T,A,"name"),ae=S(B,E,P),se=S(b,M,D),he=S(L,F,W),ye=(0,e.createComponentVNode)(2,t.Dropdown,{options:C,selected:_.replace(/(.{60})..+/,"$1..."),width:"445px",onSelected:function(){function Q(q){return $(q)}return Q}()}),Le=(0,e.createComponentVNode)(2,t.Input,{placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435...",width:"100%",onInput:function(){function Q(q,ue){return Z(ue)}return Q}()}),pe=v.sort(function(Q,q){var ue=Q.name.toLowerCase(),me=q.name.toLowerCase();return ue>me?1:ue0&&g!==Q.name?"orange":"white",children:Q.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:g===Q.name?.5:.25,textAlign:"left",children:Q.category}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:g===Q.name?"white":k[Q.gender].color,textAlign:"left",children:(0,e.createComponentVNode)(2,t.Icon,{mx:1,size:1.2,name:k[Q.gender].icon})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:Q.required_donator_level>0&&(0,e.createFragment)([f[Q.required_donator_level],(0,e.createComponentVNode)(2,t.Icon,{ml:1,mr:2,name:"coins"})],0)})]},Q.name)});return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{height:"175px",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0424\u0438\u043B\u044C\u0442\u0440\u044B",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B",children:ie}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u043B",children:ae}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u0438",children:he}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:ye}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"\u041F\u043E\u0438\u0441\u043A",children:Le})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"\u0423\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451",disabled:M.length===0,onClick:function(){function Q(){return D([])}return Q}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0451",disabled:M.length===b.length,onClick:function(){function Q(){return D(b)}return Q}()})],4),children:se})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"\u0413\u043E\u043B\u043E\u0441\u0430 ("+pe.length+"/"+v.length+")",children:(0,e.createComponentVNode)(2,t.Table,{children:oe})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.BlockQuote,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"\u0414\u043B\u044F \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u044F \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043E\u0434\u043E\u0432 \u0447\u0430\u0441\u0442\u044C \u0433\u043E\u043B\u043E\u0441\u043E\u0432 \u043F\u0440\u0438\u0448\u043B\u043E\u0441\u044C \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0437\u0430 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044C\u043D\u0443\u044E \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,e.createComponentVNode)(2,t.Box,{mt:2,italic:!0,children:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u043E\u0431 \u044D\u0442\u043E\u043C \u043C\u043E\u0436\u043D\u043E \u0443\u0437\u043D\u0430\u0442\u044C \u0432 \u043D\u0430\u0448\u0435\u043C Discord-\u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})})],4)}return l}()},97552:function(I,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TachyonArray=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.records,i=m===void 0?[]:m,d=c.explosion_target,u=c.toxins_tech,s=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!i.length||s,align:"center",onClick:function(){function v(){return l("print_logs")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!i.length,color:"bad",align:"center",onClick:function(){function v(){return l("delete_logs")}return v}()})]})]})}),i.length?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return k}(),V=r.TachyonArrayContent=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.records,i=m===void 0?[]:m;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),i.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function u(){return l("delete_record",{index:d.index})}return u}()})})]},d.index)})]})})})})}return k}()},33291:function(I,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Tank=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c;return l.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:l.connected?"check":"times",content:l.connected?"Internals On":"Internals Off",selected:l.connected,onClick:function(){function m(){return p("internals")}return m}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:l.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:l.ReleasePressure===l.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return p("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(l.releasePressure),width:"65px",unit:"kPa",minValue:l.minReleasePressure,maxValue:l.maxReleasePressure,onChange:function(){function m(i,d){return p("pressure",{pressure:d})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:l.ReleasePressure===l.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return p("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:l.ReleasePressure===l.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return p("pressure",{pressure:"reset"})}return m}()})]}),c]})})})})}return V}()},75480:function(I,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TankDispenser=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.o_tanks,m=l.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function i(){return p("oxygen")}return i}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function i(){return p("plasma")}return i}()})})]})})})}return V}()},62291:function(I,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TcommsCore=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.ion,s=(0,a.useLocalState)(c,"tabIndex",0),v=s[0],g=s[1],C=function(){function h(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,y);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[u===1&&(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:v===0,onClick:function(){function h(){return g(0)}return h}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:v===1,onClick:function(){function h(){return g(1)}return h}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:v===2,onClick:function(){function h(){return g(2)}return h}(),children:"User Filtering"},"FilterPage")]}),C(v)]})})}return p}(),V=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.active,s=d.sectors_available,v=d.nttc_toggle_jobs,g=d.nttc_toggle_job_color,C=d.nttc_toggle_name_color,h=d.nttc_toggle_command_bold,N=d.nttc_job_indicator_type,b=d.nttc_setting_language,B=d.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function L(){return i("toggle_active")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:s})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function L(){return i("nttc_toggle_jobs")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:g?"On":"Off",selected:g,icon:"clipboard-list",onClick:function(){function L(){return i("nttc_toggle_job_color")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"user-tag",onClick:function(){function L(){return i("nttc_toggle_name_color")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"volume-up",onClick:function(){function L(){return i("nttc_toggle_command_bold")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function L(){return i("nttc_job_indicator_type")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:b||"Unset",selected:b,icon:"globe",onClick:function(){function L(){return i("nttc_setting_language")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:B||"Unset",selected:B,icon:"server",onClick:function(){function L(){return i("network_id")}return L}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function L(){return i("import")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function L(){return i("export")}return L}()})]})],4)},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.link_password,s=d.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"Unset",selected:u,icon:"lock",onClick:function(){function v(){return i("change_password")}return v}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),s.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function g(){return i("unlink",{addr:v.addr})}return g}()})})]},v.addr)})]})]})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=m.data,u=d.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function s(){return i("add_filter")}return s}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function v(){return i("remove_filter",{user:s})}return v}()})})]},s)})]})})}},82905:function(I,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TcommsRelay=function(){function S(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.linked,d=m.active,u=m.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){function s(){return c("toggle_active")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:u||"Unset",selected:u,icon:"server",onClick:function(){function s(){return c("network_id")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:i===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),i===1?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,k)]})})}return S}(),V=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.linked_core_id,d=m.linked_core_addr,u=m.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){function s(){return c("toggle_hidden_link")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return c("unlink")}return s}()})})]})})},k=function(y,p){var l=(0,a.useBackend)(p),c=l.act,m=l.data,i=m.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),i.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return c("link",{addr:d.addr})}return u}()})})]},d.addr)})]})})}},87692:function(I,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Teleporter=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.targetsTeleport?l.targetsTeleport:{},m=0,i=1,d=2,u=l.calibrated,s=l.calibrating,v=l.powerstation,g=l.regime,C=l.teleporterhub,h=l.target,N=l.locked;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!v||!C)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[C,!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),v&&!C&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),v&&C&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[g===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:h,options:Object.keys(c),color:h!=="None"?"default":"bad",onSelected:function(){function b(B){return p("settarget",{x:c[B].x,y:c[B].y,z:c[B].z})}return b}()}),g===i&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:h,options:Object.keys(c),color:h!=="None"?"default":"bad",onSelected:function(){function b(B){return p("settarget",{x:c[B].x,y:c[B].y,z:c[B].z})}return b}()}),g===d&&(0,e.createComponentVNode)(2,t.Box,{children:h})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:g===i?"good":null,onClick:function(){function b(){return p("setregime",{regime:i})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:g===m?"good":null,onClick:function(){function b(){return p("setregime",{regime:m})}return b}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:g===d?"good":null,disabled:!N,onClick:function(){function b(){return p("setregime",{regime:d})}return b}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[h!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||u&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(u||s),onClick:function(){function b(){return p("calibrate")}return b}()})})]}),h==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&v&&C&&g===d)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function b(){return p("load")}return b}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function b(){return p("eject")}return b}()})]})})]})})})})}return V}()},40759:function(I,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.TempGun=function(){function p(l,c){var m=(0,t.useBackend)(c),i=m.act,d=m.data,u=d.target_temperature,s=d.temperature,v=d.max_temp,g=d.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:g,maxValue:v,value:u,format:function(){function C(h){return(0,a.toFixed)(h,2)}return C}(),width:"50px",onDrag:function(){function C(h,N){return i("target_temperature",{target_temperature:N})}return C}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:k(s),bold:s>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(s,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:y(s),children:S(s)})})]})})})})}return p}(),k=function(l){return l<=-100?"blue":l<=0?"teal":l<=100?"green":l<=200?"orange":"red"},S=function(l){return l<=100-273.15?"High":l<=250-273.15?"Medium":l<=300-273.15?"Low":l<=400-273.15?"Medium":"High"},y=function(l){return l<=100-273.15?"red":l<=250-273.15?"orange":l<=300-273.15?"green":l<=400-273.15?"orange":"red"}},32369:function(I,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(28823),a=n(2146),t=n(98658),o=n(91819),f=n(31068),V=n(2971),k=n(84947),S=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),y=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),p=r.TextInputModal=function(){function c(m,i){var d=(0,o.useBackend)(i),u=d.act,s=d.data,v=s.max_length,g=s.message,C=g===void 0?"":g,h=s.multiline,N=s.placeholder,b=s.timeout,B=s.title,L=(0,o.useLocalState)(i,"input",N||""),w=L[0],T=L[1],A=function(){function P(R){if(R!==w){var M=h?S(R):y(R);T(M)}}return P}(),x=h||w.length>=40,E=130+(C.length>40?Math.ceil(C.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,k.Window,{title:B,width:325,height:E,children:[b&&(0,e.createComponentVNode)(2,a.Loader,{value:b}),(0,e.createComponentVNode)(2,k.Window.Content,{onKeyDown:function(){function P(R){var M=window.event?R.which:R.keyCode;M===f.KEY_ENTER&&(!x||!R.shiftKey)&&u("submit",{entry:w}),M===f.KEY_ESCAPE&&u("cancel")}return P}(),children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Box,{color:"label",children:C})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{input:w,onType:A})}),(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:w,message:w.length+"/"+v})})]})})})]})}return c}(),l=function(m,i){var d=(0,o.useBackend)(i),u=d.act,s=d.data,v=s.max_length,g=s.multiline,C=m.input,h=m.onType,N=g||C.length>=40;return(0,e.createComponentVNode)(2,V.TextArea,{autoFocus:!0,autoSelect:!0,height:g||C.length>=40?"100%":"1.8rem",maxLength:v,onEscape:function(){function b(){return u("cancel")}return b}(),onEnter:function(){function b(B){N&&B.shiftKey||(B.preventDefault(),u("submit",{entry:C}))}return b}(),onInput:function(){function b(B,L){return h(L)}return b}(),placeholder:"Type something...",value:C})}},82296:function(I,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=n(84947),V=r.ThermoMachine=function(){function k(S,y){var p=(0,t.useBackend)(y),l=p.act,c=p.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function m(){return l("power")}return m}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function m(){return l("cooling")}return m}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function m(){return l("target",{target:c.min})}return m}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function m(i,d){return l("target",{target:d})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return l("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return l("target",{target:c.initial})}return m}()})]})]})})]})})}return k}()},68488:function(I,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.TransferValve=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.tank_one,m=l.tank_two,i=l.attached_device,d=l.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!m,onClick:function(){function u(){return p("toggle")}return u}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!i,onClick:function(){function u(){return p("device")}return u}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:i?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:i,disabled:!i,onClick:function(){function u(){return p("remove_device")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function u(){return p("tankone")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function u(){return p("tanktwo")}return u}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return V}()},26868:function(I,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=n(58331),V=r.TurbineComputer=function(){function y(p,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,d=i.compressor,u=i.compressor_broken,s=i.turbine,v=i.turbine_broken,g=i.online,C=!!(d&&!u&&s&&!v);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:g?"power-off":"times",content:g?"Online":"Offline",selected:g,disabled:!C,onClick:function(){function h(){return m("toggle_power")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function h(){return m("disconnect")}return h}()})],4),children:C?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,k)})})})}return y}(),k=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.compressor,d=m.compressor_broken,u=m.turbine,s=m.turbine_broken,v=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!i||d?"bad":"good",children:d?i?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!u||s?"bad":"good",children:s?u?"Offline":"Missing":"Online"})]})},S=function(p,l){var c=(0,a.useBackend)(l),m=c.data,i=m.rpm,d=m.temperature,u=m.power,s=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[i," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[d," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[u," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:s,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(s)+"%"})})]})}},30778:function(I,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(28823),a=n(72026),t=n(90955),o=n(37843),f=n(91819),V=n(2971),k=n(84947),S=n(22677),y=function(g){switch(g){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,s);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},p=r.Uplink=function(){function v(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cart,L=(0,f.useLocalState)(C,"tabIndex",0),w=L[0],T=L[1],A=(0,f.useLocalState)(C,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,k.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,S.ComplexModal),(0,e.createComponentVNode)(2,k.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Tabs,{children:[(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===0,onClick:function(){function P(){T(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===1,onClick:function(){function P(){T(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart"," ",B&&B.length?"("+B.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:w===2,onClick:function(){function P(){T(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,V.Tabs.Tab,{onClick:function(){function P(){return N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:y(w)})]})})]})}return v}(),l=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.crystals,L=b.cats,w=(0,f.useLocalState)(C,"uplinkItems",L[0].items),T=w[0],A=w[1],x=(0,f.useLocalState)(C,"searchText",""),E=x[0],P=x[1],R=function(K,_){_===void 0&&(_="");var $=(0,o.createSearch)(_,function(z){var Y=z.hijack_only===1?"|hijack":"";return z.name+"|"+z.desc+"|"+z.cost+"tc"+Y});return(0,t.flow)([(0,a.filter)(function(z){return z==null?void 0:z.name}),_&&(0,a.filter)($),(0,a.sortBy)(function(z){return z==null?void 0:z.name})])(K)},M=function(K){if(P(K),K==="")return A(L[0].items);A(R(L.map(function(_){return _.items}).flat(),K))},D=(0,f.useLocalState)(C,"showDesc",1),j=D[0],F=D[1];return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,V.Stack.Item,{children:(0,e.createComponentVNode)(2,V.Section,{title:"Current Balance: "+B+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button.Checkbox,{content:"Show Descriptions",checked:j,onClick:function(){function W(){return F(!j)}return W}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Random Item",icon:"question",onClick:function(){function W(){return N("buyRandom")}return W}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function W(){return N("refund")}return W}()})],4),children:(0,e.createComponentVNode)(2,V.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function W(K,_){M(_)}return W}(),value:E})})})}),(0,e.createComponentVNode)(2,V.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V.Tabs,{vertical:!0,children:L.map(function(W){return(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:E!==""?!1:W.items===T,onClick:function(){function K(){A(W.items),P("")}return K}(),children:W.cat},W)})})})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:T.map(function(W){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:W,showDecription:j},(0,o.decodeHtmlEntities)(W.name))},(0,o.decodeHtmlEntities)(W.name))})})})})]})]})},c=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cart,L=b.crystals,w=b.cart_price,T=(0,f.useLocalState)(C,"showDesc",0),A=T[0],x=T[1];return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+L+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,V.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return N("empty_cart")}return E}(),disabled:!B}),(0,e.createComponentVNode)(2,V.Button,{content:"Purchase Cart ("+w+"TC)",icon:"shopping-cart",onClick:function(){function E(){return N("purchase_cart")}return E}(),disabled:!B||w>L})],4),children:(0,e.createComponentVNode)(2,V.Stack,{vertical:!0,children:B?B.map(function(E){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,u,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,V.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,m)]})},m=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.cats,L=b.lucky_numbers;return(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,V.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function w(){return N("shuffle_lucky_numbers")}return w}()}),children:(0,e.createComponentVNode)(2,V.Stack,{wrap:!0,children:L.map(function(w){return B[w.cat].items[w.item]}).filter(function(w){return w!=null}).map(function(w,T){return(0,e.createComponentVNode)(2,V.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,i,{grow:!0,i:w})},T)})})})})},i=function(g,C){var h=g.i,N=g.showDecription,b=N===void 0?1:N,B=g.buttons,L=B===void 0?(0,e.createComponentVNode)(2,d,{i:h}):B;return(0,e.createComponentVNode)(2,V.Section,{title:(0,o.decodeHtmlEntities)(h.name),showBottom:b,buttons:L,children:b?(0,e.createComponentVNode)(2,V.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(h.desc)}):null})},d=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=g.i,L=b.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,V.Button,{icon:"shopping-cart",color:B.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function w(){return N("add_to_cart",{item:B.obj_path})}return w}(),disabled:B.cost>L}),(0,e.createComponentVNode)(2,V.Button,{content:"Buy ("+B.cost+"TC)"+(B.refundable?" [Refundable]":""),color:B.hijack_only===1&&"red",tooltip:B.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function w(){return N("buyItem",{item:B.obj_path})}return w}(),disabled:B.cost>L})],4)},u=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=g.i,L=b.exploitable;return(0,e.createComponentVNode)(2,V.Stack,{children:[(0,e.createComponentVNode)(2,V.Button,{icon:"times",content:"("+B.cost*B.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function w(){return N("remove_from_cart",{item:B.obj_path})}return w}()}),(0,e.createComponentVNode)(2,V.Button,{icon:"minus",tooltip:B.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function w(){return N("set_cart_item_quantity",{item:B.obj_path,quantity:--B.amount})}return w}(),disabled:B.amount<=0}),(0,e.createComponentVNode)(2,V.Button.Input,{content:B.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:B.limit===0&&"Discount already redeemed!",onCommit:function(){function w(T,A){return N("set_cart_item_quantity",{item:B.obj_path,quantity:A})}return w}(),disabled:B.limit!==-1&&B.amount>=B.limit&&B.amount<=0}),(0,e.createComponentVNode)(2,V.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:B.limit===0&&"Discount already redeemed!",onClick:function(){function w(){return N("set_cart_item_quantity",{item:B.obj_path,quantity:++B.amount})}return w}(),disabled:B.limit!==-1&&B.amount>=B.limit})]})},s=function(g,C){var h=(0,f.useBackend)(C),N=h.act,b=h.data,B=b.exploitable,L=(0,f.useLocalState)(C,"selectedRecord",B[0]),w=L[0],T=L[1],A=(0,f.useLocalState)(C,"searchText",""),x=A[0],E=A[1],P=function(D,j){j===void 0&&(j="");var F=(0,o.createSearch)(j,function(W){return W.name});return(0,t.flow)([(0,a.filter)(function(W){return W==null?void 0:W.name}),j&&(0,a.filter)(F),(0,a.sortBy)(function(W){return W.name})])(D)},R=P(B,x);return(0,e.createComponentVNode)(2,V.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,V.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,V.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(D,j){return E(j)}return M}()}),(0,e.createComponentVNode)(2,V.Tabs,{vertical:!0,children:R.map(function(M){return(0,e.createComponentVNode)(2,V.Tabs.Tab,{selected:M===w,onClick:function(){function D(){return T(M)}return D}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,V.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V.Section,{fill:!0,scrollable:!0,title:w.name,children:(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Age",children:w.age}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Fingerprint",children:w.fingerprint}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Rank",children:w.rank}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Sex",children:w.sex}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Species",children:w.species})]})})})]})}},7307:function(I,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=S.product,i=S.productStock,d=S.productImage,u=c.chargesMoney,s=c.user,v=c.usermoney,g=c.inserted_cash,C=c.vend_ready,h=c.inserted_item_name,N=!u||m.price===0,b="ERROR!",B="";N?(b="FREE",B="arrow-circle-down"):(b=m.price,B="shopping-cart");var L=!C||i===0||!N&&m.price>v&&m.price>g;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:i<=0&&"bad"||i<=m.max_amount/2&&"average"||"good",children:[i," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:B,content:b,textAlign:"left",onClick:function(){function w(){return l("vend",{inum:m.inum})}return w}()})})]})},V=r.Vending=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.user,i=c.usermoney,d=c.inserted_cash,u=c.chargesMoney,s=c.product_records,v=s===void 0?[]:s,g=c.hidden_records,C=g===void 0?[]:g,h=c.stock,N=c.vend_ready,b=c.inserted_item_name,B=c.panel_open,L=c.speaker,w=c.imagelist,T;return T=[].concat(v),c.extended_inventory&&(T=[].concat(T,C)),T=T.filter(function(A){return!!A}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((u?171:89)+T.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!b&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,b,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function A(){return l("eject_item",{})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!d,icon:"money-bill-wave-alt",content:d?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,d,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:d?"Dispense Change":null,textAlign:"left",onClick:function(){function A(){return l("change")}return A}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),","," ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[i,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!B&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:L?"check":"volume-mute",selected:L,content:"Speaker",textAlign:"left",onClick:function(){function A(){return l("toggle_voice",{})}return A}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:T.map(function(A){return(0,e.createComponentVNode)(2,f,{product:A,productStock:h[A.name],productImage:w[A.path]},A.name)})})})})]})})})}return k}()},25485:function(I,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.VolumeMixer=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(m,i){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:i>0&&"0.5rem",children:m.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return p("volume",{channel:m.num,volume:0})}return d}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:m.volume,onChange:function(){function d(u,s){return p("volume",{channel:m.num,volume:s})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function d(){return p("volume",{channel:m.num,volume:100})}return d}()})})})]})})],4,m.num)})})})})}return V}()},26564:function(I,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.VotePanel=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.remaining,m=l.question,i=l.choices,d=l.user_vote,u=l.counts,s=l.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,lineHeight:3,color:"translucent",multiLine:v,content:v+(s?" ("+(u[v]||0)+")":""),onClick:function(){function g(){return p("vote",{target:v})}return g}(),selected:v===d})},v)})]})})})}return V}()},496:function(I,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.Wires=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.wires||[],m=l.status||[],i=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:i,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:d.color_name,labelColor:d.seen_color,color:d.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:d.cut?"Mend":"Cut",onClick:function(){function u(){return p("cut",{wire:d.color})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function u(){return p("pulse",{wire:d.color})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:d.attached?"Detach":"Attach",onClick:function(){function u(){return p("attach",{wire:d.color})}return u}()})],4),children:!!d.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),d.wire,(0,e.createTextVNode)(")")],0)},d.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:d},d)})})})]})})})}return V}()},28919:function(I,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(84947),f=r.WizardApprenticeContract=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("fire")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("translocation")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("restoration")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("stealth")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping. ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return p("honk")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return V}()},14635:function(I,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971);function f(p,l){var c=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(c)return(c=c.call(p)).next.bind(c);if(Array.isArray(p)||(c=V(p))||l&&p&&typeof p.length=="number"){c&&(p=c);var m=0;return function(){return m>=p.length?{done:!0}:{done:!1,value:p[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V(p,l){if(p){if(typeof p=="string")return k(p,l);var c=Object.prototype.toString.call(p).slice(8,-1);if(c==="Object"&&p.constructor&&(c=p.constructor.name),c==="Map"||c==="Set")return Array.from(p);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return k(p,l)}}function k(p,l){(l==null||l>p.length)&&(l=p.length);for(var c=0,m=new Array(l);c0&&!b.includes(j.ref)&&!h.includes(j.ref),checked:h.includes(j.ref),onClick:function(){function F(){return B(j.ref)}return F}()},j.desc)})]})]})})}return p}()},29136:function(I,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971),f=function(S,y,p,l,c){return Sl?"average":S>c?"bad":"good"},V=r.AtmosScan=function(){function k(S,y){var p=S.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(l){return l.val!=="0"||l.entry==="Pressure"||l.entry==="Temperature"})(p).map(function(l){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:l.entry,color:f(l.val,l.bad_low,l.poor_low,l.poor_high,l.bad_high),children:[l.val,l.units]},l.entry)})})})}return k}()},83326:function(I,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(28823),a=n(2971),t=n(64635),o=function(k){return k+" unit"+(k===1?"":"s")},f=r.BeakerContents=function(){function V(k){var S=k.beakerLoaded,y=k.beakerContents,p=y===void 0?[]:y,l=k.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!S&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||p.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),p.map(function(c,m){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!l&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:l(c,m)})]},c.name)})]})}return V}();f.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},86041:function(I,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.BotStatus=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.locked,c=p.noaccess,m=p.maintpanel,i=p.on,d=p.autopatrol,u=p.canhack,s=p.emagged,v=p.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",l?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"On":"Off",selected:i,disabled:c,onClick:function(){function g(){return y("power")}return g}()})}),d!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){function g(){return y("autopatrol")}return g}()})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:s?"bad":"good",children:s?"DISABLED!":"Enabled"})}),!!u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:s?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function g(){return y("hack")}return g}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!v,content:"AI Remote Control",disabled:c,onClick:function(){function g(){return y("disableremote")}return g}()})})]})})],4)}return f}()},22677:function(I,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(28823),a=n(91819),t=n(2971),o={},f=r.modalOpen=function(){function p(l,c,m){var i=(0,a.useBackend)(l),d=i.act,u=i.data,s=Object.assign(u.modal?u.modal.args:{},m||{});d("modal_open",{id:c,arguments:JSON.stringify(s)})}return p}(),V=r.modalRegisterBodyOverride=function(){function p(l,c){o[l]=c}return p}(),k=r.modalAnswer=function(){function p(l,c,m,i){var d=(0,a.useBackend)(l),u=d.act,s=d.data;if(s.modal){var v=Object.assign(s.modal.args||{},i||{});u("modal_answer",{id:c,answer:m,arguments:JSON.stringify(v)})}}return p}(),S=r.modalClose=function(){function p(l,c){var m=(0,a.useBackend)(l),i=m.act;i("modal_close",{id:c})}return p}(),y=r.ComplexModal=function(){function p(l,c){var m=(0,a.useBackend)(c),i=m.data;if(i.modal){var d=i.modal,u=d.id,s=d.text,v=d.type,g,C=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function w(){return S(c)}return w}()}),h,N,b="auto";if(o[u])h=o[u](i.modal,c);else if(v==="input"){var B=i.modal.value;g=function(){function w(T){return k(c,u,B)}return w}(),h=(0,e.createComponentVNode)(2,t.Input,{value:i.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function w(T,A){B=A}return w}()}),N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function w(){return S(c)}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function w(){return k(c,u,B)}return w}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(v==="choice"){var L=typeof i.modal.choices=="object"?Object.values(i.modal.choices):i.modal.choices;h=(0,e.createComponentVNode)(2,t.Dropdown,{options:L,selected:i.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function w(T){return k(c,u,T)}return w}()}),b="initial"}else v==="bento"?h=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:i.modal.choices.map(function(w,T){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:T+1===parseInt(i.modal.value,10),onClick:function(){function A(){return k(c,u,T+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:w})})},T)})}):v==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:i.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function w(){return k(c,u,0)}return w}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:i.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function w(){return k(c,u,1)}return w}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:l.maxWidth||window.innerWidth/2+"px",maxHeight:l.maxHeight||window.innerHeight/2+"px",onEnter:g,mx:"auto",overflowY:b,"padding-bottom":"5px",children:[s&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:s}),o[u]&&C,h,N]})}}return p}()},692:function(I,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(37843),f=n(30381),V=f.COLORS.department,k=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],S=function(m){return k.indexOf(m)!==-1?"green":"orange"},y=function(m){if(k.indexOf(m)!==-1)return!0},p=function(m){return m.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{color:S(i.rank),bold:y(i.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.active})]},i.name+i.rank)})]})},l=r.CrewManifest=function(){function c(m,i){var d=(0,a.useBackend)(i),u=d.act,s;if(m.data)s=m.data;else{var v=(0,a.useBackend)(i),g=v.data;s=g}var C=s,h=C.manifest,N=h.heads,b=h.sec,B=h.eng,L=h.med,w=h.sci,T=h.ser,A=h.sup,x=h.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:p(N)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:p(b)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:p(B)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:p(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:p(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:p(T)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:V.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:p(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:p(x)})]})}return c}()},98658:function(I,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(28823),a=n(2971),t=n(91819),o=r.InputButtons=function(){function f(V,k){var S=(0,t.useBackend)(k),y=S.act,p=S.data,l=p.large_buttons,c=p.swapped_buttons,m=V.input,i=V.message,d=V.disabled,u=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!l,fluid:!!l,onClick:function(){function v(){return y("submit",{entry:m})}return v}(),textAlign:"center",tooltip:l&&i,disabled:d,width:!l&&6}),s=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!l,fluid:!!l,onClick:function(){function v(){return y("cancel")}return v}(),textAlign:"center",width:!l&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s}),!l&&i&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:i})}),l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:u}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:u})]})}return f}()},29723:function(I,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.InterfaceLockNoticeBox=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=V.siliconUser,c=l===void 0?p.siliconUser:l,m=V.locked,i=m===void 0?p.locked:m,d=V.normallyLocked,u=d===void 0?p.normallyLocked:d,s=V.onLockStatusChange,v=s===void 0?function(){return y("lock")}:s,g=V.accessText,C=g===void 0?"an ID card":g;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:u?"red":"green",icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",onClick:function(){function h(){v&&v(!i)}return h}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",C," to ",i?"unlock":"lock"," this interface."]})}return f}()},2146:function(I,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(28823),a=n(58331),t=n(2971),o=r.Loader=function(){function f(V){var k=V.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(k)*100+"%"}}),2)}return f}()},51185:function(I,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LoginInfo=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.loginState;if(p)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",l.name," (",l.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!l.id,content:"Eject ID",color:"good",onClick:function(){function c(){return y("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return y("login_logout")}return c}()})]})]})})}return f}()},69774:function(I,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.LoginScreen=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.loginState,c=p.isAI,m=p.isRobot,i=p.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){function d(){return y("login_insert")}return d}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){function d(){return y("login_login",{login_type:1})}return d}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function d(){return y("login_login",{login_type:2})}return d}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function d(){return y("login_login",{login_type:3})}return d}()}),!!i&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function d(){return y("login_login",{login_type:4})}return d}()})]})})})}return f}()},48154:function(I,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(28823),a=n(2971),t=n(64635),o=r.Operating=function(){function f(V){var k=V.operating,S=V.name;if(k)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",S," is processing..."]})})})}return f}();o.propTypes={operating:t.bool,name:t.string}},92149:function(I,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=r.Signaler=function(){function V(k,S){var y=(0,t.useBackend)(S),p=y.act,l=k.data,c=l.code,m=l.frequency,i=l.minFrequency,d=l.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:i/10,maxValue:d/10,value:m/10,format:function(){function u(s){return(0,a.toFixed)(s,1)}return u}(),width:"80px",onDrag:function(){function u(s,v){return p("freq",{freq:v})}return u}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function u(s,v){return p("code",{code:v})}return u}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function u(){return p("signal")}return u}()})]})}return V}()},79969:function(I,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(28823),a=n(91819),t=n(37843),o=n(90955),f=n(72026),V=n(2971),k=r.SimpleRecords=function(){function p(l,c){var m=l.data.records;return(0,e.createComponentVNode)(2,V.Box,{children:m?(0,e.createComponentVNode)(2,y,{data:l.data,recordType:l.recordType}):(0,e.createComponentVNode)(2,S,{data:l.data})})}return p}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=l.data.recordsList,u=(0,a.useLocalState)(c,"searchText",""),s=u[0],v=u[1],g=function(N,b){b===void 0&&(b="");var B=(0,t.createSearch)(b,function(L){return L.Name});return(0,o.flow)([(0,f.filter)(function(L){return L==null?void 0:L.Name}),b&&(0,f.filter)(B),(0,f.sortBy)(function(L){return L.Name})])(d)},C=g(d,s);return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createComponentVNode)(2,V.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function h(N,b){return v(b)}return h}()}),C.map(function(h){return(0,e.createComponentVNode)(2,V.Box,{children:(0,e.createComponentVNode)(2,V.Button,{mb:.5,content:h.Name,icon:"user",onClick:function(){function N(){return i("Records",{target:h.uid})}return N}()})},h)})]})},y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,d=l.data.records,u=d.general,s=d.medical,v=d.security,g;switch(l.recordType){case"MED":g=(0,e.createComponentVNode)(2,V.Section,{level:2,title:"Medical Data",children:s?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Blood Type",children:s.blood_type}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Minor Disabilities",children:s.mi_dis}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.mi_dis_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Major Disabilities",children:s.ma_dis}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.ma_dis_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Allergies",children:s.alg}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.alg_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Current Diseases",children:s.cdi}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:s.cdi_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Important Notes",children:s.notes})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":g=(0,e.createComponentVNode)(2,V.Section,{level:2,title:"Security Data",children:v?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Criminal Status",children:v.criminal}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Minor Crimes",children:v.mi_crim}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:v.mi_crim_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Major Crimes",children:v.ma_crim}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Details",children:v.ma_crim_d}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Important Notes",children:v.notes})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,V.Box,{children:[(0,e.createComponentVNode)(2,V.Section,{title:"General Data",children:u?(0,e.createComponentVNode)(2,V.LabeledList,{children:[(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Name",children:u.name}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Sex",children:u.sex}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Species",children:u.species}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Age",children:u.age}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Rank",children:u.rank}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Fingerprint",children:u.fingerprint}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Physical Status",children:u.p_stat}),(0,e.createComponentVNode)(2,V.LabeledList.Item,{label:"Mental Status",children:u.m_stat})]}):(0,e.createComponentVNode)(2,V.Box,{color:"red",bold:!0,children:"General record lost!"})}),g]})}},76519:function(I,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.TemporaryNotice=function(){function f(V,k){var S,y=(0,a.useBackend)(k),p=y.act,l=y.data,c=l.temp;if(c){var m=(S={},S[c.style]=!0,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function i(){return p("cleartemp")}return i}()})})]})})))}}return f}()},98638:function(I,r,n){"use strict";r.__esModule=!0,r.pai_atmosphere=void 0;var e=n(28823),a=n(91819),t=n(29136),o=r.pai_atmosphere=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:p.app_data})}return f}()},56601:function(I,r,n){"use strict";r.__esModule=!0,r.pai_bioscan=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_bioscan=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.holder,m=l.dead,i=l.health,d=l.brute,u=l.oxy,s=l.tox,v=l.burn,g=l.temp;return c?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:m?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"Dead"}):(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"green",children:"Alive"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:0,max:1,value:i/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"blue",children:u})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxin Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"green",children:s})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:v})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",children:(0,e.createComponentVNode)(2,t.Box,{color:"red",children:d})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Error: No biological host found."})}return f}()},48047:function(I,r,n){"use strict";r.__esModule=!0,r.pai_directives=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_directives=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.master,m=l.dna,i=l.prime,d=l.supplemental;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master",children:c?c+" ("+m+")":"None"}),c&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Request DNA",children:(0,e.createComponentVNode)(2,t.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){function u(){return y("getdna")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Prime Directive",children:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Supplemental Directives",children:d||"None"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}return f}()},4646:function(I,r,n){"use strict";r.__esModule=!0,r.pai_doorjack=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_doorjack=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.cable,m=l.machine,i=l.inprogress,d=l.progress,u=l.aborted,s;m?s=(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Connected"}):s=(0,e.createComponentVNode)(2,t.Button,{content:c?"Extended":"Retracted",color:c?"orange":null,onClick:function(){function g(){return y("cable")}return g}()});var v;return m&&(v=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hack",children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:d,maxValue:100}),i?(0,e.createComponentVNode)(2,t.Button,{mt:1,color:"red",content:"Abort",onClick:function(){function g(){return y("cancel")}return g}()}):(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Start",onClick:function(){function g(){return y("jack")}return g}()})]})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cable",children:s}),v]})}return f}()},94648:function(I,r,n){"use strict";r.__esModule=!0,r.pai_main_menu=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pai_main_menu=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data,c=l.available_software,m=l.installed_software,i=l.installed_toggles,d=l.available_ram,u=l.emotions,s=l.current_emotion,v=l.speech_verbs,g=l.current_speech_verb,C=l.available_chassises,h=l.current_chassis,N=[];return m.map(function(b){return N[b.key]=b.name}),i.map(function(b){return N[b.key]=b.name}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available RAM",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Software",children:[c.filter(function(b){return!N[b.key]}).map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name+" ("+b.cost+")",icon:b.icon,disabled:b.cost>d,onClick:function(){function B(){return y("purchaseSoftware",{key:b.key})}return B}()},b.key)}),c.filter(function(b){return!N[b.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[m.filter(function(b){return b.key!=="mainmenu"}).map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,icon:b.icon,onClick:function(){function B(){return y("startSoftware",{software_key:b.key})}return B}()},b.key)}),m.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[i.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,icon:b.icon,selected:b.active,onClick:function(){function B(){return y("setToggle",{toggle_key:b.key})}return B}()},b.key)}),i.length===0&&"No toggles installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Emotion",children:u.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.id===s,onClick:function(){function B(){return y("setEmotion",{emotion:b.id})}return B}()},b.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Speaking State",children:v.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.name===g,onClick:function(){function B(){return y("setSpeechStyle",{speech_state:b.name})}return B}()},b.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Chassis Type",children:C.map(function(b){return(0,e.createComponentVNode)(2,t.Button,{content:b.name,selected:b.icon===h,onClick:function(){function B(){return y("setChassis",{chassis_to_change:b.icon})}return B}()},b.id)})})]})})}return f}()},45549:function(I,r,n){"use strict";r.__esModule=!0,r.pai_manifest=void 0;var e=n(28823),a=n(91819),t=n(692),o=r.pai_manifest=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:p.app_data})}return f}()},53434:function(I,r,n){"use strict";r.__esModule=!0,r.pai_medrecords=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pai_medrecords=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y.app_data,recordType:"MED"})}return f}()},7328:function(I,r,n){"use strict";r.__esModule=!0,r.pai_messenger=void 0;var e=n(28823),a=n(91819),t=n(38467),o=r.pai_messenger=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.app_data.active_convo;return l?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:p.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:p.app_data})}return f}()},32036:function(I,r,n){"use strict";r.__esModule=!0,r.pai_radio=void 0;var e=n(28823),a=n(91819),t=n(58331),o=n(2971),f=r.pai_radio=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.app_data,m=c.minFrequency,i=c.maxFrequency,d=c.frequency,u=c.broadcasting;return(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:m/10,maxValue:i/10,value:d/10,format:function(){function s(v){return(0,t.toFixed)(v,1)}return s}(),onChange:function(){function s(v,g){return p("freq",{freq:g})}return s}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function s(){return p("freq",{freq:"145.9"})}return s}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function s(){return p("toggleBroadcast")}return s}(),selected:u,content:u?"Enabled":"Disabled"})})]})}return V}()},76020:function(I,r,n){"use strict";r.__esModule=!0,r.pai_secrecords=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pai_secrecords=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y.app_data,recordType:"SEC"})}return f}()},11562:function(I,r,n){"use strict";r.__esModule=!0,r.pai_signaler=void 0;var e=n(28823),a=n(91819),t=n(92149),o=r.pai_signaler=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:p.app_data})}return f}()},29539:function(I,r,n){"use strict";r.__esModule=!0,r.pda_atmos_scan=void 0;var e=n(28823),a=n(91819),t=n(29136),o=r.pda_atmos_scan=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:y})}return f}()},92180:function(I,r,n){"use strict";r.__esModule=!0,r.pda_janitor=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pda_janitor=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data,l=p.janitor,c=l.user_loc,m=l.mops,i=l.buckets,d=l.cleanbots,u=l.carts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:m.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - ",s.status]},s)})}),i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:i.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - [",s.volume,"/",s.max_volume,"]"]},s)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:d.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - ",s.status]},s)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Box,{children:[s.x,",",s.y," (",s.dir,") - [",s.volume,"/",s.max_volume,"]"]},s)})})]})}return f}()},57725:function(I,r,n){"use strict";r.__esModule=!0,r.pda_main_menu=void 0;var e=n(28823),a=n(58331),t=n(91819),o=n(2971),f=r.pda_main_menu=function(){function V(k,S){var y=(0,t.useBackend)(S),p=y.act,l=y.data,c=l.owner,m=l.ownjob,i=l.idInserted,d=l.categories,u=l.pai,s=l.notifying;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",color:"average",children:[c,", ",m]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!i,onClick:function(){function v(){return p("UpdateInfo")}return v}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:d.map(function(v){var g=l.apps[v];return!g||!g.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:v,children:g.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{icon:C.uid in s?C.notify_icon:C.icon,iconSpin:C.uid in s,color:C.uid in s?"red":"transparent",content:C.name,onClick:function(){function h(){return p("StartProgram",{program:C.uid})}return h}()},C.uid)})},v)})})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!u&&(0,e.createComponentVNode)(2,o.Section,{title:"pAI",children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){function v(){return p("pai",{option:1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function v(){return p("pai",{option:2})}return v}()})]})})]})}return V}()},29978:function(I,r,n){"use strict";r.__esModule=!0,r.pda_manifest=void 0;var e=n(28823),a=n(91819),t=n(692),o=r.pda_manifest=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.act,p=S.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return f}()},20567:function(I,r,n){"use strict";r.__esModule=!0,r.pda_medical=void 0;var e=n(28823),a=n(91819),t=n(79969),o=r.pda_medical=function(){function f(V,k){var S=(0,a.useBackend)(k),y=S.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:y,recordType:"MED"})}return f}()},38467:function(I,r,n){"use strict";r.__esModule=!0,r.pda_messenger=r.MessengerList=r.ActiveConversation=void 0;var e=n(28823),a=n(72026),t=n(91819),o=n(2971),f=r.pda_messenger=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,d=i.active_convo;return d?(0,e.createComponentVNode)(2,V,{data:i}):(0,e.createComponentVNode)(2,k,{data:i})}return y}(),V=r.ActiveConversation=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=i.convo_name,u=i.convo_job,s=i.messages,v=i.active_convo,g=(0,t.useLocalState)(l,"clipboardMode",!1),C=g[0],h=g[1],N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+u+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function b(){return h(!C)}return b}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function b(){return m("Message",{target:v})}return b}(),content:"Reply"})],4),children:(0,a.filter)(function(b){return b.target===v})(s).map(function(b,B){return(0,e.createComponentVNode)(2,o.Box,{textAlign:b.sent?"right":"left",position:"relative",mb:1,children:[(0,e.createComponentVNode)(2,o.Icon,{fontSize:2.5,color:b.sent?"#4d9121":"#cd7a0d",position:"absolute",left:b.sent?null:"0px",right:b.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:b.sent?"scale(-1, 1)":null},name:"comment"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,backgroundColor:b.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:b.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[b.sent?"You:":"Them:"," ",b.message]})]},B)})});return C&&(N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+d+" ("+u+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function b(){return h(!C)}return b}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function b(){return m("Message",{target:v})}return b}(),content:"Reply"})],4),children:(0,a.filter)(function(b){return b.target===v})(s).map(function(b,B){return(0,e.createComponentVNode)(2,o.Box,{color:b.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[b.sent?"You:":"Them:"," ",(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:b.message})]},B)})})),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:.5,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:(0,e.createComponentVNode)(2,o.Button.Confirm,{content:"Delete Conversations",confirmContent:"Are you sure?",icon:"trash",confirmIcon:"trash",onClick:function(){function b(){return m("Clear",{option:"Convo"})}return b}()})})})}),N]})}return y}(),k=r.MessengerList=function(){function y(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=i.convopdas,u=i.pdas,s=i.charges,v=i.silent,g=i.toff,C=i.ringtone_list,h=i.ringtone,N=(0,t.useLocalState)(l,"searchTerm",""),b=N[0],B=N[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mb:5,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Messenger Functions",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!v,icon:v?"volume-mute":"volume-up",onClick:function(){function L(){return m("Toggle Ringer")}return L}(),children:["Ringer: ",v?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:g?"bad":"green",icon:"power-off",onClick:function(){function L(){return m("Toggle Messenger")}return L}(),children:["Messenger: ",g?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function L(){return m("Clear",{option:"All"})}return L}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function L(){return m("Ringtone")}return L}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Button,{children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:h,width:"100px",options:Object.keys(C),onSelected:function(){function L(w){return m("Available_Ringtones",{selected_ringtone:w})}return L}()})})]})}),!g&&(0,e.createComponentVNode)(2,o.Box,{children:[!!s&&(0,e.createComponentVNode)(2,o.Box,{mt:.5,mb:1,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cartridge Special Function",children:[s," charges left."]})})}),!d.length&&!u.length&&(0,e.createComponentVNode)(2,o.Box,{children:"No current conversations"})||(0,e.createComponentVNode)(2,o.Box,{children:["Search:"," ",(0,e.createComponentVNode)(2,o.Input,{mt:.5,value:b,onInput:function(){function L(w,T){B(T)}return L}()})]})]})||(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Messenger Offline."})]}),(0,e.createComponentVNode)(2,S,{title:"Current Conversations",data:i,pdas:d,msgAct:"Select Conversation",searchTerm:b}),(0,e.createComponentVNode)(2,S,{title:"Other PDAs",pdas:u,msgAct:"Message",data:i,searchTerm:b})]})}return y}(),S=function(p,l){var c=(0,t.useBackend)(l),m=c.act,i=p.data,d=p.pdas,u=p.title,s=p.msgAct,v=p.searchTerm,g=i.charges,C=i.plugins;return!d||!d.length?(0,e.createComponentVNode)(2,o.Section,{title:u,children:"No PDAs found."}):(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:u,children:d.filter(function(h){return h.Name.toLowerCase().includes(v.toLowerCase())}).map(function(h){return(0,e.createComponentVNode)(2,o.Stack,{m:.5,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"arrow-circle-down",content:h.Name,onClick:function(){function N(){return m(s,{target:h.uid})}return N}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!g&&C.map(function(N){return(0,e.createComponentVNode)(2,o.Button,{icon:N.icon,content:N.name,onClick:function(){function b(){return m("Messenger Plugin",{plugin:N.uid,target:h.uid})}return b}()},N.uid)})})]},h.uid)})})}},54291:function(I,r,n){"use strict";r.__esModule=!0,r.pda_mob_hunt=void 0;var e=n(28823),a=n(91819),t=n(2971),o=n(96820),f=r.pda_mob_hunt=function(){function V(k,S){var y=(0,a.useBackend)(S),p=y.act,l=y.data,c=l.connected,m=l.wild_captures,i=l.no_collection,d=l.entry;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connection Status",children:c?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:["Connected",(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){function u(){return p("Disconnect")}return u}()})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:["Disconnected",(0,e.createComponentVNode)(2,t.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){function u(){return p("Reconnect")}return u}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Wild Captures",children:m})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Collection",mt:2,buttons:(0,e.createComponentVNode)(2,t.Box,{children:!i&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Previous",icon:"arrow-left",onClick:function(){function u(){return p("Prev")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Next",icon:"arrow-right",onClick:function(){function u(){return p("Next")}return u}()})]})}),children:i?"Your collection is empty! Go capture some Nano-Mobs!":d?(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createVNode)(1,"img",null,null,1,{src:(0,o.resolveAsset)(d.sprite),style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,basis:0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.nickname&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nickname",children:d.nickname}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:d.real_name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Primary Type",children:d.type1}),d.type2&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Secondary Type",children:d.type2}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sd-card",onClick:function(){function u(){return p("Transfer")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Release",icon:"arrow-up",onClick:function(){function u(){return p("Release")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){function u(){return p("Rename")}return u}()}),!!d.is_hacked&&(0,e.createComponentVNode)(2,t.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){function u(){return p("Set_Trap")}return u}()})]})]})})]}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Mob entry missing!"})})]})}return V}()},31112:function(I,r,n){"use strict";r.__esModule=!0,r.pda_mule=void 0;var e=n(28823),a=n(91819),t=n(2971),o=r.pda_mule=function(){function k(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.active;return(0,e.createComponentVNode)(2,t.Box,{children:i?(0,e.createComponentVNode)(2,V):(0,e.createComponentVNode)(2,f)})}return k}(),f=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.bots;return i.map(function(d){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:d.Name,icon:"cog",onClick:function(){function u(){return l("control",{bot:d.uid})}return u}()})},d.Name)})},V=function(S,y){var p=(0,a.useBackend)(y),l=p.act,c=p.data,m=c.mulebot,i=m.botstatus,d=m.active,u=i.mode,s=i.loca,v=i.load,g=i.powr,C=i.dest,h=i.home,N=i.retn,b=i.pick,B;switch(u){case 0:B="Ready";break;case 1:B="Loading/Unloading";break;case 2:case 12:B="Navigating to delivery location";break;case 3:B="Navigating to Home";break;case 4:B="Waiting for clear path";break;case 5:case 6:B="Calculating navigation path";break;case 7:B="Unable to locate destination";break;default:B=u;break}return(0,e.createComponentVNode)(2,t.Section,{title:d,children:[u===-1&&(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:B}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[g,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:h}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:C?C+" (Set)":"None (Set)",onClick:function(){function L(){return l("target")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Unload)":"None",disabled:!v,onClick:function(){function L(){return l("unload")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Pickup",children:(0,e.createComponentVNode)(2,t.Button,{content:b?"Yes":"No",selected:b,onClick:function(){function L(){return l("set_pickup_type",{autopick:b?0:1})}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto Return",children:(0,e.createComponentVNode)(2,t.Button,{content:N?"Yes":"No",selected:N,onClick:function(){function L(){return l("set_auto_return",{autoret:N?0:1})}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Stop",icon:"stop",onClick:function(){function L(){return l("stop")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function L(){return l("start")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function L(){return l("home")}return L}()})]})]})]})}},2817:function(I,r,n){"use strict";r.__esModule=!0,r.pda_nanobank=void 0;var e=n(28823),a=n(37843),t=n(91819),o=n(2971),f=r.pda_nanobank=function(){function c(m,i){var d=(0,t.useBackend)(i),u=d.act,s=d.data,v=s.logged_in,g=s.owner_name,C=s.money;return v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Name",children:g}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",C]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,V),(0,e.createComponentVNode)(2,k)]})],4):(0,e.createComponentVNode)(2,l)}return c}(),V=function(m,i){var d=(0,t.useBackend)(i),u=d.data,s=(0,t.useLocalState)(i,"tabIndex",1),v=s[0],g=s[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===1,onClick:function(){function C(){return g(1)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===2,onClick:function(){function C(){return g(2)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===3,onClick:function(){function C(){return g(3)}return C}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]})]})},k=function(m,i){var d=(0,t.useLocalState)(i,"tabIndex",1),u=d[0],s=(0,t.useBackend)(i),v=s.data,g=v.db_status;if(!g)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(u){case 1:return(0,e.createComponentVNode)(2,S);case 2:return(0,e.createComponentVNode)(2,y);case 3:return(0,e.createComponentVNode)(2,p);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},S=function(m,i){var d,u=(0,t.useBackend)(i),s=u.act,v=u.data,g=v.requests,C=v.available_accounts,h=v.money,N=(0,t.useLocalState)(i,"selectedAccount"),b=N[0],B=N[1],L=(0,t.useLocalState)(i,"transferAmount"),w=L[0],T=L[1],A=(0,t.useLocalState)(i,"searchText",""),x=A[0],E=A[1],P=[];return C.map(function(R){return P[R.name]=R.UID}),(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account",children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account name",onInput:function(){function R(M,D){return E(D)}return R}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:C.filter((0,a.createSearch)(x,function(R){return R.name})).map(function(R){return R.name}),selected:(d=C.filter(function(R){return R.UID===b})[0])==null?void 0:d.name,onSelected:function(){function R(M){return B(P[M])}return R}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function R(M,D){return T(D)}return R}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,o.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:h0&&s.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["#",g.Number,' - "',g.Name,'" for "',g.OrderedBy,'"']},g)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:u>0&&d.map(function(g){return(0,e.createComponentVNode)(2,t.Box,{children:["#",g.Number,' - "',g.Name,'" for "',g.ApprovedBy,'"']},g)})})]})}return f}()},73786:function(I,r,n){"use strict";r.__esModule=!0,r.Layout=void 0;var e=n(28823),a=n(66586),t=n(93843),o=n(33053),f=["className","theme","children"],V=["className","scrollable","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT