l(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function l(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var a,u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,s=c.now();t.unstable_now=function(){return c.now()-s}}var f=[],d=[],p=1,h=null,m=3,y=!1,g=!1,v=!1,b=!1,w="function"==typeof setTimeout?setTimeout:null,S="function"==typeof clearTimeout?clearTimeout:null,O="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=o(d);null!==t;){if(null===t.callback)i(d);else if(t.startTime<=e)i(d),t.sortIndex=t.expirationTime,r(f,t);else break;t=o(d)}}function x(e){if(v=!1,k(e),!g)if(null!==o(f))g=!0,j||(j=!0,a());else{var t=o(d);null!==t&&I(x,t.startTime-e)}}var j=!1,E=-1,P=5,C=-1;function T(){return!!b||!(t.unstable_now()-Ce&&T());){var l=h.callback;if("function"==typeof l){h.callback=null,m=h.priorityLevel;var u=l(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof u){h.callback=u,k(e),n=!0;break t}h===o(f)&&i(f),k(e)}else i(f);h=o(f)}if(null!==h)n=!0;else{var c=o(d);null!==c&&I(x,c.startTime-e),n=!1}}break e}finally{h=null,m=r,y=!1}}}finally{n?a():j=!1}}}if("function"==typeof O)a=function(){O(_)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,A=N.port2;N.port1.onmessage=_,a=function(){A.postMessage(null)}}else a=function(){w(_,0)};function I(e,n){E=w(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125u?(e.sortIndex=l,r(d,e),null===o(f)&&e===o(d)&&(v?(S(E),E=-1):v=!0,I(x,l-u))):(e.sortIndex=c,r(f,e),g||y||(g=!0,j||(j=!0,a()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},8014:function(e,t,n){"use strict";e.exports=n(2685)},1699:function(e,t,n){"use strict";function r(e,t,n,r,o,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var l=e.apply(t,n);function a(e){r(l,o,i,a,u,"next",e)}function u(e){r(l,o,i,a,u,"throw",e)}a(void 0)})}}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]h});var s,f=(s=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!s()}catch(e){return!1}}),d=function(){function e(){i(this,e),u(this,"store",void 0),u(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return o(function(){return c(this,function(t){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){return this.store[e]=t,[2]})}).call(this)}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return o(function(){return c(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),p=function(){function e(){i(this,e),u(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return o(function(){var t;return c(this,function(n){switch(n.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(t=n.sent()))return[2,JSON.parse(t)];return[2,void 0]}})})()}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(t)),[2]})})()}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return o(function(){return c(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),h=new(function(){function e(){i(this,e),u(this,"backendPromise",void 0),u(this,"impl",0),this.backendPromise=o(function(){return c(this,function(e){return f()?[2,new p]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new d])})})()}return a(e,[{key:"get",value:function(e){return o(function(){return c(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().set(e,t)]}})}).call(this)}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return o(function(){return c(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},7218:function(e,t,n){"use strict";n.d(t,{D:()=>r});var r=(0,n(4530).createContext)(["",function(e){}])},2533:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nl,v:()=>a});var i=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",n=arguments.length,r=Array(n>2?n-2:0),i=2;i=2){var l=[t].concat(o(r)).map(function(e){var t;return"string"==typeof e?e:(null!=(t=Error)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:t,message:l})}},l=function(e){return{debug:function(){for(var t=arguments.length,n=Array(t),r=0;ru});var r=n(8138),o=n(4530),i=n(7790),l=n(2533);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);na});var r=n(8138),o=n(1699),i=n(7790),l=n(9582),a={title:"Storage",render:function(){return(0,r.jsx)(u,{})}},u=function(e){return window.localStorage?(0,r.jsx)(i.wn,{title:"Local Storage",buttons:(0,r.jsx)(i.$n,{icon:"recycle",onClick:function(){localStorage.clear(),o.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(i.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(i.IC,{children:"Local storage is not available."})}},9615:function(e,t,n){"use strict";n.r(t),n.d(t,{meta:()=>u});var r=n(8138),o=n(4530),i=n(7790),l=n(7218);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nl,sendMessage:()=>i,setupHotReloading:()=>a,subscribe:()=>o});let r=[];function o(e){r.push(e)}function i(e){}function l(e,t){}function a(){}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);o.r(i);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>n[e]});return l.default=()=>n,o.d(i,l),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.k=e=>""+e+".css",o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/",o.rv=()=>"1.5.8",o.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,t,n,r,i,l,a,u,c,s,f,d,p,h,m=o(8138);o(6533),o(8873),o(5223),o(5011),o(8062);null==(t=window.performance)||t.now;var y=function(e,t){};function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?i-1:0),a=1;a1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=v({},n),i=!1,l=!0,a=!1,u=void 0;try{for(var c,s=t[Symbol.iterator]();!(l=(c=s.next()).done);l=!0){var f=c.value,d=e[f],p=n[f],h=d(p,r);p!==h&&(i=!0,o[f]=h)}}catch(e){a=!0,u=e}finally{try{l||null==s.return||s.return()}finally{if(a)throw u}}return i?o:n}},k=function(e,t){var n=function(){for(var n=arguments.length,r=Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]2&&void 0!==arguments[2]?arguments[2]:50,o=[t],i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function eg(e){var t=function(e,t){if("object"!==ev(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ev(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ev(t)?t:String(t)}function ev(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function eb(e,t){if(e){if("string"==typeof e)return es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return es(e,t)}}var ew=(0,z.h)("backend"),eS=function(e){s=e},eO=k("backend/update");k("backend/setSharedState"),k("backend/suspendStart");var ek=k("backend/createPayloadQueue"),ex=k("backend/dequeuePayloadQueue"),ej=k("backend/removePayloadQueue"),eE=k("nextPayloadChunk"),eP={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},eC=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eP,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;if("backend/update"===n){var o=eh({},e.config,r.config),i=eh({},e.data,r.static_data,r.data),l=eh({},e.shared);if(r.shared){var a=!0,u=!1,c=void 0;try{for(var s,f=Object.keys(r.shared)[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value,p=r.shared[d];""===p?l[d]=void 0:l[d]=JSON.parse(p)}}catch(e){u=!0,c=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw c}}}return em(eh({},e),{config:o,data:i,shared:l,suspended:!1})}if("backend/setSharedState"===n){var h=r.key,m=r.nextState;return em(eh({},e),{shared:em(eh({},e.shared),ed({},h,m))})}if("backend/suspendStart"===n)return em(eh({},e),{suspending:!0});if("backend/suspendSuccess"===n){var y=r.timestamp;return em(eh({},e),{data:{},shared:{},config:em(eh({},e.config),{title:"",status:1}),suspending:!1,suspended:y})}if("backend/createPayloadQueue"===n){var g=r.id,v=r.chunks,b=e.outgoingPayloadQueues;return em(eh({},e),{outgoingPayloadQueues:em(eh({},b),ed({},g,v))})}if("backend/dequeuePayloadQueue"===n){var w=r.id,S=e.outgoingPayloadQueues,O=S[w],k=ey(S,[w].map(eg)),x=ef(O)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(O)||eb(O)||ep(),j=(x[0],x.slice(1));return em(eh({},e),{outgoingPayloadQueues:j.length?em(eh({},k),ed({},w,j)):k})}if("backend/removePayloadQueue"===n){var E=r.id,P=e.outgoingPayloadQueues;P[E];var C=ey(P,[E].map(eg));return em(eh({},e),{outgoingPayloadQueues:C})}return e},eT=function(e){var t,n;return function(o){return function(i){var l=eI(e.getState()),a=l.suspended,u=l.outgoingPayloadQueues,c=i.type,s=i.payload;if("update"===c)return void e.dispatch(eO(s));if("suspend"===c)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===c)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===c&&!n){ew.log("suspending (".concat(Byond.windowId,")"));var f=function(){return Byond.sendMessage("suspend")};f(),n=setInterval(f,2e3)}if("backend/suspendSuccess"===c&&(ec=!0,clearInterval(n),n=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,x.sc)(),(0,x.zr)(),setTimeout(function(){return el()})),"backend/update"===c){var d,p,h=null==(p=s.config)||null==(d=p.window)?void 0:d.fancy;void 0===t?t=h:t!==h&&(ew.log("changing fancy mode to",h),t=h,Byond.winset(Byond.windowId,{titlebar:!h,"can-resize":!h}))}if("backend/update"===c&&a&&(ew.log("backend/update",s),eu=eu||"resumed",ec=!1,(0,x.ao)(),U(function(){var e;return H(this,function(t){switch(t.label){case 0:return e=Y(),[4,r=Byond.winget(Byond.windowId,"pos").then(function(t){return[t.x-e[0],t.y-e[1]]})];case 1:return Q=t.sent(),$.debug("screen offset",Q),[2]}})})(),setTimeout(function(){y("resume/start"),eI(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),y("resume/finish"))})),"oversizePayloadResponse"===c&&(s.allow?e.dispatch(eE(s)):e.dispatch(ej(s))),"acknowlegePayloadChunk"===c&&(e.dispatch(ex(s)),e.dispatch(eE(s))),"nextPayloadChunk"===c){var m=s.id,g=u[m][0];Byond.sendMessage("payloadChunk",{id:m,chunk:g})}return o(i)}}},e_=function(e,t){for(var n=e.length-1,r=0,o=0;r1024){var u=o+e_(l,1024);r.push(t.slice(o,u1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===t?"undefined":ev(t))==="object"&&null!==t&&!Array.isArray(t)))return void ew.error("Payload for act() must be an object, got this:",t);var n=JSON.stringify(t);if(Object.entries({type:"act/"+e,payload:n,tgui:1,windowId:Byond.windowId}).reduce(function(e,t,n){var r=ef(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||eb(t,2)||ep(),o=r[0],i=r[1];return e+"".concat(n>0?"&":"?").concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i))},"").length>2048){var r=n.split(eN),o="".concat(Date.now());null==s||s.dispatch(ek({id:o,chunks:r})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:r.length});return}Byond.sendMessage("act/"+e,t)},eI=function(e){return e.backend||{}},eL=function(){var e;return em(eh({},null==s||null==(e=s.getState())?void 0:e.backend),{act:eA})},eD=function(){return s.dispatch},eR=function(e){return e(null==s?void 0:s.getState())},eM=function(){document.addEventListener("click",function(e){for(var t=e.target;;){if(!t||t===document.body)return;if("a"===String(t.tagName).toLowerCase())break;t=t.parentElement}var n=t.getAttribute("href")||"";if(!("?"===n.charAt(0)||n.startsWith("byond://"))){e.preventDefault();var r=n;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})};function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e0(e){var t=e.className,n=e.theme,r=void 0===n?"nanotrasen":n,o=e.children,i=eZ(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(r),(0,m.jsx)("div",{className:"theme-"+r,children:(0,m.jsx)("div",eJ(eX({className:(0,eQ.Ly)(["Layout",t,(0,eY.WP)(i)])},(0,eY.Fl)(i)),{children:o}))})}function e1(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e4(e){var t=e.theme,n=e.children,r=e.className,o=e3(e,["theme","children","className"]),i=eL().suspended,l=eR(eV).debugLayout;return(0,m.jsx)(e0,e2(e1({className:(0,eQ.Ly)(["Window",r]),theme:t},o),{children:(0,m.jsx)(eG.az,{fillPositionedParent:!0,className:void 0!==l&&l&&"debug-layout",children:!i&&n})}))}e0.Content=function(e){var t=e.className,n=e.scrollable,r=e.children,o=eZ(e,["className","scrollable","children"]),i=(0,eK.useRef)(null);return(0,eK.useEffect)(function(){var e=i.current;return e&&n&&(0,eq.tk)(e),function(){e&&n&&(0,eq.WK)(e)}},[]),(0,m.jsx)("div",eJ(eX({className:(0,eQ.Ly)(["Layout__content",n&&"Layout__content--scrollable",t,(0,eY.WP)(o)]),ref:i},(0,eY.Fl)(o)),{children:r}))},e4.Content=function(e){var t=e.className,n=e.fitted,r=e.children,o=e3(e,["className","fitted","children"]);return(0,m.jsx)(e0.Content,e2(e1({className:(0,eQ.Ly)(["Window__content",t])},o),{children:n?r:(0,m.jsx)("div",{className:"Window__contentPadding",children:r})}))};o(2316);function e8(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}k("debug/toggleKitchenSink"),k("debug/toggleDebugLayout"),k("debug/openExternalBrowser");function e6(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type;return"debug/toggleKitchenSink"===n?e5(e6({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===n?e5(e6({},e),{debugLayout:!e.debugLayout}):e}function e7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};this.element&&this.stop(),this.options=n;var r=this.element=new Audio(e);r.volume=this.volume,r.playbackRate=this.options.pitch||1,ti.log("playing",e,n),r.addEventListener("ended",function(){ti.log("ended"),t.stop()}),r.addEventListener("error",function(e){ti.log("playback error",e)}),this.options.end&&r.addEventListener("timeupdate",function(){t.options.end&&t.options.end>0&&r.currentTime>=t.options.end&&t.stop()}),r.play(),this.onPlaySubscribers.forEach(function(e){return e()})}},{key:"stop",value:function(){this.element&&(ti.log("stopping"),this.element.pause(),this.element=null,this.onStopSubscribers.forEach(function(e){return e()}))}},{key:"setVolume",value:function(e){this.volume=e,this.element&&(this.element.volume=e)}},{key:"onPlay",value:function(e){this.onPlaySubscribers.push(e)}},{key:"onStop",value:function(e){this.onStopSubscribers.push(e)}}],function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2?n-2:0),o=2;o1?t-1:0),r=1;r1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:nm;nt&&nt(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){let e=n(o);e!==o&&(nn(t)||(t[r]=e),o=e)}e[o]=!0}return e}function nE(e){let t=na(null);for(let[n,r]of ne(e))nS(e,n)&&(Array.isArray(r)?t[n]=function(e){for(let t=0;t/gm),nU=nl(/\$\{[\w\W]*/gm),nW=nl(/^data-[\-\w.\u00B7-\uFFFF]+$/),nH=nl(/^aria-[\-\w]+$/),n$=nl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nV=nl(/^(?:\w+script|data):/i),nK=nl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nG=nl(/^html$/i);var nq=Object.freeze({__proto__:null,ARIA_ATTR:nH,ATTR_WHITESPACE:nK,CUSTOM_ELEMENT:nl(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:nW,DOCTYPE_NAME:nG,ERB_EXPR:nF,IS_ALLOWED_URI:n$,IS_SCRIPT_OR_DATA:nV,MUSTACHE_EXPR:nB,TMPLIT_EXPR:nU});let nQ=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},nY=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var nX=function e(){let t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,r=t=>e(t);if(r.version="3.2.7",r.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return r.isSupported=!1,r;let{document:o}=n,i=o,l=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:s,NodeFilter:f,NamedNodeMap:d=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:p,DOMParser:h,trustedTypes:m}=n,y=s.prototype,g=nP(y,"cloneNode"),v=nP(y,"remove"),b=nP(y,"nextSibling"),w=nP(y,"childNodes"),S=nP(y,"parentNode");if("function"==typeof u){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let O="",{implementation:k,createNodeIterator:x,createDocumentFragment:j,getElementsByTagName:E}=o,{importNode:P}=i,C=nY();r.isSupported="function"==typeof ne&&"function"==typeof S&&k&&void 0!==k.createHTMLDocument;let{MUSTACHE_EXPR:T,ERB_EXPR:_,TMPLIT_EXPR:N,DATA_ATTR:A,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:R}=nq,{IS_ALLOWED_URI:M}=nq,z=null,B=nj({},[...nC,...nT,...n_,...nA,...nL]),F=null,U=nj({},[...nD,...nR,...nM,...nz]),W=Object.seal(na(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,$=null,V=!0,K=!0,G=!1,q=!0,Q=!1,Y=!0,X=!1,J=!1,Z=!1,ee=!1,et=!1,en=!1,er=!0,eo=!1,ei=!0,el=!1,ea={},eu=null,ec=nj({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),es=null,ef=nj({},["audio","video","img","source","image","track"]),ed=null,ep=nj({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eh="http://www.w3.org/1998/Math/MathML",em="http://www.w3.org/2000/svg",ey="http://www.w3.org/1999/xhtml",eg=ey,ev=!1,eb=null,ew=nj({},[eh,em,ey],ny),eS=nj({},["mi","mo","mn","ms","mtext"]),eO=nj({},["annotation-xml"]),ek=nj({},["title","style","font","a","script"]),ex=null,ej=["application/xhtml+xml","text/html"],eE=null,eP=null,eC=o.createElement("form"),eT=function(e){return e instanceof RegExp||e instanceof Function},e_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!eP||eP!==e){if(e&&"object"==typeof e||(e={}),e=nE(e),eE="application/xhtml+xml"===(ex=-1===ej.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?ny:nm,z=nS(e,"ALLOWED_TAGS")?nj({},e.ALLOWED_TAGS,eE):B,F=nS(e,"ALLOWED_ATTR")?nj({},e.ALLOWED_ATTR,eE):U,eb=nS(e,"ALLOWED_NAMESPACES")?nj({},e.ALLOWED_NAMESPACES,ny):ew,ed=nS(e,"ADD_URI_SAFE_ATTR")?nj(nE(ep),e.ADD_URI_SAFE_ATTR,eE):ep,es=nS(e,"ADD_DATA_URI_TAGS")?nj(nE(ef),e.ADD_DATA_URI_TAGS,eE):ef,eu=nS(e,"FORBID_CONTENTS")?nj({},e.FORBID_CONTENTS,eE):ec,H=nS(e,"FORBID_TAGS")?nj({},e.FORBID_TAGS,eE):nE({}),$=nS(e,"FORBID_ATTR")?nj({},e.FORBID_ATTR,eE):nE({}),ea=!!nS(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Q=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,et=e.RETURN_DOM_FRAGMENT||!1,en=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,er=!1!==e.SANITIZE_DOM,eo=e.SANITIZE_NAMED_PROPS||!1,ei=!1!==e.KEEP_CONTENT,el=e.IN_PLACE||!1,M=e.ALLOWED_URI_REGEXP||n$,eg=e.NAMESPACE||ey,eS=e.MATHML_TEXT_INTEGRATION_POINTS||eS,eO=e.HTML_INTEGRATION_POINTS||eO,W=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&eT(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&eT(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(K=!1),et&&(ee=!0),ea&&(z=nj({},nL),F=[],!0===ea.html&&(nj(z,nC),nj(F,nD)),!0===ea.svg&&(nj(z,nT),nj(F,nR),nj(F,nz)),!0===ea.svgFilters&&(nj(z,n_),nj(F,nR),nj(F,nz)),!0===ea.mathMl&&(nj(z,nA),nj(F,nM),nj(F,nz))),e.ADD_TAGS&&(z===B&&(z=nE(z)),nj(z,e.ADD_TAGS,eE)),e.ADD_ATTR&&(F===U&&(F=nE(F)),nj(F,e.ADD_ATTR,eE)),e.ADD_URI_SAFE_ATTR&&nj(ed,e.ADD_URI_SAFE_ATTR,eE),e.FORBID_CONTENTS&&(eu===ec&&(eu=nE(eu)),nj(eu,e.FORBID_CONTENTS,eE)),ei&&(z["#text"]=!0),X&&nj(z,["html","head","body"]),z.table&&(nj(z,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw nk('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw nk('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=nQ(m,l)),null!==t&&"string"==typeof O&&(O=t.createHTML(""));ni&&ni(e),eP=e}},eN=nj({},[...nT,...n_,...nN]),eA=nj({},[...nA,...nI]),eI=function(e){let t=S(e);t&&t.tagName||(t={namespaceURI:eg,tagName:"template"});let n=nm(e.tagName),r=nm(t.tagName);return!!eb[e.namespaceURI]&&(e.namespaceURI===em?t.namespaceURI===ey?"svg"===n:t.namespaceURI===eh?"svg"===n&&("annotation-xml"===r||eS[r]):!!eN[n]:e.namespaceURI===eh?t.namespaceURI===ey?"math"===n:t.namespaceURI===em?"math"===n&&eO[r]:!!eA[n]:e.namespaceURI===ey?(t.namespaceURI!==em||!!eO[r])&&(t.namespaceURI!==eh||!!eS[r])&&!eA[n]&&(ek[n]||!eN[n]):"application/xhtml+xml"===ex&&!!eb[e.namespaceURI])},eL=function(e){np(r.removed,{element:e});try{S(e).removeChild(e)}catch(t){v(e)}},eD=function(e,t){try{np(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){np(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||et)try{eL(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},eR=function(e){let n=null,r=null;if(Z)e=""+e;else{let t=ng(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===ex&&eg===ey&&(e=''+e+"");let i=t?t.createHTML(e):e;if(eg===ey)try{n=new h().parseFromString(i,ex)}catch(e){}if(!n||!n.documentElement){n=k.createDocument(eg,"template",null);try{n.documentElement.innerHTML=ev?O:i}catch(e){}}let l=n.body||n.documentElement;return(e&&r&&l.insertBefore(o.createTextNode(r),l.childNodes[0]||null),eg===ey)?E.call(n,X?"html":"body")[0]:X?n.documentElement:l},eM=function(e){return x.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},ez=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},eB=function(e){return"function"==typeof c&&e instanceof c};function eF(e,t,n){ns(e,e=>{e.call(r,t,n,eP)})}let eU=function(e){let t=null;if(eF(C.beforeSanitizeElements,e,null),ez(e))return eL(e),!0;let n=eE(e.nodeName);if(eF(C.uponSanitizeElement,e,{tagName:n,allowedTags:z}),Y&&e.hasChildNodes()&&!eB(e.firstElementChild)&&nO(/<[/\w!]/g,e.innerHTML)&&nO(/<[/\w!]/g,e.textContent)||7===e.nodeType||Y&&8===e.nodeType&&nO(/<[/\w]/g,e.data))return eL(e),!0;if(!z[n]||H[n]){if(!H[n]&&eH(n)&&(W.tagNameCheck instanceof RegExp&&nO(W.tagNameCheck,n)||W.tagNameCheck instanceof Function&&W.tagNameCheck(n)))return!1;if(ei&&!eu[n]){let t=S(e)||e.parentNode,n=w(e)||e.childNodes;if(n&&t){let r=n.length;for(let o=r-1;o>=0;--o){let r=g(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return eL(e),!0}return e instanceof s&&!eI(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&nO(/<\/no(script|embed|frames)/i,e.innerHTML)?(eL(e),!0):(Q&&3===e.nodeType&&(t=e.textContent,ns([T,_,N],e=>{t=nv(t,e," ")}),e.textContent!==t&&(np(r.removed,{element:e.cloneNode()}),e.textContent=t)),eF(C.afterSanitizeElements,e,null),!1)},eW=function(e,t,n){if(er&&("id"===t||"name"===t)&&(n in o||n in eC))return!1;if(K&&!$[t]&&nO(A,t));else if(V&&nO(I,t));else if(!F[t]||$[t]){if(!(eH(e)&&(W.tagNameCheck instanceof RegExp&&nO(W.tagNameCheck,e)||W.tagNameCheck instanceof Function&&W.tagNameCheck(e))&&(W.attributeNameCheck instanceof RegExp&&nO(W.attributeNameCheck,t)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(t,e))||"is"===t&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&nO(W.tagNameCheck,n)||W.tagNameCheck instanceof Function&&W.tagNameCheck(n))))return!1}else if(ed[t]);else if(nO(M,nv(n,D,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===nb(n,"data:")&&es[e]);else if(G&&!nO(L,nv(n,D,"")));else if(n)return!1;return!0},eH=function(e){return"annotation-xml"!==e&&ng(e,R)},e$=function(e){eF(C.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||ez(e))return;let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:l,namespaceURI:a,value:u}=n[i],c=eE(l),s="value"===l?u:nw(u);if(o.attrName=c,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,eF(C.uponSanitizeAttribute,e,o),s=o.attrValue,eo&&("id"===c||"name"===c)&&(eD(l,e),s="user-content-"+s),Y&&nO(/((--!?|])>)|<\/(style|title|textarea)/i,s)||"attributename"===c&&ng(s,"href")){eD(l,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr||!q&&nO(/\/>/i,s)){eD(l,e);continue}Q&&ns([T,_,N],e=>{s=nv(s,e," ")});let f=eE(e.nodeName);if(!eW(f,c,s)){eD(l,e);continue}if(t&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(a);else switch(m.getAttributeType(f,c)){case"TrustedHTML":s=t.createHTML(s);break;case"TrustedScriptURL":s=t.createScriptURL(s)}if(s!==u)try{a?e.setAttributeNS(a,l,s):e.setAttribute(l,s),ez(e)?eL(e):nd(r.removed)}catch(t){eD(l,e)}}eF(C.afterSanitizeAttributes,e,null)},eV=function e(t){let n=null,r=eM(t);for(eF(C.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)eF(C.uponSanitizeShadowNode,n,null),eU(n),e$(n),n.content instanceof a&&e(n.content);eF(C.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,l=null,u=null,s=null;if((ev=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!eB(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw nk("dirty is not a string, aborting")}else throw nk("toString is not a function");if(!r.isSupported)return e;if(J||e_(n),r.removed=[],"string"==typeof e&&(el=!1),el){if(e.nodeName){let t=eE(e.nodeName);if(!z[t]||H[t])throw nk("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)1===(l=(o=eR("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?o=l:o.appendChild(l);else{if(!ee&&!Q&&!X&&-1===e.indexOf("<"))return t&&en?t.createHTML(e):e;if(!(o=eR(e)))return ee?null:en?O:""}o&&Z&&eL(o.firstChild);let f=eM(el?e:o);for(;u=f.nextNode();)eU(u),e$(u),u.content instanceof a&&eV(u.content);if(el)return e;if(ee){if(et)for(s=j.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(F.shadowroot||F.shadowrootmode)&&(s=P.call(i,s,!0)),s}let d=X?o.outerHTML:o.innerHTML;return X&&z["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&nO(nG,o.ownerDocument.doctype.name)&&(d="\n"+d),Q&&ns([T,_,N],e=>{d=nv(d,e," ")}),t&&en?t.createHTML(d):d},r.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e_(e),J=!0},r.clearConfig=function(){eP=null,J=!1},r.isValidAttribute=function(e,t,n){return eP||e_({}),eW(eE(e),eE(t),n)},r.addHook=function(e,t){"function"==typeof t&&np(C[e],t)},r.removeHook=function(e,t){if(void 0!==t){let n=nf(C[e],t);return -1===n?void 0:nh(C[e],n,1)[0]}return nd(C[e])},r.removeHooks=function(e){C[e]=[]},r.removeAllHooks=function(){C=nY()},r}(),nJ=function(e){for(var t,n,r,o,i=e.node,l=e.regex,a=e.createNode,u=e.captureAdjust,c=i.textContent,s=c.length,f=0,d=0,p=0;r=l.exec(c);){if(d+=1,++p>9999)return{};o||(o=document.createDocumentFragment()),t||(t=[]);var h=u?u(r[0]):r[0],m=h.length,y=r.index+r[0].indexOf(h);f3&&void 0!==arguments[3]?arguments[3]:n0;r||(r=n0);for(var o=0,i=e.childNodes,l=0;le.length)&&(t=e.length);for(var n=0,r=Array(t);n=10)return void n6.error("failed to load an image after ".concat(n," attempts"));var r=t.src;t.src=null,t.src=r+"#"+n,t.setAttribute("data-reload-n",n+1)}},250)},rr=function(e){var t=e.node,n=e.times;if(t&&n){var r=t.querySelector(".Chat__badge"),o=r||document.createElement("div");o.textContent=n,o.className="Chat__badge",r||t.appendChild(o)}},ro=function(){var e;function t(){var e=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new eq.bk,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,r=24>Math.abs(n.scrollHeight-(n.scrollTop+n.offsetHeight));r!==e.scrollTracking&&(e.scrollTracking=r,e.events.emit("scrollTrackingChanged",r),n6.debug("tracking",e.scrollTracking))},this.ensureScrollTracking=function(){e.scrollTracking&&e.scrollToBottom()},setInterval(function(){return e.pruneMessages()},6e4)}return e=[{key:"isReady",value:function(){return this.loaded&&this.rootNode&&this.page}},{key:"mount",value:function(e){var t=this;this.rootNode?e.appendChild(this.rootNode):this.rootNode=e,this.scrollNode=n9(this.rootNode),this.scrollNode.addEventListener("scroll",this.handleScroll),setTimeout(function(){t.scrollToBottom()}),this.tryFlushQueue()}},{key:"onStateLoaded",value:function(){this.loaded=!0,this.tryFlushQueue()}},{key:"tryFlushQueue",value:function(){this.isReady()&&this.queue.length>0&&(this.processBatch(this.queue),this.queue=[])}},{key:"assignStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value;this.rootNode.style.setProperty(l,e[l])}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}},{key:"setHighlight",value:function(e,t){var n=this;this.highlightParsers=null,e&&e.map(function(e){var r=t[e],o=r.highlightText,i=r.highlightColor,l=r.highlightWholeMessage,a=r.matchWord,u=r.matchCase,c=/^[a-zа-яё0-9_\-$/^[\s\]\\]+$/gi,s=/[!#$%^&*)(+=.<>{}[\]:;'"|~`_\-\\/]/g,f=String(o).split(/[,|]/).map(function(e){return e.trim()}).filter(function(e){return e&&e.length>1&&c.test(e)&&(c.lastIndex=0,!0)});if(0!==f.length){var d=[],p=!0,h=!1,m=void 0;try{for(var y,g,v,b=f[Symbol.iterator]();!(p=(v=b.next()).done);p=!0){var w=v.value;if("/"===w.charAt(0)&&"/"===w.charAt(w.length-1)){var S=w.substring(1,w.length-1);if(/^(\[.*\]|\\.|.)$/.test(S))continue;d.push(S)}else y||(y=[]),w=w.replace(s,"\\$&"),y.push(w)}}catch(e){h=!0,m=e}finally{try{p||null==b.return||b.return()}finally{if(h)throw m}}var O=d.join("|"),k="g"+(u?"":"i");try{if(O)g=RegExp("("+O+")",k);else{var x="".concat(a?"\\b":"","(").concat(y.join("|"),")").concat(a?"\\b":"");g=new RegExp(x,k)}}catch(e){g=null}n.highlightParsers||(n.highlightParsers=[]),n.highlightParsers.push({highlightWords:y,highlightRegex:g,highlightColor:i,highlightWholeMessage:l})}})}},{key:"scrollToBottom",value:function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight}},{key:"changePage",value:function(e){if(!this.isReady()){this.page=e,this.tryFlushQueue();return}this.page=e,this.rootNode.textContent="",this.visibleMessages=[];var t=document.createDocumentFragment(),n=!0,r=!1,o=void 0;try{for(var i,l,a=this.messages[Symbol.iterator]();!(n=(l=a.next()).done);n=!0){var u=l.value;tV(e,u.type)&&(i=u.node,t.appendChild(i),this.visibleMessages.push(u))}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}i&&(this.rootNode.appendChild(t),i.scrollIntoView())}},{key:"getCombinableMessage",value:function(e,t,n,r){for(var o=n;o>=r;o--){var i=this.visibleMessages[o];if(!i.type.startsWith(tW)&&("string"==typeof i.text&&i.text===e.text||"string"==typeof i.html&&i.html===e.html)&&t1&&void 0!==arguments[1]?arguments[1]:{},r=n.prepend,o=n.notifyListeners,i=Date.now();if(!this.isReady())return void(r?this.queue=n8(e).concat(n8(this.queue)):this.queue=n8(this.queue).concat(n8(e)));var l=document.createDocumentFragment(),a={},u=this.visibleMessages.length,c=u-1,s=Math.max(0,u-5),f=!0,d=!1,p=void 0;try{for(var h,m,y=e[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var g=m.value,v=tG(g),b=this.getCombinableMessage(v,i,c,s);if(b){b.times=(b.times||1)+1,rr(b);continue}if(v.node)h=v.node;else if("internal/reconnected"===v.type)h=rt();else{h=re(),v.text?h.textContent=v.text:v.html?(h.innerHTML=v.html,h.innerHTML=nX.sanitize(h.innerHTML,{FORBID_TAGS:n5,ALLOW_UNKNOWN_PROTOCOLS:!0})):n6.error("Error: message is missing text payload",v),!v.avoidHighlighting&&this.highlightParsers&&this.highlightParsers.map(function(e){n1(h,e.highlightRegex,e.highlightWords,function(t){return n7(t,e.highlightColor)})&&e.highlightWholeMessage&&(h.className+=" ChatMessage--highlighted")});for(var w=h.querySelectorAll(".linkify"),S=0;S0){this.visibleMessages=e.slice(t);for(var n=0;n0&&(this.messages=this.messages.slice(o),n6.log("pruned ".concat(o," stored messages")))}}},{key:"rebuildChat",value:function(){if(this.isReady()){var e=Math.max(0,this.messages.length-2500),t=this.messages.slice(e),n=!0,r=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)i.value.node=void 0}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(t,{notifyListeners:!1})}}},{key:"clearChat",value:function(){var e=this.visibleMessages;this.visibleMessages=[];for(var t=0;t\n\n\nSS13 Chat Log\n\n\n\n\n'+l+"
\n\n\n"],{type:"text/plain"}),h=new Date().toISOString().substring(0,19).replace(/[-:]/g,"").replace("T","-");Byond.saveBlob(p,"ss13-paradise-chatlog-".concat(h,".html"),".html")}}],function(e,t){for(var n=0;n0&&(0,m.jsx)(rf,{value:e.unreadCount})]},e.id)})})}),(0,m.jsx)(eG.so.Item,{ml:1,children:(0,m.jsx)(eG.$n,{color:"transparent",icon:"plus",onClick:function(){r(tJ()),r(tm())}})})]})};function rp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["id"]),i=eR(tO),l=eD(),a=i[r],u=a.highlightColor,c=a.highlightText,s=a.highlightWholeMessage,f=a.matchWord,d=a.matchCase;return(0,m.jsxs)(eG.BJ.Item,(t=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");rZ(this,"r",void 0),rZ(this,"g",void 0),rZ(this,"b",void 0),rZ(this,"a",void 0),this.r=e,this.g=t,this.b=r,this.a=o}return e=[{key:"toString",value:function(){return"rgba(".concat(0|this.r,", ").concat(0|this.g,", ").concat(0|this.b,", ").concat(0|this.a,")")}}],t=[{key:"fromHex",value:function(e){return new n(parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16))}},{key:"lerp",value:function(e,t,r){return new n((t.r-e.r)*r+e.r,(t.g-e.g)*r+e.g,(t.b-e.b)*r+e.b,(t.a-e.a)*r+e.a)}},{key:"lookup",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.length;if(r<2)throw Error("Needs at least two colors!");var o=e*(r-1);if(e<1e-4)return t[0];if(e>=.9999)return t[r-1];var i=0|o;return n.lerp(t[i],t[i+1],o%1)}}],e&&rJ(n.prototype,e),t&&rJ(n,t),n}(),r1=function(e){return e.ping},r2=function(e){var t=eR(r1),n=r0.lookup(t.networkQuality,[new r0(220,40,40),new r0(220,200,40),new r0(60,220,40)]).toString(),r=t.roundtrip?(0,ta.Mg)(t.roundtrip):"--";return(0,m.jsxs)("div",{className:"Ping",children:[(0,m.jsx)(eG.az,{className:"Ping__indicator",backgroundColor:n}),r]})},r3=null;setInterval(function(){Byond.winget("","url").then(function(e){e&&!e.match(/:0$/)&&(r3=e)})},5e3);var r4=function(){return r3?(0,m.jsxs)(eG.BJ,{children:[(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.$n,{fluid:!0,icon:"history",color:"white",content:"Reconnect",onClick:function(){Byond.command(".reconnect")}})}),(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.$n,{icon:"power-off",color:"white",tooltip:"Restart game",tooltipPosition:"bottom-end",onClick:function(){Byond.command(".quit")}})})]}):null},r8=function(e){var t=tr(),n=tk(),r=eR(rM);return(0,m.jsx)(e4,{theme:n.theme,children:(0,m.jsxs)(eG.BJ,{fill:!0,vertical:!0,children:[(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.wn,{fitted:!0,children:(0,m.jsxs)(eG.BJ,{mr:1,align:"center",children:[(0,m.jsx)(eG.BJ.Item,{grow:!0,overflowX:"auto",children:(0,m.jsx)(rd,{})}),(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(r2,{})}),(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.$n,{color:"grey",selected:t.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-start",onClick:function(){return t.toggle()}})}),(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.$n,{icon:n.visible?"times":"cog",selected:n.visible,tooltip:n.visible?"Close settings":"Open settings",tooltipPosition:"bottom-start",onClick:function(){return n.toggle()}})})]})})}),t.visible&&(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(eG.wn,{children:(0,m.jsx)(rI,{})})}),n.visible&&(0,m.jsx)(eG.BJ.Item,{children:(0,m.jsx)(rT,{})}),(0,m.jsx)(eG.BJ.Item,{grow:!0,children:(0,m.jsxs)(eG.wn,{fill:!0,fitted:!0,position:"relative",children:[(0,m.jsx)(e4.Content,{style:{overflowY:"scroll"},scrollable:!0,children:(0,m.jsx)(rs,{lineHeight:n.lineHeight})}),(0,m.jsxs)(rX,{children:[r.connectionLostAt&&(0,m.jsx)(rX.Item,{rightSlot:(0,m.jsx)(r4,{}),children:"You are either AFK, experiencing lag or the connection has closed."}),r.roundRestartedAt&&(0,m.jsxs)(rX.Item,{children:["The connection has been closed because the server is restarting.",(0,m.jsx)("br",{}),"Please wait while you automatically reconnect."]})]})]})})]})})},r6=o(2476);function r5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=10&&(e=!0),(null==(r=document.activeElement)?void 0:r.className.includes("Button"))&&(e=!0)}e||on()}),eq.Nh.on("keydown",function(e){e.isModifierKey()||on()})};function oo(e,t,n,r,o,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}var oi=(0,z.h)("telemetry");y("inception",null==(h=window.performance)?void 0:h.timeOrigin),y("init");var ol=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.sideEffects,r=t.reducer,o=t.middleware,i=eU([O({debug:e9,backend:eC}),r]),l=void 0===n||n?te((null==o?void 0:o.pre)||[]).concat([e$,eT],te((null==o?void 0:o.post)||[])):[],a=w(i,S.apply(void 0,te(l)));return window.__store__=a,window.__augmentStack__=(e=a,function(t,n){(n=n||Error(t.split("\n")[0])).stack=n.stack||t,tt.log("FatalError:",n);var r,o,i=e.getState(),l=null==i||null==(r=i.backend)?void 0:r.config;return t+"\nUser Agent: "+navigator.userAgent+"\nState: "+JSON.stringify({ckey:null==l||null==(o=l.client)?void 0:o.ckey,interface:null==l?void 0:l.interface,window:null==l?void 0:l.window})}),a}({reducer:O({audio:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rR,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;return"audio/playing"===n?rD(rL({},e),{visible:!0,playing:!0}):"audio/stopped"===n?rD(rL({},e),{visible:!1,playing:!1}):"audio/playMusic"===n?rD(rL({},e),{meta:r}):"audio/stopMusic"===n?rD(rL({},e),{visible:!1,playing:!1,meta:null}):"audio/toggle"===n?rD(rL({},e),{visible:!e.visible}):e},chat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rj,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;if(n===tq.type){if((null==r?void 0:r.version)!==e.version)return e;var o=!0,i=!1,l=void 0;try{for(var a,u=Object.keys(r.pageById)[Symbol.iterator]();!(o=(a=u.next()).done);o=!0){var c=a.value,s=r.pageById[c].acceptedTypes,f=rx.acceptedTypes,d=!0,p=!1,h=void 0;try{for(var m,y=Object.keys(f)[Symbol.iterator]();!(d=(m=y.next()).done);d=!0){var g=m.value;void 0===s[g]&&(s[g]=f[g])}}catch(e){p=!0,h=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw h}}}}catch(e){i=!0,l=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}var v=!0,b=!1,w=void 0;try{for(var S,O=Object.keys(r.pageById)[Symbol.iterator]();!(v=(S=O.next()).done);v=!0){var k=S.value;r.pageById[k].unreadCount=0}}catch(e){b=!0,w=e}finally{try{v||null==O.return||O.return()}finally{if(b)throw w}}return rS({},e,r)}if(n===t3.type){var x=rO(rS({},e),{scrollTracking:r});if(r){var j=e.currentPageId,E=rO(rS({},e.pageById[j]),{unreadCount:0});x.pageById=rO(rS({},e.pageById),rw({},j,E))}return x}if(n===tX.type){var P=e.pages.map(function(t){return e.pageById[t]}),C=e.pageById[e.currentPageId],T=rS({},e.pageById),_=!0,N=!1,A=void 0;try{for(var I,L=P[Symbol.iterator]();!(_=(I=L.next()).done);_=!0){var D=I.value,R=0,M=!0,z=!1,B=void 0;try{for(var F,U=Object.keys(r)[Symbol.iterator]();!(M=(F=U.next()).done);M=!0){var W=F.value;tV(D,W)&&(D!==C||!e.scrollTracking)&&(D!==C&&tV(C,W)||(R+=r[W]))}}catch(e){z=!0,B=e}finally{try{M||null==U.return||U.return()}finally{if(z)throw B}}R>0&&(T[D.id]=rO(rS({},D),{unreadCount:D.unreadCount+R}))}}catch(e){N=!0,A=e}finally{try{_||null==L.return||L.return()}finally{if(N)throw A}}return rO(rS({},e),{pageById:T})}if(n===tJ.type)return rO(rS({},e),{currentPageId:r.id,pages:rk(e.pages).concat([r.id]),pageById:rO(rS({},e.pageById),rw({},r.id,r))});if(n===tZ.type){var H=r.pageId,$=rO(rS({},e.pageById[H]),{unreadCount:0});return rO(rS({},e),{currentPageId:H,pageById:rO(rS({},e.pageById),rw({},H,$))})}if(n===t0.type){var V=r.pageId,K=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,["pageId"]),G=rS({},e.pageById[V],K);return rO(rS({},e),{pageById:rO(rS({},e.pageById),rw({},V,G))})}if(n===t1.type){var q=r.pageId,Q=r.type,Y=rS({},e.pageById[q]);return Y.acceptedTypes=rS({},Y.acceptedTypes),Y.acceptedTypes[Q]=!Y.acceptedTypes[Q],rO(rS({},e),{pageById:rO(rS({},e.pageById),rw({},q,Y))})}if(n===t2.type){var X=r.pageId,J=rO(rS({},e),{pages:rk(e.pages),pageById:rS({},e.pageById)});return delete J.pageById[X],J.pages=J.pages.filter(function(e){return e!==X}),0===J.pages.length&&(J.pages.push(rx.id),J.pageById[rx.id]=rx,J.currentPageId=rx.id),J.currentPageId&&J.currentPageId!==X||(J.currentPageId=J.pages[0]),J}if(n===t8.type){var Z=r.pageId,ee=rO(rS({},e),{pages:rk(e.pages),pageById:rS({},e.pageById)}),et=ee.pageById[Z],en=ee.pages.indexOf(et.id),er=en-1;if(en>0&&er>0){var eo=ee.pages[en];ee.pages[en]=ee.pages[er],ee.pages[er]=eo}return ee}if(n===t6.type){var ei=r.pageId,el=rO(rS({},e),{pages:rk(e.pages),pageById:rS({},e.pageById)}),ea=el.pageById[ei],eu=el.pages.indexOf(ea.id),ec=eu+1;if(eu>0&&ec0&&void 0!==arguments[0]?arguments[0]:rY,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=(t.payload,t.meta);return"roundrestart"===n?rQ(rq({},e),{roundRestartedAt:r.now}):n===rH.type?rQ(rq({},e),{connectionLostAt:r.now}):n===r$.type?rQ(rq({},e),{connectionLostAt:null}):e},ping:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;if(n===rF.type){var o=r.roundtrip,i=Math.round(.4*(e.roundtripAvg||o)+.6*o),l=1-(0,ta.hs)(i,50,200);return{roundtrip:o,roundtripAvg:i,failCount:0,networkQuality:l}}if(n===rU.type){var a,u,c=e.failCount,s=void 0===c?0:c,f=(0,ta.J$)(e.networkQuality-s/3),d=(a=function(e){for(var t=1;t3&&(d.roundtrip=void 0,d.roundtripAvg=void 0),d}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tF,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;if(n===tf.type)return tR({},e,r);if(n===td.type){if(!(null==r?void 0:r.version))return e;delete r.view;var o=tR({},e,r);o.highlightSettings?o.highlightSettingById[tB.id]||(o.highlightSettings=[tB.id].concat(tz(o.highlightSettings)),o.highlightSettingById[tB.id]=tB):(o.highlightSettings=[tB.id],o.highlightSettingById[tB.id]=tB);var i=o.highlightSettingById[tB.id];return i.highlightColor=o.highlightColor,i.highlightText=o.highlightText,o}if(n===th.type)return tM(tR({},e),{view:tM(tR({},e.view),{visible:!e.view.visible})});if(n===tm.type)return tM(tR({},e),{view:tM(tR({},e.view),{visible:!0,activeTab:"chatPage"})});if(n===tp.type){var l=r.tabId;return tM(tR({},e),{view:tM(tR({},e.view),{activeTab:l})})}if(n===ty.type)return e.highlightSettings.length>=10?e:tM(tR({},e),{highlightSettings:tz(e.highlightSettings).concat([r.id]),highlightSettingById:tM(tR({},e.highlightSettingById),tD({},r.id,r))});if(n===tg.type){var a=r.id,u=tM(tR({},e),{highlightSettings:tz(e.highlightSettings),highlightSettingById:tR({},e.highlightSettingById)});return a===tB.id?u.highlightSettings[tB.id]=tB:(delete u.highlightSettingById[a],u.highlightSettings=u.highlightSettings.filter(function(e){return e!==a}),u.highlightSettings.length||(u.highlightSettings.push(tB.id),u.highlightSettingById[tB.id]=tB)),u}if(n===tv.type){var c=r.id,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,["id"]),f=tM(tR({},e),{highlightSettings:tz(e.highlightSettings),highlightSettingById:tR({},e.highlightSettingById)});return c===tB.id&&(s.highlightText&&(f.highlightText=s.highlightText),s.highlightColor&&(f.highlightColor=s.highlightColor)),f.highlightSettingById[c]&&(f.highlightSettingById[c]=tR({},f.highlightSettingById[c],s)),f}return e}}),middleware:{pre:[function(e){var t=!1,n=!1,r=[],o=[];return ri.events.on("batchProcessed",function(t){n&&e.dispatch(tX(t))}),ri.events.on("scrollTrackingChanged",function(t){e.dispatch(t3(t))}),setInterval(function(){return rv(e)},6e4),function(i){return function(l){var a=l.type,u=l.payload;if(t||(t=!0,rm(function(){var t,n,r,o,i,l,a,u,c,s;return ry(this,function(f){switch(f.label){case 0:return[4,j.IG.get("chat-state")];case 1:if((t=f.sent())&&t.version<=4)return e.dispatch(tq()),[2];return[4,j.IG.get("chat-saving-enabled")];case 2:if(n=f.sent(),r=[],!1===n)return[3,4];return[4,j.IG.get("chat-messages")];case 3:if(r=f.sent()){var d;o=!0,i=!1,l=void 0;try{for(a=r[Symbol.iterator]();!(o=(u=a.next()).done);o=!0)(c=u.value).html&&(c.html=nX.sanitize(c.html,{FORBID_TAGS:rg}))}catch(e){i=!0,l=e}finally{try{o||null==a.return||a.return()}finally{if(i)throw l}}s=((function(e){if(Array.isArray(e))return rp(e)})(d=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(d)||function(e,t){if(e){if("string"==typeof e)return rp(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rp(e,void 0)}}(d)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([tG({type:"internal/reconnected"})]),ri.processBatch(s,{prepend:!0})}f.label=4;case 4:return e.dispatch(tq(t)),[2]}})})()),"chat/message"===a){try{c=JSON.parse(u)}catch(e){return}var c,s=c.sequence;if(r.includes(s))return;var f=r.length;n:if(f>0){if(o.includes(s)){o.splice(o.indexOf(s),1);break n}var d=r[f-1]+1;if(s!==d)for(var p=d;p2e3&&(r[t]=null,e.dispatch(rU()))}var i={index:n,sentAt:Date.now()};r[n]=i,Byond.sendMessage("ping",{index:n}),n=(n+1)%8};return function(e){return function(n){var i=n.type,l=n.payload;if(t||(t=!0,o()),i===rB.type)return l.afk||o(),e(n);if(i===rz.type){var a=l.index,u=r[a];if(!u)return;return r[a]=null,e(rF(u))}return e(n)}}},function(e){var t,n;return function(r){return function(o){var i,l=o.type,a=o.payload;if("telemetry/request"===l){if(!t){oi.debug("deferred"),n=a;return}oi.debug("sending");var u=(null==a?void 0:a.limits)||{},c=t.connections.slice(0,u.connections);Byond.sendMessage("telemetry",{connections:c});return}if("backend/update"===l){r(o),(i=function(){var r,o,i,l;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]10&&t.connections.pop()),i&&(oi.debug("saving telemetry to storage",t),j.IG.set("telemetry",t)),n&&(l=n,n=null,e.dispatch({type:"telemetry/request",payload:l})),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var o=i.apply(e,t);function l(e){oo(o,n,r,l,a,"next",e)}function a(e){oo(o,n,r,l,a,"throw",e)}l(void 0)})})();return}return r(o)}}},function(e){var t=!1;return function(n){return function(r){var o=r.type,i=r.payload;if(t||(t=!0,j.IG.get("panel-settings").then(function(t){e.dispatch(td(t))})),o===tf.type||o===td.type||o===ty.type||o===tg.type||o===tv.type){var l=null==i?void 0:i.theme;l&&tP(l),n(r);var a=tb(e.getState());tI(a.statTabsStyle),tN(a.fontSize,a.statFontSize,a.statLinked),tA(a.fontFamily,a.statFontFamily,a.statLinked),j.IG.set("panel-settings",a);return}return n(r)}}},function(e){var t=new tl;return t.onPlay(function(){e.dispatch({type:"audio/playing"})}),t.onStop(function(){e.dispatch({type:"audio/stopped"})}),function(e){return function(n){var r=n.type,o=n.payload;if("audio/playMusic"===r){var i=o.url,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,["url"]);return t.play(i,l),e(n)}if("audio/stopMusic"===r)return t.stop(),e(n);if("settings/update"===r||"settings/load"===r){var a=null==o?void 0:o.adminMusicVolume;"number"==typeof a&&t.setVolume(a)}return e(n)}}},function(e){var t;return setInterval(function(){var n=e.getState();if(n){var r=rM(n),o=t&&Date.now()>=t+2e4;!r.connectionLostAt&&o&&e.dispatch(rG(rH())),r.connectionLostAt&&!o&&e.dispatch(rG(r$()))}},1e3),function(e){return function(n){var r=n.type;return r===rF.type||r===rB.type?(t=Date.now(),e(n)):r===rW.type?e(rG(n)):e(n)}}}]}});!function e(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):(eS(ol),(0,eq.y4)({ignoreWindowFocus:!0}),or(),eM(),ol.subscribe(function(){var e=(0,m.jsx)(r8,{});if(y("render/start"),!c){var t=document.getElementById("react-root");c=(0,ea.createRoot)(t)}c.render(e),y("render/finish"),!ec&&eu&&(eu=!1)}),Byond.subscribe(function(e,t){return ol.dispatch({type:e,payload:t})}),Byond.winset("legacy_output_selector",{left:"output_browser"}),Byond.winget("output").then(function(e){Byond.winset("chat_panel",{size:e.size})}))}()})()})();
\ No newline at end of file
+(()=>{var e,t,n={937:function(e,t,n){var r={"./ByondUi.stories.js":"7997","./Storage.stories.js":"6498","./Themes.stories.js":"9615"};function o(e){return n(i(e))}function i(e){if(!n.o(r,e)){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=937},7912:function(e,t,n){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var o,i=n(8014),l=n(4530),a=n(6634);function u(e){var t="https://react.dev/errors/"+e;if(1M||(e.current=R[M],R[M]=null,M--)}function F(e,t){R[++M]=e.current,e.current=t}var U=z(null),W=z(null),H=z(null),$=z(null);function V(e,t){switch(F(H,t),F(W,e),F(U,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=cb(t=cv(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(U),F(U,e)}function K(){B(U),B(W),B(H)}function G(e){null!==e.memoizedState&&F($,e);var t=U.current,n=cb(t,e.type);t!==n&&(F(W,e),F(U,n))}function q(e){W.current===e&&(B(U),B(W)),$.current===e&&(B($),st._currentValue=D)}function Q(e){if(void 0===tM)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tM=t&&t[1]||"",tz=-1)":-1i||c[o]!==s[i]){var f="\n"+c[o].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=o&&0<=i);break}}}finally{Y=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Q(n):""}function J(e){try{var t="",n=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return Q(e.type);case 16:return Q("Lazy");case 13:return e.child!==t&&null!==t?Q("Suspense Fallback"):Q("Suspense");case 19:return Q("SuspenseList");case 0:case 15:return X(e.type,!1);case 11:return X(e.type.render,!1);case 1:return X(e.type,!0);case 31:return Q("Activity");default:return""}}(e,n),n=e,e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Z=Object.prototype.hasOwnProperty,ee=i.unstable_scheduleCallback,et=i.unstable_cancelCallback,en=i.unstable_shouldYield,er=i.unstable_requestPaint,eo=i.unstable_now,ei=i.unstable_getCurrentPriorityLevel,el=i.unstable_ImmediatePriority,ea=i.unstable_UserBlockingPriority,eu=i.unstable_NormalPriority,ec=i.unstable_LowPriority,es=i.unstable_IdlePriority,ef=i.log,ed=i.unstable_setDisableYieldValue,ep=null,eh=null;function em(e){if("function"==typeof ef&&ed(e),eh&&"function"==typeof eh.setStrictMode)try{eh.setStrictMode(ep,e)}catch(e){}}var ey=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ev|0)|0},eg=Math.log,ev=Math.LN2,eb=256,ew=262144,eS=4194304;function ek(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function eO(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=0x7ffffff&r;return 0!==a?0!=(r=a&~i)?o=ek(r):0!=(l&=a)?o=ek(l):n||0!=(n=a&~e)&&(o=ek(n)):0!=(a=r&~i)?o=ek(a):0!==l?o=ek(l):n||0!=(n=r&~e)&&(o=ek(n)),0===o?0:0!==t&&t!==o&&0==(t&i)&&((i=o&-o)>=(n=t&-t)||32===i&&0!=(4194048&n))?t:o}function ex(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function ej(){var e=eS;return 0==(0x3c00000&(eS<<=1))&&(eS=4194304),e}function eE(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eP(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eC(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ey(t);e.entangledLanes|=t,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&n}function eT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ey(n),o=1<=nn),ni=!1;function nl(e,t){switch(e){case"keyup":return -1!==ne.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function na(e){return"object"===(void 0===(e=e.detail)?"undefined":r(e))&&"data"in e?e.data:null}var nu=!1,nc={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ns(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!nc[e.type]:"textarea"===t}function nf(e,t,n,r){tw?tS?tS.push(r):tS=[r]:tw=r,0<(t=co(t,"onChange")).length&&(n=new tH("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var nd=null,np=null;function nh(e){u6(e,0)}function nm(e){if(e7(eG(e)))return e}function ny(e,t){if("change"===e)return t}var ng=!1;if(tE){if(tE){var nv="oninput"in document;if(!nv){var nb=document.createElement("div");nb.setAttribute("oninput","return;"),nv="function"==typeof nb.oninput}o=nv}else o=!1;ng=o&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nC(r)}}function n_(e){var t,n;e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var r=te(e.document);t=r,null!=(n=e.HTMLIFrameElement)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n;){try{var o="string"==typeof r.contentWindow.location.href}catch(e){o=!1}if(o)e=r.contentWindow;else break;r=te(e.document)}return r}function nN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var nA=tE&&"documentMode"in document&&11>=document.documentMode,nI=null,nL=null,nD=null,nR=!1;function nM(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nR||null==nI||nI!==te(r)||(r="selectionStart"in(r=nI)&&nN(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},nD&&nP(nD,r)||(nD=r,0<(r=co(nL,"onSelect")).length&&(t=new tH("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nI)))}function nz(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nB={animationend:nz("Animation","AnimationEnd"),animationiteration:nz("Animation","AnimationIteration"),animationstart:nz("Animation","AnimationStart"),transitionrun:nz("Transition","TransitionRun"),transitionstart:nz("Transition","TransitionStart"),transitioncancel:nz("Transition","TransitionCancel"),transitionend:nz("Transition","TransitionEnd")},nF={},nU={};function nW(e){if(nF[e])return nF[e];if(!nB[e])return e;var t,n=nB[e];for(t in n)if(n.hasOwnProperty(t)&&t in nU)return nF[e]=n[t];return e}tE&&(nU=document.createElement("div").style,"AnimationEvent"in window||(delete nB.animationend.animation,delete nB.animationiteration.animation,delete nB.animationstart.animation),"TransitionEvent"in window||delete nB.transitionend.transition);var nH=nW("animationend"),n$=nW("animationiteration"),nV=nW("animationstart"),nK=nW("transitionrun"),nG=nW("transitionstart"),nq=nW("transitioncancel"),nQ=nW("transitionend"),nY=new Map,nX="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function nJ(e,t){nY.set(e,t),eJ(t,[e])}nX.push("scrollEnd");var nZ="function"==typeof reportError?reportError:function(e){if("object"===("undefined"==typeof window?"undefined":r(window))&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===(void 0===e?"undefined":r(e))&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===("undefined"==typeof process?"undefined":r(process))&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},n0=[],n1=0,n2=0;function n3(){for(var e=n1,t=n2=n1=0;t>=l,o-=l,rb=1<<32-ey(t)+o|n<d?(m=f,f=null):m=f.sibling;var y=h(r,f,a[d],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),i=l(y,i,d),null===s?c=y:s.sibling=y,s=y,f=m}if(d===a.length)return n(r,f),rC&&rS(r,d),c;if(null===f){for(;dm?(y=d,d=null):y=d.sibling;var b=h(r,d,g.value,c);if(null===b){null===d&&(d=y);break}e&&d&&null===b.alternate&&t(r,d),i=l(b,i,m),null===f?s=b:f.sibling=b,f=b,d=y}if(g.done)return n(r,d),rC&&rS(r,m),s;if(null===d){for(;!g.done;m++,g=a.next())null!==(g=p(r,g.value,c))&&(i=l(g,i,m),null===f?s=g:f.sibling=g,f=g);return rC&&rS(r,m),s}for(d=o(d);!g.done;m++,g=a.next())null!==(g=v(d,r,m,g.value,c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=l(g,i,m),null===f?s=g:f.sibling=g,f=g);return e&&d.forEach(function(e){return t(r,e)}),rC&&rS(r,m),s}(s,f,d=w.call(d),b)}if("function"==typeof d.then)return c(s,f,oy(d),b);if(d.$$typeof===S)return c(s,f,rY(s,d),b);ov(s,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"===(void 0===d?"undefined":r(d))?(d=""+d,null!==f&&6===f.tag?(n(s,f.sibling),(b=i(f,d)).return=s):(n(s,f),(b=ra(d,s.mode,b)).return=s),a(s=b)):n(s,f)}(c,s,f,d);return oh=null,b}catch(e){if(e===oo||e===ol)throw e;var w=rt(29,e,null,c.mode);return w.lanes=d,w.return=c,w}finally{}}}var ow=ob(!0),oS=ob(!1),ok=!1;function oO(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ox(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oj(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oE(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&aM)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=n9(e),n5(e,null,n),t}return n4(e,r,t,n),n9(e)}function oP(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194048&n))){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eT(e,n)}}function oC(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?o=i=l:i=i.next=l,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var oT=!1;function o_(){if(oT){var e=r5;if(null!==e)throw e}}function oN(e,t,n,r){oT=!1;var o=e.updateQueue;ok=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var u=a,c=u.next;u.next=null,null===l?i=c:l.next=c,l=u;var s=e.alternate;null!==s&&(a=(s=s.updateQueue).lastBaseUpdate)!==l&&(null===a?s.firstBaseUpdate=c:a.next=c,s.lastBaseUpdate=u)}if(null!==i){var f=o.baseState;for(l=0,s=c=u=null,a=i;;){var d=-0x20000001&a.lane,h=d!==a.lane;if(h?(aF&d)===d:(r&d)===d){0!==d&&d===r6&&(oT=!0),null!==s&&(s=s.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var m=e,y=a;switch(d=t,y.tag){case 1:if("function"==typeof(m=y.payload)){f=m.call(n,f,d);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d="function"==typeof(m=y.payload)?m.call(n,f,d):m))break e;f=p({},f,d);break e;case 2:ok=!0}}null!==(d=a.callback)&&(e.flags|=64,h&&(e.flags|=8192),null===(h=o.callbacks)?o.callbacks=[d]:h.push(d))}else h={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===s?(c=s=h,u=f):s=s.next=h,l|=d;if(null===(a=a.next))if(null===(a=o.shared.pending))break;else a=(h=a).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}null===s&&(u=f),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=s,null===i&&(o.shared.lanes=0),aq|=l,e.lanes=l,e.memoizedState=f}}function oA(e,t){if("function"!=typeof e)throw Error(u(191,e));e.call(t)}function oI(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;el?l:8;var a=I.T,u={};I.T=u,le(e,!1,t,n);try{var c=i(),s=I.S;if(null!==s&&s(u,c),null!==c&&"object"===(void 0===c?"undefined":r(c))&&"function"==typeof c.then){var f,d,p=(f=[],d={status:"pending",value:null,reason:null,then:function(e){f.push(e)}},c.then(function(){d.status="fulfilled",d.value=o;for(var e=0;e title"))),cp(i,r,n),i[eR]=e,eQ(i),r=i;break e;case"link":var l=c3("link","href",o).get(r+(n.href||""));if(l){for(var a=0;aa)break;var s=u.transferSize,f=u.initiatorType;s&&ch(f)&&(l+=s*((u=u.responseEnd)c6?50:800)+m);return h.unsuspend=e,function(){h.unsuspend=null,clearTimeout(t),clearTimeout(n)}}:null)){ue=i,e.cancelPendingCommit=y(uE.bind(null,e,t,i,n,r,o,l,a,u,s,f,null,d,p)),uf(e,i,l,!c);return}}uE(e,t,i,n,r,o,l,a,u)}function uf(e,t,n,r){t&=~aY,t&=~aQ,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?l.createElement(o,{is:r.is}):l.createElement(o)}}i[eR]=t,i[eM]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)i.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=i,cp(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&lY(t)}}return l1(t),lX(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&lY(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(u(166));if(e=H.current,rD(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=rE))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[eR]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cs(e.nodeValue,n)))||rA(t,!0)}else(e=cg(e).createTextNode(r))[eR]=t,t.stateNode=e}return l1(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=rD(t),null!==n){if(null===e){if(!r)throw Error(u(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(u(557));e[eR]=t}else rR(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;l1(t),e=!1}else n=rM(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e){if(256&t.flags)return oV(t),t;return oV(t),null}if(0!=(128&t.flags))throw Error(u(558))}return l1(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=rD(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(u(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(u(317));o[eR]=t}else rR(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;l1(t),o=!1}else o=rM(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o){if(256&t.flags)return oV(t),t;return oV(t),null}}if(oV(t),0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,o=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),lZ(t,t.updateQueue),l1(t),null;case 4:return K(),null===e&&ce(t.stateNode.containerInfo),l1(t),null;case 10:return rH(t.type),l1(t),null;case 19:if(B(oK),null===(r=t.memoizedState))return l1(t),null;if(o=0!=(128&t.flags),null===(i=r.rendering))if(o)l0(r,!1);else{if(0!==aG||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=oG(e))){for(t.flags|=128,l0(r,!1),t.updateQueue=e=i.updateQueue,lZ(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)ro(n,e),n=n.sibling;return F(oK,1&oK.current|2),rC&&rS(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&eo()>a4&&(t.flags|=128,o=!0,l0(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=oG(i))){if(t.flags|=128,o=!0,t.updateQueue=e=e.updateQueue,lZ(t,e),l0(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!rC)return l1(t),null}else 2*eo()-r.renderingStartTime>a4&&0x20000000!==n&&(t.flags|=128,o=!0,l0(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=eo(),e.sibling=null,n=oK.current,F(oK,o?1&n|2:1&n),rC&&rS(t,r.treeForkCount),e;return l1(t),null;case 22:case 23:return oV(t),oz(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(l1(t),6&t.subtreeFlags&&(t.flags|=8192)):l1(t),null!==(n=t.updateQueue)&&lZ(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(oe),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rH(r1),l1(t),null;case 25:case 30:return null}throw Error(u(156,t.tag))}(t.alternate,t,aK);if(null!==n){aB=n;return}if(null!==(t=t.sibling)){aB=t;return}aB=t=e}while(null!==t);0===aG&&(aG=5)}function uj(e,t){do{var n=function(e,t){switch(rx(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rH(r1),K(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return q(t),null;case 31:if(null!==t.memoizedState){if(oV(t),null===t.alternate)throw Error(u(340));rR()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(oV(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(u(340));rR()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(oK),null;case 4:return K(),null;case 10:return rH(t.type),null;case 22:case 23:return oV(t),oz(),null!==e&&B(oe),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return rH(r1),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,aB=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){aB=e;return}aB=e=n}while(null!==e);aG=6,aB=null}function uE(e,t,n,r,o,i,l,a,c){e.cancelPendingCommit=null;do uN();while(0!==a5);if(0!=(6&aM))throw Error(u(327));if(null!==t){if(t===e.current)throw Error(u(177));if(!function(e,t,n,r,o,i){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var a=e.entanglements,u=e.expirationTimes,c=e.hiddenUpdates;for(n=l&~n;0y&&(l=y,y=m,m=l);var g=nT(a,m),v=nT(a,y);if(g&&v&&(1!==p.rangeCount||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=f.createRange();b.setStart(g.node,g.offset),p.removeAllRanges(),m>y?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(f=[],p=a;p=p.parentNode;)1===p.nodeType&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof a.focus&&a.focus(),a=0;an?32:n,I.T=null,n=un,un=null;var i=a9,l=ue;if(a5=0,a7=a9=null,ue=0,0!=(6&aM))throw Error(u(331));var a=aM;if(aM|=4,aI(i.current),aE(i,i.current,l,n),aM=a,uG(0,!1),eh&&"function"==typeof eh.onPostCommitFiberRoot)try{eh.onPostCommitFiberRoot(ep,i)}catch(e){}return!0}finally{L.p=o,I.T=r,u_(e,t)}}function uI(e,t,n){t=rf(n,t),t=lv(e.stateNode,t,2),null!==(e=oE(e,t,2))&&(eP(e,2),uK(e))}function uL(e,t,n){if(3===e.tag)uI(e,e,n);else for(;null!==t;){if(3===t.tag){uI(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===a6||!a6.has(r))){e=rf(n,e),null!==(r=oE(t,n=lb(2),2))&&(lw(n,r,t,e),eP(r,2),uK(r));break}}t=t.return}}function uD(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new aR;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(aV=!0,o.add(n),e=uR.bind(null,e,t,n),t.then(e,e))}function uR(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,az===e&&(aF&n)===n&&(4===aG||3===aG&&(0x3c00000&aF)===aF&&300>eo()-a2?0==(2&aM)&&uh(e,0):aY|=n,aJ===aF&&(aJ=0)),uK(e)}function uM(e,t){0===t&&(t=ej()),null!==(e=n6(e,t))&&(eP(e,t),uK(e))}function uz(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),uM(e,n)}function uB(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(u(314))}null!==r&&r.delete(t),uM(e,n)}var uF=null,uU=null,uW=!1,uH=!1,u$=!1,uV=0;function uK(e){e!==uU&&null===e.next&&(null===uU?uF=uU=e:uU=uU.next=e),uH=!0,uW||(uW=!0,cj(function(){0!=(6&aM)?ee(el,uq):uQ()}))}function uG(e,t){if(!u$&&uH){u$=!0;do for(var n=!1,r=uF;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var l=r.suspendedLanes,a=r.pingedLanes;i=0xc000095&(i=(1<<31-ey(42|e)+1)-1&(o&~(l&~a)))?0xc000095&i|1:i?2|i:0}0!==i&&(n=!0,uJ(r,i))}else i=aF,0==(3&(i=eO(r,r===az?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||ex(r,i)||(n=!0,uJ(r,i));r=r.next}while(n);u$=!1}}function uq(){uQ()}function uQ(){uH=uW=!1;var e,t=0;0===uV||((e=window.event)&&"popstate"===e.type?e===cS||(cS=e,0):(cS=null,1))||(t=uV);for(var n=eo(),r=null,o=uF;null!==o;){var i=o.next,l=uY(o,n);0===l?(o.next=null,null===r?uF=i:r.next=i,null===i&&(uU=r)):(r=o,(0!==t||0!=(3&l))&&(uH=!0)),o=i}0!==a5&&5!==a5||uG(t,!1),0!==uV&&(uV=0)}function uY(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-0x3c00001&e.pendingLanes;0 title"):null)}function c8(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var c6=0;function c5(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)c7(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c9=null;function c7(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c9=new Map,t.forEach(se,e),c9=null,c5.call(e))}function se(e,t){if(!(4&t.state.loading)){var n=c9.get(e);if(n)var r=n.get(null);else{n=new Map,c9.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);no})},2316:function(e,t,n){"use strict";n.d(t,{KA:()=>r,KS:()=>i,NE:()=>l,bz:()=>o});var r=2,o=1,i=0,l=["average","bad","black","blue","brown","good","green","grey","label","olive","orange","pink","purple","red","teal","transparent","violet","white","yellow"]},1128:function(e,t,n){"use strict";n.d(t,{Nh:()=>f,WK:()=>O,bk:()=>s,i4:()=>g,tk:()=>k,y4:()=>p});var r,o=n(7686);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};d=!!e.ignoreWindowFocus},h=!0;function m(e,t){if(d){h=!0;return}if(r&&(clearTimeout(r),r=null),t){r=setTimeout(function(){return m(e)});return}h!==e&&(h=e,f.emit(e?"window-focus":"window-blur"),f.emit("window-focus-change",e))}var y=null;function g(e){var t=String(e.tagName).toLowerCase();return"input"===t||"textarea"===t}function v(){y&&(y.removeEventListener("blur",v),y=null,f.emit("input-blur"))}var b=null,w=null,S=[];function k(e){S.push(e)}function O(e){var t=S.indexOf(e);t>=0&&S.splice(t,1)}window.addEventListener("mousemove",function(e){var t=e.target;t!==w&&(w=t,function(e){if(!y&&h)for(var t=document.body;e&&e!==t;){if(S.includes(e)){if(e.contains(b))return;b=e,e.focus();return}e=e.parentElement}}(t))}),document.addEventListener("focus",function(e){var t,n,r;if(n=e.target,null!=(r=Element)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](n):!(n instanceof r)){w=null,b=null;return}w=null,b=e.target,g(e.target)&&(t=e.target,v(),(y=t).addEventListener("blur",v),f.emit("input-focus"))},!0),document.addEventListener("blur",function(){w=null},!0),window.addEventListener("focus",function(){m(!0)}),window.addEventListener("blur",function(){w=null,m(!1,!0)}),window.addEventListener("close",function(){m(!1)});var x={},j=function(){function e(t,n,r){l(this,e),c(this,"event",void 0),c(this,"type",void 0),c(this,"code",void 0),c(this,"ctrl",void 0),c(this,"shift",void 0),c(this,"alt",void 0),c(this,"repeat",void 0),c(this,"_str",void 0),this.event=t,this.type=n,this.code=t.keyCode,this.ctrl=t.ctrlKey,this.shift=t.shiftKey,this.alt=t.altKey,this.repeat=!!r}return u(e,[{key:"hasModifierKeys",value:function(){return this.ctrl||this.alt||this.shift}},{key:"isModifierKey",value:function(){return this.code===o.Ss||this.code===o.re||this.code===o.cH}},{key:"isDown",value:function(){return"keydown"===this.type}},{key:"isUp",value:function(){return"keyup"===this.type}},{key:"toString",value:function(){return this._str||(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=o.sV&&this.code<=o.Yw?this._str+="F".concat(this.code-111):this._str+="[".concat(this.code,"]")),this._str}}]),e}();document.addEventListener("keydown",function(e){if(!g(e.target)){var t=e.keyCode,n=new j(e,"keydown",x[t]);f.emit("keydown",n),f.emit("key",n),x[t]=!0}}),document.addEventListener("keyup",function(e){if(!g(e.target)){var t=e.keyCode,n=new j(e,"keyup");f.emit("keyup",n),f.emit("key",n),x[t]=!1}})},9582:function(e,t,n){"use strict";n.d(t,{QL:()=>i});var r=["f","p","n","μ","m"," ","k","M","G","T","P","E","Z","Y","R","Q","F","N","H"],o=r.indexOf(" ");function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Number.isFinite(e))return e.toString();var i=Math.floor(Math.max(3*t,Math.floor(Math.log10(Math.abs(e))))/3),l=r[Math.min(i+o,r.length-1)],a=(e/Math.pow(1e3,i)).toFixed(2);return a.endsWith(".00")?a=a.slice(0,-3):a.endsWith(".0")&&(a=a.slice(0,-2)),"".concat(a," ").concat(l.trim()).concat(n).trim()}},1874:function(e,t,n){"use strict";n.d(t,{ao:()=>f,sc:()=>d,zr:()=>c});var r=n(1128),o=n(7686),i={},l=[o.s6,o.Ri,o.iy,o.aW,o.Ss,o.re,o.gf,o.R,o.iU,o.zh,o.sP],a={},u=[];function c(){for(var e in a)a[e]&&(a[e]=!1,Byond.command(s.verbParamsFn(s.keyUpVerb,e)))}var s={keyDownVerb:"KeyDown",keyUpVerb:"KeyUp",verbParamsFn:function(e,t){return"".concat(e,' "').concat(t,'"')}};function f(){r.Nh.on("key",p)}function d(){r.Nh.off("key",p)}function p(e){var t=!0,n=!1,r=void 0;try{for(var o,c=u[Symbol.iterator]();!(t=(o=c.next()).done);t=!0)(0,o.value)(e)}catch(e){n=!0,r=e}finally{try{t||null==c.return||c.return()}finally{if(n)throw r}}!function(e){var t,n=String(e);if("Ctrl+F5"===n||"Ctrl+R"===n)return location.reload();if(!("Ctrl+F"===n||e.event.defaultPrevented||e.isModifierKey()||l.includes(e.code))){var r=16===(t=e.code)?"Shift":17===t?"Ctrl":18===t?"Alt":33===t?"Northeast":34===t?"Southeast":35===t?"Southwest":36===t?"Northwest":37===t?"West":38===t?"North":39===t?"East":40===t?"South":45===t?"Insert":46===t?"Delete":t>=48&&t<=57||t>=65&&t<=90?String.fromCharCode(t):t>=96&&t<=105?"Numpad".concat(t-96):t>=112&&t<=123?"F".concat(t-111):188===t?",":189===t?"-":190===t?".":void 0;if(r){var o=i[r];if(o)return Byond.command(o);if(e.isDown()&&!a[r]){a[r]=!0;var u=s.verbParamsFn(s.keyDownVerb,r);return Byond.command(u)}if(e.isUp()&&a[r]){a[r]=!1;var c=s.verbParamsFn(s.keyUpVerb,r);Byond.command(c)}}}}(e)}},7686:function(e,t,n){"use strict";n.d(t,{R:()=>p,Ri:()=>o,Ss:()=>l,Yw:()=>y,aW:()=>r,cH:()=>a,gf:()=>f,iU:()=>s,iy:()=>c,re:()=>i,s6:()=>u,sP:()=>m,sV:()=>h,zh:()=>d});var r=9,o=13,i=16,l=17,a=18,u=27,c=32,s=37,f=38,d=39,p=40,h=112,m=116,y=123},925:function(e,t,n){"use strict";n.d(t,{KL:()=>i,_:()=>o});var r,o=((r={}).A="a",r.Alt="Alt",r.Backspace="Backspace",r.Control="Control",r.D="d",r.Delete="Delete",r.Down="ArrowDown",r.E="e",r.End="End",r.Enter="Enter",r.Esc="Esc",r.Escape="Escape",r.Home="Home",r.Insert="Insert",r.Left="ArrowLeft",r.Minus="-",r.N="n",r.PageDown="PageDown",r.PageUp="PageUp",r.Plus="+",r.Right="ArrowRight",r.S="s",r.Shift="Shift",r.Space=" ",r.Tab="Tab",r.Up="ArrowUp",r.W="w",r.Z="z",r);function i(e){return"Esc"===e||"Escape"===e}},6859:function(e,t,n){"use strict";function r(e,t,n){return en?n:e}function o(e){return e<0?0:e>1?1:e}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return(e-t)/(n-t)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(Math.max(t,0))}function a(e,t){var n=!0,r=!1,o=void 0;try{for(var i,l=Object.keys(t)[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var a,u=i.value;if((a=t[u])&&e>=a[0]&&e<=a[1])return u}}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}}function u(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)}n.d(t,{J$:()=>o,Lz:()=>u,Mg:()=>l,TG:()=>a,hs:()=>i,qE:()=>r})},5490:function(e,t,n){"use strict";function r(e){for(var t="",n=0;nr,a_:()=>o,b5:()=>i})},3375:function(e,t,n){"use strict";n.d(t,{Fl:()=>y,WP:()=>g,lO:()=>v,zA:()=>l});var r=n(2316),o=n(5490);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nnj,Ap:()=>nM,Ki:()=>nN,wn:()=>nR,N6:()=>n_,IC:()=>nL,pd:()=>nC,tU:()=>nK,fs:()=>nY,$n:()=>t3,cG:()=>nf,D1:()=>ne,In:()=>k,az:()=>y,Nt:()=>nc,BK:()=>ns,so:()=>nS});var r,o,i,l,a=n(8138),u=n(6859),c=n(4530),s=n.t(c,2);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["as","className","children","tw"]),u=o?"".concat(o," ").concat((0,h.WP)(a)):(0,h.WP)(a);return(0,c.createElement)(void 0===r?"div":r,(t=m({},(0,h.Fl)(m({},a,(0,h.lO)(l)))),n=n={className:u},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t),i)}var g=n(925),v=n(5490);function b(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var S=/-o$/;function k(e){var t=e.name,n=void 0===t?"":t,r=e.size,o=e.spin,i=e.className,l=e.rotation,u=w(e,["name","size","spin","className","rotation"]),c=u.style||{};r&&(c.fontSize="".concat(100*r,"%")),l&&(c.transform="rotate(".concat(l,"deg)")),u.style=c;var s=(0,h.Fl)(u),f="";if(n.startsWith("tg-"))f=n;else{var d=S.test(n),p=n.replace(S,""),m=!p.startsWith("fa-");f=d?"far ":"fas ",m&&(f+="fa-"),f+=p,o&&(f+=" fa-spin")}return(0,a.jsx)("i",b({className:(0,v.Ly)(["Icon",f,i,(0,h.WP)(u)])},s))}function O(){return"undefined"!=typeof window}function x(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function E(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return!!O()&&(e instanceof Node||e instanceof j(e).Node)}function C(e){return!!O()&&(e instanceof Element||e instanceof j(e).Element)}function T(e){return!!O()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function _(e){return!!O()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}(k||(k={})).Stack=function(e){var t,n,r=e.className,o=e.children,i=e.size,l=w(e,["className","children","size"]),u=l.style||{};return i&&(u.fontSize="".concat(100*i,"%")),l.style=u,(0,a.jsx)("span",(t=b({className:(0,v.Ly)(["IconStack",r,(0,h.WP)(l)])},(0,h.Fl)(l)),n=n={children:o},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))};let N=new Set(["inline","contents"]);function A(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N.has(o)}let I=new Set(["table","td","th"]),L=[":popover-open",":modal"];function D(e){return L.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let R=["transform","translate","scale","rotate","perspective"],M=["transform","translate","scale","rotate","perspective","filter"],z=["paint","layout","strict","content"];function B(e){let t=F(),n=C(e)?H(e):e;return R.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||M.some(e=>(n.willChange||"").includes(e))||z.some(e=>(n.contain||"").includes(e))}function F(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let U=new Set(["html","body","#document"]);function W(e){return U.has(x(e))}function H(e){return j(e).getComputedStyle(e)}function $(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V(e){if("html"===x(e))return e;let t=e.assignedSlot||e.parentNode||_(e)&&e.host||E(e);return _(t)?t.host:t}function K(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=V(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:T(n)&&A(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=j(o);if(i){let e=G(l);return t.concat(l,l.visualViewport||[],A(o)?o:[],e&&n?K(e):[])}return t.concat(o,K(o,[],n))}function G(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var q='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',Q="undefined"==typeof Element,Y=Q?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,X=!Q&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},J=function e(t,n){void 0===n&&(n=!0);var r,o=null==t||null==(r=t.getAttribute)?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Z=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},ee=function(e,t,n){if(J(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(q));return t&&Y.call(e,q)&&r.unshift(e),r=r.filter(n)},et=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!J(l,!1))if("SLOT"===l.tagName){var a=l.assignedElements(),u=e(a.length?a:l.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:l,candidates:u})}else{Y.call(l,q)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var c=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),s=!J(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(c&&s){var f=e(!0===c?l.children:c.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},en=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},er=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Z(e))&&!en(e)?0:e.tabIndex},eo=function(e,t){var n=er(e);return n<0&&t&&!en(e)?0:n},ei=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},el=function(e){return"INPUT"===e.tagName},ea=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(Y.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ef(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,a=X(e);if(l&&!l.shadowRoot&&!0===r(l))return ef(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=i}if(es(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},ep=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;ner(t))&&!!eh(e,t)},ey=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},eg=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,a=eo(l,i),u=i?e(t.candidates):l;0===a?i?n.push.apply(n,u):n.push(l):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:u})}),r.sort(ei).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},ev=function(e,t){return eg((t=t||{}).getShadowRoot?et([e],t.includeContainer,{filter:em.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ey}):ee(e,t.includeContainer,em.bind(null,t)))};function eb(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ew(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eS(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function ek(e){return(null==e?void 0:e.ownerDocument)||document}function eO(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...eO(e,t.id,n)])}function ex(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var ej="undefined"!=typeof document?c.useLayoutEffect:function(){};function eE(e){let t=c.useRef(e);return ej(()=>{t.current=e}),t}let eP={...s}.useInsertionEffect||(e=>e());function eC(e){let t=c.useRef(()=>{});return eP(()=>{t.current=e}),c.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function e_(e,t){let n=ev(e,eT()),r=n.length;if(0===r)return;let o=function(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}(ek(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function eN(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!eb(n,r)}function eA(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var eI=n(6634);let eL=Math.min,eD=Math.max,eR=Math.round,eM=Math.floor,ez=e=>({x:e,y:e}),eB={left:"right",right:"left",bottom:"top",top:"bottom"},eF={start:"end",end:"start"};function eU(e,t){return"function"==typeof e?e(t):e}function eW(e){return e.split("-")[0]}function eH(e){return e.split("-")[1]}function e$(e){return"x"===e?"y":"x"}function eV(e){return"y"===e?"height":"width"}let eK=new Set(["top","bottom"]);function eG(e){return eK.has(eW(e))?"y":"x"}function eq(e){return e.replace(/start|end/g,e=>eF[e])}let eQ=["left","right"],eY=["right","left"],eX=["top","bottom"],eJ=["bottom","top"];function eZ(e){return e.replace(/left|right|bottom|top/g,e=>eB[e])}function e0(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function e1(e,t,n){let r,{reference:o,floating:i}=e,l=eG(t),a=e$(eG(t)),u=eV(a),c=eW(t),s="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(eH(t)){case"start":r[a]-=p*(n&&s?-1:1);break;case"end":r[a]+=p*(n&&s?-1:1)}return r}let e2=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=e1(c,r,u),d=r,p={},h=0;for(let n=0;nC(e)&&"body"!==x(e)),o=null,i="fixed"===H(e).position,l=i?V(e):e;for(;C(l)&&!W(l);){let t=H(l),n=B(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&to.has(o.position)||A(l)&&!n&&function e(t,n){let r=V(t);return!(r===n||!C(r)||W(r))&&("fixed"===H(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=V(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce((e,n)=>{let r=ti(t,n,o);return e.top=eD(r.top,e.top),e.right=eL(r.right,e.right),e.bottom=eL(r.bottom,e.bottom),e.left=eD(r.left,e.left),e},ti(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:tu,getElementRects:tc,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=e6(e);return{width:t,height:n}},getScale:e9,isElement:C,isRTL:function(e){return"rtl"===H(e).direction}};function tf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var td="undefined"!=typeof document?c.useLayoutEffect:function(){};function tp(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!tp(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tp(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function th(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tm(e,t){let n=th(e);return Math.round(t*n)/n}function ty(e){let t=c.useRef(e);return td(()=>{t.current=e}),t}let tg="active",tv="selected",tb={...s},tw=!1,tS=0,tk=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+tS++,tO=tb.useId||function(){let[e,t]=c.useState(()=>tw?tk():void 0);return ej(()=>{null==e&&t(tk())},[]),c.useEffect(()=>{tw=!0},[]),e},tx=c.createContext(null),tj=c.createContext(null),tE=()=>{var e;return(null==(e=c.useContext(tx))?void 0:e.id)||null};function tP(e){return"data-floating-ui-"+e}function tC(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let tT=tP("safe-polygon");function t_(e,t,n){if(n&&!ex(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){let n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function tN(e){return"function"==typeof e?e():e}let tA={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},tI=c.forwardRef(function(e,t){let[n,r]=c.useState();ej(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);let o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[tP("focus-guard")]:"",style:tA};return(0,a.jsx)("span",{...e,...o})}),tL=c.createContext(null),tD=tP("portal");function tR(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});let{id:t,root:n}=e,r=tO(),o=tM(),[i,l]=c.useState(null),a=c.useRef(null);return ej(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),ej(()=>{if(!r||a.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement("div");n.id=r,n.setAttribute(tD,""),e.appendChild(n),a.current=n,l(n)},[t,r]),ej(()=>{if(null===n||!r||a.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!P(e)&&(e=e.current),e=e||document.body;let i=null;t&&((i=document.createElement("div")).id=t,e.appendChild(i));let u=document.createElement("div");u.id=r,u.setAttribute(tD,""),(e=i||e).appendChild(u),a.current=u,l(u)},[t,n,r,o]),i}({id:n,root:r}),[l,u]=c.useState(null),s=c.useRef(null),f=c.useRef(null),d=c.useRef(null),p=c.useRef(null),h=null==l?void 0:l.modal,m=null==l?void 0:l.open,y=!!l&&!l.modal&&l.open&&o&&!!(r||i);return c.useEffect(()=>{if(i&&o&&!h)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&eN(e)&&("focusin"===e.type?eA:function(e){ev(e,eT()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(i)}},[i,o,h]),c.useEffect(()=>{!i||m||eA(i)},[m,i]),(0,a.jsxs)(tL.Provider,{value:c.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:s,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:p,portalNode:i,setFocusManagerState:u}),[o,i]),children:[y&&i&&(0,a.jsx)(tI,{"data-type":"outside",ref:s,onFocus:e=>{var t,n;if(eN(e,i))null==(t=d.current)||t.focus();else{let e=e_(ek(n=l?l.domReference:null).body,-1)||n;null==e||e.focus()}}}),y&&i&&(0,a.jsx)("span",{"aria-owns":i.id,style:tA}),i&&eI.createPortal(t,i),y&&i&&(0,a.jsx)(tI,{"data-type":"outside",ref:f,onFocus:e=>{var t,n;if(eN(e,i))null==(t=p.current)||t.focus();else{let t=e_(ek(n=l?l.domReference:null).body,1)||n;null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let tM=()=>c.useContext(tL);function tz(e){return T(e.target)&&"BUTTON"===e.target.tagName}function tB(e){return T(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}let tF={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tU={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tW=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function tH(e,t,n){let r=new Map,o="item"===n,i=e;if(o&&e){let{[tg]:t,[tv]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...i,...t.map(t=>{let r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(!(o&&[tg,tv].includes(n)))if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof i){var l;null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;ie(...o)).find(e=>void 0!==e)}}}else e[n]=i}),e),{})}}function t$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{let e;return e=new Map,{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}),a=null!=tE(),[u,s]=c.useState(r.reference),f=eC((e,t,r)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),d=c.useMemo(()=>({setPositionReference:s}),[]),p=c.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return c.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:p,events:l,floatingId:o,refs:d}),[t,f,p,l,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=c.useState(null),[a,u]=c.useState(null),s=(null==o?void 0:o.domReference)||i,f=c.useRef(null),d=c.useContext(tj);ej(()=>{s&&(f.current=s)},[s]);let p=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:u,open:s}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=c.useState(r);tp(p,r)||h(r);let[m,y]=c.useState(null),[g,v]=c.useState(null),b=c.useCallback(e=>{e!==O.current&&(O.current=e,y(e))},[]),w=c.useCallback(e=>{e!==x.current&&(x.current=e,v(e))},[]),S=i||m,k=l||g,O=c.useRef(null),x=c.useRef(null),j=c.useRef(f),E=null!=u,P=ty(u),C=ty(o),T=ty(s),_=c.useCallback(()=>{var e,r;let o,i,l;if(!O.current||!x.current)return;let a={placement:t,strategy:n,middleware:p};C.current&&(a.platform=C.current),(e=O.current,r=x.current,o=new Map,l={...(i={platform:ts,...a}).platform,_c:o},e2(e,r,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==T.current};N.current&&!tp(j.current,t)&&(j.current=t,eI.flushSync(()=>{d(t)}))})},[p,t,n,C,T]);td(()=>{!1===s&&j.current.isPositioned&&(j.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[s]);let N=c.useRef(!1);td(()=>(N.current=!0,()=>{N.current=!1}),[]),td(()=>{if(S&&(O.current=S),k&&(x.current=k),S&&k){if(P.current)return P.current(S,k,_);_()}},[S,k,_,P,E]);let A=c.useMemo(()=>({reference:O,floating:x,setReference:b,setFloating:w}),[b,w]),I=c.useMemo(()=>({reference:S,floating:k}),[S,k]),L=c.useMemo(()=>{let e={position:n,left:0,top:0};if(!I.floating)return e;let t=tm(I.floating,f.x),r=tm(I.floating,f.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...th(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,I.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:_,refs:A,elements:I,floatingStyles:L}),[f,_,A,I,L])}({...e,elements:{...o,...a&&{reference:a}}}),h=c.useCallback(e=>{let t=C(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),m=c.useCallback(e=>{(C(e)||null===e)&&(f.current=e,l(e)),(C(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!C(e))&&p.refs.setReference(e)},[p.refs]),y=c.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),g=c.useMemo(()=>({...p.elements,domReference:s}),[p.elements,s]),v=c.useMemo(()=>({...p,...r,refs:y,elements:g,nodeId:t}),[p,y,g,t,r]);return ej(()=>{r.dataRef.current.floatingContext=v;let e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),c.useMemo(()=>({...p,context:v,refs:y,elements:g}),[p,y,g,v])}({middleware:[{...(void 0===(d=s=void 0===D?6:D)&&(d=0),{name:"offset",options:d,async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:l}=e,a=await e8(e,d);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+a.x,y:o+a.y,data:{...a,placement:i}}}}),options:[s,f]},{...{name:"flip",options:m=p={padding:6},async fn(e){var t,n,r,o,i,l,a,u;let c,s,f,{placement:d,middlewareData:p,rects:h,initialPlacement:y,platform:g,elements:v}=e,{mainAxis:b=!0,crossAxis:w=!0,fallbackPlacements:S,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:x=!0,...j}=eU(m,e);if(null!=(t=p.arrow)&&t.alignmentOffset)return{};let E=eW(d),P=eG(y),C=eW(y)===y,T=await (null==g.isRTL?void 0:g.isRTL(v.floating)),_=S||(C||!x?[eZ(y)]:(c=eZ(y),[eq(y),c,eq(c)])),N="none"!==O;!S&&N&&_.push(...(s=eH(y),f=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?eY:eQ;return t?eQ:eY;case"left":case"right":return t?eX:eJ;default:return[]}}(eW(y),"start"===O,T),s&&(f=f.map(e=>e+"-"+s),x&&(f=f.concat(f.map(eq)))),f));let A=[y,..._],I=await e3(e,j),L=[],D=(null==(n=p.flip)?void 0:n.overflows)||[];if(b&&L.push(I[E]),w){let e,t,n,r,o=(l=d,a=h,void 0===(u=T)&&(u=!1),e=eH(l),n=eV(t=e$(eG(l))),r="x"===t?e===(u?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=eZ(r)),[r,eZ(r)]);L.push(I[o[0]],I[o[1]])}if(D=[...D,{placement:d,overflows:L}],!L.every(e=>e<=0)){let e=((null==(r=p.flip)?void 0:r.index)||0)+1,t=A[e];if(t&&("alignment"!==w||P===eG(t)||D.every(e=>eG(e.placement)!==P||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(o=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(k){case"bestFit":{let e=null==(i=D.filter(e=>{if(N){let t=eG(e.placement);return t===P||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=y}if(d!==n)return{reset:{placement:n}}}return{}}},options:[p,h]},{...(void 0===(b=y)&&(b={}),{name:"shift",options:b,async fn(e){let{x:t,y:n,placement:r}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=eU(b,e),u={x:t,y:n},c=await e3(e,a),s=eG(eW(r)),f=e$(s),d=u[f],p=u[s];if(o){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=d+c[e],r=d-c[t];d=eD(n,eL(d,r))}if(i){let e="y"===s?"top":"left",t="y"===s?"bottom":"right",n=p+c[e],r=p-c[t];p=eD(n,eL(p,r))}let h=l.fn({...e,[f]:d,[s]:p});return{...h,data:{x:h.x-t,y:h.y-n,enabled:{[f]:o,[s]:i}}}}}),options:[y,g]},I&&{...{name:"size",options:k=w={apply:function(e){var t=e.rects;e.elements.floating.style.width="".concat(t.reference.width,"px")}},async fn(e){var t,n;let r,o,{placement:i,rects:l,platform:a,elements:u}=e,{apply:c=()=>{},...s}=eU(k,e),f=await e3(e,s),d=eW(i),p=eH(i),h="y"===eG(i),{width:m,height:y}=l.floating;"top"===d||"bottom"===d?(r=d,o=p===(await (null==a.isRTL?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(o=d,r="end"===p?"top":"bottom");let g=y-f.top-f.bottom,v=m-f.left-f.right,b=eL(y-f[r],g),w=eL(m-f[o],v),S=!e.middlewareData.shift,O=b,x=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(x=v),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(O=g),S&&!p){let e=eD(f.left,0),t=eD(f.right,0),n=eD(f.top,0),r=eD(f.bottom,0);h?x=m-2*(0!==e||0!==t?e+t:eD(f.left,f.right)):O=y-2*(0!==n||0!==r?n+r:eD(f.top,f.bottom))}await c({...e,availableWidth:x,availableHeight:O});let j=await a.getDimensions(u.floating);return m!==j.width||y!==j.height?{reset:{rects:!0}}:{}}},options:[w,S]}],onOpenChange:function(e){Z(e),null==Y||Y(e)},open:J,placement:G||"bottom",transform:!1,whileElementsMounted:function(e,t,n){return void 0!==$&&$(),function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=e5(e),f=i||l?[...s?K(s):[],...K(t)]:[];f.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let d=s&&u?function(e,t){let n,r=null,o=E(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:f,width:d,height:p}=c;if(a||t(),!d||!p)return;let h={rootMargin:-eM(f)+"px "+-eM(o.clientWidth-(s+d))+"px "+-eM(o.clientHeight-(f+p))+"px "+-eM(s)+"px",threshold:eD(0,eL(1,u))||1},m=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!m)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||tf(c,e.getBoundingClientRect())||l(),m=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),i}(s,n):null,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),s&&!c&&h.observe(s),h.observe(t));let m=c?tt(e):null;return c&&function t(){let r=tt(e);m&&!tf(m,r)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(o)}}(e,t,n,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1})}}),et=ee.refs,en=ee.floatingStyles,er=ee.context,eo=function(e,t){void 0===t&&(t={});let{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[l,a]=c.useState("unmounted"),u=function(e,t){let[n,r]=c.useState(e);return e&&!n&&r(!0),c.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,i);return u||"close"!==l||a("unmounted"),ej(()=>{if(r){if(n){a("initial");let e=requestAnimationFrame(()=>{eI.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[n,r]),{isMounted:u,status:l}}(er,{duration:P||200}),ei=eo.isMounted,el=eo.status,ea=function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:s="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,y=c.useContext(tj),g=eC("function"==typeof u?u:()=>!1),v="function"==typeof u?g:u,b=c.useRef(!1),{escapeKey:w,outsidePress:S}=tW(h),{escapeKey:k,outsidePress:O}=tW(m),x=c.useRef(!1),j=eC(e=>{var t;if(!n||!l||!a||"Escape"!==e.key||x.current)return;let o=null==(t=i.current.floatingContext)?void 0:t.nodeId,u=y?eO(y.nodesRef.current,o):[];if(!w&&(e.stopPropagation(),u.length>0)){let e=!0;if(u.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),E=eC(e=>{var t;let n=()=>{var t;j(e),null==(t=ew(e))||t.removeEventListener("keydown",n)};null==(t=ew(e))||t.addEventListener("keydown",n)}),P=eC(e=>{var t;let n=i.current.insideReactTree;i.current.insideReactTree=!1;let l=b.current;if(b.current=!1,"click"===s&&l||n||"function"==typeof v&&!v(e))return;let a=ew(e),u="["+tP("inert")+"]",c=ek(o.floating).querySelectorAll(u),f=C(a)?a:null;for(;f&&!W(f);){let e=V(f);if(W(e)||!C(e))break;f=e}if(c.length&&C(a)&&!a.matches("html,body")&&!eb(a,o.floating)&&Array.from(c).every(e=>!eb(f,e)))return;if(T(a)&&A){let t=W(a),n=H(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),l=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,u=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,s=u&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),f=l&&e.offsetY>a.clientHeight;if(s||f)return}let d=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=y&&eO(y.nodesRef.current,d).some(t=>{var n;return eS(e,null==(n=t.context)?void 0:n.elements.floating)});if(eS(e,o.floating)||eS(e,o.domReference)||p)return;let h=y?eO(y.nodesRef.current,d):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),_=eC(e=>{var t;let n=()=>{var t;P(e),null==(t=ew(e))||t.removeEventListener(s,n)};null==(t=ew(e))||t.addEventListener(s,n)});c.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=S;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function u(){window.clearTimeout(e),x.current=!0}function c(){e=window.setTimeout(()=>{x.current=!1},5*!!F())}let f=ek(o.floating);a&&(f.addEventListener("keydown",k?E:j,k),f.addEventListener("compositionstart",u),f.addEventListener("compositionend",c)),v&&f.addEventListener(s,O?_:P,O);let d=[];return p&&(C(o.domReference)&&(d=K(o.domReference)),C(o.floating)&&(d=d.concat(K(o.floating))),!C(o.reference)&&o.reference&&o.reference.contextElement&&(d=d.concat(K(o.reference.contextElement)))),(d=d.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{a&&(f.removeEventListener("keydown",k?E:j,k),f.removeEventListener("compositionstart",u),f.removeEventListener("compositionend",c)),v&&f.removeEventListener(s,O?_:P,O),d.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,o,a,v,s,n,r,p,l,w,S,j,k,E,P,O,_]),c.useEffect(()=>{i.current.insideReactTree=!1},[i,v,s]);let N=c.useMemo(()=>({onKeyDown:j,...f&&{[tF[d]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[j,r,f,d]),A=c.useMemo(()=>({onKeyDown:j,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[tU[s]]:()=>{i.current.insideReactTree=!0}}),[j,s,i]);return c.useMemo(()=>l?{reference:N,floating:A}:{},[l,N,A])}(er,{ancestorScroll:!0,outsidePress:function(e){var t,n;return!j||(t=e.target,(null!=(n=Element)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n)&&!e.target.closest(j))}}),eu=function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:l=!0,event:a="click",toggle:u=!0,ignoreMouse:s=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,p=c.useRef(),h=c.useRef(!1),m=c.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){let t=p.current;0!==e.button||"click"===a||ex(t,!0)&&s||(n&&u&&(!o.current.openEvent||!d||"mousedown"===o.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click")))},onClick(e){let t=p.current;if("mousedown"===a&&p.current){p.current=void 0;return}ex(t,!0)&&s||(n&&u&&(!o.current.openEvent||!d||"click"===o.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,!(e.defaultPrevented||!f||tz(e))&&(" "!==e.key||tB(i)||(e.preventDefault(),h.current=!0),T(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(n&&u?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!f||tz(e)||tB(i))&&" "===e.key&&h.current&&(h.current=!1,n&&u?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[o,i,a,s,f,r,n,d,u]);return c.useMemo(()=>l?{reference:m}:{},[l,m])}(er,{enabled:!M}),ec=function(e,t){void 0===t&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:i,elements:l}=e,{enabled:a=!0,delay:u=0,handleClose:s=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=t,h=c.useContext(tj),m=tE(),y=eE(s),g=eE(u),v=eE(n),b=eE(d),w=c.useRef(),S=c.useRef(-1),k=c.useRef(),O=c.useRef(-1),x=c.useRef(!0),j=c.useRef(!1),E=c.useRef(()=>{}),P=c.useRef(!1),T=eC(()=>{var e;let t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});c.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(tC(S),tC(O),x.current=!0,P.current=!1)}},[a,i]),c.useEffect(()=>{if(!a||!y.current||!n)return;function e(e){T()&&r(!1,e,"hover")}let t=ek(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,r,a,y,T]);let _=c.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");let o=t_(g.current,"close",w.current);o&&!k.current?(tC(S),S.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(tC(S),r(!1,e,n))},[g,r]),N=eC(()=>{E.current(),k.current=void 0}),A=eC(()=>{if(j.current){let e=ek(l.floating).body;e.style.pointerEvents="",e.removeAttribute(tT),j.current=!1}}),I=eC(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));c.useEffect(()=>{if(a&&C(l.domReference)){let r=l.domReference,o=l.floating;return n&&r.addEventListener("mouseleave",i),p&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",t),o&&(o.addEventListener("mouseleave",i),o.addEventListener("mouseenter",u),o.addEventListener("mouseleave",c)),()=>{n&&r.removeEventListener("mouseleave",i),p&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",t),o&&(o.removeEventListener("mouseleave",i),o.removeEventListener("mouseenter",u),o.removeEventListener("mouseleave",c))}}function e(e){if(tC(S),x.current=!1,f&&!ex(w.current)||tN(b.current)>0&&!t_(g.current,"open"))return;let t=t_(g.current,"open",w.current);t?S.current=window.setTimeout(()=>{v.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function t(e){if(I())return void A();E.current();let t=ek(l.floating);if(tC(O),P.current=!1,y.current&&o.current.floatingContext){n||tC(S),k.current=y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){A(),N(),I()||_(e,!0,"safe-polygon")}});let r=k.current;t.addEventListener("mousemove",r),E.current=()=>{t.removeEventListener("mousemove",r)};return}"touch"===w.current&&eb(l.floating,e.relatedTarget)||_(e)}function i(e){I()||o.current.floatingContext&&(null==y.current||y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){A(),N(),I()||_(e)}})(e))}function u(){tC(S)}function c(e){I()||_(e,!1)}},[l,a,e,f,p,_,N,A,r,n,v,h,g,y,o,I,b]),ej(()=>{var e,t;if(a&&n&&null!=(e=y.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&T()){j.current=!0;let e=l.floating;if(C(l.domReference)&&e){let n=ek(l.floating).body;n.setAttribute(tT,"");let r=l.domReference,o=null==h||null==(t=h.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,n,m,l,h,y,T]),ej(()=>{n||(w.current=void 0,P.current=!1,N(),A())},[n,N,A]),c.useEffect(()=>()=>{N(),tC(S),tC(O),A()},[a,l.domReference,N,A]);let L=c.useMemo(()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function o(){x.current||v.current||r(!0,t,"hover")}f&&!ex(w.current)||n||0===tN(b.current)||P.current&&e.movementX**2+e.movementY**2<2||(tC(O),"touch"===w.current?o():(P.current=!0,O.current=window.setTimeout(o,tN(b.current))))}}},[f,r,n,v,b]);return c.useMemo(()=>a?{reference:L}:{},[a,L])}(er,{enabled:!M,restMs:z||200}),es=void 0!==U,ef=(t=(O=es?[]:[ea,B?ec:eu]).map(e=>null==e?void 0:e.reference),n=O.map(e=>null==e?void 0:e.floating),r=O.map(e=>null==e?void 0:e.item),o=c.useCallback(e=>tH(e,O,"reference"),t),i=c.useCallback(e=>tH(e,O,"floating"),n),l=c.useCallback(e=>tH(e,O,"item"),r),c.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])),ed=ef.getReferenceProps,ep=ef.getFloatingProps,eh=ed(tV({ref:et.setReference},Q&&{onClick:function(e){return e.stopPropagation()}})),em=ep({onClick:function(){N&&er.onOpenChange(!1)},ref:et.setFloating});(0,c.useEffect)(function(){es&&er.onOpenChange(U)},[U]),x=(0,c.isValidElement)(_)?(0,c.cloneElement)(_,eh):(0,a.jsx)("div",tK(tV({},eh),{children:_}));var ey=(0,a.jsx)("div",tK(tV({className:(0,v.Ly)(["Floating",!P&&"Floating--animated",L]),"data-position":er.placement,"data-transition":el,style:tV({},en,R)},em),{children:A}));return(0,a.jsxs)(a.Fragment,{children:[x,ei&&!!A&&(q?ey:(0,a.jsx)(tR,{id:"tgui-root",children:ey}))]})}function tq(e){var t=e.content,n=e.children,r=e.position;return(0,a.jsx)(tG,{content:t,contentClasses:"Tooltip",hoverOpen:!0,placement:r,children:n})}function tQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function t1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tQ(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t2(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&void 0!==arguments[2]&&arguments[2];return function(){for(var o=arguments.length,i=Array(o),l=0;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["params","phonehome"]),o=(0,c.useRef)(null),i=(0,c.useRef)(function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=t7.length;t7.push(null);var r=e||"byondui_".concat(n);return{render:function(e){t&&Byond.sendMessage("renderByondUi",{renderByondUi:r}),t7[n]=r,Byond.winset(r,e)},unmount:function(){t&&Byond.sendMessage("unmountByondUi",{renderByondUi:r}),t7[n]=null,Byond.winset(r,{parent:""})}}}(null==t?void 0:t.id,n));function l(){var e=o.current;if(e){var n,r,l,a=(r=null!=(n=window.devicePixelRatio)?n:1,{pos:[(l=e.getBoundingClientRect()).left*r,l.top*r],size:[(l.right-l.left)*r,(l.bottom-l.top)*r]});i.current.render(t9(t5({parent:Byond.windowId},t),{pos:"".concat(a.pos[0],",").concat(a.pos[1]),size:"".concat(a.size[0],"x").concat(a.size[1])}))}}var u=t6(function(){l()},100);return(0,c.useEffect)(function(){return window.addEventListener("resize",u),l(),function(){window.removeEventListener("resize",u),i.current.unmount()}},[]),(0,a.jsx)("div",t9(t5({ref:o},(0,h.Fl)(r)),{children:(0,a.jsx)("div",{style:{minHeight:"22px"}})}))}window.addEventListener("beforeunload",function(){for(var e=0;ee.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),p=(0,c.useRef)(null),h=nr((0,c.useState)([600,200]),2),m=h[0],g=h[1],v=function(e,t,n,r){if(0===e.length)return[];var o,i,l=nt.y.apply(void 0,no(e)),a=l.map(function(e){return(o=Math).min.apply(o,no(e))}),u=l.map(function(e){return(i=Math).max.apply(i,no(e))});return void 0!==n&&(a[0]=n[0],u[0]=n[1]),void 0!==r&&(a[1]=r[0],u[1]=r[1]),e.map(function(e){return(0,nt.y)(e,a,u,t).map(function(e){var t=nr(e,4),n=t[0],r=t[1];return(n-r)/(t[2]-r)*t[3]})})}(void 0===r?[]:r,m,o,i);if(v.length>0){var b=v[0],w=v[v.length-1];v.push([m[0]+f,w[1]]),v.push([m[0]+f,-f]),v.push([-f,-f]),v.push([-f,b[1]])}var S=function(e){for(var t="",n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","child_mt","childStyles","color","title","buttons","icon"]),h=(t=(0,c.useState)(e.open),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nu(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nu(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=h[0],g=h[1];return(0,a.jsxs)(y,{mb:1,children:[(0,a.jsxs)("div",{className:"Table",children:[(0,a.jsx)("div",{className:"Table__cell",children:(0,a.jsx)(t3,(n=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["content","children","className"]);return i.color=r?null:"default",i.backgroundColor=e.color||"default",(0,a.jsx)("div",(t=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nb(e){return(0,v.Ly)(["Flex",e.inlineFlex&&"Flex--inline",(0,h.WP)(e)])}function nw(e){var t=e.direction,n=e.wrap,r=e.align,o=e.justify,i=nv(e,["direction","wrap","align","justify"]);return(0,h.Fl)(ny({style:ng(ny({},i.style),{alignItems:r,flexDirection:t,flexWrap:!0===n?"wrap":n,justifyContent:o})},i))}function nS(e){var t=e.className,n=nv(e,["className"]);return(0,a.jsx)("div",ny({className:(0,v.Ly)([t,nb(n)])},nw(n)))}function nk(e){var t,n=e.style,r=e.grow,o=e.order,i=e.shrink,l=e.basis,a=e.align,u=nv(e,["style","grow","order","shrink","basis","align"]),c=null!=(t=null!=l?l:e.width)?t:void 0!==r?0:void 0;return(0,h.Fl)(ny({style:ng(ny({},n),{alignSelf:a,flexBasis:(0,h.zA)(c),flexGrow:void 0!==r&&Number(r),flexShrink:void 0!==i&&Number(i),order:o})},u))}function nO(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nj(e){var t=e.className,n=e.vertical,r=e.fill,o=e.reverse,i=e.zebra,l=nx(e,["className","vertical","fill","reverse","zebra"]);return(0,a.jsx)("div",nO({className:(0,v.Ly)(["Stack",r&&"Stack--fill",n?"Stack--vertical":"Stack--horizontal",i&&"Stack--zebra",o&&"Stack--reverse".concat(n?"--vertical":""),t,nb(e)])},nw(nO({direction:"".concat(n?"column":"row").concat(o?"-reverse":"")},l))))}function nE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["autoFocus","autoSelect","className","disabled","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","value"]),C=(0,c.useRef)(null),T=null!=O?O:C,_=(t=(0,c.useState)(null!=E?E:""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nE(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nE(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),N=_[0],A=_[1];(0,c.useEffect)(function(){var e;return(o||i)&&(e=setTimeout(function(){var e,t;null==(e=T.current)||e.focus(),i&&(null==(t=T.current)||t.select())},1)),function(){return clearTimeout(e)}},[]),(0,c.useEffect)(function(){T.current&&document.activeElement!==T.current&&E!==N&&A(null!=E?E:"")},[E]);var I=(0,h.Fl)(P),L=(0,v.Ly)(["Input",u&&"Input--disabled",f&&"Input--fluid",p&&"Input--monospace",(0,h.WP)(P),l]);return(0,a.jsx)("input",(n=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unclamped","unit","value","bipolar","popupPosition","className","color","fillValue","ranges","size","style"]);return(0,a.jsx)(nm,{dragMatrix:[0,-1],animated:t,tickWhileDragging:n,format:r,maxValue:o,minValue:i,onChange:l,step:c,stepPixelSize:s,unclamped:f,unit:d,value:p,children:function(e){var t,n,r=e.displayElement,l=e.displayValue,c=e.dragging,s=e.handleDragStart,f=e.inputElement,d=(0,u.hs)(null!=w?w:l,i,o),S=(0,u.hs)(l,i,o),O=b||(0,u.TG)(null!=w?w:p,k)||"default",P=Math.min((S-.5)*270,225);return(0,a.jsx)(tG,{content:r,contentClasses:"Knob__popupValue",handleOpen:c,placement:y||"top",preventPortal:!0,children:(0,a.jsxs)("div",(t=nT({className:(0,v.Ly)(["Knob","Knob--color--".concat(O),m&&"Knob--bipolar",g,(0,h.WP)(E)])},(0,h.Fl)(nT({style:nT({fontSize:"".concat(x,"em")},j)},E))),n=n={onMouseDown:s,children:[(0,a.jsx)("div",{className:"Knob__circle",children:(0,a.jsx)("div",{className:"Knob__cursorBox",style:{transform:"rotate(".concat(P,"deg)")},children:(0,a.jsx)("div",{className:"Knob__cursor"})})}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringTrackPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("circle",{className:"Knob__ringTrack",cx:"50",cy:"50",r:"50"}),(0,a.jsx)("title",{children:"track"})]}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringFillPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("title",{children:"fill"}),(0,a.jsx)("circle",{className:"Knob__ringFill",cx:"50",cy:"50",r:"50",style:{strokeDashoffset:Math.max(((m?2.75:2)-1.5*d)*Math.PI*50,0)}})]}),f]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})}})}n(1874);function nN(e){var t=e.children;return(0,a.jsx)("table",{className:"LabeledList",children:(0,a.jsx)("tbody",{children:t})})}function nA(e){var t,n,r=e.children,o=e.className,i=e.disabled,l=e.display,u=e.onClick,s=e.onMouseOver,f=(e.open,e.openWidth),d=(e.onOutsideClick,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className","disabled","display","onClick","onMouseOver","open","openWidth","onOutsideClick"])),p=(0,c.useRef)(null);return(0,a.jsx)(tG,{allowedOutsideClasses:".Menubar_inner",content:(0,a.jsx)("div",{className:"MenuBar__menu",style:{width:f},children:r}),children:(0,a.jsx)("div",{className:"Menubar_inner",ref:p,children:(0,a.jsx)(y,(t=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","color","info","success","danger"]);return(0,a.jsx)(y,function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["buttons","children","className","container_id","fill","fitted","flexGrow","noTopPadding","onScroll","ref","scrollable","scrollableHorizontal","stretchContents","title"]),k=(0,v.b5)(w)||(0,v.b5)(r),O=(0,c.useRef)(null),x=null!=m?m:O;return(0,c.useEffect)(function(){return x.current&&(y||g)&&(0,nD.tk)(x.current),function(){x.current&&(0,nD.WK)(x.current)}},[]),(0,a.jsxs)("div",(t=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unit","value","className","fillValue","color","ranges","children"]),k=void 0!==w;return(0,a.jsx)(nm,{dragMatrix:[1,0],animated:t,tickWhileDragging:n,format:r,maxValue:o,minValue:i,onChange:l,step:c,stepPixelSize:s,unit:f,value:d,children:function(e){var t,n,r=e.displayElement,l=e.displayValue,c=e.dragging,s=e.editing,f=e.handleDragStart,g=e.inputElement,O=(0,u.J$)((0,u.hs)(null!=m?m:l,i,o)),x=(0,u.J$)((0,u.hs)(l,i,o)),j=y||(0,u.TG)(null!=m?m:d,b)||"default";return(0,a.jsxs)("div",(t=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nF(e){var t,n,r=e.className,o=e.collapsing,i=e.children,l=nB(e,["className","collapsing","children"]);return(0,a.jsx)("table",(t=nz({className:(0,v.Ly)(["Table",o&&"Table--collapsing",r,(0,h.WP)(l)])},(0,h.Fl)(l)),n=n={children:(0,a.jsx)("tbody",{children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}function nU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nU(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nK(e){var t=e.className,n=e.vertical,r=e.scrollable,o=e.fill,i=e.fluid,l=e.children,u=n$(e,["className","vertical","scrollable","fill","fluid","children"]),s=(0,c.useRef)(!0),f=(0,c.useRef)(null),d=(0,c.useRef)(null),p=nV((0,c.useState)(!1),2),m=p[0],y=p[1],g=nV((0,c.useState)(!1),2),b=g[0],w=g[1];function S(e){if(f.current){var t=f.current,n=.5*t.clientWidth;t.scrollBy({left:"left"===e?-n:n,behavior:"smooth"})}}(0,c.useEffect)(function(){var e=function(){y(o.scrollLeft>0),w(o.scrollLeft+o.clientWidthMath.abs(e.deltaX)&&(o.scrollLeft+=e.deltaY)};if(r&&!n&&f.current){var o=f.current;if(!(o.scrollWidthe.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["autoFocus","autoSelect","className","disabled","dontUseTabForIndent","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","userMarkup","value"]),_=(0,c.useRef)(null),N=null!=x?x:_,A=(t=(0,c.useState)(null!=C?C:""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nq(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nq(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),I=A[0],L=A[1];(0,c.useEffect)(function(){(o||i)&&setTimeout(function(){var e,t;null==(e=N.current)||e.focus(),i&&(null==(t=N.current)||t.select())},1)},[]),(0,c.useEffect)(function(){N.current&&document.activeElement!==N.current&&C!==I&&L(null!=C?C:"")},[C]);var D=(0,h.Fl)(T),R=(0,v.Ly)(["Input","TextArea",d&&"Input--fluid",m&&"Input--monospace",u&&"Input--disabled",(0,h.WP)(T),l]);return(0,a.jsx)("textarea",(n=function(e){for(var t=1;t>>1,o=e[r];if(0>>1;rl(u,n))cl(s,u)?(e[r]=s,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else if(cl(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function l(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var a,u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,s=c.now();t.unstable_now=function(){return c.now()-s}}var f=[],d=[],p=1,h=null,m=3,y=!1,g=!1,v=!1,b=!1,w="function"==typeof setTimeout?setTimeout:null,S="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function O(e){for(var t=o(d);null!==t;){if(null===t.callback)i(d);else if(t.startTime<=e)i(d),t.sortIndex=t.expirationTime,r(f,t);else break;t=o(d)}}function x(e){if(v=!1,O(e),!g)if(null!==o(f))g=!0,j||(j=!0,a());else{var t=o(d);null!==t&&I(x,t.startTime-e)}}var j=!1,E=-1,P=5,C=-1;function T(){return!!b||!(t.unstable_now()-Ce&&T());){var l=h.callback;if("function"==typeof l){h.callback=null,m=h.priorityLevel;var u=l(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof u){h.callback=u,O(e),n=!0;break t}h===o(f)&&i(f),O(e)}else i(f);h=o(f)}if(null!==h)n=!0;else{var c=o(d);null!==c&&I(x,c.startTime-e),n=!1}}break e}finally{h=null,m=r,y=!1}}}finally{n?a():j=!1}}}if("function"==typeof k)a=function(){k(_)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,A=N.port2;N.port1.onmessage=_,a=function(){A.postMessage(null)}}else a=function(){w(_,0)};function I(e,n){E=w(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125u?(e.sortIndex=l,r(d,e),null===o(f)&&e===o(d)&&(v?(S(E),E=-1):v=!0,I(x,l-u))):(e.sortIndex=c,r(f,e),g||y||(g=!0,j||(j=!0,a()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},8014:function(e,t,n){"use strict";e.exports=n(2685)},1699:function(e,t,n){"use strict";function r(e,t,n,r,o,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var l=e.apply(t,n);function a(e){r(l,o,i,a,u,"next",e)}function u(e){r(l,o,i,a,u,"throw",e)}a(void 0)})}}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]h});var s,f=(s=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!s()}catch(e){return!1}}),d=function(){function e(){i(this,e),u(this,"store",void 0),u(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return o(function(){return c(this,function(t){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){return this.store[e]=t,[2]})}).call(this)}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return o(function(){return c(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),p=function(){function e(){i(this,e),u(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return o(function(){var t;return c(this,function(n){switch(n.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(t=n.sent()))return[2,JSON.parse(t)];return[2,void 0]}})})()}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(t)),[2]})})()}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return o(function(){return c(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),h=new(function(){function e(){i(this,e),u(this,"backendPromise",void 0),u(this,"impl",0),this.backendPromise=o(function(){return c(this,function(e){return f()?[2,new p]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new d])})})()}return a(e,[{key:"get",value:function(e){return o(function(){return c(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,t){return o(function(){return c(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().set(e,t)]}})}).call(this)}},{key:"remove",value:function(e){return o(function(){return c(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return o(function(){return c(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},7218:function(e,t,n){"use strict";n.d(t,{D:()=>r});var r=(0,n(4530).createContext)(["",function(e){}])},2533:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nl,v:()=>a});var i=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",n=arguments.length,r=Array(n>2?n-2:0),i=2;i=2){var l=[t].concat(o(r)).map(function(e){var t;return"string"==typeof e?e:(null!=(t=Error)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:t,message:l})}},l=function(e){return{debug:function(){for(var t=arguments.length,n=Array(t),r=0;ru});var r=n(8138),o=n(4530),i=n(7790),l=n(2533);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);na});var r=n(8138),o=n(1699),i=n(7790),l=n(9582),a={title:"Storage",render:function(){return(0,r.jsx)(u,{})}},u=function(e){return window.localStorage?(0,r.jsx)(i.wn,{title:"Local Storage",buttons:(0,r.jsx)(i.$n,{icon:"recycle",onClick:function(){localStorage.clear(),o.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(i.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(i.IC,{children:"Local storage is not available."})}},9615:function(e,t,n){"use strict";n.r(t),n.d(t,{meta:()=>u});var r=n(8138),o=n(4530),i=n(7790),l=n(7218);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nl,sendMessage:()=>i,setupHotReloading:()=>a,subscribe:()=>o});let r=[];function o(e){r.push(e)}function i(e){}function l(e,t){}function a(){}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);o.r(i);var l={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>n[e]});return l.default=()=>n,o.d(i,l),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.k=e=>""+e+".css",o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="/",o.rv=()=>"1.5.8",o.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,t,n,r,i,l,a,u,c,s,f,d,p,h,m=o(8138);o(6533),o(8873),o(5223),o(5011),o(8062);null==(t=window.performance)||t.now;var y=function(e,t){};function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?i-1:0),a=1;a1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=v({},n),i=!1,l=!0,a=!1,u=void 0;try{for(var c,s=t[Symbol.iterator]();!(l=(c=s.next()).done);l=!0){var f=c.value,d=e[f],p=n[f],h=d(p,r);p!==h&&(i=!0,o[f]=h)}}catch(e){a=!0,u=e}finally{try{l||null==s.return||s.return()}finally{if(a)throw u}}return i?o:n}},O=function(e,t){var n=function(){for(var n=arguments.length,r=Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]2&&void 0!==arguments[2]?arguments[2]:50,o=[t],i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function eg(e){var t=function(e,t){if("object"!==ev(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ev(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ev(t)?t:String(t)}function ev(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function eb(e,t){if(e){if("string"==typeof e)return es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return es(e,t)}}var ew=(0,z.h)("backend"),eS=function(e){s=e},ek=O("backend/update");O("backend/setSharedState"),O("backend/suspendStart");var eO=O("backend/createPayloadQueue"),ex=O("backend/dequeuePayloadQueue"),ej=O("backend/removePayloadQueue"),eE=O("nextPayloadChunk"),eP={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},eC=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eP,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;if("backend/update"===n){var o=eh({},e.config,r.config),i=eh({},e.data,r.static_data,r.data),l=eh({},e.shared);if(r.shared){var a=!0,u=!1,c=void 0;try{for(var s,f=Object.keys(r.shared)[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value,p=r.shared[d];""===p?l[d]=void 0:l[d]=JSON.parse(p)}}catch(e){u=!0,c=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw c}}}return em(eh({},e),{config:o,data:i,shared:l,suspended:!1})}if("backend/setSharedState"===n){var h=r.key,m=r.nextState;return em(eh({},e),{shared:em(eh({},e.shared),ed({},h,m))})}if("backend/suspendStart"===n)return em(eh({},e),{suspending:!0});if("backend/suspendSuccess"===n){var y=r.timestamp;return em(eh({},e),{data:{},shared:{},config:em(eh({},e.config),{title:"",status:1}),suspending:!1,suspended:y})}if("backend/createPayloadQueue"===n){var g=r.id,v=r.chunks,b=e.outgoingPayloadQueues;return em(eh({},e),{outgoingPayloadQueues:em(eh({},b),ed({},g,v))})}if("backend/dequeuePayloadQueue"===n){var w=r.id,S=e.outgoingPayloadQueues,k=S[w],O=ey(S,[w].map(eg)),x=ef(k)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(k)||eb(k)||ep(),j=(x[0],x.slice(1));return em(eh({},e),{outgoingPayloadQueues:j.length?em(eh({},O),ed({},w,j)):O})}if("backend/removePayloadQueue"===n){var E=r.id,P=e.outgoingPayloadQueues;P[E];var C=ey(P,[E].map(eg));return em(eh({},e),{outgoingPayloadQueues:C})}return e},eT=function(e){var t,n;return function(o){return function(i){var l=eI(e.getState()),a=l.suspended,u=l.outgoingPayloadQueues,c=i.type,s=i.payload;if("update"===c)return void e.dispatch(ek(s));if("suspend"===c)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===c)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===c&&!n){ew.log("suspending (".concat(Byond.windowId,")"));var f=function(){return Byond.sendMessage("suspend")};f(),n=setInterval(f,2e3)}if("backend/suspendSuccess"===c&&(ec=!0,clearInterval(n),n=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,x.sc)(),(0,x.zr)(),setTimeout(function(){return el()})),"backend/update"===c){var d,p,h=null==(p=s.config)||null==(d=p.window)?void 0:d.fancy;void 0===t?t=h:t!==h&&(ew.log("changing fancy mode to",h),t=h,Byond.winset(Byond.windowId,{titlebar:!h,"can-resize":!h}))}if("backend/update"===c&&a&&(ew.log("backend/update",s),eu=eu||"resumed",ec=!1,(0,x.ao)(),U(function(){var e;return H(this,function(t){switch(t.label){case 0:return e=Y(),[4,r=Byond.winget(Byond.windowId,"pos").then(function(t){return[t.x-e[0],t.y-e[1]]})];case 1:return Q=t.sent(),$.debug("screen offset",Q),[2]}})})(),setTimeout(function(){y("resume/start"),eI(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),y("resume/finish"))})),"oversizePayloadResponse"===c&&(s.allow?e.dispatch(eE(s)):e.dispatch(ej(s))),"acknowlegePayloadChunk"===c&&(e.dispatch(ex(s)),e.dispatch(eE(s))),"nextPayloadChunk"===c){var m=s.id,g=u[m][0];Byond.sendMessage("payloadChunk",{id:m,chunk:g})}return o(i)}}},e_=function(e,t){for(var n=e.length-1,r=0,o=0;r1024){var u=o+e_(l,1024);r.push(t.slice(o,u1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===t?"undefined":ev(t))==="object"&&null!==t&&!Array.isArray(t)))return void ew.error("Payload for act() must be an object, got this:",t);var n=JSON.stringify(t);if(Object.entries({type:"act/"+e,payload:n,tgui:1,windowId:Byond.windowId}).reduce(function(e,t,n){var r=ef(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||eb(t,2)||ep(),o=r[0],i=r[1];return e+"".concat(n>0?"&":"?").concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i))},"").length>2048){var r=n.split(eN),o="".concat(Date.now());null==s||s.dispatch(eO({id:o,chunks:r})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:r.length});return}Byond.sendMessage("act/"+e,t)},eI=function(e){return e.backend||{}},eL=function(){var e;return em(eh({},null==s||null==(e=s.getState())?void 0:e.backend),{act:eA})},eD=function(){return s.dispatch},eR=function(e){return e(null==s?void 0:s.getState())},eM=function(){document.addEventListener("click",function(e){for(var t=e.target;;){if(!t||t===document.body)return;if("a"===String(t.tagName).toLowerCase())break;t=t.parentElement}var n=t.getAttribute("href")||"";if(!("?"===n.charAt(0)||n.startsWith("byond://"))){e.preventDefault();var r=n;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})};function ez(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e0(e){var t=e.className,n=e.theme,r=void 0===n?"nanotrasen":n,o=e.children,i=eZ(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(r),(0,m.jsx)("div",{className:"theme-"+r,children:(0,m.jsx)("div",eJ(eX({className:(0,eQ.Ly)(["Layout",t,(0,eY.WP)(i)])},(0,eY.Fl)(i)),{children:o}))})}function e1(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e4(e){var t=e.theme,n=e.children,r=e.className,o=e3(e,["theme","children","className"]),i=eL().suspended,l=eR(eV).debugLayout;return(0,m.jsx)(e0,e2(e1({className:(0,eQ.Ly)(["Window",r]),theme:t},o),{children:(0,m.jsx)(eG.az,{fillPositionedParent:!0,className:void 0!==l&&l&&"debug-layout",children:!i&&n})}))}e0.Content=function(e){var t=e.className,n=e.scrollable,r=e.children,o=eZ(e,["className","scrollable","children"]),i=(0,eK.useRef)(null);return(0,eK.useEffect)(function(){var e=i.current;return e&&n&&(0,eq.tk)(e),function(){e&&n&&(0,eq.WK)(e)}},[]),(0,m.jsx)("div",eJ(eX({className:(0,eQ.Ly)(["Layout__content",n&&"Layout__content--scrollable",t,(0,eY.WP)(o)]),ref:i},(0,eY.Fl)(o)),{children:r}))},e4.Content=function(e){var t=e.className,n=e.fitted,r=e.children,o=e3(e,["className","fitted","children"]);return(0,m.jsx)(e0.Content,e2(e1({className:(0,eQ.Ly)(["Window__content",t])},o),{children:n?r:(0,m.jsx)("div",{className:"Window__contentPadding",children:r})}))};o(2316);function e8(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}O("debug/toggleKitchenSink"),O("debug/toggleDebugLayout"),O("debug/openExternalBrowser");function e6(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type;return"debug/toggleKitchenSink"===n?e5(e6({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===n?e5(e6({},e),{debugLayout:!e.debugLayout}):e}function e7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};this.element&&this.stop(),this.options=n;var r=this.element=new Audio(e);r.volume=this.volume,r.playbackRate=this.options.pitch||1,ti.log("playing",e,n),r.addEventListener("ended",function(){ti.log("ended"),t.stop()}),r.addEventListener("error",function(e){ti.log("playback error",e)}),this.options.end&&r.addEventListener("timeupdate",function(){t.options.end&&t.options.end>0&&r.currentTime>=t.options.end&&t.stop()}),r.play(),this.onPlaySubscribers.forEach(function(e){return e()})}},{key:"stop",value:function(){this.element&&(ti.log("stopping"),this.element.pause(),this.element=null,this.onStopSubscribers.forEach(function(e){return e()}))}},{key:"setVolume",value:function(e){this.volume=e,this.element&&(this.element.volume=e)}},{key:"onPlay",value:function(e){this.onPlaySubscribers.push(e)}},{key:"onStop",value:function(e){this.onStopSubscribers.push(e)}}],function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tV(e){return function(e){if(Array.isArray(e))return tF(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return tF(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tF(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tK=ts(tc({id:"default"},void 0)),tG=tf(tc({id:"default"},void 0)),tq={version:1,fontSize:13,fontFamily:tR["0"],lineHeight:1.2,theme:"light",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",highlightSettings:[tK.id],highlightSettingById:tU({},tK.id,tK),blacklistSettings:[tG.id],blacklistSettingById:tU({},tG.id,tG),view:{visible:!1,activeTab:tL["0"].id},statLinked:!0,statFontSize:12,statFontFamily:tR["0"],statTabsStyle:"default",chatSaving:!0===j.IG.get("chat-saving-enabled")},tQ="unknown",tY="internal",tX="adminpm",tJ="mentorpm",tZ=[{type:"system",name:"System Messages",description:"Messages from your client, always enabled",selector:".boldannounceooc",important:!0},{type:"localchat",name:"Local",description:"In-character local messages (say, emote, etc)",selector:".say, .emote"},{type:"radio",name:"Radio",description:"All departments of radio messages",selector:".alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster, .proradio"},{type:"info",name:"Info",description:"Non-urgent messages from the game and items",selector:".notice:not(.pm), .adminnotice, .info, .sinister, .cult"},{type:"warning",name:"Warnings",description:"Urgent messages from the game and items",selector:".warning:not(.pm), .critical, .userdanger, .italics, .boldannounceic, .boldwarning"},{type:"deadchat",name:"Deadchat",description:"All of deadchat",selector:".deadsay"},{type:"ooc",name:"OOC",description:"The bluewall of global OOC messages",selector:".ooc, .adminooc, .interface"},{type:tX,name:"Admin PMs",description:"Messages to/from admins (adminhelp)",selector:".adminpm, .adminhelp, .adminticket, .adminticketalt"},{type:tJ,name:"Mentor PMs",description:"Messages to/from mentors (mentorhelp)",selector:".mentorpm, .mentorhelp"},{type:"combat",name:"Combat Log",description:"Urist McTraitor has stabbed you with a knife!",selector:".danger"},{type:tQ,name:"Unsorted",description:"Everything we could not sort, always enabled"},{type:"adminchat",name:"Admin Chat",description:"ASAY messages",selector:".admin_channel, .adminsay",admin:!0},{type:"mentorchat",name:"Mentor Chat",description:"MSAY messages",selector:".mentor_channel",admin:!0},{type:"devchat",name:"Developer Chat",description:"DEVSAY messages",selector:".dev_channel",admin:!0},{type:"staffchat",name:"Staff Chat",description:"STAFFSAY messages",selector:".staff_channel",admin:!0},{type:"adminlog",name:"Admin Log",description:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",selector:".log_message",admin:!0},{type:"attacklog",name:"Attack Log",description:"Urist McTraitor has shot John Doe",admin:!0},{type:"debug",name:"Debug Log",description:"DEBUG: SSPlanets subsystem Recover().",selector:".pr_announce, .debug",admin:!0}];function t0(e){for(var t=1;t