From 583be043c8f660865d89ab240bfe8f0684eb0654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Th=C3=BCning?= Date: Sun, 3 Sep 2023 03:34:51 +0200 Subject: [PATCH] Add connecting spinner --- frontend/dist/assets/index-cc81cb0c.js | 44 ++++++++++++++++++++++++++ frontend/dist/assets/index-eb15805d.js | 44 -------------------------- frontend/dist/index.html | 2 +- frontend/src/App.tsx | 29 +++++++++++++---- 4 files changed, 67 insertions(+), 52 deletions(-) create mode 100644 frontend/dist/assets/index-cc81cb0c.js delete mode 100644 frontend/dist/assets/index-eb15805d.js diff --git a/frontend/dist/assets/index-cc81cb0c.js b/frontend/dist/assets/index-cc81cb0c.js new file mode 100644 index 0000000..3d6a7c9 --- /dev/null +++ b/frontend/dist/assets/index-cc81cb0c.js @@ -0,0 +1,44 @@ +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=t(l);fetch(l.href,o)}})();function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rs={exports:{}},fl={},ls={exports:{}},j={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rr=Symbol.for("react.element"),Vc=Symbol.for("react.portal"),Ac=Symbol.for("react.fragment"),Bc=Symbol.for("react.strict_mode"),Hc=Symbol.for("react.profiler"),Wc=Symbol.for("react.provider"),Qc=Symbol.for("react.context"),Kc=Symbol.for("react.forward_ref"),Yc=Symbol.for("react.suspense"),Gc=Symbol.for("react.memo"),Xc=Symbol.for("react.lazy"),Gi=Symbol.iterator;function Zc(e){return e===null||typeof e!="object"?null:(e=Gi&&e[Gi]||e["@@iterator"],typeof e=="function"?e:null)}var os={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},is=Object.assign,us={};function ht(e,n,t){this.props=e,this.context=n,this.refs=us,this.updater=t||os}ht.prototype.isReactComponent={};ht.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};ht.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ss(){}ss.prototype=ht.prototype;function Jo(e,n,t){this.props=e,this.context=n,this.refs=us,this.updater=t||os}var qo=Jo.prototype=new ss;qo.constructor=Jo;is(qo,ht.prototype);qo.isPureReactComponent=!0;var Xi=Array.isArray,as=Object.prototype.hasOwnProperty,bo={current:null},cs={key:!0,ref:!0,__self:!0,__source:!0};function fs(e,n,t){var r,l={},o=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(o=""+n.key),n)as.call(n,r)&&!cs.hasOwnProperty(r)&&(l[r]=n[r]);var u=arguments.length-2;if(u===1)l.children=t;else if(1>>1,q=k[Y];if(0>>1;Yl(zl,R))Nnl(cr,zl)?(k[Y]=cr,k[Nn]=R,Y=Nn):(k[Y]=zl,k[_n]=R,Y=_n);else if(Nnl(cr,R))k[Y]=cr,k[Nn]=R,Y=Nn;else break e}}return T}function l(k,T){var R=k.sortIndex-T.sortIndex;return R!==0?R:k.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],h=1,m=null,p=3,g=!1,w=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(k){for(var T=t(c);T!==null;){if(T.callback===null)r(c);else if(T.startTime<=k)r(c),T.sortIndex=T.expirationTime,n(s,T);else break;T=t(c)}}function v(k){if(S=!1,d(k),!w)if(t(s)!==null)w=!0,Se(x);else{var T=t(c);T!==null&&M(v,T.startTime-k)}}function x(k,T){w=!1,S&&(S=!1,f(z),z=-1),g=!0;var R=p;try{for(d(T),m=t(s);m!==null&&(!(m.expirationTime>T)||k&&!oe());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,p=m.priorityLevel;var q=Y(m.expirationTime<=T);T=e.unstable_now(),typeof q=="function"?m.callback=q:m===t(s)&&r(s),d(T)}else r(s);m=t(s)}if(m!==null)var ar=!0;else{var _n=t(c);_n!==null&&M(v,_n.startTime-T),ar=!1}return ar}finally{m=null,p=R,g=!1}}var _=!1,N=null,z=-1,U=5,L=-1;function oe(){return!(e.unstable_now()-Lk||125Y?(k.sortIndex=R,n(c,k),t(s)===null&&k===t(c)&&(S?(f(z),z=-1):S=!0,M(v,R-Y))):(k.sortIndex=q,n(s,k),w||g||(w=!0,Se(x))),k},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(k){var T=p;return function(){var R=p;p=T;try{return k.apply(this,arguments)}finally{p=R}}}})(hs);ms.exports=hs;var af=ms.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vs=P,Ce=af;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),to=Object.prototype.hasOwnProperty,cf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ji={},qi={};function ff(e){return to.call(qi,e)?!0:to.call(Ji,e)?!1:cf.test(e)?qi[e]=!0:(Ji[e]=!0,!1)}function df(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pf(e,n,t,r){if(n===null||typeof n>"u"||df(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function me(e,n,t,r,l,o,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=i}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){re[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];re[n]=new me(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){re[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){re[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){re[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){re[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){re[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){re[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){re[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var ni=/[\-:]([a-z])/g;function ti(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(ni,ti);re[n]=new me(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(ni,ti);re[n]=new me(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(ni,ti);re[n]=new me(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){re[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});re.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){re[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function ri(e,n,t,r){var l=re.hasOwnProperty(n)?re[n]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` +`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Ll=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?zt(e):""}function mf(e){switch(e.tag){case 5:return zt(e.type);case 16:return zt("Lazy");case 13:return zt("Suspense");case 19:return zt("SuspenseList");case 0:case 2:case 15:return e=Rl(e.type,!1),e;case 11:return e=Rl(e.type.render,!1),e;case 1:return e=Rl(e.type,!0),e;default:return""}}function io(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Hn:return"Portal";case ro:return"Profiler";case li:return"StrictMode";case lo:return"Suspense";case oo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ws:return(e.displayName||"Context")+".Consumer";case gs:return(e._context.displayName||"Context")+".Provider";case oi:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ii:return n=e.displayName||null,n!==null?n:io(e.type)||"Memo";case rn:n=e._payload,e=e._init;try{return io(e(n))}catch{}}return null}function hf(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return io(n);case 8:return n===li?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ks(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function vf(e){var n=ks(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function pr(e){e._valueTracker||(e._valueTracker=vf(e))}function xs(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ks(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Vr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function uo(e,n){var t=n.checked;return Q({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function eu(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=gn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Es(e,n){n=n.checked,n!=null&&ri(e,"checked",n,!1)}function so(e,n){Es(e,n);var t=gn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ao(e,n.type,t):n.hasOwnProperty("defaultValue")&&ao(e,n.type,gn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function nu(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function ao(e,n,t){(n!=="number"||Vr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Pt=Array.isArray;function nt(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=mr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function At(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Rt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yf=["Webkit","ms","Moz","O"];Object.keys(Rt).forEach(function(e){yf.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Rt[n]=Rt[e]})});function zs(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Rt.hasOwnProperty(e)&&Rt[e]?(""+n).trim():n+"px"}function Ps(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=zs(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var gf=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function po(e,n){if(n){if(gf[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function mo(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ho=null;function ui(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vo=null,tt=null,rt=null;function lu(e){if(e=ir(e)){if(typeof vo!="function")throw Error(y(280));var n=e.stateNode;n&&(n=vl(n),vo(e.stateNode,e.type,n))}}function Ts(e){tt?rt?rt.push(e):rt=[e]:tt=e}function Ls(){if(tt){var e=tt,n=rt;if(rt=tt=null,lu(e),n)for(e=0;e>>=0,e===0?32:31-(Tf(e)/Lf|0)|0}var hr=64,vr=4194304;function Tt(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=t&268435455;if(i!==0){var u=i&~l;u!==0?r=Tt(u):(o&=i,o!==0&&(r=Tt(o)))}else i=t&~l,i!==0?r=Tt(i):o!==0&&(r=Tt(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function lr(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-De(n),e[n]=t}function Of(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ft),pu=String.fromCharCode(32),mu=!1;function Zs(e,n){switch(e){case"keyup":return sd.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qn=!1;function cd(e,n){switch(e){case"compositionend":return Js(n);case"keypress":return n.which!==32?null:(mu=!0,pu);case"textInput":return e=n.data,e===pu&&mu?null:e;default:return null}}function fd(e,n){if(Qn)return e==="compositionend"||!hi&&Zs(e,n)?(e=Gs(),Rr=di=sn=null,Qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=gu(t)}}function na(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?na(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function ta(){for(var e=window,n=Vr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Vr(e.document)}return n}function vi(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Sd(e){var n=ta(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&na(t.ownerDocument.documentElement,t)){if(r!==null&&vi(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=wu(t,o);var i=wu(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Kn=null,xo=null,Mt=null,Eo=!1;function Su(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Eo||Kn==null||Kn!==Vr(r)||(r=Kn,"selectionStart"in r&&vi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mt&&Yt(Mt,r)||(Mt=r,r=Yr(xo,"onSelect"),0Xn||(e.current=To[Xn],To[Xn]=null,Xn--)}function $(e,n){Xn++,To[Xn]=e.current,e.current=n}var wn={},ae=kn(wn),ye=kn(!1),On=wn;function at(e,n){var t=e.type.contextTypes;if(!t)return wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function ge(e){return e=e.childContextTypes,e!=null}function Xr(){A(ye),A(ae)}function zu(e,n,t){if(ae.current!==wn)throw Error(y(168));$(ae,n),$(ye,t)}function fa(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,hf(e)||"Unknown",l));return Q({},t,r)}function Zr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wn,On=ae.current,$(ae,e),$(ye,ye.current),!0}function Pu(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=fa(e,n,On),r.__reactInternalMemoizedMergedChildContext=e,A(ye),A(ae),$(ae,e)):A(ye),$(ye,t)}var Ke=null,yl=!1,Ql=!1;function da(e){Ke===null?Ke=[e]:Ke.push(e)}function jd(e){yl=!0,da(e)}function xn(){if(!Ql&&Ke!==null){Ql=!0;var e=0,n=I;try{var t=Ke;for(I=1;e>=i,l-=i,Ye=1<<32-De(n)+l|t<z?(U=N,N=null):U=N.sibling;var L=p(f,N,d[z],v);if(L===null){N===null&&(N=U);break}e&&N&&L.alternate===null&&n(f,N),a=o(L,a,z),_===null?x=L:_.sibling=L,_=L,N=U}if(z===d.length)return t(f,N),B&&zn(f,z),x;if(N===null){for(;zz?(U=N,N=null):U=N.sibling;var oe=p(f,N,L.value,v);if(oe===null){N===null&&(N=U);break}e&&N&&oe.alternate===null&&n(f,N),a=o(oe,a,z),_===null?x=oe:_.sibling=oe,_=oe,N=U}if(L.done)return t(f,N),B&&zn(f,z),x;if(N===null){for(;!L.done;z++,L=d.next())L=m(f,L.value,v),L!==null&&(a=o(L,a,z),_===null?x=L:_.sibling=L,_=L);return B&&zn(f,z),x}for(N=r(f,N);!L.done;z++,L=d.next())L=g(N,f,z,L.value,v),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?z:L.key),a=o(L,a,z),_===null?x=L:_.sibling=L,_=L);return e&&N.forEach(function(En){return n(f,En)}),B&&zn(f,z),x}function O(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Wn&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case dr:e:{for(var x=d.key,_=a;_!==null;){if(_.key===x){if(x=d.type,x===Wn){if(_.tag===7){t(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===rn&&Mu(x)===_.type){t(f,_.sibling),a=l(_,d.props),a.ref=Et(f,_,d),a.return=f,f=a;break e}t(f,_);break}else n(f,_);_=_.sibling}d.type===Wn?(a=Fn(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Ur(d.type,d.key,d.props,null,f.mode,v),v.ref=Et(f,a,d),v.return=f,f=v)}return i(f);case Hn:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=bl(d,f.mode,v),a.return=f,f=a}return i(f);case rn:return _=d._init,O(f,a,_(d._payload),v)}if(Pt(d))return w(f,a,d,v);if(gt(d))return S(f,a,d,v);Er(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=ql(d,f.mode,v),a.return=f,f=a),i(f)):t(f,a)}return O}var ft=Sa(!0),ka=Sa(!1),ur={},We=kn(ur),Jt=kn(ur),qt=kn(ur);function Rn(e){if(e===ur)throw Error(y(174));return e}function _i(e,n){switch($(qt,n),$(Jt,e),$(We,ur),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:fo(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=fo(n,e)}A(We),$(We,n)}function dt(){A(We),A(Jt),A(qt)}function xa(e){Rn(qt.current);var n=Rn(We.current),t=fo(n,e.type);n!==t&&($(Jt,e),$(We,t))}function Ni(e){Jt.current===e&&(A(We),A(Jt))}var H=kn(0);function tl(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Kl=[];function zi(){for(var e=0;et?t:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),n()}finally{I=t,Yl.transition=r}}function $a(){return je().memoizedState}function Id(e,n,t){var r=vn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Ua(e))Va(n,t);else if(t=va(e,n,t,r),t!==null){var l=fe();$e(t,e,r,l),Aa(t,n,r)}}function Dd(e,n,t){var r=vn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Ua(e))Va(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var i=n.lastRenderedState,u=o(i,t);if(l.hasEagerState=!0,l.eagerState=u,Ue(u,i)){var s=n.interleaved;s===null?(l.next=l,Ei(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=va(e,n,l,r),t!==null&&(l=fe(),$e(t,e,r,l),Aa(t,n,r))}}function Ua(e){var n=e.alternate;return e===W||n!==null&&n===W}function Va(e,n){It=rl=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Aa(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,ai(e,t)}}var ll={readContext:Re,useCallback:ie,useContext:ie,useEffect:ie,useImperativeHandle:ie,useInsertionEffect:ie,useLayoutEffect:ie,useMemo:ie,useReducer:ie,useRef:ie,useState:ie,useDebugValue:ie,useDeferredValue:ie,useTransition:ie,useMutableSource:ie,useSyncExternalStore:ie,useId:ie,unstable_isNewReconciler:!1},$d={readContext:Re,useCallback:function(e,n){return Ae().memoizedState=[e,n===void 0?null:n],e},useContext:Re,useEffect:Du,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Mr(4194308,4,Fa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Mr(4194308,4,e,n)},useInsertionEffect:function(e,n){return Mr(4,2,e,n)},useMemo:function(e,n){var t=Ae();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Ae();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Id.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var n=Ae();return e={current:e},n.memoizedState=e},useState:Iu,useDebugValue:ji,useDeferredValue:function(e){return Ae().memoizedState=e},useTransition:function(){var e=Iu(!1),n=e[0];return e=Md.bind(null,e[1]),Ae().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=W,l=Ae();if(B){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),ee===null)throw Error(y(349));In&30||_a(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,Du(za.bind(null,r,o,e),[e]),r.flags|=2048,nr(9,Na.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Ae(),n=ee.identifierPrefix;if(B){var t=Ge,r=Ye;t=(r&~(1<<32-De(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=bt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Be]=n,e[Zt]=r,Za(e,n,!1,!1),n.stateNode=e;e:{switch(i=mo(t,r),t){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;lmt&&(n.flags|=128,r=!0,Ct(o,!1),n.lanes=4194304)}else{if(!r)if(e=tl(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),Ct(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!B)return ue(n),null}else 2*G()-o.renderingStartTime>mt&&t!==1073741824&&(n.flags|=128,r=!0,Ct(o,!1),n.lanes=4194304);o.isBackwards?(i.sibling=n.child,n.child=i):(t=o.last,t!==null?t.sibling=i:n.child=i,o.last=i)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=G(),n.sibling=null,t=H.current,$(H,r?t&1|2:t&1),n):(ue(n),null);case 22:case 23:return $i(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?ke&1073741824&&(ue(n),n.subtreeFlags&6&&(n.flags|=8192)):ue(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function Kd(e,n){switch(gi(n),n.tag){case 1:return ge(n.type)&&Xr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return dt(),A(ye),A(ae),zi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Ni(n),null;case 13:if(A(H),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));ct()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return A(H),null;case 4:return dt(),null;case 10:return xi(n.type._context),null;case 22:case 23:return $i(),null;case 24:return null;default:return null}}var _r=!1,se=!1,Yd=typeof WeakSet=="function"?WeakSet:Set,E=null;function bn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){K(e,n,r)}else t.current=null}function Ao(e,n,t){try{t()}catch(r){K(e,n,r)}}var Ku=!1;function Gd(e,n){if(Co=Qr,e=ta(),vi(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var i=0,u=-1,s=-1,c=0,h=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(u=i+l),m!==o||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++c===l&&(u=i),p===o&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(_o={focusedElem:e,selectionRange:t},Qr=!1,E=n;E!==null;)if(n=E,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,E=e;else for(;E!==null;){n=E;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,O=w.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?S:Oe(n.type,S),O);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){K(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,E=e;break}E=n.return}return w=Ku,Ku=!1,w}function Dt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Ao(n,t,o)}l=l.next}while(l!==r)}}function Sl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Bo(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function ba(e){var n=e.alternate;n!==null&&(e.alternate=null,ba(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Be],delete n[Zt],delete n[Po],delete n[Ld],delete n[Rd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ec(e){return e.tag===5||e.tag===3||e.tag===4}function Yu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ho(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Gr));else if(r!==4&&(e=e.child,e!==null))for(Ho(e,n,t),e=e.sibling;e!==null;)Ho(e,n,t),e=e.sibling}function Wo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wo(e,n,t),e=e.sibling;e!==null;)Wo(e,n,t),e=e.sibling}var ne=null,Me=!1;function tn(e,n,t){for(t=t.child;t!==null;)nc(e,n,t),t=t.sibling}function nc(e,n,t){if(He&&typeof He.onCommitFiberUnmount=="function")try{He.onCommitFiberUnmount(dl,t)}catch{}switch(t.tag){case 5:se||bn(t,n);case 6:var r=ne,l=Me;ne=null,tn(e,n,t),ne=r,Me=l,ne!==null&&(Me?(e=ne,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):ne.removeChild(t.stateNode));break;case 18:ne!==null&&(Me?(e=ne,t=t.stateNode,e.nodeType===8?Wl(e.parentNode,t):e.nodeType===1&&Wl(e,t),Qt(e)):Wl(ne,t.stateNode));break;case 4:r=ne,l=Me,ne=t.stateNode.containerInfo,Me=!0,tn(e,n,t),ne=r,Me=l;break;case 0:case 11:case 14:case 15:if(!se&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ao(t,n,i),l=l.next}while(l!==r)}tn(e,n,t);break;case 1:if(!se&&(bn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){K(t,n,u)}tn(e,n,t);break;case 21:tn(e,n,t);break;case 22:t.mode&1?(se=(r=se)||t.memoizedState!==null,tn(e,n,t),se=r):tn(e,n,t);break;default:tn(e,n,t)}}function Gu(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new Yd),n.forEach(function(r){var l=rp.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Fe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=G()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zd(r/1960))-r,10e?16:e,an===null)var r=!1;else{if(e=an,an=null,ul=0,F&6)throw Error(y(331));var l=F;for(F|=4,E=e.current;E!==null;){var o=E,i=o.child;if(E.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sG()-Ii?jn(e,0):Mi|=t),we(e,n)}function ac(e,n){n===0&&(e.mode&1?(n=vr,vr<<=1,!(vr&130023424)&&(vr=4194304)):n=1);var t=fe();e=qe(e,n),e!==null&&(lr(e,n,t),we(e,t))}function tp(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),ac(e,t)}function rp(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),ac(e,t)}var cc;cc=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||ye.current)ve=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ve=!1,Wd(e,n,t);ve=!!(e.flags&131072)}else ve=!1,B&&n.flags&1048576&&pa(n,qr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Ir(e,n),e=n.pendingProps;var l=at(n,ae.current);ot(n,t),l=Ti(null,n,r,e,l,t);var o=Li();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ge(r)?(o=!0,Zr(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ci(n),l.updater=gl,n.stateNode=l,l._reactInternals=n,Oo(n,r,e,t),n=Do(null,n,r,!0,o,t)):(n.tag=0,B&&o&&yi(n),ce(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Ir(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=op(r),e=Oe(r,e),l){case 0:n=Io(null,n,r,e,t);break e;case 1:n=Hu(null,n,r,e,t);break e;case 11:n=Au(null,n,r,e,t);break e;case 14:n=Bu(null,n,r,Oe(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Oe(r,l),Io(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Oe(r,l),Hu(e,n,r,l,t);case 3:e:{if(Ya(n),e===null)throw Error(y(387));r=n.pendingProps,o=n.memoizedState,l=o.element,ya(e,n),nl(n,r,null,t);var i=n.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=pt(Error(y(423)),n),n=Wu(e,n,r,t,l);break e}else if(r!==l){l=pt(Error(y(424)),n),n=Wu(e,n,r,t,l);break e}else for(xe=pn(n.stateNode.containerInfo.firstChild),Ee=n,B=!0,Ie=null,t=ka(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(ct(),r===l){n=be(e,n,t);break e}ce(e,n,r,t)}n=n.child}return n;case 5:return xa(n),e===null&&Ro(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,No(r,l)?i=null:o!==null&&No(r,o)&&(n.flags|=32),Ka(e,n),ce(e,n,i,t),n.child;case 6:return e===null&&Ro(n),null;case 13:return Ga(e,n,t);case 4:return _i(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=ft(n,null,r,t):ce(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Oe(r,l),Au(e,n,r,l,t);case 7:return ce(e,n,n.pendingProps,t),n.child;case 8:return ce(e,n,n.pendingProps.children,t),n.child;case 12:return ce(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,i=l.value,$(br,r._currentValue),r._currentValue=i,o!==null)if(Ue(o.value,i)){if(o.children===l.children&&!ye.current){n=be(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Xe(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),jo(o.return,t,n),u.lanes|=t;break}s=s.next}}else if(o.tag===10)i=o.type===n.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(y(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),jo(i,t,n),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===n){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ce(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,ot(n,t),l=Re(l),r=r(l),n.flags|=1,ce(e,n,r,t),n.child;case 14:return r=n.type,l=Oe(r,n.pendingProps),l=Oe(r.type,l),Bu(e,n,r,l,t);case 15:return Wa(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Oe(r,l),Ir(e,n),n.tag=1,ge(r)?(e=!0,Zr(n)):e=!1,ot(n,t),wa(n,r,l),Oo(n,r,l,t),Do(null,n,r,!0,e,t);case 19:return Xa(e,n,t);case 22:return Qa(e,n,t)}throw Error(y(156,n.tag))};function fc(e,n){return Ds(e,n)}function lp(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Te(e,n,t,r){return new lp(e,n,t,r)}function Vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function op(e){if(typeof e=="function")return Vi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oi)return 11;if(e===ii)return 14}return 2}function yn(e,n){var t=e.alternate;return t===null?(t=Te(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Ur(e,n,t,r,l,o){var i=2;if(r=e,typeof e=="function")Vi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Wn:return Fn(t.children,l,o,n);case li:i=8,l|=8;break;case ro:return e=Te(12,t,n,l|2),e.elementType=ro,e.lanes=o,e;case lo:return e=Te(13,t,n,l),e.elementType=lo,e.lanes=o,e;case oo:return e=Te(19,t,n,l),e.elementType=oo,e.lanes=o,e;case Ss:return xl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gs:i=10;break e;case ws:i=9;break e;case oi:i=11;break e;case ii:i=14;break e;case rn:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=Te(i,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function Fn(e,n,t,r){return e=Te(7,e,r,n),e.lanes=t,e}function xl(e,n,t,r){return e=Te(22,e,r,n),e.elementType=Ss,e.lanes=t,e.stateNode={isHidden:!1},e}function ql(e,n,t){return e=Te(6,e,null,n),e.lanes=t,e}function bl(e,n,t){return n=Te(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ip(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ai(e,n,t,r,l,o,i,u,s){return e=new ip(e,n,t,u,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=Te(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ci(o),e}function up(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hc)}catch(e){console.error(e)}}hc(),ps.exports=_e;var dp=ps.exports,ts=dp;no.createRoot=ts.createRoot,no.hydrateRoot=ts.hydrateRoot;var vc={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r=[],l=0;l{const i=de(e,"container"),u=typeof n=="string"?`-${n}`:"-fluid";return C.jsx(t,{ref:o,...l,className:le(r,n?`${i}${u}`:i)})});wc.displayName="Container";const vp=wc,Sc=P.forwardRef(({bsPrefix:e,className:n,as:t="div",...r},l)=>{const o=de(e,"row"),i=yc(),u=gc(),s=`${o}-cols`,c=[];return i.forEach(h=>{const m=r[h];delete r[h];let p;m!=null&&typeof m=="object"?{cols:p}=m:p=m;const g=h!==u?`-${h}`:"";p!=null&&c.push(`${s}${g}-${p}`)}),C.jsx(t,{ref:l,...r,className:le(n,o,...c)})});Sc.displayName="Row";const Nt=Sc;function yp({as:e,bsPrefix:n,className:t,...r}){n=de(n,"col");const l=yc(),o=gc(),i=[],u=[];return l.forEach(s=>{const c=r[s];delete r[s];let h,m,p;typeof c=="object"&&c!=null?{span:h,offset:m,order:p}=c:h=c;const g=s!==o?`-${s}`:"";h&&i.push(h===!0?`${n}${g}`:`${n}${g}-${h}`),p!=null&&u.push(`order${g}-${p}`),m!=null&&u.push(`offset${g}-${m}`)}),[{...r,className:le(t,...i,...u)},{as:e,bsPrefix:n,spans:i}]}const kc=P.forwardRef((e,n)=>{const[{className:t,...r},{as:l="div",bsPrefix:o,spans:i}]=yp(e);return C.jsx(l,{...r,ref:n,className:le(t,!i.length&&o)})});kc.displayName="Col";const Bn=kc;var xc={exports:{}},gp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wp=gp,Sp=wp;function Ec(){}function Cc(){}Cc.resetWarningCache=Ec;var kp=function(){function e(r,l,o,i,u,s){if(s!==Sp){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Cc,resetWarningCache:Ec};return t.PropTypes=t,t};xc.exports=kp();var xp=xc.exports;const ut=Zo(xp),Ep={type:ut.string,tooltip:ut.bool,as:ut.elementType},Ki=P.forwardRef(({as:e="div",className:n,type:t="valid",tooltip:r=!1,...l},o)=>C.jsx(e,{...l,ref:o,className:le(n,`${t}-${r?"tooltip":"feedback"}`)}));Ki.displayName="Feedback";Ki.propTypes=Ep;const _c=Ki,Cp=P.createContext({}),en=Cp,Nc=P.forwardRef(({id:e,bsPrefix:n,className:t,type:r="checkbox",isValid:l=!1,isInvalid:o=!1,as:i="input",...u},s)=>{const{controlId:c}=P.useContext(en);return n=de(n,"form-check-input"),C.jsx(i,{...u,ref:s,type:r,id:e||c,className:le(t,n,l&&"is-valid",o&&"is-invalid")})});Nc.displayName="FormCheckInput";const zc=Nc,Pc=P.forwardRef(({bsPrefix:e,className:n,htmlFor:t,...r},l)=>{const{controlId:o}=P.useContext(en);return e=de(e,"form-check-label"),C.jsx("label",{...r,ref:l,htmlFor:t||o,className:le(n,e)})});Pc.displayName="FormCheckLabel";const Xo=Pc;function _p(e,n){return P.Children.toArray(e).some(t=>P.isValidElement(t)&&t.type===n)}const Tc=P.forwardRef(({id:e,bsPrefix:n,bsSwitchPrefix:t,inline:r=!1,reverse:l=!1,disabled:o=!1,isValid:i=!1,isInvalid:u=!1,feedbackTooltip:s=!1,feedback:c,feedbackType:h,className:m,style:p,title:g="",type:w="checkbox",label:S,children:O,as:f="input",...a},d)=>{n=de(n,"form-check"),t=de(t,"form-switch");const{controlId:v}=P.useContext(en),x=P.useMemo(()=>({controlId:e||v}),[v,e]),_=!O&&S!=null&&S!==!1||_p(O,Xo),N=C.jsx(zc,{...a,type:w==="switch"?"checkbox":w,ref:d,isValid:i,isInvalid:u,disabled:o,as:f});return C.jsx(en.Provider,{value:x,children:C.jsx("div",{style:p,className:le(m,_&&n,r&&`${n}-inline`,l&&`${n}-reverse`,w==="switch"&&t),children:O||C.jsxs(C.Fragment,{children:[N,_&&C.jsx(Xo,{title:g,children:S}),c&&C.jsx(_c,{type:h,tooltip:s,children:c})]})})})});Tc.displayName="FormCheck";const cl=Object.assign(Tc,{Input:zc,Label:Xo}),Lc=P.forwardRef(({bsPrefix:e,type:n,size:t,htmlSize:r,id:l,className:o,isValid:i=!1,isInvalid:u=!1,plaintext:s,readOnly:c,as:h="input",...m},p)=>{const{controlId:g}=P.useContext(en);e=de(e,"form-control");let w;return s?w={[`${e}-plaintext`]:!0}:w={[e]:!0,[`${e}-${t}`]:t},C.jsx(h,{...m,type:n,size:r,ref:p,readOnly:c,id:l||g,className:le(o,w,i&&"is-valid",u&&"is-invalid",n==="color"&&`${e}-color`)})});Lc.displayName="FormControl";const Np=Object.assign(Lc,{Feedback:_c});var zp=/-(.)/g;function Pp(e){return e.replace(zp,function(n,t){return t.toUpperCase()})}const Tp=e=>e[0].toUpperCase()+Pp(e).slice(1);function Lp(e,{displayName:n=Tp(e),Component:t,defaultProps:r}={}){const l=P.forwardRef(({className:o,bsPrefix:i,as:u=t||"div",...s},c)=>{const h={...r,...s},m=de(i,e);return C.jsx(u,{ref:c,className:le(o,m),...h})});return l.displayName=n,l}const Rp=Lp("form-floating"),Rc=P.forwardRef(({controlId:e,as:n="div",...t},r)=>{const l=P.useMemo(()=>({controlId:e}),[e]);return C.jsx(en.Provider,{value:l,children:C.jsx(n,{...t,ref:r})})});Rc.displayName="FormGroup";const jc=Rc,Fc=P.forwardRef(({as:e="label",bsPrefix:n,column:t=!1,visuallyHidden:r=!1,className:l,htmlFor:o,...i},u)=>{const{controlId:s}=P.useContext(en);n=de(n,"form-label");let c="col-form-label";typeof t=="string"&&(c=`${c} ${c}-${t}`);const h=le(l,n,r&&"visually-hidden",t&&c);return o=o||s,t?C.jsx(Bn,{ref:u,as:"label",className:h,htmlFor:o,...i}):C.jsx(e,{ref:u,className:h,htmlFor:o,...i})});Fc.displayName="FormLabel";const jp=Fc,Oc=P.forwardRef(({bsPrefix:e,className:n,id:t,...r},l)=>{const{controlId:o}=P.useContext(en);return e=de(e,"form-range"),C.jsx("input",{...r,type:"range",ref:l,className:le(n,e),id:t||o})});Oc.displayName="FormRange";const Fp=Oc,Mc=P.forwardRef(({bsPrefix:e,size:n,htmlSize:t,className:r,isValid:l=!1,isInvalid:o=!1,id:i,...u},s)=>{const{controlId:c}=P.useContext(en);return e=de(e,"form-select"),C.jsx("select",{...u,size:t,ref:s,className:le(r,e,n&&`${e}-${n}`,l&&"is-valid",o&&"is-invalid"),id:i||c})});Mc.displayName="FormSelect";const Op=Mc,Ic=P.forwardRef(({bsPrefix:e,className:n,as:t="small",muted:r,...l},o)=>(e=de(e,"form-text"),C.jsx(t,{...l,ref:o,className:le(n,e,r&&"text-muted")})));Ic.displayName="FormText";const Mp=Ic,Dc=P.forwardRef((e,n)=>C.jsx(cl,{...e,ref:n,type:"switch"}));Dc.displayName="Switch";const Ip=Object.assign(Dc,{Input:cl.Input,Label:cl.Label}),$c=P.forwardRef(({bsPrefix:e,className:n,children:t,controlId:r,label:l,...o},i)=>(e=de(e,"form-floating"),C.jsxs(jc,{ref:i,className:le(n,e),controlId:r,...o,children:[t,C.jsx("label",{htmlFor:r,children:l})]})));$c.displayName="FloatingLabel";const Dp=$c,$p={_ref:ut.any,validated:ut.bool,as:ut.elementType},Yi=P.forwardRef(({className:e,validated:n,as:t="form",...r},l)=>C.jsx(t,{...r,ref:l,className:le(e,n&&"was-validated")}));Yi.displayName="Form";Yi.propTypes=$p;const eo=Object.assign(Yi,{Group:jc,Control:Np,Floating:Rp,Check:cl,Switch:Ip,Label:jp,Text:Mp,Range:Fp,Select:Op,FloatingLabel:Dp}),Uc=P.forwardRef(({bsPrefix:e,variant:n,animation:t="border",size:r,as:l="div",className:o,...i},u)=>{e=de(e,"spinner");const s=`${e}-${t}`;return C.jsx(l,{ref:u,...i,className:le(o,s,r&&`${s}-${r}`,n&&`text-${n}`)})});Uc.displayName="Spinner";const Up=Uc;function Vp(e,n,t,r){let l=[];["localhost","127.0.0.1"].includes(location.hostname)||(l=[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:global.stun.twilio.com:3478"}]);const o=new RTCPeerConnection({sdpSemantics:"unified-plan",iceServers:l});o.addEventListener("track",function(s){t(s.streams[0])});const i=o.createDataChannel("datachannel");i.addEventListener("message",r);async function u(){let s=await o.createOffer({offerToReceiveVideo:!0});await o.setLocalDescription(s),o.iceGatheringState!=="complete"&&await new Promise(m=>{function p(){o.iceGatheringState==="complete"&&(o.removeEventListener("icegatheringstatechange",p),m())}o.addEventListener("icegatheringstatechange",p)}),s=o.localDescription;const h=await(await fetch("/offer",{body:JSON.stringify({sdp:s.sdp,type:s.type}),headers:{"Content-Type":"application/json"},method:"POST"})).json();await o.setRemoteDescription(h),e(o),n(i)}u()}function Ap(e){return"#"+(1<<24|e[0]<<16|e[1]<<8|e[2]).toString(16).slice(1)}function Bp(){const[o,i]=P.useState(null),[u,s]=P.useState(null),[c,h]=P.useState(1),[m,p]=P.useState([]),[g,w]=P.useState(1),[S,O]=P.useState(!1),[f,a]=P.useState(15),[d,v]=P.useState(null),[x,_]=P.useState(1),[N,z]=P.useState({x:0,y:0}),U=P.useRef(0),L=P.useRef({x:0,y:0}),oe=P.useRef(null);function En(D){const Se=JSON.parse(D.data),M=Se.value;switch(Se.type){case"init":v(M.universe),p(M.cellStates),w(1);break;case"color":p(k=>k.map(T=>T.value===M.cellState?{value:T.value,color:M.color}:T));break;case"players":h(M);break}}function Cn(D){const Se=D.target.getBoundingClientRect();L.current={x:(D.clientX-Se.left)/oe.current.clientWidth,y:(D.clientY-Se.top)/oe.current.clientHeight}}function sr(D){const M=D.target.value.match(/[A-Za-z0-9]{2}/g).map(k=>parseInt(k,16));u.send(JSON.stringify({type:"color",value:{cellState:g,color:M}}))}return P.useEffect(()=>{if(U.current===0)return U.current=1,Vp(D=>{i(D),U.current=2},s,D=>oe.current.srcObject=D,En),()=>{o&&o.close(),u&&u.close()}},[]),P.useEffect(()=>{if(!S)return;const D=setInterval(()=>{u.send(JSON.stringify({type:"draw",value:{x:L.current.x,y:L.current.y,size:f,cellState:g}}))},1e3/60);return()=>clearInterval(D)},[S]),P.useEffect(()=>{function D(Se){const M={zoom:x,position:N},k=.1*x;switch(Se.keyCode){case 81:M.zoom+=.1;break;case 69:M.zoom-=.1;break;case 83:M.position.y+=k;break;case 87:M.position.y-=k;break;case 68:M.position.x+=k;break;case 65:M.position.x-=k;break}M.zoom=Math.min(Math.max(M.zoom,.05),1),M.position.x=Math.min(Math.max(M.position.x,0),1-M.zoom),M.position.y=Math.min(Math.max(M.position.y,0),1-M.zoom),u.send(JSON.stringify({type:"video",value:M})),_(M.zoom),z(M.position)}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,x,N,.1,.1,.05]),C.jsxs("div",{style:{position:"fixed",top:0,left:0,height:"100%",width:"100%",backgroundColor:"black"},children:[C.jsx("video",{ref:oe,autoPlay:!0,muted:!0,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(100vw, 100vh)",height:"min(100vw, 100vh)"},draggable:"false",onMouseMove:Cn,onMouseDown:()=>O(!0),onMouseUp:()=>O(!1),onMouseLeave:()=>O(!1)}),C.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:"250px",paddingTop:"40px",backgroundColor:"rgb(15, 15, 15)"},children:m.length==0?C.jsxs("div",{style:{textAlign:"center"},children:[C.jsx(Up,{animation:"border",variant:"light",role:"status"}),C.jsxs("p",{className:"text-white",children:["Connecting...",C.jsx("br",{}),"This can take a minute"]})]}):C.jsxs(vp,{children:[C.jsx(Nt,{className:"mb-4",children:m.map(D=>C.jsx(Bn,{style:{textAlign:"center"},children:C.jsx("span",{style:{backgroundColor:`rgb(${D.color.join(",")})`,height:"30px",width:"30px",borderRadius:"50%",display:"inline-block",border:D.value===g?"3px solid white":"3px solid rgb(100,100,100)"},onClick:Se=>w(D.value)})}))}),C.jsx(Nt,{className:"mb-4",children:C.jsx(Bn,{children:C.jsx(eo.Control,{type:"color",style:{padding:"0px",width:"100%",border:"1px solid white"},value:Ap(m[g].color),onChange:sr})})}),C.jsx(Nt,{className:"mb-4",children:C.jsx(Bn,{children:C.jsx(eo.Range,{min:1,max:75,value:f,onChange:D=>{a(parseInt(D.target.value))}})})}),C.jsx(Nt,{className:"mb-4",children:C.jsx(Bn,{children:C.jsxs(eo.Select,{value:d,onChange:D=>{u.send(JSON.stringify({type:"universe",value:D.target.value}))},children:[C.jsx("option",{value:"game_of_life",children:"Game of Life"}),C.jsx("option",{value:"falling_sand",children:"Falling Sand"}),C.jsx("option",{value:"growth",children:"Growth"})]})})}),C.jsx(Nt,{children:C.jsxs(Bn,{children:[C.jsxs("p",{className:"text-white",children:["Move Keys: ",C.jsx("b",{children:"w"}),", ",C.jsx("b",{children:"a"}),", ",C.jsx("b",{children:"s"}),", ",C.jsx("b",{children:"d"})]}),C.jsxs("p",{className:"text-white",children:["Zoom Keys: ",C.jsx("b",{children:"q"}),", ",C.jsx("b",{children:"e"})]}),C.jsxs("p",{className:"text-white",children:["Players Online: ",C.jsx("b",{children:c})]})]})})]})})]})}no.createRoot(document.getElementById("root")).render(C.jsx(nf.StrictMode,{children:C.jsx(Bp,{})})); diff --git a/frontend/dist/assets/index-eb15805d.js b/frontend/dist/assets/index-eb15805d.js deleted file mode 100644 index 74937c3..0000000 --- a/frontend/dist/assets/index-eb15805d.js +++ /dev/null @@ -1,44 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rs={exports:{}},fl={},ls={exports:{}},j={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var rr=Symbol.for("react.element"),Uc=Symbol.for("react.portal"),Vc=Symbol.for("react.fragment"),Ac=Symbol.for("react.strict_mode"),Bc=Symbol.for("react.profiler"),Hc=Symbol.for("react.provider"),Wc=Symbol.for("react.context"),Qc=Symbol.for("react.forward_ref"),Kc=Symbol.for("react.suspense"),Yc=Symbol.for("react.memo"),Gc=Symbol.for("react.lazy"),Gi=Symbol.iterator;function Xc(e){return e===null||typeof e!="object"?null:(e=Gi&&e[Gi]||e["@@iterator"],typeof e=="function"?e:null)}var os={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},is=Object.assign,us={};function hn(e,t,n){this.props=e,this.context=t,this.refs=us,this.updater=n||os}hn.prototype.isReactComponent={};hn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ss(){}ss.prototype=hn.prototype;function Jo(e,t,n){this.props=e,this.context=t,this.refs=us,this.updater=n||os}var qo=Jo.prototype=new ss;qo.constructor=Jo;is(qo,hn.prototype);qo.isPureReactComponent=!0;var Xi=Array.isArray,as=Object.prototype.hasOwnProperty,bo={current:null},cs={key:!0,ref:!0,__self:!0,__source:!0};function fs(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)as.call(t,r)&&!cs.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,q=k[Y];if(0>>1;Yl(zl,R))_tl(cr,zl)?(k[Y]=cr,k[_t]=R,Y=_t):(k[Y]=zl,k[Ct]=R,Y=Ct);else if(_tl(cr,R))k[Y]=cr,k[_t]=R,Y=_t;else break e}}return T}function l(k,T){var R=k.sortIndex-T.sortIndex;return R!==0?R:k.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],h=1,m=null,p=3,g=!1,w=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(k){for(var T=n(c);T!==null;){if(T.callback===null)r(c);else if(T.startTime<=k)r(c),T.sortIndex=T.expirationTime,t(s,T);else break;T=n(c)}}function v(k){if(S=!1,d(k),!w)if(n(s)!==null)w=!0,Se(x);else{var T=n(c);T!==null&&M(v,T.startTime-k)}}function x(k,T){w=!1,S&&(S=!1,f(z),z=-1),g=!0;var R=p;try{for(d(T),m=n(s);m!==null&&(!(m.expirationTime>T)||k&&!le());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,p=m.priorityLevel;var q=Y(m.expirationTime<=T);T=e.unstable_now(),typeof q=="function"?m.callback=q:m===n(s)&&r(s),d(T)}else r(s);m=n(s)}if(m!==null)var ar=!0;else{var Ct=n(c);Ct!==null&&M(v,Ct.startTime-T),ar=!1}return ar}finally{m=null,p=R,g=!1}}var C=!1,_=null,z=-1,U=5,L=-1;function le(){return!(e.unstable_now()-Lk||125Y?(k.sortIndex=R,t(c,k),n(s)===null&&k===n(c)&&(S?(f(z),z=-1):S=!0,M(v,R-Y))):(k.sortIndex=q,t(s,k),w||g||(w=!0,Se(x))),k},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(k){var T=p;return function(){var R=p;p=T;try{return k.apply(this,arguments)}finally{p=R}}}})(hs);ms.exports=hs;var sf=ms.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vs=P,Ce=sf;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),no=Object.prototype.hasOwnProperty,af=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ji={},qi={};function cf(e){return no.call(qi,e)?!0:no.call(Ji,e)?!1:af.test(e)?qi[e]=!0:(Ji[e]=!0,!1)}function ff(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function df(e,t,n,r){if(t===null||typeof t>"u"||ff(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){re[e]=new pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];re[t]=new pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){re[e]=new pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){re[e]=new pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){re[e]=new pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){re[e]=new pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){re[e]=new pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){re[e]=new pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){re[e]=new pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ti=/[\-:]([a-z])/g;function ni(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ti,ni);re[t]=new pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ti,ni);re[t]=new pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ti,ni);re[t]=new pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){re[e]=new pe(e,1,!1,e.toLowerCase(),null,!1,!1)});re.xlinkHref=new pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){re[e]=new pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ri(e,t,n,r){var l=re.hasOwnProperty(t)?re[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Ll=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zn(e):""}function pf(e){switch(e.tag){case 5:return zn(e.type);case 16:return zn("Lazy");case 13:return zn("Suspense");case 19:return zn("SuspenseList");case 0:case 2:case 15:return e=Rl(e.type,!1),e;case 11:return e=Rl(e.type.render,!1),e;case 1:return e=Rl(e.type,!0),e;default:return""}}function io(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ht:return"Fragment";case Bt:return"Portal";case ro:return"Profiler";case li:return"StrictMode";case lo:return"Suspense";case oo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ws:return(e.displayName||"Context")+".Consumer";case gs:return(e._context.displayName||"Context")+".Provider";case oi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ii:return t=e.displayName||null,t!==null?t:io(e.type)||"Memo";case rt:t=e._payload,e=e._init;try{return io(e(t))}catch{}}return null}function mf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return io(t);case 8:return t===li?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ks(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hf(e){var t=ks(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pr(e){e._valueTracker||(e._valueTracker=hf(e))}function xs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ks(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function uo(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Es(e,t){t=t.checked,t!=null&&ri(e,"checked",t,!1)}function so(e,t){Es(e,t);var n=yt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ao(e,t.type,n):t.hasOwnProperty("defaultValue")&&ao(e,t.type,yt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ao(e,t,n){(t!=="number"||Vr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pn=Array.isArray;function en(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=mr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vf=["Webkit","ms","Moz","O"];Object.keys(Rn).forEach(function(e){vf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rn[t]=Rn[e]})});function zs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Rn.hasOwnProperty(e)&&Rn[e]?(""+t).trim():t+"px"}function Ps(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=zs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var yf=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function po(e,t){if(t){if(yf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function mo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ho=null;function ui(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vo=null,tn=null,nn=null;function lu(e){if(e=ir(e)){if(typeof vo!="function")throw Error(y(280));var t=e.stateNode;t&&(t=vl(t),vo(e.stateNode,e.type,t))}}function Ts(e){tn?nn?nn.push(e):nn=[e]:tn=e}function Ls(){if(tn){var e=tn,t=nn;if(nn=tn=null,lu(e),t)for(e=0;e>>=0,e===0?32:31-(Pf(e)/Tf|0)|0}var hr=64,vr=4194304;function Tn(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Tn(u):(o&=i,o!==0&&(r=Tn(o)))}else i=n&~l,i!==0?r=Tn(i):o!==0&&(r=Tn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function lr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-De(t),e[t]=n}function Ff(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Fn),pu=String.fromCharCode(32),mu=!1;function Zs(e,t){switch(e){case"keyup":return ud.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Js(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wt=!1;function ad(e,t){switch(e){case"compositionend":return Js(t);case"keypress":return t.which!==32?null:(mu=!0,pu);case"textInput":return e=t.data,e===pu&&mu?null:e;default:return null}}function cd(e,t){if(Wt)return e==="compositionend"||!hi&&Zs(e,t)?(e=Gs(),Rr=di=ut=null,Wt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gu(n)}}function ta(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ta(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function na(){for(var e=window,t=Vr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wd(e){var t=na(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ta(n.ownerDocument.documentElement,n)){if(r!==null&&vi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=wu(n,o);var i=wu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Qt=null,xo=null,Mn=null,Eo=!1;function Su(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eo||Qt==null||Qt!==Vr(r)||(r=Qt,"selectionStart"in r&&vi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mn&&Yn(Mn,r)||(Mn=r,r=Yr(xo,"onSelect"),0Gt||(e.current=To[Gt],To[Gt]=null,Gt--)}function $(e,t){Gt++,To[Gt]=e.current,e.current=t}var gt={},se=St(gt),ve=St(!1),Ft=gt;function an(e,t){var n=e.type.contextTypes;if(!n)return gt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ye(e){return e=e.childContextTypes,e!=null}function Xr(){A(ve),A(se)}function zu(e,t,n){if(se.current!==gt)throw Error(y(168));$(se,t),$(ve,n)}function fa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,mf(e)||"Unknown",l));return Q({},n,r)}function Zr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gt,Ft=se.current,$(se,e),$(ve,ve.current),!0}function Pu(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=fa(e,t,Ft),r.__reactInternalMemoizedMergedChildContext=e,A(ve),A(se),$(se,e)):A(ve),$(ve,n)}var Ke=null,yl=!1,Ql=!1;function da(e){Ke===null?Ke=[e]:Ke.push(e)}function Rd(e){yl=!0,da(e)}function kt(){if(!Ql&&Ke!==null){Ql=!0;var e=0,t=I;try{var n=Ke;for(I=1;e>=i,l-=i,Ye=1<<32-De(t)+l|n<z?(U=_,_=null):U=_.sibling;var L=p(f,_,d[z],v);if(L===null){_===null&&(_=U);break}e&&_&&L.alternate===null&&t(f,_),a=o(L,a,z),C===null?x=L:C.sibling=L,C=L,_=U}if(z===d.length)return n(f,_),B&&Nt(f,z),x;if(_===null){for(;zz?(U=_,_=null):U=_.sibling;var le=p(f,_,L.value,v);if(le===null){_===null&&(_=U);break}e&&_&&le.alternate===null&&t(f,_),a=o(le,a,z),C===null?x=le:C.sibling=le,C=le,_=U}if(L.done)return n(f,_),B&&Nt(f,z),x;if(_===null){for(;!L.done;z++,L=d.next())L=m(f,L.value,v),L!==null&&(a=o(L,a,z),C===null?x=L:C.sibling=L,C=L);return B&&Nt(f,z),x}for(_=r(f,_);!L.done;z++,L=d.next())L=g(_,f,z,L.value,v),L!==null&&(e&&L.alternate!==null&&_.delete(L.key===null?z:L.key),a=o(L,a,z),C===null?x=L:C.sibling=L,C=L);return e&&_.forEach(function(xt){return t(f,xt)}),B&&Nt(f,z),x}function O(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Ht&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case dr:e:{for(var x=d.key,C=a;C!==null;){if(C.key===x){if(x=d.type,x===Ht){if(C.tag===7){n(f,C.sibling),a=l(C,d.props.children),a.return=f,f=a;break e}}else if(C.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===rt&&Mu(x)===C.type){n(f,C.sibling),a=l(C,d.props),a.ref=En(f,C,d),a.return=f,f=a;break e}n(f,C);break}else t(f,C);C=C.sibling}d.type===Ht?(a=jt(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Ur(d.type,d.key,d.props,null,f.mode,v),v.ref=En(f,a,d),v.return=f,f=v)}return i(f);case Bt:e:{for(C=d.key;a!==null;){if(a.key===C)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=bl(d,f.mode,v),a.return=f,f=a}return i(f);case rt:return C=d._init,O(f,a,C(d._payload),v)}if(Pn(d))return w(f,a,d,v);if(gn(d))return S(f,a,d,v);Er(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=ql(d,f.mode,v),a.return=f,f=a),i(f)):n(f,a)}return O}var fn=Sa(!0),ka=Sa(!1),ur={},We=St(ur),Jn=St(ur),qn=St(ur);function Lt(e){if(e===ur)throw Error(y(174));return e}function _i(e,t){switch($(qn,t),$(Jn,e),$(We,ur),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fo(t,e)}A(We),$(We,t)}function dn(){A(We),A(Jn),A(qn)}function xa(e){Lt(qn.current);var t=Lt(We.current),n=fo(t,e.type);t!==n&&($(Jn,e),$(We,n))}function Ni(e){Jn.current===e&&(A(We),A(Jn))}var H=St(0);function nl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Kl=[];function zi(){for(var e=0;en?n:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),t()}finally{I=n,Yl.transition=r}}function $a(){return je().memoizedState}function Md(e,t,n){var r=ht(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ua(e))Va(t,n);else if(n=va(e,t,n,r),n!==null){var l=fe();$e(n,e,r,l),Aa(n,t,r)}}function Id(e,t,n){var r=ht(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ua(e))Va(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,Ue(u,i)){var s=t.interleaved;s===null?(l.next=l,Ei(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=va(e,t,l,r),n!==null&&(l=fe(),$e(n,e,r,l),Aa(n,t,r))}}function Ua(e){var t=e.alternate;return e===W||t!==null&&t===W}function Va(e,t){In=rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Aa(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ai(e,n)}}var ll={readContext:Re,useCallback:oe,useContext:oe,useEffect:oe,useImperativeHandle:oe,useInsertionEffect:oe,useLayoutEffect:oe,useMemo:oe,useReducer:oe,useRef:oe,useState:oe,useDebugValue:oe,useDeferredValue:oe,useTransition:oe,useMutableSource:oe,useSyncExternalStore:oe,useId:oe,unstable_isNewReconciler:!1},Dd={readContext:Re,useCallback:function(e,t){return Ae().memoizedState=[e,t===void 0?null:t],e},useContext:Re,useEffect:Du,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mr(4194308,4,Fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mr(4,2,e,t)},useMemo:function(e,t){var n=Ae();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ae();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Md.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Ae();return e={current:e},t.memoizedState=e},useState:Iu,useDebugValue:ji,useDeferredValue:function(e){return Ae().memoizedState=e},useTransition:function(){var e=Iu(!1),t=e[0];return e=Od.bind(null,e[1]),Ae().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=W,l=Ae();if(B){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),ee===null)throw Error(y(349));Mt&30||_a(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Du(za.bind(null,r,o,e),[e]),r.flags|=2048,tr(9,Na.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ae(),t=ee.identifierPrefix;if(B){var n=Ge,r=Ye;n=(r&~(1<<32-De(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Be]=t,e[Zn]=r,Za(e,t,!1,!1),t.stateNode=e;e:{switch(i=mo(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;lmn&&(t.flags|=128,r=!0,Cn(o,!1),t.lanes=4194304)}else{if(!r)if(e=nl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!B)return ie(t),null}else 2*G()-o.renderingStartTime>mn&&n!==1073741824&&(t.flags|=128,r=!0,Cn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=G(),t.sibling=null,n=H.current,$(H,r?n&1|2:n&1),t):(ie(t),null);case 22:case 23:return $i(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(ie(t),t.subtreeFlags&6&&(t.flags|=8192)):ie(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function Qd(e,t){switch(gi(t),t.tag){case 1:return ye(t.type)&&Xr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dn(),A(ve),A(se),zi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ni(t),null;case 13:if(A(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));cn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(H),null;case 4:return dn(),null;case 10:return xi(t.type._context),null;case 22:case 23:return $i(),null;case 24:return null;default:return null}}var _r=!1,ue=!1,Kd=typeof WeakSet=="function"?WeakSet:Set,E=null;function qt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){K(e,t,r)}else n.current=null}function Ao(e,t,n){try{n()}catch(r){K(e,t,r)}}var Ku=!1;function Yd(e,t){if(Co=Qr,e=na(),vi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,c=0,h=0,m=e,p=null;t:for(;;){for(var g;m!==n||l!==0&&m.nodeType!==3||(u=i+l),m!==o||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break t;if(p===n&&++c===l&&(u=i),p===o&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_o={focusedElem:e,selectionRange:n},Qr=!1,E=t;E!==null;)if(t=E,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,E=e;else for(;E!==null;){t=E;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,O=w.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:Oe(t.type,S),O);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){K(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,E=e;break}E=t.return}return w=Ku,Ku=!1,w}function Dn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Ao(t,n,o)}l=l.next}while(l!==r)}}function Sl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ba(e){var t=e.alternate;t!==null&&(e.alternate=null,ba(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Be],delete t[Zn],delete t[Po],delete t[Td],delete t[Ld])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ec(e){return e.tag===5||e.tag===3||e.tag===4}function Yu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ho(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gr));else if(r!==4&&(e=e.child,e!==null))for(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}function Wo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wo(e,t,n),e=e.sibling;e!==null;)Wo(e,t,n),e=e.sibling}var te=null,Me=!1;function nt(e,t,n){for(n=n.child;n!==null;)tc(e,t,n),n=n.sibling}function tc(e,t,n){if(He&&typeof He.onCommitFiberUnmount=="function")try{He.onCommitFiberUnmount(dl,n)}catch{}switch(n.tag){case 5:ue||qt(n,t);case 6:var r=te,l=Me;te=null,nt(e,t,n),te=r,Me=l,te!==null&&(Me?(e=te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):te.removeChild(n.stateNode));break;case 18:te!==null&&(Me?(e=te,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),Qn(e)):Wl(te,n.stateNode));break;case 4:r=te,l=Me,te=n.stateNode.containerInfo,Me=!0,nt(e,t,n),te=r,Me=l;break;case 0:case 11:case 14:case 15:if(!ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ao(n,t,i),l=l.next}while(l!==r)}nt(e,t,n);break;case 1:if(!ue&&(qt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){K(n,t,u)}nt(e,t,n);break;case 21:nt(e,t,n);break;case 22:n.mode&1?(ue=(r=ue)||n.memoizedState!==null,nt(e,t,n),ue=r):nt(e,t,n);break;default:nt(e,t,n)}}function Gu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Kd),t.forEach(function(r){var l=np.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Fe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=G()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xd(r/1960))-r,10e?16:e,st===null)var r=!1;else{if(e=st,st=null,ul=0,F&6)throw Error(y(331));var l=F;for(F|=4,E=e.current;E!==null;){var o=E,i=o.child;if(E.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sG()-Ii?Rt(e,0):Mi|=n),ge(e,t)}function ac(e,t){t===0&&(e.mode&1?(t=vr,vr<<=1,!(vr&130023424)&&(vr=4194304)):t=1);var n=fe();e=qe(e,t),e!==null&&(lr(e,t,n),ge(e,n))}function tp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ac(e,n)}function np(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),ac(e,n)}var cc;cc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ve.current)he=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return he=!1,Hd(e,t,n);he=!!(e.flags&131072)}else he=!1,B&&t.flags&1048576&&pa(t,qr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ir(e,t),e=t.pendingProps;var l=an(t,se.current);ln(t,n),l=Ti(null,t,r,e,l,n);var o=Li();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ye(r)?(o=!0,Zr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ci(t),l.updater=gl,t.stateNode=l,l._reactInternals=t,Oo(t,r,e,n),t=Do(null,t,r,!0,o,n)):(t.tag=0,B&&o&&yi(t),ce(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ir(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=lp(r),e=Oe(r,e),l){case 0:t=Io(null,t,r,e,n);break e;case 1:t=Hu(null,t,r,e,n);break e;case 11:t=Au(null,t,r,e,n);break e;case 14:t=Bu(null,t,r,Oe(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Oe(r,l),Io(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Oe(r,l),Hu(e,t,r,l,n);case 3:e:{if(Ya(t),e===null)throw Error(y(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ya(e,t),tl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=pn(Error(y(423)),t),t=Wu(e,t,r,n,l);break e}else if(r!==l){l=pn(Error(y(424)),t),t=Wu(e,t,r,n,l);break e}else for(xe=dt(t.stateNode.containerInfo.firstChild),Ee=t,B=!0,Ie=null,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cn(),r===l){t=be(e,t,n);break e}ce(e,t,r,n)}t=t.child}return t;case 5:return xa(t),e===null&&Ro(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,No(r,l)?i=null:o!==null&&No(r,o)&&(t.flags|=32),Ka(e,t),ce(e,t,i,n),t.child;case 6:return e===null&&Ro(t),null;case 13:return Ga(e,t,n);case 4:return _i(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fn(t,null,r,n):ce(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Oe(r,l),Au(e,t,r,l,n);case 7:return ce(e,t,t.pendingProps,n),t.child;case 8:return ce(e,t,t.pendingProps.children,n),t.child;case 12:return ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,$(br,r._currentValue),r._currentValue=i,o!==null)if(Ue(o.value,i)){if(o.children===l.children&&!ve.current){t=be(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Xe(-1,n&-n),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),jo(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(y(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),jo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ce(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,ln(t,n),l=Re(l),r=r(l),t.flags|=1,ce(e,t,r,n),t.child;case 14:return r=t.type,l=Oe(r,t.pendingProps),l=Oe(r.type,l),Bu(e,t,r,l,n);case 15:return Wa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Oe(r,l),Ir(e,t),t.tag=1,ye(r)?(e=!0,Zr(t)):e=!1,ln(t,n),wa(t,r,l),Oo(t,r,l,n),Do(null,t,r,!0,e,n);case 19:return Xa(e,t,n);case 22:return Qa(e,t,n)}throw Error(y(156,t.tag))};function fc(e,t){return Ds(e,t)}function rp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Te(e,t,n,r){return new rp(e,t,n,r)}function Vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lp(e){if(typeof e=="function")return Vi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oi)return 11;if(e===ii)return 14}return 2}function vt(e,t){var n=e.alternate;return n===null?(n=Te(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ur(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Vi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ht:return jt(n.children,l,o,t);case li:i=8,l|=8;break;case ro:return e=Te(12,n,t,l|2),e.elementType=ro,e.lanes=o,e;case lo:return e=Te(13,n,t,l),e.elementType=lo,e.lanes=o,e;case oo:return e=Te(19,n,t,l),e.elementType=oo,e.lanes=o,e;case Ss:return xl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gs:i=10;break e;case ws:i=9;break e;case oi:i=11;break e;case ii:i=14;break e;case rt:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=Te(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function jt(e,t,n,r){return e=Te(7,e,r,t),e.lanes=n,e}function xl(e,t,n,r){return e=Te(22,e,r,t),e.elementType=Ss,e.lanes=n,e.stateNode={isHidden:!1},e}function ql(e,t,n){return e=Te(6,e,null,t),e.lanes=n,e}function bl(e,t,n){return t=Te(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ai(e,t,n,r,l,o,i,u,s){return e=new op(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Te(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ci(o),e}function ip(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hc)}catch(e){console.error(e)}}hc(),ps.exports=_e;var fp=ps.exports,ns=fp;to.createRoot=ns.createRoot,to.hydrateRoot=ns.hydrateRoot;var vc={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],l=0;l{const i=we(e,"container"),u=typeof t=="string"?`-${t}`:"-fluid";return N.jsx(n,{ref:o,...l,className:ae(r,t?`${i}${u}`:i)})});wc.displayName="Container";const hp=wc,Sc=P.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},l)=>{const o=we(e,"row"),i=yc(),u=gc(),s=`${o}-cols`,c=[];return i.forEach(h=>{const m=r[h];delete r[h];let p;m!=null&&typeof m=="object"?{cols:p}=m:p=m;const g=h!==u?`-${h}`:"";p!=null&&c.push(`${s}${g}-${p}`)}),N.jsx(n,{ref:l,...r,className:ae(t,o,...c)})});Sc.displayName="Row";const Nn=Sc;function vp({as:e,bsPrefix:t,className:n,...r}){t=we(t,"col");const l=yc(),o=gc(),i=[],u=[];return l.forEach(s=>{const c=r[s];delete r[s];let h,m,p;typeof c=="object"&&c!=null?{span:h,offset:m,order:p}=c:h=c;const g=s!==o?`-${s}`:"";h&&i.push(h===!0?`${t}${g}`:`${t}${g}-${h}`),p!=null&&u.push(`order${g}-${p}`),m!=null&&u.push(`offset${g}-${m}`)}),[{...r,className:ae(n,...i,...u)},{as:e,bsPrefix:t,spans:i}]}const kc=P.forwardRef((e,t)=>{const[{className:n,...r},{as:l="div",bsPrefix:o,spans:i}]=vp(e);return N.jsx(l,{...r,ref:t,className:ae(n,!i.length&&o)})});kc.displayName="Col";const At=kc;var xc={exports:{}},yp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",gp=yp,wp=gp;function Ec(){}function Cc(){}Cc.resetWarningCache=Ec;var Sp=function(){function e(r,l,o,i,u,s){if(s!==wp){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Cc,resetWarningCache:Ec};return n.PropTypes=n,n};xc.exports=Sp();var kp=xc.exports;const un=Zo(kp),xp={type:un.string,tooltip:un.bool,as:un.elementType},Ki=P.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...l},o)=>N.jsx(e,{...l,ref:o,className:ae(t,`${n}-${r?"tooltip":"feedback"}`)}));Ki.displayName="Feedback";Ki.propTypes=xp;const _c=Ki,Ep=P.createContext({}),et=Ep,Nc=P.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:l=!1,isInvalid:o=!1,as:i="input",...u},s)=>{const{controlId:c}=P.useContext(et);return t=we(t,"form-check-input"),N.jsx(i,{...u,ref:s,type:r,id:e||c,className:ae(n,t,l&&"is-valid",o&&"is-invalid")})});Nc.displayName="FormCheckInput";const zc=Nc,Pc=P.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},l)=>{const{controlId:o}=P.useContext(et);return e=we(e,"form-check-label"),N.jsx("label",{...r,ref:l,htmlFor:n||o,className:ae(t,e)})});Pc.displayName="FormCheckLabel";const Xo=Pc;function Cp(e,t){return P.Children.toArray(e).some(n=>P.isValidElement(n)&&n.type===t)}const Tc=P.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:l=!1,disabled:o=!1,isValid:i=!1,isInvalid:u=!1,feedbackTooltip:s=!1,feedback:c,feedbackType:h,className:m,style:p,title:g="",type:w="checkbox",label:S,children:O,as:f="input",...a},d)=>{t=we(t,"form-check"),n=we(n,"form-switch");const{controlId:v}=P.useContext(et),x=P.useMemo(()=>({controlId:e||v}),[v,e]),C=!O&&S!=null&&S!==!1||Cp(O,Xo),_=N.jsx(zc,{...a,type:w==="switch"?"checkbox":w,ref:d,isValid:i,isInvalid:u,disabled:o,as:f});return N.jsx(et.Provider,{value:x,children:N.jsx("div",{style:p,className:ae(m,C&&t,r&&`${t}-inline`,l&&`${t}-reverse`,w==="switch"&&n),children:O||N.jsxs(N.Fragment,{children:[_,C&&N.jsx(Xo,{title:g,children:S}),c&&N.jsx(_c,{type:h,tooltip:s,children:c})]})})})});Tc.displayName="FormCheck";const cl=Object.assign(Tc,{Input:zc,Label:Xo}),Lc=P.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:l,className:o,isValid:i=!1,isInvalid:u=!1,plaintext:s,readOnly:c,as:h="input",...m},p)=>{const{controlId:g}=P.useContext(et);e=we(e,"form-control");let w;return s?w={[`${e}-plaintext`]:!0}:w={[e]:!0,[`${e}-${n}`]:n},N.jsx(h,{...m,type:t,size:r,ref:p,readOnly:c,id:l||g,className:ae(o,w,i&&"is-valid",u&&"is-invalid",t==="color"&&`${e}-color`)})});Lc.displayName="FormControl";const _p=Object.assign(Lc,{Feedback:_c});var Np=/-(.)/g;function zp(e){return e.replace(Np,function(t,n){return n.toUpperCase()})}const Pp=e=>e[0].toUpperCase()+zp(e).slice(1);function Tp(e,{displayName:t=Pp(e),Component:n,defaultProps:r}={}){const l=P.forwardRef(({className:o,bsPrefix:i,as:u=n||"div",...s},c)=>{const h={...r,...s},m=we(i,e);return N.jsx(u,{ref:c,className:ae(o,m),...h})});return l.displayName=t,l}const Lp=Tp("form-floating"),Rc=P.forwardRef(({controlId:e,as:t="div",...n},r)=>{const l=P.useMemo(()=>({controlId:e}),[e]);return N.jsx(et.Provider,{value:l,children:N.jsx(t,{...n,ref:r})})});Rc.displayName="FormGroup";const jc=Rc,Fc=P.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:l,htmlFor:o,...i},u)=>{const{controlId:s}=P.useContext(et);t=we(t,"form-label");let c="col-form-label";typeof n=="string"&&(c=`${c} ${c}-${n}`);const h=ae(l,t,r&&"visually-hidden",n&&c);return o=o||s,n?N.jsx(At,{ref:u,as:"label",className:h,htmlFor:o,...i}):N.jsx(e,{ref:u,className:h,htmlFor:o,...i})});Fc.displayName="FormLabel";const Rp=Fc,Oc=P.forwardRef(({bsPrefix:e,className:t,id:n,...r},l)=>{const{controlId:o}=P.useContext(et);return e=we(e,"form-range"),N.jsx("input",{...r,type:"range",ref:l,className:ae(t,e),id:n||o})});Oc.displayName="FormRange";const jp=Oc,Mc=P.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:l=!1,isInvalid:o=!1,id:i,...u},s)=>{const{controlId:c}=P.useContext(et);return e=we(e,"form-select"),N.jsx("select",{...u,size:n,ref:s,className:ae(r,e,t&&`${e}-${t}`,l&&"is-valid",o&&"is-invalid"),id:i||c})});Mc.displayName="FormSelect";const Fp=Mc,Ic=P.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...l},o)=>(e=we(e,"form-text"),N.jsx(n,{...l,ref:o,className:ae(t,e,r&&"text-muted")})));Ic.displayName="FormText";const Op=Ic,Dc=P.forwardRef((e,t)=>N.jsx(cl,{...e,ref:t,type:"switch"}));Dc.displayName="Switch";const Mp=Object.assign(Dc,{Input:cl.Input,Label:cl.Label}),$c=P.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:l,...o},i)=>(e=we(e,"form-floating"),N.jsxs(jc,{ref:i,className:ae(t,e),controlId:r,...o,children:[n,N.jsx("label",{htmlFor:r,children:l})]})));$c.displayName="FloatingLabel";const Ip=$c,Dp={_ref:un.any,validated:un.bool,as:un.elementType},Yi=P.forwardRef(({className:e,validated:t,as:n="form",...r},l)=>N.jsx(n,{...r,ref:l,className:ae(e,t&&"was-validated")}));Yi.displayName="Form";Yi.propTypes=Dp;const eo=Object.assign(Yi,{Group:jc,Control:_p,Floating:Lp,Check:cl,Switch:Mp,Label:Rp,Text:Op,Range:jp,Select:Fp,FloatingLabel:Ip});function $p(e,t,n,r){const l=[];["localhost","127.0.0.1"].includes(location.hostname)||l.push({urls:"stun:stun.l.google.com:19302"});const o=new RTCPeerConnection({sdpSemantics:"unified-plan",iceServers:l});o.addEventListener("track",function(s){n(s.streams[0])});const i=o.createDataChannel("datachannel");i.addEventListener("message",r);async function u(){let s=await o.createOffer({offerToReceiveVideo:!0});await o.setLocalDescription(s),o.iceGatheringState!=="complete"&&await new Promise(m=>{function p(){o.iceGatheringState==="complete"&&(o.removeEventListener("icegatheringstatechange",p),m())}o.addEventListener("icegatheringstatechange",p)}),s=o.localDescription;const h=await(await fetch("/offer",{body:JSON.stringify({sdp:s.sdp,type:s.type}),headers:{"Content-Type":"application/json"},method:"POST"})).json();await o.setRemoteDescription(h),e(o),t(i)}u()}function Up(e){return"#"+(1<<24|e[0]<<16|e[1]<<8|e[2]).toString(16).slice(1)}function Vp(){const[o,i]=P.useState(null),[u,s]=P.useState(null),[c,h]=P.useState(1),[m,p]=P.useState([]),[g,w]=P.useState(1),[S,O]=P.useState(!1),[f,a]=P.useState(15),[d,v]=P.useState(null),[x,C]=P.useState(1),[_,z]=P.useState({x:0,y:0}),U=P.useRef(0),L=P.useRef({x:0,y:0}),le=P.useRef(null);function xt(D){const Se=JSON.parse(D.data),M=Se.value;switch(Se.type){case"init":v(M.universe),p(M.cellStates),w(1);break;case"color":p(k=>k.map(T=>T.value===M.cellState?{value:T.value,color:M.color}:T));break;case"players":h(M);break}}function Et(D){const Se=D.target.getBoundingClientRect();L.current={x:(D.clientX-Se.left)/le.current.clientWidth,y:(D.clientY-Se.top)/le.current.clientHeight}}function sr(D){const M=D.target.value.match(/[A-Za-z0-9]{2}/g).map(k=>parseInt(k,16));u.send(JSON.stringify({type:"color",value:{cellState:g,color:M}}))}return P.useEffect(()=>{if(U.current===0)return U.current=1,$p(D=>{i(D),U.current=2},s,D=>le.current.srcObject=D,xt),()=>{o&&o.close(),u&&u.close()}},[]),P.useEffect(()=>{if(!S)return;const D=setInterval(()=>{u.send(JSON.stringify({type:"draw",value:{x:L.current.x,y:L.current.y,size:f,cellState:g}}))},1e3/60);return()=>clearInterval(D)},[S]),P.useEffect(()=>{function D(Se){const M={zoom:x,position:_},k=.1*x;switch(Se.keyCode){case 81:M.zoom+=.1;break;case 69:M.zoom-=.1;break;case 83:M.position.y+=k;break;case 87:M.position.y-=k;break;case 68:M.position.x+=k;break;case 65:M.position.x-=k;break}M.zoom=Math.min(Math.max(M.zoom,.05),1),M.position.x=Math.min(Math.max(M.position.x,0),1-M.zoom),M.position.y=Math.min(Math.max(M.position.y,0),1-M.zoom),u.send(JSON.stringify({type:"video",value:M})),C(M.zoom),z(M.position)}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,x,_,.1,.1,.05]),N.jsxs("div",{style:{position:"fixed",top:0,left:0,height:"100%",width:"100%",backgroundColor:"black"},children:[N.jsx("video",{ref:le,autoPlay:!0,muted:!0,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(100vw, 100vh)",height:"min(100vw, 100vh)"},draggable:"false",onMouseMove:Et,onMouseDown:()=>O(!0),onMouseUp:()=>O(!1),onMouseLeave:()=>O(!1)}),N.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:"250px",paddingTop:"40px",backgroundColor:"rgb(15, 15, 15)"},children:m.length>0&&N.jsxs(hp,{children:[N.jsx(Nn,{className:"mb-4",children:m.map(D=>N.jsx(At,{style:{textAlign:"center"},children:N.jsx("span",{style:{backgroundColor:`rgb(${D.color.join(",")})`,height:"30px",width:"30px",borderRadius:"50%",display:"inline-block",border:D.value===g?"3px solid white":"3px solid rgb(100,100,100)"},onClick:Se=>w(D.value)})}))}),N.jsx(Nn,{className:"mb-4",children:N.jsx(At,{children:N.jsx(eo.Control,{type:"color",style:{padding:"0px",width:"100%",border:"1px solid white"},value:Up(m[g].color),onChange:sr})})}),N.jsx(Nn,{className:"mb-4",children:N.jsx(At,{children:N.jsx(eo.Range,{min:1,max:75,value:f,onChange:D=>{a(parseInt(D.target.value))}})})}),N.jsx(Nn,{className:"mb-4",children:N.jsx(At,{children:N.jsxs(eo.Select,{value:d,onChange:D=>{u.send(JSON.stringify({type:"universe",value:D.target.value}))},children:[N.jsx("option",{value:"game_of_life",children:"Game of Life"}),N.jsx("option",{value:"falling_sand",children:"Falling Sand"}),N.jsx("option",{value:"growth",children:"Growth"})]})})}),N.jsx(Nn,{children:N.jsxs(At,{children:[N.jsxs("p",{className:"text-white",children:["Move Keys: ",N.jsx("b",{children:"w"}),", ",N.jsx("b",{children:"a"}),", ",N.jsx("b",{children:"s"}),", ",N.jsx("b",{children:"d"})]}),N.jsxs("p",{className:"text-white",children:["Zoom Keys: ",N.jsx("b",{children:"q"}),", ",N.jsx("b",{children:"e"})]}),N.jsxs("p",{className:"text-white",children:["Players Online: ",N.jsx("b",{children:c})]})]})})]})})]})}to.createRoot(document.getElementById("root")).render(N.jsx(ef.StrictMode,{children:N.jsx(Vp,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 8fe441b..33139bf 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -5,7 +5,7 @@ Cellular - + diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 0ac67d6..b6a9605 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -5,6 +5,7 @@ import Container from 'react-bootstrap/Container' import Row from 'react-bootstrap/Row' import Col from 'react-bootstrap/Col' import Form from 'react-bootstrap/Form' +import Spinner from 'react-bootstrap/Spinner' function connect( connectionCallback, @@ -12,11 +13,16 @@ function connect( videoCallback, messageCallback ) { - const iceServers = [] + let iceServers = [] if (!['localhost', '127.0.0.1'].includes(location.hostname)) { - iceServers.push({ - urls: 'stun:global.stun.twilio.com:3478', - }) + iceServers = [ + { + urls: 'stun:stun.l.google.com:19302', + }, + { + urls: 'stun:global.stun.twilio.com:3478', + }, + ] } const pc = new RTCPeerConnection({ sdpSemantics: 'unified-plan', @@ -148,7 +154,7 @@ function App() { connectionState.current = 2 }, setDataChannel, - videoStream => (refVideo.current.srcObject = videoStream), + (videoStream) => (refVideo.current.srcObject = videoStream), handleMessages ) @@ -205,7 +211,7 @@ function App() { value.zoom = Math.min(Math.max(value.zoom, minZoom), 1) value.position.x = Math.min(Math.max(value.position.x, 0), 1 - value.zoom) value.position.y = Math.min(Math.max(value.position.y, 0), 1 - value.zoom) - + dataChannel.send( JSON.stringify({ type: 'video', @@ -259,7 +265,16 @@ function App() { backgroundColor: 'rgb(15, 15, 15)', }} > - {cellStates.length > 0 && ( + {cellStates.length == 0 ? ( +
+ +

+ Connecting... +
+ This can take a minute +

+
+ ) : ( {cellStates.map((cellState) => (