Files
GithubStarsManager/dist/assets/index-Dnv_KkUR.js
2025-06-29 18:44:08 +08:00

507 lines
288 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function Ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi={exports:{}},La={},Yi={exports:{}},H={};/**
* @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 Cr=Symbol.for("react.element"),wd=Symbol.for("react.portal"),kd=Symbol.for("react.fragment"),bd=Symbol.for("react.strict_mode"),Sd=Symbol.for("react.profiler"),Nd=Symbol.for("react.provider"),jd=Symbol.for("react.context"),Cd=Symbol.for("react.forward_ref"),Ed=Symbol.for("react.suspense"),Ad=Symbol.for("react.memo"),_d=Symbol.for("react.lazy"),So=Symbol.iterator;function Pd(e){return e===null||typeof e!="object"?null:(e=So&&e[So]||e["@@iterator"],typeof e=="function"?e:null)}var Xi={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ji=Object.assign,Zi={};function Mn(e,t,n){this.props=e,this.context=t,this.refs=Zi,this.updater=n||Xi}Mn.prototype.isReactComponent={};Mn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Mn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function eu(){}eu.prototype=Mn.prototype;function Nl(e,t,n){this.props=e,this.context=t,this.refs=Zi,this.updater=n||Xi}var jl=Nl.prototype=new eu;jl.constructor=Nl;Ji(jl,Mn.prototype);jl.isPureReactComponent=!0;var No=Array.isArray,tu=Object.prototype.hasOwnProperty,Cl={current:null},nu={key:!0,ref:!0,__self:!0,__source:!0};function ru(e,t,n){var r,a={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)tu.call(t,r)&&!nu.hasOwnProperty(r)&&(a[r]=t[r]);var i=arguments.length-2;if(i===1)a.children=n;else if(1<i){for(var u=Array(i),d=0;d<i;d++)u[d]=arguments[d+2];a.children=u}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)a[r]===void 0&&(a[r]=i[r]);return{$$typeof:Cr,type:e,key:s,ref:l,props:a,_owner:Cl.current}}function zd(e,t){return{$$typeof:Cr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function El(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cr}function Dd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var jo=/\/+/g;function rs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Dd(""+e.key):t.toString(36)}function Zr(e,t,n,r,a){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Cr:case wd:l=!0}}if(l)return l=e,a=a(l),e=r===""?"."+rs(l,0):r,No(a)?(n="",e!=null&&(n=e.replace(jo,"$&/")+"/"),Zr(a,t,n,"",function(d){return d})):a!=null&&(El(a)&&(a=zd(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(jo,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=r===""?".":r+":",No(e))for(var i=0;i<e.length;i++){s=e[i];var u=r+rs(s,i);l+=Zr(s,t,n,u,a)}else if(u=Pd(e),typeof u=="function")for(e=u.call(e),i=0;!(s=e.next()).done;)s=s.value,u=r+rs(s,i++),l+=Zr(s,t,n,u,a);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Rr(e,t,n){if(e==null)return e;var r=[],a=0;return Zr(e,r,"","",function(s){return t.call(n,s,a++)}),r}function Md(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ze={current:null},ea={transition:null},Rd={ReactCurrentDispatcher:ze,ReactCurrentBatchConfig:ea,ReactCurrentOwner:Cl};function au(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:Rr,forEach:function(e,t,n){Rr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rr(e,function(){t++}),t},toArray:function(e){return Rr(e,function(t){return t})||[]},only:function(e){if(!El(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Mn;H.Fragment=kd;H.Profiler=Sd;H.PureComponent=Nl;H.StrictMode=bd;H.Suspense=Ed;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rd;H.act=au;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ji({},e.props),a=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=Cl.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(u in t)tu.call(t,u)&&!nu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&i!==void 0?i[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){i=Array(u);for(var d=0;d<u;d++)i[d]=arguments[d+2];r.children=i}return{$$typeof:Cr,type:e.type,key:a,ref:s,props:r,_owner:l}};H.createContext=function(e){return e={$$typeof:jd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Nd,_context:e},e.Consumer=e};H.createElement=ru;H.createFactory=function(e){var t=ru.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Cd,render:e}};H.isValidElement=El;H.lazy=function(e){return{$$typeof:_d,_payload:{_status:-1,_result:e},_init:Md}};H.memo=function(e,t){return{$$typeof:Ad,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=ea.transition;ea.transition={};try{e()}finally{ea.transition=t}};H.unstable_act=au;H.useCallback=function(e,t){return ze.current.useCallback(e,t)};H.useContext=function(e){return ze.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return ze.current.useDeferredValue(e)};H.useEffect=function(e,t){return ze.current.useEffect(e,t)};H.useId=function(){return ze.current.useId()};H.useImperativeHandle=function(e,t,n){return ze.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return ze.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return ze.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return ze.current.useMemo(e,t)};H.useReducer=function(e,t,n){return ze.current.useReducer(e,t,n)};H.useRef=function(e){return ze.current.useRef(e)};H.useState=function(e){return ze.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return ze.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return ze.current.useTransition()};H.version="18.3.1";Yi.exports=H;var W=Yi.exports;const Td=Ki(W);/**
* @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 Id=W,Ld=Symbol.for("react.element"),$d=Symbol.for("react.fragment"),Od=Object.prototype.hasOwnProperty,Fd=Id.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wd={key:!0,ref:!0,__self:!0,__source:!0};function su(e,t,n){var r,a={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Od.call(t,r)&&!Wd.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:Ld,type:e,key:s,ref:l,props:a,_owner:Fd.current}}La.Fragment=$d;La.jsx=su;La.jsxs=su;qi.exports=La;var o=qi.exports,lu={exports:{}},Ue={},ou={exports:{}},iu={};/**
* @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.
*/(function(e){function t(y,E){var A=y.length;y.push(E);e:for(;0<A;){var z=A-1>>>1,w=y[z];if(0<a(w,E))y[z]=E,y[A]=w,A=z;else break e}}function n(y){return y.length===0?null:y[0]}function r(y){if(y.length===0)return null;var E=y[0],A=y.pop();if(A!==E){y[0]=A;e:for(var z=0,w=y.length,T=w>>>1;z<T;){var O=2*(z+1)-1,Q=y[O],G=O+1,ne=y[G];if(0>a(Q,A))G<w&&0>a(ne,Q)?(y[z]=ne,y[G]=A,z=G):(y[z]=Q,y[O]=A,z=O);else if(G<w&&0>a(ne,A))y[z]=ne,y[G]=A,z=G;else break e}}return E}function a(y,E){var A=y.sortIndex-E.sortIndex;return A!==0?A:y.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,i=l.now();e.unstable_now=function(){return l.now()-i}}var u=[],d=[],g=1,h=null,m=3,v=!1,k=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(y){for(var E=n(d);E!==null;){if(E.callback===null)r(d);else if(E.startTime<=y)r(d),E.sortIndex=E.expirationTime,t(u,E);else break;E=n(d)}}function b(y){if(x=!1,p(y),!k)if(n(u)!==null)k=!0,V(P);else{var E=n(d);E!==null&&U(b,E.startTime-y)}}function P(y,E){k=!1,x&&(x=!1,f(R),R=-1),v=!0;var A=m;try{for(p(E),h=n(u);h!==null&&(!(h.expirationTime>E)||y&&!q());){var z=h.callback;if(typeof z=="function"){h.callback=null,m=h.priorityLevel;var w=z(h.expirationTime<=E);E=e.unstable_now(),typeof w=="function"?h.callback=w:h===n(u)&&r(u),p(E)}else r(u);h=n(u)}if(h!==null)var T=!0;else{var O=n(d);O!==null&&U(b,O.startTime-E),T=!1}return T}finally{h=null,m=A,v=!1}}var j=!1,N=null,R=-1,$=5,D=-1;function q(){return!(e.unstable_now()-D<$)}function Y(){if(N!==null){var y=e.unstable_now();D=y;var E=!0;try{E=N(!0,y)}finally{E?ue():(j=!1,N=null)}}else j=!1}var ue;if(typeof c=="function")ue=function(){c(Y)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ce=pe.port2;pe.port1.onmessage=Y,ue=function(){ce.postMessage(null)}}else ue=function(){_(Y,0)};function V(y){N=y,j||(j=!0,ue())}function U(y,E){R=_(function(){y(e.unstable_now())},E)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(y){y.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,V(P))},e.unstable_forceFrameRate=function(y){0>y||125<y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<y?Math.floor(1e3/y):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(y){switch(m){case 1:case 2:case 3:var E=3;break;default:E=m}var A=m;m=E;try{return y()}finally{m=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(y,E){switch(y){case 1:case 2:case 3:case 4:case 5:break;default:y=3}var A=m;m=y;try{return E()}finally{m=A}},e.unstable_scheduleCallback=function(y,E,A){var z=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?z+A:z):A=z,y){case 1:var w=-1;break;case 2:w=250;break;case 5:w=1073741823;break;case 4:w=1e4;break;default:w=5e3}return w=A+w,y={id:g++,callback:E,priorityLevel:y,startTime:A,expirationTime:w,sortIndex:-1},A>z?(y.sortIndex=A,t(d,y),n(u)===null&&y===n(d)&&(x?(f(R),R=-1):x=!0,U(b,A-z))):(y.sortIndex=w,t(u,y),k||v||(k=!0,V(P))),y},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(y){var E=m;return function(){var A=m;m=E;try{return y.apply(this,arguments)}finally{m=A}}}})(iu);ou.exports=iu;var Vd=ou.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 Ud=W,Ve=Vd;function C(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 uu=new Set,or={};function nn(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(or[e]=t,e=0;e<t.length;e++)uu.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zs=Object.prototype.hasOwnProperty,Hd=/^[: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]*$/,Co={},Eo={};function Bd(e){return zs.call(Eo,e)?!0:zs.call(Co,e)?!1:Hd.test(e)?Eo[e]=!0:(Co[e]=!0,!1)}function Qd(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 Gd(e,t,n,r){if(t===null||typeof t>"u"||Qd(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 De(e,t,n,r,a,s,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=l}var Se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Se[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Se[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Se[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Se[e]=new De(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){Se[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Se[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Se[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Se[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Se[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Al=/[\-:]([a-z])/g;function _l(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(Al,_l);Se[t]=new De(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(Al,_l);Se[t]=new De(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(Al,_l);Se[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Se[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Se.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Se[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pl(e,t,n,r){var a=Se.hasOwnProperty(t)?Se[t]:null;(a!==null?a.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gd(t,n,a,r)&&(n=null),r||a===null?Bd(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=n===null?a.type===3?!1:"":n:(t=a.attributeName,r=a.attributeNamespace,n===null?e.removeAttribute(t):(a=a.type,n=a===3||a===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var wt=Ud.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tr=Symbol.for("react.element"),ln=Symbol.for("react.portal"),on=Symbol.for("react.fragment"),zl=Symbol.for("react.strict_mode"),Ds=Symbol.for("react.profiler"),cu=Symbol.for("react.provider"),du=Symbol.for("react.context"),Dl=Symbol.for("react.forward_ref"),Ms=Symbol.for("react.suspense"),Rs=Symbol.for("react.suspense_list"),Ml=Symbol.for("react.memo"),bt=Symbol.for("react.lazy"),fu=Symbol.for("react.offscreen"),Ao=Symbol.iterator;function $n(e){return e===null||typeof e!="object"?null:(e=Ao&&e[Ao]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,as;function Kn(e){if(as===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);as=t&&t[1]||""}return`
`+as+e}var ss=!1;function ls(e,t){if(!e||ss)return"";ss=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var a=d.stack.split(`
`),s=r.stack.split(`
`),l=a.length-1,i=s.length-1;1<=l&&0<=i&&a[l]!==s[i];)i--;for(;1<=l&&0<=i;l--,i--)if(a[l]!==s[i]){if(l!==1||i!==1)do if(l--,i--,0>i||a[l]!==s[i]){var u=`
`+a[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=i);break}}}finally{ss=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Kn(e):""}function Kd(e){switch(e.tag){case 5:return Kn(e.type);case 16:return Kn("Lazy");case 13:return Kn("Suspense");case 19:return Kn("SuspenseList");case 0:case 2:case 15:return e=ls(e.type,!1),e;case 11:return e=ls(e.type.render,!1),e;case 1:return e=ls(e.type,!0),e;default:return""}}function Ts(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 on:return"Fragment";case ln:return"Portal";case Ds:return"Profiler";case zl:return"StrictMode";case Ms:return"Suspense";case Rs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case du:return(e.displayName||"Context")+".Consumer";case cu:return(e._context.displayName||"Context")+".Provider";case Dl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ml:return t=e.displayName||null,t!==null?t:Ts(e.type)||"Memo";case bt:t=e._payload,e=e._init;try{return Ts(e(t))}catch{}}return null}function qd(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 Ts(t);case 8:return t===zl?"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 It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yd(e){var t=pu(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 a=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ir(e){e._valueTracker||(e._valueTracker=Yd(e))}function mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pa(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 Is(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _o(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=It(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 gu(e,t){t=t.checked,t!=null&&Pl(e,"checked",t,!1)}function Ls(e,t){gu(e,t);var n=It(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")?$s(e,t.type,n):t.hasOwnProperty("defaultValue")&&$s(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Po(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 $s(e,t,n){(t!=="number"||pa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+It(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Os(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(C(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(C(92));if(qn(n)){if(1<n.length)throw Error(C(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:It(n)}}function hu(e,t){var n=It(t.value),r=It(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 Do(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function yu(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 Fs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?yu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Lr,xu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Lr=Lr||document.createElement("div"),Lr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jn={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},Xd=["Webkit","ms","Moz","O"];Object.keys(Jn).forEach(function(e){Xd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jn[t]=Jn[e]})});function vu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jn.hasOwnProperty(e)&&Jn[e]?(""+t).trim():t+"px"}function wu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=vu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var Jd=le({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 Ws(e,t){if(t){if(Jd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Vs(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 Us=null;function Rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hs=null,wn=null,kn=null;function Mo(e){if(e=_r(e)){if(typeof Hs!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Va(t),Hs(e.stateNode,e.type,t))}}function ku(e){wn?kn?kn.push(e):kn=[e]:wn=e}function bu(){if(wn){var e=wn,t=kn;if(kn=wn=null,Mo(e),t)for(e=0;e<t.length;e++)Mo(t[e])}}function Su(e,t){return e(t)}function Nu(){}var os=!1;function ju(e,t,n){if(os)return e(t,n);os=!0;try{return Su(e,t,n)}finally{os=!1,(wn!==null||kn!==null)&&(Nu(),bu())}}function ur(e,t){var n=e.stateNode;if(n===null)return null;var r=Va(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(C(231,t,typeof n));return n}var Bs=!1;if(ht)try{var On={};Object.defineProperty(On,"passive",{get:function(){Bs=!0}}),window.addEventListener("test",On,On),window.removeEventListener("test",On,On)}catch{Bs=!1}function Zd(e,t,n,r,a,s,l,i,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(g){this.onError(g)}}var Zn=!1,ma=null,ga=!1,Qs=null,ef={onError:function(e){Zn=!0,ma=e}};function tf(e,t,n,r,a,s,l,i,u){Zn=!1,ma=null,Zd.apply(ef,arguments)}function nf(e,t,n,r,a,s,l,i,u){if(tf.apply(this,arguments),Zn){if(Zn){var d=ma;Zn=!1,ma=null}else throw Error(C(198));ga||(ga=!0,Qs=d)}}function rn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Cu(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 Ro(e){if(rn(e)!==e)throw Error(C(188))}function rf(e){var t=e.alternate;if(!t){if(t=rn(e),t===null)throw Error(C(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return Ro(a),e;if(s===r)return Ro(a),t;s=s.sibling}throw Error(C(188))}if(n.return!==r.return)n=a,r=s;else{for(var l=!1,i=a.child;i;){if(i===n){l=!0,n=a,r=s;break}if(i===r){l=!0,r=a,n=s;break}i=i.sibling}if(!l){for(i=s.child;i;){if(i===n){l=!0,n=s,r=a;break}if(i===r){l=!0,r=s,n=a;break}i=i.sibling}if(!l)throw Error(C(189))}}if(n.alternate!==r)throw Error(C(190))}if(n.tag!==3)throw Error(C(188));return n.stateNode.current===n?e:t}function Eu(e){return e=rf(e),e!==null?Au(e):null}function Au(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Au(e);if(t!==null)return t;e=e.sibling}return null}var _u=Ve.unstable_scheduleCallback,To=Ve.unstable_cancelCallback,af=Ve.unstable_shouldYield,sf=Ve.unstable_requestPaint,fe=Ve.unstable_now,lf=Ve.unstable_getCurrentPriorityLevel,Tl=Ve.unstable_ImmediatePriority,Pu=Ve.unstable_UserBlockingPriority,ha=Ve.unstable_NormalPriority,of=Ve.unstable_LowPriority,zu=Ve.unstable_IdlePriority,$a=null,it=null;function uf(e){if(it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot($a,e,void 0,(e.current.flags&128)===128)}catch{}}var nt=Math.clz32?Math.clz32:ff,cf=Math.log,df=Math.LN2;function ff(e){return e>>>=0,e===0?32:31-(cf(e)/df|0)|0}var $r=64,Or=4194304;function Yn(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 ya(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var i=l&~a;i!==0?r=Yn(i):(s&=l,s!==0&&(r=Yn(s)))}else l=n&~a,l!==0?r=Yn(l):s!==0&&(r=Yn(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,s=t&-t,a>=s||a===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-nt(t),a=1<<n,r|=e[n],t&=~a;return r}function pf(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 mf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-nt(s),i=1<<l,u=a[l];u===-1?(!(i&n)||i&r)&&(a[l]=pf(i,t)):u<=t&&(e.expiredLanes|=i),s&=~i}}function Gs(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Du(){var e=$r;return $r<<=1,!($r&4194240)&&($r=64),e}function is(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Er(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function gf(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 a=31-nt(n),s=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~s}}function Il(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var K=0;function Mu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ru,Ll,Tu,Iu,Lu,Ks=!1,Fr=[],At=null,_t=null,Pt=null,cr=new Map,dr=new Map,Nt=[],hf="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 Io(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":_t=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dr.delete(t.pointerId)}}function Fn(e,t,n,r,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[a]},t!==null&&(t=_r(t),t!==null&&Ll(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function yf(e,t,n,r,a){switch(t){case"focusin":return At=Fn(At,e,t,n,r,a),!0;case"dragenter":return _t=Fn(_t,e,t,n,r,a),!0;case"mouseover":return Pt=Fn(Pt,e,t,n,r,a),!0;case"pointerover":var s=a.pointerId;return cr.set(s,Fn(cr.get(s)||null,e,t,n,r,a)),!0;case"gotpointercapture":return s=a.pointerId,dr.set(s,Fn(dr.get(s)||null,e,t,n,r,a)),!0}return!1}function $u(e){var t=Bt(e.target);if(t!==null){var n=rn(t);if(n!==null){if(t=n.tag,t===13){if(t=Cu(n),t!==null){e.blockedOn=t,Lu(e.priority,function(){Tu(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 ta(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Us=r,n.target.dispatchEvent(r),Us=null}else return t=_r(n),t!==null&&Ll(t),e.blockedOn=n,!1;t.shift()}return!0}function Lo(e,t,n){ta(e)&&n.delete(t)}function xf(){Ks=!1,At!==null&&ta(At)&&(At=null),_t!==null&&ta(_t)&&(_t=null),Pt!==null&&ta(Pt)&&(Pt=null),cr.forEach(Lo),dr.forEach(Lo)}function Wn(e,t){e.blockedOn===t&&(e.blockedOn=null,Ks||(Ks=!0,Ve.unstable_scheduleCallback(Ve.unstable_NormalPriority,xf)))}function fr(e){function t(a){return Wn(a,e)}if(0<Fr.length){Wn(Fr[0],e);for(var n=1;n<Fr.length;n++){var r=Fr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(At!==null&&Wn(At,e),_t!==null&&Wn(_t,e),Pt!==null&&Wn(Pt,e),cr.forEach(t),dr.forEach(t),n=0;n<Nt.length;n++)r=Nt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&(n=Nt[0],n.blockedOn===null);)$u(n),n.blockedOn===null&&Nt.shift()}var bn=wt.ReactCurrentBatchConfig,xa=!0;function vf(e,t,n,r){var a=K,s=bn.transition;bn.transition=null;try{K=1,$l(e,t,n,r)}finally{K=a,bn.transition=s}}function wf(e,t,n,r){var a=K,s=bn.transition;bn.transition=null;try{K=4,$l(e,t,n,r)}finally{K=a,bn.transition=s}}function $l(e,t,n,r){if(xa){var a=qs(e,t,n,r);if(a===null)xs(e,t,r,va,n),Io(e,r);else if(yf(a,e,t,n,r))r.stopPropagation();else if(Io(e,r),t&4&&-1<hf.indexOf(e)){for(;a!==null;){var s=_r(a);if(s!==null&&Ru(s),s=qs(e,t,n,r),s===null&&xs(e,t,r,va,n),s===a)break;a=s}a!==null&&r.stopPropagation()}else xs(e,t,r,null,n)}}var va=null;function qs(e,t,n,r){if(va=null,e=Rl(r),e=Bt(e),e!==null)if(t=rn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Cu(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 va=e,null}function Ou(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(lf()){case Tl:return 1;case Pu:return 4;case ha:case of:return 16;case zu:return 536870912;default:return 16}default:return 16}}var Ct=null,Ol=null,na=null;function Fu(){if(na)return na;var e,t=Ol,n=t.length,r,a="value"in Ct?Ct.value:Ct.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===a[s-r];r++);return na=a.slice(e,1<r?1-r:void 0)}function ra(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 Wr(){return!0}function $o(){return!1}function He(e){function t(n,r,a,s,l){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(s):s[i]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Wr:$o,this.isPropagationStopped=$o,this}return le(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=Wr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wr)},persist:function(){},isPersistent:Wr}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=He(Rn),Ar=le({},Rn,{view:0,detail:0}),kf=He(Ar),us,cs,Vn,Oa=le({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wl,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!==Vn&&(Vn&&e.type==="mousemove"?(us=e.screenX-Vn.screenX,cs=e.screenY-Vn.screenY):cs=us=0,Vn=e),us)},movementY:function(e){return"movementY"in e?e.movementY:cs}}),Oo=He(Oa),bf=le({},Oa,{dataTransfer:0}),Sf=He(bf),Nf=le({},Ar,{relatedTarget:0}),ds=He(Nf),jf=le({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0}),Cf=He(jf),Ef=le({},Rn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Af=He(Ef),_f=le({},Rn,{data:0}),Fo=He(_f),Pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zf={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"},Df={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Df[e])?!!t[e]:!1}function Wl(){return Mf}var Rf=le({},Ar,{key:function(e){if(e.key){var t=Pf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ra(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wl,charCode:function(e){return e.type==="keypress"?ra(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ra(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tf=He(Rf),If=le({},Oa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wo=He(If),Lf=le({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wl}),$f=He(Lf),Of=le({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ff=He(Of),Wf=le({},Oa,{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}),Vf=He(Wf),Uf=[9,13,27,32],Vl=ht&&"CompositionEvent"in window,er=null;ht&&"documentMode"in document&&(er=document.documentMode);var Hf=ht&&"TextEvent"in window&&!er,Wu=ht&&(!Vl||er&&8<er&&11>=er),Vo=" ",Uo=!1;function Vu(e,t){switch(e){case"keyup":return Uf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var un=!1;function Bf(e,t){switch(e){case"compositionend":return Uu(t);case"keypress":return t.which!==32?null:(Uo=!0,Vo);case"textInput":return e=t.data,e===Vo&&Uo?null:e;default:return null}}function Qf(e,t){if(un)return e==="compositionend"||!Vl&&Vu(e,t)?(e=Fu(),na=Ol=Ct=null,un=!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 Wu&&t.locale!=="ko"?null:t.data;default:return null}}var Gf={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 Ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gf[e.type]:t==="textarea"}function Hu(e,t,n,r){ku(r),t=wa(t,"onChange"),0<t.length&&(n=new Fl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var tr=null,pr=null;function Kf(e){tc(e,0)}function Fa(e){var t=fn(e);if(mu(t))return e}function qf(e,t){if(e==="change")return t}var Bu=!1;if(ht){var fs;if(ht){var ps="oninput"in document;if(!ps){var Bo=document.createElement("div");Bo.setAttribute("oninput","return;"),ps=typeof Bo.oninput=="function"}fs=ps}else fs=!1;Bu=fs&&(!document.documentMode||9<document.documentMode)}function Qo(){tr&&(tr.detachEvent("onpropertychange",Qu),pr=tr=null)}function Qu(e){if(e.propertyName==="value"&&Fa(pr)){var t=[];Hu(t,pr,e,Rl(e)),ju(Kf,t)}}function Yf(e,t,n){e==="focusin"?(Qo(),tr=t,pr=n,tr.attachEvent("onpropertychange",Qu)):e==="focusout"&&Qo()}function Xf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fa(pr)}function Jf(e,t){if(e==="click")return Fa(t)}function Zf(e,t){if(e==="input"||e==="change")return Fa(t)}function e0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var at=typeof Object.is=="function"?Object.is:e0;function mr(e,t){if(at(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 a=n[r];if(!zs.call(t,a)||!at(e[a],t[a]))return!1}return!0}function Go(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ko(e,t){var n=Go(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=Go(n)}}function Gu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ku(){for(var e=window,t=pa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pa(e.document)}return t}function Ul(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 t0(e){var t=Ku(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gu(n.ownerDocument.documentElement,n)){if(r!==null&&Ul(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 a=n.textContent.length,s=Math.min(r.start,a);r=r.end===void 0?s:Math.min(r.end,a),!e.extend&&s>r&&(a=r,r=s,s=a),a=Ko(n,s);var l=Ko(n,r);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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 n0=ht&&"documentMode"in document&&11>=document.documentMode,cn=null,Ys=null,nr=null,Xs=!1;function qo(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xs||cn==null||cn!==pa(r)||(r=cn,"selectionStart"in r&&Ul(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}),nr&&mr(nr,r)||(nr=r,r=wa(Ys,"onSelect"),0<r.length&&(t=new Fl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=cn)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dn={animationend:Vr("Animation","AnimationEnd"),animationiteration:Vr("Animation","AnimationIteration"),animationstart:Vr("Animation","AnimationStart"),transitionend:Vr("Transition","TransitionEnd")},ms={},qu={};ht&&(qu=document.createElement("div").style,"AnimationEvent"in window||(delete dn.animationend.animation,delete dn.animationiteration.animation,delete dn.animationstart.animation),"TransitionEvent"in window||delete dn.transitionend.transition);function Wa(e){if(ms[e])return ms[e];if(!dn[e])return e;var t=dn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qu)return ms[e]=t[n];return e}var Yu=Wa("animationend"),Xu=Wa("animationiteration"),Ju=Wa("animationstart"),Zu=Wa("transitionend"),ec=new Map,Yo="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 $t(e,t){ec.set(e,t),nn(t,[e])}for(var gs=0;gs<Yo.length;gs++){var hs=Yo[gs],r0=hs.toLowerCase(),a0=hs[0].toUpperCase()+hs.slice(1);$t(r0,"on"+a0)}$t(Yu,"onAnimationEnd");$t(Xu,"onAnimationIteration");$t(Ju,"onAnimationStart");$t("dblclick","onDoubleClick");$t("focusin","onFocus");$t("focusout","onBlur");$t(Zu,"onTransitionEnd");jn("onMouseEnter",["mouseout","mouseover"]);jn("onMouseLeave",["mouseout","mouseover"]);jn("onPointerEnter",["pointerout","pointerover"]);jn("onPointerLeave",["pointerout","pointerover"]);nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));nn("onBeforeInput",["compositionend","keypress","textInput","paste"]);nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xn="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(" "),s0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xn));function Xo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,nf(r,t,void 0,e),e.currentTarget=null}function tc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var i=r[l],u=i.instance,d=i.currentTarget;if(i=i.listener,u!==s&&a.isPropagationStopped())break e;Xo(a,i,d),s=u}else for(l=0;l<r.length;l++){if(i=r[l],u=i.instance,d=i.currentTarget,i=i.listener,u!==s&&a.isPropagationStopped())break e;Xo(a,i,d),s=u}}}if(ga)throw e=Qs,ga=!1,Qs=null,e}function Z(e,t){var n=t[nl];n===void 0&&(n=t[nl]=new Set);var r=e+"__bubble";n.has(r)||(nc(t,e,2,!1),n.add(r))}function ys(e,t,n){var r=0;t&&(r|=4),nc(n,e,r,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function gr(e){if(!e[Ur]){e[Ur]=!0,uu.forEach(function(n){n!=="selectionchange"&&(s0.has(n)||ys(n,!1,e),ys(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ur]||(t[Ur]=!0,ys("selectionchange",!1,t))}}function nc(e,t,n,r){switch(Ou(t)){case 1:var a=vf;break;case 4:a=wf;break;default:a=$l}n=a.bind(null,t,n,e),a=void 0,!Bs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function xs(e,t,n,r,a){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var i=r.stateNode.containerInfo;if(i===a||i.nodeType===8&&i.parentNode===a)break;if(l===4)for(l=r.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;l=l.return}for(;i!==null;){if(l=Bt(i),l===null)return;if(u=l.tag,u===5||u===6){r=s=l;continue e}i=i.parentNode}}r=r.return}ju(function(){var d=s,g=Rl(n),h=[];e:{var m=ec.get(e);if(m!==void 0){var v=Fl,k=e;switch(e){case"keypress":if(ra(n)===0)break e;case"keydown":case"keyup":v=Tf;break;case"focusin":k="focus",v=ds;break;case"focusout":k="blur",v=ds;break;case"beforeblur":case"afterblur":v=ds;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":v=Oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Sf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=$f;break;case Yu:case Xu:case Ju:v=Cf;break;case Zu:v=Ff;break;case"scroll":v=kf;break;case"wheel":v=Vf;break;case"copy":case"cut":case"paste":v=Af;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Wo}var x=(t&4)!==0,_=!x&&e==="scroll",f=x?m!==null?m+"Capture":null:m;x=[];for(var c=d,p;c!==null;){p=c;var b=p.stateNode;if(p.tag===5&&b!==null&&(p=b,f!==null&&(b=ur(c,f),b!=null&&x.push(hr(c,b,p)))),_)break;c=c.return}0<x.length&&(m=new v(m,k,null,n,g),h.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Us&&(k=n.relatedTarget||n.fromElement)&&(Bt(k)||k[yt]))break e;if((v||m)&&(m=g.window===g?g:(m=g.ownerDocument)?m.defaultView||m.parentWindow:window,v?(k=n.relatedTarget||n.toElement,v=d,k=k?Bt(k):null,k!==null&&(_=rn(k),k!==_||k.tag!==5&&k.tag!==6)&&(k=null)):(v=null,k=d),v!==k)){if(x=Oo,b="onMouseLeave",f="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(x=Wo,b="onPointerLeave",f="onPointerEnter",c="pointer"),_=v==null?m:fn(v),p=k==null?m:fn(k),m=new x(b,c+"leave",v,n,g),m.target=_,m.relatedTarget=p,b=null,Bt(g)===d&&(x=new x(f,c+"enter",k,n,g),x.target=p,x.relatedTarget=_,b=x),_=b,v&&k)t:{for(x=v,f=k,c=0,p=x;p;p=sn(p))c++;for(p=0,b=f;b;b=sn(b))p++;for(;0<c-p;)x=sn(x),c--;for(;0<p-c;)f=sn(f),p--;for(;c--;){if(x===f||f!==null&&x===f.alternate)break t;x=sn(x),f=sn(f)}x=null}else x=null;v!==null&&Jo(h,m,v,x,!1),k!==null&&_!==null&&Jo(h,_,k,x,!0)}}e:{if(m=d?fn(d):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var P=qf;else if(Ho(m))if(Bu)P=Zf;else{P=Xf;var j=Yf}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(P=Jf);if(P&&(P=P(e,d))){Hu(h,P,n,g);break e}j&&j(e,m,d),e==="focusout"&&(j=m._wrapperState)&&j.controlled&&m.type==="number"&&$s(m,"number",m.value)}switch(j=d?fn(d):window,e){case"focusin":(Ho(j)||j.contentEditable==="true")&&(cn=j,Ys=d,nr=null);break;case"focusout":nr=Ys=cn=null;break;case"mousedown":Xs=!0;break;case"contextmenu":case"mouseup":case"dragend":Xs=!1,qo(h,n,g);break;case"selectionchange":if(n0)break;case"keydown":case"keyup":qo(h,n,g)}var N;if(Vl)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else un?Vu(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Wu&&n.locale!=="ko"&&(un||R!=="onCompositionStart"?R==="onCompositionEnd"&&un&&(N=Fu()):(Ct=g,Ol="value"in Ct?Ct.value:Ct.textContent,un=!0)),j=wa(d,R),0<j.length&&(R=new Fo(R,e,null,n,g),h.push({event:R,listeners:j}),N?R.data=N:(N=Uu(n),N!==null&&(R.data=N)))),(N=Hf?Bf(e,n):Qf(e,n))&&(d=wa(d,"onBeforeInput"),0<d.length&&(g=new Fo("onBeforeInput","beforeinput",null,n,g),h.push({event:g,listeners:d}),g.data=N))}tc(h,t)})}function hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wa(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,s=a.stateNode;a.tag===5&&s!==null&&(a=s,s=ur(e,n),s!=null&&r.unshift(hr(e,s,a)),s=ur(e,t),s!=null&&r.push(hr(e,s,a))),e=e.return}return r}function sn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jo(e,t,n,r,a){for(var s=t._reactName,l=[];n!==null&&n!==r;){var i=n,u=i.alternate,d=i.stateNode;if(u!==null&&u===r)break;i.tag===5&&d!==null&&(i=d,a?(u=ur(n,s),u!=null&&l.unshift(hr(n,u,i))):a||(u=ur(n,s),u!=null&&l.push(hr(n,u,i)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var l0=/\r\n?/g,o0=/\u0000|\uFFFD/g;function Zo(e){return(typeof e=="string"?e:""+e).replace(l0,`
`).replace(o0,"")}function Hr(e,t,n){if(t=Zo(t),Zo(e)!==t&&n)throw Error(C(425))}function ka(){}var Js=null,Zs=null;function el(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 tl=typeof setTimeout=="function"?setTimeout:void 0,i0=typeof clearTimeout=="function"?clearTimeout:void 0,ei=typeof Promise=="function"?Promise:void 0,u0=typeof queueMicrotask=="function"?queueMicrotask:typeof ei<"u"?function(e){return ei.resolve(null).then(e).catch(c0)}:tl;function c0(e){setTimeout(function(){throw e})}function vs(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),fr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);fr(t)}function zt(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 ti(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 Tn=Math.random().toString(36).slice(2),ot="__reactFiber$"+Tn,yr="__reactProps$"+Tn,yt="__reactContainer$"+Tn,nl="__reactEvents$"+Tn,d0="__reactListeners$"+Tn,f0="__reactHandles$"+Tn;function Bt(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ti(e);e!==null;){if(n=e[ot])return n;e=ti(e)}return t}e=n,n=e.parentNode}return null}function _r(e){return e=e[ot]||e[yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function Va(e){return e[yr]||null}var rl=[],pn=-1;function Ot(e){return{current:e}}function ee(e){0>pn||(e.current=rl[pn],rl[pn]=null,pn--)}function J(e,t){pn++,rl[pn]=e.current,e.current=t}var Lt={},Ae=Ot(Lt),Ie=Ot(!1),Xt=Lt;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Lt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},s;for(s in n)a[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Le(e){return e=e.childContextTypes,e!=null}function ba(){ee(Ie),ee(Ae)}function ni(e,t,n){if(Ae.current!==Lt)throw Error(C(168));J(Ae,t),J(Ie,n)}function rc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(C(108,qd(e)||"Unknown",a));return le({},n,r)}function Sa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Xt=Ae.current,J(Ae,e),J(Ie,Ie.current),!0}function ri(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=rc(e,t,Xt),r.__reactInternalMemoizedMergedChildContext=e,ee(Ie),ee(Ae),J(Ae,e)):ee(Ie),J(Ie,n)}var ft=null,Ua=!1,ws=!1;function ac(e){ft===null?ft=[e]:ft.push(e)}function p0(e){Ua=!0,ac(e)}function Ft(){if(!ws&&ft!==null){ws=!0;var e=0,t=K;try{var n=ft;for(K=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ft=null,Ua=!1}catch(a){throw ft!==null&&(ft=ft.slice(e+1)),_u(Tl,Ft),a}finally{K=t,ws=!1}}return null}var mn=[],gn=0,Na=null,ja=0,Be=[],Qe=0,Jt=null,pt=1,mt="";function Ut(e,t){mn[gn++]=ja,mn[gn++]=Na,Na=e,ja=t}function sc(e,t,n){Be[Qe++]=pt,Be[Qe++]=mt,Be[Qe++]=Jt,Jt=e;var r=pt;e=mt;var a=32-nt(r)-1;r&=~(1<<a),n+=1;var s=32-nt(t)+a;if(30<s){var l=a-a%5;s=(r&(1<<l)-1).toString(32),r>>=l,a-=l,pt=1<<32-nt(t)+a|n<<a|r,mt=s+e}else pt=1<<s|n<<a|r,mt=e}function Hl(e){e.return!==null&&(Ut(e,1),sc(e,1,0))}function Bl(e){for(;e===Na;)Na=mn[--gn],mn[gn]=null,ja=mn[--gn],mn[gn]=null;for(;e===Jt;)Jt=Be[--Qe],Be[Qe]=null,mt=Be[--Qe],Be[Qe]=null,pt=Be[--Qe],Be[Qe]=null}var We=null,Fe=null,te=!1,tt=null;function lc(e,t){var n=Ge(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 ai(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,We=e,Fe=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,Fe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jt!==null?{id:pt,overflow:mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ge(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,We=e,Fe=null,!0):!1;default:return!1}}function al(e){return(e.mode&1)!==0&&(e.flags&128)===0}function sl(e){if(te){var t=Fe;if(t){var n=t;if(!ai(e,t)){if(al(e))throw Error(C(418));t=zt(n.nextSibling);var r=We;t&&ai(e,t)?lc(r,n):(e.flags=e.flags&-4097|2,te=!1,We=e)}}else{if(al(e))throw Error(C(418));e.flags=e.flags&-4097|2,te=!1,We=e}}}function si(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function Br(e){if(e!==We)return!1;if(!te)return si(e),te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!el(e.type,e.memoizedProps)),t&&(t=Fe)){if(al(e))throw oc(),Error(C(418));for(;t;)lc(e,t),t=zt(t.nextSibling)}if(si(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(C(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Fe=zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fe=null}}else Fe=We?zt(e.stateNode.nextSibling):null;return!0}function oc(){for(var e=Fe;e;)e=zt(e.nextSibling)}function En(){Fe=We=null,te=!1}function Ql(e){tt===null?tt=[e]:tt.push(e)}var m0=wt.ReactCurrentBatchConfig;function Un(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(C(309));var r=n.stateNode}if(!r)throw Error(C(147,e));var a=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var i=a.refs;l===null?delete i[s]:i[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error(C(284));if(!n._owner)throw Error(C(290,e))}return e}function Qr(e,t){throw e=Object.prototype.toString.call(t),Error(C(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function li(e){var t=e._init;return t(e._payload)}function ic(e){function t(f,c){if(e){var p=f.deletions;p===null?(f.deletions=[c],f.flags|=16):p.push(c)}}function n(f,c){if(!e)return null;for(;c!==null;)t(f,c),c=c.sibling;return null}function r(f,c){for(f=new Map;c!==null;)c.key!==null?f.set(c.key,c):f.set(c.index,c),c=c.sibling;return f}function a(f,c){return f=Tt(f,c),f.index=0,f.sibling=null,f}function s(f,c,p){return f.index=p,e?(p=f.alternate,p!==null?(p=p.index,p<c?(f.flags|=2,c):p):(f.flags|=2,c)):(f.flags|=1048576,c)}function l(f){return e&&f.alternate===null&&(f.flags|=2),f}function i(f,c,p,b){return c===null||c.tag!==6?(c=Es(p,f.mode,b),c.return=f,c):(c=a(c,p),c.return=f,c)}function u(f,c,p,b){var P=p.type;return P===on?g(f,c,p.props.children,b,p.key):c!==null&&(c.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===bt&&li(P)===c.type)?(b=a(c,p.props),b.ref=Un(f,c,p),b.return=f,b):(b=ca(p.type,p.key,p.props,null,f.mode,b),b.ref=Un(f,c,p),b.return=f,b)}function d(f,c,p,b){return c===null||c.tag!==4||c.stateNode.containerInfo!==p.containerInfo||c.stateNode.implementation!==p.implementation?(c=As(p,f.mode,b),c.return=f,c):(c=a(c,p.children||[]),c.return=f,c)}function g(f,c,p,b,P){return c===null||c.tag!==7?(c=qt(p,f.mode,b,P),c.return=f,c):(c=a(c,p),c.return=f,c)}function h(f,c,p){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Es(""+c,f.mode,p),c.return=f,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Tr:return p=ca(c.type,c.key,c.props,null,f.mode,p),p.ref=Un(f,null,c),p.return=f,p;case ln:return c=As(c,f.mode,p),c.return=f,c;case bt:var b=c._init;return h(f,b(c._payload),p)}if(qn(c)||$n(c))return c=qt(c,f.mode,p,null),c.return=f,c;Qr(f,c)}return null}function m(f,c,p,b){var P=c!==null?c.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return P!==null?null:i(f,c,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Tr:return p.key===P?u(f,c,p,b):null;case ln:return p.key===P?d(f,c,p,b):null;case bt:return P=p._init,m(f,c,P(p._payload),b)}if(qn(p)||$n(p))return P!==null?null:g(f,c,p,b,null);Qr(f,p)}return null}function v(f,c,p,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return f=f.get(p)||null,i(c,f,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Tr:return f=f.get(b.key===null?p:b.key)||null,u(c,f,b,P);case ln:return f=f.get(b.key===null?p:b.key)||null,d(c,f,b,P);case bt:var j=b._init;return v(f,c,p,j(b._payload),P)}if(qn(b)||$n(b))return f=f.get(p)||null,g(c,f,b,P,null);Qr(c,b)}return null}function k(f,c,p,b){for(var P=null,j=null,N=c,R=c=0,$=null;N!==null&&R<p.length;R++){N.index>R?($=N,N=null):$=N.sibling;var D=m(f,N,p[R],b);if(D===null){N===null&&(N=$);break}e&&N&&D.alternate===null&&t(f,N),c=s(D,c,R),j===null?P=D:j.sibling=D,j=D,N=$}if(R===p.length)return n(f,N),te&&Ut(f,R),P;if(N===null){for(;R<p.length;R++)N=h(f,p[R],b),N!==null&&(c=s(N,c,R),j===null?P=N:j.sibling=N,j=N);return te&&Ut(f,R),P}for(N=r(f,N);R<p.length;R++)$=v(N,f,R,p[R],b),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?R:$.key),c=s($,c,R),j===null?P=$:j.sibling=$,j=$);return e&&N.forEach(function(q){return t(f,q)}),te&&Ut(f,R),P}function x(f,c,p,b){var P=$n(p);if(typeof P!="function")throw Error(C(150));if(p=P.call(p),p==null)throw Error(C(151));for(var j=P=null,N=c,R=c=0,$=null,D=p.next();N!==null&&!D.done;R++,D=p.next()){N.index>R?($=N,N=null):$=N.sibling;var q=m(f,N,D.value,b);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(f,N),c=s(q,c,R),j===null?P=q:j.sibling=q,j=q,N=$}if(D.done)return n(f,N),te&&Ut(f,R),P;if(N===null){for(;!D.done;R++,D=p.next())D=h(f,D.value,b),D!==null&&(c=s(D,c,R),j===null?P=D:j.sibling=D,j=D);return te&&Ut(f,R),P}for(N=r(f,N);!D.done;R++,D=p.next())D=v(N,f,R,D.value,b),D!==null&&(e&&D.alternate!==null&&N.delete(D.key===null?R:D.key),c=s(D,c,R),j===null?P=D:j.sibling=D,j=D);return e&&N.forEach(function(Y){return t(f,Y)}),te&&Ut(f,R),P}function _(f,c,p,b){if(typeof p=="object"&&p!==null&&p.type===on&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Tr:e:{for(var P=p.key,j=c;j!==null;){if(j.key===P){if(P=p.type,P===on){if(j.tag===7){n(f,j.sibling),c=a(j,p.props.children),c.return=f,f=c;break e}}else if(j.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===bt&&li(P)===j.type){n(f,j.sibling),c=a(j,p.props),c.ref=Un(f,j,p),c.return=f,f=c;break e}n(f,j);break}else t(f,j);j=j.sibling}p.type===on?(c=qt(p.props.children,f.mode,b,p.key),c.return=f,f=c):(b=ca(p.type,p.key,p.props,null,f.mode,b),b.ref=Un(f,c,p),b.return=f,f=b)}return l(f);case ln:e:{for(j=p.key;c!==null;){if(c.key===j)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=a(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=As(p,f.mode,b),c.return=f,f=c}return l(f);case bt:return j=p._init,_(f,c,j(p._payload),b)}if(qn(p))return k(f,c,p,b);if($n(p))return x(f,c,p,b);Qr(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=a(c,p),c.return=f,f=c):(n(f,c),c=Es(p,f.mode,b),c.return=f,f=c),l(f)):n(f,c)}return _}var An=ic(!0),uc=ic(!1),Ca=Ot(null),Ea=null,hn=null,Gl=null;function Kl(){Gl=hn=Ea=null}function ql(e){var t=Ca.current;ee(Ca),e._currentValue=t}function ll(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 Sn(e,t){Ea=e,Gl=hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Te=!0),e.firstContext=null)}function qe(e){var t=e._currentValue;if(Gl!==e)if(e={context:e,memoizedValue:t,next:null},hn===null){if(Ea===null)throw Error(C(308));hn=e,Ea.dependencies={lanes:0,firstContext:e}}else hn=hn.next=e;return t}var Qt=null;function Yl(e){Qt===null?Qt=[e]:Qt.push(e)}function cc(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,Yl(t)):(n.next=a.next,a.next=n),t.interleaved=n,xt(e,r)}function xt(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 St=!1;function Xl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dc(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 gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,xt(e,n)}return a=r.interleaved,a===null?(t.next=t,Yl(r)):(t.next=a.next,a.next=t),r.interleaved=t,xt(e,n)}function aa(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,Il(e,n)}}function oi(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?a=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:s,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 Aa(e,t,n,r){var a=e.updateQueue;St=!1;var s=a.firstBaseUpdate,l=a.lastBaseUpdate,i=a.shared.pending;if(i!==null){a.shared.pending=null;var u=i,d=u.next;u.next=null,l===null?s=d:l.next=d,l=u;var g=e.alternate;g!==null&&(g=g.updateQueue,i=g.lastBaseUpdate,i!==l&&(i===null?g.firstBaseUpdate=d:i.next=d,g.lastBaseUpdate=u))}if(s!==null){var h=a.baseState;l=0,g=d=u=null,i=s;do{var m=i.lane,v=i.eventTime;if((r&m)===m){g!==null&&(g=g.next={eventTime:v,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var k=e,x=i;switch(m=t,v=n,x.tag){case 1:if(k=x.payload,typeof k=="function"){h=k.call(v,h,m);break e}h=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=x.payload,m=typeof k=="function"?k.call(v,h,m):k,m==null)break e;h=le({},h,m);break e;case 2:St=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,m=a.effects,m===null?a.effects=[i]:m.push(i))}else v={eventTime:v,lane:m,tag:i.tag,payload:i.payload,callback:i.callback,next:null},g===null?(d=g=v,u=h):g=g.next=v,l|=m;if(i=i.next,i===null){if(i=a.shared.pending,i===null)break;m=i,i=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);if(g===null&&(u=h),a.baseState=u,a.firstBaseUpdate=d,a.lastBaseUpdate=g,t=a.shared.interleaved,t!==null){a=t;do l|=a.lane,a=a.next;while(a!==t)}else s===null&&(a.shared.lanes=0);en|=l,e.lanes=l,e.memoizedState=h}}function ii(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(a!==null){if(r.callback=null,r=n,typeof a!="function")throw Error(C(191,a));a.call(r)}}}var Pr={},ut=Ot(Pr),xr=Ot(Pr),vr=Ot(Pr);function Gt(e){if(e===Pr)throw Error(C(174));return e}function Jl(e,t){switch(J(vr,t),J(xr,e),J(ut,Pr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fs(t,e)}ee(ut),J(ut,t)}function _n(){ee(ut),ee(xr),ee(vr)}function fc(e){Gt(vr.current);var t=Gt(ut.current),n=Fs(t,e.type);t!==n&&(J(xr,e),J(ut,n))}function Zl(e){xr.current===e&&(ee(ut),ee(xr))}var ae=Ot(0);function _a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ks=[];function eo(){for(var e=0;e<ks.length;e++)ks[e]._workInProgressVersionPrimary=null;ks.length=0}var sa=wt.ReactCurrentDispatcher,bs=wt.ReactCurrentBatchConfig,Zt=0,se=null,ge=null,xe=null,Pa=!1,rr=!1,wr=0,g0=0;function je(){throw Error(C(321))}function to(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!at(e[n],t[n]))return!1;return!0}function no(e,t,n,r,a,s){if(Zt=s,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,sa.current=e===null||e.memoizedState===null?v0:w0,e=n(r,a),rr){s=0;do{if(rr=!1,wr=0,25<=s)throw Error(C(301));s+=1,xe=ge=null,t.updateQueue=null,sa.current=k0,e=n(r,a)}while(rr)}if(sa.current=za,t=ge!==null&&ge.next!==null,Zt=0,xe=ge=se=null,Pa=!1,t)throw Error(C(300));return e}function ro(){var e=wr!==0;return wr=0,e}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?se.memoizedState=xe=e:xe=xe.next=e,xe}function Ye(){if(ge===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=xe===null?se.memoizedState:xe.next;if(t!==null)xe=t,ge=e;else{if(e===null)throw Error(C(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},xe===null?se.memoizedState=xe=e:xe=xe.next=e}return xe}function kr(e,t){return typeof t=="function"?t(e):t}function Ss(e){var t=Ye(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=ge,a=r.baseQueue,s=n.pending;if(s!==null){if(a!==null){var l=a.next;a.next=s.next,s.next=l}r.baseQueue=a=s,n.pending=null}if(a!==null){s=a.next,r=r.baseState;var i=l=null,u=null,d=s;do{var g=d.lane;if((Zt&g)===g)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var h={lane:g,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(i=u=h,l=r):u=u.next=h,se.lanes|=g,en|=g}d=d.next}while(d!==null&&d!==s);u===null?l=r:u.next=i,at(r,t.memoizedState)||(Te=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){a=e;do s=a.lane,se.lanes|=s,en|=s,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ns(e){var t=Ye(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do s=e(s,l.action),l=l.next;while(l!==a);at(s,t.memoizedState)||(Te=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function pc(){}function mc(e,t){var n=se,r=Ye(),a=t(),s=!at(r.memoizedState,a);if(s&&(r.memoizedState=a,Te=!0),r=r.queue,ao(yc.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||xe!==null&&xe.memoizedState.tag&1){if(n.flags|=2048,br(9,hc.bind(null,n,r,a,t),void 0,null),ve===null)throw Error(C(349));Zt&30||gc(n,t,a)}return a}function gc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hc(e,t,n,r){t.value=n,t.getSnapshot=r,xc(t)&&vc(e)}function yc(e,t,n){return n(function(){xc(t)&&vc(e)})}function xc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!at(e,n)}catch{return!0}}function vc(e){var t=xt(e,1);t!==null&&rt(t,e,1,-1)}function ui(e){var t=lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kr,lastRenderedState:e},t.queue=e,e=e.dispatch=x0.bind(null,se,e),[t.memoizedState,e]}function br(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=se.updateQueue,t===null?(t={lastEffect:null,stores:null},se.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 wc(){return Ye().memoizedState}function la(e,t,n,r){var a=lt();se.flags|=e,a.memoizedState=br(1|t,n,void 0,r===void 0?null:r)}function Ha(e,t,n,r){var a=Ye();r=r===void 0?null:r;var s=void 0;if(ge!==null){var l=ge.memoizedState;if(s=l.destroy,r!==null&&to(r,l.deps)){a.memoizedState=br(t,n,s,r);return}}se.flags|=e,a.memoizedState=br(1|t,n,s,r)}function ci(e,t){return la(8390656,8,e,t)}function ao(e,t){return Ha(2048,8,e,t)}function kc(e,t){return Ha(4,2,e,t)}function bc(e,t){return Ha(4,4,e,t)}function Sc(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 Nc(e,t,n){return n=n!=null?n.concat([e]):null,Ha(4,4,Sc.bind(null,t,e),n)}function so(){}function jc(e,t){var n=Ye();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&to(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cc(e,t){var n=Ye();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&to(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ec(e,t,n){return Zt&21?(at(n,t)||(n=Du(),se.lanes|=n,en|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Te=!0),e.memoizedState=n)}function h0(e,t){var n=K;K=n!==0&&4>n?n:4,e(!0);var r=bs.transition;bs.transition={};try{e(!1),t()}finally{K=n,bs.transition=r}}function Ac(){return Ye().memoizedState}function y0(e,t,n){var r=Rt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_c(e))Pc(t,n);else if(n=cc(e,t,n,r),n!==null){var a=Pe();rt(n,e,r,a),zc(n,t,r)}}function x0(e,t,n){var r=Rt(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_c(e))Pc(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,i=s(l,n);if(a.hasEagerState=!0,a.eagerState=i,at(i,l)){var u=t.interleaved;u===null?(a.next=a,Yl(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}n=cc(e,t,a,r),n!==null&&(a=Pe(),rt(n,e,r,a),zc(n,t,r))}}function _c(e){var t=e.alternate;return e===se||t!==null&&t===se}function Pc(e,t){rr=Pa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Il(e,n)}}var za={readContext:qe,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},v0={readContext:qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:ci,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,la(4194308,4,Sc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return la(4194308,4,e,t)},useInsertionEffect:function(e,t){return la(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();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=y0.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:ui,useDebugValue:so,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=ui(!1),t=e[0];return e=h0.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,a=lt();if(te){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ve===null)throw Error(C(349));Zt&30||gc(r,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,ci(yc.bind(null,r,s,e),[e]),r.flags|=2048,br(9,hc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=lt(),t=ve.identifierPrefix;if(te){var n=mt,r=pt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=g0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},w0={readContext:qe,useCallback:jc,useContext:qe,useEffect:ao,useImperativeHandle:Nc,useInsertionEffect:kc,useLayoutEffect:bc,useMemo:Cc,useReducer:Ss,useRef:wc,useState:function(){return Ss(kr)},useDebugValue:so,useDeferredValue:function(e){var t=Ye();return Ec(t,ge.memoizedState,e)},useTransition:function(){var e=Ss(kr)[0],t=Ye().memoizedState;return[e,t]},useMutableSource:pc,useSyncExternalStore:mc,useId:Ac,unstable_isNewReconciler:!1},k0={readContext:qe,useCallback:jc,useContext:qe,useEffect:ao,useImperativeHandle:Nc,useInsertionEffect:kc,useLayoutEffect:bc,useMemo:Cc,useReducer:Ns,useRef:wc,useState:function(){return Ns(kr)},useDebugValue:so,useDeferredValue:function(e){var t=Ye();return ge===null?t.memoizedState=e:Ec(t,ge.memoizedState,e)},useTransition:function(){var e=Ns(kr)[0],t=Ye().memoizedState;return[e,t]},useMutableSource:pc,useSyncExternalStore:mc,useId:Ac,unstable_isNewReconciler:!1};function Ze(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ol(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ba={isMounted:function(e){return(e=e._reactInternals)?rn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pe(),a=Rt(e),s=gt(r,a);s.payload=t,n!=null&&(s.callback=n),t=Dt(e,s,a),t!==null&&(rt(t,e,a,r),aa(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pe(),a=Rt(e),s=gt(r,a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Dt(e,s,a),t!==null&&(rt(t,e,a,r),aa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pe(),r=Rt(e),a=gt(n,r);a.tag=2,t!=null&&(a.callback=t),t=Dt(e,a,r),t!==null&&(rt(t,e,r,n),aa(t,e,r))}};function di(e,t,n,r,a,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!mr(n,r)||!mr(a,s):!0}function Dc(e,t,n){var r=!1,a=Lt,s=t.contextType;return typeof s=="object"&&s!==null?s=qe(s):(a=Le(t)?Xt:Ae.current,r=t.contextTypes,s=(r=r!=null)?Cn(e,a):Lt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ba,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=s),t}function fi(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&&Ba.enqueueReplaceState(t,t.state,null)}function il(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Xl(e);var s=t.contextType;typeof s=="object"&&s!==null?a.context=qe(s):(s=Le(t)?Xt:Ae.current,a.context=Cn(e,s)),a.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ol(e,t,s,n),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Ba.enqueueReplaceState(a,a.state,null),Aa(e,n,a,r),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Pn(e,t){try{var n="",r=t;do n+=Kd(r),r=r.return;while(r);var a=n}catch(s){a=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:a,digest:null}}function js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ul(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var b0=typeof WeakMap=="function"?WeakMap:Map;function Mc(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ma||(Ma=!0,vl=r),ul(e,t)},n}function Rc(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ul(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ul(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function pi(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new b0;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=I0.bind(null,e,t,n),t.then(e,e))}function mi(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 gi(e,t,n,r,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=gt(-1,1),t.tag=2,Dt(n,t,1))),n.lanes|=1),e)}var S0=wt.ReactCurrentOwner,Te=!1;function _e(e,t,n,r){t.child=e===null?uc(t,null,n,r):An(t,e.child,n,r)}function hi(e,t,n,r,a){n=n.render;var s=t.ref;return Sn(t,a),r=no(e,t,n,r,s,a),n=ro(),e!==null&&!Te?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,vt(e,t,a)):(te&&n&&Hl(t),t.flags|=1,_e(e,t,r,a),t.child)}function yi(e,t,n,r,a){if(e===null){var s=n.type;return typeof s=="function"&&!mo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Tc(e,t,s,r,a)):(e=ca(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&a)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:mr,n(l,r)&&e.ref===t.ref)return vt(e,t,a)}return t.flags|=1,e=Tt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Tc(e,t,n,r,a){if(e!==null){var s=e.memoizedProps;if(mr(s,r)&&e.ref===t.ref)if(Te=!1,t.pendingProps=r=s,(e.lanes&a)!==0)e.flags&131072&&(Te=!0);else return t.lanes=e.lanes,vt(e,t,a)}return cl(e,t,n,r,a)}function Ic(e,t,n){var r=t.pendingProps,a=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(xn,Oe),Oe|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(xn,Oe),Oe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,J(xn,Oe),Oe|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,J(xn,Oe),Oe|=r;return _e(e,t,a,n),t.child}function Lc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function cl(e,t,n,r,a){var s=Le(n)?Xt:Ae.current;return s=Cn(t,s),Sn(t,a),n=no(e,t,n,r,s,a),r=ro(),e!==null&&!Te?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,vt(e,t,a)):(te&&r&&Hl(t),t.flags|=1,_e(e,t,n,a),t.child)}function xi(e,t,n,r,a){if(Le(n)){var s=!0;Sa(t)}else s=!1;if(Sn(t,a),t.stateNode===null)oa(e,t),Dc(t,n,r),il(t,n,r,a),r=!0;else if(e===null){var l=t.stateNode,i=t.memoizedProps;l.props=i;var u=l.context,d=n.contextType;typeof d=="object"&&d!==null?d=qe(d):(d=Le(n)?Xt:Ae.current,d=Cn(t,d));var g=n.getDerivedStateFromProps,h=typeof g=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(i!==r||u!==d)&&fi(t,l,r,d),St=!1;var m=t.memoizedState;l.state=m,Aa(t,r,l,a),u=t.memoizedState,i!==r||m!==u||Ie.current||St?(typeof g=="function"&&(ol(t,n,g,r),u=t.memoizedState),(i=St||di(t,n,i,r,m,u,d))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),l.props=r,l.state=u,l.context=d,r=i):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,dc(e,t),i=t.memoizedProps,d=t.type===t.elementType?i:Ze(t.type,i),l.props=d,h=t.pendingProps,m=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=qe(u):(u=Le(n)?Xt:Ae.current,u=Cn(t,u));var v=n.getDerivedStateFromProps;(g=typeof v=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(i!==h||m!==u)&&fi(t,l,r,u),St=!1,m=t.memoizedState,l.state=m,Aa(t,r,l,a);var k=t.memoizedState;i!==h||m!==k||Ie.current||St?(typeof v=="function"&&(ol(t,n,v,r),k=t.memoizedState),(d=St||di(t,n,d,r,m,k,u)||!1)?(g||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,k,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,k,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),l.props=r,l.state=k,l.context=u,r=d):(typeof l.componentDidUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return dl(e,t,n,r,s,a)}function dl(e,t,n,r,a,s){Lc(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return a&&ri(t,n,!1),vt(e,t,s);r=t.stateNode,S0.current=t;var i=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=An(t,e.child,null,s),t.child=An(t,null,i,s)):_e(e,t,i,s),t.memoizedState=r.state,a&&ri(t,n,!0),t.child}function $c(e){var t=e.stateNode;t.pendingContext?ni(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ni(e,t.context,!1),Jl(e,t.containerInfo)}function vi(e,t,n,r,a){return En(),Ql(a),t.flags|=256,_e(e,t,n,r),t.child}var fl={dehydrated:null,treeContext:null,retryLane:0};function pl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oc(e,t,n){var r=t.pendingProps,a=ae.current,s=!1,l=(t.flags&128)!==0,i;if((i=l)||(i=e!==null&&e.memoizedState===null?!1:(a&2)!==0),i?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),J(ae,a&1),e===null)return sl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=Ka(l,r,0,null),e=qt(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=pl(n),t.memoizedState=fl,e):lo(t,l));if(a=e.memoizedState,a!==null&&(i=a.dehydrated,i!==null))return N0(e,t,l,r,i,a,n);if(s){s=r.fallback,l=t.mode,a=e.child,i=a.sibling;var u={mode:"hidden",children:r.children};return!(l&1)&&t.child!==a?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Tt(a,u),r.subtreeFlags=a.subtreeFlags&14680064),i!==null?s=Tt(i,s):(s=qt(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?pl(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=fl,r}return s=e.child,e=s.sibling,r=Tt(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lo(e,t){return t=Ka({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gr(e,t,n,r){return r!==null&&Ql(r),An(t,e.child,null,n),e=lo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function N0(e,t,n,r,a,s,l){if(n)return t.flags&256?(t.flags&=-257,r=js(Error(C(422))),Gr(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,a=t.mode,r=Ka({mode:"visible",children:r.children},a,0,null),s=qt(s,a,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&An(t,e.child,null,l),t.child.memoizedState=pl(l),t.memoizedState=fl,s);if(!(t.mode&1))return Gr(e,t,l,null);if(a.data==="$!"){if(r=a.nextSibling&&a.nextSibling.dataset,r)var i=r.dgst;return r=i,s=Error(C(419)),r=js(s,r,void 0),Gr(e,t,l,r)}if(i=(l&e.childLanes)!==0,Te||i){if(r=ve,r!==null){switch(l&-l){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(r.suspendedLanes|l)?0:a,a!==0&&a!==s.retryLane&&(s.retryLane=a,xt(e,a),rt(r,e,a,-1))}return po(),r=js(Error(C(421))),Gr(e,t,l,r)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=L0.bind(null,e),a._reactRetry=t,null):(e=s.treeContext,Fe=zt(a.nextSibling),We=t,te=!0,tt=null,e!==null&&(Be[Qe++]=pt,Be[Qe++]=mt,Be[Qe++]=Jt,pt=e.id,mt=e.overflow,Jt=t),t=lo(t,r.children),t.flags|=4096,t)}function wi(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ll(e.return,t,n)}function Cs(e,t,n,r,a){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=a)}function Fc(e,t,n){var r=t.pendingProps,a=r.revealOrder,s=r.tail;if(_e(e,t,r.children,n),r=ae.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wi(e,n,t);else if(e.tag===19)wi(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(J(ae,r),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&_a(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Cs(t,!1,a,n,s);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&_a(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Cs(t,!0,n,null,s);break;case"together":Cs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),en|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(C(153));if(t.child!==null){for(e=t.child,n=Tt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Tt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function j0(e,t,n){switch(t.tag){case 3:$c(t),En();break;case 5:fc(t);break;case 1:Le(t.type)&&Sa(t);break;case 4:Jl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;J(Ca,r._currentValue),r._currentValue=a;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(J(ae,ae.current&1),t.flags|=128,null):n&t.child.childLanes?Oc(e,t,n):(J(ae,ae.current&1),e=vt(e,t,n),e!==null?e.sibling:null);J(ae,ae.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Fc(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),J(ae,ae.current),r)break;return null;case 22:case 23:return t.lanes=0,Ic(e,t,n)}return vt(e,t,n)}var Wc,ml,Vc,Uc;Wc=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}};ml=function(){};Vc=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Gt(ut.current);var s=null;switch(n){case"input":a=Is(e,a),r=Is(e,r),s=[];break;case"select":a=le({},a,{value:void 0}),r=le({},r,{value:void 0}),s=[];break;case"textarea":a=Os(e,a),r=Os(e,r),s=[];break;default:typeof a.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ka)}Ws(n,r);var l;n=null;for(d in a)if(!r.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var i=a[d];for(l in i)i.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(or.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(i=a!=null?a[d]:void 0,r.hasOwnProperty(d)&&u!==i&&(u!=null||i!=null))if(d==="style")if(i){for(l in i)!i.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&i[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(s||(s=[]),s.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,i=i?i.__html:void 0,u!=null&&i!==u&&(s=s||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(or.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&Z("scroll",e),s||i===u||(s=[])):(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}};Uc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hn(e,t){if(!te)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 Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&14680064,r|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function C0(e,t,n){var r=t.pendingProps;switch(Bl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Le(t.type)&&ba(),Ce(t),null;case 3:return r=t.stateNode,_n(),ee(Ie),ee(Ae),eo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Br(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tt!==null&&(bl(tt),tt=null))),ml(e,t),Ce(t),null;case 5:Zl(t);var a=Gt(vr.current);if(n=t.type,e!==null&&t.stateNode!=null)Vc(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(C(166));return Ce(t),null}if(e=Gt(ut.current),Br(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ot]=t,r[yr]=s,e=(t.mode&1)!==0,n){case"dialog":Z("cancel",r),Z("close",r);break;case"iframe":case"object":case"embed":Z("load",r);break;case"video":case"audio":for(a=0;a<Xn.length;a++)Z(Xn[a],r);break;case"source":Z("error",r);break;case"img":case"image":case"link":Z("error",r),Z("load",r);break;case"details":Z("toggle",r);break;case"input":_o(r,s),Z("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Z("invalid",r);break;case"textarea":zo(r,s),Z("invalid",r)}Ws(n,s),a=null;for(var l in s)if(s.hasOwnProperty(l)){var i=s[l];l==="children"?typeof i=="string"?r.textContent!==i&&(s.suppressHydrationWarning!==!0&&Hr(r.textContent,i,e),a=["children",i]):typeof i=="number"&&r.textContent!==""+i&&(s.suppressHydrationWarning!==!0&&Hr(r.textContent,i,e),a=["children",""+i]):or.hasOwnProperty(l)&&i!=null&&l==="onScroll"&&Z("scroll",r)}switch(n){case"input":Ir(r),Po(r,s,!0);break;case"textarea":Ir(r),Do(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ka)}r=a,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=yu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ot]=t,e[yr]=r,Wc(e,t,!1,!1),t.stateNode=e;e:{switch(l=Vs(n,r),n){case"dialog":Z("cancel",e),Z("close",e),a=r;break;case"iframe":case"object":case"embed":Z("load",e),a=r;break;case"video":case"audio":for(a=0;a<Xn.length;a++)Z(Xn[a],e);a=r;break;case"source":Z("error",e),a=r;break;case"img":case"image":case"link":Z("error",e),Z("load",e),a=r;break;case"details":Z("toggle",e),a=r;break;case"input":_o(e,r),a=Is(e,r),Z("invalid",e);break;case"option":a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=le({},r,{value:void 0}),Z("invalid",e);break;case"textarea":zo(e,r),a=Os(e,r),Z("invalid",e);break;default:a=r}Ws(n,a),i=a;for(s in i)if(i.hasOwnProperty(s)){var u=i[s];s==="style"?wu(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&xu(e,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ir(e,u):typeof u=="number"&&ir(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(or.hasOwnProperty(s)?u!=null&&s==="onScroll"&&Z("scroll",e):u!=null&&Pl(e,s,u,l))}switch(n){case"input":Ir(e),Po(e,r,!1);break;case"textarea":Ir(e),Do(e);break;case"option":r.value!=null&&e.setAttribute("value",""+It(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?vn(e,!!r.multiple,s,!1):r.defaultValue!=null&&vn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=ka)}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 Ce(t),null;case 6:if(e&&t.stateNode!=null)Uc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(C(166));if(n=Gt(vr.current),Gt(ut.current),Br(t)){if(r=t.stateNode,n=t.memoizedProps,r[ot]=t,(s=r.nodeValue!==n)&&(e=We,e!==null))switch(e.tag){case 3:Hr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hr(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ot]=t,t.stateNode=r}return Ce(t),null;case 13:if(ee(ae),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(te&&Fe!==null&&t.mode&1&&!(t.flags&128))oc(),En(),t.flags|=98560,s=!1;else if(s=Br(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(C(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(C(317));s[ot]=t}else En(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),s=!1}else tt!==null&&(bl(tt),tt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ae.current&1?he===0&&(he=3):po())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return _n(),ml(e,t),e===null&&gr(t.stateNode.containerInfo),Ce(t),null;case 10:return ql(t.type._context),Ce(t),null;case 17:return Le(t.type)&&ba(),Ce(t),null;case 19:if(ee(ae),s=t.memoizedState,s===null)return Ce(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)Hn(s,!1);else{if(he!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=_a(e),l!==null){for(t.flags|=128,Hn(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return J(ae,ae.current&1|2),t.child}e=e.sibling}s.tail!==null&&fe()>zn&&(t.flags|=128,r=!0,Hn(s,!1),t.lanes=4194304)}else{if(!r)if(e=_a(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!te)return Ce(t),null}else 2*fe()-s.renderingStartTime>zn&&n!==1073741824&&(t.flags|=128,r=!0,Hn(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=fe(),t.sibling=null,n=ae.current,J(ae,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return fo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Oe&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function E0(e,t){switch(Bl(t),t.tag){case 1:return Le(t.type)&&ba(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _n(),ee(Ie),ee(Ae),eo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zl(t),null;case 13:if(ee(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));En()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(ae),null;case 4:return _n(),null;case 10:return ql(t.type._context),null;case 22:case 23:return fo(),null;case 24:return null;default:return null}}var Kr=!1,Ee=!1,A0=typeof WeakSet=="function"?WeakSet:Set,I=null;function yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function gl(e,t,n){try{n()}catch(r){ie(e,t,r)}}var ki=!1;function _0(e,t){if(Js=xa,e=Ku(),Ul(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 a=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,i=-1,u=-1,d=0,g=0,h=e,m=null;t:for(;;){for(var v;h!==n||a!==0&&h.nodeType!==3||(i=l+a),h!==s||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(v=h.firstChild)!==null;)m=h,h=v;for(;;){if(h===e)break t;if(m===n&&++d===a&&(i=l),m===s&&++g===r&&(u=l),(v=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=v}n=i===-1||u===-1?null:{start:i,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zs={focusedElem:e,selectionRange:n},xa=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var x=k.memoizedProps,_=k.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?x:Ze(t.type,x),_);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(b){ie(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return k=ki,ki=!1,k}function ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var s=a.destroy;a.destroy=void 0,s!==void 0&&gl(t,n,s)}a=a.next}while(a!==r)}}function Qa(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 hl(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 Hc(e){var t=e.alternate;t!==null&&(e.alternate=null,Hc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[yr],delete t[nl],delete t[d0],delete t[f0])),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 Bc(e){return e.tag===5||e.tag===3||e.tag===4}function bi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bc(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 yl(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=ka));else if(r!==4&&(e=e.child,e!==null))for(yl(e,t,n),e=e.sibling;e!==null;)yl(e,t,n),e=e.sibling}function xl(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(xl(e,t,n),e=e.sibling;e!==null;)xl(e,t,n),e=e.sibling}var we=null,et=!1;function kt(e,t,n){for(n=n.child;n!==null;)Qc(e,t,n),n=n.sibling}function Qc(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount($a,n)}catch{}switch(n.tag){case 5:Ee||yn(n,t);case 6:var r=we,a=et;we=null,kt(e,t,n),we=r,et=a,we!==null&&(et?(e=we,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):we.removeChild(n.stateNode));break;case 18:we!==null&&(et?(e=we,n=n.stateNode,e.nodeType===8?vs(e.parentNode,n):e.nodeType===1&&vs(e,n),fr(e)):vs(we,n.stateNode));break;case 4:r=we,a=et,we=n.stateNode.containerInfo,et=!0,kt(e,t,n),we=r,et=a;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var s=a,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&gl(n,t,l),a=a.next}while(a!==r)}kt(e,t,n);break;case 1:if(!Ee&&(yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){ie(n,t,i)}kt(e,t,n);break;case 21:kt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,kt(e,t,n),Ee=r):kt(e,t,n);break;default:kt(e,t,n)}}function Si(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new A0),t.forEach(function(r){var a=$0.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function Je(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r];try{var s=e,l=t,i=l;e:for(;i!==null;){switch(i.tag){case 5:we=i.stateNode,et=!1;break e;case 3:we=i.stateNode.containerInfo,et=!0;break e;case 4:we=i.stateNode.containerInfo,et=!0;break e}i=i.return}if(we===null)throw Error(C(160));Qc(s,l,a),we=null,et=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(d){ie(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gc(t,e),t=t.sibling}function Gc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Je(t,e),st(e),r&4){try{ar(3,e,e.return),Qa(3,e)}catch(x){ie(e,e.return,x)}try{ar(5,e,e.return)}catch(x){ie(e,e.return,x)}}break;case 1:Je(t,e),st(e),r&512&&n!==null&&yn(n,n.return);break;case 5:if(Je(t,e),st(e),r&512&&n!==null&&yn(n,n.return),e.flags&32){var a=e.stateNode;try{ir(a,"")}catch(x){ie(e,e.return,x)}}if(r&4&&(a=e.stateNode,a!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,i=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{i==="input"&&s.type==="radio"&&s.name!=null&&gu(a,s),Vs(i,l);var d=Vs(i,s);for(l=0;l<u.length;l+=2){var g=u[l],h=u[l+1];g==="style"?wu(a,h):g==="dangerouslySetInnerHTML"?xu(a,h):g==="children"?ir(a,h):Pl(a,g,h,d)}switch(i){case"input":Ls(a,s);break;case"textarea":hu(a,s);break;case"select":var m=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?vn(a,!!s.multiple,v,!1):m!==!!s.multiple&&(s.defaultValue!=null?vn(a,!!s.multiple,s.defaultValue,!0):vn(a,!!s.multiple,s.multiple?[]:"",!1))}a[yr]=s}catch(x){ie(e,e.return,x)}}break;case 6:if(Je(t,e),st(e),r&4){if(e.stateNode===null)throw Error(C(162));a=e.stateNode,s=e.memoizedProps;try{a.nodeValue=s}catch(x){ie(e,e.return,x)}}break;case 3:if(Je(t,e),st(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fr(t.containerInfo)}catch(x){ie(e,e.return,x)}break;case 4:Je(t,e),st(e);break;case 13:Je(t,e),st(e),a=e.child,a.flags&8192&&(s=a.memoizedState!==null,a.stateNode.isHidden=s,!s||a.alternate!==null&&a.alternate.memoizedState!==null||(uo=fe())),r&4&&Si(e);break;case 22:if(g=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(d=Ee)||g,Je(t,e),Ee=d):Je(t,e),st(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!g&&e.mode&1)for(I=e,g=e.child;g!==null;){for(h=I=g;I!==null;){switch(m=I,v=m.child,m.tag){case 0:case 11:case 14:case 15:ar(4,m,m.return);break;case 1:yn(m,m.return);var k=m.stateNode;if(typeof k.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(x){ie(r,n,x)}}break;case 5:yn(m,m.return);break;case 22:if(m.memoizedState!==null){ji(h);continue}}v!==null?(v.return=m,I=v):ji(h)}g=g.sibling}e:for(g=null,h=e;;){if(h.tag===5){if(g===null){g=h;try{a=h.stateNode,d?(s=a.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(i=h.stateNode,u=h.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,i.style.display=vu("display",l))}catch(x){ie(e,e.return,x)}}}else if(h.tag===6){if(g===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(x){ie(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;g===h&&(g=null),h=h.return}g===h&&(g=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Je(t,e),st(e),r&4&&Si(e);break;case 21:break;default:Je(t,e),st(e)}}function st(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bc(n)){var r=n;break e}n=n.return}throw Error(C(160))}switch(r.tag){case 5:var a=r.stateNode;r.flags&32&&(ir(a,""),r.flags&=-33);var s=bi(e);xl(e,s,a);break;case 3:case 4:var l=r.stateNode.containerInfo,i=bi(e);yl(e,i,l);break;default:throw Error(C(161))}}catch(u){ie(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function P0(e,t,n){I=e,Kc(e)}function Kc(e,t,n){for(var r=(e.mode&1)!==0;I!==null;){var a=I,s=a.child;if(a.tag===22&&r){var l=a.memoizedState!==null||Kr;if(!l){var i=a.alternate,u=i!==null&&i.memoizedState!==null||Ee;i=Kr;var d=Ee;if(Kr=l,(Ee=u)&&!d)for(I=a;I!==null;)l=I,u=l.child,l.tag===22&&l.memoizedState!==null?Ci(a):u!==null?(u.return=l,I=u):Ci(a);for(;s!==null;)I=s,Kc(s),s=s.sibling;I=a,Kr=i,Ee=d}Ni(e)}else a.subtreeFlags&8772&&s!==null?(s.return=a,I=s):Ni(e)}}function Ni(e){for(;I!==null;){var t=I;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||Qa(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ze(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ii(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ii(t,l,n)}break;case 5:var i=t.stateNode;if(n===null&&t.flags&4){n=i;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var g=d.memoizedState;if(g!==null){var h=g.dehydrated;h!==null&&fr(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}Ee||t.flags&512&&hl(t)}catch(m){ie(t,t.return,m)}}if(t===e){I=null;break}if(n=t.sibling,n!==null){n.return=t.return,I=n;break}I=t.return}}function ji(e){for(;I!==null;){var t=I;if(t===e){I=null;break}var n=t.sibling;if(n!==null){n.return=t.return,I=n;break}I=t.return}}function Ci(e){for(;I!==null;){var t=I;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qa(4,t)}catch(u){ie(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var a=t.return;try{r.componentDidMount()}catch(u){ie(t,a,u)}}var s=t.return;try{hl(t)}catch(u){ie(t,s,u)}break;case 5:var l=t.return;try{hl(t)}catch(u){ie(t,l,u)}}}catch(u){ie(t,t.return,u)}if(t===e){I=null;break}var i=t.sibling;if(i!==null){i.return=t.return,I=i;break}I=t.return}}var z0=Math.ceil,Da=wt.ReactCurrentDispatcher,oo=wt.ReactCurrentOwner,Ke=wt.ReactCurrentBatchConfig,B=0,ve=null,me=null,be=0,Oe=0,xn=Ot(0),he=0,Sr=null,en=0,Ga=0,io=0,sr=null,Re=null,uo=0,zn=1/0,dt=null,Ma=!1,vl=null,Mt=null,qr=!1,Et=null,Ra=0,lr=0,wl=null,ia=-1,ua=0;function Pe(){return B&6?fe():ia!==-1?ia:ia=fe()}function Rt(e){return e.mode&1?B&2&&be!==0?be&-be:m0.transition!==null?(ua===0&&(ua=Du()),ua):(e=K,e!==0||(e=window.event,e=e===void 0?16:Ou(e.type)),e):1}function rt(e,t,n,r){if(50<lr)throw lr=0,wl=null,Error(C(185));Er(e,n,r),(!(B&2)||e!==ve)&&(e===ve&&(!(B&2)&&(Ga|=n),he===4&&jt(e,be)),$e(e,r),n===1&&B===0&&!(t.mode&1)&&(zn=fe()+500,Ua&&Ft()))}function $e(e,t){var n=e.callbackNode;mf(e,t);var r=ya(e,e===ve?be:0);if(r===0)n!==null&&To(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&To(n),t===1)e.tag===0?p0(Ei.bind(null,e)):ac(Ei.bind(null,e)),u0(function(){!(B&6)&&Ft()}),n=null;else{switch(Mu(r)){case 1:n=Tl;break;case 4:n=Pu;break;case 16:n=ha;break;case 536870912:n=zu;break;default:n=ha}n=nd(n,qc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qc(e,t){if(ia=-1,ua=0,B&6)throw Error(C(327));var n=e.callbackNode;if(Nn()&&e.callbackNode!==n)return null;var r=ya(e,e===ve?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ta(e,r);else{t=r;var a=B;B|=2;var s=Xc();(ve!==e||be!==t)&&(dt=null,zn=fe()+500,Kt(e,t));do try{R0();break}catch(i){Yc(e,i)}while(!0);Kl(),Da.current=s,B=a,me!==null?t=0:(ve=null,be=0,t=he)}if(t!==0){if(t===2&&(a=Gs(e),a!==0&&(r=a,t=kl(e,a))),t===1)throw n=Sr,Kt(e,0),jt(e,r),$e(e,fe()),n;if(t===6)jt(e,r);else{if(a=e.current.alternate,!(r&30)&&!D0(a)&&(t=Ta(e,r),t===2&&(s=Gs(e),s!==0&&(r=s,t=kl(e,s))),t===1))throw n=Sr,Kt(e,0),jt(e,r),$e(e,fe()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(C(345));case 2:Ht(e,Re,dt);break;case 3:if(jt(e,r),(r&130023424)===r&&(t=uo+500-fe(),10<t)){if(ya(e,0)!==0)break;if(a=e.suspendedLanes,(a&r)!==r){Pe(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=tl(Ht.bind(null,e,Re,dt),t);break}Ht(e,Re,dt);break;case 4:if(jt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,a=-1;0<r;){var l=31-nt(r);s=1<<l,l=t[l],l>a&&(a=l),r&=~s}if(r=a,r=fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*z0(r/1960))-r,10<r){e.timeoutHandle=tl(Ht.bind(null,e,Re,dt),r);break}Ht(e,Re,dt);break;case 5:Ht(e,Re,dt);break;default:throw Error(C(329))}}}return $e(e,fe()),e.callbackNode===n?qc.bind(null,e):null}function kl(e,t){var n=sr;return e.current.memoizedState.isDehydrated&&(Kt(e,t).flags|=256),e=Ta(e,t),e!==2&&(t=Re,Re=n,t!==null&&bl(t)),e}function bl(e){Re===null?Re=e:Re.push.apply(Re,e)}function D0(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 a=n[r],s=a.getSnapshot;a=a.value;try{if(!at(s(),a))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 jt(e,t){for(t&=~io,t&=~Ga,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nt(t),r=1<<n;e[n]=-1,t&=~r}}function Ei(e){if(B&6)throw Error(C(327));Nn();var t=ya(e,0);if(!(t&1))return $e(e,fe()),null;var n=Ta(e,t);if(e.tag!==0&&n===2){var r=Gs(e);r!==0&&(t=r,n=kl(e,r))}if(n===1)throw n=Sr,Kt(e,0),jt(e,t),$e(e,fe()),n;if(n===6)throw Error(C(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ht(e,Re,dt),$e(e,fe()),null}function co(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(zn=fe()+500,Ua&&Ft())}}function tn(e){Et!==null&&Et.tag===0&&!(B&6)&&Nn();var t=B;B|=1;var n=Ke.transition,r=K;try{if(Ke.transition=null,K=1,e)return e()}finally{K=r,Ke.transition=n,B=t,!(B&6)&&Ft()}}function fo(){Oe=xn.current,ee(xn)}function Kt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,i0(n)),me!==null)for(n=me.return;n!==null;){var r=n;switch(Bl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ba();break;case 3:_n(),ee(Ie),ee(Ae),eo();break;case 5:Zl(r);break;case 4:_n();break;case 13:ee(ae);break;case 19:ee(ae);break;case 10:ql(r.type._context);break;case 22:case 23:fo()}n=n.return}if(ve=e,me=e=Tt(e.current,null),be=Oe=t,he=0,Sr=null,io=Ga=en=0,Re=sr=null,Qt!==null){for(t=0;t<Qt.length;t++)if(n=Qt[t],r=n.interleaved,r!==null){n.interleaved=null;var a=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=a,r.next=l}n.pending=r}Qt=null}return e}function Yc(e,t){do{var n=me;try{if(Kl(),sa.current=za,Pa){for(var r=se.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Pa=!1}if(Zt=0,xe=ge=se=null,rr=!1,wr=0,oo.current=null,n===null||n.return===null){he=1,Sr=t,me=null;break}e:{var s=e,l=n.return,i=n,u=t;if(t=be,i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,g=i,h=g.tag;if(!(g.mode&1)&&(h===0||h===11||h===15)){var m=g.alternate;m?(g.updateQueue=m.updateQueue,g.memoizedState=m.memoizedState,g.lanes=m.lanes):(g.updateQueue=null,g.memoizedState=null)}var v=mi(l);if(v!==null){v.flags&=-257,gi(v,l,i,s,t),v.mode&1&&pi(s,d,t),t=v,u=d;var k=t.updateQueue;if(k===null){var x=new Set;x.add(u),t.updateQueue=x}else k.add(u);break e}else{if(!(t&1)){pi(s,d,t),po();break e}u=Error(C(426))}}else if(te&&i.mode&1){var _=mi(l);if(_!==null){!(_.flags&65536)&&(_.flags|=256),gi(_,l,i,s,t),Ql(Pn(u,i));break e}}s=u=Pn(u,i),he!==4&&(he=2),sr===null?sr=[s]:sr.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var f=Mc(s,u,t);oi(s,f);break e;case 1:i=u;var c=s.type,p=s.stateNode;if(!(s.flags&128)&&(typeof c.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Mt===null||!Mt.has(p)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=Rc(s,i,t);oi(s,b);break e}}s=s.return}while(s!==null)}Zc(n)}catch(P){t=P,me===n&&n!==null&&(me=n=n.return);continue}break}while(!0)}function Xc(){var e=Da.current;return Da.current=za,e===null?za:e}function po(){(he===0||he===3||he===2)&&(he=4),ve===null||!(en&268435455)&&!(Ga&268435455)||jt(ve,be)}function Ta(e,t){var n=B;B|=2;var r=Xc();(ve!==e||be!==t)&&(dt=null,Kt(e,t));do try{M0();break}catch(a){Yc(e,a)}while(!0);if(Kl(),B=n,Da.current=r,me!==null)throw Error(C(261));return ve=null,be=0,he}function M0(){for(;me!==null;)Jc(me)}function R0(){for(;me!==null&&!af();)Jc(me)}function Jc(e){var t=td(e.alternate,e,Oe);e.memoizedProps=e.pendingProps,t===null?Zc(e):me=t,oo.current=null}function Zc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=E0(n,t),n!==null){n.flags&=32767,me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{he=6,me=null;return}}else if(n=C0(n,t,Oe),n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);he===0&&(he=5)}function Ht(e,t,n){var r=K,a=Ke.transition;try{Ke.transition=null,K=1,T0(e,t,n,r)}finally{Ke.transition=a,K=r}return null}function T0(e,t,n,r){do Nn();while(Et!==null);if(B&6)throw Error(C(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(C(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(gf(e,s),e===ve&&(me=ve=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qr||(qr=!0,nd(ha,function(){return Nn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ke.transition,Ke.transition=null;var l=K;K=1;var i=B;B|=4,oo.current=null,_0(e,n),Gc(n,e),t0(Zs),xa=!!Js,Zs=Js=null,e.current=n,P0(n),sf(),B=i,K=l,Ke.transition=s}else e.current=n;if(qr&&(qr=!1,Et=e,Ra=a),s=e.pendingLanes,s===0&&(Mt=null),uf(n.stateNode),$e(e,fe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(Ma)throw Ma=!1,e=vl,vl=null,e;return Ra&1&&e.tag!==0&&Nn(),s=e.pendingLanes,s&1?e===wl?lr++:(lr=0,wl=e):lr=0,Ft(),null}function Nn(){if(Et!==null){var e=Mu(Ra),t=Ke.transition,n=K;try{if(Ke.transition=null,K=16>e?16:e,Et===null)var r=!1;else{if(e=Et,Et=null,Ra=0,B&6)throw Error(C(331));var a=B;for(B|=4,I=e.current;I!==null;){var s=I,l=s.child;if(I.flags&16){var i=s.deletions;if(i!==null){for(var u=0;u<i.length;u++){var d=i[u];for(I=d;I!==null;){var g=I;switch(g.tag){case 0:case 11:case 15:ar(8,g,s)}var h=g.child;if(h!==null)h.return=g,I=h;else for(;I!==null;){g=I;var m=g.sibling,v=g.return;if(Hc(g),g===d){I=null;break}if(m!==null){m.return=v,I=m;break}I=v}}}var k=s.alternate;if(k!==null){var x=k.child;if(x!==null){k.child=null;do{var _=x.sibling;x.sibling=null,x=_}while(x!==null)}}I=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,I=l;else e:for(;I!==null;){if(s=I,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ar(9,s,s.return)}var f=s.sibling;if(f!==null){f.return=s.return,I=f;break e}I=s.return}}var c=e.current;for(I=c;I!==null;){l=I;var p=l.child;if(l.subtreeFlags&2064&&p!==null)p.return=l,I=p;else e:for(l=c;I!==null;){if(i=I,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:Qa(9,i)}}catch(P){ie(i,i.return,P)}if(i===l){I=null;break e}var b=i.sibling;if(b!==null){b.return=i.return,I=b;break e}I=i.return}}if(B=a,Ft(),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot($a,e)}catch{}r=!0}return r}finally{K=n,Ke.transition=t}}return!1}function Ai(e,t,n){t=Pn(n,t),t=Mc(e,t,1),e=Dt(e,t,1),t=Pe(),e!==null&&(Er(e,1,t),$e(e,t))}function ie(e,t,n){if(e.tag===3)Ai(e,e,n);else for(;t!==null;){if(t.tag===3){Ai(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mt===null||!Mt.has(r))){e=Pn(n,e),e=Rc(t,e,1),t=Dt(t,e,1),e=Pe(),t!==null&&(Er(t,1,e),$e(t,e));break}}t=t.return}}function I0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Pe(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(be&n)===n&&(he===4||he===3&&(be&130023424)===be&&500>fe()-uo?Kt(e,0):io|=n),$e(e,t)}function ed(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=Pe();e=xt(e,t),e!==null&&(Er(e,t,n),$e(e,n))}function L0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function $0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),ed(e,n)}var td;td=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Te=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Te=!1,j0(e,t,n);Te=!!(e.flags&131072)}else Te=!1,te&&t.flags&1048576&&sc(t,ja,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oa(e,t),e=t.pendingProps;var a=Cn(t,Ae.current);Sn(t,n),a=no(null,t,r,e,a,n);var s=ro();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(s=!0,Sa(t)):s=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Xl(t),a.updater=Ba,t.stateNode=a,a._reactInternals=t,il(t,r,e,n),t=dl(null,t,r,!0,s,n)):(t.tag=0,te&&s&&Hl(t),_e(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oa(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=F0(r),e=Ze(r,e),a){case 0:t=cl(null,t,r,e,n);break e;case 1:t=xi(null,t,r,e,n);break e;case 11:t=hi(null,t,r,e,n);break e;case 14:t=yi(null,t,r,Ze(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ze(r,a),cl(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ze(r,a),xi(e,t,r,a,n);case 3:e:{if($c(t),e===null)throw Error(C(387));r=t.pendingProps,s=t.memoizedState,a=s.element,dc(e,t),Aa(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){a=Pn(Error(C(423)),t),t=vi(e,t,r,n,a);break e}else if(r!==a){a=Pn(Error(C(424)),t),t=vi(e,t,r,n,a);break e}else for(Fe=zt(t.stateNode.containerInfo.firstChild),We=t,te=!0,tt=null,n=uc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(En(),r===a){t=vt(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return fc(t),e===null&&sl(t),r=t.type,a=t.pendingProps,s=e!==null?e.memoizedProps:null,l=a.children,el(r,a)?l=null:s!==null&&el(r,s)&&(t.flags|=32),Lc(e,t),_e(e,t,l,n),t.child;case 6:return e===null&&sl(t),null;case 13:return Oc(e,t,n);case 4:return Jl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=An(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ze(r,a),hi(e,t,r,a,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,s=t.memoizedProps,l=a.value,J(Ca,r._currentValue),r._currentValue=l,s!==null)if(at(s.value,l)){if(s.children===a.children&&!Ie.current){t=vt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var i=s.dependencies;if(i!==null){l=s.child;for(var u=i.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=gt(-1,n&-n),u.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var g=d.pending;g===null?u.next=u:(u.next=g.next,g.next=u),d.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),ll(s.return,n,t),i.lanes|=n;break}u=u.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(C(341));l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),ll(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}_e(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Sn(t,n),a=qe(a),r=r(a),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,a=Ze(r,t.pendingProps),a=Ze(r.type,a),yi(e,t,r,a,n);case 15:return Tc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ze(r,a),oa(e,t),t.tag=1,Le(r)?(e=!0,Sa(t)):e=!1,Sn(t,n),Dc(t,r,a),il(t,r,a,n),dl(null,t,r,!0,e,n);case 19:return Fc(e,t,n);case 22:return Ic(e,t,n)}throw Error(C(156,t.tag))};function nd(e,t){return _u(e,t)}function O0(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 Ge(e,t,n,r){return new O0(e,t,n,r)}function mo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function F0(e){if(typeof e=="function")return mo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dl)return 11;if(e===Ml)return 14}return 2}function Tt(e,t){var n=e.alternate;return n===null?(n=Ge(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 ca(e,t,n,r,a,s){var l=2;if(r=e,typeof e=="function")mo(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case on:return qt(n.children,a,s,t);case zl:l=8,a|=8;break;case Ds:return e=Ge(12,n,t,a|2),e.elementType=Ds,e.lanes=s,e;case Ms:return e=Ge(13,n,t,a),e.elementType=Ms,e.lanes=s,e;case Rs:return e=Ge(19,n,t,a),e.elementType=Rs,e.lanes=s,e;case fu:return Ka(n,a,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cu:l=10;break e;case du:l=9;break e;case Dl:l=11;break e;case Ml:l=14;break e;case bt:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=Ge(l,n,t,a),t.elementType=e,t.type=r,t.lanes=s,t}function qt(e,t,n,r){return e=Ge(7,e,r,t),e.lanes=n,e}function Ka(e,t,n,r){return e=Ge(22,e,r,t),e.elementType=fu,e.lanes=n,e.stateNode={isHidden:!1},e}function Es(e,t,n){return e=Ge(6,e,null,t),e.lanes=n,e}function As(e,t,n){return t=Ge(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W0(e,t,n,r,a){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=is(0),this.expirationTimes=is(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=is(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function go(e,t,n,r,a,s,l,i,u){return e=new W0(e,t,n,i,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ge(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xl(s),e}function V0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ln,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rd(e){if(!e)return Lt;e=e._reactInternals;e:{if(rn(e)!==e||e.tag!==1)throw Error(C(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Le(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(C(171))}if(e.tag===1){var n=e.type;if(Le(n))return rc(e,n,t)}return t}function ad(e,t,n,r,a,s,l,i,u){return e=go(n,r,!0,e,a,s,l,i,u),e.context=rd(null),n=e.current,r=Pe(),a=Rt(n),s=gt(r,a),s.callback=t??null,Dt(n,s,a),e.current.lanes=a,Er(e,a,r),$e(e,r),e}function qa(e,t,n,r){var a=t.current,s=Pe(),l=Rt(a);return n=rd(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Dt(a,t,l),e!==null&&(rt(e,a,l,s),aa(e,a,l)),l}function Ia(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 _i(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ho(e,t){_i(e,t),(e=e.alternate)&&_i(e,t)}function U0(){return null}var sd=typeof reportError=="function"?reportError:function(e){console.error(e)};function yo(e){this._internalRoot=e}Ya.prototype.render=yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(C(409));qa(e,t,null,null)};Ya.prototype.unmount=yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tn(function(){qa(null,e,null,null)}),t[yt]=null}};function Ya(e){this._internalRoot=e}Ya.prototype.unstable_scheduleHydration=function(e){if(e){var t=Iu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&t!==0&&t<Nt[n].priority;n++);Nt.splice(n,0,e),n===0&&$u(e)}};function xo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Pi(){}function H0(e,t,n,r,a){if(a){if(typeof r=="function"){var s=r;r=function(){var d=Ia(l);s.call(d)}}var l=ad(t,r,e,0,null,!1,!1,"",Pi);return e._reactRootContainer=l,e[yt]=l.current,gr(e.nodeType===8?e.parentNode:e),tn(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof r=="function"){var i=r;r=function(){var d=Ia(u);i.call(d)}}var u=go(e,0,!1,null,null,!1,!1,"",Pi);return e._reactRootContainer=u,e[yt]=u.current,gr(e.nodeType===8?e.parentNode:e),tn(function(){qa(t,u,n,r)}),u}function Ja(e,t,n,r,a){var s=n._reactRootContainer;if(s){var l=s;if(typeof a=="function"){var i=a;a=function(){var u=Ia(l);i.call(u)}}qa(t,l,e,a)}else l=H0(n,t,e,a,r);return Ia(l)}Ru=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Yn(t.pendingLanes);n!==0&&(Il(t,n|1),$e(t,fe()),!(B&6)&&(zn=fe()+500,Ft()))}break;case 13:tn(function(){var r=xt(e,1);if(r!==null){var a=Pe();rt(r,e,1,a)}}),ho(e,1)}};Ll=function(e){if(e.tag===13){var t=xt(e,134217728);if(t!==null){var n=Pe();rt(t,e,134217728,n)}ho(e,134217728)}};Tu=function(e){if(e.tag===13){var t=Rt(e),n=xt(e,t);if(n!==null){var r=Pe();rt(n,e,t,r)}ho(e,t)}};Iu=function(){return K};Lu=function(e,t){var n=K;try{return K=e,t()}finally{K=n}};Hs=function(e,t,n){switch(t){case"input":if(Ls(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 a=Va(r);if(!a)throw Error(C(90));mu(r),Ls(r,a)}}}break;case"textarea":hu(e,n);break;case"select":t=n.value,t!=null&&vn(e,!!n.multiple,t,!1)}};Su=co;Nu=tn;var B0={usingClientEntryPoint:!1,Events:[_r,fn,Va,ku,bu,co]},Bn={findFiberByHostInstance:Bt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q0={bundleType:Bn.bundleType,version:Bn.version,rendererPackageName:Bn.rendererPackageName,rendererConfig:Bn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Eu(e),e===null?null:e.stateNode},findFiberByHostInstance:Bn.findFiberByHostInstance||U0,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 Yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yr.isDisabled&&Yr.supportsFiber)try{$a=Yr.inject(Q0),it=Yr}catch{}}Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B0;Ue.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xo(t))throw Error(C(200));return V0(e,t,null,n)};Ue.createRoot=function(e,t){if(!xo(e))throw Error(C(299));var n=!1,r="",a=sd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=go(e,1,!1,null,null,n,!1,r,a),e[yt]=t.current,gr(e.nodeType===8?e.parentNode:e),new yo(t)};Ue.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(C(188)):(e=Object.keys(e).join(","),Error(C(268,e)));return e=Eu(t),e=e===null?null:e.stateNode,e};Ue.flushSync=function(e){return tn(e)};Ue.hydrate=function(e,t,n){if(!Xa(t))throw Error(C(200));return Ja(null,e,t,!0,n)};Ue.hydrateRoot=function(e,t,n){if(!xo(e))throw Error(C(405));var r=n!=null&&n.hydratedSources||null,a=!1,s="",l=sd;if(n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=ad(t,null,e,1,n??null,a,!1,s,l),e[yt]=t.current,gr(e),r)for(e=0;e<r.length;e++)n=r[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Ya(t)};Ue.render=function(e,t,n){if(!Xa(t))throw Error(C(200));return Ja(null,e,t,!1,n)};Ue.unmountComponentAtNode=function(e){if(!Xa(e))throw Error(C(40));return e._reactRootContainer?(tn(function(){Ja(null,null,e,!1,function(){e._reactRootContainer=null,e[yt]=null})}),!0):!1};Ue.unstable_batchedUpdates=co;Ue.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xa(n))throw Error(C(200));if(e==null||e._reactInternals===void 0)throw Error(C(38));return Ja(e,t,n,!1,r)};Ue.version="18.3.1-next-f1338f8080-20240426";function ld(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ld)}catch(e){console.error(e)}}ld(),lu.exports=Ue;var G0=lu.exports,od,zi=G0;od=zi.createRoot,zi.hydrateRoot;/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var K0={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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),F=(e,t)=>{const n=W.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:i="",children:u,...d},g)=>W.createElement("svg",{ref:g,...K0,width:a,height:a,stroke:r,strokeWidth:l?Number(s)*24/Number(a):s,className:["lucide",`lucide-${q0(e)}`,i].join(" "),...d},[...t.map(([h,m])=>W.createElement(h,m)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Y0=F("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X0=F("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J0=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z0=F("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ep=F("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vo=F("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tp=F("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nr=F("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const id=F("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const np=F("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rp=F("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Di=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mi=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ri=F("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ti=F("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ap=F("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sp=F("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lp=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const op=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sl=F("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ip=F("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const up=F("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cp=F("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dp=F("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fp=F("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pp=F("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ii=F("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mp=F("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ud=F("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gp=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cd=F("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hp=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yp=F("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xp=F("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vp=F("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wp=F("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kp=F("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Li=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.344.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=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $i=F("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wo=F("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.344.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=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bp=F("Shield",[["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"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sp=F("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Np=F("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
* @license lucide-react v0.344.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=F("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jp=F("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cp=F("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Oi=F("TestTube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5h0c-1.4 0-2.5-1.1-2.5-2.5V2",key:"187lwq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fi=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ep=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ap=F("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.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _p=F("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yt=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.344.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pp=F("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),zp={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Wi=e=>{let t;const n=new Set,r=(g,h)=>{const m=typeof g=="function"?g(t):g;if(!Object.is(m,t)){const v=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(k=>k(t,v))}},a=()=>t,u={setState:r,getState:a,getInitialState:()=>d,subscribe:g=>(n.add(g),()=>n.delete(g)),destroy:()=>{(zp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,a,u);return u},Dp=e=>e?Wi(e):Wi;var pd={exports:{}},md={},gd={exports:{}},hd={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dn=W;function Mp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rp=typeof Object.is=="function"?Object.is:Mp,Tp=Dn.useState,Ip=Dn.useEffect,Lp=Dn.useLayoutEffect,$p=Dn.useDebugValue;function Op(e,t){var n=t(),r=Tp({inst:{value:n,getSnapshot:t}}),a=r[0].inst,s=r[1];return Lp(function(){a.value=n,a.getSnapshot=t,_s(a)&&s({inst:a})},[e,n,t]),Ip(function(){return _s(a)&&s({inst:a}),e(function(){_s(a)&&s({inst:a})})},[e]),$p(n),n}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rp(e,n)}catch{return!0}}function Fp(e,t){return t()}var Wp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Fp:Op;hd.useSyncExternalStore=Dn.useSyncExternalStore!==void 0?Dn.useSyncExternalStore:Wp;gd.exports=hd;var Vp=gd.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Za=W,Up=Vp;function Hp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bp=typeof Object.is=="function"?Object.is:Hp,Qp=Up.useSyncExternalStore,Gp=Za.useRef,Kp=Za.useEffect,qp=Za.useMemo,Yp=Za.useDebugValue;md.useSyncExternalStoreWithSelector=function(e,t,n,r,a){var s=Gp(null);if(s.current===null){var l={hasValue:!1,value:null};s.current=l}else l=s.current;s=qp(function(){function u(v){if(!d){if(d=!0,g=v,v=r(v),a!==void 0&&l.hasValue){var k=l.value;if(a(k,v))return h=k}return h=v}if(k=h,Bp(g,v))return k;var x=r(v);return a!==void 0&&a(k,x)?(g=v,k):(g=v,h=x)}var d=!1,g,h,m=n===void 0?null:n;return[function(){return u(t())},m===null?void 0:function(){return u(m())}]},[t,n,r,a]);var i=Qp(e,s[0],s[1]);return Kp(function(){l.hasValue=!0,l.value=i},[i]),Yp(i),i};pd.exports=md;var Xp=pd.exports;const Jp=Ki(Xp),yd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Zp}=Td,{useSyncExternalStoreWithSelector:em}=Jp;let Vi=!1;const tm=e=>e;function nm(e,t=tm,n){(yd?"production":void 0)!=="production"&&n&&!Vi&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Vi=!0);const r=em(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Zp(r),r}const rm=e=>{(yd?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Dp(e):e,n=(r,a)=>nm(t,r,a);return Object.assign(n,t),n},am=e=>rm,sm={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function lm(e,t){let n;try{n=e()}catch{return}return{getItem:a=>{var s;const l=u=>u===null?null:JSON.parse(u,void 0),i=(s=n.getItem(a))!=null?s:null;return i instanceof Promise?i.then(l):l(i)},setItem:(a,s)=>n.setItem(a,JSON.stringify(s,void 0)),removeItem:a=>n.removeItem(a)}}const jr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return jr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return jr(r)(n)}}}},om=(e,t)=>(n,r,a)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,f)=>({...f,..._}),...t},l=!1;const i=new Set,u=new Set;let d;try{d=s.getStorage()}catch{}if(!d)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(..._)},r,a);const g=jr(s.serialize),h=()=>{const _=s.partialize({...r()});let f;const c=g({state:_,version:s.version}).then(p=>d.setItem(s.name,p)).catch(p=>{f=p});if(f)throw f;return c},m=a.setState;a.setState=(_,f)=>{m(_,f),h()};const v=e((..._)=>{n(..._),h()},r,a);let k;const x=()=>{var _;if(!d)return;l=!1,i.forEach(c=>c(r()));const f=((_=s.onRehydrateStorage)==null?void 0:_.call(s,r()))||void 0;return jr(d.getItem.bind(d))(s.name).then(c=>{if(c)return s.deserialize(c)}).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==s.version){if(s.migrate)return s.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var p;return k=s.merge(c,(p=r())!=null?p:v),n(k,!0),h()}).then(()=>{f==null||f(k,void 0),l=!0,u.forEach(c=>c(k))}).catch(c=>{f==null||f(void 0,c)})};return a.persist={setOptions:_=>{s={...s,..._},_.getStorage&&(d=_.getStorage())},clearStorage:()=>{d==null||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>x(),hasHydrated:()=>l,onHydrate:_=>(i.add(_),()=>{i.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},x(),k||v},im=(e,t)=>(n,r,a)=>{let s={storage:lm(()=>localStorage),partialize:x=>x,version:0,merge:(x,_)=>({..._,...x}),...t},l=!1;const i=new Set,u=new Set;let d=s.storage;if(!d)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...x)},r,a);const g=()=>{const x=s.partialize({...r()});return d.setItem(s.name,{state:x,version:s.version})},h=a.setState;a.setState=(x,_)=>{h(x,_),g()};const m=e((...x)=>{n(...x),g()},r,a);a.getInitialState=()=>m;let v;const k=()=>{var x,_;if(!d)return;l=!1,i.forEach(c=>{var p;return c((p=r())!=null?p:m)});const f=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(x=r())!=null?x:m))||void 0;return jr(d.getItem.bind(d))(s.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==s.version){if(s.migrate)return[!0,s.migrate(c.state,c.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,c.state];return[!1,void 0]}).then(c=>{var p;const[b,P]=c;if(v=s.merge(P,(p=r())!=null?p:m),n(v,!0),b)return g()}).then(()=>{f==null||f(v,void 0),v=r(),l=!0,u.forEach(c=>c(v))}).catch(c=>{f==null||f(void 0,c)})};return a.persist={setOptions:x=>{s={...s,...x},x.storage&&(d=x.storage)},clearStorage:()=>{d==null||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>k(),hasHydrated:()=>l,onHydrate:x=>(i.add(x),()=>{i.delete(x)}),onFinishHydration:x=>(u.add(x),()=>{u.delete(x)})},s.skipHydration||k(),v||m},um=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((sm?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),om(e,t)):im(e,t),cm=um,Ui={query:"",tags:[],languages:[],platforms:[],sortBy:"stars",sortOrder:"desc",isAnalyzed:void 0,isSubscribed:void 0},Wt=am()(cm((e,t)=>({user:null,githubToken:null,isAuthenticated:!1,repositories:[],isLoading:!1,lastSync:null,aiConfigs:[],activeAIConfig:null,webdavConfigs:[],activeWebDAVConfig:null,lastBackup:null,searchFilters:Ui,searchResults:[],releases:[],releaseSubscriptions:new Set,theme:"light",currentView:"repositories",language:"zh",setUser:n=>{console.log("Setting user:",n),e({user:n,isAuthenticated:!!n})},setGitHubToken:n=>{console.log("Setting GitHub token:",!!n),e({githubToken:n})},logout:()=>e({user:null,githubToken:null,isAuthenticated:!1,repositories:[],releases:[],releaseSubscriptions:new Set,searchResults:[],lastSync:null}),setRepositories:n=>e({repositories:n,searchResults:n}),updateRepository:n=>e(r=>({repositories:r.repositories.map(s=>s.id===n.id?n:s),searchResults:r.searchResults.map(s=>s.id===n.id?n:s)})),setLoading:n=>e({isLoading:n}),setLastSync:n=>e({lastSync:n}),addAIConfig:n=>e(r=>({aiConfigs:[...r.aiConfigs,n]})),updateAIConfig:(n,r)=>e(a=>({aiConfigs:a.aiConfigs.map(s=>s.id===n?{...s,...r}:s)})),deleteAIConfig:n=>e(r=>({aiConfigs:r.aiConfigs.filter(a=>a.id!==n),activeAIConfig:r.activeAIConfig===n?null:r.activeAIConfig})),setActiveAIConfig:n=>e({activeAIConfig:n}),addWebDAVConfig:n=>e(r=>({webdavConfigs:[...r.webdavConfigs,n]})),updateWebDAVConfig:(n,r)=>e(a=>({webdavConfigs:a.webdavConfigs.map(s=>s.id===n?{...s,...r}:s)})),deleteWebDAVConfig:n=>e(r=>({webdavConfigs:r.webdavConfigs.filter(a=>a.id!==n),activeWebDAVConfig:r.activeWebDAVConfig===n?null:r.activeWebDAVConfig})),setActiveWebDAVConfig:n=>e({activeWebDAVConfig:n}),setLastBackup:n=>e({lastBackup:n}),setSearchFilters:n=>e(r=>({searchFilters:{...r.searchFilters,...n}})),setSearchResults:n=>e({searchResults:n}),setReleases:n=>e({releases:n}),addReleases:n=>e(r=>{const a=new Set(r.releases.map(l=>l.id)),s=n.filter(l=>!a.has(l.id));return{releases:[...r.releases,...s]}}),toggleReleaseSubscription:n=>e(r=>{const a=new Set(r.releaseSubscriptions);return a.has(n)?a.delete(n):a.add(n),{releaseSubscriptions:a}}),setTheme:n=>e({theme:n}),setCurrentView:n=>e({currentView:n}),setLanguage:n=>e({language:n})}),{name:"github-stars-manager",partialize:e=>({user:e.user,githubToken:e.githubToken,isAuthenticated:e.isAuthenticated,repositories:e.repositories,lastSync:e.lastSync,aiConfigs:e.aiConfigs,activeAIConfig:e.activeAIConfig,webdavConfigs:e.webdavConfigs,activeWebDAVConfig:e.activeWebDAVConfig,lastBackup:e.lastBackup,releaseSubscriptions:Array.from(e.releaseSubscriptions),releases:e.releases,theme:e.theme,language:e.language}),onRehydrateStorage:()=>e=>{var t,n;e&&(Array.isArray(e.releaseSubscriptions)?e.releaseSubscriptions=new Set(e.releaseSubscriptions):e.releaseSubscriptions=new Set,e.isAuthenticated=!!(e.user&&e.githubToken),e.searchResults=e.repositories||[],e.searchFilters=Ui,e.language||(e.language="zh"),e.webdavConfigs||(e.webdavConfigs=[]),console.log("Store rehydrated:",{isAuthenticated:e.isAuthenticated,repositoriesCount:((t=e.repositories)==null?void 0:t.length)||0,lastSync:e.lastSync,language:e.language,webdavConfigsCount:((n=e.webdavConfigs)==null?void 0:n.length)||0}))}})),dm="https://api.github.com";class zr{constructor(t){this.token=t}async makeRequest(t,n={}){const r=await fetch(`${dm}${t}`,{...n,headers:{Authorization:`Bearer ${this.token}`,Accept:"application/vnd.github.v3+json","X-GitHub-Api-Version":"2022-11-28",...n.headers}});if(!r.ok)throw r.status===401?new Error("GitHub token expired or invalid"):new Error(`GitHub API error: ${r.status} ${r.statusText}`);return r.json()}async getCurrentUser(){return this.makeRequest("/user")}async getStarredRepositories(t=1,n=100){return await this.makeRequest(`/user/starred?page=${t}&per_page=${n}&sort=updated`)}async getAllStarredRepositories(){let t=[],n=1;const r=100;for(;;){const a=await this.getStarredRepositories(n,r);if(a.length===0||(t=[...t,...a],a.length<r))break;n++,await new Promise(s=>setTimeout(s,100))}return t}async getRepositoryReadme(t,n){try{const r=await this.makeRequest(`/repos/${t}/${n}/readme`);return r.encoding==="base64"?atob(r.content):r.content}catch(r){return console.warn(`Failed to fetch README for ${t}/${n}:`,r),""}}async getRepositoryReleases(t,n,r=1,a=30){try{return(await this.makeRequest(`/repos/${t}/${n}/releases?page=${r}&per_page=${a}`)).map(l=>({id:l.id,tag_name:l.tag_name,name:l.name||l.tag_name,body:l.body||"",published_at:l.published_at,html_url:l.html_url,repository:{id:0,full_name:`${t}/${n}`,name:n}}))}catch(s){return console.warn(`Failed to fetch releases for ${t}/${n}:`,s),[]}}async getMultipleRepositoryReleases(t){const n=[];for(const r of t){const[a,s]=r.full_name.split("/"),l=await this.getRepositoryReleases(a,s,1,5);l.forEach(i=>{i.repository.id=r.id}),n.push(...l),await new Promise(i=>setTimeout(i,150))}return n.sort((r,a)=>new Date(a.published_at).getTime()-new Date(r.published_at).getTime())}async getIncrementalRepositoryReleases(t,n,r,a=10){try{let s=`/repos/${t}/${n}/releases?per_page=${a}`;const i=(await this.makeRequest(s)).map(u=>({id:u.id,tag_name:u.tag_name,name:u.name||u.tag_name,body:u.body||"",published_at:u.published_at,html_url:u.html_url,repository:{id:0,full_name:`${t}/${n}`,name:n}}));if(r){const u=new Date(r);return i.filter(d=>new Date(d.published_at)>u)}return i}catch(s){return console.warn(`Failed to fetch incremental releases for ${t}/${n}:`,s),[]}}async checkRateLimit(){const t=await this.makeRequest("/rate_limit");return{remaining:t.rate.remaining,reset:t.rate.reset}}}const fm=()=>{const[e,t]=W.useState(""),[n,r]=W.useState(!1),[a,s]=W.useState(""),{setUser:l,setGitHubToken:i,repositories:u,lastSync:d}=Wt(),g=async()=>{if(!e.trim()){s("Please enter a valid GitHub token");return}r(!0),s("");try{const v=await new zr(e).getCurrentUser();i(e),l(v),console.log("Successfully authenticated user:",v)}catch(m){console.error("Authentication failed:",m),s(m instanceof Error?m.message:"Failed to authenticate. Please check your token.")}finally{r(!1)}},h=m=>{m.key==="Enter"&&!n&&g()};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center p-4",children:o.jsxs("div",{className:"max-w-md w-full",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"flex items-center justify-center w-16 h-16 bg-blue-600 rounded-2xl mx-auto mb-4 shadow-lg",children:o.jsx(ko,{className:"w-8 h-8 text-white"})}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"GitHub Stars Manager"}),o.jsx("p",{className:"text-gray-600 text-lg",children:"AI-powered repository management"})]}),o.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-gray-200 p-8",children:[o.jsxs("div",{className:"text-center mb-6",children:[o.jsx(mp,{className:"w-10 h-10 text-gray-700 mx-auto mb-3"}),o.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Connect with GitHub"}),o.jsx("p",{className:"text-gray-600 text-sm",children:"Enter your GitHub personal access token to get started"})]}),u.length>0&&d&&o.jsxs("div",{className:"mb-4 p-3 bg-green-50 border border-green-200 rounded-lg",children:[o.jsxs("div",{className:"flex items-center space-x-2 text-green-700",children:[o.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),o.jsxs("span",{className:"text-sm font-medium",children:["已缓存 ",u.length," 个仓库"]})]}),o.jsxs("p",{className:"text-xs text-green-600 mt-1",children:["上次同步: ",new Date(d).toLocaleString()]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"GitHub Personal Access Token"}),o.jsxs("div",{className:"relative",children:[o.jsx(cd,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),o.jsx("input",{type:"password",placeholder:"ghp_xxxxxxxxxxxxxxxxxxxx",value:e,onChange:m=>{t(m.target.value),s("")},onKeyPress:h,disabled:n,className:"w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white text-gray-900 disabled:bg-gray-50 disabled:text-gray-500"})]})]}),a&&o.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-red-50 border border-red-200 rounded-lg",children:[o.jsx(Y0,{className:"w-5 h-5 text-red-500 flex-shrink-0"}),o.jsx("p",{className:"text-sm text-red-700",children:a})]}),o.jsx("button",{onClick:g,disabled:n||!e.trim(),className:"w-full flex items-center justify-center space-x-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed text-white rounded-lg font-medium transition-colors",children:n?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),o.jsx("span",{children:"Connecting..."})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{children:"Connect to GitHub"}),o.jsx(J0,{className:"w-5 h-5"})]})})]}),o.jsxs("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2 text-sm",children:"How to create a GitHub token:"}),o.jsxs("ol",{className:"text-xs text-gray-600 space-y-1",children:[o.jsx("li",{children:"1. Go to GitHub Settings → Developer settings → Personal access tokens"}),o.jsx("li",{children:'2. Click "Generate new token (classic)"'}),o.jsxs("li",{children:["3. Select scopes: ",o.jsx("strong",{children:"repo"})," and ",o.jsx("strong",{children:"user"})]}),o.jsx("li",{children:"4. Copy the generated token and paste it above"})]}),o.jsx("div",{className:"mt-3",children:o.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 text-sm font-medium hover:underline",children:"Create token on GitHub →"})})]})]})]})})},pm=()=>{const{user:e,theme:t,currentView:n,isLoading:r,lastSync:a,githubToken:s,repositories:l,setTheme:i,setCurrentView:u,setRepositories:d,setReleases:g,setLoading:h,setLastSync:m,logout:v}=Wt(),k=async()=>{if(!s){alert("GitHub token not found. Please login again.");return}h(!0);try{const _=new zr(s);console.log("Fetching starred repositories...");const f=await _.getAllStarredRepositories(),c=new Map(l.map(j=>[j.id,j])),p=f.map(j=>{const N=c.get(j.id);return N?{...j,ai_summary:N.ai_summary,ai_tags:N.ai_tags,ai_platforms:N.ai_platforms,analyzed_at:N.analyzed_at}:j});d(p),console.log("Fetching releases...");const b=await _.getMultipleRepositoryReleases(p.slice(0,20));g(b),m(new Date().toISOString()),console.log("Sync completed successfully");const P=f.length-l.length;P>0?alert(`同步完成!发现 ${P} 个新仓库。`):alert("同步完成!所有仓库都是最新的。")}catch(_){console.error("Sync failed:",_),_ instanceof Error&&_.message.includes("token")?(alert("GitHub token 已过期或无效,请重新登录。"),v()):alert("同步失败,请检查网络连接。")}finally{h(!1)}},x=_=>{if(!_)return"Never";const f=new Date(_),p=new Date().getTime()-f.getTime(),b=Math.floor(p/(1e3*60*60));return b<1?"Just now":b<24?`${b}h ago`:f.toLocaleDateString()};return o.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"flex items-center justify-between h-16",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-600 rounded-lg",children:o.jsx(ko,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"GitHub Stars Manager"}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"AI-powered repository management"})]})]}),o.jsxs("nav",{className:"hidden md:flex items-center space-x-1",children:[o.jsxs("button",{onClick:()=>u("repositories"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${n==="repositories"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(wo,{className:"w-4 h-4 inline mr-2"}),"Repositories (",l.length,")"]}),o.jsxs("button",{onClick:()=>u("releases"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${n==="releases"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(id,{className:"w-4 h-4 inline mr-2"}),"Releases"]}),o.jsxs("button",{onClick:()=>u("settings"),className:`px-4 py-2 rounded-lg font-medium transition-colors ${n==="settings"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsx(fd,{className:"w-4 h-4 inline mr-2"}),"Settings"]})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("div",{className:"hidden sm:flex items-center space-x-2 text-sm text-gray-500 dark:text-gray-400",children:[o.jsxs("span",{children:["Last sync: ",x(a)]}),o.jsx("button",{onClick:k,disabled:r,className:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors disabled:opacity-50",title:"Sync repositories",children:o.jsx(dd,{className:`w-4 h-4 ${r?"animate-spin":""}`})})]}),o.jsx("button",{onClick:()=>i(t==="light"?"dark":"light"),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:"Toggle theme",children:t==="light"?o.jsx(yp,{className:"w-5 h-5 text-gray-700 dark:text-gray-300"}):o.jsx(jp,{className:"w-5 h-5 text-gray-700 dark:text-gray-300"})}),e&&o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("img",{src:e.avatar_url,alt:e.name||e.login,className:"w-8 h-8 rounded-full"}),o.jsx("div",{className:"hidden sm:block",children:o.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:e.name||e.login})}),o.jsx("button",{onClick:v,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:"Logout",children:o.jsx(hp,{className:"w-4 h-4 text-gray-700 dark:text-gray-300"})})]})]})]})})})};class es{constructor(t,n="zh"){this.config=t,this.language=n}async analyzeRepository(t,n){var a,s;const r=this.createAnalysisPrompt(t,n);try{const l=await fetch(`${this.config.baseUrl}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify({model:this.config.model,messages:[{role:"system",content:this.language==="zh"?"你是一个专业的GitHub仓库分析助手。请用中文简洁地分析仓库提供实用的概述、分类标签和支持的平台类型。":"You are a professional GitHub repository analysis assistant. Please analyze repositories concisely in English, providing practical overviews, category tags, and supported platform types."},{role:"user",content:r}],temperature:.3,max_tokens:400})});if(!l.ok)throw new Error(`AI API error: ${l.status} ${l.statusText}`);const u=(s=(a=(await l.json()).choices[0])==null?void 0:a.message)==null?void 0:s.content;if(!u)throw new Error("No content received from AI service");return this.parseAIResponse(u)}catch(l){return console.error("AI analysis failed:",l),this.fallbackAnalysis(t)}}createAnalysisPrompt(t,n){var a;const r=`
${this.language==="zh"?"仓库名称":"Repository Name"}: ${t.full_name}
${this.language==="zh"?"描述":"Description"}: ${t.description||(this.language==="zh"?"无描述":"No description")}
${this.language==="zh"?"编程语言":"Programming Language"}: ${t.language||(this.language==="zh"?"未知":"Unknown")}
${this.language==="zh"?"Star数":"Stars"}: ${t.stargazers_count}
${this.language==="zh"?"主题标签":"Topics"}: ${((a=t.topics)==null?void 0:a.join(", "))||(this.language==="zh"?"无":"None")}
${this.language==="zh"?"README内容 (前2000字符)":"README Content (first 2000 characters)"}:
${n.substring(0,2e3)}
`.trim();return this.language==="zh"?`
请分析这个GitHub仓库并提供
1. 一个简洁的中文概述不超过50字说明这个仓库的主要功能和用途
2. 3-5个相关的应用类型标签用中文类似应用商店的分类开发工具、Web应用、移动应用、数据库、AI工具等
3. 支持的平台类型从以下选择mac、windows、linux、ios、android、docker、web、cli
请以JSON格式回复
{
"summary": "你的中文概述",
"tags": ["标签1", "标签2", "标签3", "标签4", "标签5"],
"platforms": ["platform1", "platform2", "platform3"]
}
仓库信息:
${r}
重点关注实用性和准确的分类,帮助用户快速理解仓库的用途和支持的平台。
`.trim():`
Please analyze this GitHub repository and provide:
1. A concise English overview (no more than 50 words) explaining the main functionality and purpose of this repository
2. 3-5 relevant application type tags (in English, similar to app store categories, such as: development tools, web apps, mobile apps, database, AI tools, etc.)
3. Supported platform types (choose from: mac, windows, linux, ios, android, docker, web, cli)
Please reply in JSON format:
{
"summary": "Your English overview",
"tags": ["tag1", "tag2", "tag3", "tag4", "tag5"],
"platforms": ["platform1", "platform2", "platform3"]
}
Repository information:
${r}
Focus on practicality and accurate categorization to help users quickly understand the repository's purpose and supported platforms.
`.trim()}parseAIResponse(t){try{const n=t.match(/\{[\s\S]*\}/);if(n){const r=JSON.parse(n[0]);return{summary:r.summary||(this.language==="zh"?"无法生成概述":"Unable to generate summary"),tags:Array.isArray(r.tags)?r.tags.slice(0,5):[],platforms:Array.isArray(r.platforms)?r.platforms.slice(0,8):[]}}return{summary:t.substring(0,50)+"...",tags:[],platforms:[]}}catch(n){return console.error("Failed to parse AI response:",n),{summary:this.language==="zh"?"分析失败":"Analysis failed",tags:[],platforms:[]}}}fallbackAnalysis(t){const n=t.description?`${t.description}${t.language||(this.language==="zh"?"未知语言":"Unknown language")}${this.language==="zh"?"项目":" project"}`:this.language==="zh"?`一个${t.language||"软件"}项目,拥有${t.stargazers_count}个星标`:`A ${t.language||"software"} project with ${t.stargazers_count} stars`,r=[],a=[];if(t.language){const g=(this.language==="zh"?{JavaScript:{tag:"Web应用",platforms:["web","cli"]},TypeScript:{tag:"Web应用",platforms:["web","cli"]},Python:{tag:"Python工具",platforms:["linux","mac","windows","cli"]},Java:{tag:"Java应用",platforms:["linux","mac","windows"]},Go:{tag:"系统工具",platforms:["linux","mac","windows","cli"]},Rust:{tag:"系统工具",platforms:["linux","mac","windows","cli"]},"C++":{tag:"系统软件",platforms:["linux","mac","windows"]},C:{tag:"系统软件",platforms:["linux","mac","windows"]},Swift:{tag:"移动应用",platforms:["ios","mac"]},Kotlin:{tag:"移动应用",platforms:["android"]},Dart:{tag:"移动应用",platforms:["ios","android"]},PHP:{tag:"Web应用",platforms:["web","linux"]},Ruby:{tag:"Web应用",platforms:["web","linux","mac"]},Shell:{tag:"脚本工具",platforms:["linux","mac","cli"]}}:{JavaScript:{tag:"Web App",platforms:["web","cli"]},TypeScript:{tag:"Web App",platforms:["web","cli"]},Python:{tag:"Python Tool",platforms:["linux","mac","windows","cli"]},Java:{tag:"Java App",platforms:["linux","mac","windows"]},Go:{tag:"System Tool",platforms:["linux","mac","windows","cli"]},Rust:{tag:"System Tool",platforms:["linux","mac","windows","cli"]},"C++":{tag:"System Software",platforms:["linux","mac","windows"]},C:{tag:"System Software",platforms:["linux","mac","windows"]},Swift:{tag:"Mobile App",platforms:["ios","mac"]},Kotlin:{tag:"Mobile App",platforms:["android"]},Dart:{tag:"Mobile App",platforms:["ios","android"]},PHP:{tag:"Web App",platforms:["web","linux"]},Ruby:{tag:"Web App",platforms:["web","linux","mac"]},Shell:{tag:"Script Tool",platforms:["linux","mac","cli"]}})[t.language];g&&(r.push(g.tag),a.push(...g.platforms))}const s=(t.description||"").toLowerCase(),l=t.name.toLowerCase(),i=`${s} ${l}`,u=this.language==="zh"?{web:{keywords:["web","frontend","website"],tag:"Web应用",platforms:["web"]},api:{keywords:["api","backend","server"],tag:"后端服务",platforms:["linux","docker"]},cli:{keywords:["cli","command","tool"],tag:"命令行工具",platforms:["cli","linux","mac","windows"]},library:{keywords:["library","framework","sdk"],tag:"开发库",platforms:[]},mobile:{keywords:["mobile","android","ios"],tag:"移动应用",platforms:[]},game:{keywords:["game","gaming"],tag:"游戏",platforms:["windows","mac","linux"]},ai:{keywords:["ai","ml","machine learning"],tag:"AI工具",platforms:["linux","mac","windows"]},database:{keywords:["database","db","storage"],tag:"数据库",platforms:["linux","docker"]},docker:{keywords:["docker","container"],tag:"容器化",platforms:["docker"]}}:{web:{keywords:["web","frontend","website"],tag:"Web App",platforms:["web"]},api:{keywords:["api","backend","server"],tag:"Backend Service",platforms:["linux","docker"]},cli:{keywords:["cli","command","tool"],tag:"CLI Tool",platforms:["cli","linux","mac","windows"]},library:{keywords:["library","framework","sdk"],tag:"Development Library",platforms:[]},mobile:{keywords:["mobile","android","ios"],tag:"Mobile App",platforms:[]},game:{keywords:["game","gaming"],tag:"Game",platforms:["windows","mac","linux"]},ai:{keywords:["ai","ml","machine learning"],tag:"AI Tool",platforms:["linux","mac","windows"]},database:{keywords:["database","db","storage"],tag:"Database",platforms:["linux","docker"]},docker:{keywords:["docker","container"],tag:"Containerized",platforms:["docker"]}};return Object.values(u).forEach(({keywords:d,tag:g,platforms:h})=>{d.some(m=>i.includes(m))&&(r.push(g),a.push(...h))}),i.includes("android")&&a.push("android"),i.includes("ios")&&a.push("ios"),{summary:n.substring(0,50),tags:[...new Set(r)].slice(0,5),platforms:[...new Set(a)].slice(0,8)}}async testConnection(){try{return(await fetch(`${this.config.baseUrl}/models`,{method:"GET",headers:{Authorization:`Bearer ${this.config.apiKey}`}})).ok}catch{return!1}}async searchRepositories(t,n){var r,a;if(!n.trim())return t;try{const s=this.createSearchPrompt(n),l=await fetch(`${this.config.baseUrl}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify({model:this.config.model,messages:[{role:"system",content:this.language==="zh"?"你是一个智能搜索助手。请分析用户的搜索意图,提取关键词并提供多语言翻译。":"You are an intelligent search assistant. Please analyze user search intent, extract keywords and provide multilingual translations."},{role:"user",content:s}],temperature:.1,max_tokens:200})});if(l.ok){const u=(a=(r=(await l.json()).choices[0])==null?void 0:r.message)==null?void 0:a.content;if(u){const d=this.parseSearchResponse(u);return this.performEnhancedSearch(t,n,d)}}}catch(s){console.warn("AI search failed, falling back to basic search:",s)}return this.performBasicSearch(t,n)}createSearchPrompt(t){return this.language==="zh"?`
用户搜索查询: "${t}"
请分析这个搜索查询并提供:
1. 主要关键词(中英文)
2. 相关的技术术语和同义词
3. 可能的应用类型或分类
以JSON格式回复
{
"keywords": ["关键词1", "keyword1", "关键词2", "keyword2"],
"categories": ["分类1", "category1"],
"synonyms": ["同义词1", "synonym1"]
}
`.trim():`
User search query: "${t}"
Please analyze this search query and provide:
1. Main keywords (in English and Chinese)
2. Related technical terms and synonyms
3. Possible application types or categories
Reply in JSON format:
{
"keywords": ["keyword1", "关键词1", "keyword2", "关键词2"],
"categories": ["category1", "分类1"],
"synonyms": ["synonym1", "同义词1"]
}
`.trim()}parseSearchResponse(t){try{const n=t.match(/\{[\s\S]*\}/);if(n){const r=JSON.parse(n[0]);return[...r.keywords||[],...r.categories||[],...r.synonyms||[]].filter(s=>typeof s=="string"&&s.length>0)}}catch(n){console.warn("Failed to parse AI search response:",n)}return[]}performEnhancedSearch(t,n,r){const a=[n,...r];return t.filter(s=>{const l=[s.name,s.full_name,s.description||"",s.language||"",...s.topics||[],s.ai_summary||"",...s.ai_tags||[],...s.ai_platforms||[]].join(" ").toLowerCase();return a.some(i=>{const u=i.toLowerCase();return l.includes(u)||u.split(/\s+/).every(d=>l.includes(d))})})}performBasicSearch(t,n){const r=n.toLowerCase();return t.filter(a=>{const s=[a.name,a.full_name,a.description||"",a.language||"",...a.topics||[],a.ai_summary||"",...a.ai_tags||[],...a.ai_platforms||[]].join(" ").toLowerCase();return r.split(/\s+/).every(i=>s.includes(i))})}static async searchRepositories(t,n){if(!n.trim())return t;const r=n.toLowerCase();return t.filter(a=>{const s=[a.name,a.full_name,a.description||"",a.language||"",...a.topics||[],a.ai_summary||"",...a.ai_tags||[],...a.ai_platforms||[]].join(" ").toLowerCase();return r.split(/\s+/).every(i=>s.includes(i))})}}const mm=()=>{const{searchFilters:e,repositories:t,releaseSubscriptions:n,aiConfigs:r,activeAIConfig:a,language:s,setSearchFilters:l,setSearchResults:i}=Wt(),[u,d]=W.useState(!1),[g,h]=W.useState(e.query),[m,v]=W.useState(!1),[k,x]=W.useState([]),[_,f]=W.useState([]),[c,p]=W.useState([]);W.useEffect(()=>{const y=[...new Set(t.map(z=>z.language).filter(Boolean))],E=[...new Set([...t.flatMap(z=>z.ai_tags||[]),...t.flatMap(z=>z.topics||[])])],A=[...new Set(t.flatMap(z=>z.ai_platforms||[]))];x(y),f(E),p(A)},[t]),W.useEffect(()=>{(async()=>{e.query&&!m?(v(!0),await b(),v(!1)):e.query||P()})()},[e,t,n]);const b=async()=>{let y=t;if(e.query){const E=r.find(A=>A.id===a);if(E)try{y=await new es(E,s).searchRepositories(y,e.query)}catch(A){console.warn("AI search failed, falling back to basic search:",A),y=j(y,e.query)}else y=j(y,e.query)}y=N(y),i(y)},P=()=>{const y=N(t);i(y)},j=(y,E)=>{const A=E.toLowerCase();return y.filter(z=>{const w=[z.name,z.full_name,z.description||"",z.language||"",...z.topics||[],z.ai_summary||"",...z.ai_tags||[],...z.ai_platforms||[]].join(" ").toLowerCase();return A.split(/\s+/).every(O=>w.includes(O))})},N=y=>{let E=y;return e.languages.length>0&&(E=E.filter(A=>A.language&&e.languages.includes(A.language))),e.tags.length>0&&(E=E.filter(A=>{const z=[...A.ai_tags||[],...A.topics||[]];return e.tags.some(w=>z.includes(w))})),e.platforms.length>0&&(E=E.filter(A=>{const z=A.ai_platforms||[];return e.platforms.some(w=>z.includes(w))})),e.isAnalyzed!==void 0&&(E=E.filter(A=>e.isAnalyzed?!!A.analyzed_at:!A.analyzed_at)),e.isSubscribed!==void 0&&(E=E.filter(A=>e.isSubscribed?n.has(A.id):!n.has(A.id))),e.minStars!==void 0&&(E=E.filter(A=>A.stargazers_count>=e.minStars)),e.maxStars!==void 0&&(E=E.filter(A=>A.stargazers_count<=e.maxStars)),E.sort((A,z)=>{let w,T;switch(e.sortBy){case"stars":w=A.stargazers_count,T=z.stargazers_count;break;case"updated":w=new Date(A.updated_at).getTime(),T=new Date(z.updated_at).getTime();break;case"name":w=A.name.toLowerCase(),T=z.name.toLowerCase();break;default:w=new Date(A.updated_at).getTime(),T=new Date(z.updated_at).getTime()}return e.sortOrder==="desc"?T>w?1:-1:w>T?1:-1}),E},R=()=>{l({query:g})},$=()=>{h(""),l({query:""})},D=y=>{y.key==="Enter"&&R()},q=y=>{const E=e.languages.includes(y)?e.languages.filter(A=>A!==y):[...e.languages,y];l({languages:E})},Y=y=>{const E=e.tags.includes(y)?e.tags.filter(A=>A!==y):[...e.tags,y];l({tags:E})},ue=y=>{const E=e.platforms.includes(y)?e.platforms.filter(A=>A!==y):[...e.platforms,y];l({platforms:E})},pe=()=>{h(""),l({query:"",tags:[],languages:[],platforms:[],sortBy:"stars",sortOrder:"desc",minStars:void 0,maxStars:void 0,isAnalyzed:void 0,isSubscribed:void 0})},ce=e.languages.length+e.tags.length+e.platforms.length+(e.minStars!==void 0?1:0)+(e.maxStars!==void 0?1:0)+(e.isAnalyzed!==void 0?1:0)+(e.isSubscribed!==void 0?1:0),V=y=>({mac:"fab fa-apple",macos:"fab fa-apple",windows:"fab fa-windows",win:"fab fa-windows",linux:"fab fa-linux",ios:"fab fa-apple",android:"fab fa-android",web:"fas fa-globe",cli:"fas fa-terminal",docker:"fab fa-docker"})[y.toLowerCase()]||"fas fa-desktop",U=(y,E)=>s==="zh"?y:E;return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6 mb-6",children:[o.jsxs("div",{className:"relative mb-4",children:[o.jsx(wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),o.jsx("input",{type:"text",placeholder:U("使用自然语言搜索仓库 (例如: '查找所有笔记应用')","Search repositories with natural language (e.g., 'find all note-taking apps')"),value:g,onChange:y=>h(y.target.value),onKeyPress:D,className:"w-full pl-10 pr-32 py-3 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400"}),o.jsxs("div",{className:"absolute right-2 top-1/2 transform -translate-y-1/2 flex items-center space-x-2",children:[g&&o.jsx("button",{onClick:$,className:"p-1.5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",title:U("清除搜索","Clear search"),children:o.jsx(Yt,{className:"w-4 h-4"})}),o.jsx("button",{onClick:R,disabled:m,className:"px-4 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm font-medium disabled:opacity-50",children:m?U("搜索中...","Searching..."):U("搜索","Search")})]})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("button",{onClick:()=>d(!u),className:`flex items-center space-x-2 px-4 py-2 rounded-lg transition-colors ${u||ce>0?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx(Sp,{className:"w-4 h-4"}),o.jsx("span",{children:U("过滤器","Filters")}),ce>0&&o.jsx("span",{className:"bg-blue-600 text-white rounded-full px-2 py-0.5 text-xs",children:ce})]}),ce>0&&o.jsxs("button",{onClick:pe,className:"flex items-center space-x-1 px-3 py-2 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors",children:[o.jsx(Yt,{className:"w-4 h-4"}),o.jsx("span",{children:U("清除全部","Clear all")})]})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("select",{value:e.sortBy,onChange:y=>l({sortBy:y.target.value}),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:"stars",children:U("按星标排序","Sort by Stars")}),o.jsx("option",{value:"updated",children:U("按更新排序","Sort by Updated")}),o.jsx("option",{value:"name",children:U("按名称排序","Sort by Name")})]}),o.jsx("button",{onClick:()=>l({sortOrder:e.sortOrder==="desc"?"asc":"desc"}),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors",children:e.sortOrder==="desc"?"↓":"↑"})]})]}),u&&o.jsxs("div",{className:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:U("状态过滤","Status Filters")}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>l({isAnalyzed:e.isAnalyzed===!0?void 0:!0}),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm transition-colors ${e.isAnalyzed===!0?"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx(np,{className:"w-4 h-4"}),o.jsx("span",{children:U("已AI分析","AI Analyzed")})]}),o.jsxs("button",{onClick:()=>l({isAnalyzed:e.isAnalyzed===!1?void 0:!1}),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm transition-colors ${e.isAnalyzed===!1?"bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx(Yt,{className:"w-4 h-4"}),o.jsx("span",{children:U("未AI分析","Not Analyzed")})]}),o.jsxs("button",{onClick:()=>l({isSubscribed:e.isSubscribed===!0?void 0:!0}),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm transition-colors ${e.isSubscribed===!0?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx(vo,{className:"w-4 h-4"}),o.jsx("span",{children:U("已订阅Release","Subscribed to Releases")})]})]})]}),k.length>0&&o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:U("编程语言","Programming Languages")}),o.jsx("div",{className:"flex flex-wrap gap-2",children:k.slice(0,12).map(y=>o.jsx("button",{onClick:()=>q(y),className:`px-3 py-1.5 rounded-lg text-sm transition-colors ${e.languages.includes(y)?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:y},y))})]}),c.length>0&&o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:U("支持平台","Supported Platforms")}),o.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(y=>o.jsxs("button",{onClick:()=>ue(y),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm transition-colors ${e.platforms.includes(y)?"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx("i",{className:`${V(y)} w-4 h-4`}),o.jsx("span",{children:y})]},y))})]}),_.length>0&&o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:U("标签","Tags")}),o.jsx("div",{className:"flex flex-wrap gap-2",children:_.slice(0,15).map(y=>o.jsx("button",{onClick:()=>Y(y),className:`px-3 py-1.5 rounded-lg text-sm transition-colors ${e.tags.includes(y)?"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:y},y))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:U("Star数量范围","Star Count Range")}),o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("label",{className:"text-sm text-gray-600 dark:text-gray-400",children:U("最小:","Min:")}),o.jsx("input",{type:"number",placeholder:"0",value:e.minStars||"",onChange:y=>l({minStars:y.target.value?parseInt(y.target.value):void 0}),className:"w-24 px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("label",{className:"text-sm text-gray-600 dark:text-gray-400",children:U("最大:","Max:")}),o.jsx("input",{type:"number",placeholder:"∞",value:e.maxStars||"",onChange:y=>l({maxStars:y.target.value?parseInt(y.target.value):void 0}),className:"w-24 px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm"})]})]})]})]})]})};function ke(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function gm(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Xr=43200,Hi=1440;let hm={};function ym(){return hm}function Bi(e){const t=ke(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function da(e,t){const n=ke(e),r=ke(t),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function xm(e){return gm(e,Date.now())}function vm(e,t){const n=ke(e),r=ke(t),a=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return a*12+s}function wm(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function km(e,t){return+ke(e)-+ke(t)}function bm(e){const t=ke(e);return t.setHours(23,59,59,999),t}function Sm(e){const t=ke(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Nm(e){const t=ke(e);return+bm(t)==+Sm(t)}function jm(e,t){const n=ke(e),r=ke(t),a=da(n,r),s=Math.abs(vm(n,r));let l;if(s<1)l=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-a*s);let i=da(n,r)===-a;Nm(ke(e))&&s===1&&da(e,r)===1&&(i=!1),l=a*(s-Number(i))}return l===0?0:l}function Cm(e,t,n){const r=km(e,t)/1e3;return wm(n==null?void 0:n.roundingMethod)(r)}const Em={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Am=(e,t,n)=>{let r;const a=Em[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ps(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const _m={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Pm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dm={date:Ps({formats:_m,defaultWidth:"full"}),time:Ps({formats:Pm,defaultWidth:"full"}),dateTime:Ps({formats:zm,defaultWidth:"full"})},Mm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Rm=(e,t,n,r)=>Mm[e];function Qn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):l;a=e.formattingValues[i]||e.formattingValues[l]}else{const l=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[l]}const s=e.argumentCallback?e.argumentCallback(t):t;return a[s]}}const Tm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Im={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lm={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$m={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Om={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wm=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Vm={ordinalNumber:Wm,era:Qn({values:Tm,defaultWidth:"wide"}),quarter:Qn({values:Im,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qn({values:Lm,defaultWidth:"wide"}),day:Qn({values:$m,defaultWidth:"wide"}),dayPeriod:Qn({values:Om,defaultWidth:"wide",formattingValues:Fm,defaultFormattingWidth:"wide"})};function Gn(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(a);if(!s)return null;const l=s[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?Hm(i,h=>h.test(l)):Um(i,h=>h.test(l));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const g=t.slice(l.length);return{value:d,rest:g}}}function Um(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Hm(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Bm(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],s=t.match(e.parsePattern);if(!s)return null;let l=e.valueCallback?e.valueCallback(s[0]):s[0];l=n.valueCallback?n.valueCallback(l):l;const i=t.slice(a.length);return{value:l,rest:i}}}const Qm=/^(\d+)(th|st|nd|rd)?/i,Gm=/\d+/i,Km={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qm={any:[/^b/i,/^(a|c)/i]},Ym={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xm={any:[/1/i,/2/i,/3/i,/4/i]},Jm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Zm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},eg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},tg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ng={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},rg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ag={ordinalNumber:Bm({matchPattern:Qm,parsePattern:Gm,valueCallback:e=>parseInt(e,10)}),era:Gn({matchPatterns:Km,defaultMatchWidth:"wide",parsePatterns:qm,defaultParseWidth:"any"}),quarter:Gn({matchPatterns:Ym,defaultMatchWidth:"wide",parsePatterns:Xm,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Gn({matchPatterns:Jm,defaultMatchWidth:"wide",parsePatterns:Zm,defaultParseWidth:"any"}),day:Gn({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:tg,defaultParseWidth:"any"}),dayPeriod:Gn({matchPatterns:ng,defaultMatchWidth:"any",parsePatterns:rg,defaultParseWidth:"any"})},sg={code:"en-US",formatDistance:Am,formatLong:Dm,formatRelative:Rm,localize:Vm,match:ag,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lg(e,t,n){const r=ym(),a=(n==null?void 0:n.locale)??r.locale??sg,s=2520,l=da(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const i=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:l});let u,d;l>0?(u=ke(t),d=ke(e)):(u=ke(e),d=ke(t));const g=Cm(d,u),h=(Bi(d)-Bi(u))/1e3,m=Math.round((g-h)/60);let v;if(m<2)return n!=null&&n.includeSeconds?g<5?a.formatDistance("lessThanXSeconds",5,i):g<10?a.formatDistance("lessThanXSeconds",10,i):g<20?a.formatDistance("lessThanXSeconds",20,i):g<40?a.formatDistance("halfAMinute",0,i):g<60?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",1,i):m===0?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",m,i);if(m<45)return a.formatDistance("xMinutes",m,i);if(m<90)return a.formatDistance("aboutXHours",1,i);if(m<Hi){const k=Math.round(m/60);return a.formatDistance("aboutXHours",k,i)}else{if(m<s)return a.formatDistance("xDays",1,i);if(m<Xr){const k=Math.round(m/Hi);return a.formatDistance("xDays",k,i)}else if(m<Xr*2)return v=Math.round(m/Xr),a.formatDistance("aboutXMonths",v,i)}if(v=jm(d,u),v<12){const k=Math.round(m/Xr);return a.formatDistance("xMonths",k,i)}else{const k=v%12,x=Math.trunc(v/12);return k<3?a.formatDistance("aboutXYears",x,i):k<9?a.formatDistance("overXYears",x,i):a.formatDistance("almostXYears",x+1,i)}}function fa(e,t){return lg(e,xm(e),t)}const og=({repository:e,showAISummary:t=!0})=>{var c,p,b,P;const{releaseSubscriptions:n,toggleReleaseSubscription:r,updateRepository:a,githubToken:s,aiConfigs:l,activeAIConfig:i,isLoading:u,setLoading:d,language:g}=Wt(),h=n.has(e.id),m=j=>j>=1e6?`${(j/1e6).toFixed(1)}M`:j>=1e3?`${(j/1e3).toFixed(1)}K`:j.toString(),v=j=>({JavaScript:"#f1e05a",TypeScript:"#3178c6",Python:"#3572A5",Java:"#b07219","C++":"#f34b7d",C:"#555555","C#":"#239120",Go:"#00ADD8",Rust:"#dea584",PHP:"#4F5D95",Ruby:"#701516",Swift:"#fa7343",Kotlin:"#A97BFF",Dart:"#00B4AB",Shell:"#89e051",HTML:"#e34c26",CSS:"#1572B6",Vue:"#4FC08D",React:"#61DAFB"})[j]||"#6b7280",k=j=>({mac:"fab fa-apple",macos:"fab fa-apple",windows:"fab fa-windows",win:"fab fa-windows",linux:"fab fa-linux",ios:"fab fa-apple",android:"fab fa-android",web:"fas fa-globe",cli:"fas fa-terminal",docker:"fab fa-docker"})[j.toLowerCase()]||"fas fa-desktop",x=async()=>{if(!s){alert("GitHub token not found. Please login again.");return}const j=l.find(N=>N.id===i);if(!j){alert("请先在设置中配置AI服务。");return}d(!0);try{const N=new zr(s),R=new es(j,g),[$,D]=e.full_name.split("/"),q=await N.getRepositoryReadme($,D),Y=await R.analyzeRepository(e,q),ue={...e,ai_summary:Y.summary,ai_tags:Y.tags,ai_platforms:Y.platforms,analyzed_at:new Date().toISOString()};a(ue),alert("AI分析完成")}catch(N){console.error("AI analysis failed:",N),alert("AI分析失败请检查AI配置和网络连接。")}finally{d(!1)}},f=t&&e.ai_summary?{content:e.ai_summary,isAI:!0}:e.description?{content:e.description,isAI:!1}:{content:g==="zh"?"暂无描述":"No description available",isAI:!1};return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6 hover:shadow-lg transition-all duration-200 hover:border-blue-300 dark:hover:border-blue-600 animate-slide-up flex flex-col h-full",children:[o.jsxs("div",{className:"flex items-center space-x-3 mb-3",children:[o.jsx("img",{src:e.owner.avatar_url,alt:e.owner.login,className:"w-8 h-8 rounded-full flex-shrink-0"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:e.name}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 truncate",children:e.owner.login})]})]}),o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("button",{onClick:x,disabled:u,className:`p-2 rounded-lg transition-colors ${e.analyzed_at?"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400":"bg-purple-100 text-purple-600 dark:bg-purple-900 dark:text-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800"} disabled:opacity-50`,title:e.analyzed_at?g==="zh"?"已AI分析":"AI Analyzed":g==="zh"?"AI分析此仓库":"Analyze with AI",children:o.jsx(Nr,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>r(e.id),className:`p-2 rounded-lg transition-colors ${h?"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400":"bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600"}`,title:h?"Unsubscribe from releases":"Subscribe to releases",children:h?o.jsx(vo,{className:"w-4 h-4"}):o.jsx(ep,{className:"w-4 h-4"})})]}),o.jsx("div",{children:o.jsx("a",{href:e.html_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-lg bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",title:"View on GitHub",children:o.jsx(Sl,{className:"w-4 h-4"})})})]}),o.jsxs("div",{className:"mb-4 flex-1",children:[o.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm leading-relaxed line-clamp-3 mb-2",children:f.content}),f.isAI&&o.jsxs("div",{className:"flex items-center space-x-1 text-xs text-green-600 dark:text-green-400",children:[o.jsx(Nr,{className:"w-3 h-3"}),o.jsx("span",{children:g==="zh"?"AI总结":"AI Summary"})]})]}),(((c=e.ai_tags)==null?void 0:c.length)||((p=e.topics)==null?void 0:p.length))&&o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[(b=e.ai_tags)==null?void 0:b.slice(0,3).map((j,N)=>o.jsxs("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300 rounded-md text-xs font-medium",children:[o.jsx(Cp,{className:"w-3 h-3 inline mr-1"}),j]},`ai-${N}`)),(P=e.topics)==null?void 0:P.slice(0,2).map((j,N)=>o.jsx("span",{className:"px-2 py-1 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 rounded-md text-xs",children:j},`topic-${N}`))]}),e.ai_platforms&&e.ai_platforms.length>0&&o.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[o.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:g==="zh"?"支持平台:":"Platforms:"}),o.jsx("div",{className:"flex space-x-1",children:e.ai_platforms.slice(0,6).map((j,N)=>o.jsx("div",{className:"w-6 h-6 flex items-center justify-center bg-gray-100 dark:bg-gray-700 rounded text-gray-600 dark:text-gray-400",title:j,children:o.jsx("i",{className:`${k(j)} text-xs`})},N))})]}),o.jsxs("div",{className:"space-y-3 mt-auto",children:[o.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 dark:text-gray-400",children:[o.jsxs("div",{className:"flex items-center space-x-4",children:[e.language&&o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v(e.language)}}),o.jsx("span",{className:"truncate max-w-20",children:e.language})]}),o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(ko,{className:"w-4 h-4"}),o.jsx("span",{children:m(e.stargazers_count)})]})]}),e.analyzed_at&&o.jsxs("div",{className:"flex items-center space-x-1 text-xs",children:[o.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),o.jsx("span",{children:g==="zh"?"AI已分析":"AI analyzed"})]})]}),o.jsxs("div",{className:"flex items-center space-x-1 text-sm text-gray-500 dark:text-gray-400 pt-2 border-t border-gray-100 dark:border-gray-700",children:[o.jsx(id,{className:"w-4 h-4 flex-shrink-0"}),o.jsxs("span",{className:"truncate",children:[g==="zh"?"更新于":"Updated"," ",fa(new Date(e.updated_at),{addSuffix:!0})]})]})]})]})},ig=({repositories:e,selectedCategory:t})=>{const{githubToken:n,aiConfigs:r,activeAIConfig:a,isLoading:s,setLoading:l,updateRepository:i,language:u}=Wt(),[d,g]=W.useState(!0),[h,m]=W.useState(!1),[v,k]=W.useState({current:0,total:0}),[x,_]=W.useState(!1),f=W.useRef(!1),c=W.useRef(!1),p=e.filter(D=>{if(t==="all")return!0;if(D.ai_tags&&D.ai_tags.length>0){const ue=Qi(t);return D.ai_tags.some(pe=>ue.some(ce=>pe.toLowerCase().includes(ce.toLowerCase())||ce.toLowerCase().includes(pe.toLowerCase())))}const q=[D.name,D.description||"",D.language||"",...D.topics||[],D.ai_summary||""].join(" ").toLowerCase();return Qi(t).some(ue=>q.includes(ue.toLowerCase()))}),b=async(D=!1)=>{if(!n){alert(u==="zh"?"GitHub token 未找到,请重新登录。":"GitHub token not found. Please login again.");return}const q=r.find(V=>V.id===a);if(!q){alert(u==="zh"?"请先在设置中配置AI服务。":"Please configure AI service in settings first.");return}const Y=D?p.filter(V=>!V.analyzed_at):p;if(Y.length===0){alert(u==="zh"?D?"所有仓库都已经分析过了!":"没有可分析的仓库!":D?"All repositories have been analyzed!":"No repositories to analyze!");return}const ue=u==="zh"?D?"未分析":"全部":D?"unanalyzed":"all",pe=u==="zh"?`将对 ${Y.length}${ue}仓库进行AI分析这可能需要几分钟时间。是否继续`:`Will analyze ${Y.length} ${ue} repositories with AI. This may take several minutes. Continue?`;if(confirm(pe)){f.current=!1,c.current=!0,l(!0),k({current:0,total:Y.length}),m(!1),_(!1);try{const V=new zr(n),U=new es(q,u);let y=0;for(let A=0;A<Y.length;A++){if(f.current){console.log("Analysis stopped by user");break}for(;x&&!f.current;)await new Promise(w=>setTimeout(w,1e3));if(f.current){console.log("Analysis stopped during pause");break}const z=Y[A];k({current:A+1,total:Y.length});try{const[w,T]=z.full_name.split("/"),O=await V.getRepositoryReadme(w,T),Q=await U.analyzeRepository(z,O),G={...z,ai_summary:Q.summary,ai_tags:Q.tags,ai_platforms:Q.platforms,analyzed_at:new Date().toISOString()};i(G),y++,await new Promise(ne=>setTimeout(ne,1e3))}catch(w){console.warn(`Failed to analyze ${z.full_name}:`,w)}}const E=f.current?u==="zh"?`AI分析已停止已成功分析了 ${y} 个仓库。`:`AI analysis stopped! Successfully analyzed ${y} repositories.`:u==="zh"?`AI分析完成成功分析了 ${y} 个仓库。`:`AI analysis completed! Successfully analyzed ${y} repositories.`;alert(E)}catch(V){console.error("AI analysis failed:",V),alert(u==="zh"?"AI分析失败请检查AI配置和网络连接。":"AI analysis failed. Please check AI configuration and network connection.")}finally{c.current=!1,f.current=!1,l(!1),k({current:0,total:0}),_(!1)}}},P=()=>{c.current&&(_(!x),console.log(x?"Analysis resumed":"Analysis paused"))},j=()=>{if(!c.current)return;confirm(u==="zh"?"确定要停止AI分析吗已分析的结果将会保存。":"Are you sure you want to stop AI analysis? Analyzed results will be saved.")&&(f.current=!0,_(!1),console.log("Stop requested by user"))};if(p.length===0)return o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:t==="all"?u==="zh"?"未找到仓库。点击同步加载您的星标仓库。":"No repositories found. Click sync to load your starred repositories.":u==="zh"?`在"${Gi(t)}"分类中未找到仓库。`:`No repositories found in "${Gi(t)}" category.`})});const N=p.filter(D=>!D.analyzed_at).length,R=p.filter(D=>D.analyzed_at).length,$=(D,q)=>u==="zh"?D:q;return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-4",children:[o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>m(!h),disabled:s,className:"flex items-center space-x-2 px-4 py-2 bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300 rounded-lg hover:bg-purple-200 dark:hover:bg-purple-800 transition-colors disabled:opacity-50",children:[o.jsx(Nr,{className:"w-4 h-4"}),o.jsx("span",{children:s?$(`AI分析中... (${v.current}/${v.total})`,`AI Analyzing... (${v.current}/${v.total})`):$("AI分析","AI Analysis")}),o.jsx(rp,{className:"w-4 h-4"})]}),h&&!s&&o.jsxs("div",{className:"absolute top-full left-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[o.jsxs("button",{onClick:()=>b(!1),className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border-b border-gray-100 dark:border-gray-600",children:[o.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:$("分析全部","Analyze All")}),o.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:$(`分析 ${p.length} 个仓库`,`Analyze ${p.length} repositories`)})]}),o.jsxs("button",{onClick:()=>b(!0),disabled:N===0,className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:$("分析未分析的","Analyze Unanalyzed")}),o.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:$(`分析 ${N} 个未分析仓库`,`Analyze ${N} unanalyzed repositories`)})]})]})]}),s&&v.total>0&&o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"w-32 bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:o.jsx("div",{className:"bg-purple-600 h-2 rounded-full transition-all duration-300",style:{width:`${v.current/v.total*100}%`}})}),o.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[Math.round(v.current/v.total*100),"%"]}),o.jsx("button",{onClick:P,className:"p-1.5 rounded-lg bg-yellow-100 text-yellow-700 dark:bg-yellow-900 dark:text-yellow-300 hover:bg-yellow-200 dark:hover:bg-yellow-800 transition-colors",title:x?$("继续","Resume"):$("暂停","Pause"),children:x?o.jsx(kp,{className:"w-4 h-4"}):o.jsx(wp,{className:"w-4 h-4"})}),o.jsx("button",{onClick:j,className:"px-3 py-1.5 rounded-lg bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300 hover:bg-red-200 dark:hover:bg-red-800 transition-colors text-sm",children:$("停止","Stop")})]}),!s&&o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:$("显示内容:","Display:")}),o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"displayContent",checked:d,onChange:()=>g(!0),className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:$("AI总结","AI Summary")})]}),o.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"displayContent",checked:!d,onChange:()=>g(!1),className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:$("原始描述","Original Description")})]})]})]})]}),o.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[$(`显示 ${p.length} 个仓库`,`Showing ${p.length} repositories`),R>0&&o.jsxs("span",{className:"ml-2",children:["• ",R," ",$("个已AI分析","AI analyzed")]}),N>0&&o.jsxs("span",{className:"ml-2",children:["• ",N," ",$("个未分析","unanalyzed")]})]})]}),o.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:p.map(D=>o.jsx(og,{repository:D,showAISummary:d},D.id))})]})};function Qi(e){return{web:["web应用","web","website","frontend","react","vue","angular"],mobile:["移动应用","mobile","android","ios","flutter","react-native"],desktop:["桌面应用","desktop","electron","gui","qt","gtk"],database:["数据库","database","sql","nosql","mongodb","mysql","postgresql"],ai:["ai工具","ai","ml","machine learning","deep learning","neural"],devtools:["开发工具","tool","cli","build","deploy","debug","test","automation"],security:["安全工具","security","encryption","auth","vulnerability"],game:["游戏","game","gaming","unity","unreal","godot"],design:["设计工具","design","ui","ux","graphics","image"],productivity:["效率工具","productivity","note","todo","calendar","task"],education:["教育学习","education","learning","tutorial","course"],social:["社交网络","social","chat","messaging","communication"],analytics:["数据分析","analytics","data","visualization","chart"]}[e]||[]}function Gi(e){return{web:"Web应用",mobile:"移动应用",desktop:"桌面应用",database:"数据库",ai:"AI/机器学习",devtools:"开发工具",security:"安全工具",game:"游戏",design:"设计工具",productivity:"效率工具",education:"教育学习",social:"社交网络",analytics:"数据分析"}[e]||e}const ug=[{id:"all",name:"全部分类",icon:fp,keywords:[]},{id:"web",name:"Web应用",icon:ud,keywords:["web应用","web","website","frontend","react","vue","angular"]},{id:"mobile",name:"移动应用",icon:Np,keywords:["移动应用","mobile","android","ios","flutter","react-native"]},{id:"desktop",name:"桌面应用",icon:sp,keywords:["桌面应用","desktop","electron","gui","qt","gtk"]},{id:"database",name:"数据库",icon:lp,keywords:["数据库","database","sql","nosql","mongodb","mysql","postgresql"]},{id:"ai",name:"AI/机器学习",icon:Nr,keywords:["ai工具","ai","ml","machine learning","deep learning","neural"]},{id:"devtools",name:"开发工具",icon:_p,keywords:["开发工具","tool","cli","build","deploy","debug","test","automation"]},{id:"security",name:"安全工具",icon:bp,keywords:["安全工具","security","encryption","auth","vulnerability"]},{id:"game",name:"游戏",icon:pp,keywords:["游戏","game","gaming","unity","unreal","godot"]},{id:"design",name:"设计工具",icon:vp,keywords:["设计工具","design","ui","ux","graphics","image"]},{id:"productivity",name:"效率工具",icon:Pp,keywords:["效率工具","productivity","note","todo","calendar","task"]},{id:"education",name:"教育学习",icon:tp,keywords:["教育学习","education","learning","tutorial","course"]},{id:"social",name:"社交网络",icon:Ap,keywords:["社交网络","social","chat","messaging","communication"]},{id:"analytics",name:"数据分析",icon:Z0,keywords:["数据分析","analytics","data","visualization","chart"]}],cg=({repositories:e,selectedCategory:t,onCategorySelect:n})=>{const r=a=>a.id==="all"?e.length:e.filter(s=>{if(s.ai_tags&&s.ai_tags.length>0)return s.ai_tags.some(i=>a.keywords.some(u=>i.toLowerCase().includes(u.toLowerCase())||u.toLowerCase().includes(i.toLowerCase())));const l=[s.name,s.description||"",s.language||"",...s.topics||[],s.ai_summary||""].join(" ").toLowerCase();return a.keywords.some(i=>l.includes(i.toLowerCase()))}).length;return o.jsxs("div",{className:"w-64 bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-4 h-fit sticky top-24",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"应用分类"}),o.jsx("div",{className:"space-y-1",children:ug.map(a=>{const s=r(a),l=a.icon,i=t===a.id;return o.jsxs("button",{onClick:()=>n(a.id),className:`w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-left transition-colors ${i?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx(l,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:a.name})]}),o.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${i?"bg-blue-200 text-blue-800 dark:bg-blue-800 dark:text-blue-200":"bg-gray-200 text-gray-600 dark:bg-gray-600 dark:text-gray-400"}`,children:s})]},a.id)})})]})},dg=()=>{const{releases:e,repositories:t,releaseSubscriptions:n,githubToken:r,language:a,setReleases:s,addReleases:l}=Wt(),[i,u]=W.useState(""),[d,g]=W.useState([]),[h,m]=W.useState(!1),[v,k]=W.useState(null),[x,_]=W.useState(1),[f,c]=W.useState(100),[p,b]=W.useState("compact"),P=w=>{const T=w.toLowerCase(),O=[];return Object.entries({windows:[".exe",".msi",".zip",".7z","windows","win32","win64","win-x64","win-x86","win-arm64","-win.",".win.","-windows.",".windows.","setup","installer"],macos:[".dmg",".pkg",".app.zip","darwin","macos","mac-os","osx","mac-universal","-mac.",".mac.","-macos.",".macos.","-darwin.",".darwin.","universal","x86_64-apple","arm64-apple"],linux:[".deb",".rpm",".tar.gz",".tar.xz",".tar.bz2",".appimage","linux","ubuntu","debian","fedora","centos","arch","alpine","-linux.",".linux.","x86_64-unknown-linux","aarch64-unknown-linux","musl","gnu"],android:[".apk",".aab","android","-android.",".android.","arm64-v8a","armeabi-v7a","x86","x86_64"],ios:[".ipa","ios","-ios.",".ios.","iphone","ipad"]}).forEach(([G,ne])=>{ne.some(Me=>T.includes(Me))&&O.push(G)}),O.length===0&&(T.includes("source")||T.includes("src")||T.includes("universal")||T.includes("all")||T.match(/\.(zip|tar\.gz|tar\.xz)$/)&&!T.includes("win")&&!T.includes("mac")&&!T.includes("linux"))&&O.push("universal"),O.length>0?O:["universal"]},j=w=>{const T=/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,O=[];let Q;for(;(Q=T.exec(w.body))!==null;){const[,ne,Me]=Q;if(Me.includes("/download/")||Me.includes("/releases/")||ne.toLowerCase().includes("download")||/\.(exe|dmg|deb|rpm|apk|ipa|zip|tar\.gz|msi|pkg|appimage)$/i.test(Me)){const Vt=P(ne+" "+Me);O.push({name:ne,url:Me,platforms:Vt})}}const G=/https:\/\/github\.com\/[^\/]+\/[^\/]+\/releases\/download\/[^\/]+\/([^\s\)]+)/g;for(;(Q=G.exec(w.body))!==null;){const[ne,Me]=Q,Vt=P(Me);O.some(Xe=>Xe.url===ne)||O.push({name:Me,url:ne,platforms:Vt})}return O},N=e.filter(w=>n.has(w.repository.id)),R=W.useMemo(()=>{let w=N;if(i.trim()){const T=i.toLowerCase();w=w.filter(O=>O.repository.name.toLowerCase().includes(T)||O.repository.full_name.toLowerCase().includes(T)||O.tag_name.toLowerCase().includes(T)||O.name.toLowerCase().includes(T)||O.body.toLowerCase().includes(T))}return d.length>0&&(w=w.filter(T=>j(T).some(Q=>d.some(G=>Q.platforms.includes(G))))),w.sort((T,O)=>new Date(O.published_at).getTime()-new Date(T.published_at).getTime())},[N,i,d]),$=Math.ceil(R.length/f),D=(x-1)*f,q=R.slice(D,D+f),Y=W.useMemo(()=>{const w=new Set;return N.forEach(T=>{j(T).forEach(Q=>{Q.platforms.forEach(G=>w.add(G))})}),Array.from(w).sort()},[N]),ue=async()=>{if(!r){alert(a==="zh"?"GitHub token 未找到,请重新登录。":"GitHub token not found. Please login again.");return}m(!0);try{const w=new zr(r),T=t.filter(Xe=>n.has(Xe.id));if(T.length===0){alert(a==="zh"?"没有订阅的仓库。":"No subscribed repositories.");return}let O=0;const Q=[],G=e.length>0?Math.max(...e.map(Xe=>new Date(Xe.published_at).getTime())):0,ne=G>0?new Date(G).toISOString():void 0;for(const Xe of T){const[Dr,Mr]=Xe.full_name.split("/"),ts=e.some(S=>S.repository.id===Xe.id);let M;ts?M=await w.getIncrementalRepositoryReleases(Dr,Mr,ne,10):M=await w.getRepositoryReleases(Dr,Mr,1,10),M.forEach(S=>{S.repository.id=Xe.id}),Q.push(...M),O+=M.length,await new Promise(S=>setTimeout(S,200))}Q.length>0&&l(Q);const Me=new Date().toISOString();k(Me);const Vt=a==="zh"?`刷新完成!发现 ${O} 个新Release。`:`Refresh completed! Found ${O} new releases.`;alert(Vt)}catch(w){console.error("Refresh failed:",w),alert(a==="zh"?"Release刷新失败请检查网络连接。":"Release refresh failed. Please check your network connection.")}finally{m(!1)}},pe=w=>{g(T=>T.includes(w)?T.filter(O=>O!==w):[...T,w]),_(1)},ce=()=>{u(""),g([]),_(1)},V=w=>{_(Math.max(1,Math.min(w,$)))},U=()=>{const T=[],O=[];for(let Q=Math.max(2,x-2);Q<=Math.min($-1,x+2);Q++)T.push(Q);return x-2>2?O.push(1,"..."):O.push(1),O.push(...T),x+2<$-1?O.push("...",$):$>1&&O.push($),O},y=w=>({windows:"fab fa-windows",macos:"fab fa-apple",linux:"fab fa-linux",android:"fab fa-android",ios:"fab fa-apple",universal:"fas fa-download"})[w]||"fas fa-download",E=w=>({windows:"text-blue-600 dark:text-blue-400",macos:"text-gray-600 dark:text-gray-400",linux:"text-yellow-600 dark:text-yellow-400",android:"text-green-600 dark:text-green-400",ios:"text-gray-600 dark:text-gray-400",universal:"text-purple-600 dark:text-purple-400"})[w]||"text-gray-600 dark:text-gray-400",A=(w,T=200)=>w.length<=T?w:w.substring(0,T)+"...",z=(w,T)=>a==="zh"?w:T;if(N.length===0){const w=n.size;return o.jsxs("div",{className:"text-center py-12",children:[o.jsx(xp,{className:"w-16 h-16 text-gray-400 dark:text-gray-600 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:w===0?z("没有Release订阅","No Release Subscriptions"):z("没有最近的Release","No Recent Releases")}),o.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6 max-w-md mx-auto",children:w===0?z("从仓库页面订阅仓库Release以在此查看更新。","Subscribe to repository releases from the Repositories tab to see updates here."):z(`您已订阅 ${w} 个仓库但没有找到最近的Release。尝试同步以获取最新更新。`,`You're subscribed to ${w} repositories, but no recent releases were found. Try syncing to get the latest updates.`)}),w===0&&o.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 max-w-md mx-auto",children:[o.jsxs("div",{className:"flex items-center space-x-2 text-blue-700 dark:text-blue-300",children:[o.jsx(vo,{className:"w-5 h-5"}),o.jsx("span",{className:"font-medium",children:z("如何订阅:","How to subscribe:")})]}),o.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400 mt-2",children:z("转到仓库页面点击任何仓库卡片上的铃铛图标以订阅其Release。","Go to the Repositories tab and click the bell icon on any repository card to subscribe to its releases.")})]})]})}return o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:z("Release时间线","Release Timeline")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:z(`来自您的 ${n.size} 个订阅仓库的最新Release`,`Latest releases from your ${n.size} subscribed repositories`)})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("button",{onClick:()=>b("compact"),className:`p-2 rounded-lg transition-colors ${p==="compact"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600"}`,title:z("精简视图","Compact View"),children:o.jsx(ip,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>b("detailed"),className:`p-2 rounded-lg transition-colors ${p==="detailed"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600"}`,title:z("详细视图","Detailed View"),children:o.jsx(up,{className:"w-4 h-4"})})]}),v&&o.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[z("上次刷新:","Last refresh:")," ",fa(new Date(v),{addSuffix:!0})]}),o.jsxs("button",{onClick:ue,disabled:h,className:"flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(dd,{className:`w-4 h-4 ${h?"animate-spin":""}`}),o.jsx("span",{children:h?z("刷新中...","Refreshing..."):z("刷新","Refresh")})]})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-4 mb-6",children:[o.jsxs("div",{className:"relative mb-4",children:[o.jsx(wo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),o.jsx("input",{type:"text",placeholder:z("搜索Release...","Search releases..."),value:i,onChange:w=>{u(w.target.value),_(1)},className:"w-full pl-10 pr-10 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white"}),i&&o.jsx("button",{onClick:()=>{u(""),_(1)},className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:o.jsx(Yt,{className:"w-4 h-4"})})]}),Y.length>0&&o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mr-2",children:z("平台:","Platforms:")}),Y.map(w=>o.jsxs("button",{onClick:()=>pe(w),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm transition-colors ${d.includes(w)?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:[o.jsx("i",{className:`${y(w)} w-4 h-4`}),o.jsx("span",{className:"capitalize",children:w})]},w)),(i||d.length>0)&&o.jsxs("button",{onClick:ce,className:"flex items-center space-x-1 px-3 py-1.5 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors",children:[o.jsx(Yt,{className:"w-4 h-4"}),o.jsx("span",{children:z("清除","Clear")})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:z(`显示 ${D+1}-${Math.min(D+f,R.length)}${R.length} 个Release`,`Showing ${D+1}-${Math.min(D+f,R.length)} of ${R.length} releases`)}),(i||d.length>0)&&o.jsxs("span",{className:"text-sm text-blue-600 dark:text-blue-400",children:["(",z("已筛选","filtered"),")"]})]}),o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:z("每页:","Per page:")}),o.jsxs("select",{value:f,onChange:w=>{c(Number(w.target.value)),_(1)},className:"px-3 py-1 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-sm",children:[o.jsx("option",{value:50,children:"50"}),o.jsx("option",{value:100,children:"100"}),o.jsx("option",{value:200,children:"200"}),o.jsx("option",{value:500,children:"500"})]})]}),$>1&&o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("button",{onClick:()=>V(1),disabled:x===1,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Ri,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>V(x-1),disabled:x===1,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Di,{className:"w-4 h-4"})}),U().map((w,T)=>o.jsx("button",{onClick:()=>typeof w=="number"?V(w):void 0,disabled:typeof w!="number",className:`px-3 py-2 rounded-lg text-sm ${w===x?"bg-blue-600 text-white":typeof w=="number"?"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600":"text-gray-400 cursor-default"}`,children:w},T)),o.jsx("button",{onClick:()=>V(x+1),disabled:x===$,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Mi,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>V($),disabled:x===$,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Ti,{className:"w-4 h-4"})})]})]})]})]}),o.jsx("div",{className:"space-y-4",children:q.map(w=>{const T=j(w);return o.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-shadow",children:p==="detailed"?o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center space-x-3 flex-1 min-w-0",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-green-100 dark:bg-green-900 rounded-lg flex-shrink-0",children:o.jsx(Ii,{className:"w-5 h-5 text-green-600 dark:text-green-400"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:[w.repository.name," ",w.tag_name]}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 truncate",children:w.repository.full_name})]})]}),o.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[o.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:fa(new Date(w.published_at),{addSuffix:!0})}),o.jsx("a",{href:w.html_url,target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-lg bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",title:z("在GitHub上查看","View on GitHub"),children:o.jsx(Sl,{className:"w-4 h-4"})})]})]}),w.name&&w.name!==w.tag_name&&o.jsx("h5",{className:"font-medium text-gray-800 dark:text-gray-200 mb-2",children:w.name}),T.length>0&&o.jsxs("div",{className:"mb-4",children:[o.jsx("h6",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:z("下载:","Downloads:")}),o.jsx("div",{className:"flex flex-wrap gap-2",children:T.map((O,Q)=>o.jsxs("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors text-sm",title:O.name,children:[o.jsx("div",{className:"flex items-center space-x-1",children:O.platforms.map((G,ne)=>o.jsx("i",{className:`${y(G)} w-4 h-4 ${E(G)}`,title:G},ne))}),o.jsx("span",{className:"truncate max-w-32",children:O.name})]},Q))})]}),w.body&&o.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[o.jsx("div",{className:"text-gray-700 dark:text-gray-300 whitespace-pre-wrap",children:A(w.body)}),w.body.length>200&&o.jsx("a",{href:w.html_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline text-sm mt-2 inline-block",children:z("阅读完整Release说明 →","Read full release notes →")})]})]}):o.jsx("div",{className:"p-4",children:o.jsxs("div",{className:"grid grid-cols-12 gap-4 items-center",children:[o.jsx("div",{className:"col-span-3 min-w-0",children:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("div",{className:"w-6 h-6 bg-green-100 dark:bg-green-900 rounded flex items-center justify-center flex-shrink-0",children:o.jsx(Ii,{className:"w-3 h-3 text-green-600 dark:text-green-400"})}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:w.repository.name}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:w.tag_name})]})]})}),o.jsx("div",{className:"col-span-3 min-w-0",children:o.jsx("p",{className:"text-sm text-gray-900 dark:text-white truncate",title:w.name||w.tag_name,children:w.name||w.tag_name})}),o.jsx("div",{className:"col-span-4 min-w-0",children:T.length>0?o.jsxs("div",{className:"flex flex-wrap gap-1",children:[T.slice(0,6).map((O,Q)=>o.jsxs("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 dark:bg-gray-700 rounded hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",title:`${O.name} (${O.platforms.join(", ")})`,children:[o.jsx("div",{className:"flex items-center space-x-0.5",children:O.platforms.map((G,ne)=>o.jsx("i",{className:`${y(G)} w-3 h-3 ${E(G)}`,title:G},ne))}),o.jsx("span",{className:"text-xs text-gray-700 dark:text-gray-300 truncate max-w-16",children:O.name.split(".").pop()||O.name})]},Q)),T.length>6&&o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 px-2 py-1",children:["+",T.length-6]})]}):o.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:z("无下载","No downloads")})}),o.jsxs("div",{className:"col-span-2 flex items-center justify-end space-x-2",children:[o.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:fa(new Date(w.published_at),{addSuffix:!0})}),o.jsx("a",{href:w.html_url,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",title:z("在GitHub上查看","View on GitHub"),children:o.jsx(Sl,{className:"w-3 h-3"})})]})]})})},w.id)})}),$>1&&o.jsx("div",{className:"flex items-center justify-center mt-8",children:o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx("button",{onClick:()=>V(1),disabled:x===1,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Ri,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>V(x-1),disabled:x===1,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Di,{className:"w-4 h-4"})}),U().map((w,T)=>o.jsx("button",{onClick:()=>typeof w=="number"?V(w):void 0,disabled:typeof w!="number",className:`px-3 py-2 rounded-lg text-sm ${w===x?"bg-blue-600 text-white":typeof w=="number"?"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600":"text-gray-400 cursor-default"}`,children:w},T)),o.jsx("button",{onClick:()=>V(x+1),disabled:x===$,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Mi,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>V($),disabled:x===$,className:"p-2 rounded-lg bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:o.jsx(Ti,{className:"w-4 h-4"})})]})})]})};class Jr{constructor(t){this.config=t}getAuthHeader(){return`Basic ${btoa(`${this.config.username}:${this.config.password}`)}`}getFullPath(t){const n=this.config.path.endsWith("/")?this.config.path:`${this.config.path}/`;return`${this.config.url}${n}${t}`}handleNetworkError(t,n){throw console.error(`WebDAV ${n} failed:`,t),t.name==="TypeError"&&t.message.includes("Failed to fetch")||t.message&&t.message.includes("NetworkError when attempting to fetch resource")||t.name==="NetworkError"||t.message&&t.message.includes("NetworkError")?new Error(`CORS策略阻止了连接到WebDAV服务器。
这是一个常见的浏览器安全限制。要解决此问题,您需要:
1. 在WebDAV服务器上配置CORS头
• Access-Control-Allow-Origin: ${window.location.origin}
• Access-Control-Allow-Methods: GET, PUT, PROPFIND, HEAD, OPTIONS, MKCOL
• Access-Control-Allow-Headers: Authorization, Content-Type, Depth
2. 常见WebDAV服务器配置示例
Apache (.htaccess):
Header always set Access-Control-Allow-Origin "${window.location.origin}"
Header always set Access-Control-Allow-Methods "GET, PUT, PROPFIND, HEAD, OPTIONS, MKCOL"
Header always set Access-Control-Allow-Headers "Authorization, Content-Type, Depth"
Nginx:
add_header Access-Control-Allow-Origin "${window.location.origin}";
add_header Access-Control-Allow-Methods "GET, PUT, PROPFIND, HEAD, OPTIONS, MKCOL";
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Depth";
3. 其他检查项:
• 确保WebDAV服务器正在运行
• 验证URL格式正确包含协议 http:// 或 https://
• 如果应用使用HTTPSWebDAV服务器也应使用HTTPS
技术详情: ${t.message}`):new Error(`WebDAV ${n} 失败: ${t.message||"未知错误"}`)}async testConnection(){try{if(!this.config.url.startsWith("http://")&&!this.config.url.startsWith("https://"))throw new Error("WebDAV URL必须以 http:// 或 https:// 开头");const t=new AbortController,n=setTimeout(()=>t.abort(),1e4);try{const r=await fetch(this.config.url,{method:"OPTIONS",headers:{Authorization:this.getAuthHeader()},signal:t.signal});if(clearTimeout(n),r.ok)return!0;const a=await fetch(this.config.url,{method:"PROPFIND",headers:{Authorization:this.getAuthHeader(),Depth:"0"}});return a.ok||a.status===207}catch(r){throw clearTimeout(n),r.name==="AbortError"?new Error("连接超时。请检查WebDAV服务器是否可访问。"):r}}catch(t){this.handleNetworkError(t,"连接测试")}}async uploadFile(t,n){try{if(!this.config.url.startsWith("http://")&&!this.config.url.startsWith("https://"))throw new Error("WebDAV URL必须以 http:// 或 https:// 开头");await this.ensureDirectoryExists();const r=new AbortController,a=setTimeout(()=>r.abort(),3e4);try{const s=await fetch(this.getFullPath(t),{method:"PUT",headers:{Authorization:this.getAuthHeader(),"Content-Type":"application/json"},body:n,signal:r.signal});if(clearTimeout(a),!s.ok)throw s.status===401?new Error("身份验证失败。请检查用户名和密码。"):s.status===403?new Error("访问被拒绝。请检查指定路径的权限。"):s.status===404?new Error("路径未找到。请验证WebDAV URL和路径是否正确。"):s.status===507?new Error("服务器存储空间不足。"):new Error(`上传失败HTTP状态码 ${s.status}: ${s.statusText}`);return!0}catch(s){throw clearTimeout(a),s.name==="AbortError"?new Error("上传超时。文件可能太大或网络连接缓慢。"):s}}catch(r){if(r.message.includes("身份验证失败")||r.message.includes("访问被拒绝")||r.message.includes("路径未找到")||r.message.includes("存储空间不足")||r.message.includes("上传失败HTTP状态码")||r.message.includes("上传超时")||r.message.includes("WebDAV URL必须"))throw r;this.handleNetworkError(r,"上传")}}async ensureDirectoryExists(){try{if(!this.config.path||this.config.path==="/")return;const t=this.config.url+this.config.path,n=await fetch(t,{method:"MKCOL",headers:{Authorization:this.getAuthHeader()}});!n.ok&&n.status!==405&&console.warn("无法创建目录,可能已存在或权限不足")}catch(t){console.warn("目录创建检查失败:",t)}}async downloadFile(t){try{const n=new AbortController,r=setTimeout(()=>n.abort(),3e4);try{const a=await fetch(this.getFullPath(t),{method:"GET",headers:{Authorization:this.getAuthHeader()},signal:n.signal});if(clearTimeout(r),a.ok)return await a.text();if(a.status===404)return null;throw a.status===401?new Error("身份验证失败。请检查用户名和密码。"):new Error(`下载失败HTTP状态码 ${a.status}: ${a.statusText}`)}catch(a){throw clearTimeout(r),a.name==="AbortError"?new Error("下载超时。请检查网络连接。"):a}}catch(n){if(n.message.includes("身份验证失败")||n.message.includes("下载超时"))throw n;if(n.message.includes("HTTP 404"))return null;this.handleNetworkError(n,"下载")}}async fileExists(t){try{const n=new AbortController,r=setTimeout(()=>n.abort(),1e4),a=await fetch(this.getFullPath(t),{method:"HEAD",headers:{Authorization:this.getAuthHeader()},signal:n.signal});return clearTimeout(r),a.ok}catch(n){return console.error("WebDAV文件检查失败:",n),!1}}async listFiles(){try{const t=new AbortController,n=setTimeout(()=>t.abort(),15e3);try{const r=await fetch(this.config.url+this.config.path,{method:"PROPFIND",headers:{Authorization:this.getAuthHeader(),Depth:"1","Content-Type":"application/xml"},body:`<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:displayname/>
<D:getlastmodified/>
<D:getcontentlength/>
</D:prop>
</D:propfind>`,signal:t.signal});if(clearTimeout(n),r.ok||r.status===207){const s=(await r.text()).match(/<D:displayname>([^<]+)<\/D:displayname>/g);if(s)return s.map(l=>l.replace(/<\/?D:displayname>/g,"")).filter(l=>l.endsWith(".json"))}else throw r.status===401?new Error("身份验证失败。请检查用户名和密码。"):new Error(`列出文件失败HTTP状态码 ${r.status}: ${r.statusText}`);return[]}catch(r){throw clearTimeout(n),r.name==="AbortError"?new Error("列出文件超时。请检查网络连接。"):r}}catch(t){if(t.message.includes("身份验证失败")||t.message.includes("列出文件超时"))throw t;this.handleNetworkError(t,"列出文件")}}static validateConfig(t){const n=[];return t.url?!t.url.startsWith("http://")&&!t.url.startsWith("https://")&&n.push("WebDAV URL必须以 http:// 或 https:// 开头"):n.push("WebDAV URL是必需的"),t.username||n.push("用户名是必需的"),t.password||n.push("密码是必需的"),t.path?t.path.startsWith("/")||n.push("路径必须以 / 开头"):n.push("路径是必需的"),n}async getServerInfo(){try{const t=await fetch(this.config.url,{method:"OPTIONS",headers:{Authorization:this.getAuthHeader()}});if(t.ok)return{server:t.headers.get("Server")||void 0,davLevel:t.headers.get("DAV")||void 0}}catch(t){console.warn("无法获取服务器信息:",t)}return{}}}const fg=()=>{const{aiConfigs:e,activeAIConfig:t,webdavConfigs:n,activeWebDAVConfig:r,lastBackup:a,githubToken:s,language:l,repositories:i,releaseSubscriptions:u,addAIConfig:d,updateAIConfig:g,deleteAIConfig:h,setActiveAIConfig:m,addWebDAVConfig:v,updateWebDAVConfig:k,deleteWebDAVConfig:x,setActiveWebDAVConfig:_,setLastBackup:f,setGitHubToken:c,setLanguage:p,setRepositories:b,setReleases:P}=Wt(),[j,N]=W.useState(!1),[R,$]=W.useState(!1);W.useState(null);const[D,q]=W.useState(null),[Y,ue]=W.useState(null),[pe,ce]=W.useState("idle"),[V,U]=W.useState({name:"",baseUrl:"https://api.openai.com/v1",apiKey:"",model:"gpt-3.5-turbo"}),[y,E]=W.useState({name:"",url:"",username:"",password:"",path:"/github-stars-backup"}),A=W.useRef(null),z=()=>{if(!V.name||!V.baseUrl||!V.apiKey||!V.model){alert(l==="zh"?"请填写所有字段":"Please fill in all fields");return}const S={id:Date.now().toString(),name:V.name,baseUrl:V.baseUrl,apiKey:V.apiKey,model:V.model,isActive:e.length===0};d(S),S.isActive&&m(S.id),U({name:"",baseUrl:"https://api.openai.com/v1",apiKey:"",model:"gpt-3.5-turbo"}),N(!1)},w=()=>{const S=Jr.validateConfig(y);if(S.length>0){alert(S.join(`
`));return}const L={id:Date.now().toString(),name:y.name,url:y.url,username:y.username,password:y.password,path:y.path,isActive:n.length===0};v(L),L.isActive&&_(L.id),E({name:"",url:"",username:"",password:"",path:"/github-stars-backup"}),$(!1)},T=async S=>{q(S.id);try{const oe=await new es(S,l).testConnection();alert(oe?l==="zh"?"✅ 连接成功AI配置正常工作。":"✅ Connection successful! AI configuration is working.":l==="zh"?"❌ 连接失败。请检查您的配置。":"❌ Connection failed. Please check your configuration.")}catch(L){const oe=l==="zh"?`❌ 连接失败: ${L instanceof Error?L.message:"未知错误"}`:`❌ Connection failed: ${L instanceof Error?L.message:"Unknown error"}`;alert(oe)}finally{q(null)}},O=async S=>{ue(S.id);try{const L=new Jr(S);if(await L.testConnection()){const ye=await L.getServerInfo();let X=l==="zh"?"✅ WebDAV连接成功":"✅ WebDAV connection successful!";ye.server&&(X+=`
${l==="zh"?"服务器":"Server"}: ${ye.server}`),ye.davLevel&&(X+=`
${l==="zh"?"DAV级别":"DAV Level"}: ${ye.davLevel}`),alert(X)}else alert(l==="zh"?"❌ WebDAV连接失败。请检查您的配置。":"❌ WebDAV connection failed. Please check your configuration.")}catch(L){const oe=l==="zh"?`❌ WebDAV连接测试失败:
${L instanceof Error?L.message:"未知错误"}`:`❌ WebDAV connection test failed:
${L instanceof Error?L.message:"Unknown error"}`;alert(oe)}finally{ue(null)}},Q=S=>{e.forEach(L=>{g(L.id,{isActive:L.id===S})}),m(S)},G=S=>{n.forEach(L=>{k(L.id,{isActive:L.id===S})}),_(S)},ne=async()=>{const S=n.find(L=>L.id===r);if(!S){alert(l==="zh"?"请先配置并激活WebDAV服务。":"Please configure and activate WebDAV service first.");return}ce("backing-up");try{const L=new Jr(S),oe={version:"1.0",timestamp:new Date().toISOString(),repositories:i,aiConfigs:e,webdavConfigs:n,releaseSubscriptions:Array.from(u),settings:{language:l,lastBackup:a,activeAIConfig:t,activeWebDAVConfig:r}},ye=`github-stars-backup-${new Date().toISOString().split("T")[0]}.json`,X=JSON.stringify(oe,null,2);await L.uploadFile(ye,X);const ct=new Date().toISOString();f(ct),alert(l==="zh"?`✅ 备份成功!
文件名: ${ye}
备份时间: ${new Date(ct).toLocaleString()}`:`✅ Backup successful!
Filename: ${ye}
Backup time: ${new Date(ct).toLocaleString()}`)}catch(L){console.error("Backup failed:",L);const oe=l==="zh"?`❌ 备份失败:
${L instanceof Error?L.message:"未知错误"}`:`❌ Backup failed:
${L instanceof Error?L.message:"Unknown error"}`;alert(oe)}finally{ce("idle")}},Me=async()=>{var oe,ye;const S=n.find(X=>X.id===r);if(!S){alert(l==="zh"?"请先配置并激活WebDAV服务。":"Please configure and activate WebDAV service first.");return}if(confirm(l==="zh"?`⚠️ 恢复操作将覆盖当前的仓库数据和配置。
确定要继续吗?`:`⚠️ Restore operation will overwrite current repository data and configurations.
Are you sure you want to continue?`)){ce("restoring");try{const X=new Jr(S),In=(await X.listFiles()).filter(de=>de.startsWith("github-stars-backup-"));if(In.length===0){alert(l==="zh"?"没有找到备份文件。":"No backup files found.");return}const an=In.sort().reverse()[0],Ln=await X.downloadFile(an);if(!Ln){alert(l==="zh"?"无法读取备份文件。":"Unable to read backup file.");return}const Ne=JSON.parse(Ln);Ne.repositories&&b(Ne.repositories),Ne.releases&&P(Ne.releases),alert(l==="zh"?`✅ 恢复成功!
备份文件: ${an}
备份时间: ${new Date(Ne.timestamp).toLocaleString()}
仓库数量: ${((oe=Ne.repositories)==null?void 0:oe.length)||0}
页面将刷新以应用更改。`:`✅ Restore successful!
Backup file: ${an}
Backup time: ${new Date(Ne.timestamp).toLocaleString()}
Repositories: ${((ye=Ne.repositories)==null?void 0:ye.length)||0}
Page will refresh to apply changes.`),setTimeout(()=>window.location.reload(),2e3)}catch(X){console.error("Restore failed:",X);const ct=l==="zh"?`❌ 恢复失败:
${X instanceof Error?X.message:"未知错误"}`:`❌ Restore failed:
${X instanceof Error?X.message:"Unknown error"}`;alert(ct)}finally{ce("idle")}}},Vt=()=>{ce("exporting");try{const S={version:"1.0",timestamp:new Date().toISOString(),aiConfigs:e,webdavConfigs:n,settings:{language:l,activeAIConfig:t,activeWebDAVConfig:r}},L=JSON.stringify(S,null,2),oe=new Blob([L],{type:"application/json"}),ye=URL.createObjectURL(oe),X=document.createElement("a");X.href=ye,X.download=`github-stars-config-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(ye),alert(l==="zh"?`✅ 配置导出成功!文件已下载到您的设备。
注意此文件包含敏感信息API密钥、密码请妥善保管。`:`✅ Configuration exported successfully! File has been downloaded to your device.
Note: This file contains sensitive information (API keys, passwords), please keep it secure.`)}catch(S){console.error("Export failed:",S),alert(l==="zh"?`❌ 导出失败: ${S instanceof Error?S.message:"未知错误"}`:`❌ Export failed: ${S instanceof Error?S.message:"Unknown error"}`)}finally{ce("idle")}},Xe=()=>{var S;(S=A.current)==null||S.click()},Dr=async S=>{var oe,ye,X,ct,In,an,Ln;const L=(oe=S.target.files)==null?void 0:oe[0];if(L){ce("importing");try{const Ne=await L.text(),de=JSON.parse(Ne);if(!de.version||!de.timestamp)throw new Error(l==="zh"?"无效的配置文件格式":"Invalid configuration file format");const vd=l==="zh"?`⚠️ 导入配置将覆盖当前的AI和WebDAV配置。
配置文件信息:
• 创建时间: ${new Date(de.timestamp).toLocaleString()}
• AI配置: ${((ye=de.aiConfigs)==null?void 0:ye.length)||0}
• WebDAV配置: ${((X=de.webdavConfigs)==null?void 0:X.length)||0}
确定要继续吗?`:`⚠️ Importing configuration will overwrite current AI and WebDAV configurations.
Configuration file info:
• Created: ${new Date(de.timestamp).toLocaleString()}
• AI configs: ${((ct=de.aiConfigs)==null?void 0:ct.length)||0}
• WebDAV configs: ${((In=de.webdavConfigs)==null?void 0:In.length)||0}
Are you sure you want to continue?`;if(!confirm(vd))return;de.aiConfigs&&Array.isArray(de.aiConfigs)&&de.aiConfigs.forEach(re=>{if(re.name&&re.baseUrl&&re.model){const ns={id:Date.now().toString()+Math.random().toString(36).substr(2,9),name:`${re.name} (导入)`,baseUrl:re.baseUrl,apiKey:re.apiKey||"",model:re.model,isActive:!1};d(ns)}}),de.webdavConfigs&&Array.isArray(de.webdavConfigs)&&de.webdavConfigs.forEach(re=>{if(re.name&&re.url&&re.username&&re.path){const ns={id:Date.now().toString()+Math.random().toString(36).substr(2,9),name:`${re.name} (导入)`,url:re.url,username:re.username,password:re.password||"",path:re.path,isActive:!1};v(ns)}}),de.settings&&de.settings.language&&p(de.settings.language);const bo=((an=de.aiConfigs)==null?void 0:an.some(re=>re.apiKey&&re.apiKey!=="***"))||((Ln=de.webdavConfigs)==null?void 0:Ln.some(re=>re.password&&re.password!=="***"));alert(l==="zh"?`✅ 配置导入成功!${bo?`
所有配置信息包括API密钥和密码已完整导入。`:`
注意如果配置中缺少API密钥和密码请手动补充。`}`:`✅ Configuration imported successfully!${bo?`
All configuration information (including API keys and passwords) has been imported completely.`:`
Note: If API keys and passwords are missing from the configuration, please add them manually.`}`)}catch(Ne){console.error("Import failed:",Ne),alert(l==="zh"?`❌ 导入失败: ${Ne instanceof Error?Ne.message:"未知错误"}`:`❌ Import failed: ${Ne instanceof Error?Ne.message:"Unknown error"}`)}finally{ce("idle"),A.current&&(A.current.value="")}}},Mr=[{name:"OpenAI GPT-3.5",baseUrl:"https://api.openai.com/v1",model:"gpt-3.5-turbo"},{name:"OpenAI GPT-4",baseUrl:"https://api.openai.com/v1",model:"gpt-4"},{name:"Anthropic Claude",baseUrl:"https://api.anthropic.com/v1",model:"claude-3-sonnet-20240229"}],ts=[{name:"Nextcloud",url:"https://your-nextcloud.com/remote.php/dav/files/username",path:"/github-stars-backup"},{name:"ownCloud",url:"https://your-owncloud.com/remote.php/webdav",path:"/github-stars-backup"},{name:"坚果云",url:"https://dav.jianguoyun.com/dav",path:"/github-stars-backup"}],M=(S,L)=>l==="zh"?S:L;return o.jsxs("div",{className:"max-w-4xl mx-auto space-y-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:M("设置","Settings")}),o.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:M("配置您的AI服务、WebDAV备份和应用程序偏好","Configure your AI services, WebDAV backup, and application preferences")})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-indigo-100 dark:bg-indigo-900 rounded-lg",children:o.jsx(fd,{className:"w-5 h-5 text-indigo-600 dark:text-indigo-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:M("配置管理","Configuration Management")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:M("导入和导出您的应用配置","Import and export your application configurations")})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[o.jsxs("button",{onClick:Vt,disabled:pe!=="idle",className:"flex items-center justify-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(cp,{className:"w-4 h-4"}),o.jsx("span",{children:pe==="exporting"?M("导出中...","Exporting..."):M("导出配置","Export Configuration")})]}),o.jsxs("button",{onClick:Xe,disabled:pe!=="idle",className:"flex items-center justify-center space-x-2 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(dp,{className:"w-4 h-4"}),o.jsx("span",{children:pe==="importing"?M("导入中...","Importing..."):M("导入配置","Import Configuration")})]})]}),o.jsx("input",{ref:A,type:"file",accept:".json",onChange:Dr,className:"hidden"}),o.jsx("div",{className:"mt-4 p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:o.jsxs("div",{className:"flex items-start space-x-2",children:[o.jsx(gp,{className:"w-5 h-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[o.jsx("p",{className:"font-medium mb-1",children:M("配置导入导出说明","Configuration Import/Export Notes")}),o.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs",children:[o.jsx("li",{children:M("导出的配置文件包含完整的API密钥和密码信息","Exported configuration files contain complete API keys and password information")}),o.jsx("li",{children:M("请妥善保管导出的配置文件,避免泄露敏感信息","Please keep exported configuration files secure to avoid leaking sensitive information")}),o.jsx("li",{children:M("导入配置将完整恢复所有设置,包括敏感信息","Importing configuration will completely restore all settings, including sensitive information")}),o.jsx("li",{children:M("建议定期导出配置作为备份","It is recommended to export configuration regularly as backup")})]})]})]})})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-100 dark:bg-blue-900 rounded-lg",children:o.jsx(ud,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:M("语言设置","Language Settings")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:M("选择界面语言和AI分析语言","Choose interface language and AI analysis language")})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("界面语言","Interface Language")}),o.jsxs("select",{value:l,onChange:S=>p(S.target.value),className:"w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white",children:[o.jsx("option",{value:"zh",children:"中文"}),o.jsx("option",{value:"en",children:"English"})]})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:M("此设置将影响界面显示语言和AI分析生成的标签、描述的语言。","This setting affects the interface display language and the language of AI-generated tags and descriptions.")})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-gray-100 dark:bg-gray-700 rounded-lg",children:o.jsx(cd,{className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:M("GitHub访问令牌","GitHub Access Token")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:M("用于GitHub API的个人访问令牌","Personal access token for GitHub API")})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("input",{type:"password",placeholder:"ghp_xxxxxxxxxxxxxxxxxxxx",value:s||"",onChange:S=>c(S.target.value),className:"flex-1 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"}),o.jsx("span",{className:`px-3 py-2 rounded-lg text-sm ${s?"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300"}`,children:s?M("已连接","Connected"):M("未设置","Not Set")})]}),o.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[M("在","Create a personal access token at")," ",o.jsx("a",{href:"https://github.com/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:M("GitHub设置","GitHub Settings")})," ",M("创建个人访问令牌,需要'repo'和'user'权限。","with 'repo' and 'user' scopes.")]})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-green-100 dark:bg-green-900 rounded-lg",children:o.jsx(ap,{className:"w-5 h-5 text-green-600 dark:text-green-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:M("WebDAV备份","WebDAV Backup")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:M("配置WebDAV服务器以备份和恢复数据","Configure WebDAV server for data backup and restore")})]})]}),o.jsxs("button",{onClick:()=>$(!0),className:"flex items-center space-x-2 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors",children:[o.jsx(Li,{className:"w-4 h-4"}),o.jsx("span",{children:M("添加WebDAV","Add WebDAV")})]})]}),n.length>0&&o.jsxs("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:`w-3 h-3 rounded-full ${r?"bg-green-500":"bg-gray-400"}`}),o.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r?M("WebDAV已配置","WebDAV Configured"):M("WebDAV未激活","WebDAV Not Active")}),a&&o.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[M("上次备份:","Last backup:")," ",new Date(a).toLocaleString()]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("button",{onClick:ne,disabled:!r||pe!=="idle",className:"flex items-center space-x-2 px-3 py-1.5 bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300 rounded-lg hover:bg-blue-200 dark:hover:bg-blue-800 transition-colors text-sm disabled:opacity-50",children:[o.jsx(Ep,{className:"w-4 h-4"}),o.jsx("span",{children:pe==="backing-up"?M("备份中...","Backing up..."):M("备份","Backup")})]}),o.jsxs("button",{onClick:Me,disabled:!r||pe!=="idle",className:"flex items-center space-x-2 px-3 py-1.5 bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300 rounded-lg hover:bg-orange-200 dark:hover:bg-orange-800 transition-colors text-sm disabled:opacity-50",children:[o.jsx(op,{className:"w-4 h-4"}),o.jsx("span",{children:pe==="restoring"?M("恢复中...","Restoring..."):M("恢复","Restore")})]})]})]}),o.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:[o.jsx(X0,{className:"w-5 h-5 text-yellow-600 dark:text-yellow-400 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-medium text-yellow-800 dark:text-yellow-200 mb-1",children:M("重要提示CORS配置","Important: CORS Configuration")}),o.jsx("p",{className:"text-yellow-700 dark:text-yellow-300",children:M("如果遇到连接错误请确保您的WebDAV服务器配置了正确的CORS头。点击测试连接按钮查看详细的错误信息和解决方案。","If you encounter connection errors, ensure your WebDAV server is configured with proper CORS headers. Click the test connection button for detailed error messages and solutions.")})]})]})]}),o.jsx("div",{className:"space-y-4",children:n.map(S=>o.jsx("div",{className:`p-4 border rounded-lg transition-colors ${S.id===r?"border-green-300 bg-green-50 dark:border-green-700 dark:bg-green-950":"border-gray-200 dark:border-gray-600"}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsxs("h4",{className:"font-medium text-gray-900 dark:text-white",children:[S.name,S.id===r&&o.jsx("span",{className:"ml-2 px-2 py-1 bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300 rounded text-xs",children:M("活跃","Active")})]}),o.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[S.url," • ",S.path]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("button",{onClick:()=>O(S),disabled:Y===S.id,className:"flex items-center space-x-2 px-3 py-1.5 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors text-sm",children:[o.jsx(Oi,{className:"w-4 h-4"}),o.jsx("span",{children:Y===S.id?M("测试中...","Testing..."):M("测试","Test")})]}),S.id!==r&&o.jsx("button",{onClick:()=>G(S.id),className:"px-3 py-1.5 bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300 rounded-lg hover:bg-green-200 dark:hover:bg-green-800 transition-colors text-sm",children:M("设为活跃","Set Active")}),o.jsx("button",{onClick:()=>x(S.id),className:"p-1.5 text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900 rounded-lg transition-colors",children:o.jsx(Fi,{className:"w-4 h-4"})})]})]})},S.id))}),R&&o.jsxs("div",{className:"mt-6 p-4 border border-gray-200 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-750",children:[o.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-4",children:M("添加新的WebDAV配置","Add New WebDAV Configuration")}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("快速设置(可选)","Quick Setup (Optional)")}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:ts.map((S,L)=>o.jsxs("button",{onClick:()=>E(oe=>({...oe,...S})),className:"p-3 text-left border border-gray-200 dark:border-gray-600 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx("p",{className:"font-medium text-sm text-gray-900 dark:text-white",children:S.name}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:S.url})]},L))})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[M("配置名称","Configuration Name")," *"]}),o.jsx("input",{type:"text",placeholder:M("我的WebDAV服务器","My WebDAV Server"),value:y.name||"",onChange:S=>E(L=>({...L,name:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[M("用户名","Username")," *"]}),o.jsx("input",{type:"text",placeholder:"username",value:y.username||"",onChange:S=>E(L=>({...L,username:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]})]}),o.jsxs("div",{className:"mb-4",children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[M("WebDAV服务器URL","WebDAV Server URL")," *"]}),o.jsx("input",{type:"url",placeholder:"https://your-server.com/webdav",value:y.url||"",onChange:S=>E(L=>({...L,url:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[M("密码","Password")," *"]}),o.jsx("input",{type:"password",placeholder:"password",value:y.password||"",onChange:S=>E(L=>({...L,password:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{children:[o.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[M("备份路径","Backup Path")," *"]}),o.jsx("input",{type:"text",placeholder:"/github-stars-backup",value:y.path||"",onChange:S=>E(L=>({...L,path:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("button",{onClick:w,className:"flex items-center space-x-2 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors",children:[o.jsx($i,{className:"w-4 h-4"}),o.jsx("span",{children:M("保存配置","Save Configuration")})]}),o.jsxs("button",{onClick:()=>{$(!1),E({name:"",url:"",username:"",password:"",path:"/github-stars-backup"})},className:"flex items-center space-x-2 px-4 py-2 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",children:[o.jsx(Yt,{className:"w-4 h-4"}),o.jsx("span",{children:M("取消","Cancel")})]})]})]})]}),o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-purple-100 dark:bg-purple-900 rounded-lg",children:o.jsx(Nr,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:M("AI配置","AI Configurations")}),o.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:M("管理用于仓库分析的AI服务配置","Manage your AI service configurations for repository analysis")})]})]}),o.jsxs("button",{onClick:()=>N(!0),className:"flex items-center space-x-2 px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors",children:[o.jsx(Li,{className:"w-4 h-4"}),o.jsx("span",{children:M("添加配置","Add Configuration")})]})]}),o.jsx("div",{className:"space-y-4",children:e.map(S=>o.jsx("div",{className:`p-4 border rounded-lg transition-colors ${S.id===t?"border-purple-300 bg-purple-50 dark:border-purple-700 dark:bg-purple-950":"border-gray-200 dark:border-gray-600"}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsxs("h4",{className:"font-medium text-gray-900 dark:text-white",children:[S.name,S.id===t&&o.jsx("span",{className:"ml-2 px-2 py-1 bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300 rounded text-xs",children:M("活跃","Active")})]}),o.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[S.baseUrl," • ",S.model]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs("button",{onClick:()=>T(S),disabled:D===S.id,className:"flex items-center space-x-2 px-3 py-1.5 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors text-sm",children:[o.jsx(Oi,{className:"w-4 h-4"}),o.jsx("span",{children:D===S.id?M("测试中...","Testing..."):M("测试","Test")})]}),S.id!==t&&o.jsx("button",{onClick:()=>Q(S.id),className:"px-3 py-1.5 bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300 rounded-lg hover:bg-purple-200 dark:hover:bg-purple-800 transition-colors text-sm",children:M("设为活跃","Set Active")}),o.jsx("button",{onClick:()=>h(S.id),className:"p-1.5 text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900 rounded-lg transition-colors",children:o.jsx(Fi,{className:"w-4 h-4"})})]})]})},S.id))}),j&&o.jsxs("div",{className:"mt-6 p-4 border border-gray-200 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-750",children:[o.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-4",children:M("添加新的AI配置","Add New AI Configuration")}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("快速设置(可选)","Quick Setup (Optional)")}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:Mr.map((S,L)=>o.jsxs("button",{onClick:()=>U(oe=>({...oe,...S})),className:"p-3 text-left border border-gray-200 dark:border-gray-600 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[o.jsx("p",{className:"font-medium text-sm text-gray-900 dark:text-white",children:S.name}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:S.model})]},L))})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("配置名称","Configuration Name")}),o.jsx("input",{type:"text",placeholder:M("我的OpenAI配置","My OpenAI Config"),value:V.name||"",onChange:S=>U(L=>({...L,name:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("模型","Model")}),o.jsx("input",{type:"text",placeholder:"gpt-3.5-turbo",value:V.model||"",onChange:S=>U(L=>({...L,model:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("API基础URL","API Base URL")}),o.jsx("input",{type:"url",placeholder:"https://api.openai.com/v1",value:V.baseUrl||"",onChange:S=>U(L=>({...L,baseUrl:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:M("API密钥","API Key")}),o.jsx("input",{type:"password",placeholder:"sk-xxxxxxxxxxxxxxxxxxxx",value:V.apiKey||"",onChange:S=>U(L=>({...L,apiKey:S.target.value})),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[o.jsxs("button",{onClick:z,className:"flex items-center space-x-2 px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors",children:[o.jsx($i,{className:"w-4 h-4"}),o.jsx("span",{children:M("保存配置","Save Configuration")})]}),o.jsxs("button",{onClick:()=>{N(!1),U({name:"",baseUrl:"https://api.openai.com/v1",apiKey:"",model:"gpt-3.5-turbo"})},className:"flex items-center space-x-2 px-4 py-2 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",children:[o.jsx(Yt,{className:"w-4 h-4"}),o.jsx("span",{children:M("取消","Cancel")})]})]})]})]})]})};function pg(){const{isAuthenticated:e,currentView:t,theme:n,searchResults:r,repositories:a}=Wt(),[s,l]=W.useState("all");if(W.useEffect(()=>{n==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[n]),!e)return o.jsx(fm,{});const i=()=>{switch(t){case"repositories":return o.jsxs("div",{className:"flex space-x-6",children:[o.jsx(cg,{repositories:a,selectedCategory:s,onCategorySelect:l}),o.jsxs("div",{className:"flex-1 space-y-6",children:[o.jsx(mm,{}),o.jsx(ig,{repositories:r.length>0?r:a,selectedCategory:s})]})]});case"releases":return o.jsx(dg,{});case"settings":return o.jsx(fg,{});default:return null}};return o.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[o.jsx(pm,{}),o.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:i()})]})}console.log("Main.tsx loading...");const xd=document.getElementById("root");if(!xd)throw new Error("Root element not found");console.log("Root element found, creating React root...");const mg=od(xd);mg.render(o.jsx(W.StrictMode,{children:o.jsx(pg,{})}));console.log("React app rendered");