const Rf=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)}};Rf();function qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bs={exports:{}},Ce={},x={exports:{}},M={};/** * @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 pr=Symbol.for("react.element"),zf=Symbol.for("react.portal"),Mf=Symbol.for("react.fragment"),Df=Symbol.for("react.strict_mode"),Af=Symbol.for("react.profiler"),Of=Symbol.for("react.provider"),Bf=Symbol.for("react.context"),Ff=Symbol.for("react.forward_ref"),Uf=Symbol.for("react.suspense"),jf=Symbol.for("react.memo"),$f=Symbol.for("react.lazy"),Au=Symbol.iterator;function Hf(e){return e===null||typeof e!="object"?null:(e=Au&&e[Au]||e["@@iterator"],typeof e=="function"?e:null)}var ea={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ta=Object.assign,na={};function Sn(e,t,n){this.props=e,this.context=t,this.refs=na,this.updater=n||ea}Sn.prototype.isReactComponent={};Sn.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")};Sn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ra(){}ra.prototype=Sn.prototype;function Mi(e,t,n){this.props=e,this.context=t,this.refs=na,this.updater=n||ea}var Di=Mi.prototype=new ra;Di.constructor=Mi;ta(Di,Sn.prototype);Di.isPureReactComponent=!0;var Ou=Array.isArray,la=Object.prototype.hasOwnProperty,Ai={current:null},oa={key:!0,ref:!0,__self:!0,__source:!0};function ia(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)la.call(t,r)&&!oa.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,J=P[W];if(0>>1;Wl(to,z))Ptl(Er,to)?(P[W]=Er,P[Pt]=z,W=Pt):(P[W]=to,P[Nt]=z,W=Nt);else if(Ptl(Er,z))P[W]=Er,P[Pt]=z,W=Pt;else break e}}return R}function l(P,R){var z=P.sortIndex-R.sortIndex;return z!==0?z:P.id-R.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=[],a=[],h=1,g=null,p=3,m=!1,y=!1,w=!1,L=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=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(P){for(var R=n(a);R!==null;){if(R.callback===null)r(a);else if(R.startTime<=P)r(a),R.sortIndex=R.expirationTime,t(s,R);else break;R=n(a)}}function v(P){if(w=!1,d(P),!y)if(n(s)!==null)y=!0,bl(S);else{var R=n(a);R!==null&&eo(v,R.startTime-P)}}function S(P,R){y=!1,w&&(w=!1,f(_),_=-1),m=!0;var z=p;try{for(d(R),g=n(s);g!==null&&(!(g.expirationTime>R)||P&&!b());){var W=g.callback;if(typeof W=="function"){g.callback=null,p=g.priorityLevel;var J=W(g.expirationTime<=R);R=e.unstable_now(),typeof J=="function"?g.callback=J:g===n(s)&&r(s),d(R)}else r(s);g=n(s)}if(g!==null)var kr=!0;else{var Nt=n(a);Nt!==null&&eo(v,Nt.startTime-R),kr=!1}return kr}finally{g=null,p=z,m=!1}}var E=!1,C=null,_=-1,D=5,I=-1;function b(){return!(e.unstable_now()-IP||125W?(P.sortIndex=z,t(a,P),n(s)===null&&P===n(a)&&(w?(f(_),_=-1):w=!0,eo(v,z-W))):(P.sortIndex=J,t(s,P),y||m||(y=!0,bl(S))),P},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(P){var R=p;return function(){var z=p;p=R;try{return P.apply(this,arguments)}finally{p=z}}}})(sa);(function(e){e.exports=sa})(ua);/** * @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 aa=x.exports,Ee=ua.exports;function k(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"),Oo=Object.prototype.hasOwnProperty,Yf=/^[: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]*$/,Fu={},Uu={};function Gf(e){return Oo.call(Uu,e)?!0:Oo.call(Fu,e)?!1:Yf.test(e)?Uu[e]=!0:(Fu[e]=!0,!1)}function Xf(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 Jf(e,t,n,r){if(t===null||typeof t>"u"||Xf(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 Bi=/[\-:]([a-z])/g;function Fi(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(Bi,Fi);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(Bi,Fi);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(Bi,Fi);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 Ui(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{lo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zn(e):""}function Zf(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=oo(e.type,!1),e;case 11:return e=oo(e.type.render,!1),e;case 1:return e=oo(e.type,!0),e;default:return""}}function jo(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 Qt:return"Fragment";case Vt:return"Portal";case Bo:return"Profiler";case ji:return"StrictMode";case Fo:return"Suspense";case Uo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case da:return(e.displayName||"Context")+".Consumer";case fa:return(e._context.displayName||"Context")+".Provider";case $i:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hi:return t=e.displayName||null,t!==null?t:jo(e.type)||"Memo";case lt:t=e._payload,e=e._init;try{return jo(e(t))}catch{}}return null}function qf(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 jo(t);case 8:return t===ji?"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 St(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ha(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bf(e){var t=ha(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 _r(e){e._valueTracker||(e._valueTracker=bf(e))}function ga(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ha(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ol(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 $o(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $u(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=St(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 ma(e,t){t=t.checked,t!=null&&Ui(e,"checked",t,!1)}function Ho(e,t){ma(e,t);var n=St(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")?Vo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vo(e,t.type,St(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hu(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 Vo(e,t,n){(t!=="number"||ol(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mn=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Nr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fn={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},ed=["Webkit","ms","Moz","O"];Object.keys(Fn).forEach(function(e){ed.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fn[t]=Fn[e]})});function Sa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fn.hasOwnProperty(e)&&Fn[e]?(""+t).trim():t+"px"}function ka(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Sa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var td=V({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 Ko(e,t){if(t){if(td[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function Yo(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 Go=null;function Vi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xo=null,nn=null,rn=null;function Wu(e){if(e=mr(e)){if(typeof Xo!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Ol(t),Xo(e.stateNode,e.type,t))}}function Ea(e){nn?rn?rn.push(e):rn=[e]:nn=e}function Ca(){if(nn){var e=nn,t=rn;if(rn=nn=null,Wu(e),t)for(e=0;e>>=0,e===0?32:31-(dd(e)/pd|0)|0}var Pr=64,Tr=4194304;function Dn(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 al(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=Dn(u):(o&=i,o!==0&&(r=Dn(o)))}else i=n&~l,i!==0?r=Dn(i):o!==0&&(r=Dn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Be(t),e[t]=n}function vd(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=jn),es=String.fromCharCode(32),ts=!1;function Va(e,t){switch(e){case"keyup":return Wd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wt=!1;function Yd(e,t){switch(e){case"compositionend":return Qa(t);case"keypress":return t.which!==32?null:(ts=!0,es);case"textInput":return e=t.data,e===es&&ts?null:e;default:return null}}function Gd(e,t){if(Wt)return e==="compositionend"||!Zi&&Va(e,t)?(e=$a(),Xr=Gi=st=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=os(n)}}function Ga(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ga(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xa(){for(var e=window,t=ol();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ol(e.document)}return t}function qi(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 rp(e){var t=Xa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ga(n.ownerDocument.documentElement,n)){if(r!==null&&qi(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=is(n,o);var i=is(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,Kt=null,ti=null,Hn=null,ni=!1;function us(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||Kt==null||Kt!==ol(r)||(r=Kt,"selectionStart"in r&&qi(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}),Hn&&tr(Hn,r)||(Hn=r,r=dl(ti,"onSelect"),0Xt||(e.current=si[Xt],si[Xt]=null,Xt--)}function B(e,t){Xt++,si[Xt]=e.current,e.current=t}var kt={},ue=Ct(kt),me=Ct(!1),At=kt;function cn(e,t){var n=e.type.contextTypes;if(!n)return kt;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 ve(e){return e=e.childContextTypes,e!=null}function hl(){U(me),U(ue)}function hs(e,t,n){if(ue.current!==kt)throw Error(k(168));B(ue,t),B(me,n)}function lc(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(k(108,qf(e)||"Unknown",l));return V({},n,r)}function gl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kt,At=ue.current,B(ue,e),B(me,me.current),!0}function gs(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=lc(e,t,At),r.__reactInternalMemoizedMergedChildContext=e,U(me),U(ue),B(ue,e)):U(me),B(me,n)}var Ge=null,Bl=!1,So=!1;function oc(e){Ge===null?Ge=[e]:Ge.push(e)}function gp(e){Bl=!0,oc(e)}function xt(){if(!So&&Ge!==null){So=!0;var e=0,t=O;try{var n=Ge;for(O=1;e>=i,l-=i,Xe=1<<32-Be(t)+l|n<_?(D=C,C=null):D=C.sibling;var I=p(f,C,d[_],v);if(I===null){C===null&&(C=D);break}e&&C&&I.alternate===null&&t(f,C),c=o(I,c,_),E===null?S=I:E.sibling=I,E=I,C=D}if(_===d.length)return n(f,C),j&&Tt(f,_),S;if(C===null){for(;__?(D=C,C=null):D=C.sibling;var b=p(f,C,I.value,v);if(b===null){C===null&&(C=D);break}e&&C&&b.alternate===null&&t(f,C),c=o(b,c,_),E===null?S=b:E.sibling=b,E=b,C=D}if(I.done)return n(f,C),j&&Tt(f,_),S;if(C===null){for(;!I.done;_++,I=d.next())I=g(f,I.value,v),I!==null&&(c=o(I,c,_),E===null?S=I:E.sibling=I,E=I);return j&&Tt(f,_),S}for(C=r(f,C);!I.done;_++,I=d.next())I=m(C,f,_,I.value,v),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?_:I.key),c=o(I,c,_),E===null?S=I:E.sibling=I,E=I);return e&&C.forEach(function(Ke){return t(f,Ke)}),j&&Tt(f,_),S}function L(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===Qt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case xr:e:{for(var S=d.key,E=c;E!==null;){if(E.key===S){if(S=d.type,S===Qt){if(E.tag===7){n(f,E.sibling),c=l(E,d.props.children),c.return=f,f=c;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===lt&&Es(S)===E.type){n(f,E.sibling),c=l(E,d.props),c.ref=Ln(f,E,d),c.return=f,f=c;break e}n(f,E);break}else t(f,E);E=E.sibling}d.type===Qt?(c=Dt(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=rl(d.type,d.key,d.props,null,f.mode,v),v.ref=Ln(f,c,d),v.return=f,f=v)}return i(f);case Vt:e:{for(E=d.key;c!==null;){if(c.key===E)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=l(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=To(d,f.mode,v),c.return=f,f=c}return i(f);case lt:return E=d._init,L(f,c,E(d._payload),v)}if(Mn(d))return y(f,c,d,v);if(xn(d))return w(f,c,d,v);Ar(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,d),c.return=f,f=c):(n(f,c),c=Po(d,f.mode,v),c.return=f,f=c),i(f)):n(f,c)}return L}var dn=pc(!0),hc=pc(!1),vr={},Qe=Ct(vr),or=Ct(vr),ir=Ct(vr);function zt(e){if(e===vr)throw Error(k(174));return e}function uu(e,t){switch(B(ir,t),B(or,e),B(Qe,vr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wo(t,e)}U(Qe),B(Qe,t)}function pn(){U(Qe),U(or),U(ir)}function gc(e){zt(ir.current);var t=zt(Qe.current),n=Wo(t,e.type);t!==n&&(B(or,e),B(Qe,n))}function su(e){or.current===e&&(U(Qe),U(or))}var $=Ct(0);function kl(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)!==0)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 ko=[];function au(){for(var e=0;en?n:4,e(!0);var r=Eo.transition;Eo.transition={};try{e(!1),t()}finally{O=n,Eo.transition=r}}function Rc(){return ze().memoizedState}function wp(e,t,n){var r=vt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zc(e))Mc(t,n);else if(n=ac(e,t,n,r),n!==null){var l=fe();Fe(n,e,r,l),Dc(n,t,r)}}function Sp(e,t,n){var r=vt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zc(e))Mc(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,ou(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ac(e,t,l,r),n!==null&&(l=fe(),Fe(n,e,r,l),Dc(n,t,r))}}function zc(e){var t=e.alternate;return e===H||t!==null&&t===H}function Mc(e,t){Vn=El=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wi(e,n)}}var Cl={readContext:Re,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useInsertionEffect:le,useLayoutEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useMutableSource:le,useSyncExternalStore:le,useId:le,unstable_isNewReconciler:!1},kp={readContext:Re,useCallback:function(e,t){return $e().memoizedState=[e,t===void 0?null:t],e},useContext:Re,useEffect:xs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,br(4194308,4,Nc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return br(4194308,4,e,t)},useInsertionEffect:function(e,t){return br(4,2,e,t)},useMemo:function(e,t){var n=$e();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$e();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=wp.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=$e();return e={current:e},t.memoizedState=e},useState:Cs,useDebugValue:hu,useDeferredValue:function(e){return $e().memoizedState=e},useTransition:function(){var e=Cs(!1),t=e[0];return e=yp.bind(null,e[1]),$e().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=H,l=$e();if(j){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),q===null)throw Error(k(349));(Bt&30)!==0||yc(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,xs(Sc.bind(null,r,o,e),[e]),r.flags|=2048,ar(9,wc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$e(),t=q.identifierPrefix;if(j){var n=Je,r=Xe;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ur++,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[He]=t,e[lr]=r,Vc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Yo(n,r),n){case"dialog":F("cancel",e),F("close",e),l=r;break;case"iframe":case"object":case"embed":F("load",e),l=r;break;case"video":case"audio":for(l=0;lgn&&(t.flags|=128,r=!0,In(o,!1),t.lanes=4194304)}else{if(!r)if(e=kl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),In(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!j)return oe(t),null}else 2*K()-o.renderingStartTime>gn&&n!==1073741824&&(t.flags|=128,r=!0,In(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=K(),t.sibling=null,n=$.current,B($,r?n&1|2:n&1),t):(oe(t),null);case 22:case 23:return Su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(we&1073741824)!==0&&(oe(t),t.subtreeFlags&6&&(t.flags|=8192)):oe(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function Lp(e,t){switch(eu(t),t.tag){case 1:return ve(t.type)&&hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn(),U(me),U(ue),au(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return su(t),null;case 13:if(U($),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U($),null;case 4:return pn(),null;case 10:return lu(t.type._context),null;case 22:case 23:return Su(),null;case 24:return null;default:return null}}var Br=!1,ie=!1,Ip=typeof WeakSet=="function"?WeakSet:Set,N=null;function bt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Si(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Ms=!1;function Rp(e,t){if(ri=cl,e=Xa(),qi(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,a=0,h=0,g=e,p=null;t:for(;;){for(var m;g!==n||l!==0&&g.nodeType!==3||(u=i+l),g!==o||r!==0&&g.nodeType!==3||(s=i+r),g.nodeType===3&&(i+=g.nodeValue.length),(m=g.firstChild)!==null;)p=g,g=m;for(;;){if(g===e)break t;if(p===n&&++a===l&&(u=i),p===o&&++h===r&&(s=i),(m=g.nextSibling)!==null)break;g=p,p=g.parentNode}g=m}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(li={focusedElem:e,selectionRange:n},cl=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,L=y.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:De(t.type,w),L);f.__reactInternalSnapshotBeforeUpdate=c}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(k(163))}}catch(v){Q(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return y=Ms,Ms=!1,y}function Qn(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&&Si(t,n,o)}l=l.next}while(l!==r)}}function jl(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 ki(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 Kc(e){var t=e.alternate;t!==null&&(e.alternate=null,Kc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[He],delete t[lr],delete t[ui],delete t[pp],delete t[hp])),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 Yc(e){return e.tag===5||e.tag===3||e.tag===4}function Ds(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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 Ei(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=pl));else if(r!==4&&(e=e.child,e!==null))for(Ei(e,t,n),e=e.sibling;e!==null;)Ei(e,t,n),e=e.sibling}function Ci(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(Ci(e,t,n),e=e.sibling;e!==null;)Ci(e,t,n),e=e.sibling}var te=null,Ae=!1;function rt(e,t,n){for(n=n.child;n!==null;)Gc(e,t,n),n=n.sibling}function Gc(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(zl,n)}catch{}switch(n.tag){case 5:ie||bt(n,t);case 6:var r=te,l=Ae;te=null,rt(e,t,n),te=r,Ae=l,te!==null&&(Ae?(e=te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):te.removeChild(n.stateNode));break;case 18:te!==null&&(Ae?(e=te,n=n.stateNode,e.nodeType===8?wo(e.parentNode,n):e.nodeType===1&&wo(e,n),bn(e)):wo(te,n.stateNode));break;case 4:r=te,l=Ae,te=n.stateNode.containerInfo,Ae=!0,rt(e,t,n),te=r,Ae=l;break;case 0:case 11:case 14:case 15:if(!ie&&(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)!==0||(o&4)!==0)&&Si(n,t,i),l=l.next}while(l!==r)}rt(e,t,n);break;case 1:if(!ie&&(bt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Q(n,t,u)}rt(e,t,n);break;case 21:rt(e,t,n);break;case 22:n.mode&1?(ie=(r=ie)||n.memoizedState!==null,rt(e,t,n),ie=r):rt(e,t,n);break;default:rt(e,t,n)}}function As(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ip),t.forEach(function(r){var l=jp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Me(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Mp(r/1960))-r,10e?16:e,at===null)var r=!1;else{if(e=at,at=null,Nl=0,(A&6)!==0)throw Error(k(331));var l=A;for(A|=4,N=e.current;N!==null;){var o=N,i=o.child;if((N.flags&16)!==0){var u=o.deletions;if(u!==null){for(var s=0;sK()-yu?Mt(e,0):vu|=n),ye(e,t)}function nf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Tr,Tr<<=1,(Tr&130023424)===0&&(Tr=4194304)));var n=fe();e=et(e,t),e!==null&&(hr(e,t,n),ye(e,n))}function Up(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nf(e,n)}function jp(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(k(314))}r!==null&&r.delete(t),nf(e,n)}var rf;rf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||me.current)ge=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ge=!1,Pp(e,t,n);ge=(e.flags&131072)!==0}else ge=!1,j&&(t.flags&1048576)!==0&&ic(t,vl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;el(e,t),e=t.pendingProps;var l=cn(t,ue.current);on(t,n),l=fu(null,t,r,e,l,n);var o=du();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,ve(r)?(o=!0,gl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,iu(t),l.updater=Fl,t.stateNode=l,l._reactInternals=t,pi(t,r,e,n),t=mi(null,t,r,!0,o,n)):(t.tag=0,j&&o&&bi(t),ae(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(el(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Hp(r),e=De(r,e),l){case 0:t=gi(null,t,r,e,n);break e;case 1:t=Is(null,t,r,e,n);break e;case 11:t=Ts(null,t,r,e,n);break e;case 14:t=Ls(null,t,r,De(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),gi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Is(e,t,r,l,n);case 3:e:{if(jc(t),e===null)throw Error(k(387));r=t.pendingProps,o=t.memoizedState,l=o.element,cc(e,t),Sl(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=hn(Error(k(423)),t),t=Rs(e,t,r,n,l);break e}else if(r!==l){l=hn(Error(k(424)),t),t=Rs(e,t,r,n,l);break e}else for(Se=ht(t.stateNode.containerInfo.firstChild),ke=t,j=!0,Oe=null,n=hc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fn(),r===l){t=tt(e,t,n);break e}ae(e,t,r,n)}t=t.child}return t;case 5:return gc(t),e===null&&ci(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,oi(r,l)?i=null:o!==null&&oi(r,o)&&(t.flags|=32),Uc(e,t),ae(e,t,i,n),t.child;case 6:return e===null&&ci(t),null;case 13:return $c(e,t,n);case 4:return uu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dn(t,null,r,n):ae(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Ts(e,t,r,l,n);case 7:return ae(e,t,t.pendingProps,n),t.child;case 8:return ae(e,t,t.pendingProps.children,n),t.child;case 12:return ae(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,B(yl,r._currentValue),r._currentValue=i,o!==null)if(Ue(o.value,i)){if(o.children===l.children&&!me.current){t=tt(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=Ze(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var h=a.pending;h===null?s.next=s:(s.next=h.next,h.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),fi(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(k(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),fi(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}ae(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,on(t,n),l=Re(l),r=r(l),t.flags|=1,ae(e,t,r,n),t.child;case 14:return r=t.type,l=De(r,t.pendingProps),l=De(r.type,l),Ls(e,t,r,l,n);case 15:return Bc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),el(e,t),t.tag=1,ve(r)?(e=!0,gl(t)):e=!1,on(t,n),dc(t,r,l),pi(t,r,l,n),mi(null,t,r,!0,e,n);case 19:return Hc(e,t,n);case 22:return Fc(e,t,n)}throw Error(k(156,t.tag))};function lf(e,t){return Ia(e,t)}function $p(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 $p(e,t,n,r)}function Eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hp(e){if(typeof e=="function")return Eu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$i)return 11;if(e===Hi)return 14}return 2}function yt(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 rl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Eu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Qt:return Dt(n.children,l,o,t);case ji:i=8,l|=8;break;case Bo:return e=Te(12,n,t,l|2),e.elementType=Bo,e.lanes=o,e;case Fo:return e=Te(13,n,t,l),e.elementType=Fo,e.lanes=o,e;case Uo:return e=Te(19,n,t,l),e.elementType=Uo,e.lanes=o,e;case pa:return Hl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fa:i=10;break e;case da:i=9;break e;case $i:i=11;break e;case Hi:i=14;break e;case lt:i=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Te(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Dt(e,t,n,r){return e=Te(7,e,r,t),e.lanes=n,e}function Hl(e,t,n,r){return e=Te(22,e,r,t),e.elementType=pa,e.lanes=n,e.stateNode={isHidden:!1},e}function Po(e,t,n){return e=Te(6,e,null,t),e.lanes=n,e}function To(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 Vp(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=uo(0),this.expirationTimes=uo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Cu(e,t,n,r,l,o,i,u,s){return e=new Vp(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},iu(o),e}function Qp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ce})(bs);const Xp=qs(bs.exports);let ce=null,jr=0;const Jp="wss://dev.valnet.xyz";let Ll=[];const ll=async()=>{try{jr++,console.log("attempting api connection..."),ce=new WebSocket(Jp)}catch{if(jr===1)ll();else{const t=2**jr;console.log(`waiting ${t} seconds before reconnecting`),setTimeout(ll,1e3*t)}return}ce.addEventListener("open",()=>{ce!==null&&(jr=0)}),ce.addEventListener("message",e=>{const{action:t,data:n}=JSON.parse(e.data);console.log("[IN]",t,n);const r=Ll.map(l=>l(t,n)).reduce((l,o)=>l+o,0);r===0?console.warn(`route <${t}> not found`):console.log(`routed to ${r} elements`)}),ce.addEventListener("close",()=>{ce=null,ll()})};ll();async function Zp(e,t){if(ce===null)return;if(ce&&ce.readyState===ce.CONNECTING){try{await new Promise((r,l)=>{ce?.addEventListener("open",r),ce?.addEventListener("close",l)})}catch{return}if(ce.readyState!==ce.OPEN)return}const n=JSON.stringify({action:e,data:t});ce.send(n)}function qp(e){return function(t,n){return t in e?(e[t](n),!0):!1}}function bp(e){Ll.push(e)}function e0(e){Ll=Ll.filter(t=>t!==e)}function Yl(e,t){const n=typeof e=="object"?qp(e):e;return x.exports.useEffect(()=>(bp(n),()=>{e0(n)}),t),{send:Zp}}var Pu={exports:{}},Gl={};/** * @license React * react-jsx-runtime.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 t0=x.exports,n0=Symbol.for("react.element"),r0=Symbol.for("react.fragment"),l0=Object.prototype.hasOwnProperty,o0=t0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i0={key:!0,ref:!0,__self:!0,__source:!0};function af(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)l0.call(t,r)&&!i0.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:n0,type:e,key:o,ref:i,props:l,_owner:o0.current}}Gl.Fragment=r0;Gl.jsx=af;Gl.jsxs=af;(function(e){e.exports=Gl})(Pu);const T=Pu.exports.jsx,Ie=Pu.exports.jsxs;function u0(){const{clientId:e}=x.exports.useContext(Cn),[t,n]=x.exports.useState(null),[r,l]=x.exports.useState(null),{send:o}=Yl({"client:get"(u){n(u)}},[t,e]),i=x.exports.useCallback(()=>{r!==null&&e!==null&&(o("client:rename",{clientId:e,name:r.value}),n(r.value))},[e,t]);return x.exports.useEffect(()=>{e!==null&&r!==null&&o("client:get",e)},[r,e]),T("input",{ref:l,value:t??"",onChange:i})}var yr={},s0=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},cf={},_e={};let Tu;const a0=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};_e.getSymbolTotalCodewords=function(t){return a0[t]};_e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};_e.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Tu=t};_e.isKanjiModeEnabled=function(){return typeof Tu<"u"};_e.toSJIS=function(t){return Tu(t)};var Xl={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,l){if(e.isValid(r))return r;try{return t(r)}catch{return l}}})(Xl);function ff(){this.buffer=[],this.length=0}ff.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var c0=ff;function wr(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}wr.prototype.set=function(e,t,n,r){const l=e*this.size+t;this.data[l]=n,r&&(this.reservedBit[l]=!0)};wr.prototype.get=function(e,t){return this.data[e*this.size+t]};wr.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};wr.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var f0=wr,df={};(function(e){const t=_e.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const l=Math.floor(r/7)+2,o=t(r),i=o===145?26:Math.ceil((o-13)/(2*l-2))*2,u=[o-7];for(let s=1;s=0&&l<=7},e.from=function(l){return e.isValid(l)?parseInt(l,10):void 0},e.getPenaltyN1=function(l){const o=l.size;let i=0,u=0,s=0,a=null,h=null;for(let g=0;g=5&&(i+=t.N1+(u-5)),a=m,u=1),m=l.get(p,g),m===h?s++:(s>=5&&(i+=t.N1+(s-5)),h=m,s=1)}u>=5&&(i+=t.N1+(u-5)),s>=5&&(i+=t.N1+(s-5))}return i},e.getPenaltyN2=function(l){const o=l.size;let i=0;for(let u=0;u=10&&(u===1488||u===93)&&i++,s=s<<1&2047|l.get(h,a),h>=10&&(s===1488||s===93)&&i++}return i*t.N3},e.getPenaltyN4=function(l){let o=0;const i=l.data.length;for(let s=0;s=0;){const i=o[0];for(let s=0;s0){const o=new Uint8Array(this.degree);return o.set(r,l),o}return r};var p0=Lu,vf={},_t={},Iu={};Iu.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var We={};const yf="[0-9]+",h0="[A-Z $%*+\\-./:]+";let fr="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";fr=fr.replace(/u/g,"\\u");const g0="(?:(?![A-Z0-9 $%*+\\-./:]|"+fr+`)(?:.|[\r ]))+`;We.KANJI=new RegExp(fr,"g");We.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");We.BYTE=new RegExp(g0,"g");We.NUMERIC=new RegExp(yf,"g");We.ALPHANUMERIC=new RegExp(h0,"g");const m0=new RegExp("^"+fr+"$"),v0=new RegExp("^"+yf+"$"),y0=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");We.testKanji=function(t){return m0.test(t)};We.testNumeric=function(t){return v0.test(t)};We.testAlphanumeric=function(t){return y0.test(t)};(function(e){const t=Iu,n=We;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(l){if(typeof l!="string")throw new Error("Param is not a string");switch(l.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+l)}}e.from=function(o,i){if(e.isValid(o))return o;try{return r(o)}catch{return i}}})(_t);(function(e){const t=_e,n=Jl,r=Xl,l=_t,o=Iu,i=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,u=t.getBCHDigit(i);function s(p,m,y){for(let w=1;w<=40;w++)if(m<=e.getCapacity(w,y,p))return w}function a(p,m){return l.getCharCountIndicator(p,m)+4}function h(p,m){let y=0;return p.forEach(function(w){y+=a(w.mode,m)+w.getBitsLength()}),y}function g(p,m){for(let y=1;y<=40;y++)if(h(p,y)<=e.getCapacity(y,m,l.MIXED))return y}e.from=function(m,y){return o.isValid(m)?parseInt(m,10):y},e.getCapacity=function(m,y,w){if(!o.isValid(m))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=l.BYTE);const L=t.getSymbolTotalCodewords(m),f=n.getTotalCodewordsCount(m,y),c=(L-f)*8;if(w===l.MIXED)return c;const d=c-a(w,m);switch(w){case l.NUMERIC:return Math.floor(d/10*3);case l.ALPHANUMERIC:return Math.floor(d/11*2);case l.KANJI:return Math.floor(d/13);case l.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(m,y){let w;const L=r.from(y,r.M);if(Array.isArray(m)){if(m.length>1)return g(m,L);if(m.length===0)return 1;w=m[0]}else w=m;return s(w.mode,w.getLength(),L)},e.getEncodedBits=function(m){if(!o.isValid(m)||m<7)throw new Error("Invalid QR Code version");let y=m<<12;for(;t.getBCHDigit(y)-u>=0;)y^=i<=0;)l^=Sf<0&&(r=this.data.substr(n),l=parseInt(r,10),t.put(l,o*3+1))};var k0=mn;const E0=_t,Lo=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function vn(e){this.mode=E0.ALPHANUMERIC,this.data=e}vn.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};vn.prototype.getLength=function(){return this.data.length};vn.prototype.getBitsLength=function(){return vn.getBitsLength(this.data.length)};vn.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=Lo.indexOf(this.data[n])*45;r+=Lo.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(Lo.indexOf(this.data[n]),6)};var C0=vn,x0=function(t){for(var n=[],r=t.length,l=0;l=55296&&o<=56319&&r>l+1){var i=t.charCodeAt(l+1);i>=56320&&i<=57343&&(o=(o-55296)*1024+i-56320+65536,l+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const _0=x0,N0=_t;function yn(e){this.mode=N0.BYTE,typeof e=="string"&&(e=_0(e)),this.data=new Uint8Array(e)}yn.getBitsLength=function(t){return t*8};yn.prototype.getLength=function(){return this.data.length};yn.prototype.getBitsLength=function(){return yn.getBitsLength(this.data.length)};yn.prototype.write=function(e){for(let t=0,n=this.data.length;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var I0=wn,Ef={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,r,l){var o={},i={};i[r]=0;var u=t.PriorityQueue.make();u.push(r,0);for(var s,a,h,g,p,m,y,w,L;!u.empty();){s=u.pop(),a=s.value,g=s.cost,p=n[a]||{};for(h in p)p.hasOwnProperty(h)&&(m=p[h],y=g+m,w=i[h],L=typeof i[h]>"u",(L||w>y)&&(i[h]=y,u.push(h,y),o[h]=a))}if(typeof l<"u"&&typeof i[l]>"u"){var f=["Could not find a path from ",r," to ",l,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var l=[],o=r;o;)l.push(o),n[o],o=n[o];return l.reverse(),l},find_path:function(n,r,l){var o=t.single_source_shortest_paths(n,r,l);return t.extract_shortest_path_from_predecessor_list(o,l)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,l={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(l[o]=r[o]);return l.queue=[],l.sorter=n.sorter||r.default_sorter,l},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var l={value:n,cost:r};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ef);(function(e){const t=_t,n=k0,r=C0,l=P0,o=I0,i=We,u=_e,s=Ef.exports;function a(f){return unescape(encodeURIComponent(f)).length}function h(f,c,d){const v=[];let S;for(;(S=f.exec(d))!==null;)v.push({data:S[0],index:S.index,mode:c,length:S[0].length});return v}function g(f){const c=h(i.NUMERIC,t.NUMERIC,f),d=h(i.ALPHANUMERIC,t.ALPHANUMERIC,f);let v,S;return u.isKanjiModeEnabled()?(v=h(i.BYTE,t.BYTE,f),S=h(i.KANJI,t.KANJI,f)):(v=h(i.BYTE_KANJI,t.BYTE,f),S=[]),c.concat(d,v,S).sort(function(C,_){return C.index-_.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function p(f,c){switch(c){case t.NUMERIC:return n.getBitsLength(f);case t.ALPHANUMERIC:return r.getBitsLength(f);case t.KANJI:return o.getBitsLength(f);case t.BYTE:return l.getBitsLength(f)}}function m(f){return f.reduce(function(c,d){const v=c.length-1>=0?c[c.length-1]:null;return v&&v.mode===d.mode?(c[c.length-1].data+=d.data,c):(c.push(d),c)},[])}function y(f){const c=[];for(let d=0;d=0&&u<=6&&(s===0||s===6)||s>=0&&s<=6&&(u===0||u===6)||u>=2&&u<=4&&s>=2&&s<=4?e.set(o+u,i+s,!0,!0):e.set(o+u,i+s,!1,!0))}}function U0(e){const t=e.size;for(let n=8;n>u&1)===1,e.set(l,o,i,!0),e.set(o,l,i,!0)}function zo(e,t,n){const r=e.size,l=O0.getEncodedBits(t,n);let o,i;for(o=0;o<15;o++)i=(l>>o&1)===1,o<6?e.set(o,8,i,!0):o<8?e.set(o+1,8,i,!0):e.set(r-15+o,8,i,!0),o<8?e.set(8,r-o-1,i,!0):o<9?e.set(8,15-o-1+1,i,!0):e.set(8,15-o-1,i,!0);e.set(r-8,8,1,!0)}function H0(e,t){const n=e.size;let r=-1,l=n-1,o=7,i=0;for(let u=n-1;u>0;u-=2)for(u===6&&u--;;){for(let s=0;s<2;s++)if(!e.isReserved(l,u-s)){let a=!1;i>>o&1)===1),e.set(l,u-s,a),o--,o===-1&&(i++,o=7)}if(l+=r,l<0||n<=l){l-=r,r=-r;break}}}function V0(e,t,n){const r=new R0;n.forEach(function(s){r.put(s.mode.bit,4),r.put(s.getLength(),B0.getCharCountIndicator(s.mode,e)),s.write(r)});const l=ql.getSymbolTotalCodewords(e),o=Ii.getTotalCodewordsCount(e,t),i=(l-o)*8;for(r.getLengthInBits()+4<=i&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const u=(i-r.getLengthInBits())/8;for(let s=0;s=7&&$0(s,t),H0(s,i),isNaN(r)&&(r=Li.getBestMask(s,zo.bind(null,s,n))),Li.applyMask(r,s),zo(s,n,r),{modules:s,version:t,errorCorrectionLevel:n,maskPattern:r,segments:l}}cf.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let r=Io.M,l,o;return typeof n<"u"&&(r=Io.from(n.errorCorrectionLevel,Io.M),l=Rl.from(n.version),o=Li.from(n.maskPattern),n.toSJISFunc&&ql.setToSJISFunction(n.toSJISFunc)),W0(t,l,r,o)};var Cf={},Ru={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const l=parseInt(r.join(""),16);return{r:l>>24&255,g:l>>16&255,b:l>>8&255,a:l&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const l=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:o,scale:o?4:i,margin:l,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,l){return l.width&&l.width>=r+l.margin*2?l.width/(r+l.margin*2):l.scale},e.getImageWidth=function(r,l){const o=e.getScale(r,l);return Math.floor((r+l.margin*2)*o)},e.qrToImageData=function(r,l,o){const i=l.modules.size,u=l.modules.data,s=e.getScale(i,o),a=Math.floor((i+o.margin*2)*s),h=o.margin*s,g=[o.color.light,o.color.dark];for(let p=0;p=h&&m>=h&&p"u"&&(!i||!i.getContext)&&(s=i,i=void 0),i||(a=r()),s=t.getOptions(s);const h=t.getImageWidth(o.modules.size,s),g=a.getContext("2d"),p=g.createImageData(h,h);return t.qrToImageData(p.data,o,s),n(g,a,h),g.putImageData(p,0,0),a},e.renderToDataURL=function(o,i,u){let s=u;typeof s>"u"&&(!i||!i.getContext)&&(s=i,i=void 0),s||(s={});const a=e.render(o,i,s),h=s.type||"image/png",g=s.rendererOpts||{};return a.toDataURL(h,g.quality)}})(Cf);var xf={};const K0=Ru;function Ws(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function Mo(e,t,n){let r=e+t;return typeof n<"u"&&(r+=" "+n),r}function Y0(e,t,n){let r="",l=0,o=!1,i=0;for(let u=0;u0&&s>0&&e[u-1]||(r+=o?Mo("M",s+n,.5+a+n):Mo("m",l,0),l=0,o=!1),s+1':"",a="',h='viewBox="0 0 '+u+" "+u+'"',g=l.width?'width="'+l.width+'" height="'+l.width+'" ':"",p=''+s+a+` `;return typeof r=="function"&&r(null,p),p};const G0=s0,Ri=cf,_f=Cf,X0=xf;function zu(e,t,n,r,l){const o=[].slice.call(arguments,1),i=o.length,u=typeof o[i-1]=="function";if(!u&&!G0())throw new Error("Callback required as last argument");if(u){if(i<2)throw new Error("Too few arguments provided");i===2?(l=n,n=t,t=r=void 0):i===3&&(t.getContext&&typeof l>"u"?(l=r,r=void 0):(l=r,r=n,n=t,t=void 0))}else{if(i<1)throw new Error("Too few arguments provided");return i===1?(n=t,t=r=void 0):i===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(s,a){try{const h=Ri.create(n,r);s(e(h,t,r))}catch(h){a(h)}})}try{const s=Ri.create(n,r);l(null,e(s,t,r))}catch(s){l(s)}}yr.create=Ri.create;yr.toCanvas=zu.bind(null,_f.render);yr.toDataURL=zu.bind(null,_f.renderToDataURL);yr.toString=zu.bind(null,function(e,t,n){return X0.render(e,n)});function J0(){const{homeServer:e}=x.exports.useContext(dr),{clientId:t}=x.exports.useContext(Cn),[n,r]=x.exports.useState(null);return x.exports.useEffect(()=>{(async()=>r(await yr.toDataURL("loginv1|"+e+"|"+t)))()},[t,e]),T("img",{src:n??void 0})}function Ks(){return T("span",{style:{fontWeight:"bold",marginRight:"8px",marginLeft:"8px"},children:"#"})}function Z0(){const[e,t]=x.exports.useState([]),[n,r]=x.exports.useState({}),{channel:l,setChannel:o}=x.exports.useContext(Mu),{clientId:i}=x.exports.useContext(Cn),{setHomeServer:u}=x.exports.useContext(dr),{send:s}=Yl({"channels:list"(g){t(g)},"channel:add"(g){t([...e,g])},"message:message"(g){l!==g.channel&&r({...n,[g.channel]:(n[g.channel]??0)+1})}},[e,n]);x.exports.useEffect(()=>{console.log("unreads",n)},[n]),x.exports.useEffect(()=>{e.length===0&&s("channels:list")},[e]),x.exports.useEffect(()=>{console.log(l,e),e.length!==0&&l===null&&(console.log("this is what setChannel is",o),o(e[0].uid))},[l,e]),x.exports.useEffect(()=>{!l||r({...n,[l]:0})},[l]),x.exports.useEffect(()=>{i!==null&&s("client:get",i)},[i]);const a=x.exports.useRef(null),h=x.exports.useCallback(()=>{if(a.current===null)return;const g=a.current.value;a.current.value="",s("channel:add",{name:g})},[]);return Ie("div",{style:{height:"100%",background:"#21222c"},children:[T("br",{}),e.map(g=>Ie("div",{style:{margin:"8px 0px",color:l===g.uid?"cyan":"inherit",cursor:"pointer"},onClick:()=>{o(g.uid)},children:[T(Ks,{}),g.uid in n&&n[g.uid]>0&&Ie("span",{style:{paddingRight:"8px"},children:["(",n[g.uid],")"]}),T("span",{style:{fontWeight:(n[g.uid]??0)>0?"bold":"300"},children:g.name}),T("a",{style:{color:"rgba(0, 100, 200, 1)",marginLeft:"8px",fontSize:"10px"},href:"#",onClick:()=>{},children:"Delete"})]},g.uid)),T(Ks,{}),T("input",{ref:a,style:{background:"#343746",border:"none",padding:"8px",borderRadius:"8px",outline:"none",color:"white",fontSize:"16px",width:"90px"}}),T("button",{onClick:h,style:{marginLeft:"8px",background:"#bd93f9",border:"none",color:"white",padding:"8px",fontSize:"16px",cursor:"pointer",borderRadius:"8px"},children:"ADD"}),T(u0,{}),T("br",{}),T("button",{onClick:()=>u(null),children:"leave"}),T("br",{}),T(J0,{})]})}var Vr,q0=new Uint8Array(16);function b0(){if(!Vr&&(Vr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Vr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vr(q0)}const eh=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function th(e){return typeof e=="string"&&eh.test(e)}var ee=[];for(var Do=0;Do<256;++Do)ee.push((Do+256).toString(16).substr(1));function nh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ee[e[t+0]]+ee[e[t+1]]+ee[e[t+2]]+ee[e[t+3]]+"-"+ee[e[t+4]]+ee[e[t+5]]+"-"+ee[e[t+6]]+ee[e[t+7]]+"-"+ee[e[t+8]]+ee[e[t+9]]+"-"+ee[e[t+10]]+ee[e[t+11]]+ee[e[t+12]]+ee[e[t+13]]+ee[e[t+14]]+ee[e[t+15]]).toLowerCase();if(!th(n))throw TypeError("Stringified UUID is invalid");return n}function rh(e,t,n){e=e||{};var r=e.random||(e.rng||b0)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var l=0;l<16;++l)t[n+l]=r[l];return t}return nh(r)}function Qr(e){const t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;const n=String(e).match(/\d+/g);if(n==null||n.length<=2)return t;{const[r,l,...o]=n.map(s=>parseInt(s)),i=[r,l-1,...o];return new Date(Date.UTC(...i))}}function Ys(e,t,n){const r=e!==1?t+"s":t;return e+" "+r+" "+n}const On=60,Bn=On*60,sn=Bn*24,Wr=sn*7,Gs=sn*30,Xs=sn*365;function lh({date:e,formatter:t=Ys,component:n="time",live:r=!0,minPeriod:l=0,maxPeriod:o=Wr,title:i,now:u=()=>Date.now(),...s}){const[a,h]=x.exports.useState(u());x.exports.useEffect(()=>{if(!r)return;const S=(()=>{const E=Qr(e).valueOf();if(!E)return console.warn("[react-timeago] Invalid Date provided"),0;const C=Math.round(Math.abs(a-E)/1e3),_=C{h(u())},D):0})();return()=>{S&&clearTimeout(S)}},[e,r,o,l,u,a]);const g=n,p=Qr(e).valueOf();if(!p)return null;const m=Math.round(Math.abs(a-p)/1e3),y=p"u"?typeof e=="string"?e:Qr(e).toISOString().substr(0,16).replace("T"," "):i,c=g==="time"?{...s,dateTime:Qr(e).toISOString()}:s,d=Ys.bind(null,w,L,y);return T(g,{...c,title:f,children:t(w,L,y,p,d,u)})}const oh="10px",ih="16px",uh="16px";function sh({message:e}){return Ie("div",{style:{display:"grid",gridTemplateColumns:"4em 1fr",width:"100%",padding:"1px 0px"},children:[T("span",{style:{fontStyle:"italic",color:"#596793",textAlign:"right",userSelect:"none",marginRight:"16px"},children:T(lh,{date:e.timestamp,formatter:(t,n)=>n==="second"?"Now":""+t+n[0]})}),Ie("span",{style:{},children:[T("div",{style:{fontWeight:"bold",float:"left",paddingRight:oh},children:e.from}),T("div",{style:{marginRight:uh,paddingLeft:ih,boxSizing:"border-box",position:"relative"},children:e.text})]})]})}var Nf={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Js=Ao.createContext&&Ao.createContext(Nf),wt=globalThis&&globalThis.__assign||function(){return wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const[e,t]=x.exports.useState([]);x.exports.useState(!1);const n=64,r=8,l=x.exports.useRef(null),{channel:o,setChannel:i}=x.exports.useContext(Mu),{clientId:u}=x.exports.useContext(Cn),{send:s}=Yl({"message:message"(g){g.channel===o&&t([...e,g])},"message:recent"(g){t(g.messages.reverse())}},[e]);x.exports.useEffect(()=>{console.log("sending recents request"),s("message:recent",{channel:o})},[o]);const a=x.exports.useCallback(()=>{l.current!==null&&o!==null&&u!==null&&(s("message:message",ph(u,l.current.innerText,o)),l.current.innerText="")},[o]),h=x.exports.useCallback(g=>{g.key==="Enter"&&a()},[a]);return Ie("div",{style:{height:"100%",width:"100%",display:"grid",gridTemplateColumns:`1fr ${n}px`,gridTemplateRows:`1fr ${n}px`,gridTemplateAreas:'"content content" "message send"'},children:[T("div",{style:{gridArea:"content",position:"relative"},children:T("div",{style:{position:"absolute",bottom:"0px",width:"100%"},children:e.map(g=>T(sh,{message:g},g.uid))})}),T("div",{onClick:()=>{l.current?.focus()},style:{margin:r+"px",marginRight:"0px",borderRadius:(n-r*2)/2+"px",background:"#343746",gridArea:"message",display:"grid",placeItems:"center center",padding:"0px 16px",cursor:"text",overflow:"auto"},children:T("div",{ref:l,onKeyDown:h,className:"input",role:"textbox",contentEditable:!0,style:{background:"inherit",outline:"none",boxSizing:"border-box",width:"100%",resize:"none"}})}),T("div",{style:{width:"100%",height:"100%",padding:"8px",boxSizing:"border-box"},children:T("div",{onClick:a,style:{background:"#bd93f9",width:"100%",height:"100%",borderRadius:"50%",cursor:"pointer",display:"grid",placeItems:"center center",fontSize:"32px"},children:T(dh,{})})})]})},Tf=globalThis.__electron_preload__getClientId,gh=globalThis.__electron_preload__setClientId,mh=globalThis.__electron_preload__getHomeServer,vh=globalThis.__electron_preload__setHomeServer,yh=globalThis.__electron_preload__versions,zi=Object.freeze(Object.defineProperty({__proto__:null,getClientId:Tf,setClientId:gh,getHomeServer:mh,setHomeServer:vh,versions:yh},Symbol.toStringTag,{value:"Module"}));console.log("#preload",zi);const Sr=function(){const e=!!Tf;if(console.log(zi),e)return zi;{let t=null,n=null;return{getClientId(){return t},setClientId(r){t=r},getHomeServer(){return n},setHomeServer(r){n=r}}}}();console.log("native functions loaded",Sr);const wh=Sr.getClientId,Sh=Sr.setClientId,Zs=Sr.getHomeServer,kh=Sr.setHomeServer;function Eh(e){const t=o=>typeof window<"u"?window.matchMedia(o).matches:!1,[n,r]=x.exports.useState(t(e));function l(){r(t(e))}return x.exports.useEffect(()=>{const o=window.matchMedia(e);return l(),o.addListener?o.addListener(l):o.addEventListener("change",l),()=>{o.removeListener?o.removeListener(l):o.removeEventListener("change",l)}},[e]),n}function Ch(e){const t=Eh("(min-width:"+e.threshold+"px)"),[n,r]=x.exports.useState(null),[l,o]=x.exports.useState(0),[i,u]=x.exports.useState(0),[s,a]=x.exports.useState(!1),[h,g]=x.exports.useState(!1),p=h?Math.min(i-l,0):Math.max(i-l,0),m=x.exports.useCallback(L=>{a(!0),o(L.touches[0].clientX),u(L.touches[0].clientX)},[s,l,i]),y=x.exports.useCallback(()=>{a(!1),p>0?g(!0):p<0&&g(!1)},[s,i,l,h]),w=x.exports.useCallback(L=>{u(L.touches[0].clientX)},[s,i]);return x.exports.useEffect(()=>{if(n!==null)return n.addEventListener("touchstart",m),n.addEventListener("touchend",y),n.addEventListener("touchmove",w),()=>{n.removeEventListener("touchstart",m),n.removeEventListener("touchend",y),n.removeEventListener("touchmove",w)}},[n,y,m]),Ie("div",{ref:r,style:{width:"100%",height:"100%",position:"relative",userSelect:"none"},children:[T("div",{style:{width:t?e.sidebar+"px":"100%",height:"100%",display:"inline-block",position:"absolute",top:"0px",left:t?"0px":s?`calc(${p}px ${h?"":"- 100%"})`:h?"0px":"-100%",zIndex:"1",transition:s?"none":"left 300ms linear, width 300ms linear"},children:e.children[0]}),T("div",{style:{width:t?"calc(100% - "+e.sidebar+"px)":"100%",height:"100%",display:"inline-block",position:"absolute",top:"0px",left:t?e.sidebar+"px":"0px",zIndex:"0",transition:"left 300ms linear, width 300ms linear"},children:e.children[1]})]})}function xh(){const[e,t]=x.exports.useState(""),[n,r]=x.exports.useState(!1),l=x.exports.useRef(null),{setHomeServer:o}=x.exports.useContext(dr),{setClientId:i}=x.exports.useContext(Cn),u=x.exports.useContext(Lf);x.exports.useEffect(()=>{u(n)},[n,u]);const s=x.exports.useCallback(()=>{l.current!==null&&o(l.current.value)},[dr]),a=x.exports.useCallback(()=>{window.QRScanner.prepare((h,g)=>{!h&&g.authorized&&(r(!0),window.QRScanner.hide(),window.QRScanner.scan((p,m)=>{if(p)return alert(p);t(m),r(!1),window.QRScanner.show()}))})},[e]);return x.exports.useEffect(()=>{if(n||!e)return;const[h,g,p]=e.split("|");switch(h){case"loginv1":{o(g),i(p);break}}},[e,n]),Ie("div",{style:{display:"grid",placeContent:"center center",height:"100%"},children:["Create New Account!! ",T("br",{}),"Enter Home Server URL ",T("br",{}),T("input",{defaultValue:"wss://dev.valnet.xyz",ref:l})," ",T("br",{}),T("button",{onClick:s,children:" GO "})," ",T("br",{}),T("br",{}),"or scan a QR! ",T("br",{}),T("button",{onClick:a,children:"SCAN"}),T("br",{}),Ie("pre",{children:[e,n?"SCANNING":"NOT SCANNING"]})]})}const Mu=x.exports.createContext({channel:null,setChannel:()=>{}}),Cn=x.exports.createContext({clientId:null,setClientId:()=>{}}),dr=x.exports.createContext({homeServer:null,setHomeServer:()=>{}}),Lf=x.exports.createContext(()=>{});function _h(){const[e,t]=x.exports.useState(null),[n,r]=x.exports.useState(wh()),[l,o]=x.exports.useState(Zs()),i={channel:e,setChannel:t},[u,s]=x.exports.useState(!1),a=x.exports.useCallback(m=>{console.log("SETTING HOME SERVER",m),kh(m),o(Zs())},[l]),h=x.exports.useMemo(()=>({homeServer:l,setHomeServer:a}),[l,a]);x.exports.useEffect(()=>{n!==null&&Sh(n)},[n]);const{send:g}=Yl({"client:new"(m){r(m)}},[r]);x.exports.useEffect(()=>{n===null&&g("client:new")},[n]);const p={clientId:n,setClientId:r};return T(Cn.Provider,{value:p,children:T(Mu.Provider,{value:i,children:T(dr.Provider,{value:h,children:Ie(Lf.Provider,{value:s,children:[T("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),T("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""}),T("link",{href:"https://fonts.googleapis.com/css2?family=Fira+Sans&family=Josefin+Sans&family=Lato&family=Radio+Canada&family=Readex+Pro&family=Red+Hat+Text&family=Rubik&family=Signika&family=Telex&display=swap",rel:"stylesheet"}),T("div",{style:{background:u?"rgba(0, 0, 0, 0)":"#282a36",color:u?"black":"#f8f8f2",fontSize:"16px",fontFamily:"'Red Hat Text', sans-serif",width:"100%",height:"100%"},children:l===null&&T(xh,{})||Ie(Ch,{threshold:800,sidebar:300,children:[T(Z0,{}),T(hh,{})]})})]})})})})}Xp.render(T(_h,{}),document.getElementById("app")); //# sourceMappingURL=index.743265c4.js.map