diff --git a/crates/librqbit/webui/dist/app.js b/crates/librqbit/webui/dist/app.js index a76dbe1..bf90c29 100644 --- a/crates/librqbit/webui/dist/app.js +++ b/crates/librqbit/webui/dist/app.js @@ -1,4 +1,4 @@ -(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 Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var da={exports:{}},Wl={},pa={exports:{}},F={};/** +(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 Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ma={exports:{}},Hl={},ha={exports:{}},F={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var jr=Symbol.for("react.element"),Md=Symbol.for("react.portal"),zd=Symbol.for("react.fragment"),Dd=Symbol.for("react.strict_mode"),$d=Symbol.for("react.profiler"),Id=Symbol.for("react.provider"),Ad=Symbol.for("react.context"),Bd=Symbol.for("react.forward_ref"),Ud=Symbol.for("react.suspense"),Wd=Symbol.for("react.memo"),Hd=Symbol.for("react.lazy"),Qu=Symbol.iterator;function Vd(e){return e===null||typeof e!="object"?null:(e=Qu&&e[Qu]||e["@@iterator"],typeof e=="function"?e:null)}var ma={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ha=Object.assign,va={};function Mn(e,t,n){this.props=e,this.context=t,this.refs=va,this.updater=n||ma}Mn.prototype.isReactComponent={};Mn.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")};Mn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ya(){}ya.prototype=Mn.prototype;function Hi(e,t,n){this.props=e,this.context=t,this.refs=va,this.updater=n||ma}var Vi=Hi.prototype=new ya;Vi.constructor=Hi;ha(Vi,Mn.prototype);Vi.isPureReactComponent=!0;var Ku=Array.isArray,ga=Object.prototype.hasOwnProperty,Qi={current:null},wa={key:!0,ref:!0,__self:!0,__source:!0};function Sa(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)ga.call(t,r)&&!wa.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,A=x[$];if(0>>1;$l(qe,O))jel(dt,qe)?(x[$]=dt,x[je]=O,$=je):(x[$]=qe,x[Re]=O,$=Re);else if(jel(dt,O))x[$]=dt,x[je]=O,$=je;else break e}}return L}function l(x,L){var O=x.sortIndex-L.sortIndex;return O!==0?O:x.id-L.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=[],m=1,h=null,d=3,g=!1,S=!1,k=!1,j=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 p(x){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=x)r(a),L.sortIndex=L.expirationTime,t(s,L);else break;L=n(a)}}function w(x){if(k=!1,p(x),!S)if(n(s)!==null)S=!0,Te(C);else{var L=n(a);L!==null&&Ke(w,L.startTime-x)}}function C(x,L){S=!1,k&&(k=!1,f(R),R=-1),g=!0;var O=d;try{for(p(L),h=n(s);h!==null&&(!(h.expirationTime>L)||x&&!ie());){var $=h.callback;if(typeof $=="function"){h.callback=null,d=h.priorityLevel;var A=$(h.expirationTime<=L);L=e.unstable_now(),typeof A=="function"?h.callback=A:h===n(s)&&r(s),p(L)}else r(s);h=n(s)}if(h!==null)var fe=!0;else{var Re=n(a);Re!==null&&Ke(w,Re.startTime-L),fe=!1}return fe}finally{h=null,d=O,g=!1}}var _=!1,N=null,R=-1,B=5,P=-1;function ie(){return!(e.unstable_now()-Px||125$?(x.sortIndex=O,t(a,x),n(s)===null&&x===n(a)&&(k?(f(R),R=-1):k=!0,Ke(w,O-$))):(x.sortIndex=A,t(s,x),S||g||(S=!0,Te(C))),x},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(x){var L=d;return function(){var O=d;d=L;try{return x.apply(this,arguments)}finally{d=O}}}})(Ca);xa.exports=Ca;var tp=xa.exports;/** + */(function(e){function t(x,L){var O=x.length;x.push(L);e:for(;0>>1,B=x[D];if(0>>1;Dl(qe,O))jel(dt,qe)?(x[D]=dt,x[je]=O,D=je):(x[D]=qe,x[Re]=O,D=Re);else if(jel(dt,O))x[D]=dt,x[je]=O,D=je;else break e}}return L}function l(x,L){var O=x.sortIndex-L.sortIndex;return O!==0?O:x.id-L.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=[],m=1,h=null,d=3,g=!1,S=!1,E=!1,j=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 p(x){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=x)r(a),L.sortIndex=L.expirationTime,t(s,L);else break;L=n(a)}}function w(x){if(E=!1,p(x),!S)if(n(s)!==null)S=!0,Te(C);else{var L=n(a);L!==null&&Ke(w,L.startTime-x)}}function C(x,L){S=!1,E&&(E=!1,f(R),R=-1),g=!0;var O=d;try{for(p(L),h=n(s);h!==null&&(!(h.expirationTime>L)||x&&!ie());){var D=h.callback;if(typeof D=="function"){h.callback=null,d=h.priorityLevel;var B=D(h.expirationTime<=L);L=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(s)&&r(s),p(L)}else r(s);h=n(s)}if(h!==null)var fe=!0;else{var Re=n(a);Re!==null&&Ke(w,Re.startTime-L),fe=!1}return fe}finally{h=null,d=O,g=!1}}var _=!1,N=null,R=-1,A=5,P=-1;function ie(){return!(e.unstable_now()-Px||125D?(x.sortIndex=O,t(a,x),n(s)===null&&x===n(a)&&(E?(f(R),R=-1):E=!0,Ke(w,O-D))):(x.sortIndex=B,t(s,x),S||g||(S=!0,Te(C))),x},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(x){var L=d;return function(){var O=d;d=L;try{return x.apply(this,arguments)}finally{d=O}}}})(Na);_a.exports=Na;var np=_a.exports;/** * @license React * react-dom.production.min.js * @@ -30,15 +30,15 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _a=v,Ce=tp;function E(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"),Wo=Object.prototype.hasOwnProperty,np=/^[: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]*$/,Yu={},Xu={};function rp(e){return Wo.call(Xu,e)?!0:Wo.call(Yu,e)?!1:np.test(e)?Xu[e]=!0:(Yu[e]=!0,!1)}function lp(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 op(e,t,n,r){if(t===null||typeof t>"u"||lp(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 he(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 oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new he(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new he(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new he(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new he(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){oe[e]=new he(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new he(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new he(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new he(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new he(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gi=/[\-:]([a-z])/g;function Yi(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(Gi,Yi);oe[t]=new he(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(Gi,Yi);oe[t]=new he(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(Gi,Yi);oe[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new he(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new he("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new he(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xi(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ho=Object.prototype.hasOwnProperty,rp=/^[: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]*$/,Xu={},Zu={};function lp(e){return Ho.call(Zu,e)?!0:Ho.call(Xu,e)?!1:rp.test(e)?Zu[e]=!0:(Xu[e]=!0,!1)}function op(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 ip(e,t,n,r){if(t===null||typeof t>"u"||op(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 he(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 oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new he(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new he(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new he(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new he(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){oe[e]=new he(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new he(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new he(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new he(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new he(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yi=/[\-:]([a-z])/g;function Xi(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(Yi,Xi);oe[t]=new he(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(Yi,Xi);oe[t]=new he(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(Yi,Xi);oe[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new he(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new he("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new he(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zi(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[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{fo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qn(e):""}function ip(e){switch(e.tag){case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return qn("Suspense");case 19:return qn("SuspenseList");case 0:case 2:case 15:return e=po(e.type,!1),e;case 11:return e=po(e.type.render,!1),e;case 1:return e=po(e.type,!0),e;default:return""}}function Ko(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 an:return"Fragment";case sn:return"Portal";case Ho:return"Profiler";case Zi:return"StrictMode";case Vo:return"Suspense";case Qo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ra:return(e.displayName||"Context")+".Consumer";case Ta:return(e._context.displayName||"Context")+".Provider";case Ji:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qi:return t=e.displayName||null,t!==null?t:Ko(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return Ko(e(t))}catch{}}return null}function up(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 Ko(t);case 8:return t===Zi?"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 jt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function La(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sp(e){var t=La(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 Ar(e){e._valueTracker||(e._valueTracker=sp(e))}function Oa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=La(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ml(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 Go(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ju(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jt(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 Pa(e,t){t=t.checked,t!=null&&Xi(e,"checked",t,!1)}function Yo(e,t){Pa(e,t);var n=jt(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")?Xo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Xo(e,t.type,jt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qu(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 Xo(e,t,n){(t!=="number"||ml(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bn=Array.isArray;function kn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Br.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rr={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},ap=["Webkit","ms","Moz","O"];Object.keys(rr).forEach(function(e){ap.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rr[t]=rr[e]})});function Da(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rr.hasOwnProperty(e)&&rr[e]?(""+t).trim():t+"px"}function $a(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Da(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var cp=X({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 qo(e,t){if(t){if(cp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function bo(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 ei=null;function bi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,En=null,xn=null;function ts(e){if(e=Pr(e)){if(typeof ti!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Gl(t),ti(e.stateNode,e.type,t))}}function Ia(e){En?xn?xn.push(e):xn=[e]:En=e}function Aa(){if(En){var e=En,t=xn;if(xn=En=null,ts(e),t)for(e=0;e>>=0,e===0?32:31-(kp(e)/Ep|0)|0}var Ur=64,Wr=4194304;function er(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 gl(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=er(u):(o&=i,o!==0&&(r=er(o)))}else i=n&~l,i!==0?r=er(i):o!==0&&(r=er(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-Ue(t),e[t]=n}function Np(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=or),cs=String.fromCharCode(32),fs=!1;function oc(e,t){switch(e){case"keyup":return em.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ic(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function nm(e,t){switch(e){case"compositionend":return ic(t);case"keypress":return t.which!==32?null:(fs=!0,cs);case"textInput":return e=t.data,e===cs&&fs?null:e;default:return null}}function rm(e,t){if(cn)return e==="compositionend"||!uu&&oc(e,t)?(e=rc(),ol=lu=wt=null,cn=!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=hs(n)}}function cc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fc(){for(var e=window,t=ml();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ml(e.document)}return t}function su(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 dm(e){var t=fc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cc(n.ownerDocument.documentElement,n)){if(r!==null&&su(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=vs(n,o);var i=vs(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,fn=null,ui=null,ur=null,si=!1;function ys(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||fn==null||fn!==ml(r)||(r=fn,"selectionStart"in r&&su(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}),ur&&wr(ur,r)||(ur=r,r=kl(ui,"onSelect"),0mn||(e.current=mi[mn],mi[mn]=null,mn--)}function U(e,t){mn++,mi[mn]=e.current,e.current=t}var Lt={},ce=Pt(Lt),ge=Pt(!1),Kt=Lt;function Rn(e,t){var n=e.type.contextTypes;if(!n)return Lt;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 we(e){return e=e.childContextTypes,e!=null}function xl(){V(ge),V(ce)}function Cs(e,t,n){if(ce.current!==Lt)throw Error(E(168));U(ce,t),U(ge,n)}function Sc(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(E(108,up(e)||"Unknown",l));return X({},n,r)}function Cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Kt=ce.current,U(ce,e),U(ge,ge.current),!0}function _s(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Sc(e,t,Kt),r.__reactInternalMemoizedMergedChildContext=e,V(ge),V(ce),U(ce,e)):V(ge),U(ge,n)}var et=null,Yl=!1,To=!1;function kc(e){et===null?et=[e]:et.push(e)}function Cm(e){Yl=!0,kc(e)}function Ft(){if(!To&&et!==null){To=!0;var e=0,t=I;try{var n=et;for(I=1;e>=i,l-=i,tt=1<<32-Ue(t)+l|n<R?(B=N,N=null):B=N.sibling;var P=d(f,N,p[R],w);if(P===null){N===null&&(N=B);break}e&&N&&P.alternate===null&&t(f,N),c=o(P,c,R),_===null?C=P:_.sibling=P,_=P,N=B}if(R===p.length)return n(f,N),Q&&zt(f,R),C;if(N===null){for(;RR?(B=N,N=null):B=N.sibling;var ie=d(f,N,P.value,w);if(ie===null){N===null&&(N=B);break}e&&N&&ie.alternate===null&&t(f,N),c=o(ie,c,R),_===null?C=ie:_.sibling=ie,_=ie,N=B}if(P.done)return n(f,N),Q&&zt(f,R),C;if(N===null){for(;!P.done;R++,P=p.next())P=h(f,P.value,w),P!==null&&(c=o(P,c,R),_===null?C=P:_.sibling=P,_=P);return Q&&zt(f,R),C}for(N=r(f,N);!P.done;R++,P=p.next())P=g(N,f,R,P.value,w),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?R:P.key),c=o(P,c,R),_===null?C=P:_.sibling=P,_=P);return e&&N.forEach(function(Ve){return t(f,Ve)}),Q&&zt(f,R),C}function j(f,c,p,w){if(typeof p=="object"&&p!==null&&p.type===an&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ir:e:{for(var C=p.key,_=c;_!==null;){if(_.key===C){if(C=p.type,C===an){if(_.tag===7){n(f,_.sibling),c=l(_,p.props.children),c.return=f,f=c;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===mt&&Ps(C)===_.type){n(f,_.sibling),c=l(_,p.props),c.ref=Gn(f,_,p),c.return=f,f=c;break e}n(f,_);break}else t(f,_);_=_.sibling}p.type===an?(c=Vt(p.props.children,f.mode,w,p.key),c.return=f,f=c):(w=pl(p.type,p.key,p.props,null,f.mode,w),w.ref=Gn(f,c,p),w.return=f,f=w)}return i(f);case sn:e:{for(_=p.key;c!==null;){if(c.key===_)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=zo(p,f.mode,w),c.return=f,f=c}return i(f);case mt:return _=p._init,j(f,c,_(p._payload),w)}if(bn(p))return S(f,c,p,w);if(Wn(p))return k(f,c,p,w);Xr(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=Mo(p,f.mode,w),c.return=f,f=c),i(f)):n(f,c)}return j}var Ln=jc(!0),Lc=jc(!1),Fr={},Je=Pt(Fr),xr=Pt(Fr),Cr=Pt(Fr);function Wt(e){if(e===Fr)throw Error(E(174));return e}function yu(e,t){switch(U(Cr,t),U(xr,e),U(Je,Fr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jo(t,e)}V(Je),U(Je,t)}function On(){V(Je),V(xr),V(Cr)}function Oc(e){Wt(Cr.current);var t=Wt(Je.current),n=Jo(t,e.type);t!==n&&(U(xr,e),U(Je,n))}function gu(e){xr.current===e&&(V(Je),V(xr))}var G=Pt(0);function Ll(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 Ro=[];function wu(){for(var e=0;en?n:4,e(!0);var r=jo.transition;jo.transition={};try{e(!1),t()}finally{I=n,jo.transition=r}}function Gc(){return De().memoizedState}function Rm(e,t,n){var r=Tt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Yc(e))Xc(t,n);else if(n=_c(e,t,n,r),n!==null){var l=pe();We(n,e,r,l),Zc(n,t,r)}}function jm(e,t,n){var r=Tt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yc(e))Xc(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,He(u,i)){var s=t.interleaved;s===null?(l.next=l,hu(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=_c(e,t,l,r),n!==null&&(l=pe(),We(n,e,r,l),Zc(n,t,r))}}function Yc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Xc(e,t){sr=Ol=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tu(e,n)}}var Pl={readContext:ze,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},Lm={readContext:ze,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Ms,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,al(4194308,4,Wc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();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=Rm.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:Fs,useDebugValue:Cu,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=Fs(!1),t=e[0];return e=Tm.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=Ye();if(Q){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),ne===null)throw Error(E(349));Yt&30||Mc(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Ms(Dc.bind(null,r,o,e),[e]),r.flags|=2048,Tr(9,zc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ye(),t=ne.identifierPrefix;if(Q){var n=nt,r=tt;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_r++,0")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{co=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qn(e):""}function up(e){switch(e.tag){case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return qn("Suspense");case 19:return qn("SuspenseList");case 0:case 2:case 15:return e=fo(e.type,!1),e;case 11:return e=fo(e.type.render,!1),e;case 1:return e=fo(e.type,!0),e;default:return""}}function Ko(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 cn:return"Fragment";case an:return"Portal";case Wo:return"Profiler";case Ji:return"StrictMode";case Vo:return"Suspense";case Qo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case La:return(e.displayName||"Context")+".Consumer";case ja:return(e._context.displayName||"Context")+".Provider";case qi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bi:return t=e.displayName||null,t!==null?t:Ko(e.type)||"Memo";case mt:t=e._payload,e=e._init;try{return Ko(e(t))}catch{}}return null}function sp(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 Ko(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 jt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ap(e){var t=Pa(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 Br(e){e._valueTracker||(e._valueTracker=ap(e))}function Fa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Pa(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ml(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 Go(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jt(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&&Zi(e,"checked",t,!1)}function Yo(e,t){Ma(e,t);var n=jt(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")?Xo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Xo(e,t.type,jt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bu(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 Xo(e,t,n){(t!=="number"||ml(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bn=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Ar.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rr={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},cp=["Webkit","ms","Moz","O"];Object.keys(rr).forEach(function(e){cp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rr[t]=rr[e]})});function Ia(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rr.hasOwnProperty(e)&&rr[e]?(""+t).trim():t+"px"}function Ba(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Ia(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var fp=X({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 qo(e,t){if(t){if(fp[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 bo(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 ei=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,xn=null,Cn=null;function ns(e){if(e=Pr(e)){if(typeof ti!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Gl(t),ti(e.stateNode,e.type,t))}}function Aa(e){xn?Cn?Cn.push(e):Cn=[e]:xn=e}function Ua(){if(xn){var e=xn,t=Cn;if(Cn=xn=null,ns(e),t)for(e=0;e>>=0,e===0?32:31-(Ep(e)/xp|0)|0}var Ur=64,Hr=4194304;function er(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 gl(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=er(u):(o&=i,o!==0&&(r=er(o)))}else i=n&~l,i!==0?r=er(i):o!==0&&(r=er(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-Ue(t),e[t]=n}function Tp(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=or),fs=String.fromCharCode(32),ds=!1;function uc(e,t){switch(e){case"keyup":return tm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fn=!1;function rm(e,t){switch(e){case"compositionend":return sc(t);case"keypress":return t.which!==32?null:(ds=!0,fs);case"textInput":return e=t.data,e===fs&&ds?null:e;default:return null}}function lm(e,t){if(fn)return e==="compositionend"||!su&&uc(e,t)?(e=oc(),ol=ou=wt=null,fn=!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=vs(n)}}function dc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pc(){for(var e=window,t=ml();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ml(e.document)}return t}function au(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 pm(e){var t=pc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dc(n.ownerDocument.documentElement,n)){if(r!==null&&au(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=ys(n,o);var i=ys(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,dn=null,ui=null,ur=null,si=!1;function gs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||dn==null||dn!==ml(r)||(r=dn,"selectionStart"in r&&au(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}),ur&&wr(ur,r)||(ur=r,r=kl(ui,"onSelect"),0hn||(e.current=mi[hn],mi[hn]=null,hn--)}function U(e,t){hn++,mi[hn]=e.current,e.current=t}var Lt={},ce=Pt(Lt),ge=Pt(!1),Kt=Lt;function jn(e,t){var n=e.type.contextTypes;if(!n)return Lt;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 we(e){return e=e.childContextTypes,e!=null}function xl(){V(ge),V(ce)}function _s(e,t,n){if(ce.current!==Lt)throw Error(k(168));U(ce,t),U(ge,n)}function Ec(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,sp(e)||"Unknown",l));return X({},n,r)}function Cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Kt=ce.current,U(ce,e),U(ge,ge.current),!0}function Ns(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=Ec(e,t,Kt),r.__reactInternalMemoizedMergedChildContext=e,V(ge),V(ce),U(ce,e)):V(ge),U(ge,n)}var et=null,Yl=!1,No=!1;function xc(e){et===null?et=[e]:et.push(e)}function _m(e){Yl=!0,xc(e)}function Ft(){if(!No&&et!==null){No=!0;var e=0,t=I;try{var n=et;for(I=1;e>=i,l-=i,tt=1<<32-Ue(t)+l|n<R?(A=N,N=null):A=N.sibling;var P=d(f,N,p[R],w);if(P===null){N===null&&(N=A);break}e&&N&&P.alternate===null&&t(f,N),c=o(P,c,R),_===null?C=P:_.sibling=P,_=P,N=A}if(R===p.length)return n(f,N),Q&&zt(f,R),C;if(N===null){for(;RR?(A=N,N=null):A=N.sibling;var ie=d(f,N,P.value,w);if(ie===null){N===null&&(N=A);break}e&&N&&ie.alternate===null&&t(f,N),c=o(ie,c,R),_===null?C=ie:_.sibling=ie,_=ie,N=A}if(P.done)return n(f,N),Q&&zt(f,R),C;if(N===null){for(;!P.done;R++,P=p.next())P=h(f,P.value,w),P!==null&&(c=o(P,c,R),_===null?C=P:_.sibling=P,_=P);return Q&&zt(f,R),C}for(N=r(f,N);!P.done;R++,P=p.next())P=g(N,f,R,P.value,w),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?R:P.key),c=o(P,c,R),_===null?C=P:_.sibling=P,_=P);return e&&N.forEach(function(Ve){return t(f,Ve)}),Q&&zt(f,R),C}function j(f,c,p,w){if(typeof p=="object"&&p!==null&&p.type===cn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ir:e:{for(var C=p.key,_=c;_!==null;){if(_.key===C){if(C=p.type,C===cn){if(_.tag===7){n(f,_.sibling),c=l(_,p.props.children),c.return=f,f=c;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===mt&&Fs(C)===_.type){n(f,_.sibling),c=l(_,p.props),c.ref=Yn(f,_,p),c.return=f,f=c;break e}n(f,_);break}else t(f,_);_=_.sibling}p.type===cn?(c=Vt(p.props.children,f.mode,w,p.key),c.return=f,f=c):(w=pl(p.type,p.key,p.props,null,f.mode,w),w.ref=Yn(f,c,p),w.return=f,f=w)}return i(f);case an:e:{for(_=p.key;c!==null;){if(c.key===_)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=Mo(p,f.mode,w),c.return=f,f=c}return i(f);case mt:return _=p._init,j(f,c,_(p._payload),w)}if(bn(p))return S(f,c,p,w);if(Wn(p))return E(f,c,p,w);Xr(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=Fo(p,f.mode,w),c.return=f,f=c),i(f)):n(f,c)}return j}var On=Oc(!0),Pc=Oc(!1),Fr={},Je=Pt(Fr),xr=Pt(Fr),Cr=Pt(Fr);function Ht(e){if(e===Fr)throw Error(k(174));return e}function gu(e,t){switch(U(Cr,t),U(xr,e),U(Je,Fr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jo(t,e)}V(Je),U(Je,t)}function Pn(){V(Je),V(xr),V(Cr)}function Fc(e){Ht(Cr.current);var t=Ht(Je.current),n=Jo(t,e.type);t!==n&&(U(xr,e),U(Je,n))}function wu(e){xr.current===e&&(V(Je),V(xr))}var G=Pt(0);function Ll(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 To=[];function Su(){for(var e=0;en?n:4,e(!0);var r=Ro.transition;Ro.transition={};try{e(!1),t()}finally{I=n,Ro.transition=r}}function Xc(){return $e().memoizedState}function jm(e,t,n){var r=Tt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zc(e))Jc(t,n);else if(n=Tc(e,t,n,r),n!==null){var l=pe();He(n,e,r,l),qc(n,t,r)}}function Lm(e,t,n){var r=Tt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zc(e))Jc(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,We(u,i)){var s=t.interleaved;s===null?(l.next=l,vu(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Tc(e,t,l,r),n!==null&&(l=pe(),He(n,e,r,l),qc(n,t,r))}}function Zc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Jc(e,t){sr=Ol=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nu(e,n)}}var Pl={readContext:ze,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},Om={readContext:ze,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,al(4194308,4,Vc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();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=jm.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:Ms,useDebugValue:_u,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=Ms(!1),t=e[0];return e=Rm.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=Ye();if(Q){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),ne===null)throw Error(k(349));Yt&30||$c(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,zs(Ic.bind(null,r,o,e),[e]),r.flags|=2048,Tr(9,Dc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ye(),t=ne.identifierPrefix;if(Q){var n=nt,r=tt;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_r++,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[Xe]=t,e[Er]=r,of(e,t,!1,!1),t.stateNode=e;e:{switch(i=bo(n,r),n){case"dialog":H("cancel",e),H("close",e),l=r;break;case"iframe":case"object":case"embed":H("load",e),l=r;break;case"video":case"audio":for(l=0;lFn&&(t.flags|=128,r=!0,Yn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ll(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Yn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Q)return se(t),null}else 2*J()-o.renderingStartTime>Fn&&n!==1073741824&&(t.flags|=128,r=!0,Yn(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=J(),t.sibling=null,n=G.current,U(G,r?n&1|2:n&1),t):(se(t),null);case 22:case 23:return Lu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(se(t),t.subtreeFlags&6&&(t.flags|=8192)):se(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Im(e,t){switch(cu(t),t.tag){case 1:return we(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(),V(ge),V(ce),wu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gu(t),null;case 13:if(V(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(G),null;case 4:return On(),null;case 10:return mu(t.type._context),null;case 22:case 23:return Lu(),null;case 24:return null;default:return null}}var Jr=!1,ae=!1,Am=typeof WeakSet=="function"?WeakSet:Set,T=null;function gn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Ni(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Hs=!1;function Bm(e,t){if(ai=wl,e=fc(),su(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,m=0,h=e,d=null;t:for(;;){for(var g;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(s=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(g=h.firstChild)!==null;)d=h,h=g;for(;;){if(h===e)break t;if(d===n&&++a===l&&(u=i),d===o&&++m===r&&(s=i),(g=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ci={focusedElem:e,selectionRange:n},wl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,j=S.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:Ie(t.type,k),j);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(w){Z(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return S=Hs,Hs=!1,S}function ar(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&&Ni(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 Ti(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 af(e){var t=e.alternate;t!==null&&(e.alternate=null,af(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xe],delete t[Er],delete t[pi],delete t[Em],delete t[xm])),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 cf(e){return e.tag===5||e.tag===3||e.tag===4}function Vs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cf(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 Ri(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=El));else if(r!==4&&(e=e.child,e!==null))for(Ri(e,t,n),e=e.sibling;e!==null;)Ri(e,t,n),e=e.sibling}function ji(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(ji(e,t,n),e=e.sibling;e!==null;)ji(e,t,n),e=e.sibling}var re=null,Ae=!1;function pt(e,t,n){for(n=n.child;n!==null;)ff(e,t,n),n=n.sibling}function ff(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Hl,n)}catch{}switch(n.tag){case 5:ae||gn(n,t);case 6:var r=re,l=Ae;re=null,pt(e,t,n),re=r,Ae=l,re!==null&&(Ae?(e=re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):re.removeChild(n.stateNode));break;case 18:re!==null&&(Ae?(e=re,n=n.stateNode,e.nodeType===8?No(e.parentNode,n):e.nodeType===1&&No(e,n),yr(e)):No(re,n.stateNode));break;case 4:r=re,l=Ae,re=n.stateNode.containerInfo,Ae=!0,pt(e,t,n),re=r,Ae=l;break;case 0:case 11:case 14:case 15:if(!ae&&(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)&&Ni(n,t,i),l=l.next}while(l!==r)}pt(e,t,n);break;case 1:if(!ae&&(gn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Z(n,t,u)}pt(e,t,n);break;case 21:pt(e,t,n);break;case 22:n.mode&1?(ae=(r=ae)||n.memoizedState!==null,pt(e,t,n),ae=r):pt(e,t,n);break;default:pt(e,t,n)}}function Qs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Am),t.forEach(function(r){var l=Xm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function $e(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wm(r/1960))-r,10e?16:e,St===null)var r=!1;else{if(e=St,St=null,zl=0,z&6)throw Error(E(331));var l=z;for(z|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sJ()-Ru?Ht(e,0):Tu|=n),Se(e,t)}function wf(e,t){t===0&&(e.mode&1?(t=Wr,Wr<<=1,!(Wr&130023424)&&(Wr=4194304)):t=1);var n=pe();e=ut(e,t),e!==null&&(Lr(e,t,n),Se(e,n))}function Ym(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wf(e,n)}function Xm(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(E(314))}r!==null&&r.delete(t),wf(e,n)}var Sf;Sf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ge.current)ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ye=!1,Dm(e,t,n);ye=!!(e.flags&131072)}else ye=!1,Q&&t.flags&1048576&&Ec(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var l=Rn(t,ce.current);_n(t,n),l=ku(null,t,r,e,l,n);var o=Eu();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,we(r)?(o=!0,Cl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vu(t),l.updater=Xl,t.stateNode=l,l._reactInternals=t,wi(t,r,e,n),t=Ei(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&au(t),de(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Jm(r),e=Ie(r,e),l){case 0:t=ki(null,t,r,e,n);break e;case 1:t=Bs(null,t,r,e,n);break e;case 11:t=Is(null,t,r,e,n);break e;case 14:t=As(null,t,r,Ie(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),ki(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Bs(e,t,r,l,n);case 3:e:{if(nf(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Nc(e,t),jl(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(E(423)),t),t=Us(e,t,r,n,l);break e}else if(r!==l){l=Pn(Error(E(424)),t),t=Us(e,t,r,n,l);break e}else for(Ee=Ct(t.stateNode.containerInfo.firstChild),xe=t,Q=!0,Be=null,n=Lc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jn(),r===l){t=st(e,t,n);break e}de(e,t,r,n)}t=t.child}return t;case 5:return Oc(t),e===null&&vi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,fi(r,l)?i=null:o!==null&&fi(r,o)&&(t.flags|=32),tf(e,t),de(e,t,i,n),t.child;case 6:return e===null&&vi(t),null;case 13:return rf(e,t,n);case 4:return yu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ln(t,null,r,n):de(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Is(e,t,r,l,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(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,U(Tl,r._currentValue),r._currentValue=i,o!==null)if(He(o.value,i)){if(o.children===l.children&&!ge.current){t=st(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=rt(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?s.next=s:(s.next=m.next,m.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),yi(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(E(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),yi(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}de(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,_n(t,n),l=ze(l),r=r(l),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,l=Ie(r,t.pendingProps),l=Ie(r.type,l),As(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:Ie(r,l),cl(e,t),t.tag=1,we(r)?(e=!0,Cl(t)):e=!1,_n(t,n),Rc(t,r,l),wi(t,r,l,n),Ei(null,t,r,!0,e,n);case 19:return lf(e,t,n);case 22:return ef(e,t,n)}throw Error(E(156,t.tag))};function kf(e,t){return Ka(e,t)}function Zm(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 Fe(e,t,n,r){return new Zm(e,t,n,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jm(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ji)return 11;if(e===qi)return 14}return 2}function Rt(e,t){var n=e.alternate;return n===null?(n=Fe(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 pl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Pu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case an:return Vt(n.children,l,o,t);case Zi:i=8,l|=8;break;case Ho:return e=Fe(12,n,t,l|2),e.elementType=Ho,e.lanes=o,e;case Vo:return e=Fe(13,n,t,l),e.elementType=Vo,e.lanes=o,e;case Qo:return e=Fe(19,n,t,l),e.elementType=Qo,e.lanes=o,e;case ja:return bl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ta:i=10;break e;case Ra:i=9;break e;case Ji:i=11;break e;case qi:i=14;break e;case mt:i=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Fe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Vt(e,t,n,r){return e=Fe(7,e,r,t),e.lanes=n,e}function bl(e,t,n,r){return e=Fe(22,e,r,t),e.elementType=ja,e.lanes=n,e.stateNode={isHidden:!1},e}function Mo(e,t,n){return e=Fe(6,e,null,t),e.lanes=n,e}function zo(e,t,n){return t=Fe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qm(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=ho(0),this.expirationTimes=ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ho(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,l,o,i,u,s){return e=new qm(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Fe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(o),e}function bm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_f)}catch(e){console.error(e)}}_f(),Ea.exports=_e;var Nf=Ea.exports;const Sn=Ul(Nf);var bs=Nf;Uo.createRoot=bs.createRoot,Uo.hydrateRoot=bs.hydrateRoot;var Tf={exports:{}};/*! +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Oo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Si(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Mm=typeof WeakMap=="function"?WeakMap:Map;function bc(e,t,n){n=rt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ml||(Ml=!0,Li=r),Si(e,t)},n}function ef(e,t,n){n=rt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Si(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Si(e,t),typeof r!="function"&&(Nt===null?Nt=new Set([this]):Nt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function $s(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Mm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Ym.bind(null,e,t,n),t.then(e,e))}function Ds(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Is(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rt(-1,1),t.tag=2,_t(n,t,1))),n.lanes|=1),e)}var zm=ct.ReactCurrentOwner,ye=!1;function de(e,t,n,r){t.child=e===null?Pc(t,null,n,r):On(t,e.child,n,r)}function Bs(e,t,n,r,l){n=n.render;var o=t.ref;return Nn(t,l),r=Eu(e,t,n,r,o,l),n=xu(),e!==null&&!ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,st(e,t,l)):(Q&&n&&cu(t),t.flags|=1,de(e,t,r,l),t.child)}function As(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Fu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,tf(e,t,o,r,l)):(e=pl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:wr,n(i,r)&&e.ref===t.ref)return st(e,t,l)}return t.flags|=1,e=Rt(o,r),e.ref=t.ref,e.return=t,t.child=e}function tf(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(wr(o,r)&&e.ref===t.ref)if(ye=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(ye=!0);else return t.lanes=e.lanes,st(e,t,l)}return ki(e,t,n,r,l)}function nf(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(Sn,ke),ke|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(Sn,ke),ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,U(Sn,ke),ke|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,U(Sn,ke),ke|=r;return de(e,t,l,n),t.child}function rf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ki(e,t,n,r,l){var o=we(n)?Kt:ce.current;return o=jn(t,o),Nn(t,l),n=Eu(e,t,n,r,o,l),r=xu(),e!==null&&!ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,st(e,t,l)):(Q&&r&&cu(t),t.flags|=1,de(e,t,n,l),t.child)}function Us(e,t,n,r,l){if(we(n)){var o=!0;Cl(t)}else o=!1;if(Nn(t,l),t.stateNode===null)cl(e,t),Lc(t,n,r),wi(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=ze(a):(a=we(n)?Kt:ce.current,a=jn(t,a));var m=n.getDerivedStateFromProps,h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==a)&&Ps(t,i,r,a),ht=!1;var d=t.memoizedState;i.state=d,jl(t,r,i,l),s=t.memoizedState,u!==r||d!==s||ge.current||ht?(typeof m=="function"&&(gi(t,n,m,r),s=t.memoizedState),(u=ht||Os(t,n,u,r,d,s,a))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=a,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Rc(e,t),u=t.memoizedProps,a=t.type===t.elementType?u:Ie(t.type,u),i.props=a,h=t.pendingProps,d=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=ze(s):(s=we(n)?Kt:ce.current,s=jn(t,s));var g=n.getDerivedStateFromProps;(m=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==h||d!==s)&&Ps(t,i,r,s),ht=!1,d=t.memoizedState,i.state=d,jl(t,r,i,l);var S=t.memoizedState;u!==h||d!==S||ge.current||ht?(typeof g=="function"&&(gi(t,n,g,r),S=t.memoizedState),(a=ht||Os(t,n,a,r,d,S,s)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,S,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,S,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),i.props=r,i.state=S,i.context=s,r=a):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ei(e,t,n,r,o,l)}function Ei(e,t,n,r,l,o){rf(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Ns(t,n,!1),st(e,t,o);r=t.stateNode,zm.current=t;var u=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=On(t,e.child,null,o),t.child=On(t,null,u,o)):de(e,t,u,o),t.memoizedState=r.state,l&&Ns(t,n,!0),t.child}function lf(e){var t=e.stateNode;t.pendingContext?_s(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_s(e,t.context,!1),gu(e,t.containerInfo)}function Hs(e,t,n,r,l){return Ln(),du(l),t.flags|=256,de(e,t,n,r),t.child}var xi={dehydrated:null,treeContext:null,retryLane:0};function Ci(e){return{baseLanes:e,cachePool:null,transitions:null}}function of(e,t,n){var r=t.pendingProps,l=G.current,o=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),U(G,l&1),e===null)return vi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=bl(i,r,0,null),e=Vt(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ci(n),t.memoizedState=xi,e):Nu(t,i));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return $m(e,t,i,r,u,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Rt(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?o=Rt(u,o):(o=Vt(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Ci(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=xi,r}return o=e.child,e=o.sibling,r=Rt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Nu(e,t){return t=bl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Zr(e,t,n,r){return r!==null&&du(r),On(t,e.child,null,n),e=Nu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $m(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Oo(Error(k(422))),Zr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=bl({mode:"visible",children:r.children},l,0,null),o=Vt(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&On(t,e.child,null,i),t.child.memoizedState=Ci(i),t.memoizedState=xi,o);if(!(t.mode&1))return Zr(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(k(419)),r=Oo(o,r,void 0),Zr(e,t,i,r)}if(u=(i&e.childLanes)!==0,ye||u){if(r=ne,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,ut(e,l),He(r,e,l,-1))}return Pu(),r=Oo(Error(k(421))),Zr(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Xm.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,Ee=Ct(l.nextSibling),xe=t,Q=!0,Ae=null,e!==null&&(Le[Oe++]=tt,Le[Oe++]=nt,Le[Oe++]=Gt,tt=e.id,nt=e.overflow,Gt=t),t=Nu(t,r.children),t.flags|=4096,t)}function Ws(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),yi(e.return,t,n)}function Po(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function uf(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(de(e,t,r.children,n),r=G.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ws(e,n,t);else if(e.tag===19)Ws(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(G,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ll(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Po(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ll(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Po(t,!0,n,null,o);break;case"together":Po(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function st(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,n=Rt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dm(e,t,n){switch(t.tag){case 3:lf(t),Ln();break;case 5:Fc(t);break;case 1:we(t.type)&&Cl(t);break;case 4:gu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;U(Tl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(G,G.current&1),t.flags|=128,null):n&t.child.childLanes?of(e,t,n):(U(G,G.current&1),e=st(e,t,n),e!==null?e.sibling:null);U(G,G.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),U(G,G.current),r)break;return null;case 22:case 23:return t.lanes=0,nf(e,t,n)}return st(e,t,n)}var sf,_i,af,cf;sf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};_i=function(){};af=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Ht(Je.current);var o=null;switch(n){case"input":l=Go(e,l),r=Go(e,r),o=[];break;case"select":l=X({},l,{value:void 0}),r=X({},r,{value:void 0}),o=[];break;case"textarea":l=Zo(e,l),r=Zo(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=El)}qo(n,r);var i;n=null;for(a in l)if(!r.hasOwnProperty(a)&&l.hasOwnProperty(a)&&l[a]!=null)if(a==="style"){var u=l[a];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(dr.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var s=r[a];if(u=l!=null?l[a]:void 0,r.hasOwnProperty(a)&&s!==u&&(s!=null||u!=null))if(a==="style")if(u){for(i in u)!u.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&u[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(o||(o=[]),o.push(a,n)),n=s;else a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(o=o||[]).push(a,s)):a==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(a,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(dr.hasOwnProperty(a)?(s!=null&&a==="onScroll"&&W("scroll",e),o||u===s||(o=[])):(o=o||[]).push(a,s))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};cf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xn(e,t){if(!Q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function se(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Im(e,t,n){var r=t.pendingProps;switch(fu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return se(t),null;case 1:return we(t.type)&&xl(),se(t),null;case 3:return r=t.stateNode,Pn(),V(ge),V(ce),Su(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ae!==null&&(Fi(Ae),Ae=null))),_i(e,t),se(t),null;case 5:wu(t);var l=Ht(Cr.current);if(n=t.type,e!==null&&t.stateNode!=null)af(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(k(166));return se(t),null}if(e=Ht(Je.current),Yr(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Xe]=t,r[Er]=o,e=(t.mode&1)!==0,n){case"dialog":W("cancel",r),W("close",r);break;case"iframe":case"object":case"embed":W("load",r);break;case"video":case"audio":for(l=0;l<\/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[Xe]=t,e[Er]=r,sf(e,t,!1,!1),t.stateNode=e;e:{switch(i=bo(n,r),n){case"dialog":W("cancel",e),W("close",e),l=r;break;case"iframe":case"object":case"embed":W("load",e),l=r;break;case"video":case"audio":for(l=0;lMn&&(t.flags|=128,r=!0,Xn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ll(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Q)return se(t),null}else 2*J()-o.renderingStartTime>Mn&&n!==1073741824&&(t.flags|=128,r=!0,Xn(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=J(),t.sibling=null,n=G.current,U(G,r?n&1|2:n&1),t):(se(t),null);case 22:case 23:return Ou(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(se(t),t.subtreeFlags&6&&(t.flags|=8192)):se(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function Bm(e,t){switch(fu(t),t.tag){case 1:return we(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(),V(ge),V(ce),Su(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wu(t),null;case 13:if(V(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(G),null;case 4:return Pn(),null;case 10:return hu(t.type._context),null;case 22:case 23:return Ou(),null;case 24:return null;default:return null}}var Jr=!1,ae=!1,Am=typeof WeakSet=="function"?WeakSet:Set,T=null;function wn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Ni(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Vs=!1;function Um(e,t){if(ai=wl,e=pc(),au(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,m=0,h=e,d=null;t:for(;;){for(var g;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(s=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(g=h.firstChild)!==null;)d=h,h=g;for(;;){if(h===e)break t;if(d===n&&++a===l&&(u=i),d===o&&++m===r&&(s=i),(g=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ci={focusedElem:e,selectionRange:n},wl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var E=S.memoizedProps,j=S.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ie(t.type,E),j);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(w){Z(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return S=Vs,Vs=!1,S}function ar(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&&Ni(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 Ti(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 ff(e){var t=e.alternate;t!==null&&(e.alternate=null,ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xe],delete t[Er],delete t[pi],delete t[xm],delete t[Cm])),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 df(e){return e.tag===5||e.tag===3||e.tag===4}function Qs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||df(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 Ri(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=El));else if(r!==4&&(e=e.child,e!==null))for(Ri(e,t,n),e=e.sibling;e!==null;)Ri(e,t,n),e=e.sibling}function ji(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(ji(e,t,n),e=e.sibling;e!==null;)ji(e,t,n),e=e.sibling}var re=null,Be=!1;function pt(e,t,n){for(n=n.child;n!==null;)pf(e,t,n),n=n.sibling}function pf(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Wl,n)}catch{}switch(n.tag){case 5:ae||wn(n,t);case 6:var r=re,l=Be;re=null,pt(e,t,n),re=r,Be=l,re!==null&&(Be?(e=re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):re.removeChild(n.stateNode));break;case 18:re!==null&&(Be?(e=re,n=n.stateNode,e.nodeType===8?_o(e.parentNode,n):e.nodeType===1&&_o(e,n),yr(e)):_o(re,n.stateNode));break;case 4:r=re,l=Be,re=n.stateNode.containerInfo,Be=!0,pt(e,t,n),re=r,Be=l;break;case 0:case 11:case 14:case 15:if(!ae&&(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)&&Ni(n,t,i),l=l.next}while(l!==r)}pt(e,t,n);break;case 1:if(!ae&&(wn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Z(n,t,u)}pt(e,t,n);break;case 21:pt(e,t,n);break;case 22:n.mode&1?(ae=(r=ae)||n.memoizedState!==null,pt(e,t,n),ae=r):pt(e,t,n);break;default:pt(e,t,n)}}function Ks(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Am),t.forEach(function(r){var l=Zm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function De(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wm(r/1960))-r,10e?16:e,St===null)var r=!1;else{if(e=St,St=null,zl=0,z&6)throw Error(k(331));var l=z;for(z|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sJ()-ju?Wt(e,0):Ru|=n),Se(e,t)}function kf(e,t){t===0&&(e.mode&1?(t=Hr,Hr<<=1,!(Hr&130023424)&&(Hr=4194304)):t=1);var n=pe();e=ut(e,t),e!==null&&(Lr(e,t,n),Se(e,n))}function Xm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kf(e,n)}function Zm(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),kf(e,n)}var Ef;Ef=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ge.current)ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ye=!1,Dm(e,t,n);ye=!!(e.flags&131072)}else ye=!1,Q&&t.flags&1048576&&Cc(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var l=jn(t,ce.current);Nn(t,n),l=Eu(null,t,r,e,l,n);var o=xu();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,we(r)?(o=!0,Cl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,yu(t),l.updater=Xl,t.stateNode=l,l._reactInternals=t,wi(t,r,e,n),t=Ei(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&cu(t),de(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=qm(r),e=Ie(r,e),l){case 0:t=ki(null,t,r,e,n);break e;case 1:t=Us(null,t,r,e,n);break e;case 11:t=Bs(null,t,r,e,n);break e;case 14:t=As(null,t,r,Ie(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:Ie(r,l),ki(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Us(e,t,r,l,n);case 3:e:{if(lf(t),e===null)throw Error(k(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Rc(e,t),jl(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=Fn(Error(k(423)),t),t=Hs(e,t,r,n,l);break e}else if(r!==l){l=Fn(Error(k(424)),t),t=Hs(e,t,r,n,l);break e}else for(Ee=Ct(t.stateNode.containerInfo.firstChild),xe=t,Q=!0,Ae=null,n=Pc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ln(),r===l){t=st(e,t,n);break e}de(e,t,r,n)}t=t.child}return t;case 5:return Fc(t),e===null&&vi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,fi(r,l)?i=null:o!==null&&fi(r,o)&&(t.flags|=32),rf(e,t),de(e,t,i,n),t.child;case 6:return e===null&&vi(t),null;case 13:return of(e,t,n);case 4:return gu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=On(t,null,r,n):de(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Bs(e,t,r,l,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(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,U(Tl,r._currentValue),r._currentValue=i,o!==null)if(We(o.value,i)){if(o.children===l.children&&!ge.current){t=st(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=rt(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?s.next=s:(s.next=m.next,m.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),yi(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),yi(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}de(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Nn(t,n),l=ze(l),r=r(l),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,l=Ie(r,t.pendingProps),l=Ie(r.type,l),As(e,t,r,l,n);case 15:return tf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),cl(e,t),t.tag=1,we(r)?(e=!0,Cl(t)):e=!1,Nn(t,n),Lc(t,r,l),wi(t,r,l,n),Ei(null,t,r,!0,e,n);case 19:return uf(e,t,n);case 22:return nf(e,t,n)}throw Error(k(156,t.tag))};function xf(e,t){return Ya(e,t)}function Jm(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 Fe(e,t,n,r){return new Jm(e,t,n,r)}function Fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qm(e){if(typeof e=="function")return Fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qi)return 11;if(e===bi)return 14}return 2}function Rt(e,t){var n=e.alternate;return n===null?(n=Fe(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 pl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Fu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case cn:return Vt(n.children,l,o,t);case Ji:i=8,l|=8;break;case Wo:return e=Fe(12,n,t,l|2),e.elementType=Wo,e.lanes=o,e;case Vo:return e=Fe(13,n,t,l),e.elementType=Vo,e.lanes=o,e;case Qo:return e=Fe(19,n,t,l),e.elementType=Qo,e.lanes=o,e;case Oa:return bl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ja:i=10;break e;case La:i=9;break e;case qi:i=11;break e;case bi:i=14;break e;case mt:i=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Fe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Vt(e,t,n,r){return e=Fe(7,e,r,t),e.lanes=n,e}function bl(e,t,n,r){return e=Fe(22,e,r,t),e.elementType=Oa,e.lanes=n,e.stateNode={isHidden:!1},e}function Fo(e,t,n){return e=Fe(6,e,null,t),e.lanes=n,e}function Mo(e,t,n){return t=Fe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bm(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=mo(0),this.expirationTimes=mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Mu(e,t,n,r,l,o,i,u,s){return e=new bm(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Fe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yu(o),e}function eh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tf)}catch(e){console.error(e)}}Tf(),Ca.exports=_e;var Rf=Ca.exports;const kn=Ul(Rf);var ea=Rf;Uo.createRoot=ea.createRoot,Uo.hydrateRoot=ea.hydrateRoot;var jf={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=0)&&(n[l]=e[l]);return n}function ea(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function oh(e){var t=ih(e,"string");return typeof t=="symbol"?t:String(t)}function ih(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uh(e,t,n){var r=v.useRef(e!==void 0),l=v.useState(t),o=l[0],i=l[1],u=e!==void 0,s=r.current;return r.current=u,!u&&s&&o!==t&&i(t),[u?e:o,v.useCallback(function(a){for(var m=arguments.length,h=new Array(m>1?m-1:0),d=1;d{o.target===e&&(l(),t(o))},n+r)}function Oh(e){e.offsetHeight}const ra=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Ph(e,t){const n=ra(e),r=ra(t);return l=>{n&&n(l),r&&r(l)}}function io(e,t){return v.useMemo(()=>Ph(e,t),[e,t])}function Fh(e){return e&&"setState"in e?Sn.findDOMNode(e):e??null}const Mh=At.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:l,onExited:o,addEndListener:i,children:u,childRef:s,...a},m)=>{const h=v.useRef(null),d=io(h,s),g=_=>{d(Fh(_))},S=_=>N=>{_&&h.current&&_(h.current,N)},k=v.useCallback(S(e),[e]),j=v.useCallback(S(t),[t]),f=v.useCallback(S(n),[n]),c=v.useCallback(S(r),[r]),p=v.useCallback(S(l),[l]),w=v.useCallback(S(o),[o]),C=v.useCallback(S(i),[i]);return y.jsx(Nh,{ref:m,...a,onEnter:k,onEntered:f,onEntering:j,onExit:c,onExited:w,onExiting:p,addEndListener:C,nodeRef:h,children:typeof u=="function"?(_,N)=>u(_,{...N,ref:g}):At.cloneElement(u,{ref:g})})}),zh=Mh;function Dh(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e},[e]),t}function Pe(e){const t=Dh(e);return v.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const $f=e=>v.forwardRef((t,n)=>y.jsx("div",{...t,ref:n,className:M(t.className,e)})),If=$f("h4");If.displayName="DivStyledAsH4";const Af=v.forwardRef(({className:e,bsPrefix:t,as:n=If,...r},l)=>(t=W(t,"alert-heading"),y.jsx(n,{ref:l,className:M(e,t),...r})));Af.displayName="AlertHeading";const $h=Af;function Ih(){return v.useState(null)}function Ah(){const e=v.useRef(!0),t=v.useRef(()=>e.current);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function Bh(e){const t=v.useRef(null);return v.useEffect(()=>{t.current=e}),t.current}const Uh=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Wh=typeof document<"u",la=Wh||Uh?v.useLayoutEffect:v.useEffect,Hh=["as","disabled"];function Vh(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}function Qh(e){return!e||e.trim()==="#"}function $u({tagName:e,disabled:t,href:n,target:r,rel:l,role:o,onClick:i,tabIndex:u=0,type:s}){e||(n!=null||r!=null||l!=null?e="a":e="button");const a={tagName:e};if(e==="button")return[{type:s||"button",disabled:t},a];const m=d=>{if((t||e==="a"&&Qh(n))&&d.preventDefault(),t){d.stopPropagation();return}i==null||i(d)},h=d=>{d.key===" "&&(d.preventDefault(),m(d))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?l:void 0,onClick:m,onKeyDown:h},a]}const Kh=v.forwardRef((e,t)=>{let{as:n,disabled:r}=e,l=Vh(e,Hh);const[o,{tagName:i}]=$u(Object.assign({tagName:n,disabled:r},l));return y.jsx(i,Object.assign({},l,o,{ref:t}))});Kh.displayName="Button";const Gh=["onKeyDown"];function Yh(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}function Xh(e){return!e||e.trim()==="#"}const Bf=v.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=Yh(e,Gh);const[l]=$u(Object.assign({tagName:"a"},r)),o=Pe(i=>{l.onKeyDown(i),n==null||n(i)});return Xh(r.href)||r.role==="button"?y.jsx("a",Object.assign({ref:t},r,l,{onKeyDown:o})):y.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Bf.displayName="Anchor";const Zh=Bf,Uf=v.forwardRef(({className:e,bsPrefix:t,as:n=Zh,...r},l)=>(t=W(t,"alert-link"),y.jsx(n,{ref:l,className:M(e,t),...r})));Uf.displayName="AlertLink";const Jh=Uf,qh={[vt]:"show",[It]:"show"},Wf=v.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...l},o)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...l},u=v.useCallback((s,a)=>{Oh(s),r==null||r(s,a)},[r]);return y.jsx(zh,{ref:o,addEndListener:Lh,...i,onEnter:u,childRef:t.ref,children:(s,a)=>v.cloneElement(t,{...a,className:M("fade",e,t.props.className,qh[s],n[s])})})});Wf.displayName="Fade";const Al=Wf,bh={"aria-label":lt.string,onClick:lt.func,variant:lt.oneOf(["white"])},Iu=v.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},l)=>y.jsx("button",{ref:l,type:"button",className:M("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Iu.displayName="CloseButton";Iu.propTypes=bh;const Hf=Iu,Vf=v.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:l="Close alert",closeVariant:o,className:i,children:u,variant:s="primary",onClose:a,dismissible:m,transition:h=Al,...d}=sh(e,{show:"onClose"}),g=W(n,"alert"),S=Pe(f=>{a&&a(!1,f)}),k=h===!0?Al:h,j=y.jsxs("div",{role:"alert",...k?void 0:d,ref:t,className:M(i,g,s&&`${g}-${s}`,m&&`${g}-dismissible`),children:[m&&y.jsx(Hf,{onClick:S,"aria-label":l,variant:o}),u]});return k?y.jsx(k,{unmountOnExit:!0,...d,ref:void 0,in:r,children:j}):r?j:null});Vf.displayName="Alert";const ev=Object.assign(Vf,{Link:Jh,Heading:$h}),Qf=v.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:l=!1,disabled:o=!1,className:i,...u},s)=>{const a=W(t,"btn"),[m,{tagName:h}]=$u({tagName:e,disabled:o,...u}),d=h;return y.jsx(d,{...m,...u,ref:s,disabled:o,className:M(i,a,l&&"active",n&&`${a}-${n}`,r&&`${a}-${r}`,u.href&&o&&"disabled")})});Qf.displayName="Button";const Bi=Qf;function tv(e){const t=v.useRef(e);return t.current=e,t}function Kf(e){const t=tv(e);v.useEffect(()=>()=>t.current(),[])}function nv(e,t){let n=0;return v.Children.map(e,r=>v.isValidElement(r)?t(r,n++):r)}function rv(e,t){return v.Children.toArray(e).some(n=>v.isValidElement(n)&&n.type===t)}function lv({as:e,bsPrefix:t,className:n,...r}){t=W(t,"col");const l=jf(),o=Lf(),i=[],u=[];return l.forEach(s=>{const a=r[s];delete r[s];let m,h,d;typeof a=="object"&&a!=null?{span:m,offset:h,order:d}=a:m=a;const g=s!==o?`-${s}`:"";m&&i.push(m===!0?`${t}${g}`:`${t}${g}-${m}`),d!=null&&u.push(`order${g}-${d}`),h!=null&&u.push(`offset${g}-${h}`)}),[{...r,className:M(n,...i,...u)},{as:e,bsPrefix:t,spans:i}]}const Gf=v.forwardRef((e,t)=>{const[{className:n,...r},{as:l="div",bsPrefix:o,spans:i}]=lv(e);return y.jsx(l,{...r,ref:t,className:M(n,!i.length&&o)})});Gf.displayName="Col";const uo=Gf,Yf=v.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...l},o)=>{const i=W(e,"container"),u=typeof t=="string"?`-${t}`:"-fluid";return y.jsx(n,{ref:o,...l,className:M(r,t?`${i}${u}`:i)})});Yf.displayName="Container";const Xf=Yf;var ov=Function.prototype.bind.call(Function.prototype.call,[].slice);function on(e,t){return ov(e.querySelectorAll(t))}function oa(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const iv="data-rr-ui-";function uv(e){return`${iv}${e}`}const Zf=v.createContext($n?window:void 0);Zf.Provider;function Au(){return v.useContext(Zf)}const sv={type:lt.string,tooltip:lt.bool,as:lt.elementType},Bu=v.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...l},o)=>y.jsx(e,{...l,ref:o,className:M(t,`${n}-${r?"tooltip":"feedback"}`)}));Bu.displayName="Feedback";Bu.propTypes=sv;const Jf=Bu,av=v.createContext({}),at=av,qf=v.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:l=!1,isInvalid:o=!1,as:i="input",...u},s)=>{const{controlId:a}=v.useContext(at);return t=W(t,"form-check-input"),y.jsx(i,{...u,ref:s,type:r,id:e||a,className:M(n,t,l&&"is-valid",o&&"is-invalid")})});qf.displayName="FormCheckInput";const bf=qf,ed=v.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},l)=>{const{controlId:o}=v.useContext(at);return e=W(e,"form-check-label"),y.jsx("label",{...r,ref:l,htmlFor:n||o,className:M(t,e)})});ed.displayName="FormCheckLabel";const Ui=ed,td=v.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:a,feedbackType:m,className:h,style:d,title:g="",type:S="checkbox",label:k,children:j,as:f="input",...c},p)=>{t=W(t,"form-check"),n=W(n,"form-switch");const{controlId:w}=v.useContext(at),C=v.useMemo(()=>({controlId:e||w}),[w,e]),_=!j&&k!=null&&k!==!1||rv(j,Ui),N=y.jsx(bf,{...c,type:S==="switch"?"checkbox":S,ref:p,isValid:i,isInvalid:u,disabled:o,as:f});return y.jsx(at.Provider,{value:C,children:y.jsx("div",{style:d,className:M(h,_&&t,r&&`${t}-inline`,l&&`${t}-reverse`,S==="switch"&&n),children:j||y.jsxs(y.Fragment,{children:[N,_&&y.jsx(Ui,{title:g,children:k}),a&&y.jsx(Jf,{type:m,tooltip:s,children:a})]})})})});td.displayName="FormCheck";const Bl=Object.assign(td,{Input:bf,Label:Ui}),nd=v.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:l,className:o,isValid:i=!1,isInvalid:u=!1,plaintext:s,readOnly:a,as:m="input",...h},d)=>{const{controlId:g}=v.useContext(at);return e=W(e,"form-control"),y.jsx(m,{...h,type:t,size:r,ref:d,readOnly:a,id:l||g,className:M(o,s?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,i&&"is-valid",u&&"is-invalid")})});nd.displayName="FormControl";const cv=Object.assign(nd,{Feedback:Jf}),rd=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=W(t,"form-floating"),y.jsx(n,{ref:l,className:M(e,t),...r})));rd.displayName="FormFloating";const fv=rd,ld=v.forwardRef(({controlId:e,as:t="div",...n},r)=>{const l=v.useMemo(()=>({controlId:e}),[e]);return y.jsx(at.Provider,{value:l,children:y.jsx(t,{...n,ref:r})})});ld.displayName="FormGroup";const od=ld,id=v.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:l,htmlFor:o,...i},u)=>{const{controlId:s}=v.useContext(at);t=W(t,"form-label");let a="col-form-label";typeof n=="string"&&(a=`${a} ${a}-${n}`);const m=M(l,t,r&&"visually-hidden",n&&a);return o=o||s,n?y.jsx(uo,{ref:u,as:"label",className:m,htmlFor:o,...i}):y.jsx(e,{ref:u,className:m,htmlFor:o,...i})});id.displayName="FormLabel";const dv=id,ud=v.forwardRef(({bsPrefix:e,className:t,id:n,...r},l)=>{const{controlId:o}=v.useContext(at);return e=W(e,"form-range"),y.jsx("input",{...r,type:"range",ref:l,className:M(t,e),id:n||o})});ud.displayName="FormRange";const pv=ud,sd=v.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:l=!1,isInvalid:o=!1,id:i,...u},s)=>{const{controlId:a}=v.useContext(at);return e=W(e,"form-select"),y.jsx("select",{...u,size:n,ref:s,className:M(r,e,t&&`${e}-${t}`,l&&"is-valid",o&&"is-invalid"),id:i||a})});sd.displayName="FormSelect";const mv=sd,ad=v.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...l},o)=>(e=W(e,"form-text"),y.jsx(n,{...l,ref:o,className:M(t,e,r&&"text-muted")})));ad.displayName="FormText";const hv=ad,cd=v.forwardRef((e,t)=>y.jsx(Bl,{...e,ref:t,type:"switch"}));cd.displayName="Switch";const vv=Object.assign(cd,{Input:Bl.Input,Label:Bl.Label}),fd=v.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:l,...o},i)=>(e=W(e,"form-floating"),y.jsxs(od,{ref:i,className:M(t,e),controlId:r,...o,children:[n,y.jsx("label",{htmlFor:r,children:l})]})));fd.displayName="FloatingLabel";const yv=fd,gv={_ref:lt.any,validated:lt.bool,as:lt.elementType},Uu=v.forwardRef(({className:e,validated:t,as:n="form",...r},l)=>y.jsx(n,{...r,ref:l,className:M(e,t&&"was-validated")}));Uu.displayName="Form";Uu.propTypes=gv;const wv=Object.assign(Uu,{Group:od,Control:cv,Floating:fv,Check:Bl,Switch:vv,Label:dv,Text:hv,Range:pv,Select:mv,FloatingLabel:yv});var tl;function ia(e){if((!tl&&tl!==0||e)&&$n){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),tl=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return tl}function $o(e){e===void 0&&(e=oo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function Sv(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const ua=uv("modal-open");class kv{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Sv(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();t.style={overflow:l.style.overflow,[r]:l.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(Qt(l,r)||"0",10)+t.scrollBarWidth}px`),l.setAttribute(ua,""),Qt(l,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(ua),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Wu=kv,Io=(e,t)=>$n?e==null?(t||oo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ev(e,t){const n=Au(),[r,l]=v.useState(()=>Io(e,n==null?void 0:n.document));if(!r){const o=Io(e);o&&l(o)}return v.useEffect(()=>{t&&r&&t(r)},[t,r]),v.useEffect(()=>{const o=Io(e);o!==r&&l(o)},[e,r]),r}function xv({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:l}){const o=v.useRef(null),i=v.useRef(t),u=Pe(n);v.useEffect(()=>{t?i.current=!0:u(o.current)},[t,u]);const s=io(o,e.ref),a=v.cloneElement(e,{ref:s});return t?a:l||!i.current&&r?null:a}function Cv({in:e,onTransition:t}){const n=v.useRef(null),r=v.useRef(!0),l=Pe(t);return la(()=>{if(!n.current)return;let o=!1;return l({in:e,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[e,l]),la(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function _v({children:e,in:t,onExited:n,onEntered:r,transition:l}){const[o,i]=v.useState(!t);t&&o&&i(!1);const u=Cv({in:!!t,onTransition:a=>{const m=()=>{a.isStale()||(a.in?r==null||r(a.element,a.initial):(i(!0),n==null||n(a.element)))};Promise.resolve(l(a)).then(m,h=>{throw a.in||i(!0),h})}}),s=io(u,e.ref);return o&&!t?null:v.cloneElement(e,{ref:s})}function sa(e,t,n){return e?y.jsx(e,Object.assign({},n)):t?y.jsx(_v,Object.assign({},n,{transition:t})):y.jsx(xv,Object.assign({},n))}function Nv(e){return e.code==="Escape"||e.keyCode===27}const Tv=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Rv(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}let Ao;function jv(e){return Ao||(Ao=new Wu({ownerDocument:e==null?void 0:e.document})),Ao}function Lv(e){const t=Au(),n=e||jv(t),r=v.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:v.useCallback(l=>{r.current.dialog=l},[]),setBackdropRef:v.useCallback(l=>{r.current.backdrop=l},[])})}const dd=v.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:l,style:o,children:i,backdrop:u=!0,keyboard:s=!0,onBackdropClick:a,onEscapeKeyDown:m,transition:h,runTransition:d,backdropTransition:g,runBackdropTransition:S,autoFocus:k=!0,enforceFocus:j=!0,restoreFocus:f=!0,restoreFocusOptions:c,renderDialog:p,renderBackdrop:w=K=>y.jsx("div",Object.assign({},K)),manager:C,container:_,onShow:N,onHide:R=()=>{},onExit:B,onExited:P,onExiting:ie,onEnter:Ve,onEntering:Qe,onEntered:bt}=e,In=Rv(e,Tv);const Te=Au(),Ke=Ev(_),x=Lv(C),L=Ah(),O=Bh(n),[$,A]=v.useState(!n),fe=v.useRef(null);v.useImperativeHandle(t,()=>x,[x]),$n&&!O&&n&&(fe.current=$o(Te==null?void 0:Te.document)),n&&$&&A(!1);const Re=Pe(()=>{if(x.add(),tn.current=Il(document,"keydown",so),en.current=Il(document,"focus",()=>setTimeout(je),!0),N&&N(),k){var K,Dr;const Un=$o((K=(Dr=x.dialog)==null?void 0:Dr.ownerDocument)!=null?K:Te==null?void 0:Te.document);x.dialog&&Un&&!oa(x.dialog,Un)&&(fe.current=Un,x.dialog.focus())}}),qe=Pe(()=>{if(x.remove(),tn.current==null||tn.current(),en.current==null||en.current(),f){var K;(K=fe.current)==null||K.focus==null||K.focus(c),fe.current=null}});v.useEffect(()=>{!n||!Ke||Re()},[n,Ke,Re]),v.useEffect(()=>{$&&qe()},[$,qe]),Kf(()=>{qe()});const je=Pe(()=>{if(!j||!L()||!x.isTopModal())return;const K=$o(Te==null?void 0:Te.document);x.dialog&&K&&!oa(x.dialog,K)&&x.dialog.focus()}),dt=Pe(K=>{K.target===K.currentTarget&&(a==null||a(K),u===!0&&R())}),so=Pe(K=>{s&&Nv(K)&&x.isTopModal()&&(m==null||m(K),K.defaultPrevented||R())}),en=v.useRef(),tn=v.useRef(),An=(...K)=>{A(!0),P==null||P(...K)};if(!Ke)return null;const zr=Object.assign({role:r,ref:x.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},In,{style:o,className:l,tabIndex:-1});let Bn=p?p(zr):y.jsx("div",Object.assign({},zr,{children:v.cloneElement(i,{role:"document"})}));Bn=sa(h,d,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:B,onExiting:ie,onExited:An,onEnter:Ve,onEntering:Qe,onEntered:bt,children:Bn});let Mt=null;return u&&(Mt=w({ref:x.setBackdropRef,onClick:dt}),Mt=sa(g,S,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Mt})),y.jsx(y.Fragment,{children:Sn.createPortal(y.jsxs(y.Fragment,{children:[Mt,Bn]}),Ke)})});dd.displayName="Modal";const Ov=Object.assign(dd,{Manager:Wu});function Pv(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Fv(e,t){e.classList?e.classList.add(t):Pv(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function aa(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Mv(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=aa(e.className,t):e.setAttribute("class",aa(e.className&&e.className.baseVal||"",t))}const un={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class zv extends Wu{adjustAndStore(t,n,r){const l=n.style[t];n.dataset[t]=l,Qt(n,{[t]:`${parseFloat(Qt(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Qt(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Fv(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";on(n,un.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,t.scrollBarWidth)),on(n,un.STICKY_CONTENT).forEach(o=>this.adjustAndStore(l,o,-t.scrollBarWidth)),on(n,un.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(l,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();Mv(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";on(n,un.FIXED_CONTENT).forEach(o=>this.restore(r,o)),on(n,un.STICKY_CONTENT).forEach(o=>this.restore(l,o)),on(n,un.NAVBAR_TOGGLER).forEach(o=>this.restore(l,o))}}let Bo;function Dv(e){return Bo||(Bo=new zv(e)),Bo}const pd=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=W(t,"modal-body"),y.jsx(n,{ref:l,className:M(e,t),...r})));pd.displayName="ModalBody";const $v=pd,Iv=v.createContext({onHide(){}}),md=Iv,hd=v.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:l,fullscreen:o,children:i,scrollable:u,...s},a)=>{e=W(e,"modal");const m=`${e}-dialog`,h=typeof o=="string"?`${e}-fullscreen-${o}`:`${e}-fullscreen`;return y.jsx("div",{...s,ref:a,className:M(m,t,l&&`${e}-${l}`,r&&`${m}-centered`,u&&`${m}-scrollable`,o&&h),children:y.jsx("div",{className:M(`${e}-content`,n),children:i})})});hd.displayName="ModalDialog";const vd=hd,yd=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=W(t,"modal-footer"),y.jsx(n,{ref:l,className:M(e,t),...r})));yd.displayName="ModalFooter";const Av=yd,Bv=v.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:l,...o},i)=>{const u=v.useContext(md),s=Pe(()=>{u==null||u.onHide(),r==null||r()});return y.jsxs("div",{ref:i,...o,children:[l,n&&y.jsx(Hf,{"aria-label":e,variant:t,onClick:s})]})}),Uv=Bv,gd=v.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...l},o)=>(e=W(e,"modal-header"),y.jsx(Uv,{ref:o,...l,className:M(t,e),closeLabel:n,closeButton:r})));gd.displayName="ModalHeader";const Wv=gd,Hv=$f("h4"),wd=v.forwardRef(({className:e,bsPrefix:t,as:n=Hv,...r},l)=>(t=W(t,"modal-title"),y.jsx(n,{ref:l,className:M(e,t),...r})));wd.displayName="ModalTitle";const Vv=wd;function Qv(e){return y.jsx(Al,{...e,timeout:null})}function Kv(e){return y.jsx(Al,{...e,timeout:null})}const Sd=v.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:l,children:o,dialogAs:i=vd,"aria-labelledby":u,"aria-describedby":s,"aria-label":a,show:m=!1,animation:h=!0,backdrop:d=!0,keyboard:g=!0,onEscapeKeyDown:S,onShow:k,onHide:j,container:f,autoFocus:c=!0,enforceFocus:p=!0,restoreFocus:w=!0,restoreFocusOptions:C,onEntered:_,onExit:N,onExiting:R,onEnter:B,onEntering:P,onExited:ie,backdropClassName:Ve,manager:Qe,...bt},In)=>{const[Te,Ke]=v.useState({}),[x,L]=v.useState(!1),O=v.useRef(!1),$=v.useRef(!1),A=v.useRef(null),[fe,Re]=Ih(),qe=io(In,Re),je=Pe(j),dt=dh();e=W(e,"modal");const so=v.useMemo(()=>({onHide:je}),[je]);function en(){return Qe||Dv({isRTL:dt})}function tn(D){if(!$n)return;const nn=en().getScrollbarWidth()>0,Vu=D.scrollHeight>oo(D).documentElement.clientHeight;Ke({paddingRight:nn&&!Vu?ia():void 0,paddingLeft:!nn&&Vu?ia():void 0})}const An=Pe(()=>{fe&&tn(fe.dialog)});Kf(()=>{Ai(window,"resize",An),A.current==null||A.current()});const zr=()=>{O.current=!0},Bn=D=>{O.current&&fe&&D.target===fe.dialog&&($.current=!0),O.current=!1},Mt=()=>{L(!0),A.current=Df(fe.dialog,()=>{L(!1)})},K=D=>{D.target===D.currentTarget&&Mt()},Dr=D=>{if(d==="static"){K(D);return}if($.current||D.target!==D.currentTarget){$.current=!1;return}j==null||j()},Un=D=>{g?S==null||S(D):(D.preventDefault(),d==="static"&&Mt())},Rd=(D,nn)=>{D&&tn(D),B==null||B(D,nn)},jd=D=>{A.current==null||A.current(),N==null||N(D)},Ld=(D,nn)=>{P==null||P(D,nn),zf(window,"resize",An)},Od=D=>{D&&(D.style.display=""),ie==null||ie(D),Ai(window,"resize",An)},Pd=v.useCallback(D=>y.jsx("div",{...D,className:M(`${e}-backdrop`,Ve,!h&&"show")}),[h,Ve,e]),Hu={...n,...Te};Hu.display="block";const Fd=D=>y.jsx("div",{role:"dialog",...D,style:Hu,className:M(t,e,x&&`${e}-static`,!h&&"show"),onClick:d?Dr:void 0,onMouseUp:Bn,"aria-label":a,"aria-labelledby":u,"aria-describedby":s,children:y.jsx(i,{...bt,onMouseDown:zr,className:r,contentClassName:l,children:o})});return y.jsx(md.Provider,{value:so,children:y.jsx(Ov,{show:m,ref:qe,backdrop:d,container:f,keyboard:!0,autoFocus:c,enforceFocus:p,restoreFocus:w,restoreFocusOptions:C,onEscapeKeyDown:Un,onShow:k,onHide:j,onEnter:Rd,onEntering:Ld,onEntered:_,onExit:jd,onExiting:R,onExited:Od,manager:en(),transition:h?Qv:void 0,backdropTransition:h?Kv:void 0,renderBackdrop:Pd,renderDialog:Fd})})});Sd.displayName="Modal";const Zn=Object.assign(Sd,{Body:$v,Header:Wv,Title:Vv,Footer:Av,Dialog:vd,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),ca=1e3;function Gv(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(r*ca)/ca}function fa({min:e,now:t,max:n,label:r,visuallyHidden:l,striped:o,animated:i,className:u,style:s,variant:a,bsPrefix:m,...h},d){return y.jsx("div",{ref:d,...h,role:"progressbar",className:M(u,`${m}-bar`,{[`bg-${a}`]:a,[`${m}-bar-animated`]:i,[`${m}-bar-striped`]:i||o}),style:{width:`${Gv(t,e,n)}%`,...s},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:l?y.jsx("span",{className:"visually-hidden",children:r}):r})}const kd=v.forwardRef(({isChild:e=!1,...t},n)=>{const r={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(r.bsPrefix=W(r.bsPrefix,"progress"),e)return fa(r,n);const{min:l,now:o,max:i,label:u,visuallyHidden:s,striped:a,animated:m,bsPrefix:h,variant:d,className:g,children:S,...k}=r;return y.jsx("div",{ref:n,...k,className:M(g,h),children:S?nv(S,j=>v.cloneElement(j,{isChild:!0})):fa({min:l,now:o,max:i,label:u,visuallyHidden:s,striped:a,animated:m,bsPrefix:h,variant:d},n)})});kd.displayName="ProgressBar";const Yv=kd,Ed=v.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},l)=>{const o=W(e,"row"),i=jf(),u=Lf(),s=`${o}-cols`,a=[];return i.forEach(m=>{const h=r[m];delete r[m];let d;h!=null&&typeof h=="object"?{cols:d}=h:d=h;const g=m!==u?`-${m}`:"";d!=null&&a.push(`${s}${g}-${d}`)}),y.jsx(n,{ref:l,...r,className:M(t,o,...a)})});Ed.displayName="Row";const Xv=Ed,xd=v.forwardRef(({bsPrefix:e,variant:t,animation:n="border",size:r,as:l="div",className:o,...i},u)=>{e=W(e,"spinner");const s=`${e}-${n}`;return y.jsx(l,{ref:u,...i,className:M(o,s,r&&`${s}-${r}`,t&&`text-${t}`)})});xd.displayName="Spinner";const Cd=xd,Zv=window.origin==="null"||window.origin==="http://localhost:3031"?"http://localhost:3030":"",Mr=v.createContext(null);function Jv({detailsResponse:e,statsResponse:t}){const n=t.snapshot.total_bytes,l=t.snapshot.have_bytes/n*100;return y.jsxs("div",{className:"torrent-row d-flex flex-row p-3 bg-light rounded mb-3",children:[y.jsx(Jn,{label:"Name",value:cy(e)}),y.jsx(Jn,{label:"Size",value:`${Nd(n)} GB`}),y.jsx(qv,{label:"Progress",percentage:l}),y.jsx(Jn,{label:"Download Speed",value:t.download_speed.human_readable}),y.jsx(Jn,{label:"ETA",value:fy(t)}),y.jsx(Jn,{label:"Peers",value:`${t.snapshot.peer_stats.live} / ${t.snapshot.peer_stats.seen}`})]})}const Jn=({label:e,value:t})=>y.jsxs(uo,{className:`column-${e.toLowerCase().replace(" ","-")} me-3 p-2`,children:[y.jsx("p",{className:"font-weight-bold",children:e}),y.jsx("p",{children:t})]}),qv=({label:e,percentage:t})=>y.jsxs(uo,{className:"column-progress me-3 p-2",children:[y.jsx("p",{className:"font-weight-bold",children:e}),y.jsx(Yv,{now:t,label:`${t.toFixed(2)}%`})]}),bv=({torrent:e})=>{const t={info_hash:"",files:[]},n={snapshot:{have_bytes:0,downloaded_and_checked_bytes:0,downloaded_and_checked_pieces:0,fetched_bytes:0,uploaded_bytes:0,initially_needed_bytes:0,remaining_bytes:0,total_bytes:0,total_piece_download_ms:0,peer_stats:{queued:0,connecting:0,live:0,seen:0,dead:0,not_needed:0}},average_piece_download_time:{secs:0,nanos:0},download_speed:{mbps:0,human_readable:""},all_time_download_speed:{mbps:0,human_readable:""},time_remaining:{human_readable:""}},[r,l]=v.useState(t),[o,i]=v.useState(n);let u=v.useContext(Mr);v.useEffect(()=>{if(r===t)return dy(async()=>{await u.requests.getTorrentDetails(e.id).then(l)},1e3)},[r]);const s=async()=>u.requests.getTorrentStats(e.id).then(d=>(i(d),sy(d)?5e3:500),d=>1e4);return v.useEffect(()=>Td(s,0),[]),y.jsx(Jv,{detailsResponse:r,statsResponse:o})},ey=e=>e.torrents===null&&e.loading?y.jsx(Cd,{}):e.torrents===null?y.jsx(y.Fragment,{}):e.torrents.length===0?y.jsx("div",{className:"text-center",children:y.jsx("p",{children:"No existing torrents found. Add them through buttons below."})}):y.jsx("div",{children:e.torrents.map(t=>y.jsx(bv,{torrent:t},t.id))}),ty=()=>{const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,o]=v.useState(null),[i,u]=v.useState(!1),s=async(d,g,S)=>{console.log(d,g);const k=Zv+g,j={method:d,headers:{Accept:"application/json"},body:S};let f={method:d,path:g,text:""},c;try{c=await fetch(k,j)}catch{return f.text="network error",Promise.reject(f)}if(f.status=c.status,f.statusText=c.statusText,!c.ok){const w=await c.text();try{const C=JSON.parse(w);f.text=C.human_readable!==void 0?C.human_readable:JSON.stringify(C,null,2)}catch{f.text=w}return Promise.reject(f)}return await c.json()},a={getTorrentDetails:d=>s("GET",`/torrents/${d}`,null),getTorrentStats:d=>s("GET",`/torrents/${d}/stats`,null)},m=async()=>{u(!0);let d=await s("GET","/torrents",null).finally(()=>u(!1));return o(d.torrents),d};v.useEffect(()=>{let d=500;return Td(async()=>{try{return await m(),r(null),d}catch(S){return r({text:"Error refreshing torrents",details:S}),console.error(S),5e3}},d)},[]);const h={setCloseableError:t,setOtherError:r,makeRequest:s,requests:a,refreshTorrents:m};return y.jsx(Mr.Provider,{value:h,children:y.jsx(uy,{closeableError:e,otherError:n,torrents:l,torrentsLoading:i})})},ny=e=>{let{details:t}=e;return t?y.jsxs(y.Fragment,{children:[t.status&&y.jsxs("strong",{children:[t.status," ",t.statusText,": "]}),t.text]}):null},Wi=e=>{let{error:t,remove:n}=e;return t==null?null:y.jsxs(ev,{variant:"danger",children:[y.jsxs("strong",{children:[t.text,": "]}),y.jsx(ny,{details:t.details}),n&&y.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",onClick:n,children:y.jsx("span",{"aria-hidden":"true",children:"×"})})]})},_d=({buttonText:e,onClick:t,data:n,resetData:r,variant:l})=>{const[o,i]=v.useState(!1),[u,s]=v.useState(null),a=v.useContext(Mr),m=n!==null;v.useEffect(()=>{if(n===null)return;let d=setTimeout(async()=>{i(!0);try{const g=await a.makeRequest("POST","/torrents?list_only=true&overwrite=true",n);console.log(g),s(g.details.files)}catch(g){a.setCloseableError({text:"Error listing torrent",details:g}),h()}finally{i(!1)}},0);return()=>clearTimeout(d)},[n]);const h=()=>{r(),s(null),i(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(Bi,{variant:l,onClick:t,className:"mr-3",children:e}),y.jsx(oy,{show:m,onHide:h,fileList:u,data:n,fileListLoading:o})]})},ry=()=>{let[e,t]=v.useState(null);const n=()=>{const r=prompt("Enter magnet link or HTTP(s) URL");t(r===""?null:r)};return y.jsx(_d,{variant:"primary",buttonText:"Add Torrent from Magnet Link",onClick:n,data:e,resetData:()=>t(null)})},ly=()=>{const e=v.useRef(),[t,n]=v.useState(null),r=async()=>{const i=e.current.files[0];n(i)},l=()=>{e.current.value="",n(null)},o=()=>{e.current.click()};return y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"file",ref:e,accept:".torrent",onChange:r,className:"d-none"}),y.jsx(_d,{variant:"secondary",buttonText:"Upload .torrent File",onClick:o,data:t,resetData:l})]})},oy=e=>{let{show:t,onHide:n,fileList:r,fileListLoading:l,data:o}=e;const[i,u]=v.useState([]),[s,a]=v.useState(!1),[m,h]=v.useState(null);v.useEffect(()=>{u((r||[]).map((k,j)=>j))},[r]),r=r||[];let d=v.useContext(Mr);const g=k=>{i.includes(k)?u(i.filter(j=>j!==k)):u([...i,k])},S=async()=>{let j=`/torrents?overwrite=true${(()=>{let f=!0;return r.map((c,p)=>{f=f&&i.includes(p)}),f?"":"&only_files="+i.join(",")})()}`;a(!0),d.makeRequest("POST",j,o).then(()=>{n()},f=>{h({text:"Error starting torrent",details:f})}).finally(()=>a(!1))};return y.jsxs(Zn,{show:t,onHide:n,children:[y.jsx(Zn.Header,{closeButton:!0,children:y.jsx(Zn.Title,{children:"Select Files"})}),y.jsx(Zn.Body,{children:l?y.jsx(Cd,{}):y.jsxs(Xf,{children:[r.map((k,j)=>y.jsx(Xv,{children:y.jsx(uo,{children:y.jsx(wv.Check,{type:"checkbox",label:`${k.name} ${Nd(k.length)}`,checked:i.includes(j),onChange:()=>g(j)})})},j)),y.jsx(Wi,{error:m})]})}),y.jsxs(Zn.Footer,{children:[y.jsx(Bi,{variant:"secondary",onClick:n,children:"Cancel"}),y.jsx(Bi,{variant:"primary",onClick:S,disabled:l||s||i.length==0,children:"OK"})]})]})},iy=()=>y.jsxs("div",{id:"buttons-container",className:"mt-3",children:[y.jsx(ry,{}),y.jsx(ly,{})]}),uy=e=>{let t=v.useContext(Mr);return y.jsxs(Xf,{children:[y.jsx(Wi,{error:e.closeableError,remove:()=>t.setCloseableError(null)}),y.jsx(Wi,{error:e.otherError}),y.jsx(ey,{torrents:e.torrents,loading:e.torrentsLoading}),y.jsx(iy,{})]})};function sy(e){return e.snapshot.have_bytes==e.snapshot.total_bytes}async function ay(){const e=document.getElementById("output"),t=v.memo(ty,(n,r)=>!0);Uo.createRoot(e).render(y.jsx(v.StrictMode,{children:y.jsx(t,{})}))}function Nd(e){return(e/1073741824).toFixed(2)}function cy(e){return e.files.length==0?"Loading...":e.files.reduce((n,r)=>n.length>r.length?n:r).name}function fy(e){return e.time_remaining?e.time_remaining.human_readable:"N/A"}function Td(e,t){let n,r=t;const l=async()=>{if(r=await e(),r==null)throw"asyncCallback returned null or undefined";o()};let o=()=>{n=setTimeout(l,r)};return o(),()=>{clearTimeout(n)}}function dy(e,t){let n;const r=async()=>{await e().then(()=>{},()=>{})&&l()};let l=i=>{n=setTimeout(r,i!==void 0?i:t)};return l(0),()=>{clearTimeout(n)}}async function py(){await ay()}document.addEventListener("DOMContentLoaded",py); +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],l=0;l=0)&&(n[l]=e[l]);return n}function ta(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function ih(e){var t=uh(e,"string");return typeof t=="symbol"?t:String(t)}function uh(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sh(e,t,n){var r=v.useRef(e!==void 0),l=v.useState(t),o=l[0],i=l[1],u=e!==void 0,s=r.current;return r.current=u,!u&&s&&o!==t&&i(t),[u?e:o,v.useCallback(function(a){for(var m=arguments.length,h=new Array(m>1?m-1:0),d=1;d{o.target===e&&(l(),t(o))},n+r)}function Ph(e){e.offsetHeight}const la=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Fh(e,t){const n=la(e),r=la(t);return l=>{n&&n(l),r&&r(l)}}function io(e,t){return v.useMemo(()=>Fh(e,t),[e,t])}function Mh(e){return e&&"setState"in e?kn.findDOMNode(e):e??null}const zh=Bt.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:l,onExited:o,addEndListener:i,children:u,childRef:s,...a},m)=>{const h=v.useRef(null),d=io(h,s),g=_=>{d(Mh(_))},S=_=>N=>{_&&h.current&&_(h.current,N)},E=v.useCallback(S(e),[e]),j=v.useCallback(S(t),[t]),f=v.useCallback(S(n),[n]),c=v.useCallback(S(r),[r]),p=v.useCallback(S(l),[l]),w=v.useCallback(S(o),[o]),C=v.useCallback(S(i),[i]);return y.jsx(Th,{ref:m,...a,onEnter:E,onEntered:f,onEntering:j,onExit:c,onExited:w,onExiting:p,addEndListener:C,nodeRef:h,children:typeof u=="function"?(_,N)=>u(_,{...N,ref:g}):Bt.cloneElement(u,{ref:g})})}),$h=zh;function Dh(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e},[e]),t}function Pe(e){const t=Dh(e);return v.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const Bf=e=>v.forwardRef((t,n)=>y.jsx("div",{...t,ref:n,className:M(t.className,e)})),Af=Bf("h4");Af.displayName="DivStyledAsH4";const Uf=v.forwardRef(({className:e,bsPrefix:t,as:n=Af,...r},l)=>(t=H(t,"alert-heading"),y.jsx(n,{ref:l,className:M(e,t),...r})));Uf.displayName="AlertHeading";const Ih=Uf;function Bh(){return v.useState(null)}function Ah(){const e=v.useRef(!0),t=v.useRef(()=>e.current);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function Uh(e){const t=v.useRef(null);return v.useEffect(()=>{t.current=e}),t.current}const Hh=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Wh=typeof document<"u",oa=Wh||Hh?v.useLayoutEffect:v.useEffect,Vh=["as","disabled"];function Qh(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}function Kh(e){return!e||e.trim()==="#"}function Iu({tagName:e,disabled:t,href:n,target:r,rel:l,role:o,onClick:i,tabIndex:u=0,type:s}){e||(n!=null||r!=null||l!=null?e="a":e="button");const a={tagName:e};if(e==="button")return[{type:s||"button",disabled:t},a];const m=d=>{if((t||e==="a"&&Kh(n))&&d.preventDefault(),t){d.stopPropagation();return}i==null||i(d)},h=d=>{d.key===" "&&(d.preventDefault(),m(d))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?l:void 0,onClick:m,onKeyDown:h},a]}const Gh=v.forwardRef((e,t)=>{let{as:n,disabled:r}=e,l=Qh(e,Vh);const[o,{tagName:i}]=Iu(Object.assign({tagName:n,disabled:r},l));return y.jsx(i,Object.assign({},l,o,{ref:t}))});Gh.displayName="Button";const Yh=["onKeyDown"];function Xh(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}function Zh(e){return!e||e.trim()==="#"}const Hf=v.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=Xh(e,Yh);const[l]=Iu(Object.assign({tagName:"a"},r)),o=Pe(i=>{l.onKeyDown(i),n==null||n(i)});return Zh(r.href)||r.role==="button"?y.jsx("a",Object.assign({ref:t},r,l,{onKeyDown:o})):y.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Hf.displayName="Anchor";const Jh=Hf,Wf=v.forwardRef(({className:e,bsPrefix:t,as:n=Jh,...r},l)=>(t=H(t,"alert-link"),y.jsx(n,{ref:l,className:M(e,t),...r})));Wf.displayName="AlertLink";const qh=Wf,bh={[vt]:"show",[It]:"show"},Vf=v.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...l},o)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...l},u=v.useCallback((s,a)=>{Ph(s),r==null||r(s,a)},[r]);return y.jsx($h,{ref:o,addEndListener:Oh,...i,onEnter:u,childRef:t.ref,children:(s,a)=>v.cloneElement(t,{...a,className:M("fade",e,t.props.className,bh[s],n[s])})})});Vf.displayName="Fade";const Bl=Vf,ev={"aria-label":lt.string,onClick:lt.func,variant:lt.oneOf(["white"])},Bu=v.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},l)=>y.jsx("button",{ref:l,type:"button",className:M("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Bu.displayName="CloseButton";Bu.propTypes=ev;const Qf=Bu,Kf=v.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:l="Close alert",closeVariant:o,className:i,children:u,variant:s="primary",onClose:a,dismissible:m,transition:h=Bl,...d}=ah(e,{show:"onClose"}),g=H(n,"alert"),S=Pe(f=>{a&&a(!1,f)}),E=h===!0?Bl:h,j=y.jsxs("div",{role:"alert",...E?void 0:d,ref:t,className:M(i,g,s&&`${g}-${s}`,m&&`${g}-dismissible`),children:[m&&y.jsx(Qf,{onClick:S,"aria-label":l,variant:o}),u]});return E?y.jsx(E,{unmountOnExit:!0,...d,ref:void 0,in:r,children:j}):r?j:null});Kf.displayName="Alert";const ia=Object.assign(Kf,{Link:qh,Heading:Ih}),Gf=v.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:l=!1,disabled:o=!1,className:i,...u},s)=>{const a=H(t,"btn"),[m,{tagName:h}]=Iu({tagName:e,disabled:o,...u}),d=h;return y.jsx(d,{...m,...u,ref:s,disabled:o,className:M(i,a,l&&"active",n&&`${a}-${n}`,r&&`${a}-${r}`,u.href&&o&&"disabled")})});Gf.displayName="Button";const Ai=Gf;function tv(e){const t=v.useRef(e);return t.current=e,t}function Yf(e){const t=tv(e);v.useEffect(()=>()=>t.current(),[])}function nv(e,t){let n=0;return v.Children.map(e,r=>v.isValidElement(r)?t(r,n++):r)}function rv(e,t){return v.Children.toArray(e).some(n=>v.isValidElement(n)&&n.type===t)}function lv({as:e,bsPrefix:t,className:n,...r}){t=H(t,"col");const l=Of(),o=Pf(),i=[],u=[];return l.forEach(s=>{const a=r[s];delete r[s];let m,h,d;typeof a=="object"&&a!=null?{span:m,offset:h,order:d}=a:m=a;const g=s!==o?`-${s}`:"";m&&i.push(m===!0?`${t}${g}`:`${t}${g}-${m}`),d!=null&&u.push(`order${g}-${d}`),h!=null&&u.push(`offset${g}-${h}`)}),[{...r,className:M(n,...i,...u)},{as:e,bsPrefix:t,spans:i}]}const Xf=v.forwardRef((e,t)=>{const[{className:n,...r},{as:l="div",bsPrefix:o,spans:i}]=lv(e);return y.jsx(l,{...r,ref:t,className:M(n,!i.length&&o)})});Xf.displayName="Col";const Zf=Xf,Jf=v.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...l},o)=>{const i=H(e,"container"),u=typeof t=="string"?`-${t}`:"-fluid";return y.jsx(n,{ref:o,...l,className:M(r,t?`${i}${u}`:i)})});Jf.displayName="Container";const ov=Jf;var iv=Function.prototype.bind.call(Function.prototype.call,[].slice);function on(e,t){return iv(e.querySelectorAll(t))}function ua(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const uv="data-rr-ui-";function sv(e){return`${uv}${e}`}const qf=v.createContext(In?window:void 0);qf.Provider;function Au(){return v.useContext(qf)}const av={type:lt.string,tooltip:lt.bool,as:lt.elementType},Uu=v.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...l},o)=>y.jsx(e,{...l,ref:o,className:M(t,`${n}-${r?"tooltip":"feedback"}`)}));Uu.displayName="Feedback";Uu.propTypes=av;const bf=Uu,cv=v.createContext({}),at=cv,ed=v.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:l=!1,isInvalid:o=!1,as:i="input",...u},s)=>{const{controlId:a}=v.useContext(at);return t=H(t,"form-check-input"),y.jsx(i,{...u,ref:s,type:r,id:e||a,className:M(n,t,l&&"is-valid",o&&"is-invalid")})});ed.displayName="FormCheckInput";const td=ed,nd=v.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},l)=>{const{controlId:o}=v.useContext(at);return e=H(e,"form-check-label"),y.jsx("label",{...r,ref:l,htmlFor:n||o,className:M(t,e)})});nd.displayName="FormCheckLabel";const Ui=nd,rd=v.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:a,feedbackType:m,className:h,style:d,title:g="",type:S="checkbox",label:E,children:j,as:f="input",...c},p)=>{t=H(t,"form-check"),n=H(n,"form-switch");const{controlId:w}=v.useContext(at),C=v.useMemo(()=>({controlId:e||w}),[w,e]),_=!j&&E!=null&&E!==!1||rv(j,Ui),N=y.jsx(td,{...c,type:S==="switch"?"checkbox":S,ref:p,isValid:i,isInvalid:u,disabled:o,as:f});return y.jsx(at.Provider,{value:C,children:y.jsx("div",{style:d,className:M(h,_&&t,r&&`${t}-inline`,l&&`${t}-reverse`,S==="switch"&&n),children:j||y.jsxs(y.Fragment,{children:[N,_&&y.jsx(Ui,{title:g,children:E}),a&&y.jsx(bf,{type:m,tooltip:s,children:a})]})})})});rd.displayName="FormCheck";const Al=Object.assign(rd,{Input:td,Label:Ui}),ld=v.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:l,className:o,isValid:i=!1,isInvalid:u=!1,plaintext:s,readOnly:a,as:m="input",...h},d)=>{const{controlId:g}=v.useContext(at);return e=H(e,"form-control"),y.jsx(m,{...h,type:t,size:r,ref:d,readOnly:a,id:l||g,className:M(o,s?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,i&&"is-valid",u&&"is-invalid")})});ld.displayName="FormControl";const fv=Object.assign(ld,{Feedback:bf}),od=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=H(t,"form-floating"),y.jsx(n,{ref:l,className:M(e,t),...r})));od.displayName="FormFloating";const dv=od,id=v.forwardRef(({controlId:e,as:t="div",...n},r)=>{const l=v.useMemo(()=>({controlId:e}),[e]);return y.jsx(at.Provider,{value:l,children:y.jsx(t,{...n,ref:r})})});id.displayName="FormGroup";const ud=id,sd=v.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:l,htmlFor:o,...i},u)=>{const{controlId:s}=v.useContext(at);t=H(t,"form-label");let a="col-form-label";typeof n=="string"&&(a=`${a} ${a}-${n}`);const m=M(l,t,r&&"visually-hidden",n&&a);return o=o||s,n?y.jsx(Zf,{ref:u,as:"label",className:m,htmlFor:o,...i}):y.jsx(e,{ref:u,className:m,htmlFor:o,...i})});sd.displayName="FormLabel";const pv=sd,ad=v.forwardRef(({bsPrefix:e,className:t,id:n,...r},l)=>{const{controlId:o}=v.useContext(at);return e=H(e,"form-range"),y.jsx("input",{...r,type:"range",ref:l,className:M(t,e),id:n||o})});ad.displayName="FormRange";const mv=ad,cd=v.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:l=!1,isInvalid:o=!1,id:i,...u},s)=>{const{controlId:a}=v.useContext(at);return e=H(e,"form-select"),y.jsx("select",{...u,size:n,ref:s,className:M(r,e,t&&`${e}-${t}`,l&&"is-valid",o&&"is-invalid"),id:i||a})});cd.displayName="FormSelect";const hv=cd,fd=v.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...l},o)=>(e=H(e,"form-text"),y.jsx(n,{...l,ref:o,className:M(t,e,r&&"text-muted")})));fd.displayName="FormText";const vv=fd,dd=v.forwardRef((e,t)=>y.jsx(Al,{...e,ref:t,type:"switch"}));dd.displayName="Switch";const yv=Object.assign(dd,{Input:Al.Input,Label:Al.Label}),pd=v.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:l,...o},i)=>(e=H(e,"form-floating"),y.jsxs(ud,{ref:i,className:M(t,e),controlId:r,...o,children:[n,y.jsx("label",{htmlFor:r,children:l})]})));pd.displayName="FloatingLabel";const gv=pd,wv={_ref:lt.any,validated:lt.bool,as:lt.elementType},Hu=v.forwardRef(({className:e,validated:t,as:n="form",...r},l)=>y.jsx(n,{...r,ref:l,className:M(e,t&&"was-validated")}));Hu.displayName="Form";Hu.propTypes=wv;const $o=Object.assign(Hu,{Group:ud,Control:fv,Floating:dv,Check:Al,Switch:yv,Label:pv,Text:vv,Range:mv,Select:hv,FloatingLabel:gv});var tl;function sa(e){if((!tl&&tl!==0||e)&&In){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),tl=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return tl}function Do(e){e===void 0&&(e=oo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function Sv(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const aa=sv("modal-open");class kv{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Sv(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",l=this.getElement();t.style={overflow:l.style.overflow,[r]:l.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(Qt(l,r)||"0",10)+t.scrollBarWidth}px`),l.setAttribute(aa,""),Qt(l,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(aa),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Wu=kv,Io=(e,t)=>In?e==null?(t||oo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ev(e,t){const n=Au(),[r,l]=v.useState(()=>Io(e,n==null?void 0:n.document));if(!r){const o=Io(e);o&&l(o)}return v.useEffect(()=>{t&&r&&t(r)},[t,r]),v.useEffect(()=>{const o=Io(e);o!==r&&l(o)},[e,r]),r}function xv({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:l}){const o=v.useRef(null),i=v.useRef(t),u=Pe(n);v.useEffect(()=>{t?i.current=!0:u(o.current)},[t,u]);const s=io(o,e.ref),a=v.cloneElement(e,{ref:s});return t?a:l||!i.current&&r?null:a}function Cv({in:e,onTransition:t}){const n=v.useRef(null),r=v.useRef(!0),l=Pe(t);return oa(()=>{if(!n.current)return;let o=!1;return l({in:e,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[e,l]),oa(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function _v({children:e,in:t,onExited:n,onEntered:r,transition:l}){const[o,i]=v.useState(!t);t&&o&&i(!1);const u=Cv({in:!!t,onTransition:a=>{const m=()=>{a.isStale()||(a.in?r==null||r(a.element,a.initial):(i(!0),n==null||n(a.element)))};Promise.resolve(l(a)).then(m,h=>{throw a.in||i(!0),h})}}),s=io(u,e.ref);return o&&!t?null:v.cloneElement(e,{ref:s})}function ca(e,t,n){return e?y.jsx(e,Object.assign({},n)):t?y.jsx(_v,Object.assign({},n,{transition:t})):y.jsx(xv,Object.assign({},n))}function Nv(e){return e.code==="Escape"||e.keyCode===27}const Tv=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Rv(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,o;for(o=0;o=0)&&(n[l]=e[l]);return n}let Bo;function jv(e){return Bo||(Bo=new Wu({ownerDocument:e==null?void 0:e.document})),Bo}function Lv(e){const t=Au(),n=e||jv(t),r=v.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:v.useCallback(l=>{r.current.dialog=l},[]),setBackdropRef:v.useCallback(l=>{r.current.backdrop=l},[])})}const md=v.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:l,style:o,children:i,backdrop:u=!0,keyboard:s=!0,onBackdropClick:a,onEscapeKeyDown:m,transition:h,runTransition:d,backdropTransition:g,runBackdropTransition:S,autoFocus:E=!0,enforceFocus:j=!0,restoreFocus:f=!0,restoreFocusOptions:c,renderDialog:p,renderBackdrop:w=K=>y.jsx("div",Object.assign({},K)),manager:C,container:_,onShow:N,onHide:R=()=>{},onExit:A,onExited:P,onExiting:ie,onEnter:Ve,onEntering:Qe,onEntered:bt}=e,Bn=Rv(e,Tv);const Te=Au(),Ke=Ev(_),x=Lv(C),L=Ah(),O=Uh(n),[D,B]=v.useState(!n),fe=v.useRef(null);v.useImperativeHandle(t,()=>x,[x]),In&&!O&&n&&(fe.current=Do(Te==null?void 0:Te.document)),n&&D&&B(!1);const Re=Pe(()=>{if(x.add(),tn.current=Il(document,"keydown",uo),en.current=Il(document,"focus",()=>setTimeout(je),!0),N&&N(),E){var K,$r;const Hn=Do((K=($r=x.dialog)==null?void 0:$r.ownerDocument)!=null?K:Te==null?void 0:Te.document);x.dialog&&Hn&&!ua(x.dialog,Hn)&&(fe.current=Hn,x.dialog.focus())}}),qe=Pe(()=>{if(x.remove(),tn.current==null||tn.current(),en.current==null||en.current(),f){var K;(K=fe.current)==null||K.focus==null||K.focus(c),fe.current=null}});v.useEffect(()=>{!n||!Ke||Re()},[n,Ke,Re]),v.useEffect(()=>{D&&qe()},[D,qe]),Yf(()=>{qe()});const je=Pe(()=>{if(!j||!L()||!x.isTopModal())return;const K=Do(Te==null?void 0:Te.document);x.dialog&&K&&!ua(x.dialog,K)&&x.dialog.focus()}),dt=Pe(K=>{K.target===K.currentTarget&&(a==null||a(K),u===!0&&R())}),uo=Pe(K=>{s&&Nv(K)&&x.isTopModal()&&(m==null||m(K),K.defaultPrevented||R())}),en=v.useRef(),tn=v.useRef(),An=(...K)=>{B(!0),P==null||P(...K)};if(!Ke)return null;const zr=Object.assign({role:r,ref:x.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},Bn,{style:o,className:l,tabIndex:-1});let Un=p?p(zr):y.jsx("div",Object.assign({},zr,{children:v.cloneElement(i,{role:"document"})}));Un=ca(h,d,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:A,onExiting:ie,onExited:An,onEnter:Ve,onEntering:Qe,onEntered:bt,children:Un});let Mt=null;return u&&(Mt=w({ref:x.setBackdropRef,onClick:dt}),Mt=ca(g,S,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Mt})),y.jsx(y.Fragment,{children:kn.createPortal(y.jsxs(y.Fragment,{children:[Mt,Un]}),Ke)})});md.displayName="Modal";const Ov=Object.assign(md,{Manager:Wu});function Pv(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Fv(e,t){e.classList?e.classList.add(t):Pv(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function fa(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Mv(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=fa(e.className,t):e.setAttribute("class",fa(e.className&&e.className.baseVal||"",t))}const un={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class zv extends Wu{adjustAndStore(t,n,r){const l=n.style[t];n.dataset[t]=l,Qt(n,{[t]:`${parseFloat(Qt(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Qt(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Fv(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";on(n,un.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,t.scrollBarWidth)),on(n,un.STICKY_CONTENT).forEach(o=>this.adjustAndStore(l,o,-t.scrollBarWidth)),on(n,un.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(l,o,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();Mv(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",l=this.isRTL?"marginLeft":"marginRight";on(n,un.FIXED_CONTENT).forEach(o=>this.restore(r,o)),on(n,un.STICKY_CONTENT).forEach(o=>this.restore(l,o)),on(n,un.NAVBAR_TOGGLER).forEach(o=>this.restore(l,o))}}let Ao;function $v(e){return Ao||(Ao=new zv(e)),Ao}const hd=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=H(t,"modal-body"),y.jsx(n,{ref:l,className:M(e,t),...r})));hd.displayName="ModalBody";const Dv=hd,Iv=v.createContext({onHide(){}}),vd=Iv,yd=v.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:l,fullscreen:o,children:i,scrollable:u,...s},a)=>{e=H(e,"modal");const m=`${e}-dialog`,h=typeof o=="string"?`${e}-fullscreen-${o}`:`${e}-fullscreen`;return y.jsx("div",{...s,ref:a,className:M(m,t,l&&`${e}-${l}`,r&&`${m}-centered`,u&&`${m}-scrollable`,o&&h),children:y.jsx("div",{className:M(`${e}-content`,n),children:i})})});yd.displayName="ModalDialog";const gd=yd,wd=v.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},l)=>(t=H(t,"modal-footer"),y.jsx(n,{ref:l,className:M(e,t),...r})));wd.displayName="ModalFooter";const Bv=wd,Av=v.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:l,...o},i)=>{const u=v.useContext(vd),s=Pe(()=>{u==null||u.onHide(),r==null||r()});return y.jsxs("div",{ref:i,...o,children:[l,n&&y.jsx(Qf,{"aria-label":e,variant:t,onClick:s})]})}),Uv=Av,Sd=v.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...l},o)=>(e=H(e,"modal-header"),y.jsx(Uv,{ref:o,...l,className:M(t,e),closeLabel:n,closeButton:r})));Sd.displayName="ModalHeader";const Hv=Sd,Wv=Bf("h4"),kd=v.forwardRef(({className:e,bsPrefix:t,as:n=Wv,...r},l)=>(t=H(t,"modal-title"),y.jsx(n,{ref:l,className:M(e,t),...r})));kd.displayName="ModalTitle";const Vv=kd;function Qv(e){return y.jsx(Bl,{...e,timeout:null})}function Kv(e){return y.jsx(Bl,{...e,timeout:null})}const Ed=v.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:l,children:o,dialogAs:i=gd,"aria-labelledby":u,"aria-describedby":s,"aria-label":a,show:m=!1,animation:h=!0,backdrop:d=!0,keyboard:g=!0,onEscapeKeyDown:S,onShow:E,onHide:j,container:f,autoFocus:c=!0,enforceFocus:p=!0,restoreFocus:w=!0,restoreFocusOptions:C,onEntered:_,onExit:N,onExiting:R,onEnter:A,onEntering:P,onExited:ie,backdropClassName:Ve,manager:Qe,...bt},Bn)=>{const[Te,Ke]=v.useState({}),[x,L]=v.useState(!1),O=v.useRef(!1),D=v.useRef(!1),B=v.useRef(null),[fe,Re]=Bh(),qe=io(Bn,Re),je=Pe(j),dt=ph();e=H(e,"modal");const uo=v.useMemo(()=>({onHide:je}),[je]);function en(){return Qe||$v({isRTL:dt})}function tn($){if(!In)return;const nn=en().getScrollbarWidth()>0,Qu=$.scrollHeight>oo($).documentElement.clientHeight;Ke({paddingRight:nn&&!Qu?sa():void 0,paddingLeft:!nn&&Qu?sa():void 0})}const An=Pe(()=>{fe&&tn(fe.dialog)});Yf(()=>{Bi(window,"resize",An),B.current==null||B.current()});const zr=()=>{O.current=!0},Un=$=>{O.current&&fe&&$.target===fe.dialog&&(D.current=!0),O.current=!1},Mt=()=>{L(!0),B.current=If(fe.dialog,()=>{L(!1)})},K=$=>{$.target===$.currentTarget&&Mt()},$r=$=>{if(d==="static"){K($);return}if(D.current||$.target!==$.currentTarget){D.current=!1;return}j==null||j()},Hn=$=>{g?S==null||S($):($.preventDefault(),d==="static"&&Mt())},jd=($,nn)=>{$&&tn($),A==null||A($,nn)},Ld=$=>{B.current==null||B.current(),N==null||N($)},Od=($,nn)=>{P==null||P($,nn),Df(window,"resize",An)},Pd=$=>{$&&($.style.display=""),ie==null||ie($),Bi(window,"resize",An)},Fd=v.useCallback($=>y.jsx("div",{...$,className:M(`${e}-backdrop`,Ve,!h&&"show")}),[h,Ve,e]),Vu={...n,...Te};Vu.display="block";const Md=$=>y.jsx("div",{role:"dialog",...$,style:Vu,className:M(t,e,x&&`${e}-static`,!h&&"show"),onClick:d?$r:void 0,onMouseUp:Un,"aria-label":a,"aria-labelledby":u,"aria-describedby":s,children:y.jsx(i,{...bt,onMouseDown:zr,className:r,contentClassName:l,children:o})});return y.jsx(vd.Provider,{value:uo,children:y.jsx(Ov,{show:m,ref:qe,backdrop:d,container:f,keyboard:!0,autoFocus:c,enforceFocus:p,restoreFocus:w,restoreFocusOptions:C,onEscapeKeyDown:Hn,onShow:E,onHide:j,onEnter:jd,onEntering:Od,onEntered:_,onExit:Ld,onExiting:R,onExited:Pd,manager:en(),transition:h?Qv:void 0,backdropTransition:h?Kv:void 0,renderBackdrop:Fd,renderDialog:Md})})});Ed.displayName="Modal";const Jn=Object.assign(Ed,{Body:Dv,Header:Hv,Title:Vv,Footer:Bv,Dialog:gd,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),da=1e3;function Gv(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(r*da)/da}function pa({min:e,now:t,max:n,label:r,visuallyHidden:l,striped:o,animated:i,className:u,style:s,variant:a,bsPrefix:m,...h},d){return y.jsx("div",{ref:d,...h,role:"progressbar",className:M(u,`${m}-bar`,{[`bg-${a}`]:a,[`${m}-bar-animated`]:i,[`${m}-bar-striped`]:i||o}),style:{width:`${Gv(t,e,n)}%`,...s},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:l?y.jsx("span",{className:"visually-hidden",children:r}):r})}const xd=v.forwardRef(({isChild:e=!1,...t},n)=>{const r={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(r.bsPrefix=H(r.bsPrefix,"progress"),e)return pa(r,n);const{min:l,now:o,max:i,label:u,visuallyHidden:s,striped:a,animated:m,bsPrefix:h,variant:d,className:g,children:S,...E}=r;return y.jsx("div",{ref:n,...E,className:M(g,h),children:S?nv(S,j=>v.cloneElement(j,{isChild:!0})):pa({min:l,now:o,max:i,label:u,visuallyHidden:s,striped:a,animated:m,bsPrefix:h,variant:d},n)})});xd.displayName="ProgressBar";const Yv=xd,Cd=v.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},l)=>{const o=H(e,"row"),i=Of(),u=Pf(),s=`${o}-cols`,a=[];return i.forEach(m=>{const h=r[m];delete r[m];let d;h!=null&&typeof h=="object"?{cols:d}=h:d=h;const g=m!==u?`-${m}`:"";d!=null&&a.push(`${s}${g}-${d}`)}),y.jsx(n,{ref:l,...r,className:M(t,o,...a)})});Cd.displayName="Row";const Xv=Cd,_d=v.forwardRef(({bsPrefix:e,variant:t,animation:n="border",size:r,as:l="div",className:o,...i},u)=>{e=H(e,"spinner");const s=`${e}-${n}`;return y.jsx(l,{ref:u,...i,className:M(o,s,r&&`${s}-${r}`,t&&`text-${t}`)})});_d.displayName="Spinner";const Hi=_d,Zv=window.origin==="null"||window.origin==="http://localhost:3031"?"http://localhost:3030":"",Mr=v.createContext(null),Jv=({id:e,detailsResponse:t,statsResponse:n})=>{const r=n.snapshot.total_bytes,l=n.snapshot.have_bytes,o=r==l,i=l/r*100;let u=[];return e%2==0&&u.push("bg-light"),y.jsxs(Xv,{className:u.join(" "),children:[y.jsx(sn,{size:4,label:"Name",children:y.jsx("div",{className:"text-truncate",children:ay(t)})}),y.jsx(sn,{label:"Size",children:`${Td(r)}`}),y.jsx(sn,{size:2,label:"Progress",children:y.jsx(Yv,{now:i,label:`${i.toFixed(2)}%`,animated:!o})}),y.jsx(sn,{size:2,label:"Down Speed",children:n.download_speed.human_readable}),y.jsx(sn,{label:"ETA",children:cy(n)}),y.jsx(sn,{size:2,label:"Peers",children:`${n.snapshot.peer_stats.live} / ${n.snapshot.peer_stats.seen}`})]})},sn=({size:e,label:t,children:n})=>y.jsxs(Zf,{md:e||1,className:"py-3",children:[y.jsx("div",{className:"fw-bold",children:t}),n]}),qv=({id:e,torrent:t})=>{const n={info_hash:"",files:[]},r={snapshot:{have_bytes:0,downloaded_and_checked_bytes:0,downloaded_and_checked_pieces:0,fetched_bytes:0,uploaded_bytes:0,initially_needed_bytes:0,remaining_bytes:0,total_bytes:0,total_piece_download_ms:0,peer_stats:{queued:0,connecting:0,live:0,seen:0,dead:0,not_needed:0}},average_piece_download_time:{secs:0,nanos:0},download_speed:{mbps:0,human_readable:""},all_time_download_speed:{mbps:0,human_readable:""},time_remaining:{human_readable:""}},[l,o]=v.useState(n),[i,u]=v.useState(r);let s=v.useContext(Mr);v.useEffect(()=>{if(l===n)return dy(async()=>{await s.requests.getTorrentDetails(t.id).then(o)},1e3)},[l]);const a=async()=>s.requests.getTorrentStats(t.id).then(g=>(u(g),uy(g)?5e3:500),g=>1e4);return v.useEffect(()=>Rd(a,0),[]),y.jsx(Jv,{id:e,detailsResponse:l,statsResponse:i})},bv=e=>e.torrents===null&&e.loading?y.jsx(Hi,{}):e.torrents===null?y.jsx(y.Fragment,{}):e.torrents.length===0?y.jsx("div",{className:"text-center",children:y.jsx("p",{children:"No existing torrents found. Add them through buttons below."})}):y.jsx(y.Fragment,{children:e.torrents.map(t=>y.jsx(qv,{id:t.id,torrent:t},t.id))}),ey=()=>{const[e,t]=v.useState(null),[n,r]=v.useState(null),[l,o]=v.useState(null),[i,u]=v.useState(!1),s=async(d,g,S)=>{console.log(d,g);const E=Zv+g,j={method:d,headers:{Accept:"application/json"},body:S};let f={method:d,path:g,text:""},c;try{c=await fetch(E,j)}catch{return f.text="network error",Promise.reject(f)}if(f.status=c.status,f.statusText=c.statusText,!c.ok){const w=await c.text();try{const C=JSON.parse(w);f.text=C.human_readable!==void 0?C.human_readable:JSON.stringify(C,null,2)}catch{f.text=w}return Promise.reject(f)}return await c.json()},a={getTorrentDetails:d=>s("GET",`/torrents/${d}`,null),getTorrentStats:d=>s("GET",`/torrents/${d}/stats`,null)},m=async()=>{u(!0);let d=await s("GET","/torrents",null).finally(()=>u(!1));return o(d.torrents),d};v.useEffect(()=>{let d=500;return Rd(async()=>{try{return await m(),r(null),d}catch(S){return r({text:"Error refreshing torrents",details:S}),console.error(S),5e3}},d)},[]);const h={setCloseableError:t,setOtherError:r,makeRequest:s,requests:a,refreshTorrents:m};return y.jsx(Mr.Provider,{value:h,children:y.jsxs("div",{className:"text-center",children:[y.jsx("h1",{className:"mt-3 mb-4",children:"rqbit web 0.0.1-alpha"}),y.jsx(iy,{closeableError:e,otherError:n,torrents:l,torrentsLoading:i})]})})},ty=e=>{let{details:t}=e;return t?y.jsxs(y.Fragment,{children:[t.status&&y.jsxs("strong",{children:[t.status," ",t.statusText,": "]}),t.text]}):null},Wi=e=>{let{error:t,remove:n}=e;return t==null?null:y.jsxs(ia,{variant:"danger",onClose:n,dismissible:!!n,children:[y.jsx(ia.Heading,{children:t.text}),y.jsx(ty,{details:t.details})]})},Nd=({buttonText:e,onClick:t,data:n,resetData:r,variant:l})=>{const[o,i]=v.useState(!1),[u,s]=v.useState(null),a=v.useContext(Mr),m=n!==null;v.useEffect(()=>{if(n===null)return;let d=setTimeout(async()=>{i(!0);try{const g=await a.makeRequest("POST","/torrents?list_only=true&overwrite=true",n);console.log(g),s(g.details.files)}catch(g){a.setCloseableError({text:"Error listing torrent",details:g}),h()}finally{i(!1)}},0);return()=>clearTimeout(d)},[n]);const h=()=>{r(),s(null),i(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(Ai,{variant:l,onClick:t,className:"m-1",children:e}),y.jsx(ly,{show:m,onHide:h,fileList:u,data:n,fileListLoading:o})]})},ny=()=>{let[e,t]=v.useState(null);const n=()=>{const r=prompt("Enter magnet link or HTTP(s) URL");t(r===""?null:r)};return y.jsx(Nd,{variant:"primary",buttonText:"Add Torrent from Magnet Link",onClick:n,data:e,resetData:()=>t(null)})},ry=()=>{const e=v.useRef(),[t,n]=v.useState(null),r=async()=>{const i=e.current.files[0];n(i)},l=()=>{e.current.value="",n(null)},o=()=>{e.current.click()};return y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"file",ref:e,accept:".torrent",onChange:r,className:"d-none"}),y.jsx(Nd,{variant:"secondary",buttonText:"Upload .torrent File",onClick:o,data:t,resetData:l})]})},ly=e=>{let{show:t,onHide:n,fileList:r,fileListLoading:l,data:o}=e;const[i,u]=v.useState([]),[s,a]=v.useState(!1),[m,h]=v.useState(null);v.useEffect(()=>{u((r||[]).map((j,f)=>f))},[r]),r=r||[];let d=v.useContext(Mr);const g=()=>{n(),u([]),h(null),a(!1)},S=j=>{i.includes(j)?u(i.filter(f=>f!==j)):u([...i,j])},E=async()=>{let f=`/torrents?overwrite=true${(()=>{let c=!0;return r.map((p,w)=>{c=c&&i.includes(w)}),c?"":"&only_files="+i.join(",")})()}`;a(!0),d.makeRequest("POST",f,o).then(()=>{n()},c=>{h({text:"Error starting torrent",details:c})}).finally(()=>a(!1))};return y.jsxs(Jn,{show:t,onHide:g,size:"lg",children:[y.jsx(Jn.Header,{closeButton:!0,children:y.jsx(Jn.Title,{children:"Select Files"})}),y.jsx(Jn.Body,{children:l?y.jsx(Hi,{}):y.jsxs(y.Fragment,{children:[y.jsx($o,{children:r.map((j,f)=>y.jsx($o.Group,{controlId:`check-${f}`,children:y.jsx($o.Check,{type:"checkbox",label:`${j.name} (${Td(j.length)})`,checked:i.includes(f),onChange:()=>S(f)})},f))}),y.jsx(Wi,{error:m})]})}),y.jsxs(Jn.Footer,{children:[s&&y.jsx(Hi,{}),y.jsx(Ai,{variant:"secondary",onClick:g,children:"Cancel"}),y.jsx(Ai,{variant:"primary",onClick:E,disabled:l||s||i.length==0,children:"OK"})]})]})},oy=()=>y.jsxs("div",{id:"buttons-container",className:"mt-3",children:[y.jsx(ny,{}),y.jsx(ry,{})]}),iy=e=>{let t=v.useContext(Mr);return y.jsxs(ov,{children:[y.jsx(Wi,{error:e.closeableError,remove:()=>t.setCloseableError(null)}),y.jsx(Wi,{error:e.otherError}),y.jsx(bv,{torrents:e.torrents,loading:e.torrentsLoading}),y.jsx(oy,{})]})};function uy(e){return e.snapshot.have_bytes==e.snapshot.total_bytes}async function sy(){const e=document.getElementById("app");Uo.createRoot(e).render(y.jsx(v.StrictMode,{children:y.jsx(ey,{})}))}function Td(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function ay(e){return e.files.length==0?"Loading...":e.files.reduce((n,r)=>n.length>r.length?n:r).name}function cy(e){return e.time_remaining&&e.time_remaining.duration?fy(e.time_remaining.duration.secs):"N/A"}function fy(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,l=(o,i)=>o>0?`${o}${i}`:"";return t>0?`${l(t,"h")} ${l(n,"m")}`.trim():n>0?`${l(n,"m")} ${l(r,"s")}`.trim():`${l(r,"s")}`.trim()}function Rd(e,t){let n,r=t;const l=async()=>{if(r=await e(),r==null)throw"asyncCallback returned null or undefined";o()};let o=()=>{n=setTimeout(l,r)};return o(),()=>{clearTimeout(n)}}function dy(e,t){let n;const r=async()=>{await e().then(()=>{},()=>{})&&l()};let l=i=>{n=setTimeout(r,i!==void 0?i:t)};return l(0),()=>{clearTimeout(n)}}async function py(){await sy()}document.addEventListener("DOMContentLoaded",py); diff --git a/crates/librqbit/webui/dist/index.html b/crates/librqbit/webui/dist/index.html index 9f83197..3031320 100644 --- a/crates/librqbit/webui/dist/index.html +++ b/crates/librqbit/webui/dist/index.html @@ -8,19 +8,11 @@ - -
-

rqbit web 0.0.1-alpha

-
-
+
diff --git a/crates/librqbit/webui/index.html b/crates/librqbit/webui/index.html index 946a616..29217f0 100644 --- a/crates/librqbit/webui/index.html +++ b/crates/librqbit/webui/index.html @@ -6,8 +6,8 @@ rqbit web 0.0.1-alpha - + diff --git a/crates/librqbit/webui/package.json b/crates/librqbit/webui/package.json index ac60ccc..4e771db 100644 --- a/crates/librqbit/webui/package.json +++ b/crates/librqbit/webui/package.json @@ -7,8 +7,6 @@ "preview": "vite preview" }, "dependencies": { - "@vitejs/plugin-react": "^4.2.0", - "bootstrap": "^5.3.2", "react": "^18.2.0", "react-bootstrap": "^2.9.1", "react-dom": "^18.2.0" @@ -16,8 +14,7 @@ "devDependencies": { "@types/react": "^18.2.38", "@types/react-dom": "^18.2.16", - "sass": "^1.69.5", "typescript": "^5.3.2", "vite": "^4.3.2" } -} +} \ No newline at end of file diff --git a/crates/librqbit/webui/src/index.tsx b/crates/librqbit/webui/src/index.tsx index 61753ea..90eeff5 100644 --- a/crates/librqbit/webui/src/index.tsx +++ b/crates/librqbit/webui/src/index.tsx @@ -2,8 +2,8 @@ import { StrictMode, createContext, memo, useContext, useEffect, useRef, useStat import ReactDOM from 'react-dom/client'; import { ProgressBar, Button, Container, Row, Col, Alert, Modal, Form, Spinner, Table } from 'react-bootstrap'; -import 'bootstrap/dist/css/bootstrap.min.css'; -import './styles.scss'; +// import 'bootstrap/dist/css/bootstrap.min.css'; +// import './styles.scss'; // Define API URL and base path const apiUrl = (window.origin === 'null' || window.origin === 'http://localhost:3031') ? 'http://localhost:3030' : ''; diff --git a/crates/librqbit/webui/src/styles.scss b/crates/librqbit/webui/src/styles.scss deleted file mode 100644 index 8d19a50..0000000 --- a/crates/librqbit/webui/src/styles.scss +++ /dev/null @@ -1,3 +0,0 @@ -$font-size-base: 0.9rem; - -@import 'node_modules/bootstrap/scss/bootstrap'; \ No newline at end of file