4bfc7592a6
- Solo registra "caída" cuando ffmpeg sale en <25s (error real: DNS, 403, auth, stall) - Timeouts de sesión del proveedor (~2 min) NO se registran como fallos — son normales - "Recuperado" se registra cuando el stream vuelve a funcionar tras un fallo real - Añade clasificación automática de causa: conexión rechazada, DNS, 403, timeout... - Dashboard: "reinicios" ahora distingue sesiones del proveedor (gris, normal) vs fallos (rojo) - Registro: nueva columna "Duración fallo", proveedor+dominio juntos, filas con color de fondo - StreamEvent: campo pump_duration_secs para persistir duración del fallo o interrupción Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
279 lines
330 KiB
JavaScript
279 lines
330 KiB
JavaScript
function Im(s,a){for(var i=0;i<a.length;i++){const u=a[i];if(typeof u!="string"&&!Array.isArray(u)){for(const d in u)if(d!=="default"&&!(d in s)){const f=Object.getOwnPropertyDescriptor(u,d);f&&Object.defineProperty(s,d,f.get?f:{enumerable:!0,get:()=>u[d]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function i(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=i(d);fetch(d.href,f)}})();function nf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var no={exports:{}},Es={},ro={exports:{}},be={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var vd;function $m(){if(vd)return be;vd=1;var s=Symbol.for("react.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),C=Symbol.iterator;function z(b){return b===null||typeof b!="object"?null:(b=C&&b[C]||b["@@iterator"],typeof b=="function"?b:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,P={};function N(b,I,te){this.props=b,this.context=I,this.refs=P,this.updater=te||B}N.prototype.isReactComponent={},N.prototype.setState=function(b,I){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,I,"setState")},N.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function A(){}A.prototype=N.prototype;function M(b,I,te){this.props=b,this.context=I,this.refs=P,this.updater=te||B}var K=M.prototype=new A;K.constructor=M,L(K,N.prototype),K.isPureReactComponent=!0;var Q=Array.isArray,me=Object.prototype.hasOwnProperty,fe={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function ae(b,I,te){var pe,ye={},Ne=null,we=null;if(I!=null)for(pe in I.ref!==void 0&&(we=I.ref),I.key!==void 0&&(Ne=""+I.key),I)me.call(I,pe)&&!O.hasOwnProperty(pe)&&(ye[pe]=I[pe]);var oe=arguments.length-2;if(oe===1)ye.children=te;else if(1<oe){for(var F=Array(oe),ne=0;ne<oe;ne++)F[ne]=arguments[ne+2];ye.children=F}if(b&&b.defaultProps)for(pe in oe=b.defaultProps,oe)ye[pe]===void 0&&(ye[pe]=oe[pe]);return{$$typeof:s,type:b,key:Ne,ref:we,props:ye,_owner:fe.current}}function de(b,I){return{$$typeof:s,type:b.type,key:I,ref:b.ref,props:b.props,_owner:b._owner}}function Y(b){return typeof b=="object"&&b!==null&&b.$$typeof===s}function ke(b){var I={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return I[te]})}var Te=/\/+/g;function ze(b,I){return typeof b=="object"&&b!==null&&b.key!=null?ke(""+b.key):I.toString(36)}function Ee(b,I,te,pe,ye){var Ne=typeof b;(Ne==="undefined"||Ne==="boolean")&&(b=null);var we=!1;if(b===null)we=!0;else switch(Ne){case"string":case"number":we=!0;break;case"object":switch(b.$$typeof){case s:case a:we=!0}}if(we)return we=b,ye=ye(we),b=pe===""?"."+ze(we,0):pe,Q(ye)?(te="",b!=null&&(te=b.replace(Te,"$&/")+"/"),Ee(ye,I,te,"",function(ne){return ne})):ye!=null&&(Y(ye)&&(ye=de(ye,te+(!ye.key||we&&we.key===ye.key?"":(""+ye.key).replace(Te,"$&/")+"/")+b)),I.push(ye)),1;if(we=0,pe=pe===""?".":pe+":",Q(b))for(var oe=0;oe<b.length;oe++){Ne=b[oe];var F=pe+ze(Ne,oe);we+=Ee(Ne,I,te,F,ye)}else if(F=z(b),typeof F=="function")for(b=F.call(b),oe=0;!(Ne=b.next()).done;)Ne=Ne.value,F=pe+ze(Ne,oe++),we+=Ee(Ne,I,te,F,ye);else if(Ne==="object")throw I=String(b),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return we}function q(b,I,te){if(b==null)return b;var pe=[],ye=0;return Ee(b,pe,"","",function(Ne){return I.call(te,Ne,ye++)}),pe}function ge(b){if(b._status===-1){var I=b._result;I=I(),I.then(function(te){(b._status===0||b._status===-1)&&(b._status=1,b._result=te)},function(te){(b._status===0||b._status===-1)&&(b._status=2,b._result=te)}),b._status===-1&&(b._status=0,b._result=I)}if(b._status===1)return b._result.default;throw b._result}var D={current:null},U={transition:null},ee={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:U,ReactCurrentOwner:fe};function G(){throw Error("act(...) is not supported in production builds of React.")}return be.Children={map:q,forEach:function(b,I,te){q(b,function(){I.apply(this,arguments)},te)},count:function(b){var I=0;return q(b,function(){I++}),I},toArray:function(b){return q(b,function(I){return I})||[]},only:function(b){if(!Y(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},be.Component=N,be.Fragment=i,be.Profiler=d,be.PureComponent=M,be.StrictMode=u,be.Suspense=x,be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,be.act=G,be.cloneElement=function(b,I,te){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var pe=L({},b.props),ye=b.key,Ne=b.ref,we=b._owner;if(I!=null){if(I.ref!==void 0&&(Ne=I.ref,we=fe.current),I.key!==void 0&&(ye=""+I.key),b.type&&b.type.defaultProps)var oe=b.type.defaultProps;for(F in I)me.call(I,F)&&!O.hasOwnProperty(F)&&(pe[F]=I[F]===void 0&&oe!==void 0?oe[F]:I[F])}var F=arguments.length-2;if(F===1)pe.children=te;else if(1<F){oe=Array(F);for(var ne=0;ne<F;ne++)oe[ne]=arguments[ne+2];pe.children=oe}return{$$typeof:s,type:b.type,key:ye,ref:Ne,props:pe,_owner:we}},be.createContext=function(b){return b={$$typeof:m,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:f,_context:b},b.Consumer=b},be.createElement=ae,be.createFactory=function(b){var I=ae.bind(null,b);return I.type=b,I},be.createRef=function(){return{current:null}},be.forwardRef=function(b){return{$$typeof:h,render:b}},be.isValidElement=Y,be.lazy=function(b){return{$$typeof:k,_payload:{_status:-1,_result:b},_init:ge}},be.memo=function(b,I){return{$$typeof:y,type:b,compare:I===void 0?null:I}},be.startTransition=function(b){var I=U.transition;U.transition={};try{b()}finally{U.transition=I}},be.unstable_act=G,be.useCallback=function(b,I){return D.current.useCallback(b,I)},be.useContext=function(b){return D.current.useContext(b)},be.useDebugValue=function(){},be.useDeferredValue=function(b){return D.current.useDeferredValue(b)},be.useEffect=function(b,I){return D.current.useEffect(b,I)},be.useId=function(){return D.current.useId()},be.useImperativeHandle=function(b,I,te){return D.current.useImperativeHandle(b,I,te)},be.useInsertionEffect=function(b,I){return D.current.useInsertionEffect(b,I)},be.useLayoutEffect=function(b,I){return D.current.useLayoutEffect(b,I)},be.useMemo=function(b,I){return D.current.useMemo(b,I)},be.useReducer=function(b,I,te){return D.current.useReducer(b,I,te)},be.useRef=function(b){return D.current.useRef(b)},be.useState=function(b){return D.current.useState(b)},be.useSyncExternalStore=function(b,I,te){return D.current.useSyncExternalStore(b,I,te)},be.useTransition=function(){return D.current.useTransition()},be.version="18.3.1",be}var wd;function To(){return wd||(wd=1,ro.exports=$m()),ro.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var jd;function Bm(){if(jd)return Es;jd=1;var s=To(),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function m(h,x,y){var k,C={},z=null,B=null;y!==void 0&&(z=""+y),x.key!==void 0&&(z=""+x.key),x.ref!==void 0&&(B=x.ref);for(k in x)u.call(x,k)&&!f.hasOwnProperty(k)&&(C[k]=x[k]);if(h&&h.defaultProps)for(k in x=h.defaultProps,x)C[k]===void 0&&(C[k]=x[k]);return{$$typeof:a,type:h,key:z,ref:B,props:C,_owner:d.current}}return Es.Fragment=i,Es.jsx=m,Es.jsxs=m,Es}var kd;function Vm(){return kd||(kd=1,no.exports=Bm()),no.exports}var l=Vm(),v=To();const rf=nf(v),Hm=Im({__proto__:null,default:rf},[v]);var Yl={},so={exports:{}},gt={},lo={exports:{}},ao={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Nd;function Wm(){return Nd||(Nd=1,(function(s){function a(U,ee){var G=U.length;U.push(ee);e:for(;0<G;){var b=G-1>>>1,I=U[b];if(0<d(I,ee))U[b]=ee,U[G]=I,G=b;else break e}}function i(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var ee=U[0],G=U.pop();if(G!==ee){U[0]=G;e:for(var b=0,I=U.length,te=I>>>1;b<te;){var pe=2*(b+1)-1,ye=U[pe],Ne=pe+1,we=U[Ne];if(0>d(ye,G))Ne<I&&0>d(we,ye)?(U[b]=we,U[Ne]=G,b=Ne):(U[b]=ye,U[pe]=G,b=pe);else if(Ne<I&&0>d(we,G))U[b]=we,U[Ne]=G,b=Ne;else break e}}return ee}function d(U,ee){var G=U.sortIndex-ee.sortIndex;return G!==0?G:U.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,h=m.now();s.unstable_now=function(){return m.now()-h}}var x=[],y=[],k=1,C=null,z=3,B=!1,L=!1,P=!1,N=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function K(U){for(var ee=i(y);ee!==null;){if(ee.callback===null)u(y);else if(ee.startTime<=U)u(y),ee.sortIndex=ee.expirationTime,a(x,ee);else break;ee=i(y)}}function Q(U){if(P=!1,K(U),!L)if(i(x)!==null)L=!0,ge(me);else{var ee=i(y);ee!==null&&D(Q,ee.startTime-U)}}function me(U,ee){L=!1,P&&(P=!1,A(ae),ae=-1),B=!0;var G=z;try{for(K(ee),C=i(x);C!==null&&(!(C.expirationTime>ee)||U&&!ke());){var b=C.callback;if(typeof b=="function"){C.callback=null,z=C.priorityLevel;var I=b(C.expirationTime<=ee);ee=s.unstable_now(),typeof I=="function"?C.callback=I:C===i(x)&&u(x),K(ee)}else u(x);C=i(x)}if(C!==null)var te=!0;else{var pe=i(y);pe!==null&&D(Q,pe.startTime-ee),te=!1}return te}finally{C=null,z=G,B=!1}}var fe=!1,O=null,ae=-1,de=5,Y=-1;function ke(){return!(s.unstable_now()-Y<de)}function Te(){if(O!==null){var U=s.unstable_now();Y=U;var ee=!0;try{ee=O(!0,U)}finally{ee?ze():(fe=!1,O=null)}}else fe=!1}var ze;if(typeof M=="function")ze=function(){M(Te)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,q=Ee.port2;Ee.port1.onmessage=Te,ze=function(){q.postMessage(null)}}else ze=function(){N(Te,0)};function ge(U){O=U,fe||(fe=!0,ze())}function D(U,ee){ae=N(function(){U(s.unstable_now())},ee)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(U){U.callback=null},s.unstable_continueExecution=function(){L||B||(L=!0,ge(me))},s.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<U?Math.floor(1e3/U):5},s.unstable_getCurrentPriorityLevel=function(){return z},s.unstable_getFirstCallbackNode=function(){return i(x)},s.unstable_next=function(U){switch(z){case 1:case 2:case 3:var ee=3;break;default:ee=z}var G=z;z=ee;try{return U()}finally{z=G}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=z;z=U;try{return ee()}finally{z=G}},s.unstable_scheduleCallback=function(U,ee,G){var b=s.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?b+G:b):G=b,U){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=G+I,U={id:k++,callback:ee,priorityLevel:U,startTime:G,expirationTime:I,sortIndex:-1},G>b?(U.sortIndex=G,a(y,U),i(x)===null&&U===i(y)&&(P?(A(ae),ae=-1):P=!0,D(Q,G-b))):(U.sortIndex=I,a(x,U),L||B||(L=!0,ge(me))),U},s.unstable_shouldYield=ke,s.unstable_wrapCallback=function(U){var ee=z;return function(){var G=z;z=ee;try{return U.apply(this,arguments)}finally{z=G}}}})(ao)),ao}var Sd;function qm(){return Sd||(Sd=1,lo.exports=Wm()),lo.exports}/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var bd;function Km(){if(bd)return gt;bd=1;var s=To(),a=qm();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=new Set,d={};function f(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(d[e]=t,e=0;e<t.length;e++)u.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,y=/^[: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]*$/,k={},C={};function z(e){return x.call(C,e)?!0:x.call(k,e)?!1:y.test(e)?C[e]=!0:(k[e]=!0,!1)}function B(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 L(e,t,n,r){if(t===null||typeof t>"u"||B(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 P(e,t,n,r,o,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new P(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new P(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new P(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new P(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){N[e]=new P(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new P(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new P(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new P(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new P(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function M(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(A,M);N[t]=new P(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(A,M);N[t]=new P(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(A,M);N[t]=new P(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new P(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new P(e,1,!1,e.toLowerCase(),null,!0,!0)});function K(e,t,n,r){var o=N.hasOwnProperty(t)?N[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(L(t,n,o,r)&&(n=null),r||o===null?z(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Q=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,me=Symbol.for("react.element"),fe=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),ke=Symbol.for("react.context"),Te=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),U=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,b;function I(e){if(b===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);b=t&&t[1]||""}return`
|
||
`+b+e}var te=!1;function pe(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(T){var r=T}Reflect.construct(e,[],t)}else{try{t.call()}catch(T){r=T}e.call(t.prototype)}else{try{throw Error()}catch(T){r=T}e()}}catch(T){if(T&&r&&typeof T.stack=="string"){for(var o=T.stack.split(`
|
||
`),c=r.stack.split(`
|
||
`),p=o.length-1,g=c.length-1;1<=p&&0<=g&&o[p]!==c[g];)g--;for(;1<=p&&0<=g;p--,g--)if(o[p]!==c[g]){if(p!==1||g!==1)do if(p--,g--,0>g||o[p]!==c[g]){var j=`
|
||
`+o[p].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=p&&0<=g);break}}}finally{te=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function ye(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function Ne(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 O:return"Fragment";case fe:return"Portal";case de:return"Profiler";case ae:return"StrictMode";case ze:return"Suspense";case Ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ke:return(e.displayName||"Context")+".Consumer";case Y:return(e._context.displayName||"Context")+".Provider";case Te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:Ne(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return Ne(e(t))}catch{}}return null}function we(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 Ne(t);case 8:return t===ae?"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 oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function F(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ne(e){var t=F(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 o=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){r=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function je(e){e._valueTracker||(e._valueTracker=ne(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=F(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function De(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 Le(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fr(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=oe(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 Ur(e,t){t=t.checked,t!=null&&K(e,"checked",t,!1)}function wt(e,t){Ur(e,t);var n=oe(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")?Mr(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mr(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rr(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 Mr(e,t,n){(t!=="number"||De(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zn=Array.isArray;function an(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+oe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ir(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(i(92));if(zn(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:oe(n)}}function Us(e,t){var n=oe(t.value),r=oe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ms(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Is(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $r(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Is(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sr,$s=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(sr=sr||document.createElement("div"),sr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Dn={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},va=["Webkit","ms","Moz","O"];Object.keys(Dn).forEach(function(e){va.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Dn[t]=Dn[e]})});function Bs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Dn.hasOwnProperty(e)&&Dn[e]?(""+t).trim():t+"px"}function Vs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Bs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var wa=G({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 Br(e,t){if(t){if(wa[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function on(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 Vr=null;function Hr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wr=null,Qt=null,w=null;function $(e){if(e=ps(e)){if(typeof Wr!="function")throw Error(i(280));var t=e.stateNode;t&&(t=fl(t),Wr(e.stateNode,e.type,t))}}function ue(e){Qt?w?w.push(e):w=[e]:Qt=e}function Se(){if(Qt){var e=Qt,t=w;if(w=Qt=null,$(e),t)for(e=0;e<t.length;e++)$(t[e])}}function Ae(e,t){return e(t)}function $e(){}var lr=!1;function qr(e,t,n){if(lr)return e(t,n);lr=!0;try{return Ae(e,t,n)}finally{lr=!1,(Qt!==null||w!==null)&&($e(),Se())}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=fl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var $t=!1;if(h)try{var Kr={};Object.defineProperty(Kr,"passive",{get:function(){$t=!0}}),window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{$t=!1}function qf(e,t,n,r,o,c,p,g,j){var T=Array.prototype.slice.call(arguments,3);try{t.apply(n,T)}catch(H){this.onError(H)}}var Qr=!1,Hs=null,Ws=!1,ja=null,Kf={onError:function(e){Qr=!0,Hs=e}};function Qf(e,t,n,r,o,c,p,g,j){Qr=!1,Hs=null,qf.apply(Kf,arguments)}function Jf(e,t,n,r,o,c,p,g,j){if(Qf.apply(this,arguments),Qr){if(Qr){var T=Hs;Qr=!1,Hs=null}else throw Error(i(198));Ws||(Ws=!0,ja=T)}}function Fn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Bo(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Vo(e){if(Fn(e)!==e)throw Error(i(188))}function Gf(e){var t=e.alternate;if(!t){if(t=Fn(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return Vo(o),e;if(c===r)return Vo(o),t;c=c.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=c;else{for(var p=!1,g=o.child;g;){if(g===n){p=!0,n=o,r=c;break}if(g===r){p=!0,r=o,n=c;break}g=g.sibling}if(!p){for(g=c.child;g;){if(g===n){p=!0,n=c,r=o;break}if(g===r){p=!0,r=c,n=o;break}g=g.sibling}if(!p)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function Ho(e){return e=Gf(e),e!==null?Wo(e):null}function Wo(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Wo(e);if(t!==null)return t;e=e.sibling}return null}var qo=a.unstable_scheduleCallback,Ko=a.unstable_cancelCallback,Yf=a.unstable_shouldYield,Xf=a.unstable_requestPaint,Ke=a.unstable_now,Zf=a.unstable_getCurrentPriorityLevel,ka=a.unstable_ImmediatePriority,Qo=a.unstable_UserBlockingPriority,qs=a.unstable_NormalPriority,ep=a.unstable_LowPriority,Jo=a.unstable_IdlePriority,Ks=null,Bt=null;function tp(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Ks,e,void 0,(e.current.flags&128)===128)}catch{}}var Lt=Math.clz32?Math.clz32:sp,np=Math.log,rp=Math.LN2;function sp(e){return e>>>=0,e===0?32:31-(np(e)/rp|0)|0}var Qs=64,Js=4194304;function Jr(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 Gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,c=e.pingedLanes,p=n&268435455;if(p!==0){var g=p&~o;g!==0?r=Jr(g):(c&=p,c!==0&&(r=Jr(c)))}else p=n&~o,p!==0?r=Jr(p):c!==0&&(r=Jr(c));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,c=t&-t,o>=c||o===16&&(c&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Lt(t),o=1<<n,r|=e[n],t&=~o;return r}function lp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ap(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes;0<c;){var p=31-Lt(c),g=1<<p,j=o[p];j===-1?((g&n)===0||(g&r)!==0)&&(o[p]=lp(g,t)):j<=t&&(e.expiredLanes|=g),c&=~g}}function Na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Go(){var e=Qs;return Qs<<=1,(Qs&4194240)===0&&(Qs=64),e}function Sa(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function ip(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<n;){var o=31-Lt(n),c=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~c}}function ba(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Lt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Oe=0;function Yo(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Xo,_a,Zo,eu,tu,Ca=!1,Ys=[],cn=null,dn=null,fn=null,Yr=new Map,Xr=new Map,pn=[],op="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function nu(e,t){switch(e){case"focusin":case"focusout":cn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":Yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xr.delete(t.pointerId)}}function Zr(e,t,n,r,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:c,targetContainers:[o]},t!==null&&(t=ps(t),t!==null&&_a(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function up(e,t,n,r,o){switch(t){case"focusin":return cn=Zr(cn,e,t,n,r,o),!0;case"dragenter":return dn=Zr(dn,e,t,n,r,o),!0;case"mouseover":return fn=Zr(fn,e,t,n,r,o),!0;case"pointerover":var c=o.pointerId;return Yr.set(c,Zr(Yr.get(c)||null,e,t,n,r,o)),!0;case"gotpointercapture":return c=o.pointerId,Xr.set(c,Zr(Xr.get(c)||null,e,t,n,r,o)),!0}return!1}function ru(e){var t=Un(e.target);if(t!==null){var n=Fn(t);if(n!==null){if(t=n.tag,t===13){if(t=Bo(n),t!==null){e.blockedOn=t,tu(e.priority,function(){Zo(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Vr=r,n.target.dispatchEvent(r),Vr=null}else return t=ps(n),t!==null&&_a(t),e.blockedOn=n,!1;t.shift()}return!0}function su(e,t,n){Xs(e)&&n.delete(t)}function cp(){Ca=!1,cn!==null&&Xs(cn)&&(cn=null),dn!==null&&Xs(dn)&&(dn=null),fn!==null&&Xs(fn)&&(fn=null),Yr.forEach(su),Xr.forEach(su)}function es(e,t){e.blockedOn===t&&(e.blockedOn=null,Ca||(Ca=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,cp)))}function ts(e){function t(o){return es(o,e)}if(0<Ys.length){es(Ys[0],e);for(var n=1;n<Ys.length;n++){var r=Ys[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cn!==null&&es(cn,e),dn!==null&&es(dn,e),fn!==null&&es(fn,e),Yr.forEach(t),Xr.forEach(t),n=0;n<pn.length;n++)r=pn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pn.length&&(n=pn[0],n.blockedOn===null);)ru(n),n.blockedOn===null&&pn.shift()}var ar=Q.ReactCurrentBatchConfig,Zs=!0;function dp(e,t,n,r){var o=Oe,c=ar.transition;ar.transition=null;try{Oe=1,Ea(e,t,n,r)}finally{Oe=o,ar.transition=c}}function fp(e,t,n,r){var o=Oe,c=ar.transition;ar.transition=null;try{Oe=4,Ea(e,t,n,r)}finally{Oe=o,ar.transition=c}}function Ea(e,t,n,r){if(Zs){var o=Pa(e,t,n,r);if(o===null)qa(e,t,r,el,n),nu(e,r);else if(up(o,e,t,n,r))r.stopPropagation();else if(nu(e,r),t&4&&-1<op.indexOf(e)){for(;o!==null;){var c=ps(o);if(c!==null&&Xo(c),c=Pa(e,t,n,r),c===null&&qa(e,t,r,el,n),c===o)break;o=c}o!==null&&r.stopPropagation()}else qa(e,t,r,null,n)}}var el=null;function Pa(e,t,n,r){if(el=null,e=Hr(r),e=Un(e),e!==null)if(t=Fn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Bo(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return el=e,null}function lu(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zf()){case ka:return 1;case Qo:return 4;case qs:case ep:return 16;case Jo:return 536870912;default:return 16}default:return 16}}var mn=null,Ra=null,tl=null;function au(){if(tl)return tl;var e,t=Ra,n=t.length,r,o="value"in mn?mn.value:mn.textContent,c=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(r=1;r<=p&&t[n-r]===o[c-r];r++);return tl=o.slice(e,1<r?1-r:void 0)}function nl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rl(){return!0}function iu(){return!1}function jt(e){function t(n,r,o,c,p){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(c):c[g]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?rl:iu,this.isPropagationStopped=iu,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=rl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=rl)},persist:function(){},isPersistent:rl}),t}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ta=jt(ir),ns=G({},ir,{view:0,detail:0}),pp=jt(ns),La,Oa,rs,sl=G({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Aa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(La=e.screenX-rs.screenX,Oa=e.screenY-rs.screenY):Oa=La=0,rs=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Oa}}),ou=jt(sl),mp=G({},sl,{dataTransfer:0}),hp=jt(mp),xp=G({},ns,{relatedTarget:0}),za=jt(xp),gp=G({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),yp=jt(gp),vp=G({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wp=jt(vp),jp=G({},ir,{data:0}),uu=jt(jp),kp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Np={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sp[e])?!!t[e]:!1}function Aa(){return bp}var _p=G({},ns,{key:function(e){if(e.key){var t=kp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Np[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Aa,charCode:function(e){return e.type==="keypress"?nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cp=jt(_p),Ep=G({},sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cu=jt(Ep),Pp=G({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Aa}),Rp=jt(Pp),Tp=G({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lp=jt(Tp),Op=G({},sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zp=jt(Op),Ap=[9,13,27,32],Da=h&&"CompositionEvent"in window,ss=null;h&&"documentMode"in document&&(ss=document.documentMode);var Dp=h&&"TextEvent"in window&&!ss,du=h&&(!Da||ss&&8<ss&&11>=ss),fu=" ",pu=!1;function mu(e,t){switch(e){case"keyup":return Ap.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function Fp(e,t){switch(e){case"compositionend":return hu(t);case"keypress":return t.which!==32?null:(pu=!0,fu);case"textInput":return e=t.data,e===fu&&pu?null:e;default:return null}}function Up(e,t){if(or)return e==="compositionend"||!Da&&mu(e,t)?(e=au(),tl=Ra=mn=null,or=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return du&&t.locale!=="ko"?null:t.data;default:return null}}var Mp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mp[e.type]:t==="textarea"}function gu(e,t,n,r){ue(r),t=ul(t,"onChange"),0<t.length&&(n=new Ta("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,as=null;function Ip(e){Au(e,0)}function ll(e){var t=pr(e);if(_e(t))return e}function $p(e,t){if(e==="change")return t}var yu=!1;if(h){var Fa;if(h){var Ua="oninput"in document;if(!Ua){var vu=document.createElement("div");vu.setAttribute("oninput","return;"),Ua=typeof vu.oninput=="function"}Fa=Ua}else Fa=!1;yu=Fa&&(!document.documentMode||9<document.documentMode)}function wu(){ls&&(ls.detachEvent("onpropertychange",ju),as=ls=null)}function ju(e){if(e.propertyName==="value"&&ll(as)){var t=[];gu(t,as,e,Hr(e)),qr(Ip,t)}}function Bp(e,t,n){e==="focusin"?(wu(),ls=t,as=n,ls.attachEvent("onpropertychange",ju)):e==="focusout"&&wu()}function Vp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ll(as)}function Hp(e,t){if(e==="click")return ll(t)}function Wp(e,t){if(e==="input"||e==="change")return ll(t)}function qp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:qp;function is(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!x.call(t,o)||!Ot(e[o],t[o]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nu(e,t){var n=ku(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=ku(n)}}function Su(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Su(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bu(){for(var e=window,t=De();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=De(e.document)}return t}function Ma(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 Kp(e){var t=bu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Su(n.ownerDocument.documentElement,n)){if(r!==null&&Ma(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 o=n.textContent.length,c=Math.min(r.start,o);r=r.end===void 0?c:Math.min(r.end,o),!e.extend&&c>r&&(o=r,r=c,c=o),o=Nu(n,c);var p=Nu(n,r);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),c>r?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Qp=h&&"documentMode"in document&&11>=document.documentMode,ur=null,Ia=null,os=null,$a=!1;function _u(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$a||ur==null||ur!==De(r)||(r=ur,"selectionStart"in r&&Ma(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}),os&&is(os,r)||(os=r,r=ul(Ia,"onSelect"),0<r.length&&(t=new Ta("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ur)))}function al(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:al("Animation","AnimationEnd"),animationiteration:al("Animation","AnimationIteration"),animationstart:al("Animation","AnimationStart"),transitionend:al("Transition","TransitionEnd")},Ba={},Cu={};h&&(Cu=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function il(e){if(Ba[e])return Ba[e];if(!cr[e])return e;var t=cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cu)return Ba[e]=t[n];return e}var Eu=il("animationend"),Pu=il("animationiteration"),Ru=il("animationstart"),Tu=il("transitionend"),Lu=new Map,Ou="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function hn(e,t){Lu.set(e,t),f(t,[e])}for(var Va=0;Va<Ou.length;Va++){var Ha=Ou[Va],Jp=Ha.toLowerCase(),Gp=Ha[0].toUpperCase()+Ha.slice(1);hn(Jp,"on"+Gp)}hn(Eu,"onAnimationEnd"),hn(Pu,"onAnimationIteration"),hn(Ru,"onAnimationStart"),hn("dblclick","onDoubleClick"),hn("focusin","onFocus"),hn("focusout","onBlur"),hn(Tu,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),f("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),f("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),f("onBeforeInput",["compositionend","keypress","textInput","paste"]),f("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),f("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yp=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function zu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jf(r,t,void 0,e),e.currentTarget=null}function Au(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var c=void 0;if(t)for(var p=r.length-1;0<=p;p--){var g=r[p],j=g.instance,T=g.currentTarget;if(g=g.listener,j!==c&&o.isPropagationStopped())break e;zu(o,g,T),c=j}else for(p=0;p<r.length;p++){if(g=r[p],j=g.instance,T=g.currentTarget,g=g.listener,j!==c&&o.isPropagationStopped())break e;zu(o,g,T),c=j}}}if(Ws)throw e=ja,Ws=!1,ja=null,e}function Ue(e,t){var n=t[Xa];n===void 0&&(n=t[Xa]=new Set);var r=e+"__bubble";n.has(r)||(Du(t,e,2,!1),n.add(r))}function Wa(e,t,n){var r=0;t&&(r|=4),Du(n,e,r,t)}var ol="_reactListening"+Math.random().toString(36).slice(2);function cs(e){if(!e[ol]){e[ol]=!0,u.forEach(function(n){n!=="selectionchange"&&(Yp.has(n)||Wa(n,!1,e),Wa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ol]||(t[ol]=!0,Wa("selectionchange",!1,t))}}function Du(e,t,n,r){switch(lu(t)){case 1:var o=dp;break;case 4:o=fp;break;default:o=Ea}n=o.bind(null,t,n,e),o=void 0,!$t||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function qa(e,t,n,r,o){var c=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var p=r.tag;if(p===3||p===4){var g=r.stateNode.containerInfo;if(g===o||g.nodeType===8&&g.parentNode===o)break;if(p===4)for(p=r.return;p!==null;){var j=p.tag;if((j===3||j===4)&&(j=p.stateNode.containerInfo,j===o||j.nodeType===8&&j.parentNode===o))return;p=p.return}for(;g!==null;){if(p=Un(g),p===null)return;if(j=p.tag,j===5||j===6){r=c=p;continue e}g=g.parentNode}}r=r.return}qr(function(){var T=c,H=Hr(n),W=[];e:{var V=Lu.get(e);if(V!==void 0){var Z=Ta,se=e;switch(e){case"keypress":if(nl(n)===0)break e;case"keydown":case"keyup":Z=Cp;break;case"focusin":se="focus",Z=za;break;case"focusout":se="blur",Z=za;break;case"beforeblur":case"afterblur":Z=za;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=ou;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Rp;break;case Eu:case Pu:case Ru:Z=yp;break;case Tu:Z=Lp;break;case"scroll":Z=pp;break;case"wheel":Z=zp;break;case"copy":case"cut":case"paste":Z=wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=cu}var ie=(t&4)!==0,Qe=!ie&&e==="scroll",E=ie?V!==null?V+"Capture":null:V;ie=[];for(var S=T,R;S!==null;){R=S;var J=R.stateNode;if(R.tag===5&&J!==null&&(R=J,E!==null&&(J=un(S,E),J!=null&&ie.push(ds(S,J,R)))),Qe)break;S=S.return}0<ie.length&&(V=new Z(V,se,null,n,H),W.push({event:V,listeners:ie}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",V&&n!==Vr&&(se=n.relatedTarget||n.fromElement)&&(Un(se)||se[Jt]))break e;if((Z||V)&&(V=H.window===H?H:(V=H.ownerDocument)?V.defaultView||V.parentWindow:window,Z?(se=n.relatedTarget||n.toElement,Z=T,se=se?Un(se):null,se!==null&&(Qe=Fn(se),se!==Qe||se.tag!==5&&se.tag!==6)&&(se=null)):(Z=null,se=T),Z!==se)){if(ie=ou,J="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ie=cu,J="onPointerLeave",E="onPointerEnter",S="pointer"),Qe=Z==null?V:pr(Z),R=se==null?V:pr(se),V=new ie(J,S+"leave",Z,n,H),V.target=Qe,V.relatedTarget=R,J=null,Un(H)===T&&(ie=new ie(E,S+"enter",se,n,H),ie.target=R,ie.relatedTarget=Qe,J=ie),Qe=J,Z&&se)t:{for(ie=Z,E=se,S=0,R=ie;R;R=dr(R))S++;for(R=0,J=E;J;J=dr(J))R++;for(;0<S-R;)ie=dr(ie),S--;for(;0<R-S;)E=dr(E),R--;for(;S--;){if(ie===E||E!==null&&ie===E.alternate)break t;ie=dr(ie),E=dr(E)}ie=null}else ie=null;Z!==null&&Fu(W,V,Z,ie,!1),se!==null&&Qe!==null&&Fu(W,Qe,se,ie,!0)}}e:{if(V=T?pr(T):window,Z=V.nodeName&&V.nodeName.toLowerCase(),Z==="select"||Z==="input"&&V.type==="file")var ce=$p;else if(xu(V))if(yu)ce=Wp;else{ce=Vp;var he=Bp}else(Z=V.nodeName)&&Z.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(ce=Hp);if(ce&&(ce=ce(e,T))){gu(W,ce,n,H);break e}he&&he(e,V,T),e==="focusout"&&(he=V._wrapperState)&&he.controlled&&V.type==="number"&&Mr(V,"number",V.value)}switch(he=T?pr(T):window,e){case"focusin":(xu(he)||he.contentEditable==="true")&&(ur=he,Ia=T,os=null);break;case"focusout":os=Ia=ur=null;break;case"mousedown":$a=!0;break;case"contextmenu":case"mouseup":case"dragend":$a=!1,_u(W,n,H);break;case"selectionchange":if(Qp)break;case"keydown":case"keyup":_u(W,n,H)}var xe;if(Da)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else or?mu(e,n)&&(ve="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ve="onCompositionStart");ve&&(du&&n.locale!=="ko"&&(or||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&or&&(xe=au()):(mn=H,Ra="value"in mn?mn.value:mn.textContent,or=!0)),he=ul(T,ve),0<he.length&&(ve=new uu(ve,e,null,n,H),W.push({event:ve,listeners:he}),xe?ve.data=xe:(xe=hu(n),xe!==null&&(ve.data=xe)))),(xe=Dp?Fp(e,n):Up(e,n))&&(T=ul(T,"onBeforeInput"),0<T.length&&(H=new uu("onBeforeInput","beforeinput",null,n,H),W.push({event:H,listeners:T}),H.data=xe))}Au(W,t)})}function ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ul(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,c=o.stateNode;o.tag===5&&c!==null&&(o=c,c=un(e,n),c!=null&&r.unshift(ds(e,c,o)),c=un(e,t),c!=null&&r.push(ds(e,c,o))),e=e.return}return r}function dr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fu(e,t,n,r,o){for(var c=t._reactName,p=[];n!==null&&n!==r;){var g=n,j=g.alternate,T=g.stateNode;if(j!==null&&j===r)break;g.tag===5&&T!==null&&(g=T,o?(j=un(n,c),j!=null&&p.unshift(ds(n,j,g))):o||(j=un(n,c),j!=null&&p.push(ds(n,j,g)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var Xp=/\r\n?/g,Zp=/\u0000|\uFFFD/g;function Uu(e){return(typeof e=="string"?e:""+e).replace(Xp,`
|
||
`).replace(Zp,"")}function cl(e,t,n){if(t=Uu(t),Uu(e)!==t&&n)throw Error(i(425))}function dl(){}var Ka=null,Qa=null;function Ja(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ga=typeof setTimeout=="function"?setTimeout:void 0,em=typeof clearTimeout=="function"?clearTimeout:void 0,Mu=typeof Promise=="function"?Promise:void 0,tm=typeof queueMicrotask=="function"?queueMicrotask:typeof Mu<"u"?function(e){return Mu.resolve(null).then(e).catch(nm)}:Ga;function nm(e){setTimeout(function(){throw e})}function Ya(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ts(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ts(t)}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Iu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var fr=Math.random().toString(36).slice(2),Vt="__reactFiber$"+fr,fs="__reactProps$"+fr,Jt="__reactContainer$"+fr,Xa="__reactEvents$"+fr,rm="__reactListeners$"+fr,sm="__reactHandles$"+fr;function Un(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jt]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Iu(e);e!==null;){if(n=e[Vt])return n;e=Iu(e)}return t}e=n,n=e.parentNode}return null}function ps(e){return e=e[Vt]||e[Jt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function pr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function fl(e){return e[fs]||null}var Za=[],mr=-1;function gn(e){return{current:e}}function Me(e){0>mr||(e.current=Za[mr],Za[mr]=null,mr--)}function Fe(e,t){mr++,Za[mr]=e.current,e.current=t}var yn={},st=gn(yn),ft=gn(!1),Mn=yn;function hr(e,t){var n=e.type.contextTypes;if(!n)return yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in n)o[c]=t[c];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pt(e){return e=e.childContextTypes,e!=null}function pl(){Me(ft),Me(st)}function $u(e,t,n){if(st.current!==yn)throw Error(i(168));Fe(st,t),Fe(ft,n)}function Bu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(i(108,we(e)||"Unknown",o));return G({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Mn=st.current,Fe(st,e),Fe(ft,ft.current),!0}function Vu(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Bu(e,t,Mn),r.__reactInternalMemoizedMergedChildContext=e,Me(ft),Me(st),Fe(st,e)):Me(ft),Fe(ft,n)}var Gt=null,hl=!1,ei=!1;function Hu(e){Gt===null?Gt=[e]:Gt.push(e)}function lm(e){hl=!0,Hu(e)}function vn(){if(!ei&&Gt!==null){ei=!0;var e=0,t=Oe;try{var n=Gt;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gt=null,hl=!1}catch(o){throw Gt!==null&&(Gt=Gt.slice(e+1)),qo(ka,vn),o}finally{Oe=t,ei=!1}}return null}var xr=[],gr=0,xl=null,gl=0,bt=[],_t=0,In=null,Yt=1,Xt="";function $n(e,t){xr[gr++]=gl,xr[gr++]=xl,xl=e,gl=t}function Wu(e,t,n){bt[_t++]=Yt,bt[_t++]=Xt,bt[_t++]=In,In=e;var r=Yt;e=Xt;var o=32-Lt(r)-1;r&=~(1<<o),n+=1;var c=32-Lt(t)+o;if(30<c){var p=o-o%5;c=(r&(1<<p)-1).toString(32),r>>=p,o-=p,Yt=1<<32-Lt(t)+o|n<<o|r,Xt=c+e}else Yt=1<<c|n<<o|r,Xt=e}function ti(e){e.return!==null&&($n(e,1),Wu(e,1,0))}function ni(e){for(;e===xl;)xl=xr[--gr],xr[gr]=null,gl=xr[--gr],xr[gr]=null;for(;e===In;)In=bt[--_t],bt[_t]=null,Xt=bt[--_t],bt[_t]=null,Yt=bt[--_t],bt[_t]=null}var kt=null,Nt=null,Ie=!1,zt=null;function qu(e,t){var n=Rt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ku(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,kt=e,Nt=xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,kt=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=In!==null?{id:Yt,overflow:Xt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,kt=e,Nt=null,!0):!1;default:return!1}}function ri(e){return(e.mode&1)!==0&&(e.flags&128)===0}function si(e){if(Ie){var t=Nt;if(t){var n=t;if(!Ku(e,t)){if(ri(e))throw Error(i(418));t=xn(n.nextSibling);var r=kt;t&&Ku(e,t)?qu(r,n):(e.flags=e.flags&-4097|2,Ie=!1,kt=e)}}else{if(ri(e))throw Error(i(418));e.flags=e.flags&-4097|2,Ie=!1,kt=e}}}function Qu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;kt=e}function yl(e){if(e!==kt)return!1;if(!Ie)return Qu(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ja(e.type,e.memoizedProps)),t&&(t=Nt)){if(ri(e))throw Ju(),Error(i(418));for(;t;)qu(e,t),t=xn(t.nextSibling)}if(Qu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=xn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=kt?xn(e.stateNode.nextSibling):null;return!0}function Ju(){for(var e=Nt;e;)e=xn(e.nextSibling)}function yr(){Nt=kt=null,Ie=!1}function li(e){zt===null?zt=[e]:zt.push(e)}var am=Q.ReactCurrentBatchConfig;function ms(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(p){var g=o.refs;p===null?delete g[c]:g[c]=p},t._stringRef=c,t)}if(typeof e!="string")throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function vl(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gu(e){var t=e._init;return t(e._payload)}function Yu(e){function t(E,S){if(e){var R=E.deletions;R===null?(E.deletions=[S],E.flags|=16):R.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function r(E,S){for(E=new Map;S!==null;)S.key!==null?E.set(S.key,S):E.set(S.index,S),S=S.sibling;return E}function o(E,S){return E=Cn(E,S),E.index=0,E.sibling=null,E}function c(E,S,R){return E.index=R,e?(R=E.alternate,R!==null?(R=R.index,R<S?(E.flags|=2,S):R):(E.flags|=2,S)):(E.flags|=1048576,S)}function p(E){return e&&E.alternate===null&&(E.flags|=2),E}function g(E,S,R,J){return S===null||S.tag!==6?(S=Gi(R,E.mode,J),S.return=E,S):(S=o(S,R),S.return=E,S)}function j(E,S,R,J){var ce=R.type;return ce===O?H(E,S,R.props.children,J,R.key):S!==null&&(S.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ge&&Gu(ce)===S.type)?(J=o(S,R.props),J.ref=ms(E,S,R),J.return=E,J):(J=Vl(R.type,R.key,R.props,null,E.mode,J),J.ref=ms(E,S,R),J.return=E,J)}function T(E,S,R,J){return S===null||S.tag!==4||S.stateNode.containerInfo!==R.containerInfo||S.stateNode.implementation!==R.implementation?(S=Yi(R,E.mode,J),S.return=E,S):(S=o(S,R.children||[]),S.return=E,S)}function H(E,S,R,J,ce){return S===null||S.tag!==7?(S=Jn(R,E.mode,J,ce),S.return=E,S):(S=o(S,R),S.return=E,S)}function W(E,S,R){if(typeof S=="string"&&S!==""||typeof S=="number")return S=Gi(""+S,E.mode,R),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case me:return R=Vl(S.type,S.key,S.props,null,E.mode,R),R.ref=ms(E,null,S),R.return=E,R;case fe:return S=Yi(S,E.mode,R),S.return=E,S;case ge:var J=S._init;return W(E,J(S._payload),R)}if(zn(S)||ee(S))return S=Jn(S,E.mode,R,null),S.return=E,S;vl(E,S)}return null}function V(E,S,R,J){var ce=S!==null?S.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ce!==null?null:g(E,S,""+R,J);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case me:return R.key===ce?j(E,S,R,J):null;case fe:return R.key===ce?T(E,S,R,J):null;case ge:return ce=R._init,V(E,S,ce(R._payload),J)}if(zn(R)||ee(R))return ce!==null?null:H(E,S,R,J,null);vl(E,R)}return null}function Z(E,S,R,J,ce){if(typeof J=="string"&&J!==""||typeof J=="number")return E=E.get(R)||null,g(S,E,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case me:return E=E.get(J.key===null?R:J.key)||null,j(S,E,J,ce);case fe:return E=E.get(J.key===null?R:J.key)||null,T(S,E,J,ce);case ge:var he=J._init;return Z(E,S,R,he(J._payload),ce)}if(zn(J)||ee(J))return E=E.get(R)||null,H(S,E,J,ce,null);vl(S,J)}return null}function se(E,S,R,J){for(var ce=null,he=null,xe=S,ve=S=0,tt=null;xe!==null&&ve<R.length;ve++){xe.index>ve?(tt=xe,xe=null):tt=xe.sibling;var Re=V(E,xe,R[ve],J);if(Re===null){xe===null&&(xe=tt);break}e&&xe&&Re.alternate===null&&t(E,xe),S=c(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re,xe=tt}if(ve===R.length)return n(E,xe),Ie&&$n(E,ve),ce;if(xe===null){for(;ve<R.length;ve++)xe=W(E,R[ve],J),xe!==null&&(S=c(xe,S,ve),he===null?ce=xe:he.sibling=xe,he=xe);return Ie&&$n(E,ve),ce}for(xe=r(E,xe);ve<R.length;ve++)tt=Z(xe,E,ve,R[ve],J),tt!==null&&(e&&tt.alternate!==null&&xe.delete(tt.key===null?ve:tt.key),S=c(tt,S,ve),he===null?ce=tt:he.sibling=tt,he=tt);return e&&xe.forEach(function(En){return t(E,En)}),Ie&&$n(E,ve),ce}function ie(E,S,R,J){var ce=ee(R);if(typeof ce!="function")throw Error(i(150));if(R=ce.call(R),R==null)throw Error(i(151));for(var he=ce=null,xe=S,ve=S=0,tt=null,Re=R.next();xe!==null&&!Re.done;ve++,Re=R.next()){xe.index>ve?(tt=xe,xe=null):tt=xe.sibling;var En=V(E,xe,Re.value,J);if(En===null){xe===null&&(xe=tt);break}e&&xe&&En.alternate===null&&t(E,xe),S=c(En,S,ve),he===null?ce=En:he.sibling=En,he=En,xe=tt}if(Re.done)return n(E,xe),Ie&&$n(E,ve),ce;if(xe===null){for(;!Re.done;ve++,Re=R.next())Re=W(E,Re.value,J),Re!==null&&(S=c(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re);return Ie&&$n(E,ve),ce}for(xe=r(E,xe);!Re.done;ve++,Re=R.next())Re=Z(xe,E,ve,Re.value,J),Re!==null&&(e&&Re.alternate!==null&&xe.delete(Re.key===null?ve:Re.key),S=c(Re,S,ve),he===null?ce=Re:he.sibling=Re,he=Re);return e&&xe.forEach(function(Mm){return t(E,Mm)}),Ie&&$n(E,ve),ce}function Qe(E,S,R,J){if(typeof R=="object"&&R!==null&&R.type===O&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case me:e:{for(var ce=R.key,he=S;he!==null;){if(he.key===ce){if(ce=R.type,ce===O){if(he.tag===7){n(E,he.sibling),S=o(he,R.props.children),S.return=E,E=S;break e}}else if(he.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ge&&Gu(ce)===he.type){n(E,he.sibling),S=o(he,R.props),S.ref=ms(E,he,R),S.return=E,E=S;break e}n(E,he);break}else t(E,he);he=he.sibling}R.type===O?(S=Jn(R.props.children,E.mode,J,R.key),S.return=E,E=S):(J=Vl(R.type,R.key,R.props,null,E.mode,J),J.ref=ms(E,S,R),J.return=E,E=J)}return p(E);case fe:e:{for(he=R.key;S!==null;){if(S.key===he)if(S.tag===4&&S.stateNode.containerInfo===R.containerInfo&&S.stateNode.implementation===R.implementation){n(E,S.sibling),S=o(S,R.children||[]),S.return=E,E=S;break e}else{n(E,S);break}else t(E,S);S=S.sibling}S=Yi(R,E.mode,J),S.return=E,E=S}return p(E);case ge:return he=R._init,Qe(E,S,he(R._payload),J)}if(zn(R))return se(E,S,R,J);if(ee(R))return ie(E,S,R,J);vl(E,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,S!==null&&S.tag===6?(n(E,S.sibling),S=o(S,R),S.return=E,E=S):(n(E,S),S=Gi(R,E.mode,J),S.return=E,E=S),p(E)):n(E,S)}return Qe}var vr=Yu(!0),Xu=Yu(!1),wl=gn(null),jl=null,wr=null,ai=null;function ii(){ai=wr=jl=null}function oi(e){var t=wl.current;Me(wl),e._currentValue=t}function ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jr(e,t){jl=e,ai=wr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(mt=!0),e.firstContext=null)}function Ct(e){var t=e._currentValue;if(ai!==e)if(e={context:e,memoizedValue:t,next:null},wr===null){if(jl===null)throw Error(i(308));wr=e,jl.dependencies={lanes:0,firstContext:e}}else wr=wr.next=e;return t}var Bn=null;function ci(e){Bn===null?Bn=[e]:Bn.push(e)}function Zu(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ci(t)):(n.next=o.next,o.next=n),t.interleaved=n,Zt(e,r)}function Zt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var wn=!1;function di(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ec(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Zt(e,n)}return o=r.interleaved,o===null?(t.next=t,ci(r)):(t.next=o.next,o.next=t),r.interleaved=t,Zt(e,n)}function kl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ba(e,n)}}function tc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};c===null?o=c=p:c=c.next=p,n=n.next}while(n!==null);c===null?o=c=t:c=c.next=t}else o=c=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nl(e,t,n,r){var o=e.updateQueue;wn=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,g=o.shared.pending;if(g!==null){o.shared.pending=null;var j=g,T=j.next;j.next=null,p===null?c=T:p.next=T,p=j;var H=e.alternate;H!==null&&(H=H.updateQueue,g=H.lastBaseUpdate,g!==p&&(g===null?H.firstBaseUpdate=T:g.next=T,H.lastBaseUpdate=j))}if(c!==null){var W=o.baseState;p=0,H=T=j=null,g=c;do{var V=g.lane,Z=g.eventTime;if((r&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var se=e,ie=g;switch(V=t,Z=n,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){W=se.call(Z,W,V);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,V=typeof se=="function"?se.call(Z,W,V):se,V==null)break e;W=G({},W,V);break e;case 2:wn=!0}}g.callback!==null&&g.lane!==0&&(e.flags|=64,V=o.effects,V===null?o.effects=[g]:V.push(g))}else Z={eventTime:Z,lane:V,tag:g.tag,payload:g.payload,callback:g.callback,next:null},H===null?(T=H=Z,j=W):H=H.next=Z,p|=V;if(g=g.next,g===null){if(g=o.shared.pending,g===null)break;V=g,g=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);if(H===null&&(j=W),o.baseState=j,o.firstBaseUpdate=T,o.lastBaseUpdate=H,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else c===null&&(o.shared.lanes=0);Wn|=p,e.lanes=p,e.memoizedState=W}}function nc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(i(191,o));o.call(r)}}}var hs={},Ht=gn(hs),xs=gn(hs),gs=gn(hs);function Vn(e){if(e===hs)throw Error(i(174));return e}function fi(e,t){switch(Fe(gs,t),Fe(xs,e),Fe(Ht,hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$r(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$r(t,e)}Me(Ht),Fe(Ht,t)}function kr(){Me(Ht),Me(xs),Me(gs)}function rc(e){Vn(gs.current);var t=Vn(Ht.current),n=$r(t,e.type);t!==n&&(Fe(xs,e),Fe(Ht,n))}function pi(e){xs.current===e&&(Me(Ht),Me(xs))}var Be=gn(0);function Sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mi=[];function hi(){for(var e=0;e<mi.length;e++)mi[e]._workInProgressVersionPrimary=null;mi.length=0}var bl=Q.ReactCurrentDispatcher,xi=Q.ReactCurrentBatchConfig,Hn=0,Ve=null,Ye=null,Ze=null,_l=!1,ys=!1,vs=0,im=0;function lt(){throw Error(i(321))}function gi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ot(e[n],t[n]))return!1;return!0}function yi(e,t,n,r,o,c){if(Hn=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bl.current=e===null||e.memoizedState===null?dm:fm,e=n(r,o),ys){c=0;do{if(ys=!1,vs=0,25<=c)throw Error(i(301));c+=1,Ze=Ye=null,t.updateQueue=null,bl.current=pm,e=n(r,o)}while(ys)}if(bl.current=Pl,t=Ye!==null&&Ye.next!==null,Hn=0,Ze=Ye=Ve=null,_l=!1,t)throw Error(i(300));return e}function vi(){var e=vs!==0;return vs=0,e}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?Ve.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Et(){if(Ye===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Ze===null?Ve.memoizedState:Ze.next;if(t!==null)Ze=t,Ye=e;else{if(e===null)throw Error(i(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Ze===null?Ve.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function ws(e,t){return typeof t=="function"?t(e):t}function wi(e){var t=Et(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=Ye,o=r.baseQueue,c=n.pending;if(c!==null){if(o!==null){var p=o.next;o.next=c.next,c.next=p}r.baseQueue=o=c,n.pending=null}if(o!==null){c=o.next,r=r.baseState;var g=p=null,j=null,T=c;do{var H=T.lane;if((Hn&H)===H)j!==null&&(j=j.next={lane:0,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),r=T.hasEagerState?T.eagerState:e(r,T.action);else{var W={lane:H,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null};j===null?(g=j=W,p=r):j=j.next=W,Ve.lanes|=H,Wn|=H}T=T.next}while(T!==null&&T!==c);j===null?p=r:j.next=g,Ot(r,t.memoizedState)||(mt=!0),t.memoizedState=r,t.baseState=p,t.baseQueue=j,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do c=o.lane,Ve.lanes|=c,Wn|=c,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ji(e){var t=Et(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,c=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do c=e(c,p.action),p=p.next;while(p!==o);Ot(c,t.memoizedState)||(mt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,r]}function sc(){}function lc(e,t){var n=Ve,r=Et(),o=t(),c=!Ot(r.memoizedState,o);if(c&&(r.memoizedState=o,mt=!0),r=r.queue,ki(oc.bind(null,n,r,e),[e]),r.getSnapshot!==t||c||Ze!==null&&Ze.memoizedState.tag&1){if(n.flags|=2048,js(9,ic.bind(null,n,r,o,t),void 0,null),et===null)throw Error(i(349));(Hn&30)!==0||ac(n,t,o)}return o}function ac(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ic(e,t,n,r){t.value=n,t.getSnapshot=r,uc(t)&&cc(e)}function oc(e,t,n){return n(function(){uc(t)&&cc(e)})}function uc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ot(e,n)}catch{return!0}}function cc(e){var t=Zt(e,1);t!==null&&Ut(t,e,1,-1)}function dc(e){var t=Wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=cm.bind(null,Ve,e),[t.memoizedState,e]}function js(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fc(){return Et().memoizedState}function Cl(e,t,n,r){var o=Wt();Ve.flags|=e,o.memoizedState=js(1|t,n,void 0,r===void 0?null:r)}function El(e,t,n,r){var o=Et();r=r===void 0?null:r;var c=void 0;if(Ye!==null){var p=Ye.memoizedState;if(c=p.destroy,r!==null&&gi(r,p.deps)){o.memoizedState=js(t,n,c,r);return}}Ve.flags|=e,o.memoizedState=js(1|t,n,c,r)}function pc(e,t){return Cl(8390656,8,e,t)}function ki(e,t){return El(2048,8,e,t)}function mc(e,t){return El(4,2,e,t)}function hc(e,t){return El(4,4,e,t)}function xc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gc(e,t,n){return n=n!=null?n.concat([e]):null,El(4,4,xc.bind(null,t,e),n)}function Ni(){}function yc(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vc(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wc(e,t,n){return(Hn&21)===0?(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=n):(Ot(n,t)||(n=Go(),Ve.lanes|=n,Wn|=n,e.baseState=!0),t)}function om(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{Oe=n,xi.transition=r}}function jc(){return Et().memoizedState}function um(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kc(e))Nc(t,n);else if(n=Zu(e,t,n,r),n!==null){var o=ct();Ut(n,e,r,o),Sc(n,t,r)}}function cm(e,t,n){var r=bn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kc(e))Nc(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,g=c(p,n);if(o.hasEagerState=!0,o.eagerState=g,Ot(g,p)){var j=t.interleaved;j===null?(o.next=o,ci(t)):(o.next=j.next,j.next=o),t.interleaved=o;return}}catch{}finally{}n=Zu(e,t,o,r),n!==null&&(o=ct(),Ut(n,e,r,o),Sc(n,t,r))}}function kc(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Nc(e,t){ys=_l=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ba(e,n)}}var Pl={readContext:Ct,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},dm={readContext:Ct,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:pc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,xc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=Wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wt();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=um.bind(null,Ve,e),[r.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:dc,useDebugValue:Ni,useDeferredValue:function(e){return Wt().memoizedState=e},useTransition:function(){var e=dc(!1),t=e[0];return e=om.bind(null,e[1]),Wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ve,o=Wt();if(Ie){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),et===null)throw Error(i(349));(Hn&30)!==0||ac(r,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,pc(oc.bind(null,r,c,e),[e]),r.flags|=2048,js(9,ic.bind(null,r,c,n,t),void 0,null),n},useId:function(){var e=Wt(),t=et.identifierPrefix;if(Ie){var n=Xt,r=Yt;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=im++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fm={readContext:Ct,useCallback:yc,useContext:Ct,useEffect:ki,useImperativeHandle:gc,useInsertionEffect:mc,useLayoutEffect:hc,useMemo:vc,useReducer:wi,useRef:fc,useState:function(){return wi(ws)},useDebugValue:Ni,useDeferredValue:function(e){var t=Et();return wc(t,Ye.memoizedState,e)},useTransition:function(){var e=wi(ws)[0],t=Et().memoizedState;return[e,t]},useMutableSource:sc,useSyncExternalStore:lc,useId:jc,unstable_isNewReconciler:!1},pm={readContext:Ct,useCallback:yc,useContext:Ct,useEffect:ki,useImperativeHandle:gc,useInsertionEffect:mc,useLayoutEffect:hc,useMemo:vc,useReducer:ji,useRef:fc,useState:function(){return ji(ws)},useDebugValue:Ni,useDeferredValue:function(e){var t=Et();return Ye===null?t.memoizedState=e:wc(t,Ye.memoizedState,e)},useTransition:function(){var e=ji(ws)[0],t=Et().memoizedState;return[e,t]},useMutableSource:sc,useSyncExternalStore:lc,useId:jc,unstable_isNewReconciler:!1};function At(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Si(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rl={isMounted:function(e){return(e=e._reactInternals)?Fn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ct(),o=bn(e),c=en(r,o);c.payload=t,n!=null&&(c.callback=n),t=jn(e,c,o),t!==null&&(Ut(t,e,o,r),kl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ct(),o=bn(e),c=en(r,o);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=jn(e,c,o),t!==null&&(Ut(t,e,o,r),kl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),r=bn(e),o=en(n,r);o.tag=2,t!=null&&(o.callback=t),t=jn(e,o,r),t!==null&&(Ut(t,e,r,n),kl(t,e,r))}};function bc(e,t,n,r,o,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,c,p):t.prototype&&t.prototype.isPureReactComponent?!is(n,r)||!is(o,c):!0}function _c(e,t,n){var r=!1,o=yn,c=t.contextType;return typeof c=="object"&&c!==null?c=Ct(c):(o=pt(t)?Mn:st.current,r=t.contextTypes,c=(r=r!=null)?hr(e,o):yn),t=new t(n,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=c),t}function Cc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rl.enqueueReplaceState(t,t.state,null)}function bi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},di(e);var c=t.contextType;typeof c=="object"&&c!==null?o.context=Ct(c):(c=pt(t)?Mn:st.current,o.context=hr(e,c)),o.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Si(e,t,c,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Rl.enqueueReplaceState(o,o.state,null),Nl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Nr(e,t){try{var n="",r=t;do n+=ye(r),r=r.return;while(r);var o=n}catch(c){o=`
|
||
Error generating stack: `+c.message+`
|
||
`+c.stack}return{value:e,source:t,stack:o,digest:null}}function _i(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ci(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mm=typeof WeakMap=="function"?WeakMap:Map;function Ec(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fl||(Fl=!0,Bi=r),Ci(e,t)},n}function Pc(e,t,n){n=en(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Ci(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(n.callback=function(){Ci(e,t),typeof r!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Rc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mm;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Em.bind(null,e,t,n),t.then(e,e))}function Tc(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 Lc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=en(-1,1),t.tag=2,jn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var hm=Q.ReactCurrentOwner,mt=!1;function ut(e,t,n,r){t.child=e===null?Xu(t,null,n,r):vr(t,e.child,n,r)}function Oc(e,t,n,r,o){n=n.render;var c=t.ref;return jr(t,o),r=yi(e,t,n,r,c,o),n=vi(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(Ie&&n&&ti(t),t.flags|=1,ut(e,t,r,o),t.child)}function zc(e,t,n,r,o){if(e===null){var c=n.type;return typeof c=="function"&&!Ji(c)&&c.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=c,Ac(e,t,c,r,o)):(e=Vl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&o)===0){var p=c.memoizedProps;if(n=n.compare,n=n!==null?n:is,n(p,r)&&e.ref===t.ref)return tn(e,t,o)}return t.flags|=1,e=Cn(c,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,o){if(e!==null){var c=e.memoizedProps;if(is(c,r)&&e.ref===t.ref)if(mt=!1,t.pendingProps=r=c,(e.lanes&o)!==0)(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,tn(e,t,o)}return Ei(e,t,n,r,o)}function Dc(e,t,n){var r=t.pendingProps,o=r.children,c=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(br,St),St|=n;else{if((n&1073741824)===0)return e=c!==null?c.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(br,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=c!==null?c.baseLanes:n,Fe(br,St),St|=r}else c!==null?(r=c.baseLanes|n,t.memoizedState=null):r=n,Fe(br,St),St|=r;return ut(e,t,o,n),t.child}function Fc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ei(e,t,n,r,o){var c=pt(n)?Mn:st.current;return c=hr(t,c),jr(t,o),n=yi(e,t,n,r,c,o),r=vi(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(Ie&&r&&ti(t),t.flags|=1,ut(e,t,n,o),t.child)}function Uc(e,t,n,r,o){if(pt(n)){var c=!0;ml(t)}else c=!1;if(jr(t,o),t.stateNode===null)Ll(e,t),_c(t,n,r),bi(t,n,r,o),r=!0;else if(e===null){var p=t.stateNode,g=t.memoizedProps;p.props=g;var j=p.context,T=n.contextType;typeof T=="object"&&T!==null?T=Ct(T):(T=pt(n)?Mn:st.current,T=hr(t,T));var H=n.getDerivedStateFromProps,W=typeof H=="function"||typeof p.getSnapshotBeforeUpdate=="function";W||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==r||j!==T)&&Cc(t,p,r,T),wn=!1;var V=t.memoizedState;p.state=V,Nl(t,r,p,o),j=t.memoizedState,g!==r||V!==j||ft.current||wn?(typeof H=="function"&&(Si(t,n,H,r),j=t.memoizedState),(g=wn||bc(t,n,g,r,V,j,T))?(W||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=j),p.props=r,p.state=j,p.context=T,r=g):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{p=t.stateNode,ec(e,t),g=t.memoizedProps,T=t.type===t.elementType?g:At(t.type,g),p.props=T,W=t.pendingProps,V=p.context,j=n.contextType,typeof j=="object"&&j!==null?j=Ct(j):(j=pt(n)?Mn:st.current,j=hr(t,j));var Z=n.getDerivedStateFromProps;(H=typeof Z=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(g!==W||V!==j)&&Cc(t,p,r,j),wn=!1,V=t.memoizedState,p.state=V,Nl(t,r,p,o);var se=t.memoizedState;g!==W||V!==se||ft.current||wn?(typeof Z=="function"&&(Si(t,n,Z,r),se=t.memoizedState),(T=wn||bc(t,n,T,r,V,se,j)||!1)?(H||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(r,se,j),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(r,se,j)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),p.props=r,p.state=se,p.context=j,r=T):(typeof p.componentDidUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),r=!1)}return Pi(e,t,n,r,c,o)}function Pi(e,t,n,r,o,c){Fc(e,t);var p=(t.flags&128)!==0;if(!r&&!p)return o&&Vu(t,n,!1),tn(e,t,c);r=t.stateNode,hm.current=t;var g=p&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&p?(t.child=vr(t,e.child,null,c),t.child=vr(t,null,g,c)):ut(e,t,g,c),t.memoizedState=r.state,o&&Vu(t,n,!0),t.child}function Mc(e){var t=e.stateNode;t.pendingContext?$u(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$u(e,t.context,!1),fi(e,t.containerInfo)}function Ic(e,t,n,r,o){return yr(),li(o),t.flags|=256,ut(e,t,n,r),t.child}var Ri={dehydrated:null,treeContext:null,retryLane:0};function Ti(e){return{baseLanes:e,cachePool:null,transitions:null}}function $c(e,t,n){var r=t.pendingProps,o=Be.current,c=!1,p=(t.flags&128)!==0,g;if((g=p)||(g=e!==null&&e.memoizedState===null?!1:(o&2)!==0),g?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Fe(Be,o&1),e===null)return si(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(p=r.children,e=r.fallback,c?(r=t.mode,c=t.child,p={mode:"hidden",children:p},(r&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=p):c=Hl(p,r,0,null),e=Jn(e,r,n,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Ti(n),t.memoizedState=Ri,e):Li(t,p));if(o=e.memoizedState,o!==null&&(g=o.dehydrated,g!==null))return xm(e,t,p,r,g,o,n);if(c){c=r.fallback,p=t.mode,o=e.child,g=o.sibling;var j={mode:"hidden",children:r.children};return(p&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=j,t.deletions=null):(r=Cn(o,j),r.subtreeFlags=o.subtreeFlags&14680064),g!==null?c=Cn(g,c):(c=Jn(c,p,n,null),c.flags|=2),c.return=t,r.return=t,r.sibling=c,t.child=r,r=c,c=t.child,p=e.child.memoizedState,p=p===null?Ti(n):{baseLanes:p.baseLanes|n,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~n,t.memoizedState=Ri,r}return c=e.child,e=c.sibling,r=Cn(c,{mode:"visible",children:r.children}),(t.mode&1)===0&&(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 Li(e,t){return t=Hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,n,r){return r!==null&&li(r),vr(t,e.child,null,n),e=Li(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xm(e,t,n,r,o,c,p){if(n)return t.flags&256?(t.flags&=-257,r=_i(Error(i(422))),Tl(e,t,p,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=r.fallback,o=t.mode,r=Hl({mode:"visible",children:r.children},o,0,null),c=Jn(c,o,p,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,(t.mode&1)!==0&&vr(t,e.child,null,p),t.child.memoizedState=Ti(p),t.memoizedState=Ri,c);if((t.mode&1)===0)return Tl(e,t,p,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var g=r.dgst;return r=g,c=Error(i(419)),r=_i(c,r,void 0),Tl(e,t,p,r)}if(g=(p&e.childLanes)!==0,mt||g){if(r=et,r!==null){switch(p&-p){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|p))!==0?0:o,o!==0&&o!==c.retryLane&&(c.retryLane=o,Zt(e,o),Ut(r,e,o,-1))}return Qi(),r=_i(Error(i(421))),Tl(e,t,p,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Pm.bind(null,e),o._reactRetry=t,null):(e=c.treeContext,Nt=xn(o.nextSibling),kt=t,Ie=!0,zt=null,e!==null&&(bt[_t++]=Yt,bt[_t++]=Xt,bt[_t++]=In,Yt=e.id,Xt=e.overflow,In=t),t=Li(t,r.children),t.flags|=4096,t)}function Bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ui(e.return,t,n)}function Oi(e,t,n,r,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=r,c.tail=n,c.tailMode=o)}function Vc(e,t,n){var r=t.pendingProps,o=r.revealOrder,c=r.tail;if(ut(e,t,r.children,n),r=Be.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bc(e,n,t);else if(e.tag===19)Bc(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(Fe(Be,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Sl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Oi(t,!1,o,n,c);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Sl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Oi(t,!0,n,null,c);break;case"together":Oi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ll(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gm(e,t,n){switch(t.tag){case 3:Mc(t),yr();break;case 5:rc(t);break;case 1:pt(t.type)&&ml(t);break;case 4:fi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Fe(wl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Be,Be.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?$c(e,t,n):(Fe(Be,Be.current&1),e=tn(e,t,n),e!==null?e.sibling:null);Fe(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Vc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fe(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,Dc(e,t,n)}return tn(e,t,n)}var Hc,zi,Wc,qc;Hc=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}},zi=function(){},Wc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Vn(Ht.current);var c=null;switch(n){case"input":o=Le(e,o),r=Le(e,r),c=[];break;case"select":o=G({},o,{value:void 0}),r=G({},r,{value:void 0}),c=[];break;case"textarea":o=Ir(e,o),r=Ir(e,r),c=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=dl)}Br(n,r);var p;n=null;for(T in o)if(!r.hasOwnProperty(T)&&o.hasOwnProperty(T)&&o[T]!=null)if(T==="style"){var g=o[T];for(p in g)g.hasOwnProperty(p)&&(n||(n={}),n[p]="")}else T!=="dangerouslySetInnerHTML"&&T!=="children"&&T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(d.hasOwnProperty(T)?c||(c=[]):(c=c||[]).push(T,null));for(T in r){var j=r[T];if(g=o!=null?o[T]:void 0,r.hasOwnProperty(T)&&j!==g&&(j!=null||g!=null))if(T==="style")if(g){for(p in g)!g.hasOwnProperty(p)||j&&j.hasOwnProperty(p)||(n||(n={}),n[p]="");for(p in j)j.hasOwnProperty(p)&&g[p]!==j[p]&&(n||(n={}),n[p]=j[p])}else n||(c||(c=[]),c.push(T,n)),n=j;else T==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,g=g?g.__html:void 0,j!=null&&g!==j&&(c=c||[]).push(T,j)):T==="children"?typeof j!="string"&&typeof j!="number"||(c=c||[]).push(T,""+j):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&(d.hasOwnProperty(T)?(j!=null&&T==="onScroll"&&Ue("scroll",e),c||g===j||(c=[])):(c=c||[]).push(T,j))}n&&(c=c||[]).push("style",n);var T=c;(t.updateQueue=T)&&(t.flags|=4)}},qc=function(e,t,n,r){n!==r&&(t.flags|=4)};function ks(e,t){if(!Ie)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 at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ym(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return pt(t.type)&&pl(),at(t),null;case 3:return r=t.stateNode,kr(),Me(ft),Me(st),hi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zt!==null&&(Wi(zt),zt=null))),zi(e,t),at(t),null;case 5:pi(t);var o=Vn(gs.current);if(n=t.type,e!==null&&t.stateNode!=null)Wc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(i(166));return at(t),null}if(e=Vn(Ht.current),yl(t)){r=t.stateNode,n=t.type;var c=t.memoizedProps;switch(r[Vt]=t,r[fs]=c,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)Ue(us[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Fr(r,c),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!c.multiple},Ue("invalid",r);break;case"textarea":Fs(r,c),Ue("invalid",r)}Br(n,c),o=null;for(var p in c)if(c.hasOwnProperty(p)){var g=c[p];p==="children"?typeof g=="string"?r.textContent!==g&&(c.suppressHydrationWarning!==!0&&cl(r.textContent,g,e),o=["children",g]):typeof g=="number"&&r.textContent!==""+g&&(c.suppressHydrationWarning!==!0&&cl(r.textContent,g,e),o=["children",""+g]):d.hasOwnProperty(p)&&g!=null&&p==="onScroll"&&Ue("scroll",r)}switch(n){case"input":je(r),rr(r,c,!0);break;case"textarea":je(r),Ms(r);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(r.onclick=dl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{p=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Is(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=p.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=p.createElement(n,{is:r.is}):(e=p.createElement(n),n==="select"&&(p=e,r.multiple?p.multiple=!0:r.size&&(p.size=r.size))):e=p.createElementNS(e,n),e[Vt]=t,e[fs]=r,Hc(e,t,!1,!1),t.stateNode=e;e:{switch(p=on(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)Ue(us[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":Fr(e,r),o=Le(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=G({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Fs(e,r),o=Ir(e,r),Ue("invalid",e);break;default:o=r}Br(n,o),g=o;for(c in g)if(g.hasOwnProperty(c)){var j=g[c];c==="style"?Vs(e,j):c==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&$s(e,j)):c==="children"?typeof j=="string"?(n!=="textarea"||j!=="")&&An(e,j):typeof j=="number"&&An(e,""+j):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(d.hasOwnProperty(c)?j!=null&&c==="onScroll"&&Ue("scroll",e):j!=null&&K(e,c,j,p))}switch(n){case"input":je(e),rr(e,r,!1);break;case"textarea":je(e),Ms(e);break;case"option":r.value!=null&&e.setAttribute("value",""+oe(r.value));break;case"select":e.multiple=!!r.multiple,c=r.value,c!=null?an(e,!!r.multiple,c,!1):r.defaultValue!=null&&an(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return at(t),null;case 6:if(e&&t.stateNode!=null)qc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(n=Vn(gs.current),Vn(Ht.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vt]=t,(c=r.nodeValue!==n)&&(e=kt,e!==null))switch(e.tag){case 3:cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&cl(r.nodeValue,n,(e.mode&1)!==0)}c&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=t,t.stateNode=r}return at(t),null;case 13:if(Me(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&Nt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Ju(),yr(),t.flags|=98560,c=!1;else if(c=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Vt]=t}else yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),c=!1}else zt!==null&&(Wi(zt),zt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Xe===0&&(Xe=3):Qi())),t.updateQueue!==null&&(t.flags|=4),at(t),null);case 4:return kr(),zi(e,t),e===null&&cs(t.stateNode.containerInfo),at(t),null;case 10:return oi(t.type._context),at(t),null;case 17:return pt(t.type)&&pl(),at(t),null;case 19:if(Me(Be),c=t.memoizedState,c===null)return at(t),null;if(r=(t.flags&128)!==0,p=c.rendering,p===null)if(r)ks(c,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Sl(e),p!==null){for(t.flags|=128,ks(c,!1),r=p.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)c=n,e=r,c.flags&=14680066,p=c.alternate,p===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=p.childLanes,c.lanes=p.lanes,c.child=p.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=p.memoizedProps,c.memoizedState=p.memoizedState,c.updateQueue=p.updateQueue,c.type=p.type,e=p.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Be,Be.current&1|2),t.child}e=e.sibling}c.tail!==null&&Ke()>_r&&(t.flags|=128,r=!0,ks(c,!1),t.lanes=4194304)}else{if(!r)if(e=Sl(p),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ks(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!Ie)return at(t),null}else 2*Ke()-c.renderingStartTime>_r&&n!==1073741824&&(t.flags|=128,r=!0,ks(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(n=c.last,n!==null?n.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ke(),t.sibling=null,n=Be.current,Fe(Be,r?n&1|2:n&1),t):(at(t),null);case 22:case 23:return Ki(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(St&1073741824)!==0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function vm(e,t){switch(ni(t),t.tag){case 1:return pt(t.type)&&pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kr(),Me(ft),Me(st),hi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return pi(t),null;case 13:if(Me(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(Be),null;case 4:return kr(),null;case 10:return oi(t.type._context),null;case 22:case 23:return Ki(),null;case 24:return null;default:return null}}var Ol=!1,it=!1,wm=typeof WeakSet=="function"?WeakSet:Set,re=null;function Sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){We(e,t,r)}else n.current=null}function Ai(e,t,n){try{n()}catch(r){We(e,t,r)}}var Kc=!1;function jm(e,t){if(Ka=Zs,e=bu(),Ma(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 o=r.anchorOffset,c=r.focusNode;r=r.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var p=0,g=-1,j=-1,T=0,H=0,W=e,V=null;t:for(;;){for(var Z;W!==n||o!==0&&W.nodeType!==3||(g=p+o),W!==c||r!==0&&W.nodeType!==3||(j=p+r),W.nodeType===3&&(p+=W.nodeValue.length),(Z=W.firstChild)!==null;)V=W,W=Z;for(;;){if(W===e)break t;if(V===n&&++T===o&&(g=p),V===c&&++H===r&&(j=p),(Z=W.nextSibling)!==null)break;W=V,V=W.parentNode}W=Z}n=g===-1||j===-1?null:{start:g,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qa={focusedElem:e,selectionRange:n},Zs=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,Qe=se.memoizedState,E=t.stateNode,S=E.getSnapshotBeforeUpdate(t.elementType===t.type?ie:At(t.type,ie),Qe);E.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(J){We(t,t.return,J)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=Kc,Kc=!1,se}function Ns(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var c=o.destroy;o.destroy=void 0,c!==void 0&&Ai(t,n,c)}o=o.next}while(o!==r)}}function zl(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 Di(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 Qc(e){var t=e.alternate;t!==null&&(e.alternate=null,Qc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[fs],delete t[Xa],delete t[rm],delete t[sm])),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 Jc(e){return e.tag===5||e.tag===3||e.tag===4}function Gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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 Fi(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=dl));else if(r!==4&&(e=e.child,e!==null))for(Fi(e,t,n),e=e.sibling;e!==null;)Fi(e,t,n),e=e.sibling}function Ui(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(Ui(e,t,n),e=e.sibling;e!==null;)Ui(e,t,n),e=e.sibling}var nt=null,Dt=!1;function kn(e,t,n){for(n=n.child;n!==null;)Yc(e,t,n),n=n.sibling}function Yc(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Ks,n)}catch{}switch(n.tag){case 5:it||Sr(n,t);case 6:var r=nt,o=Dt;nt=null,kn(e,t,n),nt=r,Dt=o,nt!==null&&(Dt?(e=nt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nt.removeChild(n.stateNode));break;case 18:nt!==null&&(Dt?(e=nt,n=n.stateNode,e.nodeType===8?Ya(e.parentNode,n):e.nodeType===1&&Ya(e,n),ts(e)):Ya(nt,n.stateNode));break;case 4:r=nt,o=Dt,nt=n.stateNode.containerInfo,Dt=!0,kn(e,t,n),nt=r,Dt=o;break;case 0:case 11:case 14:case 15:if(!it&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&((c&2)!==0||(c&4)!==0)&&Ai(n,t,p),o=o.next}while(o!==r)}kn(e,t,n);break;case 1:if(!it&&(Sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(g){We(n,t,g)}kn(e,t,n);break;case 21:kn(e,t,n);break;case 22:n.mode&1?(it=(r=it)||n.memoizedState!==null,kn(e,t,n),it=r):kn(e,t,n);break;default:kn(e,t,n)}}function Xc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wm),t.forEach(function(r){var o=Rm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var c=e,p=t,g=p;e:for(;g!==null;){switch(g.tag){case 5:nt=g.stateNode,Dt=!1;break e;case 3:nt=g.stateNode.containerInfo,Dt=!0;break e;case 4:nt=g.stateNode.containerInfo,Dt=!0;break e}g=g.return}if(nt===null)throw Error(i(160));Yc(c,p,o),nt=null,Dt=!1;var j=o.alternate;j!==null&&(j.return=null),o.return=null}catch(T){We(o,t,T)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zc(t,e),t=t.sibling}function Zc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ft(t,e),qt(e),r&4){try{Ns(3,e,e.return),zl(3,e)}catch(ie){We(e,e.return,ie)}try{Ns(5,e,e.return)}catch(ie){We(e,e.return,ie)}}break;case 1:Ft(t,e),qt(e),r&512&&n!==null&&Sr(n,n.return);break;case 5:if(Ft(t,e),qt(e),r&512&&n!==null&&Sr(n,n.return),e.flags&32){var o=e.stateNode;try{An(o,"")}catch(ie){We(e,e.return,ie)}}if(r&4&&(o=e.stateNode,o!=null)){var c=e.memoizedProps,p=n!==null?n.memoizedProps:c,g=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{g==="input"&&c.type==="radio"&&c.name!=null&&Ur(o,c),on(g,p);var T=on(g,c);for(p=0;p<j.length;p+=2){var H=j[p],W=j[p+1];H==="style"?Vs(o,W):H==="dangerouslySetInnerHTML"?$s(o,W):H==="children"?An(o,W):K(o,H,W,T)}switch(g){case"input":wt(o,c);break;case"textarea":Us(o,c);break;case"select":var V=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!c.multiple;var Z=c.value;Z!=null?an(o,!!c.multiple,Z,!1):V!==!!c.multiple&&(c.defaultValue!=null?an(o,!!c.multiple,c.defaultValue,!0):an(o,!!c.multiple,c.multiple?[]:"",!1))}o[fs]=c}catch(ie){We(e,e.return,ie)}}break;case 6:if(Ft(t,e),qt(e),r&4){if(e.stateNode===null)throw Error(i(162));o=e.stateNode,c=e.memoizedProps;try{o.nodeValue=c}catch(ie){We(e,e.return,ie)}}break;case 3:if(Ft(t,e),qt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ts(t.containerInfo)}catch(ie){We(e,e.return,ie)}break;case 4:Ft(t,e),qt(e);break;case 13:Ft(t,e),qt(e),o=e.child,o.flags&8192&&(c=o.memoizedState!==null,o.stateNode.isHidden=c,!c||o.alternate!==null&&o.alternate.memoizedState!==null||($i=Ke())),r&4&&Xc(e);break;case 22:if(H=n!==null&&n.memoizedState!==null,e.mode&1?(it=(T=it)||H,Ft(t,e),it=T):Ft(t,e),qt(e),r&8192){if(T=e.memoizedState!==null,(e.stateNode.isHidden=T)&&!H&&(e.mode&1)!==0)for(re=e,H=e.child;H!==null;){for(W=re=H;re!==null;){switch(V=re,Z=V.child,V.tag){case 0:case 11:case 14:case 15:Ns(4,V,V.return);break;case 1:Sr(V,V.return);var se=V.stateNode;if(typeof se.componentWillUnmount=="function"){r=V,n=V.return;try{t=r,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(ie){We(r,n,ie)}}break;case 5:Sr(V,V.return);break;case 22:if(V.memoizedState!==null){nd(W);continue}}Z!==null?(Z.return=V,re=Z):nd(W)}H=H.sibling}e:for(H=null,W=e;;){if(W.tag===5){if(H===null){H=W;try{o=W.stateNode,T?(c=o.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(g=W.stateNode,j=W.memoizedProps.style,p=j!=null&&j.hasOwnProperty("display")?j.display:null,g.style.display=Bs("display",p))}catch(ie){We(e,e.return,ie)}}}else if(W.tag===6){if(H===null)try{W.stateNode.nodeValue=T?"":W.memoizedProps}catch(ie){We(e,e.return,ie)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;H===W&&(H=null),W=W.return}H===W&&(H=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Ft(t,e),qt(e),r&4&&Xc(e);break;case 21:break;default:Ft(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Jc(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(An(o,""),r.flags&=-33);var c=Gc(e);Ui(e,c,o);break;case 3:case 4:var p=r.stateNode.containerInfo,g=Gc(e);Fi(e,g,p);break;default:throw Error(i(161))}}catch(j){We(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function km(e,t,n){re=e,ed(e)}function ed(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var o=re,c=o.child;if(o.tag===22&&r){var p=o.memoizedState!==null||Ol;if(!p){var g=o.alternate,j=g!==null&&g.memoizedState!==null||it;g=Ol;var T=it;if(Ol=p,(it=j)&&!T)for(re=o;re!==null;)p=re,j=p.child,p.tag===22&&p.memoizedState!==null?rd(o):j!==null?(j.return=p,re=j):rd(o);for(;c!==null;)re=c,ed(c),c=c.sibling;re=o,Ol=g,it=T}td(e)}else(o.subtreeFlags&8772)!==0&&c!==null?(c.return=o,re=c):td(e)}}function td(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:it||zl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!it)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:At(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&nc(t,c,r);break;case 3:var p=t.updateQueue;if(p!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}nc(t,p,n)}break;case 5:var g=t.stateNode;if(n===null&&t.flags&4){n=g;var j=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&n.focus();break;case"img":j.src&&(n.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var T=t.alternate;if(T!==null){var H=T.memoizedState;if(H!==null){var W=H.dehydrated;W!==null&&ts(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}it||t.flags&512&&Di(t)}catch(V){We(t,t.return,V)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function nd(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function rd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zl(4,t)}catch(j){We(t,n,j)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(j){We(t,o,j)}}var c=t.return;try{Di(t)}catch(j){We(t,c,j)}break;case 5:var p=t.return;try{Di(t)}catch(j){We(t,p,j)}}}catch(j){We(t,t.return,j)}if(t===e){re=null;break}var g=t.sibling;if(g!==null){g.return=t.return,re=g;break}re=t.return}}var Nm=Math.ceil,Al=Q.ReactCurrentDispatcher,Mi=Q.ReactCurrentOwner,Pt=Q.ReactCurrentBatchConfig,Pe=0,et=null,Je=null,rt=0,St=0,br=gn(0),Xe=0,Ss=null,Wn=0,Dl=0,Ii=0,bs=null,ht=null,$i=0,_r=1/0,nn=null,Fl=!1,Bi=null,Nn=null,Ul=!1,Sn=null,Ml=0,_s=0,Vi=null,Il=-1,$l=0;function ct(){return(Pe&6)!==0?Ke():Il!==-1?Il:Il=Ke()}function bn(e){return(e.mode&1)===0?1:(Pe&2)!==0&&rt!==0?rt&-rt:am.transition!==null?($l===0&&($l=Go()),$l):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:lu(e.type)),e)}function Ut(e,t,n,r){if(50<_s)throw _s=0,Vi=null,Error(i(185));Gr(e,n,r),((Pe&2)===0||e!==et)&&(e===et&&((Pe&2)===0&&(Dl|=n),Xe===4&&_n(e,rt)),xt(e,r),n===1&&Pe===0&&(t.mode&1)===0&&(_r=Ke()+500,hl&&vn()))}function xt(e,t){var n=e.callbackNode;ap(e,t);var r=Gs(e,e===et?rt:0);if(r===0)n!==null&&Ko(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ko(n),t===1)e.tag===0?lm(ld.bind(null,e)):Hu(ld.bind(null,e)),tm(function(){(Pe&6)===0&&vn()}),n=null;else{switch(Yo(r)){case 1:n=ka;break;case 4:n=Qo;break;case 16:n=qs;break;case 536870912:n=Jo;break;default:n=qs}n=pd(n,sd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sd(e,t){if(Il=-1,$l=0,(Pe&6)!==0)throw Error(i(327));var n=e.callbackNode;if(Cr()&&e.callbackNode!==n)return null;var r=Gs(e,e===et?rt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Bl(e,r);else{t=r;var o=Pe;Pe|=2;var c=id();(et!==e||rt!==t)&&(nn=null,_r=Ke()+500,Kn(e,t));do try{_m();break}catch(g){ad(e,g)}while(!0);ii(),Al.current=c,Pe=o,Je!==null?t=0:(et=null,rt=0,t=Xe)}if(t!==0){if(t===2&&(o=Na(e),o!==0&&(r=o,t=Hi(e,o))),t===1)throw n=Ss,Kn(e,0),_n(e,r),xt(e,Ke()),n;if(t===6)_n(e,r);else{if(o=e.current.alternate,(r&30)===0&&!Sm(o)&&(t=Bl(e,r),t===2&&(c=Na(e),c!==0&&(r=c,t=Hi(e,c))),t===1))throw n=Ss,Kn(e,0),_n(e,r),xt(e,Ke()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:Qn(e,ht,nn);break;case 3:if(_n(e,r),(r&130023424)===r&&(t=$i+500-Ke(),10<t)){if(Gs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ct(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ga(Qn.bind(null,e,ht,nn),t);break}Qn(e,ht,nn);break;case 4:if(_n(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var p=31-Lt(r);c=1<<p,p=t[p],p>o&&(o=p),r&=~c}if(r=o,r=Ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nm(r/1960))-r,10<r){e.timeoutHandle=Ga(Qn.bind(null,e,ht,nn),r);break}Qn(e,ht,nn);break;case 5:Qn(e,ht,nn);break;default:throw Error(i(329))}}}return xt(e,Ke()),e.callbackNode===n?sd.bind(null,e):null}function Hi(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(Kn(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=ht,ht=n,t!==null&&Wi(t)),e}function Wi(e){ht===null?ht=e:ht.push.apply(ht,e)}function Sm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],c=o.getSnapshot;o=o.value;try{if(!Ot(c(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _n(e,t){for(t&=~Ii,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Lt(t),r=1<<n;e[n]=-1,t&=~r}}function ld(e){if((Pe&6)!==0)throw Error(i(327));Cr();var t=Gs(e,0);if((t&1)===0)return xt(e,Ke()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=Na(e);r!==0&&(t=r,n=Hi(e,r))}if(n===1)throw n=Ss,Kn(e,0),_n(e,t),xt(e,Ke()),n;if(n===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qn(e,ht,nn),xt(e,Ke()),null}function qi(e,t){var n=Pe;Pe|=1;try{return e(t)}finally{Pe=n,Pe===0&&(_r=Ke()+500,hl&&vn())}}function qn(e){Sn!==null&&Sn.tag===0&&(Pe&6)===0&&Cr();var t=Pe;Pe|=1;var n=Pt.transition,r=Oe;try{if(Pt.transition=null,Oe=1,e)return e()}finally{Oe=r,Pt.transition=n,Pe=t,(Pe&6)===0&&vn()}}function Ki(){St=br.current,Me(br)}function Kn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,em(n)),Je!==null)for(n=Je.return;n!==null;){var r=n;switch(ni(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&pl();break;case 3:kr(),Me(ft),Me(st),hi();break;case 5:pi(r);break;case 4:kr();break;case 13:Me(Be);break;case 19:Me(Be);break;case 10:oi(r.type._context);break;case 22:case 23:Ki()}n=n.return}if(et=e,Je=e=Cn(e.current,null),rt=St=t,Xe=0,Ss=null,Ii=Dl=Wn=0,ht=bs=null,Bn!==null){for(t=0;t<Bn.length;t++)if(n=Bn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,c=n.pending;if(c!==null){var p=c.next;c.next=o,r.next=p}n.pending=r}Bn=null}return e}function ad(e,t){do{var n=Je;try{if(ii(),bl.current=Pl,_l){for(var r=Ve.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}_l=!1}if(Hn=0,Ze=Ye=Ve=null,ys=!1,vs=0,Mi.current=null,n===null||n.return===null){Xe=1,Ss=t,Je=null;break}e:{var c=e,p=n.return,g=n,j=t;if(t=rt,g.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var T=j,H=g,W=H.tag;if((H.mode&1)===0&&(W===0||W===11||W===15)){var V=H.alternate;V?(H.updateQueue=V.updateQueue,H.memoizedState=V.memoizedState,H.lanes=V.lanes):(H.updateQueue=null,H.memoizedState=null)}var Z=Tc(p);if(Z!==null){Z.flags&=-257,Lc(Z,p,g,c,t),Z.mode&1&&Rc(c,T,t),t=Z,j=T;var se=t.updateQueue;if(se===null){var ie=new Set;ie.add(j),t.updateQueue=ie}else se.add(j);break e}else{if((t&1)===0){Rc(c,T,t),Qi();break e}j=Error(i(426))}}else if(Ie&&g.mode&1){var Qe=Tc(p);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),Lc(Qe,p,g,c,t),li(Nr(j,g));break e}}c=j=Nr(j,g),Xe!==4&&(Xe=2),bs===null?bs=[c]:bs.push(c),c=p;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var E=Ec(c,j,t);tc(c,E);break e;case 1:g=j;var S=c.type,R=c.stateNode;if((c.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(Nn===null||!Nn.has(R)))){c.flags|=65536,t&=-t,c.lanes|=t;var J=Pc(c,g,t);tc(c,J);break e}}c=c.return}while(c!==null)}ud(n)}catch(ce){t=ce,Je===n&&n!==null&&(Je=n=n.return);continue}break}while(!0)}function id(){var e=Al.current;return Al.current=Pl,e===null?Pl:e}function Qi(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),et===null||(Wn&268435455)===0&&(Dl&268435455)===0||_n(et,rt)}function Bl(e,t){var n=Pe;Pe|=2;var r=id();(et!==e||rt!==t)&&(nn=null,Kn(e,t));do try{bm();break}catch(o){ad(e,o)}while(!0);if(ii(),Pe=n,Al.current=r,Je!==null)throw Error(i(261));return et=null,rt=0,Xe}function bm(){for(;Je!==null;)od(Je)}function _m(){for(;Je!==null&&!Yf();)od(Je)}function od(e){var t=fd(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?ud(e):Je=t,Mi.current=null}function ud(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=ym(n,t,St),n!==null){Je=n;return}}else{if(n=vm(n,t),n!==null){n.flags&=32767,Je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Je=null;return}}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Xe===0&&(Xe=5)}function Qn(e,t,n){var r=Oe,o=Pt.transition;try{Pt.transition=null,Oe=1,Cm(e,t,n,r)}finally{Pt.transition=o,Oe=r}return null}function Cm(e,t,n,r){do Cr();while(Sn!==null);if((Pe&6)!==0)throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var c=n.lanes|n.childLanes;if(ip(e,c),e===et&&(Je=et=null,rt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ul||(Ul=!0,pd(qs,function(){return Cr(),null})),c=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||c){c=Pt.transition,Pt.transition=null;var p=Oe;Oe=1;var g=Pe;Pe|=4,Mi.current=null,jm(e,n),Zc(n,e),Kp(Qa),Zs=!!Ka,Qa=Ka=null,e.current=n,km(n),Xf(),Pe=g,Oe=p,Pt.transition=c}else e.current=n;if(Ul&&(Ul=!1,Sn=e,Ml=o),c=e.pendingLanes,c===0&&(Nn=null),tp(n.stateNode),xt(e,Ke()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Fl)throw Fl=!1,e=Bi,Bi=null,e;return(Ml&1)!==0&&e.tag!==0&&Cr(),c=e.pendingLanes,(c&1)!==0?e===Vi?_s++:(_s=0,Vi=e):_s=0,vn(),null}function Cr(){if(Sn!==null){var e=Yo(Ml),t=Pt.transition,n=Oe;try{if(Pt.transition=null,Oe=16>e?16:e,Sn===null)var r=!1;else{if(e=Sn,Sn=null,Ml=0,(Pe&6)!==0)throw Error(i(331));var o=Pe;for(Pe|=4,re=e.current;re!==null;){var c=re,p=c.child;if((re.flags&16)!==0){var g=c.deletions;if(g!==null){for(var j=0;j<g.length;j++){var T=g[j];for(re=T;re!==null;){var H=re;switch(H.tag){case 0:case 11:case 15:Ns(8,H,c)}var W=H.child;if(W!==null)W.return=H,re=W;else for(;re!==null;){H=re;var V=H.sibling,Z=H.return;if(Qc(H),H===T){re=null;break}if(V!==null){V.return=Z,re=V;break}re=Z}}}var se=c.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var Qe=ie.sibling;ie.sibling=null,ie=Qe}while(ie!==null)}}re=c}}if((c.subtreeFlags&2064)!==0&&p!==null)p.return=c,re=p;else e:for(;re!==null;){if(c=re,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:Ns(9,c,c.return)}var E=c.sibling;if(E!==null){E.return=c.return,re=E;break e}re=c.return}}var S=e.current;for(re=S;re!==null;){p=re;var R=p.child;if((p.subtreeFlags&2064)!==0&&R!==null)R.return=p,re=R;else e:for(p=S;re!==null;){if(g=re,(g.flags&2048)!==0)try{switch(g.tag){case 0:case 11:case 15:zl(9,g)}}catch(ce){We(g,g.return,ce)}if(g===p){re=null;break e}var J=g.sibling;if(J!==null){J.return=g.return,re=J;break e}re=g.return}}if(Pe=o,vn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Ks,e)}catch{}r=!0}return r}finally{Oe=n,Pt.transition=t}}return!1}function cd(e,t,n){t=Nr(n,t),t=Ec(e,t,1),e=jn(e,t,1),t=ct(),e!==null&&(Gr(e,1,t),xt(e,t))}function We(e,t,n){if(e.tag===3)cd(e,e,n);else for(;t!==null;){if(t.tag===3){cd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nn===null||!Nn.has(r))){e=Nr(n,e),e=Pc(t,e,1),t=jn(t,e,1),e=ct(),t!==null&&(Gr(t,1,e),xt(t,e));break}}t=t.return}}function Em(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(rt&n)===n&&(Xe===4||Xe===3&&(rt&130023424)===rt&&500>Ke()-$i?Kn(e,0):Ii|=n),xt(e,t)}function dd(e,t){t===0&&((e.mode&1)===0?t=1:(t=Js,Js<<=1,(Js&130023424)===0&&(Js=4194304)));var n=ct();e=Zt(e,t),e!==null&&(Gr(e,t,n),xt(e,n))}function Pm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dd(e,n)}function Rm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}r!==null&&r.delete(t),dd(e,n)}var fd;fd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)mt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return mt=!1,gm(e,t,n);mt=(e.flags&131072)!==0}else mt=!1,Ie&&(t.flags&1048576)!==0&&Wu(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ll(e,t),e=t.pendingProps;var o=hr(t,st.current);jr(t,n),o=yi(null,t,r,e,o,n);var c=vi();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(c=!0,ml(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,di(t),o.updater=Rl,t.stateNode=o,o._reactInternals=t,bi(t,r,e,n),t=Pi(null,t,r,!0,c,n)):(t.tag=0,Ie&&c&&ti(t),ut(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ll(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Lm(r),e=At(r,e),o){case 0:t=Ei(null,t,r,e,n);break e;case 1:t=Uc(null,t,r,e,n);break e;case 11:t=Oc(null,t,r,e,n);break e;case 14:t=zc(null,t,r,At(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Ei(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Uc(e,t,r,o,n);case 3:e:{if(Mc(t),e===null)throw Error(i(387));r=t.pendingProps,c=t.memoizedState,o=c.element,ec(e,t),Nl(t,r,null,n);var p=t.memoizedState;if(r=p.element,c.isDehydrated)if(c={element:r,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){o=Nr(Error(i(423)),t),t=Ic(e,t,r,n,o);break e}else if(r!==o){o=Nr(Error(i(424)),t),t=Ic(e,t,r,n,o);break e}else for(Nt=xn(t.stateNode.containerInfo.firstChild),kt=t,Ie=!0,zt=null,n=Xu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===o){t=tn(e,t,n);break e}ut(e,t,r,n)}t=t.child}return t;case 5:return rc(t),e===null&&si(t),r=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,Ja(r,o)?p=null:c!==null&&Ja(r,c)&&(t.flags|=32),Fc(e,t),ut(e,t,p,n),t.child;case 6:return e===null&&si(t),null;case 13:return $c(e,t,n);case 4:return fi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):ut(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Oc(e,t,r,o,n);case 7:return ut(e,t,t.pendingProps,n),t.child;case 8:return ut(e,t,t.pendingProps.children,n),t.child;case 12:return ut(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,Fe(wl,r._currentValue),r._currentValue=p,c!==null)if(Ot(c.value,p)){if(c.children===o.children&&!ft.current){t=tn(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var g=c.dependencies;if(g!==null){p=c.child;for(var j=g.firstContext;j!==null;){if(j.context===r){if(c.tag===1){j=en(-1,n&-n),j.tag=2;var T=c.updateQueue;if(T!==null){T=T.shared;var H=T.pending;H===null?j.next=j:(j.next=H.next,H.next=j),T.pending=j}}c.lanes|=n,j=c.alternate,j!==null&&(j.lanes|=n),ui(c.return,n,t),g.lanes|=n;break}j=j.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(i(341));p.lanes|=n,g=p.alternate,g!==null&&(g.lanes|=n),ui(p,n,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}ut(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,jr(t,n),o=Ct(o),r=r(o),t.flags|=1,ut(e,t,r,n),t.child;case 14:return r=t.type,o=At(r,t.pendingProps),o=At(r.type,o),zc(e,t,r,o,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Ll(e,t),t.tag=1,pt(r)?(e=!0,ml(t)):e=!1,jr(t,n),_c(t,r,o),bi(t,r,o,n),Pi(null,t,r,!0,e,n);case 19:return Vc(e,t,n);case 22:return Dc(e,t,n)}throw Error(i(156,t.tag))};function pd(e,t){return qo(e,t)}function Tm(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 Rt(e,t,n,r){return new Tm(e,t,n,r)}function Ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lm(e){if(typeof e=="function")return Ji(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===q)return 14}return 2}function Cn(e,t){var n=e.alternate;return n===null?(n=Rt(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 Vl(e,t,n,r,o,c){var p=2;if(r=e,typeof e=="function")Ji(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case O:return Jn(n.children,o,c,t);case ae:p=8,o|=8;break;case de:return e=Rt(12,n,t,o|2),e.elementType=de,e.lanes=c,e;case ze:return e=Rt(13,n,t,o),e.elementType=ze,e.lanes=c,e;case Ee:return e=Rt(19,n,t,o),e.elementType=Ee,e.lanes=c,e;case D:return Hl(n,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:p=10;break e;case ke:p=9;break e;case Te:p=11;break e;case q:p=14;break e;case ge:p=16,r=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Rt(p,n,t,o),t.elementType=e,t.type=r,t.lanes=c,t}function Jn(e,t,n,r){return e=Rt(7,e,r,t),e.lanes=n,e}function Hl(e,t,n,r){return e=Rt(22,e,r,t),e.elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Gi(e,t,n){return e=Rt(6,e,null,t),e.lanes=n,e}function Yi(e,t,n){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Om(e,t,n,r,o){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=Sa(0),this.expirationTimes=Sa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Xi(e,t,n,r,o,c,p,g,j){return e=new Om(e,t,n,g,j),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Rt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},di(c),e}function zm(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fe,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function md(e){if(!e)return yn;e=e._reactInternals;e:{if(Fn(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var n=e.type;if(pt(n))return Bu(e,n,t)}return t}function hd(e,t,n,r,o,c,p,g,j){return e=Xi(n,r,!0,e,o,c,p,g,j),e.context=md(null),n=e.current,r=ct(),o=bn(n),c=en(r,o),c.callback=t??null,jn(n,c,o),e.current.lanes=o,Gr(e,o,r),xt(e,r),e}function Wl(e,t,n,r){var o=t.current,c=ct(),p=bn(o);return n=md(n),t.context===null?t.context=n:t.pendingContext=n,t=en(c,p),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jn(o,t,p),e!==null&&(Ut(e,o,p,c),kl(e,o,p)),p}function ql(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function xd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zi(e,t){xd(e,t),(e=e.alternate)&&xd(e,t)}function Am(){return null}var gd=typeof reportError=="function"?reportError:function(e){console.error(e)};function eo(e){this._internalRoot=e}Kl.prototype.render=eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Wl(e,t,null,null)},Kl.prototype.unmount=eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qn(function(){Wl(null,e,null,null)}),t[Jt]=null}};function Kl(e){this._internalRoot=e}Kl.prototype.unstable_scheduleHydration=function(e){if(e){var t=eu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pn.length&&t!==0&&t<pn[n].priority;n++);pn.splice(n,0,e),n===0&&ru(e)}};function to(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yd(){}function Dm(e,t,n,r,o){if(o){if(typeof r=="function"){var c=r;r=function(){var T=ql(p);c.call(T)}}var p=hd(t,r,e,0,null,!1,!1,"",yd);return e._reactRootContainer=p,e[Jt]=p.current,cs(e.nodeType===8?e.parentNode:e),qn(),p}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var g=r;r=function(){var T=ql(j);g.call(T)}}var j=Xi(e,0,!1,null,null,!1,!1,"",yd);return e._reactRootContainer=j,e[Jt]=j.current,cs(e.nodeType===8?e.parentNode:e),qn(function(){Wl(t,j,n,r)}),j}function Jl(e,t,n,r,o){var c=n._reactRootContainer;if(c){var p=c;if(typeof o=="function"){var g=o;o=function(){var j=ql(p);g.call(j)}}Wl(t,p,e,o)}else p=Dm(n,t,e,o,r);return ql(p)}Xo=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jr(t.pendingLanes);n!==0&&(ba(t,n|1),xt(t,Ke()),(Pe&6)===0&&(_r=Ke()+500,vn()))}break;case 13:qn(function(){var r=Zt(e,1);if(r!==null){var o=ct();Ut(r,e,1,o)}}),Zi(e,1)}},_a=function(e){if(e.tag===13){var t=Zt(e,134217728);if(t!==null){var n=ct();Ut(t,e,134217728,n)}Zi(e,134217728)}},Zo=function(e){if(e.tag===13){var t=bn(e),n=Zt(e,t);if(n!==null){var r=ct();Ut(n,e,t,r)}Zi(e,t)}},eu=function(){return Oe},tu=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}},Wr=function(e,t,n){switch(t){case"input":if(wt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=fl(r);if(!o)throw Error(i(90));_e(r),wt(r,o)}}}break;case"textarea":Us(e,n);break;case"select":t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}},Ae=qi,$e=qn;var Fm={usingClientEntryPoint:!1,Events:[ps,pr,fl,ue,Se,qi]},Cs={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Um={bundleType:Cs.bundleType,version:Cs.version,rendererPackageName:Cs.rendererPackageName,rendererConfig:Cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ho(e),e===null?null:e.stateNode},findFiberByHostInstance:Cs.findFiberByHostInstance||Am,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gl.isDisabled&&Gl.supportsFiber)try{Ks=Gl.inject(Um),Bt=Gl}catch{}}return gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fm,gt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!to(t))throw Error(i(200));return zm(e,t,null,n)},gt.createRoot=function(e,t){if(!to(e))throw Error(i(299));var n=!1,r="",o=gd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Xi(e,1,!1,null,null,n,!1,r,o),e[Jt]=t.current,cs(e.nodeType===8?e.parentNode:e),new eo(t)},gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Ho(t),e=e===null?null:e.stateNode,e},gt.flushSync=function(e){return qn(e)},gt.hydrate=function(e,t,n){if(!Ql(t))throw Error(i(200));return Jl(null,e,t,!0,n)},gt.hydrateRoot=function(e,t,n){if(!to(e))throw Error(i(405));var r=n!=null&&n.hydratedSources||null,o=!1,c="",p=gd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),t=hd(t,null,e,1,n??null,o,!1,c,p),e[Jt]=t.current,cs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Kl(t)},gt.render=function(e,t,n){if(!Ql(t))throw Error(i(200));return Jl(null,e,t,!1,n)},gt.unmountComponentAtNode=function(e){if(!Ql(e))throw Error(i(40));return e._reactRootContainer?(qn(function(){Jl(null,null,e,!1,function(){e._reactRootContainer=null,e[Jt]=null})}),!0):!1},gt.unstable_batchedUpdates=qi,gt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ql(n))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Jl(e,t,n,!1,r)},gt.version="18.3.1-next-f1338f8080-20240426",gt}var _d;function sf(){if(_d)return so.exports;_d=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(a){console.error(a)}}return s(),so.exports=Km(),so.exports}var Cd;function Qm(){if(Cd)return Yl;Cd=1;var s=sf();return Yl.createRoot=s.createRoot,Yl.hydrateRoot=s.hydrateRoot,Yl}var Jm=Qm();const Gm=nf(Jm);sf();/**
|
||
* @remix-run/router v1.23.2
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Rs(){return Rs=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])}return s},Rs.apply(this,arguments)}var Rn;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(Rn||(Rn={}));const Ed="popstate";function Ym(s){s===void 0&&(s={});function a(u,d){let{pathname:f,search:m,hash:h}=u.location;return go("",{pathname:f,search:m,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(u,d){return typeof d=="string"?d:sa(d)}return Zm(a,i,null,s)}function He(s,a){if(s===!1||s===null||typeof s>"u")throw new Error(a)}function Lo(s,a){if(!s){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Xm(){return Math.random().toString(36).substr(2,8)}function Pd(s,a){return{usr:s.state,key:s.key,idx:a}}function go(s,a,i,u){return i===void 0&&(i=null),Rs({pathname:typeof s=="string"?s:s.pathname,search:"",hash:""},typeof a=="string"?Or(a):a,{state:i,key:a&&a.key||u||Xm()})}function sa(s){let{pathname:a="/",search:i="",hash:u=""}=s;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),u&&u!=="#"&&(a+=u.charAt(0)==="#"?u:"#"+u),a}function Or(s){let a={};if(s){let i=s.indexOf("#");i>=0&&(a.hash=s.substr(i),s=s.substr(0,i));let u=s.indexOf("?");u>=0&&(a.search=s.substr(u),s=s.substr(0,u)),s&&(a.pathname=s)}return a}function Zm(s,a,i,u){u===void 0&&(u={});let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,h=Rn.Pop,x=null,y=k();y==null&&(y=0,m.replaceState(Rs({},m.state,{idx:y}),""));function k(){return(m.state||{idx:null}).idx}function C(){h=Rn.Pop;let N=k(),A=N==null?null:N-y;y=N,x&&x({action:h,location:P.location,delta:A})}function z(N,A){h=Rn.Push;let M=go(P.location,N,A);y=k()+1;let K=Pd(M,y),Q=P.createHref(M);try{m.pushState(K,"",Q)}catch(me){if(me instanceof DOMException&&me.name==="DataCloneError")throw me;d.location.assign(Q)}f&&x&&x({action:h,location:P.location,delta:1})}function B(N,A){h=Rn.Replace;let M=go(P.location,N,A);y=k();let K=Pd(M,y),Q=P.createHref(M);m.replaceState(K,"",Q),f&&x&&x({action:h,location:P.location,delta:0})}function L(N){let A=d.location.origin!=="null"?d.location.origin:d.location.href,M=typeof N=="string"?N:sa(N);return M=M.replace(/ $/,"%20"),He(A,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,A)}let P={get action(){return h},get location(){return s(d,m)},listen(N){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(Ed,C),x=N,()=>{d.removeEventListener(Ed,C),x=null}},createHref(N){return a(d,N)},createURL:L,encodeLocation(N){let A=L(N);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:z,replace:B,go(N){return m.go(N)}};return P}var Rd;(function(s){s.data="data",s.deferred="deferred",s.redirect="redirect",s.error="error"})(Rd||(Rd={}));function e0(s,a,i){return i===void 0&&(i="/"),t0(s,a,i)}function t0(s,a,i,u){let d=typeof a=="string"?Or(a):a,f=Rr(d.pathname||"/",i);if(f==null)return null;let m=lf(s);n0(m);let h=null;for(let x=0;h==null&&x<m.length;++x){let y=p0(f);h=d0(m[x],y)}return h}function lf(s,a,i,u){a===void 0&&(a=[]),i===void 0&&(i=[]),u===void 0&&(u="");let d=(f,m,h)=>{let x={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};x.relativePath.startsWith("/")&&(He(x.relativePath.startsWith(u),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+u+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(u.length));let y=Tn([u,x.relativePath]),k=i.concat(x);f.children&&f.children.length>0&&(He(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),lf(f.children,a,k,y)),!(f.path==null&&!f.index)&&a.push({path:y,score:u0(y,f.index),routesMeta:k})};return s.forEach((f,m)=>{var h;if(f.path===""||!((h=f.path)!=null&&h.includes("?")))d(f,m);else for(let x of af(f.path))d(f,m,x)}),a}function af(s){let a=s.split("/");if(a.length===0)return[];let[i,...u]=a,d=i.endsWith("?"),f=i.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=af(u.join("/")),h=[];return h.push(...m.map(x=>x===""?f:[f,x].join("/"))),d&&h.push(...m),h.map(x=>s.startsWith("/")&&x===""?"/":x)}function n0(s){s.sort((a,i)=>a.score!==i.score?i.score-a.score:c0(a.routesMeta.map(u=>u.childrenIndex),i.routesMeta.map(u=>u.childrenIndex)))}const r0=/^:[\w-]+$/,s0=3,l0=2,a0=1,i0=10,o0=-2,Td=s=>s==="*";function u0(s,a){let i=s.split("/"),u=i.length;return i.some(Td)&&(u+=o0),a&&(u+=l0),i.filter(d=>!Td(d)).reduce((d,f)=>d+(r0.test(f)?s0:f===""?a0:i0),u)}function c0(s,a){return s.length===a.length&&s.slice(0,-1).every((u,d)=>u===a[d])?s[s.length-1]-a[a.length-1]:0}function d0(s,a,i){let{routesMeta:u}=s,d={},f="/",m=[];for(let h=0;h<u.length;++h){let x=u[h],y=h===u.length-1,k=f==="/"?a:a.slice(f.length)||"/",C=yo({path:x.relativePath,caseSensitive:x.caseSensitive,end:y},k),z=x.route;if(!C)return null;Object.assign(d,C.params),m.push({params:d,pathname:Tn([f,C.pathname]),pathnameBase:y0(Tn([f,C.pathnameBase])),route:z}),C.pathnameBase!=="/"&&(f=Tn([f,C.pathnameBase]))}return m}function yo(s,a){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[i,u]=f0(s.path,s.caseSensitive,s.end),d=a.match(i);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),h=d.slice(1);return{params:u.reduce((y,k,C)=>{let{paramName:z,isOptional:B}=k;if(z==="*"){let P=h[C]||"";m=f.slice(0,f.length-P.length).replace(/(.)\/+$/,"$1")}const L=h[C];return B&&!L?y[z]=void 0:y[z]=(L||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:m,pattern:s}}function f0(s,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),Lo(s==="*"||!s.endsWith("*")||s.endsWith("/*"),'Route path "'+s+'" will be treated as if it were '+('"'+s.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+s.replace(/\*$/,"/*")+'".'));let u=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,h,x)=>(u.push({paramName:h,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(u.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,a?void 0:"i"),u]}function p0(s){try{return s.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Lo(!1,'The URL path "'+s+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),s}}function Rr(s,a){if(a==="/")return s;if(!s.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,u=s.charAt(i);return u&&u!=="/"?null:s.slice(i)||"/"}const m0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,h0=s=>m0.test(s);function x0(s,a){a===void 0&&(a="/");let{pathname:i,search:u="",hash:d=""}=typeof s=="string"?Or(s):s,f;if(i)if(h0(i))f=i;else{if(i.includes("//")){let m=i;i=i.replace(/\/\/+/g,"/"),Lo(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+i))}i.startsWith("/")?f=Ld(i.substring(1),"/"):f=Ld(i,a)}else f=a;return{pathname:f,search:v0(u),hash:w0(d)}}function Ld(s,a){let i=a.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function io(s,a,i,u){return"Cannot include a '"+s+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(u)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function g0(s){return s.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Oo(s,a){let i=g0(s);return a?i.map((u,d)=>d===i.length-1?u.pathname:u.pathnameBase):i.map(u=>u.pathnameBase)}function zo(s,a,i,u){u===void 0&&(u=!1);let d;typeof s=="string"?d=Or(s):(d=Rs({},s),He(!d.pathname||!d.pathname.includes("?"),io("?","pathname","search",d)),He(!d.pathname||!d.pathname.includes("#"),io("#","pathname","hash",d)),He(!d.search||!d.search.includes("#"),io("#","search","hash",d)));let f=s===""||d.pathname==="",m=f?"/":d.pathname,h;if(m==null)h=i;else{let C=a.length-1;if(!u&&m.startsWith("..")){let z=m.split("/");for(;z[0]==="..";)z.shift(),C-=1;d.pathname=z.join("/")}h=C>=0?a[C]:"/"}let x=x0(d,h),y=m&&m!=="/"&&m.endsWith("/"),k=(f||m===".")&&i.endsWith("/");return!x.pathname.endsWith("/")&&(y||k)&&(x.pathname+="/"),x}const Tn=s=>s.join("/").replace(/\/\/+/g,"/"),y0=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),v0=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,w0=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function j0(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}const of=["post","put","patch","delete"];new Set(of);const k0=["get",...of];new Set(k0);/**
|
||
* React Router v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Ts(){return Ts=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])}return s},Ts.apply(this,arguments)}const oa=v.createContext(null),uf=v.createContext(null),sn=v.createContext(null),ua=v.createContext(null),ln=v.createContext({outlet:null,matches:[],isDataRoute:!1}),cf=v.createContext(null);function N0(s,a){let{relative:i}=a===void 0?{}:a;zr()||He(!1);let{basename:u,navigator:d}=v.useContext(sn),{hash:f,pathname:m,search:h}=da(s,{relative:i}),x=m;return u!=="/"&&(x=m==="/"?u:Tn([u,m])),d.createHref({pathname:x,search:h,hash:f})}function zr(){return v.useContext(ua)!=null}function Ar(){return zr()||He(!1),v.useContext(ua).location}function df(s){v.useContext(sn).static||v.useLayoutEffect(s)}function ca(){let{isDataRoute:s}=v.useContext(ln);return s?U0():S0()}function S0(){zr()||He(!1);let s=v.useContext(oa),{basename:a,future:i,navigator:u}=v.useContext(sn),{matches:d}=v.useContext(ln),{pathname:f}=Ar(),m=JSON.stringify(Oo(d,i.v7_relativeSplatPath)),h=v.useRef(!1);return df(()=>{h.current=!0}),v.useCallback(function(y,k){if(k===void 0&&(k={}),!h.current)return;if(typeof y=="number"){u.go(y);return}let C=zo(y,JSON.parse(m),f,k.relative==="path");s==null&&a!=="/"&&(C.pathname=C.pathname==="/"?a:Tn([a,C.pathname])),(k.replace?u.replace:u.push)(C,k.state,k)},[a,u,m,f,s])}const b0=v.createContext(null);function _0(s){let a=v.useContext(ln).outlet;return a&&v.createElement(b0.Provider,{value:s},a)}function da(s,a){let{relative:i}=a===void 0?{}:a,{future:u}=v.useContext(sn),{matches:d}=v.useContext(ln),{pathname:f}=Ar(),m=JSON.stringify(Oo(d,u.v7_relativeSplatPath));return v.useMemo(()=>zo(s,JSON.parse(m),f,i==="path"),[s,m,f,i])}function C0(s,a){return E0(s,a)}function E0(s,a,i,u){zr()||He(!1);let{navigator:d}=v.useContext(sn),{matches:f}=v.useContext(ln),m=f[f.length-1],h=m?m.params:{};m&&m.pathname;let x=m?m.pathnameBase:"/";m&&m.route;let y=Ar(),k;if(a){var C;let N=typeof a=="string"?Or(a):a;x==="/"||(C=N.pathname)!=null&&C.startsWith(x)||He(!1),k=N}else k=y;let z=k.pathname||"/",B=z;if(x!=="/"){let N=x.replace(/^\//,"").split("/");B="/"+z.replace(/^\//,"").split("/").slice(N.length).join("/")}let L=e0(s,{pathname:B}),P=O0(L&&L.map(N=>Object.assign({},N,{params:Object.assign({},h,N.params),pathname:Tn([x,d.encodeLocation?d.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?x:Tn([x,d.encodeLocation?d.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),f,i,u);return a&&P?v.createElement(ua.Provider,{value:{location:Ts({pathname:"/",search:"",hash:"",state:null,key:"default"},k),navigationType:Rn.Pop}},P):P}function P0(){let s=F0(),a=j0(s)?s.status+" "+s.statusText:s instanceof Error?s.message:JSON.stringify(s),i=s instanceof Error?s.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},a),i?v.createElement("pre",{style:d},i):null,null)}const R0=v.createElement(P0,null);class T0 extends v.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,i){return i.location!==a.location||i.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:i.error,location:i.location,revalidation:a.revalidation||i.revalidation}}componentDidCatch(a,i){console.error("React Router caught the following error during render",a,i)}render(){return this.state.error!==void 0?v.createElement(ln.Provider,{value:this.props.routeContext},v.createElement(cf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function L0(s){let{routeContext:a,match:i,children:u}=s,d=v.useContext(oa);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(ln.Provider,{value:a},u)}function O0(s,a,i,u){var d;if(a===void 0&&(a=[]),i===void 0&&(i=null),u===void 0&&(u=null),s==null){var f;if(!i)return null;if(i.errors)s=i.matches;else if((f=u)!=null&&f.v7_partialHydration&&a.length===0&&!i.initialized&&i.matches.length>0)s=i.matches;else return null}let m=s,h=(d=i)==null?void 0:d.errors;if(h!=null){let k=m.findIndex(C=>C.route.id&&(h==null?void 0:h[C.route.id])!==void 0);k>=0||He(!1),m=m.slice(0,Math.min(m.length,k+1))}let x=!1,y=-1;if(i&&u&&u.v7_partialHydration)for(let k=0;k<m.length;k++){let C=m[k];if((C.route.HydrateFallback||C.route.hydrateFallbackElement)&&(y=k),C.route.id){let{loaderData:z,errors:B}=i,L=C.route.loader&&z[C.route.id]===void 0&&(!B||B[C.route.id]===void 0);if(C.route.lazy||L){x=!0,y>=0?m=m.slice(0,y+1):m=[m[0]];break}}}return m.reduceRight((k,C,z)=>{let B,L=!1,P=null,N=null;i&&(B=h&&C.route.id?h[C.route.id]:void 0,P=C.route.errorElement||R0,x&&(y<0&&z===0?(M0("route-fallback"),L=!0,N=null):y===z&&(L=!0,N=C.route.hydrateFallbackElement||null)));let A=a.concat(m.slice(0,z+1)),M=()=>{let K;return B?K=P:L?K=N:C.route.Component?K=v.createElement(C.route.Component,null):C.route.element?K=C.route.element:K=k,v.createElement(L0,{match:C,routeContext:{outlet:k,matches:A,isDataRoute:i!=null},children:K})};return i&&(C.route.ErrorBoundary||C.route.errorElement||z===0)?v.createElement(T0,{location:i.location,revalidation:i.revalidation,component:P,error:B,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):M()},null)}var ff=(function(s){return s.UseBlocker="useBlocker",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s})(ff||{}),pf=(function(s){return s.UseBlocker="useBlocker",s.UseLoaderData="useLoaderData",s.UseActionData="useActionData",s.UseRouteError="useRouteError",s.UseNavigation="useNavigation",s.UseRouteLoaderData="useRouteLoaderData",s.UseMatches="useMatches",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s.UseRouteId="useRouteId",s})(pf||{});function z0(s){let a=v.useContext(oa);return a||He(!1),a}function A0(s){let a=v.useContext(uf);return a||He(!1),a}function D0(s){let a=v.useContext(ln);return a||He(!1),a}function mf(s){let a=D0(),i=a.matches[a.matches.length-1];return i.route.id||He(!1),i.route.id}function F0(){var s;let a=v.useContext(cf),i=A0(),u=mf();return a!==void 0?a:(s=i.errors)==null?void 0:s[u]}function U0(){let{router:s}=z0(ff.UseNavigateStable),a=mf(pf.UseNavigateStable),i=v.useRef(!1);return df(()=>{i.current=!0}),v.useCallback(function(d,f){f===void 0&&(f={}),i.current&&(typeof d=="number"?s.navigate(d):s.navigate(d,Ts({fromRouteId:a},f)))},[s,a])}const Od={};function M0(s,a,i){Od[s]||(Od[s]=!0)}function I0(s,a){s==null||s.v7_startTransition,s==null||s.v7_relativeSplatPath}function vo(s){let{to:a,replace:i,state:u,relative:d}=s;zr()||He(!1);let{future:f,static:m}=v.useContext(sn),{matches:h}=v.useContext(ln),{pathname:x}=Ar(),y=ca(),k=zo(a,Oo(h,f.v7_relativeSplatPath),x,d==="path"),C=JSON.stringify(k);return v.useEffect(()=>y(JSON.parse(C),{replace:i,state:u,relative:d}),[y,C,d,i,u]),null}function $0(s){return _0(s.context)}function yt(s){He(!1)}function B0(s){let{basename:a="/",children:i=null,location:u,navigationType:d=Rn.Pop,navigator:f,static:m=!1,future:h}=s;zr()&&He(!1);let x=a.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:x,navigator:f,static:m,future:Ts({v7_relativeSplatPath:!1},h)}),[x,h,f,m]);typeof u=="string"&&(u=Or(u));let{pathname:k="/",search:C="",hash:z="",state:B=null,key:L="default"}=u,P=v.useMemo(()=>{let N=Rr(k,x);return N==null?null:{location:{pathname:N,search:C,hash:z,state:B,key:L},navigationType:d}},[x,k,C,z,B,L,d]);return P==null?null:v.createElement(sn.Provider,{value:y},v.createElement(ua.Provider,{children:i,value:P}))}function V0(s){let{children:a,location:i}=s;return C0(wo(a),i)}new Promise(()=>{});function wo(s,a){a===void 0&&(a=[]);let i=[];return v.Children.forEach(s,(u,d)=>{if(!v.isValidElement(u))return;let f=[...a,d];if(u.type===v.Fragment){i.push.apply(i,wo(u.props.children,f));return}u.type!==yt&&He(!1),!u.props.index||!u.props.children||He(!1);let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,loader:u.props.loader,action:u.props.action,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=wo(u.props.children,f)),i.push(m)}),i}/**
|
||
* React Router DOM v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function la(){return la=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(s[u]=i[u])}return s},la.apply(this,arguments)}function hf(s,a){if(s==null)return{};var i={},u=Object.keys(s),d,f;for(f=0;f<u.length;f++)d=u[f],!(a.indexOf(d)>=0)&&(i[d]=s[d]);return i}function H0(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function W0(s,a){return s.button===0&&(!a||a==="_self")&&!H0(s)}const q0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],K0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Q0="6";try{window.__reactRouterVersion=Q0}catch{}const J0=v.createContext({isTransitioning:!1}),G0="startTransition",zd=Hm[G0];function Y0(s){let{basename:a,children:i,future:u,window:d}=s,f=v.useRef();f.current==null&&(f.current=Ym({window:d,v5Compat:!0}));let m=f.current,[h,x]=v.useState({action:m.action,location:m.location}),{v7_startTransition:y}=u||{},k=v.useCallback(C=>{y&&zd?zd(()=>x(C)):x(C)},[x,y]);return v.useLayoutEffect(()=>m.listen(k),[m,k]),v.useEffect(()=>I0(u),[u]),v.createElement(B0,{basename:a,children:i,location:h.location,navigationType:h.action,navigator:m,future:u})}const X0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eh=v.forwardRef(function(a,i){let{onClick:u,relative:d,reloadDocument:f,replace:m,state:h,target:x,to:y,preventScrollReset:k,viewTransition:C}=a,z=hf(a,q0),{basename:B}=v.useContext(sn),L,P=!1;if(typeof y=="string"&&Z0.test(y)&&(L=y,X0))try{let K=new URL(window.location.href),Q=y.startsWith("//")?new URL(K.protocol+y):new URL(y),me=Rr(Q.pathname,B);Q.origin===K.origin&&me!=null?y=me+Q.search+Q.hash:P=!0}catch{}let N=N0(y,{relative:d}),A=rh(y,{replace:m,state:h,target:x,preventScrollReset:k,relative:d,viewTransition:C});function M(K){u&&u(K),K.defaultPrevented||A(K)}return v.createElement("a",la({},z,{href:L||N,onClick:P||f?u:M,ref:i,target:x}))}),th=v.forwardRef(function(a,i){let{"aria-current":u="page",caseSensitive:d=!1,className:f="",end:m=!1,style:h,to:x,viewTransition:y,children:k}=a,C=hf(a,K0),z=da(x,{relative:C.relative}),B=Ar(),L=v.useContext(uf),{navigator:P,basename:N}=v.useContext(sn),A=L!=null&&sh(z)&&y===!0,M=P.encodeLocation?P.encodeLocation(z).pathname:z.pathname,K=B.pathname,Q=L&&L.navigation&&L.navigation.location?L.navigation.location.pathname:null;d||(K=K.toLowerCase(),Q=Q?Q.toLowerCase():null,M=M.toLowerCase()),Q&&N&&(Q=Rr(Q,N)||Q);const me=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let fe=K===M||!m&&K.startsWith(M)&&K.charAt(me)==="/",O=Q!=null&&(Q===M||!m&&Q.startsWith(M)&&Q.charAt(M.length)==="/"),ae={isActive:fe,isPending:O,isTransitioning:A},de=fe?u:void 0,Y;typeof f=="function"?Y=f(ae):Y=[f,fe?"active":null,O?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ke=typeof h=="function"?h(ae):h;return v.createElement(eh,la({},C,{"aria-current":de,className:Y,ref:i,style:ke,to:x,viewTransition:y}),typeof k=="function"?k(ae):k)});var jo;(function(s){s.UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState"})(jo||(jo={}));var Ad;(function(s){s.UseFetcher="useFetcher",s.UseFetchers="useFetchers",s.UseScrollRestoration="useScrollRestoration"})(Ad||(Ad={}));function nh(s){let a=v.useContext(oa);return a||He(!1),a}function rh(s,a){let{target:i,replace:u,state:d,preventScrollReset:f,relative:m,viewTransition:h}=a===void 0?{}:a,x=ca(),y=Ar(),k=da(s,{relative:m});return v.useCallback(C=>{if(W0(C,i)){C.preventDefault();let z=u!==void 0?u:sa(y)===sa(k);x(s,{replace:z,state:d,preventScrollReset:f,relative:m,viewTransition:h})}},[y,x,k,u,d,i,s,f,m,h])}function sh(s,a){a===void 0&&(a={});let i=v.useContext(J0);i==null&&He(!1);let{basename:u}=nh(jo.useViewTransitionState),d=da(s,{relative:a.relative});if(!i.isTransitioning)return!1;let f=Rr(i.currentLocation.pathname,u)||i.currentLocation.pathname,m=Rr(i.nextLocation.pathname,u)||i.nextLocation.pathname;return yo(d.pathname,m)!=null||yo(d.pathname,f)!=null}/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lh=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xf=(...s)=>s.filter((a,i,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===i).join(" ").trim();/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var ah={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ih=v.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:d="",children:f,iconNode:m,...h},x)=>v.createElement("svg",{ref:x,...ah,width:a,height:a,stroke:s,strokeWidth:u?Number(i)*24/Number(a):i,className:xf("lucide",d),...h},[...m.map(([y,k])=>v.createElement(y,k)),...Array.isArray(f)?f:[f]]));/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ce=(s,a)=>{const i=v.forwardRef(({className:u,...d},f)=>v.createElement(ih,{ref:f,iconNode:a,className:xf(`lucide-${lh(s)}`,u),...d}));return i.displayName=`${s}`,i};/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oh=Ce("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gf=Ce("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oo=Ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ko=Ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const No=Ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uh=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Dd=Ce("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yf=Ce("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const So=Ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Fd=Ce("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ch=Ce("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Yn=Ce("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vf=Ce("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dh=Ce("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fh=Ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ph=Ce("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wf=Ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xl=Ce("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const mh=Ce("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const jf=Ce("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hh=Ce("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tr=Ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ge=Ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xh=Ce("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Kt=Ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ao=Ce("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gh=Ce("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yh=Ce("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Pn=Ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rn=Ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ln=Ce("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Tr=Ce("Tv",[["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",ry:"2",key:"10ag99"}],["polyline",{points:"17 2 12 7 7 2",key:"11pgbg"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const vh=Ce("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const aa=Ce("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fa=Ce("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
||
* @license lucide-react v0.468.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const On=Ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function kf(s,a){return function(){return s.apply(a,arguments)}}const{toString:wh}=Object.prototype,{getPrototypeOf:pa}=Object,{iterator:ma,toStringTag:Nf}=Symbol,ha=(s=>a=>{const i=wh.call(a);return s[i]||(s[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),It=s=>(s=s.toLowerCase(),a=>ha(a)===s),xa=s=>a=>typeof a===s,{isArray:Dr}=Array,Lr=xa("undefined");function Ls(s){return s!==null&&!Lr(s)&&s.constructor!==null&&!Lr(s.constructor)&&vt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Sf=It("ArrayBuffer");function jh(s){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(s):a=s&&s.buffer&&Sf(s.buffer),a}const kh=xa("string"),vt=xa("function"),bf=xa("number"),Os=s=>s!==null&&typeof s=="object",Nh=s=>s===!0||s===!1,ta=s=>{if(ha(s)!=="object")return!1;const a=pa(s);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Nf in s)&&!(ma in s)},Sh=s=>{if(!Os(s)||Ls(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},bh=It("Date"),_h=It("File"),Ch=s=>!!(s&&typeof s.uri<"u"),Eh=s=>s&&typeof s.getParts<"u",Ph=It("Blob"),Rh=It("FileList"),Th=s=>Os(s)&&vt(s.pipe);function Lh(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ud=Lh(),Md=typeof Ud.FormData<"u"?Ud.FormData:void 0,Oh=s=>{if(!s)return!1;if(Md&&s instanceof Md)return!0;const a=pa(s);if(!a||a===Object.prototype||!vt(s.append))return!1;const i=ha(s);return i==="formdata"||i==="object"&&vt(s.toString)&&s.toString()==="[object FormData]"},zh=It("URLSearchParams"),[Ah,Dh,Fh,Uh]=["ReadableStream","Request","Response","Headers"].map(It),Mh=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zs(s,a,{allOwnKeys:i=!1}={}){if(s===null||typeof s>"u")return;let u,d;if(typeof s!="object"&&(s=[s]),Dr(s))for(u=0,d=s.length;u<d;u++)a.call(null,s[u],u,s);else{if(Ls(s))return;const f=i?Object.getOwnPropertyNames(s):Object.keys(s),m=f.length;let h;for(u=0;u<m;u++)h=f[u],a.call(null,s[h],h,s)}}function _f(s,a){if(Ls(s))return null;a=a.toLowerCase();const i=Object.keys(s);let u=i.length,d;for(;u-- >0;)if(d=i[u],a===d.toLowerCase())return d;return null}const Xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cf=s=>!Lr(s)&&s!==Xn;function bo(...s){const{caseless:a,skipUndefined:i}=Cf(this)&&this||{},u={},d=(f,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")return;const h=a&&_f(u,m)||m,x=_o(u,h)?u[h]:void 0;ta(x)&&ta(f)?u[h]=bo(x,f):ta(f)?u[h]=bo({},f):Dr(f)?u[h]=f.slice():(!i||!Lr(f))&&(u[h]=f)};for(let f=0,m=s.length;f<m;f++)s[f]&&zs(s[f],d);return u}const Ih=(s,a,i,{allOwnKeys:u}={})=>(zs(a,(d,f)=>{i&&vt(d)?Object.defineProperty(s,f,{__proto__:null,value:kf(d,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(s,f,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:u}),s),$h=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Bh=(s,a,i,u)=>{s.prototype=Object.create(a.prototype,u),Object.defineProperty(s.prototype,"constructor",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(s,"super",{__proto__:null,value:a.prototype}),i&&Object.assign(s.prototype,i)},Vh=(s,a,i,u)=>{let d,f,m;const h={};if(a=a||{},s==null)return a;do{for(d=Object.getOwnPropertyNames(s),f=d.length;f-- >0;)m=d[f],(!u||u(m,s,a))&&!h[m]&&(a[m]=s[m],h[m]=!0);s=i!==!1&&pa(s)}while(s&&(!i||i(s,a))&&s!==Object.prototype);return a},Hh=(s,a,i)=>{s=String(s),(i===void 0||i>s.length)&&(i=s.length),i-=a.length;const u=s.indexOf(a,i);return u!==-1&&u===i},Wh=s=>{if(!s)return null;if(Dr(s))return s;let a=s.length;if(!bf(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=s[a];return i},qh=(s=>a=>s&&a instanceof s)(typeof Uint8Array<"u"&&pa(Uint8Array)),Kh=(s,a)=>{const u=(s&&s[ma]).call(s);let d;for(;(d=u.next())&&!d.done;){const f=d.value;a.call(s,f[0],f[1])}},Qh=(s,a)=>{let i;const u=[];for(;(i=s.exec(a))!==null;)u.push(i);return u},Jh=It("HTMLFormElement"),Gh=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,u,d){return u.toUpperCase()+d}),_o=(({hasOwnProperty:s})=>(a,i)=>s.call(a,i))(Object.prototype),Yh=It("RegExp"),Ef=(s,a)=>{const i=Object.getOwnPropertyDescriptors(s),u={};zs(i,(d,f)=>{let m;(m=a(d,f,s))!==!1&&(u[f]=m||d)}),Object.defineProperties(s,u)},Xh=s=>{Ef(s,(a,i)=>{if(vt(s)&&["arguments","caller","callee"].includes(i))return!1;const u=s[i];if(vt(u)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Zh=(s,a)=>{const i={},u=d=>{d.forEach(f=>{i[f]=!0})};return Dr(s)?u(s):u(String(s).split(a)),i},ex=()=>{},tx=(s,a)=>s!=null&&Number.isFinite(s=+s)?s:a;function nx(s){return!!(s&&vt(s.append)&&s[Nf]==="FormData"&&s[ma])}const rx=s=>{const a=new WeakSet,i=u=>{if(Os(u)){if(a.has(u))return;if(Ls(u))return u;if(!("toJSON"in u)){a.add(u);const d=Dr(u)?[]:{};return zs(u,(f,m)=>{const h=i(f);!Lr(h)&&(d[m]=h)}),a.delete(u),d}}return u};return i(s)},sx=It("AsyncFunction"),lx=s=>s&&(Os(s)||vt(s))&&vt(s.then)&&vt(s.catch),Pf=((s,a)=>s?setImmediate:a?((i,u)=>(Xn.addEventListener("message",({source:d,data:f})=>{d===Xn&&f===i&&u.length&&u.shift()()},!1),d=>{u.push(d),Xn.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",vt(Xn.postMessage)),ax=typeof queueMicrotask<"u"?queueMicrotask.bind(Xn):typeof process<"u"&&process.nextTick||Pf,ix=s=>s!=null&&vt(s[ma]),_={isArray:Dr,isArrayBuffer:Sf,isBuffer:Ls,isFormData:Oh,isArrayBufferView:jh,isString:kh,isNumber:bf,isBoolean:Nh,isObject:Os,isPlainObject:ta,isEmptyObject:Sh,isReadableStream:Ah,isRequest:Dh,isResponse:Fh,isHeaders:Uh,isUndefined:Lr,isDate:bh,isFile:_h,isReactNativeBlob:Ch,isReactNative:Eh,isBlob:Ph,isRegExp:Yh,isFunction:vt,isStream:Th,isURLSearchParams:zh,isTypedArray:qh,isFileList:Rh,forEach:zs,merge:bo,extend:Ih,trim:Mh,stripBOM:$h,inherits:Bh,toFlatObject:Vh,kindOf:ha,kindOfTest:It,endsWith:Hh,toArray:Wh,forEachEntry:Kh,matchAll:Qh,isHTMLForm:Jh,hasOwnProperty:_o,hasOwnProp:_o,reduceDescriptors:Ef,freezeMethods:Xh,toObjectSet:Zh,toCamelCase:Gh,noop:ex,toFiniteNumber:tx,findKey:_f,global:Xn,isContextDefined:Cf,isSpecCompliantForm:nx,toJSONObject:rx,isAsyncFn:sx,isThenable:lx,setImmediate:Pf,asap:ax,isIterable:ix},ox=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ux=s=>{const a={};let i,u,d;return s&&s.split(`
|
||
`).forEach(function(m){d=m.indexOf(":"),i=m.substring(0,d).trim().toLowerCase(),u=m.substring(d+1).trim(),!(!i||a[i]&&ox[i])&&(i==="set-cookie"?a[i]?a[i].push(u):a[i]=[u]:a[i]=a[i]?a[i]+", "+u:u)}),a};function cx(s){let a=0,i=s.length;for(;a<i;){const u=s.charCodeAt(a);if(u!==9&&u!==32)break;a+=1}for(;i>a;){const u=s.charCodeAt(i-1);if(u!==9&&u!==32)break;i-=1}return a===0&&i===s.length?s:s.slice(a,i)}const dx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fx=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Do(s,a){return _.isArray(s)?s.map(i=>Do(i,a)):cx(String(s).replace(a,""))}const px=s=>Do(s,dx),mx=s=>Do(s,fx);function Rf(s){const a=Object.create(null);return _.forEach(s.toJSON(),(i,u)=>{a[u]=mx(i)}),a}const Id=Symbol("internals");function Ps(s){return s&&String(s).trim().toLowerCase()}function na(s){return s===!1||s==null?s:_.isArray(s)?s.map(na):px(String(s))}function hx(s){const a=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let u;for(;u=i.exec(s);)a[u[1]]=u[2];return a}const xx=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function uo(s,a,i,u,d){if(_.isFunction(u))return u.call(this,a,i);if(d&&(a=i),!!_.isString(a)){if(_.isString(u))return a.indexOf(u)!==-1;if(_.isRegExp(u))return u.test(a)}}function gx(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,i,u)=>i.toUpperCase()+u)}function yx(s,a){const i=_.toCamelCase(" "+a);["get","set","has"].forEach(u=>{Object.defineProperty(s,u+i,{__proto__:null,value:function(d,f,m){return this[u].call(this,a,d,f,m)},configurable:!0})})}let dt=class{constructor(a){a&&this.set(a)}set(a,i,u){const d=this;function f(h,x,y){const k=Ps(x);if(!k)throw new Error("header name must be a non-empty string");const C=_.findKey(d,k);(!C||d[C]===void 0||y===!0||y===void 0&&d[C]!==!1)&&(d[C||x]=na(h))}const m=(h,x)=>_.forEach(h,(y,k)=>f(y,k,x));if(_.isPlainObject(a)||a instanceof this.constructor)m(a,i);else if(_.isString(a)&&(a=a.trim())&&!xx(a))m(ux(a),i);else if(_.isObject(a)&&_.isIterable(a)){let h={},x,y;for(const k of a){if(!_.isArray(k))throw TypeError("Object iterator must return a key-value pair");h[y=k[0]]=(x=h[y])?_.isArray(x)?[...x,k[1]]:[x,k[1]]:k[1]}m(h,i)}else a!=null&&f(i,a,u);return this}get(a,i){if(a=Ps(a),a){const u=_.findKey(this,a);if(u){const d=this[u];if(!i)return d;if(i===!0)return hx(d);if(_.isFunction(i))return i.call(this,d,u);if(_.isRegExp(i))return i.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,i){if(a=Ps(a),a){const u=_.findKey(this,a);return!!(u&&this[u]!==void 0&&(!i||uo(this,this[u],u,i)))}return!1}delete(a,i){const u=this;let d=!1;function f(m){if(m=Ps(m),m){const h=_.findKey(u,m);h&&(!i||uo(u,u[h],h,i))&&(delete u[h],d=!0)}}return _.isArray(a)?a.forEach(f):f(a),d}clear(a){const i=Object.keys(this);let u=i.length,d=!1;for(;u--;){const f=i[u];(!a||uo(this,this[f],f,a,!0))&&(delete this[f],d=!0)}return d}normalize(a){const i=this,u={};return _.forEach(this,(d,f)=>{const m=_.findKey(u,f);if(m){i[m]=na(d),delete i[f];return}const h=a?gx(f):String(f).trim();h!==f&&delete i[f],i[h]=na(d),u[h]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const i=Object.create(null);return _.forEach(this,(u,d)=>{u!=null&&u!==!1&&(i[d]=a&&_.isArray(u)?u.join(", "):u)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,i])=>a+": "+i).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...i){const u=new this(a);return i.forEach(d=>u.set(d)),u}static accessor(a){const u=(this[Id]=this[Id]={accessors:{}}).accessors,d=this.prototype;function f(m){const h=Ps(m);u[h]||(yx(d,m),u[h]=!0)}return _.isArray(a)?a.forEach(f):f(a),this}};dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(dt.prototype,({value:s},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>s,set(u){this[i]=u}}});_.freezeMethods(dt);const vx="[REDACTED ****]";function wx(s){if(_.hasOwnProp(s,"toJSON"))return!0;let a=Object.getPrototypeOf(s);for(;a&&a!==Object.prototype;){if(_.hasOwnProp(a,"toJSON"))return!0;a=Object.getPrototypeOf(a)}return!1}function jx(s,a){const i=new Set(a.map(f=>String(f).toLowerCase())),u=[],d=f=>{if(f===null||typeof f!="object"||_.isBuffer(f))return f;if(u.indexOf(f)!==-1)return;f instanceof dt&&(f=f.toJSON()),u.push(f);let m;if(_.isArray(f))m=[],f.forEach((h,x)=>{const y=d(h);_.isUndefined(y)||(m[x]=y)});else{if(!_.isPlainObject(f)&&wx(f))return u.pop(),f;m=Object.create(null);for(const[h,x]of Object.entries(f)){const y=i.has(h.toLowerCase())?vx:d(x);_.isUndefined(y)||(m[h]=y)}}return u.pop(),m};return d(s)}let le=class Tf extends Error{static from(a,i,u,d,f,m){const h=new Tf(a.message,i||a.code,u,d,f);return h.cause=a,h.name=a.name,a.status!=null&&h.status==null&&(h.status=a.status),m&&Object.assign(h,m),h}constructor(a,i,u,d,f){super(a),Object.defineProperty(this,"message",{__proto__:null,value:a,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),u&&(this.config=u),d&&(this.request=d),f&&(this.response=f,this.status=f.status)}toJSON(){const a=this.config,i=a&&_.hasOwnProp(a,"redact")?a.redact:void 0,u=_.isArray(i)&&i.length>0?jx(a,i):_.toJSONObject(a);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u,code:this.code,status:this.status}}};le.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";le.ERR_BAD_OPTION="ERR_BAD_OPTION";le.ECONNABORTED="ECONNABORTED";le.ETIMEDOUT="ETIMEDOUT";le.ECONNREFUSED="ECONNREFUSED";le.ERR_NETWORK="ERR_NETWORK";le.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";le.ERR_DEPRECATED="ERR_DEPRECATED";le.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";le.ERR_BAD_REQUEST="ERR_BAD_REQUEST";le.ERR_CANCELED="ERR_CANCELED";le.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";le.ERR_INVALID_URL="ERR_INVALID_URL";le.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const kx=null;function Co(s){return _.isPlainObject(s)||_.isArray(s)}function Lf(s){return _.endsWith(s,"[]")?s.slice(0,-2):s}function co(s,a,i){return s?s.concat(a).map(function(d,f){return d=Lf(d),!i&&f?"["+d+"]":d}).join(i?".":""):a}function Nx(s){return _.isArray(s)&&!s.some(Co)}const Sx=_.toFlatObject(_,{},null,function(a){return/^is[A-Z]/.test(a)});function ga(s,a,i){if(!_.isObject(s))throw new TypeError("target must be an object");a=a||new FormData,i=_.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,A){return!_.isUndefined(A[N])});const u=i.metaTokens,d=i.visitor||C,f=i.dots,m=i.indexes,h=i.Blob||typeof Blob<"u"&&Blob,x=i.maxDepth===void 0?100:i.maxDepth,y=h&&_.isSpecCompliantForm(a);if(!_.isFunction(d))throw new TypeError("visitor must be a function");function k(P){if(P===null)return"";if(_.isDate(P))return P.toISOString();if(_.isBoolean(P))return P.toString();if(!y&&_.isBlob(P))throw new le("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(P)||_.isTypedArray(P)?y&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function C(P,N,A){let M=P;if(_.isReactNative(a)&&_.isReactNativeBlob(P))return a.append(co(A,N,f),k(P)),!1;if(P&&!A&&typeof P=="object"){if(_.endsWith(N,"{}"))N=u?N:N.slice(0,-2),P=JSON.stringify(P);else if(_.isArray(P)&&Nx(P)||(_.isFileList(P)||_.endsWith(N,"[]"))&&(M=_.toArray(P)))return N=Lf(N),M.forEach(function(Q,me){!(_.isUndefined(Q)||Q===null)&&a.append(m===!0?co([N],me,f):m===null?N:N+"[]",k(Q))}),!1}return Co(P)?!0:(a.append(co(A,N,f),k(P)),!1)}const z=[],B=Object.assign(Sx,{defaultVisitor:C,convertValue:k,isVisitable:Co});function L(P,N,A=0){if(!_.isUndefined(P)){if(A>x)throw new le("Object is too deeply nested ("+A+" levels). Max depth: "+x,le.ERR_FORM_DATA_DEPTH_EXCEEDED);if(z.indexOf(P)!==-1)throw Error("Circular reference detected in "+N.join("."));z.push(P),_.forEach(P,function(K,Q){(!(_.isUndefined(K)||K===null)&&d.call(a,K,_.isString(Q)?Q.trim():Q,N,B))===!0&&L(K,N?N.concat(Q):[Q],A+1)}),z.pop()}}if(!_.isObject(s))throw new TypeError("data must be an object");return L(s),a}function $d(s){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(s).replace(/[!'()~]|%20/g,function(u){return a[u]})}function Fo(s,a){this._pairs=[],s&&ga(s,this,a)}const Of=Fo.prototype;Of.append=function(a,i){this._pairs.push([a,i])};Of.toString=function(a){const i=a?function(u){return a.call(this,u,$d)}:$d;return this._pairs.map(function(d){return i(d[0])+"="+i(d[1])},"").join("&")};function bx(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zf(s,a,i){if(!a)return s;const u=i&&i.encode||bx,d=_.isFunction(i)?{serialize:i}:i,f=d&&d.serialize;let m;if(f?m=f(a,d):m=_.isURLSearchParams(a)?a.toString():new Fo(a,d).toString(u),m){const h=s.indexOf("#");h!==-1&&(s=s.slice(0,h)),s+=(s.indexOf("?")===-1?"?":"&")+m}return s}class Bd{constructor(){this.handlers=[]}use(a,i,u){return this.handlers.push({fulfilled:a,rejected:i,synchronous:u?u.synchronous:!1,runWhen:u?u.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){_.forEach(this.handlers,function(u){u!==null&&a(u)})}}const Uo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},_x=typeof URLSearchParams<"u"?URLSearchParams:Fo,Cx=typeof FormData<"u"?FormData:null,Ex=typeof Blob<"u"?Blob:null,Px={isBrowser:!0,classes:{URLSearchParams:_x,FormData:Cx,Blob:Ex},protocols:["http","https","file","blob","url","data"]},Mo=typeof window<"u"&&typeof document<"u",Eo=typeof navigator=="object"&&navigator||void 0,Rx=Mo&&(!Eo||["ReactNative","NativeScript","NS"].indexOf(Eo.product)<0),Tx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lx=Mo&&window.location.href||"http://localhost",Ox=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mo,hasStandardBrowserEnv:Rx,hasStandardBrowserWebWorkerEnv:Tx,navigator:Eo,origin:Lx},Symbol.toStringTag,{value:"Module"})),ot={...Ox,...Px};function zx(s,a){return ga(s,new ot.classes.URLSearchParams,{visitor:function(i,u,d,f){return ot.isNode&&_.isBuffer(i)?(this.append(u,i.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...a})}function Ax(s){return _.matchAll(/\w+|\[(\w*)]/g,s).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Dx(s){const a={},i=Object.keys(s);let u;const d=i.length;let f;for(u=0;u<d;u++)f=i[u],a[f]=s[f];return a}function Af(s){function a(i,u,d,f){let m=i[f++];if(m==="__proto__")return!0;const h=Number.isFinite(+m),x=f>=i.length;return m=!m&&_.isArray(d)?d.length:m,x?(_.hasOwnProp(d,m)?d[m]=_.isArray(d[m])?d[m].concat(u):[d[m],u]:d[m]=u,!h):((!_.hasOwnProp(d,m)||!_.isObject(d[m]))&&(d[m]=[]),a(i,u,d[m],f)&&_.isArray(d[m])&&(d[m]=Dx(d[m])),!h)}if(_.isFormData(s)&&_.isFunction(s.entries)){const i={};return _.forEachEntry(s,(u,d)=>{a(Ax(u),d,i,0)}),i}return null}const Er=(s,a)=>s!=null&&_.hasOwnProp(s,a)?s[a]:void 0;function Fx(s,a,i){if(_.isString(s))try{return(a||JSON.parse)(s),_.trim(s)}catch(u){if(u.name!=="SyntaxError")throw u}return(i||JSON.stringify)(s)}const As={transitional:Uo,adapter:["xhr","http","fetch"],transformRequest:[function(a,i){const u=i.getContentType()||"",d=u.indexOf("application/json")>-1,f=_.isObject(a);if(f&&_.isHTMLForm(a)&&(a=new FormData(a)),_.isFormData(a))return d?JSON.stringify(Af(a)):a;if(_.isArrayBuffer(a)||_.isBuffer(a)||_.isStream(a)||_.isFile(a)||_.isBlob(a)||_.isReadableStream(a))return a;if(_.isArrayBufferView(a))return a.buffer;if(_.isURLSearchParams(a))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let h;if(f){const x=Er(this,"formSerializer");if(u.indexOf("application/x-www-form-urlencoded")>-1)return zx(a,x).toString();if((h=_.isFileList(a))||u.indexOf("multipart/form-data")>-1){const y=Er(this,"env"),k=y&&y.FormData;return ga(h?{"files[]":a}:a,k&&new k,x)}}return f||d?(i.setContentType("application/json",!1),Fx(a)):a}],transformResponse:[function(a){const i=Er(this,"transitional")||As.transitional,u=i&&i.forcedJSONParsing,d=Er(this,"responseType"),f=d==="json";if(_.isResponse(a)||_.isReadableStream(a))return a;if(a&&_.isString(a)&&(u&&!d||f)){const h=!(i&&i.silentJSONParsing)&&f;try{return JSON.parse(a,Er(this,"parseReviver"))}catch(x){if(h)throw x.name==="SyntaxError"?le.from(x,le.ERR_BAD_RESPONSE,this,null,Er(this,"response")):x}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch","query"],s=>{As.headers[s]={}});function fo(s,a){const i=this||As,u=a||i,d=dt.from(u.headers);let f=u.data;return _.forEach(s,function(h){f=h.call(i,f,d.normalize(),a?a.status:void 0)}),d.normalize(),f}function Df(s){return!!(s&&s.__CANCEL__)}let Ds=class extends le{constructor(a,i,u){super(a??"canceled",le.ERR_CANCELED,i,u),this.name="CanceledError",this.__CANCEL__=!0}};function Ff(s,a,i){const u=i.config.validateStatus;!i.status||!u||u(i.status)?s(i):a(new le("Request failed with status code "+i.status,i.status>=400&&i.status<500?le.ERR_BAD_REQUEST:le.ERR_BAD_RESPONSE,i.config,i.request,i))}function Ux(s){const a=/^([-+\w]{1,25}):(?:\/\/)?/.exec(s);return a&&a[1]||""}function Mx(s,a){s=s||10;const i=new Array(s),u=new Array(s);let d=0,f=0,m;return a=a!==void 0?a:1e3,function(x){const y=Date.now(),k=u[f];m||(m=y),i[d]=x,u[d]=y;let C=f,z=0;for(;C!==d;)z+=i[C++],C=C%s;if(d=(d+1)%s,d===f&&(f=(f+1)%s),y-m<a)return;const B=k&&y-k;return B?Math.round(z*1e3/B):void 0}}function Ix(s,a){let i=0,u=1e3/a,d,f;const m=(y,k=Date.now())=>{i=k,d=null,f&&(clearTimeout(f),f=null),s(...y)};return[(...y)=>{const k=Date.now(),C=k-i;C>=u?m(y,k):(d=y,f||(f=setTimeout(()=>{f=null,m(d)},u-C)))},()=>d&&m(d)]}const ia=(s,a,i=3)=>{let u=0;const d=Mx(50,250);return Ix(f=>{if(!f||typeof f.loaded!="number")return;const m=f.loaded,h=f.lengthComputable?f.total:void 0,x=h!=null?Math.min(m,h):m,y=Math.max(0,x-u),k=d(y);u=Math.max(u,x);const C={loaded:x,total:h,progress:h?x/h:void 0,bytes:y,rate:k||void 0,estimated:k&&h?(h-x)/k:void 0,event:f,lengthComputable:h!=null,[a?"download":"upload"]:!0};s(C)},i)},Vd=(s,a)=>{const i=s!=null;return[u=>a[0]({lengthComputable:i,total:s,loaded:u}),a[1]]},Hd=s=>(...a)=>_.asap(()=>s(...a)),$x=ot.hasStandardBrowserEnv?((s,a)=>i=>(i=new URL(i,ot.origin),s.protocol===i.protocol&&s.host===i.host&&(a||s.port===i.port)))(new URL(ot.origin),ot.navigator&&/(msie|trident)/i.test(ot.navigator.userAgent)):()=>!0,Bx=ot.hasStandardBrowserEnv?{write(s,a,i,u,d,f,m){if(typeof document>"u")return;const h=[`${s}=${encodeURIComponent(a)}`];_.isNumber(i)&&h.push(`expires=${new Date(i).toUTCString()}`),_.isString(u)&&h.push(`path=${u}`),_.isString(d)&&h.push(`domain=${d}`),f===!0&&h.push("secure"),_.isString(m)&&h.push(`SameSite=${m}`),document.cookie=h.join("; ")},read(s){if(typeof document>"u")return null;const a=document.cookie.split(";");for(let i=0;i<a.length;i++){const u=a[i].replace(/^\s+/,""),d=u.indexOf("=");if(d!==-1&&u.slice(0,d)===s)return decodeURIComponent(u.slice(d+1))}return null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vx(s){return typeof s!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Hx(s,a){return a?s.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):s}function Uf(s,a,i){let u=!Vx(a);return s&&(u||i===!1)?Hx(s,a):a}const Wd=s=>s instanceof dt?{...s}:s;function nr(s,a){a=a||{};const i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function u(y,k,C,z){return _.isPlainObject(y)&&_.isPlainObject(k)?_.merge.call({caseless:z},y,k):_.isPlainObject(k)?_.merge({},k):_.isArray(k)?k.slice():k}function d(y,k,C,z){if(_.isUndefined(k)){if(!_.isUndefined(y))return u(void 0,y,C,z)}else return u(y,k,C,z)}function f(y,k){if(!_.isUndefined(k))return u(void 0,k)}function m(y,k){if(_.isUndefined(k)){if(!_.isUndefined(y))return u(void 0,y)}else return u(void 0,k)}function h(y,k,C){if(_.hasOwnProp(a,C))return u(y,k);if(_.hasOwnProp(s,C))return u(void 0,y)}const x={url:f,method:f,data:f,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,allowedSocketPaths:m,responseEncoding:m,validateStatus:h,headers:(y,k,C)=>d(Wd(y),Wd(k),C,!0)};return _.forEach(Object.keys({...s,...a}),function(k){if(k==="__proto__"||k==="constructor"||k==="prototype")return;const C=_.hasOwnProp(x,k)?x[k]:d,z=_.hasOwnProp(s,k)?s[k]:void 0,B=_.hasOwnProp(a,k)?a[k]:void 0,L=C(z,B,k);_.isUndefined(L)&&C!==h||(i[k]=L)}),i}const Wx=["content-type","content-length"];function qx(s,a,i){if(i!=="content-only"){s.set(a);return}Object.entries(a).forEach(([u,d])=>{Wx.includes(u.toLowerCase())&&s.set(u,d)})}const Kx=s=>encodeURIComponent(s).replace(/%([0-9A-F]{2})/gi,(a,i)=>String.fromCharCode(parseInt(i,16))),Mf=s=>{const a=nr({},s),i=z=>_.hasOwnProp(a,z)?a[z]:void 0,u=i("data");let d=i("withXSRFToken");const f=i("xsrfHeaderName"),m=i("xsrfCookieName");let h=i("headers");const x=i("auth"),y=i("baseURL"),k=i("allowAbsoluteUrls"),C=i("url");if(a.headers=h=dt.from(h),a.url=zf(Uf(y,C,k),s.params,s.paramsSerializer),x&&h.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?Kx(x.password):""))),_.isFormData(u)&&(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv?h.setContentType(void 0):_.isFunction(u.getHeaders)&&qx(h,u.getHeaders(),i("formDataHeaderPolicy"))),ot.hasStandardBrowserEnv&&(_.isFunction(d)&&(d=d(a)),d===!0||d==null&&$x(a.url))){const B=f&&m&&Bx.read(m);B&&h.set(f,B)}return a},Qx=typeof XMLHttpRequest<"u",Jx=Qx&&function(s){return new Promise(function(i,u){const d=Mf(s);let f=d.data;const m=dt.from(d.headers).normalize();let{responseType:h,onUploadProgress:x,onDownloadProgress:y}=d,k,C,z,B,L;function P(){B&&B(),L&&L(),d.cancelToken&&d.cancelToken.unsubscribe(k),d.signal&&d.signal.removeEventListener("abort",k)}let N=new XMLHttpRequest;N.open(d.method.toUpperCase(),d.url,!0),N.timeout=d.timeout;function A(){if(!N)return;const K=dt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),me={data:!h||h==="text"||h==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:K,config:s,request:N};Ff(function(O){i(O),P()},function(O){u(O),P()},me),N=null}"onloadend"in N?N.onloadend=A:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.startsWith("file:"))||setTimeout(A)},N.onabort=function(){N&&(u(new le("Request aborted",le.ECONNABORTED,s,N)),P(),N=null)},N.onerror=function(Q){const me=Q&&Q.message?Q.message:"Network Error",fe=new le(me,le.ERR_NETWORK,s,N);fe.event=Q||null,u(fe),P(),N=null},N.ontimeout=function(){let Q=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const me=d.transitional||Uo;d.timeoutErrorMessage&&(Q=d.timeoutErrorMessage),u(new le(Q,me.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,s,N)),P(),N=null},f===void 0&&m.setContentType(null),"setRequestHeader"in N&&_.forEach(Rf(m),function(Q,me){N.setRequestHeader(me,Q)}),_.isUndefined(d.withCredentials)||(N.withCredentials=!!d.withCredentials),h&&h!=="json"&&(N.responseType=d.responseType),y&&([z,L]=ia(y,!0),N.addEventListener("progress",z)),x&&N.upload&&([C,B]=ia(x),N.upload.addEventListener("progress",C),N.upload.addEventListener("loadend",B)),(d.cancelToken||d.signal)&&(k=K=>{N&&(u(!K||K.type?new Ds(null,s,N):K),N.abort(),P(),N=null)},d.cancelToken&&d.cancelToken.subscribe(k),d.signal&&(d.signal.aborted?k():d.signal.addEventListener("abort",k)));const M=Ux(d.url);if(M&&!ot.protocols.includes(M)){u(new le("Unsupported protocol "+M+":",le.ERR_BAD_REQUEST,s));return}N.send(f||null)})},Gx=(s,a)=>{if(s=s?s.filter(Boolean):[],!a&&!s.length)return;const i=new AbortController;let u=!1;const d=function(x){if(!u){u=!0,m();const y=x instanceof Error?x:this.reason;i.abort(y instanceof le?y:new Ds(y instanceof Error?y.message:y))}};let f=a&&setTimeout(()=>{f=null,d(new le(`timeout of ${a}ms exceeded`,le.ETIMEDOUT))},a);const m=()=>{s&&(f&&clearTimeout(f),f=null,s.forEach(x=>{x.unsubscribe?x.unsubscribe(d):x.removeEventListener("abort",d)}),s=null)};s.forEach(x=>x.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>_.asap(m),h},Yx=function*(s,a){let i=s.byteLength;if(i<a){yield s;return}let u=0,d;for(;u<i;)d=u+a,yield s.slice(u,d),u=d},Xx=async function*(s,a){for await(const i of Zx(s))yield*Yx(i,a)},Zx=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const a=s.getReader();try{for(;;){const{done:i,value:u}=await a.read();if(i)break;yield u}}finally{await a.cancel()}},qd=(s,a,i,u)=>{const d=Xx(s,a);let f=0,m,h=x=>{m||(m=!0,u&&u(x))};return new ReadableStream({async pull(x){try{const{done:y,value:k}=await d.next();if(y){h(),x.close();return}let C=k.byteLength;if(i){let z=f+=C;i(z)}x.enqueue(new Uint8Array(k))}catch(y){throw h(y),y}},cancel(x){return h(x),d.return()}},{highWaterMark:2})};function eg(s){if(!s||typeof s!="string"||!s.startsWith("data:"))return 0;const a=s.indexOf(",");if(a<0)return 0;const i=s.slice(5,a),u=s.slice(a+1);if(/;base64/i.test(i)){let m=u.length;const h=u.length;for(let B=0;B<h;B++)if(u.charCodeAt(B)===37&&B+2<h){const L=u.charCodeAt(B+1),P=u.charCodeAt(B+2);(L>=48&&L<=57||L>=65&&L<=70||L>=97&&L<=102)&&(P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102)&&(m-=2,B+=2)}let x=0,y=h-1;const k=B=>B>=2&&u.charCodeAt(B-2)===37&&u.charCodeAt(B-1)===51&&(u.charCodeAt(B)===68||u.charCodeAt(B)===100);y>=0&&(u.charCodeAt(y)===61?(x++,y--):k(y)&&(x++,y-=3)),x===1&&y>=0&&(u.charCodeAt(y)===61||k(y))&&x++;const z=Math.floor(m/4)*3-(x||0);return z>0?z:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(u,"utf8");let f=0;for(let m=0,h=u.length;m<h;m++){const x=u.charCodeAt(m);if(x<128)f+=1;else if(x<2048)f+=2;else if(x>=55296&&x<=56319&&m+1<h){const y=u.charCodeAt(m+1);y>=56320&&y<=57343?(f+=4,m++):f+=3}else f+=3}return f}const Io="1.16.1",Kd=64*1024,{isFunction:Zl}=_,Qd=(s,...a)=>{try{return!!s(...a)}catch{return!1}},tg=s=>{const a=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:i,TextEncoder:u}=a;s=_.merge.call({skipUndefined:!0},{Request:a.Request,Response:a.Response},s);const{fetch:d,Request:f,Response:m}=s,h=d?Zl(d):typeof fetch=="function",x=Zl(f),y=Zl(m);if(!h)return!1;const k=h&&Zl(i),C=h&&(typeof u=="function"?(A=>M=>A.encode(M))(new u):async A=>new Uint8Array(await new f(A).arrayBuffer())),z=x&&k&&Qd(()=>{let A=!1;const M=new f(ot.origin,{body:new i,method:"POST",get duplex(){return A=!0,"half"}}),K=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),A&&!K}),B=y&&k&&Qd(()=>_.isReadableStream(new m("").body)),L={stream:B&&(A=>A.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!L[A]&&(L[A]=(M,K)=>{let Q=M&&M[A];if(Q)return Q.call(M);throw new le(`Response type '${A}' is not supported`,le.ERR_NOT_SUPPORT,K)})});const P=async A=>{if(A==null)return 0;if(_.isBlob(A))return A.size;if(_.isSpecCompliantForm(A))return(await new f(ot.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(_.isArrayBufferView(A)||_.isArrayBuffer(A))return A.byteLength;if(_.isURLSearchParams(A)&&(A=A+""),_.isString(A))return(await C(A)).byteLength},N=async(A,M)=>{const K=_.toFiniteNumber(A.getContentLength());return K??P(M)};return async A=>{let{url:M,method:K,data:Q,signal:me,cancelToken:fe,timeout:O,onDownloadProgress:ae,onUploadProgress:de,responseType:Y,headers:ke,withCredentials:Te="same-origin",fetchOptions:ze,maxContentLength:Ee,maxBodyLength:q}=Mf(A);const ge=_.isNumber(Ee)&&Ee>-1,D=_.isNumber(q)&&q>-1;let U=d||fetch;Y=Y?(Y+"").toLowerCase():"text";let ee=Gx([me,fe&&fe.toAbortSignal()],O),G=null;const b=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let I;try{if(ge&&typeof M=="string"&&M.startsWith("data:")&&eg(M)>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G);if(D&&K!=="get"&&K!=="head"){const oe=await N(ke,Q);if(typeof oe=="number"&&isFinite(oe)&&oe>q)throw new le("Request body larger than maxBodyLength limit",le.ERR_BAD_REQUEST,A,G)}if(de&&z&&K!=="get"&&K!=="head"&&(I=await N(ke,Q))!==0){let oe=new f(M,{method:"POST",body:Q,duplex:"half"}),F;if(_.isFormData(Q)&&(F=oe.headers.get("content-type"))&&ke.setContentType(F),oe.body){const[ne,je]=Vd(I,ia(Hd(de)));Q=qd(oe.body,Kd,ne,je)}}_.isString(Te)||(Te=Te?"include":"omit");const te=x&&"credentials"in f.prototype;if(_.isFormData(Q)){const oe=ke.getContentType();oe&&/^multipart\/form-data/i.test(oe)&&!/boundary=/i.test(oe)&&ke.delete("content-type")}ke.set("User-Agent","axios/"+Io,!1);const pe={...ze,signal:ee,method:K.toUpperCase(),headers:Rf(ke.normalize()),body:Q,duplex:"half",credentials:te?Te:void 0};G=x&&new f(M,pe);let ye=await(x?U(G,ze):U(M,pe));if(ge){const oe=_.toFiniteNumber(ye.headers.get("content-length"));if(oe!=null&&oe>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G)}const Ne=B&&(Y==="stream"||Y==="response");if(B&&ye.body&&(ae||ge||Ne&&b)){const oe={};["status","statusText","headers"].forEach(Le=>{oe[Le]=ye[Le]});const F=_.toFiniteNumber(ye.headers.get("content-length")),[ne,je]=ae&&Vd(F,ia(Hd(ae),!0))||[];let _e=0;const De=Le=>{if(ge&&(_e=Le,_e>Ee))throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G);ne&&ne(Le)};ye=new m(qd(ye.body,Kd,De,()=>{je&&je(),b&&b()}),oe)}Y=Y||"text";let we=await L[_.findKey(L,Y)||"text"](ye,A);if(ge&&!B&&!Ne){let oe;if(we!=null&&(typeof we.byteLength=="number"?oe=we.byteLength:typeof we.size=="number"?oe=we.size:typeof we=="string"&&(oe=typeof u=="function"?new u().encode(we).byteLength:we.length)),typeof oe=="number"&&oe>Ee)throw new le("maxContentLength size of "+Ee+" exceeded",le.ERR_BAD_RESPONSE,A,G)}return!Ne&&b&&b(),await new Promise((oe,F)=>{Ff(oe,F,{data:we,headers:dt.from(ye.headers),status:ye.status,statusText:ye.statusText,config:A,request:G})})}catch(te){if(b&&b(),ee&&ee.aborted&&ee.reason instanceof le){const pe=ee.reason;throw pe.config=A,G&&(pe.request=G),te!==pe&&(pe.cause=te),pe}throw te&&te.name==="TypeError"&&/Load failed|fetch/i.test(te.message)?Object.assign(new le("Network Error",le.ERR_NETWORK,A,G,te&&te.response),{cause:te.cause||te}):le.from(te,te&&te.code,A,G,te&&te.response)}}},ng=new Map,If=s=>{let a=s&&s.env||{};const{fetch:i,Request:u,Response:d}=a,f=[u,d,i];let m=f.length,h=m,x,y,k=ng;for(;h--;)x=f[h],y=k.get(x),y===void 0&&k.set(x,y=h?new Map:tg(a)),k=y;return y};If();const $o={http:kx,xhr:Jx,fetch:{get:If}};_.forEach($o,(s,a)=>{if(s){try{Object.defineProperty(s,"name",{__proto__:null,value:a})}catch{}Object.defineProperty(s,"adapterName",{__proto__:null,value:a})}});const Jd=s=>`- ${s}`,rg=s=>_.isFunction(s)||s===null||s===!1;function sg(s,a){s=_.isArray(s)?s:[s];const{length:i}=s;let u,d;const f={};for(let m=0;m<i;m++){u=s[m];let h;if(d=u,!rg(u)&&(d=$o[(h=String(u)).toLowerCase()],d===void 0))throw new le(`Unknown adapter '${h}'`);if(d&&(_.isFunction(d)||(d=d.get(a))))break;f[h||"#"+m]=d}if(!d){const m=Object.entries(f).map(([x,y])=>`adapter ${x} `+(y===!1?"is not supported by the environment":"is not available in the build"));let h=i?m.length>1?`since :
|
||
`+m.map(Jd).join(`
|
||
`):" "+Jd(m[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return d}const $f={getAdapter:sg,adapters:$o};function po(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Ds(null,s)}function Gd(s){return po(s),s.headers=dt.from(s.headers),s.data=fo.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),$f.getAdapter(s.adapter||As.adapter,s)(s).then(function(u){po(s),s.response=u;try{u.data=fo.call(s,s.transformResponse,u)}finally{delete s.response}return u.headers=dt.from(u.headers),u},function(u){if(!Df(u)&&(po(s),u&&u.response)){s.response=u.response;try{u.response.data=fo.call(s,s.transformResponse,u.response)}finally{delete s.response}u.response.headers=dt.from(u.response.headers)}return Promise.reject(u)})}const ya={};["object","boolean","number","function","string","symbol"].forEach((s,a)=>{ya[s]=function(u){return typeof u===s||"a"+(a<1?"n ":" ")+s}});const Yd={};ya.transitional=function(a,i,u){function d(f,m){return"[Axios v"+Io+"] Transitional option '"+f+"'"+m+(u?". "+u:"")}return(f,m,h)=>{if(a===!1)throw new le(d(m," has been removed"+(i?" in "+i:"")),le.ERR_DEPRECATED);return i&&!Yd[m]&&(Yd[m]=!0,console.warn(d(m," has been deprecated since v"+i+" and will be removed in the near future"))),a?a(f,m,h):!0}};ya.spelling=function(a){return(i,u)=>(console.warn(`${u} is likely a misspelling of ${a}`),!0)};function lg(s,a,i){if(typeof s!="object")throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const u=Object.keys(s);let d=u.length;for(;d-- >0;){const f=u[d],m=Object.prototype.hasOwnProperty.call(a,f)?a[f]:void 0;if(m){const h=s[f],x=h===void 0||m(h,f,s);if(x!==!0)throw new le("option "+f+" must be "+x,le.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new le("Unknown option "+f,le.ERR_BAD_OPTION)}}const ra={assertOptions:lg,validators:ya},Tt=ra.validators;let er=class{constructor(a){this.defaults=a||{},this.interceptors={request:new Bd,response:new Bd}}async request(a,i){try{return await this._request(a,i)}catch(u){if(u instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const f=(()=>{if(!d.stack)return"";const m=d.stack.indexOf(`
|
||
`);return m===-1?"":d.stack.slice(m+1)})();try{if(!u.stack)u.stack=f;else if(f){const m=f.indexOf(`
|
||
`),h=m===-1?-1:f.indexOf(`
|
||
`,m+1),x=h===-1?"":f.slice(h+1);String(u.stack).endsWith(x)||(u.stack+=`
|
||
`+f)}}catch{}}throw u}}_request(a,i){typeof a=="string"?(i=i||{},i.url=a):i=a||{},i=nr(this.defaults,i);const{transitional:u,paramsSerializer:d,headers:f}=i;u!==void 0&&ra.assertOptions(u,{silentJSONParsing:Tt.transitional(Tt.boolean),forcedJSONParsing:Tt.transitional(Tt.boolean),clarifyTimeoutError:Tt.transitional(Tt.boolean),legacyInterceptorReqResOrdering:Tt.transitional(Tt.boolean)},!1),d!=null&&(_.isFunction(d)?i.paramsSerializer={serialize:d}:ra.assertOptions(d,{encode:Tt.function,serialize:Tt.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ra.assertOptions(i,{baseUrl:Tt.spelling("baseURL"),withXsrfToken:Tt.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let m=f&&_.merge(f.common,f[i.method]);f&&_.forEach(["delete","get","head","post","put","patch","query","common"],L=>{delete f[L]}),i.headers=dt.concat(m,f);const h=[];let x=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(i)===!1)return;x=x&&P.synchronous;const N=i.transitional||Uo;N&&N.legacyInterceptorReqResOrdering?h.unshift(P.fulfilled,P.rejected):h.push(P.fulfilled,P.rejected)});const y=[];this.interceptors.response.forEach(function(P){y.push(P.fulfilled,P.rejected)});let k,C=0,z;if(!x){const L=[Gd.bind(this),void 0];for(L.unshift(...h),L.push(...y),z=L.length,k=Promise.resolve(i);C<z;)k=k.then(L[C++],L[C++]);return k}z=h.length;let B=i;for(;C<z;){const L=h[C++],P=h[C++];try{B=L(B)}catch(N){P.call(this,N);break}}try{k=Gd.call(this,B)}catch(L){return Promise.reject(L)}for(C=0,z=y.length;C<z;)k=k.then(y[C++],y[C++]);return k}getUri(a){a=nr(this.defaults,a);const i=Uf(a.baseURL,a.url,a.allowAbsoluteUrls);return zf(i,a.params,a.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(a){er.prototype[a]=function(i,u){return this.request(nr(u||{},{method:a,url:i,data:(u||{}).data}))}});_.forEach(["post","put","patch","query"],function(a){function i(u){return function(f,m,h){return this.request(nr(h||{},{method:a,headers:u?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}er.prototype[a]=i(),a!=="query"&&(er.prototype[a+"Form"]=i(!0))});let ag=class Bf{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(f){i=f});const u=this;this.promise.then(d=>{if(!u._listeners)return;let f=u._listeners.length;for(;f-- >0;)u._listeners[f](d);u._listeners=null}),this.promise.then=d=>{let f;const m=new Promise(h=>{u.subscribe(h),f=h}).then(d);return m.cancel=function(){u.unsubscribe(f)},m},a(function(f,m,h){u.reason||(u.reason=new Ds(f,m,h),i(u.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const i=this._listeners.indexOf(a);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const a=new AbortController,i=u=>{a.abort(u)};return this.subscribe(i),a.signal.unsubscribe=()=>this.unsubscribe(i),a.signal}static source(){let a;return{token:new Bf(function(d){a=d}),cancel:a}}};function ig(s){return function(i){return s.apply(null,i)}}function og(s){return _.isObject(s)&&s.isAxiosError===!0}const Po={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Po).forEach(([s,a])=>{Po[a]=s});function Vf(s){const a=new er(s),i=kf(er.prototype.request,a);return _.extend(i,er.prototype,a,{allOwnKeys:!0}),_.extend(i,a,null,{allOwnKeys:!0}),i.create=function(d){return Vf(nr(s,d))},i}const qe=Vf(As);qe.Axios=er;qe.CanceledError=Ds;qe.CancelToken=ag;qe.isCancel=Df;qe.VERSION=Io;qe.toFormData=ga;qe.AxiosError=le;qe.Cancel=qe.CanceledError;qe.all=function(a){return Promise.all(a)};qe.spread=ig;qe.isAxiosError=og;qe.mergeConfig=nr;qe.AxiosHeaders=dt;qe.formToJSON=s=>Af(_.isHTMLForm(s)?new FormData(s):s);qe.getAdapter=$f.getAdapter;qe.HttpStatusCode=Po;qe.default=qe;const{Axios:Qg,AxiosError:Jg,CanceledError:Gg,isCancel:Yg,CancelToken:Xg,VERSION:Zg,all:ey,Cancel:ty,isAxiosError:ny,spread:ry,toFormData:sy,AxiosHeaders:ly,HttpStatusCode:ay,formToJSON:iy,getAdapter:oy,mergeConfig:uy,create:cy}=qe,X=qe.create({baseURL:"/api/admin"});X.interceptors.request.use(s=>{const a=localStorage.getItem("token");return a&&(s.headers.Authorization=`Bearer ${a}`),s});X.interceptors.response.use(s=>s,s=>{var a;return((a=s.response)==null?void 0:a.status)===401&&(localStorage.removeItem("token"),window.location.href="/login"),Promise.reject(s)});async function ug(s,a){const i=new FormData;i.append("username",s),i.append("password",a);const{data:u}=await qe.post("/api/admin/auth/token",i);return u.access_token}function cg(){const[s,a]=v.useState(""),[i,u]=v.useState(""),[d,f]=v.useState(""),[m,h]=v.useState(!1),x=ca();async function y(k){k.preventDefault(),h(!0),f("");try{const C=await ug(s,i);localStorage.setItem("token",C),x("/dashboard")}catch{f("Credenciales incorrectas")}finally{h(!1)}}return l.jsx("div",{className:"min-h-screen bg-dark-900 flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-sm",children:[l.jsxs("div",{className:"flex items-center justify-center gap-3 mb-8",children:[l.jsx(fa,{className:"text-primary-500",size:32}),l.jsx("h1",{className:"text-3xl font-bold",children:"KiraStream"})]}),l.jsxs("form",{onSubmit:y,className:"bg-dark-800 rounded-xl p-6 space-y-4 border border-dark-700",children:[l.jsx("h2",{className:"text-center text-gray-400 text-sm",children:"Panel de Administración"}),d&&l.jsx("div",{className:"bg-red-900/30 border border-red-700 text-red-400 text-sm rounded p-2 text-center",children:d}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Usuario"}),l.jsx("input",{value:s,onChange:k=>a(k.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500",autoComplete:"username",required:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Contraseña"}),l.jsx("input",{type:"password",value:i,onChange:k=>u(k.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500",autoComplete:"current-password",required:!0})]}),l.jsx("button",{type:"submit",disabled:m,className:"w-full bg-primary-500 hover:bg-primary-600 disabled:opacity-50 rounded-lg py-2 text-sm font-medium transition-colors",children:m?"Entrando...":"Entrar"})]})]})})}function Hf(s){var a,i,u="";if(typeof s=="string"||typeof s=="number")u+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(a=0;a<d;a++)s[a]&&(i=Hf(s[a]))&&(u&&(u+=" "),u+=i)}else for(i in s)s[i]&&(u&&(u+=" "),u+=i);return u}function Mt(){for(var s,a,i=0,u="",d=arguments.length;i<d;i++)(s=arguments[i])&&(a=Hf(s))&&(u&&(u+=" "),u+=a);return u}const dg=[{to:"/dashboard",icon:ph,label:"Dashboard"},{to:"/providers",icon:Ao,label:"Proveedores"},{to:"/users",icon:aa,label:"Usuarios"},{to:"/catalogs",icon:wf,label:"Catálogos"},{to:"/custom-categories",icon:Pn,label:"Cat. personalizadas"},{to:"/jellyfin",icon:Yn,label:"Jellyfin"},{to:"/epg",icon:Tr,label:"EPG"},{to:"/logs",icon:xh,label:"Registros"},{to:"/settings",icon:gh,label:"Ajustes"}],fg={live:"Directo",movie:"Película",series:"Serie"},pg={live:"bg-blue-900/30 text-blue-300 border-blue-800",movie:"bg-purple-900/30 text-purple-300 border-purple-800",series:"bg-green-900/30 text-green-300 border-green-800"};function mg(){const s=ca(),[a,i]=v.useState(!1),[u,d]=v.useState([]),[f,m]=v.useState(0),[h,x]=v.useState(!1),y=v.useRef(null);function k(){localStorage.removeItem("token"),s("/login")}async function C(){x(!0);try{const{data:L}=await X.get("/providers/notifications/all");d(L.notifications||[]),m(L.total||0)}catch{d([]),m(0)}finally{x(!1)}}v.useEffect(()=>{const L=async()=>{try{const{data:N}=await X.get("/providers/notifications/all");m(N.total||0),a&&d(N.notifications||[])}catch{}};L();const P=setInterval(L,12e4);return()=>clearInterval(P)},[a]),v.useEffect(()=>{a&&C()},[a]),v.useEffect(()=>{const L=P=>{y.current&&!y.current.contains(P.target)&&i(!1)};return a&&document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[a]);async function z(L,P,N){await X.post("/providers/notifications/dismiss",{provider_id:L,category_id:P,category_type:N}),d(A=>A.map(M=>M.provider_id===L?{...M,categories:M.categories.filter(K=>!(K.id===P&&K.type===N))}:M).filter(M=>M.categories.length>0)),m(A=>Math.max(0,A-1))}async function B(L){var N;await X.post(`/providers/notifications/dismiss-provider/${L}`),d(A=>A.filter(M=>M.provider_id!==L));const P=((N=u.find(A=>A.provider_id===L))==null?void 0:N.categories.length)??0;m(A=>Math.max(0,A-P))}return l.jsxs("div",{className:"flex h-screen overflow-hidden",children:[l.jsxs("aside",{className:"w-56 bg-dark-800 border-r border-dark-700 flex flex-col shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2 p-4 border-b border-dark-700",children:[l.jsx(fa,{className:"text-primary-500",size:22}),l.jsx("span",{className:"font-bold text-lg tracking-tight flex-1",children:"KiraStream"}),l.jsxs("div",{className:"relative",ref:y,children:[l.jsxs("button",{onClick:()=>i(L=>!L),className:Mt("relative p-1 rounded-lg transition-colors",a?"bg-dark-600 text-yellow-400":"text-gray-500 hover:text-yellow-400 hover:bg-dark-700"),title:"Notificaciones",children:[l.jsx(gf,{size:16}),f>0&&l.jsx("span",{className:"absolute -top-1 -right-1 bg-yellow-500 text-black text-[9px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:f>99?"99+":f})]}),a&&l.jsxs("div",{className:"absolute left-0 top-full mt-2 w-80 bg-dark-800 border border-dark-700 rounded-xl shadow-2xl z-50 flex flex-col max-h-[70vh]",children:[l.jsxs("div",{className:"p-3 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsx("span",{className:"font-semibold text-sm",children:"Nuevas categorías"}),l.jsx("button",{onClick:()=>i(!1),className:"text-gray-500 hover:text-white",children:l.jsx(On,{size:14})})]}),h?l.jsx("div",{className:"flex items-center justify-center p-8",children:l.jsx(Ge,{size:18,className:"animate-spin text-gray-400"})}):u.length===0?l.jsx("div",{className:"p-6 text-center text-gray-500 text-sm",children:"Sin novedades pendientes ✓"}):l.jsx("div",{className:"overflow-y-auto flex-1 p-2 space-y-3",children:u.map(L=>l.jsxs("div",{className:"bg-dark-900/50 rounded-lg border border-dark-700 overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-dark-700/40",children:[l.jsx("span",{className:"text-xs font-semibold text-gray-300 truncate",children:L.provider_name}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[l.jsx("span",{className:"text-xs text-gray-500",children:L.categories.length}),l.jsx("button",{onClick:()=>B(L.provider_id),className:"text-xs text-gray-500 hover:text-red-400 ml-1 px-1.5 py-0.5 rounded hover:bg-dark-600",title:"Descartar todas",children:"Ignorar todas"})]})]}),l.jsx("div",{className:"p-2 space-y-1 max-h-48 overflow-y-auto",children:L.categories.map(P=>l.jsxs("div",{className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-dark-700 group",children:[l.jsx("span",{className:"text-xs flex-1 truncate",children:P.name}),l.jsx("span",{className:`text-[10px] px-1 py-0.5 rounded border shrink-0 ${pg[P.type]}`,children:fg[P.type]}),l.jsx("button",{onClick:()=>z(L.provider_id,P.id,P.type),className:"opacity-0 group-hover:opacity-100 text-gray-600 hover:text-red-400 transition-opacity shrink-0",title:"Descartar",children:l.jsx(On,{size:12})})]},`${P.id}_${P.type}`))}),l.jsx("div",{className:"px-3 py-2 border-t border-dark-700",children:l.jsxs("button",{onClick:()=>{i(!1),s("/providers")},className:"text-xs text-primary-400 hover:text-primary-300 flex items-center gap-1",children:["Ir a Proveedores para sincronizar ",l.jsx(No,{size:11})]})})]},L.provider_id))})]})]})]}),l.jsx("nav",{className:"flex-1 p-3 space-y-1",children:dg.map(({to:L,icon:P,label:N})=>l.jsxs(th,{to:L,className:({isActive:A})=>Mt("flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors",A?"bg-primary-500/20 text-primary-400":"text-gray-400 hover:bg-dark-700 hover:text-gray-100"),children:[l.jsx(P,{size:17}),N]},L))}),l.jsxs("button",{onClick:k,className:"flex items-center gap-3 p-4 text-sm text-gray-500 hover:text-red-400 border-t border-dark-700 transition-colors",children:[l.jsx(mh,{size:16})," Cerrar sesión"]})]}),l.jsx("main",{className:"flex-1 overflow-auto bg-dark-900",children:l.jsx($0,{})})]})}function hg(s){return s<1024?s+" B":s<1048576?(s/1024).toFixed(1)+" KB":s<1073741824?(s/1048576).toFixed(1)+" MB":(s/1073741824).toFixed(2)+" GB"}function mo(s){return s<=0?"—":s<1024?s.toFixed(0)+" B/s":s<1048576?(s/1024).toFixed(0)+" KB/s":(s/1048576).toFixed(1)+" MB/s"}function xg(s){const a=Math.floor(Date.now()/1e3-s),i=Math.floor(a/3600),u=Math.floor(a%3600/60),d=a%60;return i>0?`${i}h ${u}m`:u>0?`${u}m ${d}s`:`${d}s`}function gg(s){if(!s.width||!s.height)return null;const a=s.width>=3840?"4K":s.width>=1920?"FHD":s.width>=1280?"HD":s.width>=720?"SD":"LD";return`${s.width}×${s.height} (${a})`}function yg({info:s}){if(!s||Object.keys(s).length===0)return l.jsx("span",{className:"text-gray-600 text-xs italic",children:"Detectando..."});const a=gg(s),i=s.fps?`${s.fps} fps`:null,u=s.video_codec?s.video_codec.toUpperCase():null,d=s.audio_codec?s.audio_codec.toUpperCase():null,f=s.bitrate_bps?`${(s.bitrate_bps/1e6).toFixed(1)} Mb/s`:null;return l.jsxs("div",{className:"space-y-0.5",children:[a&&l.jsxs("div",{className:"text-gray-200 font-mono text-xs",children:[a,i?` · ${i}`:""]}),l.jsxs("div",{className:"flex gap-1 flex-wrap",children:[u&&l.jsx("span",{className:"bg-blue-900/40 text-blue-300 text-[10px] px-1.5 py-0.5 rounded border border-blue-800",children:u}),d&&l.jsxs("span",{className:"bg-purple-900/40 text-purple-300 text-[10px] px-1.5 py-0.5 rounded border border-purple-800",children:[d,s.audio_channels?` ${s.audio_channels}ch`:""]}),f&&l.jsx("span",{className:"text-gray-500 text-[10px]",children:f})]})]})}function vg({status:s,sessionCount:a,failureCount:i}){const u=i!=null&&i>0,d=a!=null&&a>0;return s==="connecting"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-gray-400",children:[l.jsx(Ge,{size:9,className:"animate-spin"})," Conectando"]}):s==="reconnecting"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-orange-400",children:[l.jsx(Ge,{size:9,className:"animate-spin"})," Reconectando",u&&l.jsxs("span",{className:"ml-1 px-1 bg-red-900/40 text-red-300 border border-red-800 rounded",children:[i," fallo",i>1?"s":""]})]}):!s||s==="ok"?l.jsxs("div",{className:"flex flex-col gap-0.5",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-green-500",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse inline-block"})," OK"]}),d&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-gray-500",title:`${a} rotación(es) de sesión del proveedor — el proveedor cierra la conexión cada ~2 min (normal). El buffer absorbe el cambio sin interrupción.`,children:[l.jsx(Ge,{size:8})," ",a," sesión",a>1?"es":""]}),u&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1 bg-red-900/40 text-red-300 border border-red-800 rounded",title:`${i} fallo(s) real(es) detectado(s) — conexión rechazada, DNS, auth u otro error. Ver Registro → Fallos de stream.`,children:[l.jsx(Ln,{size:8})," ",i," fallo",i>1?"s":""]})]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-red-400",children:[l.jsx(Ln,{size:9})," ",s]})}function wg({health:s,desyncs:a,corrections:i}){const u=i!=null&&i>0,d=a!=null&&a>0,f=s==="error"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-red-900/40 text-red-300 border border-red-800",children:[l.jsx(Ln,{size:9})," A/V error"]}):s==="warning"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-yellow-900/40 text-yellow-300 border border-yellow-800",children:[l.jsx(vf,{size:9})," A/V aviso"]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-emerald-500",children:[l.jsx(yh,{size:9})," A/V ok"]});return l.jsxs("div",{className:"flex flex-wrap items-center gap-1 mt-1",children:[f,u&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-violet-900/40 text-violet-300 border border-violet-800",title:"Correcciones automáticas del monitor de salud",children:[l.jsx(Ge,{size:9})," ×",i]}),d&&l.jsxs("span",{className:"text-[10px] text-gray-600 tabular-nums",title:"Eventos A/V en stderr de ffmpeg (informativos)",children:[a," ev."]})]})}function jg({pct:s,serverSecs:a,serverCapacity:i}){const u=s??0,d=u>=70?"bg-red-500":u>=40?"bg-yellow-400":"bg-emerald-500",f=u>=70?"text-red-400":u>=40?"text-yellow-400":"text-emerald-500",m=a??0,h=((i??0)/1048576).toFixed(0),x=m>.5?`${m.toFixed(1)}s`:"ok",y=m>10?"text-yellow-400":"text-emerald-500",k=`Buffer servidor: ${m>0?m.toFixed(1)+"s de cobertura":"0 — normal en reposo"}. Capacidad máx: ${h} MB. El buffer se activa durante reconexiones del proveedor.`;return l.jsxs("div",{className:"mt-1.5 space-y-0.5",children:[l.jsxs("div",{className:"flex items-center justify-between",title:`Cola cliente: ${u.toFixed(0)}% — 0%=consume sin retraso, 100%=cliente lento`,children:[l.jsx("span",{className:"text-[10px] text-gray-500",children:"Cola cliente"}),l.jsxs("span",{className:`text-[10px] font-mono tabular-nums ${f}`,children:[u.toFixed(0),"%"]})]}),l.jsx("div",{className:"w-full h-1.5 rounded-full bg-dark-700 overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full transition-all duration-700 ${d}`,style:{width:`${Math.min(u,100)}%`}})}),l.jsxs("div",{className:"flex items-center justify-between pt-0.5",title:k,children:[l.jsxs("span",{className:"text-[10px] text-gray-500",children:["Reserva (",h," MB)"]}),l.jsx("span",{className:`text-[10px] font-mono tabular-nums ${y}`,children:x})]})]})}const kg={live:l.jsx(Tr,{size:12,className:"text-blue-400"}),movie:l.jsx(Yn,{size:12,className:"text-purple-400"}),series:l.jsx(yf,{size:12,className:"text-green-400"})},Ng={live:"Directo",movie:"Película",series:"Serie"},Sg={live:"bg-blue-900/30 border-blue-800 text-blue-300",movie:"bg-purple-900/30 border-purple-800 text-purple-300",series:"bg-green-900/30 border-green-800 text-green-300"};function bg(){const[s,a]=v.useState([]),[i,u]=v.useState([]),[d,f]=v.useState(!1),[m,h]=v.useState(null),[x,y]=v.useState(null),k=v.useRef(null);v.useEffect(()=>{const ae=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/admin/monitoring/ws`,de=new WebSocket(ae);return k.current=de,de.onopen=()=>f(!0),de.onclose=()=>f(!1),de.onmessage=Y=>{const ke=JSON.parse(Y.data);(ke.type==="state"||ke.type==="update")&&a(ke.data)},()=>de.close()},[]),v.useEffect(()=>{X.get("/monitoring/slots").then(O=>u(O.data)).catch(()=>{})},[s]);async function C(O,ae){var de,Y;if(confirm(`¿Cortar la conexión de "${ae}"?`)){h(O),y(null);try{await X.post("/monitoring/kill",{client_id:O})}catch(ke){const Te=(Y=(de=ke==null?void 0:ke.response)==null?void 0:de.data)==null?void 0:Y.detail;y(Te||"Error al cortar la conexión"),setTimeout(()=>y(null),4e3)}finally{h(null)}}}const z=s.reduce((O,ae)=>O+ae.client_count,0),B=i.filter(O=>O.status==="busy").length,L=s.reduce((O,ae)=>O+(ae.bps_down||0),0),P=s.reduce((O,ae)=>O+(ae.ffmpeg_cpu_pct??0),0),N=s.some(O=>O.status==="reconnecting"),A=s.filter(O=>!O.av_health||O.av_health==="ok").length,M=s.filter(O=>O.av_health==="warning").length,K=s.filter(O=>O.av_health==="error").length,Q=s.reduce((O,ae)=>O+(ae.corrections??0),0),me=K>0?"text-red-400":M>0?"text-yellow-400":"text-emerald-400",fe=s.length===0?"—":K>0?`${K} error${K>1?"es":""}`:M>0?`${M} aviso${M>1?"s":""}`:`${A} ok`;return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Dashboard"}),l.jsxs("div",{className:"flex items-center gap-3",children:[N&&l.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-orange-400 bg-orange-900/30 border border-orange-800 px-2 py-1 rounded-lg",children:[l.jsx(Ge,{size:11,className:"animate-spin"}),"Reconectando stream(s)..."]}),K>0&&l.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-red-400 bg-red-900/30 border border-red-800 px-2 py-1 rounded-lg",children:[l.jsx(Ln,{size:11}),K," stream",K>1?"s":""," con error A/V"]}),l.jsxs("div",{className:`flex items-center gap-2 text-xs ${d?"text-green-400":"text-red-400"}`,children:[l.jsx("span",{className:`w-2 h-2 rounded-full ${d?"bg-green-400 animate-pulse":"bg-red-400"}`}),d?"Conectado en tiempo real":"Desconectado"]})]})]}),x&&l.jsx("div",{className:"bg-red-900/40 border border-red-700 rounded-lg px-4 py-2 text-sm text-red-300",children:x}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-4",children:[l.jsx(Pr,{icon:l.jsx(oh,{size:20,className:"text-blue-400"}),label:"Streams activos",value:s.length}),l.jsx(Pr,{icon:l.jsx(aa,{size:20,className:"text-green-400"}),label:"Usuarios conectados",value:z}),l.jsx(Pr,{icon:l.jsx(Ao,{size:20,className:"text-orange-400"}),label:"Slots ocupados",value:`${B}/${i.length}`}),l.jsx(Pr,{icon:l.jsx(fa,{size:20,className:"text-purple-400"}),label:"↓ Total proveedor",value:mo(L)}),l.jsx(Pr,{icon:l.jsx(Fd,{size:20,className:P>80?"text-red-400":P>40?"text-yellow-400":"text-cyan-400"}),label:"ffmpeg CPU total",value:`${P.toFixed(2)}%`}),l.jsx(Pr,{icon:l.jsx(vf,{size:20,className:me}),label:`Salud A/V${Q>0?` · ${Q} corr.`:""}`,value:fe,valueClass:me})]}),i.length>0&&l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 p-4",children:[l.jsx("h2",{className:"text-sm font-semibold text-gray-400 mb-3",children:"Estado de Slots del Proveedor"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(O=>l.jsxs("div",{className:`px-3 py-1.5 rounded-lg text-xs font-medium border ${O.status==="busy"?"bg-orange-900/30 border-orange-700 text-orange-300":"bg-green-900/30 border-green-800 text-green-400"}`,children:[l.jsx("span",{className:"font-bold",children:O.name}),l.jsx("span",{className:"ml-2 opacity-70",children:O.status==="busy"?`ch#${O.channel_id}`:"libre"})]},O.id))})]}),l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700",children:[l.jsx("div",{className:"p-4 border-b border-dark-700",children:l.jsx("h2",{className:"text-sm font-semibold text-gray-300",children:"Streams en Reproducción"})}),s.length===0?l.jsx("div",{className:"p-8 text-center text-gray-500 text-sm",children:"No hay streams activos"}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-left text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"px-4 py-2",children:"Canal"}),l.jsx("th",{className:"px-4 py-2",children:"Proveedor"}),l.jsx("th",{className:"px-4 py-2",children:"Stream"}),l.jsx("th",{className:"px-4 py-2",children:"Estado"}),l.jsx("th",{className:"px-4 py-2",children:"Salud A/V"}),l.jsx("th",{className:"px-4 py-2",children:"Usuarios"}),l.jsx("th",{className:"px-4 py-2",children:"↓ / ↑"}),l.jsx("th",{className:"px-4 py-2",children:"Tiempo"}),l.jsx("th",{className:"px-4 py-2",children:"Datos"})]})}),l.jsx("tbody",{children:s.map((O,ae)=>l.jsxs("tr",{className:"border-b border-dark-700 hover:bg-dark-700/30 align-top",children:[l.jsx("td",{className:"px-4 py-2.5",children:l.jsxs("span",{className:`inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded border ${Sg[O.stream_type]}`,children:[kg[O.stream_type],Ng[O.stream_type]]})}),l.jsxs("td",{className:"px-4 py-2.5",children:[l.jsx("span",{className:"font-medium text-gray-200 text-xs leading-tight block max-w-[160px] truncate",title:O.channel_name,children:O.channel_name}),l.jsxs("span",{className:"text-gray-600 text-xs",children:["#",O.channel_id]})]}),l.jsx("td",{className:"px-4 py-2.5",children:l.jsx("span",{className:"bg-orange-900/40 text-orange-300 text-xs px-2 py-0.5 rounded",children:O.provider_name||`#${O.provider_account_id}`})}),l.jsx("td",{className:"px-4 py-2.5 min-w-[160px]",children:O.stream_info?l.jsx(yg,{info:O.stream_info}):l.jsx("span",{className:"text-gray-600 text-xs italic",children:"—"})}),l.jsxs("td",{className:"px-4 py-2.5",children:[l.jsx(vg,{status:O.status,sessionCount:O.session_count,failureCount:O.failure_count}),O.ffmpeg_pid&&l.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[l.jsxs("span",{className:"inline-flex items-center gap-1 bg-cyan-900/40 text-cyan-300 text-[10px] px-1.5 py-0.5 rounded border border-cyan-800 font-mono",children:[l.jsx(Fd,{size:9}),"ffmpeg"]}),O.ffmpeg_cpu_pct!==void 0&&l.jsxs("span",{className:`font-mono text-[10px] tabular-nums ${O.ffmpeg_cpu_pct>80?"text-red-400":O.ffmpeg_cpu_pct>40?"text-yellow-400":"text-gray-400"}`,children:[O.ffmpeg_cpu_pct.toFixed(2),"%"]})]})]}),l.jsxs("td",{className:"px-4 py-2.5 min-w-[140px]",children:[l.jsx(wg,{health:O.av_health,desyncs:O.av_desync_count,corrections:O.corrections}),l.jsx(jg,{pct:O.buffer_pct,serverSecs:O.buffer_server_secs,serverCapacity:O.buffer_capacity})]}),l.jsx("td",{className:"px-4 py-2.5",children:l.jsx("div",{className:"flex flex-col gap-1",children:O.clients.map(de=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"text-gray-300 text-xs font-medium",children:de.username}),l.jsx("button",{onClick:()=>C(de.client_id,de.username),disabled:m===de.client_id,title:`Cortar conexión de ${de.username}`,className:"p-0.5 rounded hover:bg-red-900/40 text-gray-600 hover:text-red-400 transition-colors disabled:opacity-40 shrink-0",children:l.jsx(On,{size:11})})]},de.client_id))})}),l.jsxs("td",{className:"px-4 py-2.5 font-mono text-xs",children:[l.jsxs("div",{className:"text-cyan-400",children:["↓ ",mo(O.bps_down)]}),l.jsxs("div",{className:"text-green-400",children:["↑ ",mo(O.bps_up)]})]}),l.jsxs("td",{className:"px-4 py-2.5 text-gray-400 font-mono text-xs",children:[l.jsx(So,{size:11,className:"inline mr-1"}),xg(O.started_at)]}),l.jsx("td",{className:"px-4 py-2.5 text-gray-500 text-xs font-mono",children:hg(O.bytes_pumped)})]},ae))})]})})]})]})}function Pr({icon:s,label:a,value:i,valueClass:u}){return l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-4 flex items-center gap-4",children:[l.jsx("div",{className:"bg-dark-700 p-2.5 rounded-lg",children:s}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-gray-500",children:a}),l.jsx("p",{className:`text-2xl font-bold ${u??""}`,children:i})]})]})}function _g(s){if(!s)return null;const a=new Date(s),i=Math.ceil((a.getTime()-Date.now())/864e5);return i<0?{label:"Expirado",cls:"text-red-400 bg-red-900/20 border border-red-800"}:i<=7?{label:`Caduca en ${i}d`,cls:"text-red-400 bg-red-900/20 border border-red-800"}:i<=30?{label:`Caduca en ${i}d`,cls:"text-yellow-400 bg-yellow-900/20 border border-yellow-800"}:{label:`Caduca: ${a.toLocaleDateString("es-ES")}`,cls:"text-green-400 bg-green-900/20 border border-green-800"}}const Cg=[{key:"live",label:"Canales en directo"},{key:"movie",label:"Películas (VOD)"},{key:"series",label:"Series"}],Xd=[{value:0,label:"Desactivado"},{value:6,label:"Cada 6 horas"},{value:12,label:"Cada 12 horas"},{value:24,label:"Cada 24 horas"}],Zd={name:"",base_url:"",username:"",password:"",max_connections:1,auto_sync_hours:0};function Eg(){const[s,a]=v.useState([]),[i,u]=v.useState(Zd),[d,f]=v.useState(!1),[m,h]=v.useState(new Set),[x,y]=v.useState({}),[k,C]=v.useState({}),[z,B]=v.useState(null),[L,P]=v.useState({}),N=v.useRef({}),[A,M]=v.useState(null),[K,Q]=v.useState(!1),[me,fe]=v.useState({live:[],movie:[],series:[]}),[O,ae]=v.useState({live:new Set,movie:new Set,series:new Set}),[de,Y]=v.useState(""),[ke,Te]=v.useState({}),[ze,Ee]=v.useState(null),[q,ge]=v.useState({name:"",base_url:"",username:"",password:"",max_connections:1,auto_sync_hours:0}),[D,U]=v.useState(null),[ee,G]=v.useState(!1),[b,I]=v.useState([]),[te,pe]=v.useState(new Set),[ye,Ne]=v.useState(""),[we,oe]=v.useState({}),[F,ne]=v.useState(new Set),[je,_e]=v.useState(null),[De,Le]=v.useState({url:"",priority:10,is_active:!0}),[Fr,Ur]=v.useState(new Set);async function wt(){const{data:w}=await X.get("/providers/");return a(w),w}v.useEffect(()=>(wt().then(async w=>{for(const $ of w)try{const{data:ue}=await X.get(`/providers/${$.id}/sync/status`);ue.status==="running"&&(h(Se=>new Set(Se).add($.id)),y(Se=>({...Se,[$.id]:ue.progress||"Sincronizando..."})),rr($.id))}catch{}}),()=>{Object.keys(N.current).forEach(w=>{N.current[+w]=!1})}),[]);function rr(w){N.current[w]=!0;const $=async()=>{if(N.current[w])try{const{data:ue}=await X.get(`/providers/${w}/sync/status`);y(Se=>({...Se,[w]:ue.progress||""})),C(Se=>({...Se,[w]:ue.stats||{}})),ue.status==="running"?setTimeout($,1500):(N.current[w]=!1,h(Se=>{const Ae=new Set(Se);return Ae.delete(w),Ae}),y(Se=>({...Se,[w]:ue.status==="done"?"✓ Sync completado":`Error: ${ue.progress}`})),wt())}catch{N.current[w]=!1,h(ue=>{const Se=new Set(ue);return Se.delete(w),Se})}};$()}async function Mr(w){w.preventDefault(),await X.post("/providers/",i),u(Zd),f(!1),wt()}async function zn(w){confirm("¿Eliminar este proveedor y todos sus canales?")&&(await X.delete(`/providers/${w}`),wt())}async function an(w){B(w);try{const{data:$}=await X.post(`/providers/${w}/test`);P(ue=>({...ue,[w]:$.connected})),$.connected&&wt()}finally{B(null)}}function Ir(w){Ee(w),ge({name:w.name,base_url:w.base_url,username:w.username,password:"",max_connections:w.max_connections,auto_sync_hours:w.auto_sync_hours})}async function Fs(){var w,$;if(ze)try{await X.put(`/providers/${ze.id}`,q),Ee(null),wt()}catch(ue){alert("Error al guardar: "+((($=(w=ue.response)==null?void 0:w.data)==null?void 0:$.detail)||ue.message))}}async function Us(w){var $,ue,Se;M(w),Q(!0),Y(""),Te({});try{const[Ae,$e]=await Promise.all([X.get(`/providers/${w.id}/sync/categories`),X.get(`/providers/${w.id}/synced-category-ids`)]);fe(Ae.data);let lr=$e.data.live,qr=$e.data.movie,un=$e.data.series;if(w.last_sync_categories)try{const $t=JSON.parse(w.last_sync_categories);((($=$t.live)==null?void 0:$.length)??0)+(((ue=$t.movie)==null?void 0:ue.length)??0)+(((Se=$t.series)==null?void 0:Se.length)??0)>0&&(lr=$t.live??[],qr=$t.movie??[],un=$t.series??[])}catch{}ae({live:new Set(lr),movie:new Set(qr),series:new Set(un)})}catch{M(null)}finally{Q(!1)}}async function Ms(){if(!A)return;const w=A.id;M(null),h($=>new Set($).add(w)),y($=>({...$,[w]:"Iniciando..."}));try{await X.post(`/providers/${w}/sync`,{live_category_ids:Array.from(O.live),movie_category_ids:Array.from(O.movie),series_category_ids:Array.from(O.series)}),rr(w)}catch{h($=>{const ue=new Set($);return ue.delete(w),ue}),y($=>({...$,[w]:"Error al iniciar sync"}))}}function Is(w,$){ae(ue=>{const Se=new Set(ue[w]);return Se.has($)?Se.delete($):Se.add($),{...ue,[w]:Se}})}function $r(w,$){ae(ue=>({...ue,[w]:new Set($.map(Se=>Se.id))}))}function sr(w){ae($=>({...$,[w]:new Set}))}async function $s(w){U(w),G(!0),Ne(""),pe(new Set);try{const{data:$}=await X.get(`/providers/${w.id}/available-updates`);I($.new_categories||[])}catch{I([])}finally{G(!1)}}async function An(w){try{const{data:$}=await X.get(`/providers/${w}/available-updates`);oe(ue=>({...ue,[w]:$.total||0}))}catch{}}v.useEffect(()=>{s.forEach(w=>{w.last_sync_at&&An(w.id)})},[s.length]);async function Dn(){if(!D||te.size===0)return;const w=D.id,$=[],ue=[],Se=[];b.filter(Ae=>te.has(Ae.id+"_"+Ae.type)).forEach(Ae=>{Ae.type==="live"?$.push(Ae.id):Ae.type==="movie"?ue.push(Ae.id):Ae.type==="series"&&Se.push(Ae.id)}),U(null),h(Ae=>new Set(Ae).add(w)),y(Ae=>({...Ae,[w]:"Iniciando..."}));try{await X.post(`/providers/${w}/sync`,{live_category_ids:$.length>0?$:void 0,movie_category_ids:ue.length>0?ue:void 0,series_category_ids:Se.length>0?Se:void 0}),rr(w)}catch{h(Ae=>{const $e=new Set(Ae);return $e.delete(w),$e}),y(Ae=>({...Ae,[w]:"Error al iniciar sync"}))}}function va(w){ne($=>{const ue=new Set($);return ue.has(w)?ue.delete(w):ue.add(w),ue})}async function Bs(w){await X.post(`/providers/${w}/urls`,De),_e(null),Le({url:"",priority:10,is_active:!0}),wt()}async function Vs(w,$){confirm("¿Eliminar esta URL de failover?")&&(await X.delete(`/providers/${w}/urls/${$}`),wt())}async function wa(w){Ur($=>new Set($).add(w));try{await X.post(`/providers/${w}/urls/check-all`),wt()}finally{Ur($=>{const ue=new Set($);return ue.delete(w),ue})}}function Br(w){return w.status==="ok"?l.jsxs("span",{className:"text-green-400 text-xs font-mono",children:["● ",w.response_ms!=null?`${w.response_ms}ms`:"OK"]}):w.status==="error"?l.jsx("span",{className:"text-red-400 text-xs font-mono",children:"● Error"}):w.status==="timeout"?l.jsx("span",{className:"text-yellow-400 text-xs font-mono",children:"● Timeout"}):l.jsx("span",{className:"text-gray-500 text-xs font-mono",children:"○ Desconocido"})}const on=Object.values(O).reduce((w,$)=>w+$.size,0),Vr=Object.values(me).reduce((w,$)=>w+$.length,0),Hr={live:"Directo",movie:"Película",series:"Serie"},Wr={live:"bg-blue-900/30 text-blue-300 border-blue-800",movie:"bg-purple-900/30 text-purple-300 border-purple-800",series:"bg-green-900/30 text-green-300 border-green-800"},Qt=b.filter(w=>!ye||w.name.toLowerCase().includes(ye.toLowerCase()));return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Proveedores IPTV"}),l.jsxs("button",{onClick:()=>f(w=>!w),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Añadir proveedor"]})]}),d&&l.jsxs("form",{onSubmit:Mr,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm mb-2",children:"Nueva cuenta de proveedor"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx(Gn,{label:"Nombre",value:i.name,onChange:w=>u($=>({...$,name:w})),required:!0}),l.jsx(Gn,{label:"URL base (ej: http://provider.com:8080)",value:i.base_url,onChange:w=>u($=>({...$,base_url:w})),required:!0}),l.jsx(Gn,{label:"Usuario",value:i.username,onChange:w=>u($=>({...$,username:w})),required:!0}),l.jsx(Gn,{label:"Contraseña",value:i.password,onChange:w=>u($=>({...$,password:w})),required:!0}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Conexiones máx."}),l.jsx("input",{type:"number",min:1,max:100,value:i.max_connections,onChange:w=>u($=>({...$,max_connections:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Auto-sincronización"}),l.jsx("select",{value:i.auto_sync_hours,onChange:w=>u($=>({...$,auto_sync_hours:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",children:Xd.map(w=>l.jsx("option",{value:w.value,children:w.label},w.value))})]})]}),l.jsxs("div",{className:"flex gap-2 pt-1",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:()=>f(!1),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),A&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-2xl flex flex-col max-h-[90vh]",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Seleccionar categorías — ",l.jsx("span",{className:"text-primary-400",children:A.name})]}),!K&&l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[on," de ",Vr," categorías seleccionadas"]})]}),l.jsx("button",{onClick:()=>M(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),K?l.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:l.jsxs("div",{className:"text-center text-gray-400",children:[l.jsx(Ge,{size:24,className:"animate-spin mx-auto mb-3"}),l.jsx("p",{className:"text-sm",children:"Obteniendo categorías del proveedor..."})]})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"p-3 border-b border-dark-700 shrink-0",children:l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:de,onChange:w=>Y(w.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]})}),l.jsx("div",{className:"overflow-y-auto flex-1 p-3 space-y-2",children:Cg.map(({key:w,label:$})=>{const ue=me[w].filter($e=>!de||$e.name.toLowerCase().includes(de.toLowerCase()));if(!ue.length&&!de)return null;const Se=ue.filter($e=>O[w].has($e.id)).length,Ae=ke[w];return l.jsxs("div",{className:"bg-dark-900/50 rounded-lg border border-dark-700 overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 cursor-pointer hover:bg-dark-700/50 select-none",onClick:()=>Te($e=>({...$e,[w]:!$e[w]})),children:[l.jsxs("div",{className:"flex items-center gap-2",children:[Ae?l.jsx(No,{size:14,className:"text-gray-500"}):l.jsx(ko,{size:14,className:"text-gray-500"}),l.jsx("span",{className:"text-sm font-medium",children:$}),l.jsxs("span",{className:"text-xs text-gray-500",children:["(",Se,"/",ue.length," sel.)"]})]}),l.jsxs("div",{className:"flex gap-2",onClick:$e=>$e.stopPropagation(),children:[l.jsx("button",{onClick:()=>$r(w,ue),className:"text-xs text-primary-400 hover:text-primary-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Todo"}),l.jsx("button",{onClick:()=>sr(w),className:"text-xs text-gray-500 hover:text-gray-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Nada"})]})]}),!Ae&&l.jsx("div",{className:"grid grid-cols-2 gap-0.5 p-2 border-t border-dark-700 max-h-64 overflow-y-auto",children:ue.length===0?l.jsx("div",{className:"col-span-2 text-center text-gray-500 text-xs py-3",children:"Sin resultados"}):ue.map($e=>l.jsxs("label",{className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-dark-700 cursor-pointer text-sm",children:[l.jsx("input",{type:"checkbox",checked:O[w].has($e.id),onChange:()=>Is(w,$e.id),className:"shrink-0"}),l.jsx("span",{className:"truncate text-xs",children:$e.name})]},$e.id))})]},w)})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>M(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsxs("button",{onClick:Ms,disabled:on===0,className:"bg-primary-500 hover:bg-primary-600 disabled:opacity-40 px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2",children:[l.jsx(Ge,{size:14}),"Importar ",on," ",on===1?"categoría":"categorías"]})]})]})]})}),D&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-lg flex flex-col max-h-[80vh]",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Novedades — ",l.jsx("span",{className:"text-primary-400",children:D.name})]}),!ee&&l.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:b.length===0?"No hay categorías nuevas":`${b.length} categorías nuevas sin sincronizar`})]}),l.jsx("button",{onClick:()=>U(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),ee?l.jsx("div",{className:"flex-1 flex items-center justify-center p-10",children:l.jsx(Ge,{size:22,className:"animate-spin text-gray-400"})}):b.length===0?l.jsx("div",{className:"flex-1 flex items-center justify-center p-10 text-gray-500 text-sm",children:"Todo está actualizado ✓"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"p-3 border-b border-dark-700 shrink-0",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:ye,onChange:w=>Ne(w.target.value),placeholder:"Buscar...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"flex gap-2 mt-2",children:[l.jsx("button",{onClick:()=>pe(new Set(Qt.map(w=>w.id+"_"+w.type))),className:"text-xs text-primary-400 hover:text-primary-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Seleccionar todo"}),l.jsx("button",{onClick:()=>pe(new Set),className:"text-xs text-gray-500 hover:text-gray-300 px-2 py-0.5 rounded hover:bg-dark-600",children:"Ninguna"}),l.jsxs("span",{className:"text-xs text-gray-600 ml-auto self-center",children:[te.size," seleccionadas"]})]})]}),l.jsx("div",{className:"overflow-y-auto flex-1 p-3 space-y-1",children:Qt.map(w=>{const $=w.id+"_"+w.type;return l.jsxs("label",{className:"flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-dark-700 cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:te.has($),onChange:()=>{pe(ue=>{const Se=new Set(ue);return Se.has($)?Se.delete($):Se.add($),Se})},className:"shrink-0"}),l.jsx("span",{className:"text-sm flex-1 truncate",children:w.name}),l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border ${Wr[w.type]}`,children:Hr[w.type]})]},$)})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>U(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsxs("button",{onClick:Dn,disabled:te.size===0,className:"bg-primary-500 hover:bg-primary-600 disabled:opacity-40 px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2",children:[l.jsx(Ge,{size:14}),"Importar ",te.size," ",te.size===1?"categoría":"categorías"]})]})]})]})}),ze&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-lg",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("h2",{className:"font-semibold",children:["Editar proveedor — ",l.jsx("span",{className:"text-primary-400",children:ze.name})]}),l.jsx("button",{onClick:()=>Ee(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsx("div",{className:"p-4 space-y-3",children:l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsx(Gn,{label:"Nombre",value:q.name,onChange:w=>ge($=>({...$,name:w})),required:!0}),l.jsx(Gn,{label:"URL base",value:q.base_url,onChange:w=>ge($=>({...$,base_url:w})),required:!0}),l.jsx(Gn,{label:"Usuario",value:q.username,onChange:w=>ge($=>({...$,username:w})),required:!0}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Contraseña (vacío = no cambiar)"}),l.jsx("input",{type:"password",value:q.password,onChange:w=>ge($=>({...$,password:w.target.value})),placeholder:"••••••••",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Conexiones máx."}),l.jsx("input",{type:"number",min:1,max:100,value:q.max_connections,onChange:w=>ge($=>({...$,max_connections:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Auto-sincronización"}),l.jsx("select",{value:q.auto_sync_hours,onChange:w=>ge($=>({...$,auto_sync_hours:+w.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",children:Xd.map(w=>l.jsx("option",{value:w.value,children:w.label},w.value))})]})]})}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end",children:[l.jsx("button",{onClick:()=>Ee(null),className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsx("button",{onClick:Fs,className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"})]})]})}),l.jsxs("div",{className:"space-y-3",children:[s.map(w=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"p-4 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-semibold",children:w.name}),w.auto_sync_hours>0&&l.jsxs("span",{className:"text-xs bg-dark-700 text-gray-400 px-1.5 py-0.5 rounded",children:["Auto ",w.auto_sync_hours,"h"]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-0.5",children:[l.jsxs("span",{className:"text-xs text-gray-500 truncate",children:[w.base_url," • ",w.username," • ",w.max_connections," conex."]}),(()=>{const $=_g(w.expiry_date);return $?l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${$.cls}`,children:$.label}):null})()]}),w.last_sync_at&&l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Último sync: ",new Date(w.last_sync_at).toLocaleString("es-ES")]}),L[w.id]!==void 0&&l.jsx("div",{className:`text-xs mt-0.5 ${L[w.id]?"text-green-400":"text-red-400"}`,children:L[w.id]?"✓ Conexión OK":"✗ Sin conexión"}),x[w.id]&&l.jsxs("div",{className:`text-xs mt-1 ${x[w.id].startsWith("✓")?"text-green-400":x[w.id].startsWith("Error")?"text-red-400":"text-blue-400"}`,children:[m.has(w.id)&&l.jsx(Ge,{size:10,className:"inline animate-spin mr-1"}),x[w.id],k[w.id]&&m.has(w.id)&&l.jsxs("span",{className:"text-gray-500 ml-1",children:["(",Object.entries(k[w.id]).filter(([,$])=>$>0).map(([$,ue])=>`${ue} ${$}`).join(", "),")"]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx("button",{onClick:()=>an(w.id),disabled:z===w.id,title:"Probar conexión",className:"p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-blue-400 transition-colors",children:z===w.id?l.jsx(Ge,{size:15,className:"animate-spin"}):l.jsx(fa,{size:15})}),w.last_sync_at&&l.jsxs("button",{onClick:()=>$s(w),title:"Ver novedades del proveedor",className:"relative p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-yellow-400 transition-colors",children:[l.jsx(gf,{size:15}),(we[w.id]??0)>0&&l.jsx("span",{className:"absolute -top-1 -right-1 bg-yellow-500 text-black text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:we[w.id]>9?"9+":we[w.id]})]}),l.jsxs("button",{onClick:()=>Us(w),disabled:m.has(w.id),title:"Sincronizar canales",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-dark-700 hover:bg-dark-600 text-xs text-gray-300 hover:text-white transition-colors disabled:opacity-50",children:[l.jsx(Ge,{size:13,className:m.has(w.id)?"animate-spin":""}),m.has(w.id)?"Sincronizando...":"Sync canales"]}),l.jsx("button",{onClick:()=>Ir(w),title:"Editar proveedor",className:"p-2 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-yellow-400 transition-colors",children:l.jsx(jf,{size:15})}),l.jsx("button",{onClick:()=>va(w.id),title:"Gestionar dominios de failover",className:`p-2 rounded-lg bg-dark-700 hover:bg-dark-600 transition-colors ${F.has(w.id)?"text-primary-400":"text-gray-400 hover:text-primary-400"}`,children:F.has(w.id)?l.jsx(ko,{size:15}):l.jsx(No,{size:15})}),l.jsx("button",{onClick:()=>zn(w.id),className:"p-2 rounded-lg bg-dark-700 hover:bg-red-900/40 text-gray-500 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:15})})]})]}),F.has(w.id)&&l.jsxs("div",{className:"border-t border-dark-700 bg-dark-900/40 p-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Dominios (failover)"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{onClick:()=>wa(w.id),disabled:Fr.has(w.id),className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-blue-400 transition-colors disabled:opacity-50",children:[l.jsx(Ge,{size:11,className:Fr.has(w.id)?"animate-spin":""}),"Verificar todos"]}),l.jsxs("button",{onClick:()=>{_e(w.id),Le({url:"",priority:10,is_active:!0})},className:"flex items-center gap-1 text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400 hover:text-green-400 transition-colors",children:[l.jsx(tr,{size:11}),"Añadir URL"]})]})]}),(w.urls??[]).length===0&&je!==w.id&&l.jsx("div",{className:"text-xs text-gray-600 text-center py-2",children:"No hay URLs adicionales configuradas"}),(w.urls??[]).map($=>l.jsxs("div",{className:"flex items-center gap-3 bg-dark-800 rounded-lg px-3 py-2",children:[l.jsx("div",{className:"flex-1 min-w-0",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono text-gray-300 truncate",children:$.url}),$.priority===0&&l.jsx("span",{className:"text-[10px] bg-primary-900/40 text-primary-400 px-1 rounded",children:"primaria"}),!$.is_active&&l.jsx("span",{className:"text-[10px] bg-dark-600 text-gray-500 px-1 rounded",children:"inactiva"})]})}),l.jsx("div",{className:"shrink-0",children:Br($)}),l.jsx("button",{onClick:()=>Vs(w.id,$.id),className:"p-1 rounded text-gray-600 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:12})})]},$.id)),je===w.id&&l.jsxs("div",{className:"bg-dark-800 rounded-lg p-3 space-y-2 border border-dark-600",children:[l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[l.jsxs("div",{className:"col-span-2",children:[l.jsx("label",{className:"block text-[10px] text-gray-500 mb-1",children:"URL base (ej: http://mirror.com:8080)"}),l.jsx("input",{value:De.url,onChange:$=>Le(ue=>({...ue,url:$.target.value})),placeholder:"http://...",className:"w-full bg-dark-700 border border-dark-600 rounded px-2 py-1.5 text-xs focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] text-gray-500 mb-1",children:"Prioridad (0=más alta)"}),l.jsx("input",{type:"number",min:0,max:999,value:De.priority,onChange:$=>Le(ue=>({...ue,priority:+$.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded px-2 py-1.5 text-xs"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-gray-400 cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:De.is_active,onChange:$=>Le(ue=>({...ue,is_active:$.target.checked}))}),"Activa"]}),l.jsxs("div",{className:"flex gap-2 ml-auto",children:[l.jsx("button",{onClick:()=>_e(null),className:"text-xs px-2 py-1 rounded bg-dark-700 hover:bg-dark-600 text-gray-400",children:"Cancelar"}),l.jsx("button",{onClick:()=>Bs(w.id),disabled:!De.url,className:"text-xs px-2 py-1 rounded bg-primary-500 hover:bg-primary-600 disabled:opacity-40 font-medium",children:"Guardar"})]})]})]})]})]},w.id)),s.length===0&&l.jsx("div",{className:"bg-dark-800 border border-dark-700 border-dashed rounded-xl p-10 text-center text-gray-500 text-sm",children:"No hay proveedores. Añade uno para empezar."})]})]})}function Gn({label:s,value:a,onChange:i,required:u}){return l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:s}),l.jsx("input",{value:a,onChange:d=>i(d.target.value),required:u,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]})}const Pg={live:"Canales en directo",movie:"Películas",series:"Series"};function Rg(){const[s,a]=v.useState([]),[i,u]=v.useState(!1),[d,f]=v.useState(null),[m,h]=v.useState(null),[x,y]=v.useState(null),[k,C]=v.useState([]),[z,B]=v.useState(new Set),[L,P]=v.useState([]),[N,A]=v.useState(new Set),[M,K]=v.useState(""),[Q,me]=v.useState([]),[fe,O]=v.useState([]),[ae,de]=v.useState({username:"",password:"",max_connections:1,expiry_date:"",is_active:!0,is_priority:!1});async function Y(){const{data:F}=await X.get("/users/");a(F)}v.useEffect(()=>{Y()},[]);async function ke(F){F.preventDefault();const ne={...ae,expiry_date:ae.expiry_date||null};d?await X.put(`/users/${d.id}`,ne):await X.post("/users/",ne),Te(),Y()}function Te(){de({username:"",password:"",max_connections:1,expiry_date:"",is_active:!0,is_priority:!1}),u(!1),f(null)}function ze(F){var ne;de({username:F.username,password:"",max_connections:F.max_connections,expiry_date:((ne=F.expiry_date)==null?void 0:ne.split("T")[0])||"",is_active:F.is_active,is_priority:F.is_priority}),f(F),u(!0)}async function Ee(F){confirm("¿Eliminar usuario?")&&(await X.delete(`/users/${F}`),Y())}async function q(F){await X.put(`/users/${F.id}`,{is_priority:!F.is_priority}),Y()}async function ge(F){h(F),K("");const[ne,je,_e,De]=await Promise.all([X.get("/catalogs/grouped").then(Le=>Le.data),X.get(`/users/${F.id}/catalog`).then(Le=>Le.data),X.get("/custom-categories/").then(Le=>Le.data),X.get(`/users/${F.id}/custom-catalog`).then(Le=>Le.data)]);C(ne),B(new Set(je.map(Le=>Le.category_id))),P(_e),A(new Set(De))}function D(F){return F.category_ids.some(ne=>z.has(ne))}function U(F,ne){B(je=>{const _e=new Set(je);return ne?F.category_ids.forEach(De=>_e.add(De)):F.category_ids.forEach(De=>_e.delete(De)),_e})}function ee(F){B(je=>{const _e=new Set(je);return F.forEach(De=>De.category_ids.forEach(Le=>_e.add(Le))),_e});const ne=L.filter(je=>!M||je.name.toLowerCase().includes(M.toLowerCase()));A(je=>{const _e=new Set(je);return ne.forEach(De=>_e.add(De.id)),_e})}function G(F){B(je=>{const _e=new Set(je);return F.forEach(De=>De.category_ids.forEach(Le=>_e.delete(Le))),_e});const ne=L.filter(je=>!M||je.name.toLowerCase().includes(M.toLowerCase()));A(je=>{const _e=new Set(je);return ne.forEach(De=>_e.delete(De.id)),_e})}async function b(){m&&(await Promise.all([X.post(`/users/${m.id}/catalog`,Array.from(z)),X.post(`/users/${m.id}/custom-catalog`,Array.from(N))]),h(null))}async function I(F){y(F);const[ne,je]=await Promise.all([X.get("/providers/").then(_e=>_e.data),X.get(`/users/${F.id}/providers`).then(_e=>_e.data)]);me(ne),O(je)}async function te(F){if(!x)return;await X.post(`/users/${x.id}/providers`,{provider_account_id:F,priority:fe.length});const{data:ne}=await X.get(`/users/${x.id}/providers`);O(ne)}async function pe(F){if(!x)return;await X.delete(`/users/${x.id}/providers/${F}`);const{data:ne}=await X.get(`/users/${x.id}/providers`);O(ne)}const ye=new Set(fe.map(F=>F.provider_account_id)),Ne=k.filter(F=>!M||F.name.toLowerCase().includes(M.toLowerCase())),we=L.filter(F=>!M||F.name.toLowerCase().includes(M.toLowerCase())),oe=k.filter(F=>D(F)).length+N.size;return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Usuarios"}),l.jsxs("button",{onClick:()=>u(F=>!F),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Nuevo usuario"]})]}),i&&l.jsxs("form",{onSubmit:ke,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm",children:d?"Editar usuario":"Nuevo usuario"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Usuario"}),l.jsx("input",{value:ae.username,onChange:F=>de(ne=>({...ne,username:F.target.value})),required:!0,disabled:!!d,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs text-gray-500 mb-1",children:["Contraseña ",d&&"(dejar vacío para no cambiar)"]}),l.jsx("input",{type:"password",value:ae.password,onChange:F=>de(ne=>({...ne,password:F.target.value})),required:!d,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Max. conexiones simultáneas"}),l.jsx("input",{type:"number",min:1,value:ae.max_connections,onChange:F=>de(ne=>({...ne,max_connections:+F.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Fecha expiración"}),l.jsx("input",{type:"date",value:ae.expiry_date,onChange:F=>de(ne=>({...ne,expiry_date:F.target.value})),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{className:"flex items-center gap-4 col-span-2",children:[l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:ae.is_active,onChange:F=>de(ne=>({...ne,is_active:F.target.checked}))}),"Activo"]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:ae.is_priority,onChange:F=>de(ne=>({...ne,is_priority:F.target.checked}))}),l.jsx(Pn,{size:13,className:"text-yellow-400"}),"Usuario prioritario"]})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:Te,className:"bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),m&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-2xl max-h-[85vh] flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between shrink-0",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold",children:["Catálogo de ",l.jsx("span",{className:"text-primary-400",children:m.username})]}),l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[oe," de ",k.length+L.length," categorías seleccionadas"]})]}),l.jsx("button",{onClick:()=>h(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsxs("div",{className:"p-3 border-b border-dark-700 shrink-0 space-y-2",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:M,onChange:F=>K(F.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:()=>ee(Ne),className:"text-xs px-3 py-1 rounded-lg bg-primary-900/40 hover:bg-primary-900/70 text-primary-300 border border-primary-800 transition-colors",children:"Seleccionar todo"}),l.jsx("button",{onClick:()=>G(Ne),className:"text-xs px-3 py-1 rounded-lg bg-dark-700 hover:bg-dark-600 text-gray-400 border border-dark-600 transition-colors",children:"Ninguna"})]})]}),l.jsxs("div",{className:"overflow-y-auto flex-1 p-4 space-y-4",children:[["live","movie","series"].map(F=>{const ne=Ne.filter(je=>je.type===F);return ne.length?l.jsxs("div",{children:[l.jsxs("h3",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 flex items-center justify-between",children:[l.jsx("span",{children:Pg[F]}),l.jsxs("span",{className:"normal-case text-gray-600",children:[ne.filter(je=>D(je)).length,"/",ne.length]})]}),l.jsx("div",{className:"grid grid-cols-2 gap-1",children:ne.map(je=>l.jsxs("label",{className:`flex items-center gap-2 text-sm p-2 rounded-lg cursor-pointer transition-colors ${D(je)?"bg-primary-900/20 hover:bg-primary-900/30":"hover:bg-dark-700"}`,children:[l.jsx("input",{type:"checkbox",checked:D(je),onChange:_e=>U(je,_e.target.checked),className:"shrink-0"}),l.jsx("span",{className:"truncate",children:je.name}),je.provider_count>0&&l.jsxs("span",{className:`shrink-0 text-xs px-1.5 py-0.5 rounded ml-auto font-medium ${je.provider_count>1?"bg-green-900/50 text-green-400":"bg-dark-600 text-gray-500"}`,children:[je.provider_count,"p"]})]},je.name))})]},F):null}),Ne.length===0&&we.length===0&&l.jsx("div",{className:"text-center text-gray-500 text-sm py-8",children:"Sin resultados"}),we.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 flex items-center gap-2",children:[l.jsx(Pn,{size:11,className:"text-yellow-400"}),l.jsx("span",{children:"Categorías personalizadas"}),l.jsxs("span",{className:"normal-case text-gray-600",children:[we.filter(F=>N.has(F.id)).length,"/",we.length]})]}),l.jsx("div",{className:"grid grid-cols-2 gap-1",children:we.map(F=>l.jsxs("label",{className:`flex items-center gap-2 text-sm p-2 rounded-lg cursor-pointer transition-colors ${N.has(F.id)?"bg-yellow-900/20 hover:bg-yellow-900/30":"hover:bg-dark-700"}`,children:[l.jsx("input",{type:"checkbox",checked:N.has(F.id),onChange:ne=>{A(je=>{const _e=new Set(je);return ne.target.checked?_e.add(F.id):_e.delete(F.id),_e})},className:"shrink-0"}),l.jsx("span",{className:"truncate",children:F.name}),l.jsx(Pn,{size:10,className:"shrink-0 text-yellow-500 ml-auto"})]},F.id))})]})]}),l.jsxs("div",{className:"p-4 border-t border-dark-700 flex gap-2 justify-end shrink-0",children:[l.jsx("button",{onClick:()=>h(null),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cancelar"}),l.jsx("button",{onClick:b,className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar catálogo"})]})]})}),x&&l.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 w-full max-w-md flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("h2",{className:"font-semibold",children:["Proveedores preferidos — ",l.jsx("span",{className:"text-primary-400",children:x.username})]}),l.jsx("button",{onClick:()=>y(null),className:"text-gray-500 hover:text-white",children:"✕"})]}),l.jsxs("div",{className:"p-4 space-y-2",children:[l.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"Los proveedores marcados se intentan primero al asignar un slot. Si ninguno está disponible, se usa cualquiera con slot libre."}),Q.map(F=>{const ne=ye.has(F.id);return l.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${ne?"border-primary-700 bg-primary-900/20":"border-dark-600 bg-dark-700"}`,children:[l.jsx("span",{className:"text-sm",children:F.name}),l.jsx("button",{onClick:()=>ne?pe(F.id):te(F.id),className:`text-xs px-3 py-1 rounded-lg font-medium transition-colors ${ne?"bg-primary-600 hover:bg-red-700 text-white":"bg-dark-600 hover:bg-primary-700 text-gray-300 hover:text-white"}`,children:ne?"Quitar":"Preferido"})]},F.id)}),Q.length===0&&l.jsx("div",{className:"text-center text-gray-500 text-sm py-4",children:"No hay proveedores configurados"})]}),l.jsx("div",{className:"p-4 border-t border-dark-700 flex justify-end",children:l.jsx("button",{onClick:()=>y(null),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cerrar"})})]})}),l.jsx("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"border-b border-dark-700 text-xs text-gray-500",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left px-4 py-3",children:"Usuario"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Conexiones"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Expiración"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Estado"}),l.jsx("th",{className:"text-left px-4 py-3",children:"Acciones"})]})}),l.jsxs("tbody",{children:[s.map(F=>l.jsxs("tr",{className:"border-b border-dark-700 hover:bg-dark-700/30",children:[l.jsx("td",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[F.is_priority&&l.jsx(Pn,{size:12,className:"text-yellow-400 shrink-0"}),l.jsx("span",{className:"font-mono",children:F.username})]})}),l.jsx("td",{className:"px-4 py-3",children:F.max_connections}),l.jsx("td",{className:"px-4 py-3 text-gray-400",children:F.expiry_date?new Date(F.expiry_date).toLocaleDateString("es-ES"):"—"}),l.jsx("td",{className:"px-4 py-3",children:l.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${F.is_active?"bg-green-900/40 text-green-400":"bg-red-900/40 text-red-400"}`,children:F.is_active?"Activo":"Inactivo"})}),l.jsx("td",{className:"px-4 py-3",children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:()=>ge(F),title:"Asignar catálogo",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-blue-400",children:l.jsx(wf,{size:14})}),l.jsx("button",{onClick:()=>I(F),title:"Proveedores preferidos",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-purple-400",children:l.jsx(Ao,{size:14})}),l.jsx("button",{onClick:()=>q(F),title:F.is_priority?"Quitar prioridad":"Hacer prioritario",className:`p-1.5 rounded hover:bg-dark-600 transition-colors ${F.is_priority?"text-yellow-400":"text-gray-400 hover:text-yellow-400"}`,children:l.jsx(Pn,{size:14})}),l.jsx("button",{onClick:()=>ze(F),title:"Editar",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-yellow-400",children:l.jsx(jf,{size:14})}),l.jsx("button",{onClick:()=>Ee(F.id),title:"Eliminar",className:"p-1.5 rounded hover:bg-dark-600 text-gray-400 hover:text-red-400",children:l.jsx(rn,{size:14})})]})})]},F.id)),s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-gray-500",children:"No hay usuarios"})})]})]})})]})}const Tg={live:"Directo",movie:"Películas",series:"Series"},Lg={live:"bg-blue-900/40 text-blue-300",movie:"bg-purple-900/40 text-purple-300",series:"bg-green-900/40 text-green-300"};function Og(){const[s,a]=v.useState([]),[i,u]=v.useState(""),[d,f]=v.useState("");v.useEffect(()=>{X.get("/catalogs/grouped").then(h=>a(h.data))},[]);const m=s.filter(h=>{const x=!d||h.type===d,y=!i||h.name.toLowerCase().includes(i.toLowerCase());return x&&y});return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Catálogos de Categorías"}),l.jsx("p",{className:"text-sm text-gray-400",children:"Categorías importadas de los proveedores. El badge indica cuántos proveedores cubren cada categoría (= streams simultáneos posibles). Asígnalas a usuarios desde la sección Usuarios."}),l.jsxs("div",{className:"flex gap-3",children:[l.jsxs("div",{className:"relative flex-1 max-w-sm",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:i,onChange:h=>u(h.target.value),placeholder:"Buscar categoría...",className:"w-full bg-dark-800 border border-dark-700 rounded-lg pl-8 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:d,onChange:h=>f(h.target.value),className:"bg-dark-800 border border-dark-700 rounded-lg px-3 py-2 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Películas"}),l.jsx("option",{value:"series",children:"Series"})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:[m.map(h=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-3 flex items-center gap-2",children:[l.jsx("span",{className:"text-sm truncate flex-1 min-w-0",title:h.name,children:h.name}),l.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h.provider_count>0&&l.jsxs("span",{title:`${h.provider_count} proveedor${h.provider_count!==1?"es":""} — ${h.provider_count} stream${h.provider_count!==1?"s":""} simultáneo${h.provider_count!==1?"s":""} posible${h.provider_count!==1?"s":""}`,className:`text-xs px-1.5 py-0.5 rounded font-medium ${h.provider_count>1?"bg-green-900/50 text-green-400":"bg-dark-600 text-gray-500"}`,children:[h.provider_count,"p"]}),l.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${Lg[h.type]}`,children:Tg[h.type]})]})]},h.name+h.type)),m.length===0&&l.jsx("div",{className:"col-span-full bg-dark-800 border border-dark-700 border-dashed rounded-xl p-8 text-center text-gray-500 text-sm",children:s.length===0?"Sincroniza un proveedor para ver las categorías":"No se encontraron categorías"})]}),l.jsxs("p",{className:"text-xs text-gray-600",children:[m.length," categorías mostradas de ",s.length," totales"]})]})}function zg(){const[s,a]=v.useState([]),[i,u]=v.useState(!1),[d,f]=v.useState({name:"",url:""}),[m,h]=v.useState(!1);async function x(){const{data:z}=await X.get("/epg/");a(z)}v.useEffect(()=>{x()},[]);async function y(z){z.preventDefault(),await X.post("/epg/",d),f({name:"",url:""}),u(!1),x()}async function k(z){confirm("¿Eliminar fuente EPG?")&&(await X.delete(`/epg/${z}`),x())}async function C(){h(!0);try{await X.post("/epg/refresh"),alert("EPG actualización iniciada en segundo plano")}finally{h(!1)}}return l.jsxs("div",{className:"p-6 space-y-5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Gestión EPG"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{onClick:C,disabled:m,className:"flex items-center gap-2 bg-dark-700 hover:bg-dark-600 px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(Ge,{size:15,className:m?"animate-spin":""}),"Actualizar EPG"]}),l.jsxs("button",{onClick:()=>u(z=>!z),className:"flex items-center gap-2 bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:[l.jsx(tr,{size:16})," Añadir fuente"]})]})]}),l.jsxs("div",{className:"bg-dark-800 border border-primary-500/20 rounded-xl p-4 text-sm text-gray-400",children:[l.jsx("strong",{className:"text-gray-200",children:"Endpoint EPG para tus apps IPTV:"}),l.jsx("div",{className:"font-mono text-xs mt-1 bg-dark-700 rounded p-2 text-green-400",children:"http://10.10.10.234/xmltv.php?username=USUARIO&password=CONTRASEÑA"})]}),i&&l.jsxs("form",{onSubmit:y,className:"bg-dark-800 border border-dark-700 rounded-xl p-5 space-y-3",children:[l.jsx("h3",{className:"font-semibold text-sm",children:"Nueva fuente XMLTV"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"Nombre"}),l.jsx("input",{value:d.name,onChange:z=>f(B=>({...B,name:z.target.value})),required:!0,className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-500 mb-1",children:"URL XMLTV (o del proveedor)"}),l.jsx("input",{value:d.url,onChange:z=>f(B=>({...B,url:z.target.value})),required:!0,placeholder:"http://proveedor.com/xmltv.php?username=X&password=Y",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"submit",className:"bg-primary-500 hover:bg-primary-600 px-4 py-2 rounded-lg text-sm font-medium",children:"Guardar"}),l.jsx("button",{type:"button",onClick:()=>u(!1),className:"bg-dark-700 px-4 py-2 rounded-lg text-sm",children:"Cancelar"})]})]}),l.jsxs("div",{className:"space-y-3",children:[s.map(z=>l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-4 flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-semibold",children:z.name}),l.jsx("div",{className:"text-xs text-gray-500 truncate max-w-xl",children:z.url}),z.last_fetched_at&&l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Última actualización: ",new Date(z.last_fetched_at).toLocaleString("es-ES")]})]}),l.jsx("button",{onClick:()=>k(z.id),className:"p-2 rounded-lg bg-dark-700 hover:bg-red-900/40 text-gray-500 hover:text-red-400 transition-colors",children:l.jsx(rn,{size:15})})]},z.id)),s.length===0&&l.jsx("div",{className:"bg-dark-800 border border-dark-700 border-dashed rounded-xl p-8 text-center text-gray-500 text-sm",children:"No hay fuentes EPG configuradas"})]})]})}const ho={live:"Directo",movie:"Película",series:"Serie"},ef={live:Tr,movie:Yn,series:yf},ea={live:"bg-blue-500/20 text-blue-400",movie:"bg-purple-500/20 text-purple-400",series:"bg-orange-500/20 text-orange-400"};function Ag(){const[s,a]=v.useState([]),[i,u]=v.useState(null),[d,f]=v.useState([]),[m,h]=v.useState(""),[x,y]=v.useState(""),[k,C]=v.useState([]),[z,B]=v.useState(!1),[L,P]=v.useState(!1),[N,A]=v.useState(""),[M,K]=v.useState("live"),[Q,me]=v.useState(!1),fe=v.useCallback(async()=>{const{data:q}=await X.get("/custom-categories");a(q)},[]),O=v.useCallback(async q=>{const{data:ge}=await X.get(`/custom-categories/${q.id}/channels`);f(ge)},[]);v.useEffect(()=>{fe()},[fe]),v.useEffect(()=>{i&&O(i)},[i,O]);const ae=q=>{u(q),B(!1),h(""),C([])},de=async()=>{N.trim()&&(await X.post("/custom-categories",{name:N.trim(),type:M}),A(""),P(!1),await fe())},Y=async q=>{confirm(`¿Eliminar categoría "${q.name}"?`)&&(await X.delete(`/custom-categories/${q.id}`),(i==null?void 0:i.id)===q.id&&u(null),await fe())},ke=async q=>{await X.patch(`/custom-categories/${q.id}`,{is_visible:!q.is_visible}),await fe(),(i==null?void 0:i.id)===q.id&&u({...q,is_visible:!q.is_visible})},Te=v.useCallback(async(q,ge)=>{if(!q&&!ge){C([]);return}const{data:D}=await X.get("/custom-categories/channels/search",{params:{q,type:ge}});C(D)},[]);v.useEffect(()=>{const q=setTimeout(()=>Te(m,x),300);return()=>clearTimeout(q)},[m,x,Te]);const ze=async q=>{var ge;if(i)try{await X.post(`/custom-categories/${i.id}/channels`,{channel_id:q.id}),await O(i),await fe()}catch(D){((ge=D.response)==null?void 0:ge.status)!==409&&alert("Error al añadir canal")}},Ee=async q=>{i&&(await X.delete(`/custom-categories/${i.id}/channels/${q.item_id}`),await O(i),await fe())};return l.jsxs("div",{className:"flex h-full",children:[l.jsxs("aside",{className:"w-72 border-r border-dark-700 flex flex-col bg-dark-800",children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pn,{size:18,className:"text-yellow-400"}),l.jsx("h2",{className:"font-semibold text-sm",children:"Categorías personalizadas"})]}),l.jsx("button",{onClick:()=>P(!0),className:"p-1.5 rounded-lg bg-primary-500/20 text-primary-400 hover:bg-primary-500/30 transition-colors",children:l.jsx(tr,{size:15})})]}),L&&l.jsxs("div",{className:"p-3 border-b border-dark-700 bg-dark-900 space-y-2",children:[l.jsx("input",{autoFocus:!0,value:N,onChange:q=>A(q.target.value),onKeyDown:q=>q.key==="Enter"&&de(),placeholder:"Nombre de la categoría",className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:border-primary-500"}),l.jsxs("select",{value:M,onChange:q=>K(q.target.value),className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:de,className:"flex-1 bg-primary-500 hover:bg-primary-600 text-white text-xs py-1.5 rounded-lg transition-colors",children:"Crear"}),l.jsx("button",{onClick:()=>P(!1),className:"flex-1 bg-dark-700 hover:bg-dark-600 text-xs py-1.5 rounded-lg transition-colors",children:"Cancelar"})]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:[s.length===0&&l.jsx("p",{className:"text-xs text-gray-500 text-center py-8",children:"No hay categorías personalizadas"}),s.map(q=>{const ge=ef[q.type];return l.jsxs("div",{onClick:()=>ae(q),className:Mt("flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer group transition-colors",(i==null?void 0:i.id)===q.id?"bg-primary-500/20":"hover:bg-dark-700"),children:[l.jsx(ge,{size:14,className:ea[q.type].split(" ")[1]}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:Mt("text-sm font-medium truncate",(i==null?void 0:i.id)===q.id?"text-primary-300":"text-gray-200"),children:q.name}),l.jsxs("p",{className:"text-xs text-gray-500",children:[ho[q.type]," · ",q.item_count," canales"]})]}),l.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",onClick:D=>D.stopPropagation(),children:[l.jsx("button",{onClick:()=>ke(q),className:Mt("text-xs px-1.5 py-0.5 rounded",q.is_visible?"text-green-400":"text-gray-600"),title:q.is_visible?"Visible (clic para ocultar)":"Oculto (clic para mostrar)",children:q.is_visible?"●":"○"}),l.jsx("button",{onClick:()=>Y(q),className:"text-red-500 hover:text-red-400 p-0.5 rounded",children:l.jsx(rn,{size:12})})]})]},q.id)})]})]}),l.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:i?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"p-4 border-b border-dark-700 flex items-center justify-between bg-dark-800",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold flex items-center gap-2",children:[(()=>{const q=ef[i.type];return l.jsx(q,{size:16,className:ea[i.type].split(" ")[1]})})(),i.name,l.jsx("span",{className:Mt("text-xs px-2 py-0.5 rounded-full",ea[i.type]),children:ho[i.type]})]}),l.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[d.length," canales asignados"]})]}),l.jsxs("button",{onClick:()=>B(!z),className:"flex items-center gap-2 px-3 py-1.5 bg-primary-500/20 text-primary-400 hover:bg-primary-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(tr,{size:14})," Añadir canales"]})]}),z&&l.jsxs("div",{className:"border-b border-dark-700 bg-dark-900 p-4 space-y-3",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(Kt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{autoFocus:!0,value:m,onChange:q=>h(q.target.value),placeholder:"Buscar canal...",className:"w-full bg-dark-700 border border-dark-600 rounded-lg pl-9 pr-3 py-2 text-sm focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:x,onChange:q=>y(q.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsx("button",{onClick:()=>B(!1),className:"text-gray-500 hover:text-gray-300 p-2",children:l.jsx(On,{size:16})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-1 max-h-48 overflow-y-auto",children:[k.map(q=>{const ge=d.some(D=>D.channel_id===q.id);return l.jsxs("button",{onClick:()=>!ge&&ze(q),disabled:ge,className:Mt("flex items-center gap-2 px-3 py-2 rounded-lg text-left text-sm transition-colors",ge?"opacity-40 cursor-not-allowed bg-dark-700":"bg-dark-700 hover:bg-dark-600 cursor-pointer"),children:[q.logo?l.jsx("img",{src:q.logo,alt:"",className:"w-6 h-6 object-contain rounded",onError:D=>D.currentTarget.style.display="none"}):l.jsx("div",{className:"w-6 h-6 bg-dark-600 rounded"}),l.jsx("span",{className:"truncate flex-1",children:q.name}),ge&&l.jsx("span",{className:"text-xs text-green-500",children:"✓"})]},q.id)}),k.length===0&&(m||x)&&l.jsx("p",{className:"col-span-2 text-xs text-gray-500 text-center py-4",children:"Sin resultados"})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d.length===0?l.jsxs("div",{className:"text-center py-16 text-gray-500",children:[l.jsx("p",{children:"Esta categoría está vacía."}),l.jsx("p",{className:"text-xs mt-1",children:'Usa "Añadir canales" para añadir contenido.'})]}):l.jsx("div",{className:"grid grid-cols-1 gap-1",children:d.map((q,ge)=>l.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg bg-dark-800 hover:bg-dark-700 group transition-colors",children:[l.jsx("span",{className:"text-xs text-gray-600 w-6 text-right",children:ge+1}),q.logo?l.jsx("img",{src:q.logo,alt:"",className:"w-8 h-8 object-contain rounded",onError:D=>D.currentTarget.style.display="none"}):l.jsx("div",{className:"w-8 h-8 bg-dark-600 rounded"}),l.jsx("span",{className:"flex-1 text-sm",children:q.name}),l.jsx("span",{className:Mt("text-xs px-1.5 py-0.5 rounded",ea[q.type]||"bg-gray-700 text-gray-400"),children:ho[q.type]||q.type}),l.jsx("button",{onClick:()=>Ee(q),className:"opacity-0 group-hover:opacity-100 text-red-500 hover:text-red-400 p-1 transition-all",children:l.jsx(On,{size:14})})]},q.item_id))})})]}):l.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:l.jsxs("div",{className:"text-center",children:[l.jsx(Pn,{size:40,className:"mx-auto mb-3 text-gray-700"}),l.jsx("p",{children:"Selecciona una categoría para gestionar sus canales"})]})})})]})}function xo(s){return s>=1e9?(s/1e9).toFixed(2)+" GB":s>=1e6?(s/1e6).toFixed(1)+" MB":s>=1e3?(s/1e3).toFixed(0)+" KB":s+" B"}function Ro(s){return s?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m ${s%60}s`:`${Math.floor(s/3600)}h ${Math.floor(s%3600/60)}m`:"—"}function Wf(s){return s?new Date(s).toLocaleString("es-ES",{dateStyle:"short",timeStyle:"short"}):"—"}const Dg={live:"bg-blue-500/20 text-blue-400",movie:"bg-purple-500/20 text-purple-400",series:"bg-orange-500/20 text-orange-400"},Fg={live:"Directo",movie:"Película",series:"Serie"};function Zn({icon:s,label:a,value:i,color:u}){return l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4 flex items-center gap-3",children:[l.jsx(s,{size:20,className:u}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-gray-500",children:a}),l.jsx("p",{className:"text-lg font-bold",children:i})]})]})}function Ug(){const[s,a]=v.useState([]),[i,u]=v.useState(null),[d,f]=v.useState(0),[m,h]=v.useState(1),[x,y]=v.useState(!1),[k,C]=v.useState(""),[z,B]=v.useState(""),[L,P]=v.useState(""),[N,A]=v.useState(""),[M,K]=v.useState(""),Q=50,me=v.useCallback(async()=>{try{const{data:Y}=await X.get("/logs/stats");u(Y)}catch{}},[]),fe=v.useCallback(async(Y=1)=>{y(!0);try{const ke={page:Y,limit:Q};k&&(ke.username=k),z&&(ke.channel=z),L&&(ke.content_type=L),N&&(ke.date_from=N),M&&(ke.date_to=M);const{data:Te}=await X.get("/logs",{params:ke});a(Te.items),f(Te.total),h(Y)}finally{y(!1)}},[k,z,L,N,M]);v.useEffect(()=>{me(),fe(1)},[]);const O=()=>{me(),fe(1)},ae=async()=>{confirm("¿Eliminar todos los registros de conexión?")&&(await X.delete("/logs"),a([]),f(0),me())},de=Math.ceil(d/Q);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsxs("button",{onClick:()=>{me(),fe(m)},className:"flex items-center gap-2 px-3 py-1.5 bg-dark-700 hover:bg-dark-600 rounded-lg text-sm transition-colors",children:[l.jsx(Ge,{size:14})," Actualizar"]}),l.jsxs("button",{onClick:ae,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Limpiar todo"]})]}),i&&l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsx(Zn,{icon:So,label:"Total sesiones",value:i.total_sessions.toLocaleString(),color:"text-primary-400"}),l.jsx(Zn,{icon:ch,label:"Datos totales",value:xo(i.total_bytes),color:"text-green-400"}),l.jsx(Zn,{icon:So,label:"Duración media",value:Ro(i.avg_duration_seconds),color:"text-yellow-400"}),l.jsx(Zn,{icon:aa,label:"Usuarios únicos",value:i.unique_users.toString(),color:"text-blue-400"})]}),i&&l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4",children:[l.jsxs("h3",{className:"text-sm font-semibold mb-3 text-gray-300 flex items-center gap-2",children:[l.jsx(aa,{size:14})," Top usuarios"]}),l.jsxs("div",{className:"space-y-2",children:[i.top_users.map((Y,ke)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"text-gray-600 w-4",children:ke+1}),l.jsx("span",{className:"flex-1 text-gray-200 font-medium",children:Y.username}),l.jsxs("span",{className:"text-gray-400",children:[Y.sessions," sesiones"]}),l.jsx("span",{className:"text-green-400 text-xs",children:xo(Y.bytes)})]},Y.username)),i.top_users.length===0&&l.jsx("p",{className:"text-xs text-gray-600",children:"Sin datos"})]})]}),l.jsxs("div",{className:"bg-dark-800 rounded-xl p-4",children:[l.jsxs("h3",{className:"text-sm font-semibold mb-3 text-gray-300 flex items-center gap-2",children:[l.jsx(Tr,{size:14})," Top canales/contenido"]}),l.jsxs("div",{className:"space-y-2",children:[i.top_channels.map((Y,ke)=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"text-gray-600 w-4",children:ke+1}),l.jsx("span",{className:"flex-1 text-gray-200 truncate",children:Y.channel_name}),l.jsx("span",{className:"text-gray-400",children:Y.sessions})]},Y.channel_name)),i.top_channels.length===0&&l.jsx("p",{className:"text-xs text-gray-600",children:"Sin datos"})]})]})]}),l.jsx("div",{className:"bg-dark-800 rounded-xl p-4",children:l.jsxs("div",{className:"flex flex-wrap gap-2 items-end",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:k,onChange:Y=>C(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&O(),placeholder:"Usuario",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-36 focus:outline-none focus:border-primary-500"})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:z,onChange:Y=>B(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&O(),placeholder:"Canal / película",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-48 focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:L,onChange:Y=>P(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los tipos"}),l.jsx("option",{value:"live",children:"Directo"}),l.jsx("option",{value:"movie",children:"Película"}),l.jsx("option",{value:"series",children:"Serie"})]}),l.jsx("input",{type:"date",value:N,onChange:Y=>A(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsx("span",{className:"text-gray-500 text-sm",children:"→"}),l.jsx("input",{type:"date",value:M,onChange:Y=>K(Y.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsxs("button",{onClick:O,className:"flex items-center gap-2 px-4 py-1.5 bg-primary-500 hover:bg-primary-600 rounded-lg text-sm transition-colors",children:[l.jsx(Kt,{size:13})," Buscar"]})]})}),l.jsxs("div",{className:"bg-dark-800 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-700",children:[l.jsxs("span",{className:"text-sm text-gray-400",children:[d.toLocaleString()," registros"]}),de>1&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("button",{onClick:()=>fe(m-1),disabled:m===1,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"←"}),l.jsxs("span",{className:"text-gray-400",children:[m," / ",de]}),l.jsx("button",{onClick:()=>fe(m+1),disabled:m===de,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"→"})]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"text-left px-4 py-2",children:"Usuario"}),l.jsx("th",{className:"text-left px-4 py-2",children:"IP"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Canal / Contenido"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Inicio"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Duración"}),l.jsx("th",{className:"text-right px-4 py-2",children:"Datos"})]})}),l.jsxs("tbody",{children:[x&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"Cargando..."})}),!x&&s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"No hay registros"})}),s.map(Y=>l.jsxs("tr",{className:"border-b border-dark-700/50 hover:bg-dark-700/30 transition-colors",children:[l.jsx("td",{className:"px-4 py-2 font-medium text-gray-200",children:Y.username}),l.jsx("td",{className:"px-4 py-2 text-gray-400 font-mono text-xs",children:Y.client_ip||"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-300 max-w-xs truncate",children:Y.channel_name||Y.stream_id||"—"}),l.jsx("td",{className:"px-4 py-2",children:Y.content_type?l.jsx("span",{className:Mt("text-xs px-2 py-0.5 rounded-full",Dg[Y.content_type]||"bg-gray-700 text-gray-400"),children:Fg[Y.content_type]||Y.content_type}):"—"}),l.jsx("td",{className:"px-4 py-2 text-gray-400 text-xs",children:Wf(Y.started_at)}),l.jsx("td",{className:"px-4 py-2 text-gray-400",children:Ro(Y.duration_seconds)}),l.jsx("td",{className:"px-4 py-2 text-right text-green-400 text-xs",children:xo(Y.bytes_transferred)})]},Y.id))]})]})})]})]})}function Mg(){const[s,a]=v.useState([]),[i,u]=v.useState(0),[d,f]=v.useState(1),[m,h]=v.useState(!1),[x,y]=v.useState(""),[k,C]=v.useState(""),[z,B]=v.useState(""),[L,P]=v.useState(""),N=50,A=v.useCallback(async(O=1)=>{h(!0);try{const ae={page:O,limit:N};x&&(ae.channel=x),k&&(ae.event_type=k),z&&(ae.date_from=z),L&&(ae.date_to=L);const{data:de}=await X.get("/logs/events",{params:ae});a(de.items),u(de.total),f(O)}finally{h(!1)}},[x,k,z,L]);v.useEffect(()=>{A(1)},[]);const M=()=>A(1),K=async()=>{confirm("¿Eliminar todos los registros de fallos?")&&(await X.delete("/logs/events"),a([]),u(0))},Q=Math.ceil(i/N),me=s.filter(O=>O.event_type==="caida").length,fe=s.filter(O=>O.event_type==="recuperado").length;return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsxs("button",{onClick:()=>A(d),className:"flex items-center gap-2 px-3 py-1.5 bg-dark-700 hover:bg-dark-600 rounded-lg text-sm transition-colors",children:[l.jsx(Ge,{size:14})," Actualizar"]}),l.jsxs("button",{onClick:K,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Limpiar todo"]})]}),l.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:[l.jsx(Zn,{icon:Ln,label:"Total fallos registrados",value:i.toLocaleString(),color:"text-orange-400"}),l.jsx(Zn,{icon:Ln,label:"Caídas (en vista actual)",value:me.toString(),color:"text-red-400"}),l.jsx(Zn,{icon:Dd,label:"Recuperaciones (en vista actual)",value:fe.toString(),color:"text-emerald-400"})]}),l.jsx("div",{className:"bg-dark-800 rounded-xl p-4",children:l.jsxs("div",{className:"flex flex-wrap gap-2 items-end",children:[l.jsxs("div",{className:"relative",children:[l.jsx(Kt,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-500"}),l.jsx("input",{value:x,onChange:O=>y(O.target.value),onKeyDown:O=>O.key==="Enter"&&M(),placeholder:"Canal / proveedor",className:"bg-dark-700 border border-dark-600 rounded-lg pl-8 pr-3 py-1.5 text-sm w-48 focus:outline-none focus:border-primary-500"})]}),l.jsxs("select",{value:k,onChange:O=>C(O.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none",children:[l.jsx("option",{value:"",children:"Todos los eventos"}),l.jsx("option",{value:"caida",children:"Caídas"}),l.jsx("option",{value:"recuperado",children:"Recuperaciones"})]}),l.jsx("input",{type:"date",value:z,onChange:O=>B(O.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsx("span",{className:"text-gray-500 text-sm",children:"→"}),l.jsx("input",{type:"date",value:L,onChange:O=>P(O.target.value),className:"bg-dark-700 border border-dark-600 rounded-lg px-3 py-1.5 text-sm focus:outline-none"}),l.jsxs("button",{onClick:M,className:"flex items-center gap-2 px-4 py-1.5 bg-primary-500 hover:bg-primary-600 rounded-lg text-sm transition-colors",children:[l.jsx(Kt,{size:13})," Buscar"]})]})}),l.jsxs("div",{className:"bg-dark-800 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-700",children:[l.jsxs("span",{className:"text-sm text-gray-400",children:[i.toLocaleString()," eventos"]}),Q>1&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx("button",{onClick:()=>A(d-1),disabled:d===1,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"←"}),l.jsxs("span",{className:"text-gray-400",children:[d," / ",Q]}),l.jsx("button",{onClick:()=>A(d+1),disabled:d===Q,className:"px-2 py-1 bg-dark-700 rounded disabled:opacity-40",children:"→"})]})]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-xs text-gray-500 border-b border-dark-700",children:[l.jsx("th",{className:"text-left px-4 py-2",children:"Fecha"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Tipo"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Canal"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Proveedor · Dominio"}),l.jsx("th",{className:"text-left px-4 py-2",children:"Causa"}),l.jsx("th",{className:"text-left px-4 py-2 whitespace-nowrap",title:"Para caídas: tiempo que duró ffmpeg antes de fallar. Para recuperados: duración total de la interrupción.",children:"Duración fallo"}),l.jsx("th",{className:"text-right px-4 py-2",title:"Número de intentos fallidos antes de recuperar (solo en recuperados)",children:"Intentos"})]})}),l.jsxs("tbody",{children:[m&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"Cargando..."})}),!m&&s.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:"Sin fallos registrados — los errores reales del proveedor aparecerán aquí automáticamente"})}),s.map(O=>l.jsxs("tr",{className:`border-b border-dark-700/50 hover:bg-dark-700/30 transition-colors ${O.event_type==="caida"?"bg-red-950/10":O.event_type==="recuperado"?"bg-emerald-950/10":""}`,children:[l.jsx("td",{className:"px-4 py-2.5 text-gray-400 text-xs whitespace-nowrap",children:Wf(O.created_at)}),l.jsx("td",{className:"px-4 py-2.5",children:O.event_type==="caida"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-red-500/20 text-red-400 border border-red-800/50",children:[l.jsx(Ln,{size:10})," Caída"]}):O.event_type==="recuperado"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400 border border-emerald-800/50",children:[l.jsx(Dd,{size:10})," Recuperado"]}):l.jsx("span",{className:"text-xs text-gray-400",children:O.event_type})}),l.jsx("td",{className:"px-4 py-2.5 text-gray-200 max-w-[180px] truncate text-xs",title:O.channel_name??"",children:O.channel_name||(O.channel_id?`#${O.channel_id}`:"—")}),l.jsxs("td",{className:"px-4 py-2.5 text-xs",children:[l.jsx("span",{className:"text-gray-400",children:O.provider_name||"—"}),O.domain&&l.jsx("span",{className:"block text-gray-600 font-mono text-[10px]",children:O.domain})]}),l.jsx("td",{className:"px-4 py-2.5 text-gray-300 text-xs max-w-[260px]",title:O.error_message??"",children:O.error_message||"—"}),l.jsx("td",{className:"px-4 py-2.5 text-xs tabular-nums",children:O.pump_duration_secs!=null?l.jsx("span",{className:O.event_type==="caida"?"text-red-400":"text-emerald-400",children:Ro(O.pump_duration_secs)}):"—"}),l.jsx("td",{className:"px-4 py-2.5 text-right text-gray-500 text-xs tabular-nums",children:O.attempt_number??"—"})]},O.id))]})]})})]})]})}function Ig(){const[s,a]=v.useState("connections");return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsx("div",{className:"flex items-center justify-between",children:l.jsx("h1",{className:"text-xl font-bold",children:"Registro"})}),l.jsxs("div",{className:"flex gap-1 border-b border-dark-700 pb-0",children:[l.jsx("button",{onClick:()=>a("connections"),className:Mt("px-4 py-2 text-sm font-medium rounded-t-lg transition-colors border-b-2 -mb-px",s==="connections"?"border-primary-500 text-primary-400 bg-dark-800":"border-transparent text-gray-500 hover:text-gray-300"),children:"Conexiones de usuarios"}),l.jsxs("button",{onClick:()=>a("events"),className:Mt("px-4 py-2 text-sm font-medium rounded-t-lg transition-colors border-b-2 -mb-px flex items-center gap-1.5",s==="events"?"border-red-500 text-red-400 bg-dark-800":"border-transparent text-gray-500 hover:text-gray-300"),children:[l.jsx(Ln,{size:13})," Fallos de stream"]})]}),s==="connections"&&l.jsx(Ug,{}),s==="events"&&l.jsx(Mg,{})]})}function $g(){const[s,a]=v.useState(!1),[i,u]=v.useState(""),[d,f]=v.useState(!1),[m,h]=v.useState(!1),x=v.useRef(null),y=async()=>{try{const L=localStorage.getItem("token");(await fetch("/api/admin/settings/blocked-image",{headers:{Authorization:`Bearer ${L}`}})).ok?(a(!0),u("/panel/blocked_image.jpg?t="+Date.now())):(a(!1),u(""))}catch{a(!1)}};v.useEffect(()=>{y()},[]);const k=async L=>{var P,N;if(!L.type.startsWith("image/")){alert("Solo se permiten imágenes (JPEG, PNG, WebP, GIF)");return}f(!0);try{const A=new FormData;A.append("file",L),await X.post("/settings/blocked-image",A,{headers:{"Content-Type":"multipart/form-data"}}),await y()}catch(A){alert("Error al subir la imagen: "+(((N=(P=A.response)==null?void 0:P.data)==null?void 0:N.detail)||A.message))}finally{f(!1)}},C=L=>{var N;const P=(N=L.target.files)==null?void 0:N[0];P&&k(P),L.target.value=""},z=L=>{L.preventDefault(),h(!1);const P=L.dataTransfer.files[0];P&&k(P)},B=async()=>{confirm("¿Eliminar la imagen de bloqueo?")&&(await X.delete("/settings/blocked-image"),a(!1),u(""))};return l.jsxs("div",{className:"p-6 max-w-2xl space-y-6",children:[l.jsx("h1",{className:"text-xl font-bold",children:"Ajustes"}),l.jsxs("div",{className:"bg-dark-800 rounded-xl p-6 space-y-4",children:[l.jsxs("div",{children:[l.jsxs("h2",{className:"font-semibold text-base flex items-center gap-2",children:[l.jsx(dh,{size:18,className:"text-primary-400"}),"Imagen de conexión bloqueada"]}),l.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Esta imagen se mostrará como canal de vídeo cuando un usuario intente reproducir en un segundo dispositivo habiendo alcanzado su límite de conexiones simultáneas."})]}),l.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-400 bg-blue-500/10 rounded-lg px-3 py-2",children:[l.jsx(fh,{size:13,className:"mt-0.5 shrink-0"}),l.jsx("span",{children:"El zapping normal (cambiar de canal en el mismo dispositivo) sigue funcionando sin interrupciones. La imagen solo aparece cuando se conecta un segundo dispositivo diferente con la misma cuenta."})]}),l.jsxs("div",{onDragOver:L=>{L.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:z,onClick:()=>{var L;return!d&&((L=x.current)==null?void 0:L.click())},className:`
|
||
relative border-2 border-dashed rounded-xl cursor-pointer transition-colors
|
||
${m?"border-primary-400 bg-primary-500/10":"border-dark-600 hover:border-dark-500"}
|
||
`,children:[l.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:C}),s&&i?l.jsxs("div",{className:"relative",children:[l.jsx("img",{src:i,alt:"Blocked image",className:"w-full rounded-xl object-contain max-h-72"}),l.jsx("div",{className:"absolute inset-0 bg-black/40 opacity-0 hover:opacity-100 transition-opacity rounded-xl flex items-center justify-center",children:l.jsx("span",{className:"text-white text-sm font-medium",children:"Haz clic para cambiar"})})]}):l.jsxs("div",{className:"py-12 flex flex-col items-center gap-3 text-gray-500",children:[l.jsx(vh,{size:32,className:m?"text-primary-400":""}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"font-medium text-sm",children:"Arrastra una imagen o haz clic para subir"}),l.jsx("p",{className:"text-xs mt-1",children:"JPEG, PNG, WebP o GIF · máx. 10 MB"})]})]}),d&&l.jsx("div",{className:"absolute inset-0 bg-dark-900/80 rounded-xl flex items-center justify-center",children:l.jsx("div",{className:"text-sm text-primary-400",children:"Subiendo..."})})]}),s&&l.jsx("div",{className:"flex justify-end",children:l.jsxs("button",{onClick:B,className:"flex items-center gap-2 px-3 py-1.5 bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded-lg text-sm transition-colors",children:[l.jsx(rn,{size:14})," Eliminar imagen"]})})]})]})}const tf={name:"",url:"http://10.10.10.15:8096",api_key:"c339ccd3b7234c9a874bcfb70e92364a",movies_category_name:"Películas KiraTV",series_category_name:"Series KiraTV",movies_library_id:"",series_library_id:""};function Bg(){const[s,a]=v.useState([]),[i,u]=v.useState(!0),[d,f]=v.useState(!1),[m,h]=v.useState(null),[x,y]=v.useState({...tf}),[k,C]=v.useState(!1),[z,B]=v.useState(null),[L,P]=v.useState(!1),[N,A]=v.useState([]),[M,K]=v.useState(!1),[Q,me]=v.useState({}),[fe,O]=v.useState(null);v.useEffect(()=>{ae()},[]);async function ae(){u(!0);try{const{data:D}=await X.get("/jellyfin");a(D)}finally{u(!1)}}function de(){h(null),y({...tf}),B(null),A([]),f(!0)}function Y(D){h(D.id),y({name:D.name,url:D.url,api_key:D.api_key,movies_category_name:D.movies_category_name,series_category_name:D.series_category_name,movies_library_id:D.movies_library_id??"",series_library_id:D.series_library_id??""}),B(null),A([]),f(!0)}async function ke(){if(!(!x.url||!x.api_key)){P(!0),B(null);try{if(m){const{data:D}=await X.post(`/jellyfin/${m}/test`);B(D)}else{const{data:D}=await X.post("/jellyfin",{name:"__test__",url:x.url,api_key:x.api_key,movies_category_name:x.movies_category_name,series_category_name:x.series_category_name}),{data:U}=await X.post(`/jellyfin/${D.id}/test`);await X.delete(`/jellyfin/${D.id}`),B(U)}}catch{B({ok:!1,error:"Error de red"})}finally{P(!1)}}}async function Te(){if(!m){await ze();return}K(!0);try{const{data:D}=await X.get(`/jellyfin/${m}/libraries`);A(D)}catch{A([])}finally{K(!1)}}async function ze(){C(!0);try{const D={...x,movies_library_id:x.movies_library_id||null,series_library_id:x.series_library_id||null};if(m)await X.put(`/jellyfin/${m}`,D);else{const{data:U}=await X.post("/jellyfin",D);h(U.id)}await ae()}finally{C(!1)}}async function Ee(D){confirm("¿Eliminar esta configuración de Jellyfin? Se borrarán todos los canales sincronizados.")&&(await X.delete(`/jellyfin/${D}`),a(U=>U.filter(ee=>ee.id!==D)),m===D&&f(!1))}async function q(D){me(U=>({...U,[D]:{status:"running",message:"Iniciando…",synced:0}})),await X.post(`/jellyfin/${D}/sync`),ge(D)}function ge(D){const U=setInterval(async()=>{try{const{data:ee}=await X.get(`/jellyfin/${D}/sync-status`);me(G=>({...G,[D]:ee})),ee.status!=="running"&&(clearInterval(U),ee.status==="done"&&ae())}catch{clearInterval(U)}},1500)}return N.filter(D=>D.type==="movies"||D.type===""),N.filter(D=>D.type==="tvshows"||D.type===""),l.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Biblioteca Jellyfin"}),l.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Integra tu catálogo local de Jellyfin como VOD y Series en KiraStream"})]}),l.jsxs("button",{onClick:de,className:"flex items-center gap-2 bg-primary-600 hover:bg-primary-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors",children:[l.jsx(tr,{size:16})," Nueva conexión"]})]}),i?l.jsx("div",{className:"flex justify-center py-12",children:l.jsx(Xl,{size:24,className:"animate-spin text-gray-400"})}):s.length===0?l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl p-12 text-center text-gray-500",children:[l.jsx(Yn,{size:36,className:"mx-auto mb-3 opacity-30"}),l.jsx("p",{className:"text-sm",children:"No hay conexiones Jellyfin configuradas"}),l.jsx("button",{onClick:de,className:"mt-4 text-primary-400 hover:text-primary-300 text-sm",children:"+ Añadir primera conexión"})]}):l.jsx("div",{className:"space-y-4",children:s.map(D=>{const U=Q[D.id];return l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"flex items-center gap-4 p-4",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-900/30 flex items-center justify-center shrink-0",children:l.jsx(Yn,{size:20,className:"text-purple-400"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium",children:D.name}),l.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${D.is_active?"bg-green-900/30 text-green-400":"bg-gray-700 text-gray-400"}`,children:D.is_active?"activo":"inactivo"})]}),l.jsx("div",{className:"text-xs text-gray-500 mt-0.5 truncate",children:D.url}),l.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:[D.item_count," elementos",D.last_sync_at&&` · Última sync: ${new Date(D.last_sync_at).toLocaleString("es-ES")}`]})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[(U==null?void 0:U.status)==="running"?l.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-400",children:[l.jsx(Ge,{size:12,className:"animate-spin"})," ",U.message]}):l.jsxs("button",{onClick:()=>q(D.id),className:"flex items-center gap-1.5 text-xs bg-dark-700 hover:bg-primary-600 text-gray-300 hover:text-white px-3 py-1.5 rounded-lg transition-colors",children:[l.jsx(Ge,{size:12})," Sincronizar"]}),l.jsx("button",{onClick:()=>Y(D),className:"text-gray-500 hover:text-primary-400 p-1.5 rounded transition-colors",title:"Editar",children:l.jsx(hh,{size:14})}),l.jsx("button",{onClick:()=>Ee(D.id),className:"text-gray-500 hover:text-red-400 p-1.5 rounded transition-colors",title:"Eliminar",children:l.jsx(rn,{size:14})}),l.jsx("button",{onClick:()=>O(fe===D.id?null:D.id),className:"text-gray-500 hover:text-gray-300 p-1.5 rounded transition-colors",children:fe===D.id?l.jsx(uh,{size:14}):l.jsx(ko,{size:14})})]})]}),(U==null?void 0:U.status)==="done"&&l.jsxs("div",{className:"px-4 pb-3 text-xs text-green-400 flex items-center gap-1",children:[l.jsx(oo,{size:12})," ",U.message," · ",U.synced," elementos importados"]}),(U==null?void 0:U.status)==="error"&&l.jsxs("div",{className:"px-4 pb-3 text-xs text-red-400 flex items-center gap-1",children:[l.jsx(On,{size:12})," Error: ",U.message]}),fe===D.id&&l.jsxs("div",{className:"px-4 pb-4 border-t border-dark-700 pt-3 grid grid-cols-2 gap-4 text-xs text-gray-400",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1 text-purple-400 font-medium",children:[l.jsx(Yn,{size:12})," Películas"]}),l.jsxs("div",{children:["Categoría: ",l.jsx("span",{className:"text-gray-300",children:D.movies_category_name})]}),l.jsxs("div",{children:["Biblioteca: ",l.jsx("span",{className:"text-gray-300",children:D.movies_library_id||"—"})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1 text-blue-400 font-medium",children:[l.jsx(Tr,{size:12})," Series"]}),l.jsxs("div",{children:["Categoría: ",l.jsx("span",{className:"text-gray-300",children:D.series_category_name})]}),l.jsxs("div",{children:["Biblioteca: ",l.jsx("span",{className:"text-gray-300",children:D.series_library_id||"—"})]})]})]})]},D.id)})}),d&&l.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",children:l.jsxs("div",{className:"bg-dark-800 border border-dark-700 rounded-xl w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-dark-700",children:[l.jsx("h2",{className:"font-semibold",children:m?"Editar conexión":"Nueva conexión Jellyfin"}),l.jsx("button",{onClick:()=>f(!1),className:"text-gray-500 hover:text-white",children:l.jsx(On,{size:16})})]}),l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.name,onChange:D=>y(U=>({...U,name:D.target.value})),placeholder:"Mi Jellyfin"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"URL del servidor"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono",value:x.url,onChange:D=>y(U=>({...U,url:D.target.value})),placeholder:"http://192.168.1.x:8096"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"API Key"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono",value:x.api_key,onChange:D=>y(U=>({...U,api_key:D.target.value})),placeholder:"Tu API key de Jellyfin"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{onClick:ke,disabled:L||!x.url||!x.api_key,className:"flex items-center gap-1.5 bg-dark-700 hover:bg-dark-600 text-sm px-3 py-2 rounded-lg transition-colors disabled:opacity-50",children:[L?l.jsx(Xl,{size:14,className:"animate-spin"}):l.jsx(oo,{size:14}),"Probar conexión"]}),z&&l.jsx("span",{className:`text-xs flex items-center gap-1 ${z.ok?"text-green-400":"text-red-400"}`,children:z.ok?l.jsxs(l.Fragment,{children:[l.jsx(oo,{size:12})," ",z.server_name]}):l.jsxs(l.Fragment,{children:[l.jsx(On,{size:12})," ",z.error]})})]}),l.jsx("hr",{className:"border-dark-600"}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs text-gray-400 font-medium uppercase tracking-wider",children:"Bibliotecas"}),l.jsxs("button",{onClick:Te,disabled:M,className:"flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300 transition-colors disabled:opacity-50",children:[M?l.jsx(Xl,{size:11,className:"animate-spin"}):l.jsx(Ge,{size:11}),m?"Cargar bibliotecas":"Guardar primero para cargar"]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsxs("label",{className:"text-xs text-gray-400 mb-1 block flex items-center gap-1",children:[l.jsx(Yn,{size:11})," Biblioteca de Películas"]}),N.length>0?l.jsxs("select",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.movies_library_id,onChange:D=>y(U=>({...U,movies_library_id:D.target.value})),children:[l.jsx("option",{value:"",children:"— ninguna —"}),N.map(D=>l.jsxs("option",{value:D.id,children:[D.name," (",D.type||"sin tipo",")"]},D.id))]}):l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono text-xs",value:x.movies_library_id,onChange:D=>y(U=>({...U,movies_library_id:D.target.value})),placeholder:"ID de biblioteca"})]}),l.jsxs("div",{children:[l.jsxs("label",{className:"text-xs text-gray-400 mb-1 block flex items-center gap-1",children:[l.jsx(Tr,{size:11})," Biblioteca de Series"]}),N.length>0?l.jsxs("select",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.series_library_id,onChange:D=>y(U=>({...U,series_library_id:D.target.value})),children:[l.jsx("option",{value:"",children:"— ninguna —"}),N.map(D=>l.jsxs("option",{value:D.id,children:[D.name," (",D.type||"sin tipo",")"]},D.id))]}):l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm font-mono text-xs",value:x.series_library_id,onChange:D=>y(U=>({...U,series_library_id:D.target.value})),placeholder:"ID de biblioteca"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre categoría Películas"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.movies_category_name,onChange:D=>y(U=>({...U,movies_category_name:D.target.value}))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-gray-400 mb-1 block",children:"Nombre categoría Series"}),l.jsx("input",{className:"w-full bg-dark-700 border border-dark-600 rounded-lg px-3 py-2 text-sm",value:x.series_category_name,onChange:D=>y(U=>({...U,series_category_name:D.target.value}))})]})]})]}),l.jsxs("div",{className:"flex justify-end gap-3 p-4 border-t border-dark-700",children:[l.jsx("button",{onClick:()=>f(!1),className:"px-4 py-2 text-sm text-gray-400 hover:text-white",children:"Cancelar"}),l.jsxs("button",{onClick:async()=>{await ze(),f(!1)},disabled:k||!x.name||!x.url||!x.api_key,className:"flex items-center gap-2 bg-primary-600 hover:bg-primary-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition-colors disabled:opacity-50",children:[k&&l.jsx(Xl,{size:14,className:"animate-spin"}),m?"Guardar cambios":"Crear"]})]})]})})]})}function Vg({children:s}){return localStorage.getItem("token")?l.jsx(l.Fragment,{children:s}):l.jsx(vo,{to:"/login",replace:!0})}function Hg(){return l.jsx(Y0,{basename:"/panel",children:l.jsxs(V0,{children:[l.jsx(yt,{path:"/login",element:l.jsx(cg,{})}),l.jsxs(yt,{path:"/",element:l.jsx(Vg,{children:l.jsx(mg,{})}),children:[l.jsx(yt,{index:!0,element:l.jsx(vo,{to:"/dashboard",replace:!0})}),l.jsx(yt,{path:"dashboard",element:l.jsx(bg,{})}),l.jsx(yt,{path:"providers",element:l.jsx(Eg,{})}),l.jsx(yt,{path:"users",element:l.jsx(Rg,{})}),l.jsx(yt,{path:"catalogs",element:l.jsx(Og,{})}),l.jsx(yt,{path:"custom-categories",element:l.jsx(Ag,{})}),l.jsx(yt,{path:"epg",element:l.jsx(zg,{})}),l.jsx(yt,{path:"logs",element:l.jsx(Ig,{})}),l.jsx(yt,{path:"settings",element:l.jsx($g,{})}),l.jsx(yt,{path:"jellyfin",element:l.jsx(Bg,{})})]}),l.jsx(yt,{path:"*",element:l.jsx(vo,{to:"/dashboard",replace:!0})})]})})}Gm.createRoot(document.getElementById("root")).render(l.jsx(rf.StrictMode,{children:l.jsx(Hg,{})}));
|