var Dy=Object.defineProperty;var Uy=(f,x,T)=>x in f?Dy(f,x,{enumerable:!0,configurable:!0,writable:!0,value:T}):f[x]=T;var $i=(f,x,T)=>Uy(f,typeof x!="symbol"?x+"":x,T);(function(){const x=document.createElement("link").relList;if(x&&x.supports&&x.supports("modulepreload"))return;for(const j of document.querySelectorAll('link[rel="modulepreload"]'))o(j);new MutationObserver(j=>{for(const H of j)if(H.type==="childList")for(const A of H.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&o(A)}).observe(document,{childList:!0,subtree:!0});function T(j){const H={};return j.integrity&&(H.integrity=j.integrity),j.referrerPolicy&&(H.referrerPolicy=j.referrerPolicy),j.crossOrigin==="use-credentials"?H.credentials="include":j.crossOrigin==="anonymous"?H.credentials="omit":H.credentials="same-origin",H}function o(j){if(j.ep)return;j.ep=!0;const H=T(j);fetch(j.href,H)}})();var Mf={exports:{}},xu={};/** * @license React * react-jsx-runtime.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 ym;function Ry(){if(ym)return xu;ym=1;var f=Symbol.for("react.transitional.element"),x=Symbol.for("react.fragment");function T(o,j,H){var A=null;if(H!==void 0&&(A=""+H),j.key!==void 0&&(A=""+j.key),"key"in j){H={};for(var W in j)W!=="key"&&(H[W]=j[W])}else H=j;return j=H.ref,{$$typeof:f,type:o,key:A,ref:j!==void 0?j:null,props:H}}return xu.Fragment=x,xu.jsx=T,xu.jsxs=T,xu}var vm;function Hy(){return vm||(vm=1,Mf.exports=Ry()),Mf.exports}var c=Hy(),Df={exports:{}},re={};/** * @license React * react.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 gm;function wy(){if(gm)return re;gm=1;var f=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),A=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),Z=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),C=Symbol.for("react.view_transition"),F=Symbol.iterator;function xe(d){return d===null||typeof d!="object"?null:(d=F&&d[F]||d["@@iterator"],typeof d=="function"?d:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,Ue={};function le(d,E,B){this.props=d,this.context=E,this.refs=Ue,this.updater=B||L}le.prototype.isReactComponent={},le.prototype.setState=function(d,E){if(typeof d!="object"&&typeof d!="function"&&d!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,d,E,"setState")},le.prototype.forceUpdate=function(d){this.updater.enqueueForceUpdate(this,d,"forceUpdate")};function I(){}I.prototype=le.prototype;function Le(d,E,B){this.props=d,this.context=E,this.refs=Ue,this.updater=B||L}var Se=Le.prototype=new I;Se.constructor=Le,ee(Se,le.prototype),Se.isPureReactComponent=!0;var $=Array.isArray;function ae(){}var ve={H:null,A:null,T:null,S:null},Ce=Object.prototype.hasOwnProperty;function Y(d,E,B){var w=B.ref;return{$$typeof:f,type:d,key:E,ref:w!==void 0?w:null,props:B}}function Me(d,E){return Y(d.type,E,d.props)}function Ae(d){return typeof d=="object"&&d!==null&&d.$$typeof===f}function qe(d){var E={"=":"=0",":":"=2"};return"$"+d.replace(/[=:]/g,function(B){return E[B]})}var U=/\/+/g;function se(d,E){return typeof d=="object"&&d!==null&&d.key!=null?qe(""+d.key):E.toString(36)}function R(d){switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:switch(typeof d.status=="string"?d.then(ae,ae):(d.status="pending",d.then(function(E){d.status==="pending"&&(d.status="fulfilled",d.value=E)},function(E){d.status==="pending"&&(d.status="rejected",d.reason=E)})),d.status){case"fulfilled":return d.value;case"rejected":throw d.reason}}throw d}function Q(d,E,B,w,ce){var me=typeof d;(me==="undefined"||me==="boolean")&&(d=null);var Ee=!1;if(d===null)Ee=!0;else switch(me){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(d.$$typeof){case f:case x:Ee=!0;break;case q:return Ee=d._init,Q(Ee(d._payload),E,B,w,ce)}}if(Ee)return ce=ce(d),Ee=w===""?"."+se(d,0):w,$(ce)?(B="",Ee!=null&&(B=Ee.replace(U,"$&/")+"/"),Q(ce,E,B,"",function(jt){return jt})):ce!=null&&(Ae(ce)&&(ce=Me(ce,B+(ce.key==null||d&&d.key===ce.key?"":(""+ce.key).replace(U,"$&/")+"/")+Ee)),E.push(ce)),1;Ee=0;var K=w===""?".":w+":";if($(d))for(var ue=0;ue>>1,ze=R[_e];if(0>>1;_ej(oe,te))dj(E,oe)?(R[_e]=E,R[d]=te,_e=d):(R[_e]=oe,R[ne]=te,_e=ne);else if(dj(E,te))R[_e]=E,R[d]=te,_e=d;else break e}}return Q}function j(R,Q){var te=R.sortIndex-Q.sortIndex;return te!==0?te:R.id-Q.id}if(f.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var H=performance;f.unstable_now=function(){return H.now()}}else{var A=Date,W=A.now();f.unstable_now=function(){return A.now()-W}}var k=[],Z=[],q=1,S=null,C=3,F=!1,xe=!1,L=!1,ee=!1,Ue=typeof setTimeout=="function"?setTimeout:null,le=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function Le(R){for(var Q=T(Z);Q!==null;){if(Q.callback===null)o(Z);else if(Q.startTime<=R)o(Z),Q.sortIndex=Q.expirationTime,x(k,Q);else break;Q=T(Z)}}function Se(R){if(L=!1,Le(R),!xe)if(T(k)!==null)xe=!0,$||($=!0,Ae());else{var Q=T(Z);Q!==null&&se(Se,Q.startTime-R)}}var $=!1,ae=-1,ve=5,Ce=-1;function Y(){return ee?!0:!(f.unstable_now()-CeR&&Y());){var _e=S.callback;if(typeof _e=="function"){S.callback=null,C=S.priorityLevel;var ze=_e(S.expirationTime<=R);if(R=f.unstable_now(),typeof ze=="function"){S.callback=ze,Le(R),Q=!0;break t}S===T(k)&&o(k),Le(R)}else o(k);S=T(k)}if(S!==null)Q=!0;else{var it=T(Z);it!==null&&se(Se,it.startTime-R),Q=!1}}break e}finally{S=null,C=te,F=!1}Q=void 0}}finally{Q?Ae():$=!1}}}var Ae;if(typeof I=="function")Ae=function(){I(Me)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,U=qe.port2;qe.port1.onmessage=Me,Ae=function(){U.postMessage(null)}}else Ae=function(){Ue(Me,0)};function se(R,Q){ae=Ue(function(){R(f.unstable_now())},Q)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(R){R.callback=null},f.unstable_forceFrameRate=function(R){0>R||125_e?(R.sortIndex=te,x(Z,R),T(k)===null&&R===T(Z)&&(L?(le(ae),ae=-1):L=!0,se(Se,te-_e))):(R.sortIndex=ze,x(k,R),xe||F||(xe=!0,$||($=!0,Ae()))),R},f.unstable_shouldYield=Y,f.unstable_wrapCallback=function(R){var Q=C;return function(){var te=C;C=Q;try{return R.apply(this,arguments)}finally{C=te}}}})(Hf)),Hf}var pm;function By(){return pm||(pm=1,Rf.exports=qy()),Rf.exports}var wf={exports:{}},xt={};/** * @license React * react-dom.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 Sm;function Yy(){if(Sm)return xt;Sm=1;var f=Qf();function x(q){var S="https://react.dev/errors/"+q;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(x){console.error(x)}}return f(),wf.exports=Yy(),wf.exports}/** * @license React * react-dom-client.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 Tm;function Qy(){if(Tm)return bu;Tm=1;var f=By(),x=Qf(),T=Gy();function o(e){var t="https://react.dev/errors/"+e;if(1St||(e.current=tl[St],tl[St]=null,St--)}function M(e,t){St++,tl[St]=e.current,e.current=t}var O=Nt(null),X=Nt(null),fe=Nt(null),de=Nt(null);function ge(e,t){switch(M(fe,t),M(X,e),M(O,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_0(t),e=z0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}h(O),M(O,e)}function nt(){h(O),h(X),h(fe)}function bt(e){var t=e.memoizedState;t!==null&&(Nn._currentValue=t.memoizedState,M(de,e)),t=O.current;var l=z0(t,e.type);t!==l&&(M(X,e),M(O,l))}function ll(e){X.current===e&&(h(O),h(X)),de.current===e&&(h(de),Nn._currentValue=jt)}var Wi,Vf;function wl(e){if(Wi===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Wi=t&&t[1]||"",Vf=-1)":-1n||r[a]!==g[n]){var N=` `+r[a].replace(" at new "," at ");return e.displayName&&N.includes("")&&(N=N.replace("",e.displayName)),N}while(1<=a&&0<=n);break}}}finally{Ii=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?wl(l):""}function wm(e,t){switch(e.tag){case 26:case 27:case 5:return wl(e.type);case 16:return wl("Lazy");case 13:return e.child!==t&&t!==null?wl("Suspense Fallback"):wl("Suspense");case 19:return wl("SuspenseList");case 0:case 15:return Pi(e.type,!1);case 11:return Pi(e.type.render,!1);case 1:return Pi(e.type,!0);case 31:return wl("Activity");case 30:return wl("ViewTransition");default:return""}}function Zf(e){try{var t="",l=null;do t+=wm(e,l),l=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var ec=Object.prototype.hasOwnProperty,tc=f.unstable_scheduleCallback,lc=f.unstable_cancelCallback,qm=f.unstable_shouldYield,Bm=f.unstable_requestPaint,Rt=f.unstable_now,Ym=f.unstable_getCurrentPriorityLevel,Kf=f.unstable_ImmediatePriority,kf=f.unstable_UserBlockingPriority,Nu=f.unstable_NormalPriority,Gm=f.unstable_LowPriority,Jf=f.unstable_IdlePriority,Qm=f.log,Xm=f.unstable_setDisableYieldValue,zn=null,Ht=null;function ql(e){if(typeof Qm=="function"&&Xm(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(zn,e)}catch{}}var wt=Math.clz32?Math.clz32:Zm,Lm=Math.log,Vm=Math.LN2;function Zm(e){return e>>>=0,e===0?32:31-(Lm(e)/Vm|0)|0}var Tu=256,_u=262144,zu=4194304;function ra(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Eu(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=ra(a):(i&=s,i!==0?n=ra(i):l||(l=s&~e,l!==0&&(n=ra(l))))):(s=a&~u,s!==0?n=ra(s):i!==0?n=ra(i):l||(l=a&~e,l!==0&&(n=ra(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function En(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $f(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0l;l++)t.push(e);return t}function jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function km(e,t,l,a,n,u){var i=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var s=e.entanglements,r=e.expirationTimes,g=e.hiddenUpdates;for(l=i&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mc=!1;if(Nl)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){mc=!0}}),window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch{mc=!1}var Bl=null,hc=null,Du=null;function br(){if(Du)return Du;var e,t=hc,l=t.length,a,n="value"in Bl?Bl.value:Bl.textContent,u=n.length;for(e=0;e=Rn),zr=" ",Er=!1;function jr(e,t){switch(e){case"keyup":return A1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Or(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var La=!1;function M1(e,t){switch(e){case"compositionend":return Or(t);case"keypress":return t.which!==32?null:(Er=!0,zr);case"textInput":return e=t.data,e===zr&&Er?null:e;default:return null}}function D1(e,t){if(La)return e==="compositionend"||!bc&&jr(e,t)?(e=br(),Du=hc=Bl=null,La=!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"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var l=wr(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=wr(l)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Nc(e.document)}return t}function Tc(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")}var G1=Nl&&"documentMode"in document&&11>=document.documentMode,Va=null,_c=null,Bn=null,zc=!1;function Gr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zc||Va==null||Va!==Nc(a)||(a=Va,"selectionStart"in a&&Tc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bn&&qn(Bn,a)||(Bn=a,a=qi(_c,"onSelect"),0>=i,n-=i,rl=1<<32-wt(t)+n|l<ie?(at=P,P=null):at=P.sibling;var De=y(v,P,b[ie],_);if(De===null){P===null&&(P=at);break}e&&P&&De.alternate===null&&t(v,P),m=u(De,m,ie),Oe===null?V=De:Oe.sibling=De,Oe=De,P=at}if(ie===b.length)return l(v,P),be&&El(v,ie),V;if(P===null){for(;ieie?(at=P,P=null):at=P.sibling;var fa=y(v,P,De.value,_);if(fa===null){P===null&&(P=at);break}e&&P&&fa.alternate===null&&t(v,P),m=u(fa,m,ie),Oe===null?V=fa:Oe.sibling=fa,Oe=fa,P=at}if(De.done)return l(v,P),be&&El(v,ie),V;if(P===null){for(;!De.done;ie++,De=b.next())De=z(v,De.value,_),De!==null&&(m=u(De,m,ie),Oe===null?V=De:Oe.sibling=De,Oe=De);return be&&El(v,ie),V}for(P=a(P);!De.done;ie++,De=b.next())De=p(P,v,ie,De.value,_),De!==null&&(e&&(at=De.alternate,at!==null&&P.delete(at.key===null?ie:at.key)),m=u(De,m,ie),Oe===null?V=De:Oe.sibling=De,Oe=De);return e&&P.forEach(function(My){return t(v,My)}),be&&El(v,ie),V}function ye(v,m,b,_){if(typeof b=="object"&&b!==null&&b.type===Me&&b.key===null&&b.props.ref===void 0&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ce:e:{for(var V=b.key;m!==null;){if(m.key===V){if(V=b.type,V===Me){if(m.tag===7){l(v,m.sibling),_=n(m,b.props.children),Vl(_,b),_.return=v,v=_;break e}}else if(m.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===ze&&Ta(V)===m.type){l(v,m.sibling),_=n(m,b.props),Vl(_,b),_.return=v,v=_;break e}l(v,m);break}else t(v,m);m=m.sibling}b.type===Me?(_=va(b.props.children,v.mode,_,b.key),Vl(_,b),_.return=v,v=_):(_=Xu(b.type,b.key,b.props,null,v.mode,_),Vl(_,b),_.return=v,v=_)}return i(v);case Y:e:{for(V=b.key;m!==null;){if(m.key===V)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){l(v,m.sibling),_=n(m,b.children||[]),_.return=v,v=_;break e}else{l(v,m);break}else t(v,m);m=m.sibling}_=Dc(b,v.mode,_),_.return=v,v=_}return i(v);case ze:return b=Ta(b),ye(v,m,b,_)}if(Ee(b))return G(v,m,b,_);if(w(b)){if(V=w(b),typeof V!="function")throw Error(o(150));return b=V.call(b),J(v,m,b,_)}if(typeof b.then=="function")return ye(v,m,Iu(b),_);if(b.$$typeof===se)return ye(v,m,Ju(v,b),_);Pu(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(l(v,m.sibling),_=n(m,b),_.return=v,v=_):(l(v,m),_=Mc(b,v.mode,_),_.return=v,v=_),i(v)):l(v,m)}return function(v,m,b,_){try{Vn=0;var V=ye(v,m,b,_);return Pa=null,V}catch(P){if(P===Ia||P===Fu)throw P;var Oe=At(29,P,null,v.mode);return Oe.lanes=_,Oe.return=v,Oe}finally{}}}var za=ro(!0),oo=ro(!1),Zl=!1;function Xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(we&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Qu(e),Jr(e,null,l),t}return Gu(e,a,t,l),Qu(e)}function Zn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,If(e,l)}}function Vc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Zc=!1;function Kn(){if(Zc){var e=Wa;if(e!==null)throw e}}function kn(e,t,l,a){Zc=!1;var n=e.updateQueue;Zl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var r=s,g=r.next;r.next=null,i===null?u=g:i.next=g,i=r;var N=e.alternate;N!==null&&(N=N.updateQueue,s=N.lastBaseUpdate,s!==i&&(s===null?N.firstBaseUpdate=g:s.next=g,N.lastBaseUpdate=r))}if(u!==null){var z=n.baseState;i=0,N=g=r=null,s=u;do{var y=s.lane&-536870913,p=y!==s.lane;if(p?(je&y)===y:(a&y)===y){y!==0&&y===Sa&&(Zc=!0),N!==null&&(N=N.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var G=e,J=s;y=t;var ye=l;switch(J.tag){case 1:if(G=J.payload,typeof G=="function"){z=G.call(ye,z,y);break e}z=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=J.payload,y=typeof G=="function"?G.call(ye,z,y):G,y==null)break e;z=ae({},z,y);break e;case 2:Zl=!0}}y=s.callback,y!==null&&(e.flags|=64,p&&(e.flags|=8192),p=n.callbacks,p===null?n.callbacks=[y]:p.push(y))}else p={lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},N===null?(g=N=p,r=z):N=N.next=p,i|=y;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;p=s,s=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(!0);N===null&&(r=z),n.baseState=r,n.firstBaseUpdate=g,n.lastBaseUpdate=N,u===null&&(n.shared.lanes=0),ea|=i,e.lanes=i,e.memoizedState=z}}function mo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ho(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var i=K.T,s={};s.types=i!==null?i.types:null,K.T=s,os(e,!1,t,l);try{var r=n(),g=K.S;if(g!==null&&g(s,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var N=W1(r,a);Wn(e,t,N,Lt(e))}else Wn(e,t,a,Lt(e))}catch(z){Wn(e,t,{then:function(){},status:"rejected",reason:z},Lt())}finally{ue.p=u,i!==null&&s.types!==null&&(i.types=s.types),K.T=i}}function ah(){}function fs(e,t,l,a){if(e.tag!==5)throw Error(o(476));var n=Ko(e).queue;Zo(e,n,t,jt,l===null?ah:function(){return ko(e),l(a)})}function Ko(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:jt,baseState:jt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:jt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ko(e){var t=Ko(e);t.next===null&&(t=e.alternate.memoizedState),Wn(e,t.next.queue,{},Lt())}function rs(){return mt(Nn)}function Jo(){return Pe().memoizedState}function $o(){return Pe().memoizedState}function nh(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Lt();e=Kl(l);var a=kl(t,e,l);a!==null&&(Ut(a,t,l),Zn(a,t,l)),t={cache:Bc()},e.payload=t;return}t=t.return}}function uh(e,t,l){var a=Lt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fi(e)?Wo(t,l):(l=Ac(e,t,l,a),l!==null&&(Ut(l,e,a),Io(l,t,a)))}function Fo(e,t,l){var a=Lt();Wn(e,t,l,a)}function Wn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fi(e))Wo(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,s=u(i,l);if(n.hasEagerState=!0,n.eagerState=s,Bt(s,i))return Gu(e,t,n,0),Ze===null&&Yu(),!1}catch{}finally{}if(l=Ac(e,t,n,a),l!==null)return Ut(l,e,a),Io(l,t,a),!0}return!1}function os(e,t,l,a){if(a={lane:2,revertLane:tf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fi(e)){if(t)throw Error(o(479))}else t=Ac(e,l,a,2),t!==null&&Ut(t,e,2)}function fi(e){var t=e.alternate;return e===he||t!==null&&t===he}function Wo(e,t){en=li=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Io(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,If(e,l)}}var ri={readContext:mt,use:ui,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe,useEffectEvent:Fe},Po={readContext:mt,use:ui,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:wo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ci(4194308,4,Go.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ci(4194308,4,e,t)},useInsertionEffect:function(e,t){ci(4,2,e,t)},useMemo:function(e,t){var l=_t();t=t===void 0?null:t;var a=e();if(Ea){ql(!0);try{e()}finally{ql(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=_t();if(l!==void 0){var n=l(t);if(Ea){ql(!0);try{l(t)}finally{ql(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=uh.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:function(e){e=ns(e);var t=e.queue,l=Fo.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:cs,useDeferredValue:function(e,t){var l=_t();return ss(l,e,t)},useTransition:function(){var e=ns(!1);return e=Zo.bind(null,he,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,n=_t();if(be){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Ze===null)throw Error(o(349));(je&127)!==0||po(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,wo(No.bind(null,a,u,e),[e]),a.flags|=2048,ln(9,{destroy:void 0},So.bind(null,a,u,l,t),null),l},useId:function(){var e=_t(),t=Ze.identifierPrefix;if(be){var l=ol,a=rl;l=(a&~(1<<32-wt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ai++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[dt]=t,u[Ot]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=u;e:switch(gt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Dl(t)}}return ke(t),t.subtreeFlags&=-33554433,_s(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Dl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=fe.current,Fa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=st,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||N0(e.nodeValue,l)),e||Xl(t,!0)}else e=ru(e).createTextNode(a),e[dt]=t,t.stateNode=e}return ke(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Fa(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[dt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ke(t),e=!1}else l=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Yt(t),t):(Yt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Fa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[dt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ke(t),n=!1}else n=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Yt(t),t):(Yt(t),null)}return Yt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),vi(t,t.updateQueue),ke(t),null);case 4:return nt(),e===null&&uf(t.stateNode.containerInfo),t.flags|=67108864,ke(t),null;case 10:return Ol(t.type),ke(t),null;case 19:if($c(t),a=t.memoizedState,a===null)return ke(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)Pn(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ti(e),u!==null){for(t.flags|=128,Pn(a,!1),e=u.updateQueue,t.updateQueue=e,vi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)$r(l,e),l=l.sibling;return Jn(t,yt.current&1|2),be&&El(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Rt()>Oi&&(t.flags|=128,n=!0,Pn(a,!1),t.lanes=4194304)}else{if(!n)if(e=ti(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,vi(t,e),Pn(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!u.alternate&&!be)return ke(t),null}else 2*Rt()-a.renderingStartTime>Oi&&l!==536870912&&(t.flags|=128,n=!0,Pn(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Rt(),e.sibling=null,u=yt.current,u=n?u&1|2:u&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||be?Jn(t,u):(l=u,M(ht,t),M(yt,l),pt===null&&(pt=t)),be&&El(t,a.treeForkCount),e}return ke(t),null;case 22:case 23:return Yt(t),kc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(ke(t),t.subtreeFlags&6&&(t.flags|=8192)):ke(t),l=t.updateQueue,l!==null&&vi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&h(Na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ol(et),ke(t),null;case 25:return null;case 30:return t.flags|=33554432,ke(t),null}throw Error(o(156,t.tag))}function dh(e,t){switch(Uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ol(et),nt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ll(t),null;case 31:if(t.memoizedState!==null){if(Yt(t),t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $c(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return nt(),null;case 10:return Ol(t.type),null;case 22:case 23:return Yt(t),kc(),e!==null&&h(Na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ol(et),null;case 25:return null;default:return null}}function _d(e,t){switch(Uc(t),t.tag){case 3:Ol(et),nt();break;case 26:case 27:case 5:ll(t);break;case 4:nt();break;case 31:t.memoizedState!==null&&Yt(t);break;case 13:Yt(t);break;case 19:$c(t);break;case 10:Ol(t.type);break;case 22:case 23:Yt(t),kc(),e!==null&&h(Na);break;case 24:Ol(et)}}function eu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(s){Ge(t,t.return,s)}}function Wl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var i=a.inst,s=i.destroy;if(s!==void 0){i.destroy=void 0,n=t;var r=l,g=s;try{g()}catch(N){Ge(n,r,N)}}}a=a.next}while(a!==u)}}catch(N){Ge(t,t.return,N)}}function zd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ho(t,l)}catch(a){Ge(e,e.return,a)}}}function Ed(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ge(e,t,a)}}function dl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var n=e.stateNode,u=Tl(e.memoizedProps,n);(n.ref===null||n.ref.name!==u)&&(n.ref=U0(u)),a=n.ref;break;case 7:if(e.stateNode===null){var i=new Vt(e);S(e.child,!1,ly,i,void 0,void 0),e.stateNode=i}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Ge(e,t,s)}}function vt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ge(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ge(e,t,n)}else l.current=null}function gi(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l title"))),gt(a,t,l),a[dt]=e,ct(a),t=a;break e;case"link":if(u=F0("link","href",n).get(t+(l.href||""))){for(i=0;iye&&(i=ye,ye=J,J=i);var v=qr(s,J),m=qr(s,ye);if(v&&m&&(p.rangeCount!==1||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==m.node||p.focusOffset!==m.offset)){var b=z.createRange();b.setStart(v.node,v.offset),p.removeAllRanges(),J>ye?(p.addRange(b),p.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),p.addRange(b))}}}}for(z=[],p=s;p=p.parentNode;)p.nodeType===1&&z.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;sl?32:l,K.T=null,l=Zs,Zs=null;var u=cl,i=xl;if($e=0,Ma=cl=null,xl=0,(we&6)!==0)throw Error(o(331));var s=we;if(we|=4,$d(u.current),Kd(u,u.current,i,l),we=s,cu(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(zn,u)}catch{}return!0}finally{ue.p=n,K.T=a,r0(e,t)}}function o0(e,t,l){t=kt(l,t),t=hs(e.stateNode,t,2),e=kl(e,t,2),e!==null&&(jn(e,2),bl(e))}function Ge(e,t,l){if(e.tag===3)o0(e,e,l);else for(;t!==null;){if(t.tag===3){o0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ta===null||!ta.has(a))){e=kt(l,e),l=cd(2),a=kl(t,l,2),a!==null&&(sd(l,a,t,e),jn(a,2),bl(a));break}}t=t.return}}function Is(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new vh;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Xs=!0,n.add(l),e=_h.bind(null,e,t,l),t.then(e,e))}function _h(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ze===e&&(je&l)===l&&((We===4||We===3&&(je&62914560)===je&&300>Rt()-ji)&&(we&2)===0?hn(e,0):Ei|=l,fn===je&&(fn=0)),bl(e)}function d0(e,t){t===0&&(t=Ff()),e=ya(e,t),e!==null&&(jn(e,t),bl(e))}function zh(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),d0(e,l)}function Eh(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),d0(e,l)}function jh(e,t){return tc(e,t)}var vn=null,gn=null,Ps=!1,Hi=!1,ef=!1,aa=0;function bl(e){e!==gn&&e.next===null&&(gn===null?vn=gn=e:gn=gn.next=e),Hi=!0,Ps||(Ps=!0,Ah())}function cu(e,t){if(!ef&&Hi){ef=!0;do for(var l=!1,a=vn;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-wt(42|e)+1)-1,u&=n&~(i&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,v0(a,u))}else u=je,u=Eu(a,a===Ze?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||En(a,u)||(l=!0,v0(a,u));a=a.next}while(l);ef=!1}}function Oh(){m0()}function m0(){Hi=Ps=!1;var e=0;aa!==0&&Gh()&&(e=aa);for(var t=Rt(),l=null,a=vn;a!==null;){var n=a.next,u=h0(a,t);u===0?(a.next=null,l===null?vn=n:l.next=n,n===null&&(gn=l)):(l=a,(e!==0||(u&3)!==0)&&(Hi=!0)),a=n}$e!==0&&$e!==5||cu(e),aa!==0&&(aa=0)}function h0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0s)break;var N=r.transferSize,z=r.initiatorType;N&&T0(z)&&(r=r.responseEnd,i+=N*(rGi){J.length=G;break}b=new Promise(Kh.bind(b)),J.push(b)}}}if(0"u"?null:document;function K0(e,t,l){var a=bn;if(a&&typeof t=="string"&&t){var n=Zt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Z0.has(n)||(Z0.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),gt(t,"link",e),ct(t),a.head.appendChild(t)))}}function oy(e){Rl.D(e),K0("dns-prefetch",e,null)}function dy(e,t){Rl.C(e,t),K0("preconnect",e,t)}function my(e,t,l){Rl.L(e,t,l);var a=bn;if(a&&e&&t){var n='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Zt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Zt(l.imageSizes)+'"]')):n+='[href="'+Zt(e)+'"]';var u=n;switch(t){case"style":u=pn(e);break;case"script":u=Sn(e)}if(!(Pt.has(u)||(e=ae({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Pt.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(du(u))||t==="script"&&a.querySelector(mu(u))))){var i=a.createElement("link");gt(i,"link",e),t==="style"&&(i[ju]=!0,i.onload=i.onerror=function(){nr(i)}),ct(i),a.head.appendChild(i)}}}function hy(e,t){Rl.m(e,t);var l=bn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Zt(a)+'"][href="'+Zt(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Sn(e)}if(!Pt.has(u)&&(e=ae({rel:"modulepreload",href:e},t),Pt.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(mu(u)))return}a=l.createElement("link"),gt(a,"link",e),ct(a),l.head.appendChild(a)}}}function yy(e,t,l){Rl.S(e,t,l);var a=bn;if(a&&e){var n=qa(a).hoistableStyles,u=pn(e);t=t||"default";var i=n.get(u);if(!i){var s={loading:0,preload:null};if(i=a.querySelector(du(u)))s.loading=5;else{e=ae({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Pt.get(u))&&Nf(e,l);var r=i=a.createElement("link");ct(r),gt(r,"link",e),r._p=new Promise(function(g,N){r.onload=g,r.onerror=N}),r.addEventListener("load",function(){s.loading|=1}),r.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Bi(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:s},n.set(u,i)}}}function vy(e,t){Rl.X(e,t);var l=bn;if(l&&e){var a=qa(l).hoistableScripts,n=Sn(e),u=a.get(n);u||(u=l.querySelector(mu(n)),u||(e=ae({src:e,async:!0},t),(t=Pt.get(n))&&Tf(e,t),u=l.createElement("script"),ct(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function gy(e,t){Rl.M(e,t);var l=bn;if(l&&e){var a=qa(l).hoistableScripts,n=Sn(e),u=a.get(n);u||(u=l.querySelector(mu(n)),u||(e=ae({src:e,async:!0,type:"module"},t),(t=Pt.get(n))&&Tf(e,t),u=l.createElement("script"),ct(u),gt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function k0(e,t,l,a){var n=(n=fe.current)?ou(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=pn(l.href),t=qa(n).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=pn(l.href);var u=qa(n).hoistableStyles,i=u.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,i),(u=n.querySelector(du(e)))?u._p||(i.instance=u,i.state.loading=5):(u=Pt.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Pt.set(e,u)),xy(n,e,u,i.state))),t&&a===null)throw Error(o(528,""));return i}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Sn(l),t=qa(n).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function pn(e){return'href="'+Zt(e)+'"'}function du(e){return'link[rel="stylesheet"]['+e+"]"}function J0(e){return ae({},e,{"data-precedence":e.precedence,precedence:null})}function xy(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ju]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[ju]=!0,t.onload=t.onerror=nr.bind(null,t),gt(t,"link",l),ct(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Sn(e){return'[src="'+Zt(e)+'"]'}function mu(e){return"script[async]"+e}function $0(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Zt(l.href)+'"]');if(a)return t.instance=a,ct(a),a;var n=ae({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ct(a),gt(a,"style",n),Bi(a,l.precedence,e),t.instance=a;case"stylesheet":n=pn(l.href);var u=e.querySelector(du(n));if(u)return t.state.loading|=4,t.instance=u,ct(u),u;a=J0(l),(n=Pt.get(n))&&Nf(a,n),u=(e.ownerDocument||e).createElement("link"),ct(u);var i=u;return i._p=new Promise(function(s,r){i.onload=s,i.onerror=r}),gt(u,"link",a),t.state.loading|=4,Bi(u,l.precedence,e),t.instance=u;case"script":return u=Sn(l.src),(n=e.querySelector(mu(u)))?(t.instance=n,ct(n),n):(a=l,(n=Pt.get(u))&&(a=ae({},l),Tf(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),ct(n),gt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Bi(a,l.precedence,e));return t.instance}function Bi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title"):null)}function by(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function W0(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function I0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P0(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function em(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=P0(t),e.suspenseyImages.push(t)),e=Ny.bind(e),t.decode().then(e,e))}function py(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=pn(a.href),u=t.querySelector(du(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,ct(u);return}u=t.ownerDocument||t,a=J0(a),(n=Pt.get(n))&&Nf(a,n),u=u.createElement("link"),ct(u);var i=u;i._p=new Promise(function(s,r){i.onload=s,i.onerror=r}),gt(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=hu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Gi=0;function Sy(e,t){return e.stylesheets&&e.count===0&&Xi(e,e.stylesheets),0Gi?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function tm(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Xi(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function hu(){this.count--,tm(this)}function Ny(){this.imgCount--,tm(this)}var Qi=null;function Xi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qi=new Map,t.forEach(Ty,e),Qi=null,hu.call(e))}function Ty(e,t){if(!(t.state.loading&4)){var l=Qi.get(e);if(l)var a=l.get(null);else{l=new Map,Qi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(x){console.error(x)}}return f(),Uf.exports=Qy(),Uf.exports}var Ly=Xy();/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vy=f=>f.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jm=(...f)=>f.filter((x,T,o)=>!!x&&x.trim()!==""&&o.indexOf(x)===T).join(" ").trim();/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Zy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ky=D.forwardRef(({color:f="currentColor",size:x=24,strokeWidth:T=2,absoluteStrokeWidth:o,className:j="",children:H,iconNode:A,...W},k)=>D.createElement("svg",{ref:k,...Zy,width:x,height:x,stroke:f,strokeWidth:o?Number(T)*24/Number(x):T,className:jm("lucide",j),...W},[...A.map(([Z,q])=>D.createElement(Z,q)),...Array.isArray(H)?H:[H]]));/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pe=(f,x)=>{const T=D.forwardRef(({className:o,...j},H)=>D.createElement(Ky,{ref:H,iconNode:x,className:jm(`lucide-${Vy(f)}`,o),...j}));return T.displayName=`${f}`,T};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ky=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Jy=pe("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $y=pe("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.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xf=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fy=pe("CircleAlert",[["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.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wy=pe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Iy=pe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Py=pe("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ev=pe("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const tv=pe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lv=pe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const av=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nv=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uv=pe("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lf=pe("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iv=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bf=pe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cv=pe("ListVideo",[["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}],["path",{d:"m16 12 5 3-5 3v-6Z",key:"zpskkp"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sv=pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fv=pe("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rv=pe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Om=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Am=pe("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fi=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ov=pe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dv=pe("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mv=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cm=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hv=pe("ServerCog",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m15.7 13.4-.9-.3",key:"1jwmzr"}],["path",{d:"m9.2 10.9-.9-.3",key:"qapnim"}],["path",{d:"m10.6 15.7.3-.9",key:"quwk0k"}],["path",{d:"m13.6 15.7-.4-1",key:"cb9xp7"}],["path",{d:"m10.8 9.3-.4-1",key:"1uaiz5"}],["path",{d:"m8.3 13.6 1-.4",key:"s6srou"}],["path",{d:"m14.7 10.8 1-.4",key:"4d31cq"}],["path",{d:"m13.4 8.3-.3.9",key:"1bm987"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yv=pe("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vv=pe("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gv=pe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xv=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bv=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yf=pe("UserPen",[["path",{d:"M11.5 15H7a4 4 0 0 0-4 4v2",key:"15lzij"}],["path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1817ys"}],["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mm=pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pv=pe("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sv=pe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nv=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Dm(f){var x,T,o="";if(typeof f=="string"||typeof f=="number")o+=f;else if(typeof f=="object")if(Array.isArray(f)){var j=f.length;for(x=0;xTv(f),Ie="w-full rounded-lg border border-line bg-white px-3 py-2 text-[13px] text-slate-900 placeholder:text-slate-400 transition focus:border-brand-500 focus:outline-none focus:ring-3 focus:ring-brand-500/15 disabled:cursor-not-allowed disabled:bg-slate-50";function zm(f){if(!f)return"—";const x=Math.floor((Date.now()-f)/6e4);return x<1?"刚刚":x<60?`${x} 分钟前`:`${Math.floor(x/60)} 小时前`}function Gf(f=[]){return{total:f.length,studyable:f.filter(x=>x.in_study!==!1).length}}function pu(f){return String(f||"").split("#").filter(Boolean)}const _v={"01":"单选","02":"多选","03":"判断","04":"问答"};function el(f){return f instanceof Error?f.message:String(f)}const zv={neutral:"bg-slate-100 text-slate-600 ring-slate-200",brand:"bg-brand-50 text-brand-700 ring-brand-100",success:"bg-emerald-50 text-emerald-700 ring-emerald-100",warning:"bg-amber-50 text-amber-700 ring-amber-100",danger:"bg-red-50 text-red-700 ring-red-100",running:"bg-sky-50 text-sky-700 ring-sky-100"};function Ua({tone:f="neutral",children:x,dot:T=!1,className:o}){return c.jsxs("span",{className:ot("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium ring-1 ring-inset",zv[f],o),children:[T&&c.jsx("span",{className:"size-1.5 rounded-full bg-current opacity-70"}),x]})}const Ev={primary:"border-brand-500 bg-brand-500 text-white shadow-sm shadow-brand-500/25 hover:border-brand-600 hover:bg-brand-600",secondary:"border-line bg-white text-slate-700 hover:border-slate-300 hover:bg-slate-50",ghost:"border-transparent bg-transparent text-slate-600 hover:bg-slate-100",danger:"border-transparent bg-transparent text-red-600 hover:bg-red-50","danger-solid":"border-red-500 bg-red-500 text-white shadow-sm shadow-red-500/25 hover:border-red-600 hover:bg-red-600",soft:"border-brand-100 bg-brand-50 text-brand-700 hover:border-brand-200 hover:bg-brand-100"},jv={sm:"h-8 gap-1.5 rounded-lg px-2.5 text-xs",md:"h-9 gap-1.5 rounded-lg px-3.5 text-[13px]",icon:"h-9 w-9 rounded-lg"};function Re({variant:f="secondary",size:x="md",loading:T=!1,icon:o,className:j,children:H,disabled:A,type:W="button",...k}){return c.jsxs("button",{type:W,disabled:A||T,className:ot("inline-flex shrink-0 items-center justify-center border font-medium transition","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/20","disabled:cursor-not-allowed disabled:opacity-50",Ev[f],jv[x],j),...k,children:[T?c.jsx(sv,{className:"size-3.5 animate-spin"}):o,H]})}const Ov={error:"text-red-600",fail:"text-red-600",failed:"text-red-600",warn:"text-amber-600",warning:"text-amber-600",success:"text-emerald-600",info:"text-slate-600"},Av=/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) \[([a-zA-Z]+)\] ([\s\S]*)$/;function Um({lines:f,empty:x}){return f.length?c.jsx(c.Fragment,{children:f.map((T,o)=>{const j=Av.exec(T);if(!j)return c.jsx("span",{className:"block text-slate-600",children:T},o);const H=Ov[j[2].toLowerCase()]||"text-slate-600";return c.jsxs("span",{className:"block",children:[c.jsx("span",{className:"text-slate-400",children:j[1]})," ",c.jsxs("span",{className:ot("font-medium",H),children:["[",j[2],"]"]})," ",c.jsx("span",{className:H,children:j[3]})]},o)})}):c.jsx("span",{className:"text-slate-400",children:x})}function Cv(f,x){var H,A;const T=x==="login"||f.status==="logging"||((H=f.run)==null?void 0:H.status)==="logging"?"logging":((A=f.run)==null?void 0:A.status)||f.status||"idle",j={discovering:{label:"发现课程中",tone:"running",pulse:!0},studying:{label:"学习中",tone:"running",pulse:!0},finished:{label:"已完成",tone:"success"},stopped:{label:"已停止",tone:"warning"},error:{label:"出错",tone:"danger"},interrupted:{label:"已中断",tone:"warning"},logging:{label:"登录中",tone:"running",pulse:!0},logged_in:{label:"已登录",tone:"success"},login_failed:{label:"登录失败",tone:"danger"},idle:{label:"未登录",tone:"neutral"}}[T]||{label:T,tone:"neutral"};return{label:j.label,tone:j.tone,pulse:!!j.pulse}}function Mv({account:f,course:x,disabled:T,onToggle:o}){var H;const j=(H=f.selected)==null?void 0:H.includes(x.plan_id);return c.jsxs("label",{className:ot("flex cursor-pointer items-start gap-2.5 rounded-lg border border-transparent px-2 py-1.5 transition","hover:border-line hover:bg-slate-50",T&&"pointer-events-none opacity-60"),children:[c.jsx("input",{type:"checkbox",className:"mt-0.5 size-3.5 shrink-0 accent-brand-500",checked:!!j,disabled:T,onChange:A=>o(x.plan_id,A.target.checked)}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-[12.5px] font-medium text-slate-700",children:x.name||x.plan_id}),c.jsx("span",{className:"mt-0.5 block truncate text-[11px] text-slate-400",children:[x.section,x.status_label,x.info].filter(Boolean).join(" · ")||"—"})]}),c.jsx("span",{className:"shrink-0 pt-0.5 text-[11px] tabular-nums text-slate-500",children:x.progress||""})]})}function Dv({account:f,platformLabel:x,capabilities:T,pending:o,openLog:j,logLines:H,onToggleLog:A,onLogin:W,onRefresh:k,onStudy:Z,onStop:q,onCapture:S,onStopCapture:C,onQuiz:F,onEdit:xe,onDelete:L,onToggleCourse:ee,onSelectAll:Ue,onClearSelection:le,onToggleOption:I}){var it,ne,oe,d,E,B,w,ce,me,Ee,K,ue,jt,tl,St,Nt;const[Le,Se]=D.useState(!1),$=D.useRef(null),ae=D.useRef(null),ve=D.useRef(!0);D.useEffect(()=>{if(!Le)return;const h=M=>{var O;(O=$.current)!=null&&O.contains(M.target)||Se(!1)};return document.addEventListener("pointerdown",h),()=>document.removeEventListener("pointerdown",h)},[Le]),D.useEffect(()=>{const h=ae.current;h&&ve.current&&(h.scrollTop=h.scrollHeight)},[H,j]);const Ce=Cv(f,o),Y=!!o||f.status==="logging"||((it=f.run)==null?void 0:it.status)==="logging",Me=f.courses||[],Ae=Me.filter(h=>h.in_study!==!1),qe=Me.filter(h=>h.in_study===!1),U=Gf(Me),se=((ne=f.run)==null?void 0:ne.done)||0,R=((oe=f.run)==null?void 0:oe.total)||0,Q=R?Math.round(se/R*100):0,te=["discovering","studying"].includes(((d=f.run)==null?void 0:d.status)||""),_e=((E=f.selected)==null?void 0:E.length)||0,ze=_e>0&&(((B=f.cookies)==null?void 0:B.length)||0)>0;return c.jsxs("article",{"data-id":f.id,className:"card-shadow flex min-w-0 flex-col rounded-2xl border border-line bg-white transition-colors hover:border-slate-300/80",children:[c.jsxs("header",{className:"flex items-start gap-3 px-4 pt-4",children:[c.jsxs("div",{className:"relative mt-0.5 grid size-10 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-50 to-sky-50 text-[13px] font-semibold text-brand-700 ring-1 ring-brand-100",children:[(f.user||f.username||"?").slice(0,1).toUpperCase(),c.jsx("span",{className:ot("absolute -bottom-0.5 -right-0.5 size-3 rounded-full border-2 border-white",Ce.tone==="success"?"bg-emerald-500":Ce.tone==="danger"?"bg-red-500":Ce.tone==="running"?"bg-sky-500":Ce.tone==="warning"?"bg-amber-500":"bg-slate-300",Ce.pulse&&"animate-pulse")})]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h2",{className:"truncate text-[13.5px] font-semibold text-slate-900",children:f.user||f.username}),c.jsx(Ua,{tone:Ce.tone,dot:!0,children:Ce.label})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-slate-400",children:[c.jsx("span",{className:"truncate",children:f.username}),f.note&&c.jsxs("span",{className:"truncate",children:["· ",f.note]}),c.jsxs("span",{children:["· ",zm(f.updated||f.loginAt)]})]})]}),c.jsx(Ua,{tone:"brand",className:"mt-0.5 shrink-0",children:x})]}),c.jsxs("div",{className:"px-4 pt-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{className:"text-[11.5px] text-slate-500",children:["共 ",c.jsx("b",{className:"font-semibold text-slate-700",children:U.total})," 门 · 可学"," ",c.jsx("b",{className:"font-semibold text-slate-700",children:U.studyable}),qe.length>0&&c.jsxs("span",{className:"text-slate-400",children:[" · 已完成 ",qe.length]})]}),Ae.length>0&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",disabled:Y,className:"rounded px-1.5 py-0.5 text-[11px] text-brand-600 transition hover:bg-brand-50 disabled:opacity-40",onClick:Ue,children:"全选"}),c.jsx("button",{type:"button",disabled:Y||_e===0,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100 disabled:opacity-40",onClick:le,children:"清空"})]})]}),c.jsx("div",{className:"scrollbar-thin mt-1.5 max-h-[196px] min-h-[70px] overflow-y-auto pr-0.5",children:Me.length===0?c.jsx("div",{className:"grid min-h-[70px] place-items-center rounded-lg border border-dashed border-line text-[12px] text-slate-400",children:"还没有课程,先登录或刷新课程"}):c.jsxs(c.Fragment,{children:[Ae.map(h=>c.jsx(Mv,{account:f,course:h,disabled:Y,onToggle:ee},h.plan_id)),qe.length>0&&c.jsx("div",{className:"mt-1 border-t border-dashed border-line pt-1",children:qe.map(h=>c.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg px-2 py-1.5 text-slate-400",children:[c.jsx("span",{className:"mt-0.5 grid size-3.5 shrink-0 place-items-center rounded-full bg-emerald-50 text-[9px] text-emerald-600",children:"✓"}),c.jsxs("span",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-[12px]",children:h.name||h.plan_id}),c.jsx("span",{className:"mt-0.5 block truncate text-[10.5px] opacity-80",children:[h.section,h.info].filter(Boolean).join(" · ")})]}),c.jsx("span",{className:"shrink-0 text-[10.5px]",children:h.status_label||"已结束"})]},h.plan_id))})]})})]}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 border-t border-line/70 px-4 py-2.5",children:[c.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[c.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:f.optQuiz===!0,disabled:Y,onChange:h=>I("quiz",h.target.checked)}),"自动交测验"]}),c.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[c.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:f.optFeedback!==!1,disabled:Y,onChange:h=>I("feedback",h.target.checked)}),"自动交反馈表"]}),c.jsx("div",{className:"flex-1"}),c.jsx("span",{className:"text-[11px] tabular-nums text-slate-400",children:_e>0?`已选 ${_e} 门`:"未选择课程"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-line/70 px-4 py-2.5",children:[c.jsx(Re,{size:"sm",variant:"soft",loading:o==="login"||f.status==="logging"||((w=f.run)==null?void 0:w.status)==="logging",disabled:Y,icon:c.jsx(fv,{className:"size-3.5"}),onClick:W,children:(ce=f.cookies)!=null&&ce.length?"重新登录":"登录"}),c.jsx(Re,{size:"sm",loading:o==="refresh",disabled:Y||!((me=f.cookies)!=null&&me.length),icon:c.jsx(Fi,{className:"size-3.5"}),onClick:k,children:"刷新课程"}),c.jsx(Re,{size:"sm",variant:"primary",loading:o==="study",disabled:Y||!ze,icon:c.jsx(rv,{className:"size-3.5"}),onClick:Z,children:"开始学习"}),c.jsx("div",{className:"flex-1"}),te&&c.jsx(Re,{size:"icon",variant:"danger",loading:o==="stop",onClick:q,title:"停止学习","aria-label":"停止学习",children:c.jsx(Py,{className:"size-4"})}),c.jsxs("div",{className:"relative",ref:$,children:[c.jsx(Re,{size:"icon",variant:"ghost",onClick:()=>Se(h=>!h),"aria-label":"更多操作",title:"更多操作",children:c.jsx(lv,{className:"size-4"})}),Le&&c.jsx("div",{className:"absolute bottom-10 right-0 z-20 w-40 overflow-hidden rounded-xl border border-line bg-white py-1 shadow-xl shadow-slate-900/10",children:[{label:"修改账号信息",icon:Yf,action:xe},{label:"课程日志",icon:cv,action:A},...T.includes("quiz")?[{label:"打开测验",icon:ev,action:F}]:[],...T.includes("capture")?[(Ee=f.run)!=null&&Ee.capturing?{label:"停止抓包",icon:gv,action:C}:{label:"抓包 10 分钟",icon:pv,action:S}]:[],{label:"删除账号",icon:xv,action:L,danger:!0}].map(h=>c.jsxs("button",{type:"button",className:ot("flex w-full items-center gap-2 px-3 py-2 text-left text-[12px] transition hover:bg-slate-50",h.danger?"text-red-600":"text-slate-700"),onClick:()=>{Se(!1),h.action()},children:[c.jsx(h.icon,{className:"size-3.5 opacity-70"}),h.label]},h.label))})]})]}),(R>0||((K=f.run)==null?void 0:K.error))&&c.jsxs("div",{className:"border-t border-line/70 px-4 py-3",children:[c.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-2 text-[11px] text-slate-500",children:[c.jsx("span",{className:"truncate",children:((ue=f.run)==null?void 0:ue.course)||((jt=f.run)==null?void 0:jt.status)||"学习进度"}),c.jsxs("span",{className:"shrink-0 tabular-nums",children:[se," / ",R,R>0&&c.jsxs("span",{className:"ml-1 text-slate-400",children:["(",Q,"%)"]})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-slate-100",children:c.jsx("div",{className:ot("h-full rounded-full transition-all duration-500",((tl=f.run)==null?void 0:tl.status)==="error"?"bg-red-500":((St=f.run)==null?void 0:St.status)==="finished"?"bg-emerald-500":"bg-gradient-to-r from-brand-500 to-sky-400"),style:{width:`${Math.min(100,Q)}%`}})}),((Nt=f.run)==null?void 0:Nt.error)&&c.jsx("p",{className:"mt-2 rounded-lg bg-red-50 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:f.run.error})]}),f.lastError&&c.jsxs("div",{className:"border-t border-line/70 px-4 py-2.5",children:[c.jsxs("p",{className:"rounded-lg bg-red-50/80 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:[f.lastError,f.lastErrorAt?c.jsxs("span",{className:"ml-1 text-red-400",children:["· ",zm(f.lastErrorAt)]}):null]}),c.jsxs("button",{type:"button",onClick:xe,className:"mt-1.5 inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] font-medium text-red-600 transition hover:bg-red-50",children:[c.jsx(Yf,{className:"size-3"}),"修改账号信息"]})]}),c.jsxs("div",{className:ot("border-t border-line/70",j?"block":"hidden"),children:[c.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2.5 text-[11px] text-slate-400",children:[c.jsx("span",{className:"font-medium text-slate-500",children:"课程日志"}),c.jsxs("span",{className:"tabular-nums",children:["(",H.length,")"]}),c.jsx("div",{className:"flex-1"}),c.jsx("button",{type:"button",onClick:A,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100",children:"收起"})]}),c.jsx("pre",{ref:ae,onScroll:h=>{const M=h.currentTarget;ve.current=M.scrollHeight-M.scrollTop-M.clientHeight<24},className:"scrollbar-thin mx-4 mb-3 mt-2 max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-lg border border-line bg-slate-50 p-3 font-mono text-[11px] leading-relaxed text-slate-600",children:c.jsx(Um,{lines:H,empty:"暂无日志 · 开始学习后这里会实时显示"})})]}),c.jsxs("button",{type:"button",onClick:A,className:"flex items-center justify-center gap-1 border-t border-line/70 py-1.5 text-[10.5px] text-slate-400 transition hover:bg-slate-50 hover:text-slate-600","aria-expanded":j,children:[c.jsx(Xf,{className:ot("size-3 transition-transform",j&&"rotate-180")}),j?"收起课程日志":"展开课程日志"]})]})}const Uv={sm:"max-w-md",md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-6xl",settings:"max-w-4xl"};function Ra({open:f,onClose:x,title:T,subtitle:o,size:j="md",footer:H,children:A,bodyClassName:W}){return D.useEffect(()=>{if(!f)return;const k=q=>{q.key==="Escape"&&x()};window.addEventListener("keydown",k);const Z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",k),document.body.style.overflow=Z}},[f,x]),f?c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[c.jsx("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-[2px]",onClick:x}),c.jsxs("div",{role:"dialog","aria-modal":"true",className:ot("relative flex max-h-[calc(100vh-2rem)] w-full flex-col overflow-hidden rounded-2xl","border border-line bg-white shadow-2xl shadow-slate-900/20",Uv[j]),children:[c.jsxs("header",{className:"flex items-start gap-3 border-b border-line px-5 py-4",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("h2",{className:"truncate text-[15px] font-semibold text-slate-900",children:T}),o&&c.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:o})]}),c.jsx("button",{type:"button",onClick:x,className:"-mr-1 rounded-lg p-1.5 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"关闭",children:c.jsx(Nv,{className:"size-4"})})]}),c.jsx("div",{className:ot("min-h-0 flex-1 overflow-auto",W??"px-5 py-4"),children:A}),H&&c.jsx("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line bg-slate-50/70 px-5 py-3",children:H})]})]}):null}function Rv({open:f,account:x,platforms:T,onClose:o,onSubmit:j}){const[H,A]=D.useState(""),[W,k]=D.useState(""),[Z,q]=D.useState(""),[S,C]=D.useState(""),[F,xe]=D.useState(!1),[L,ee]=D.useState(!1),[Ue,le]=D.useState(""),I=D.useRef(x);I.current=x;const Le=D.useRef(T);Le.current=T,D.useEffect(()=>{var ae;if(!f)return;const $=I.current;A(($==null?void 0:$.username)||""),k(""),q(($==null?void 0:$.note)||""),C(($==null?void 0:$.platform)||((ae=Le.current[0])==null?void 0:ae.id)||""),xe(!1),ee(!1),le("")},[f,x==null?void 0:x.id]);async function Se(){if(!H.trim()){le("登录账号不能为空");return}if(!S){le("请选择学习平台");return}ee(!0),le("");try{await j({username:H.trim(),password:W,note:Z.trim(),platform:S}),o()}catch($){le($ instanceof Error?$.message:String($))}finally{ee(!1)}}return c.jsx(Ra,{open:f,onClose:o,title:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(Yf,{className:"size-4 text-brand-600"}),"修改账号信息"]}),subtitle:x!=null&&x.user?`当前会话:${x.user}`:"这个账号还没有登录成功,改完会自动重试登录",footer:c.jsxs(c.Fragment,{children:[c.jsx(Re,{onClick:o,disabled:L,children:"取消"}),c.jsx(Re,{variant:"primary",loading:L,onClick:Se,children:"保存并重新登录"})]}),children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"学习平台"}),c.jsxs("div",{className:"relative",children:[c.jsx(Lf,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),c.jsx("select",{className:`${Ie} appearance-none pl-8 pr-8`,value:S,onChange:$=>C($.target.value),children:T.map($=>c.jsx("option",{value:$.id,children:$.label},$.id))}),c.jsx(Xf,{className:"pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"登录账号"}),c.jsx("input",{className:Ie,value:H,autoFocus:!0,placeholder:"手机号 / 身份证号 / 教师账号",onChange:$=>A($.target.value),onKeyDown:$=>$.key==="Enter"&&Se()})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 flex items-center gap-1.5 text-[12px] font-medium text-slate-600",children:[c.jsx(Bf,{className:"size-3.5 text-slate-400"}),"密码",c.jsx("span",{className:"font-normal text-slate-400",children:"(留空表示不修改)"})]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{className:`${Ie} pr-9`,type:F?"text":"password",value:W,autoComplete:"new-password",placeholder:x!=null&&x.hasPassword?"已保存密码,需要更换时再填":"还没有保存密码,请填写",onChange:$=>k($.target.value),onKeyDown:$=>$.key==="Enter"&&Se()}),c.jsx("button",{type:"button",className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",onClick:()=>xe($=>!$),"aria-label":F?"隐藏密码":"显示密码",children:F?c.jsx(av,{className:"size-3.5"}):c.jsx(nv,{className:"size-3.5"})})]})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:["备注 ",c.jsx("span",{className:"font-normal text-slate-400",children:"(可选)"})]}),c.jsx("input",{className:Ie,value:Z,placeholder:"例如:张三 · 语文",onChange:$=>q($.target.value)})]}),c.jsx("p",{className:"rounded-lg border border-line bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:"保存后会用新的账号密码重新登录一次:登录成功会刷新会话和课程,失败则保留当前会话并提示原因。 改「学习平台」只影响之后用哪个插件登录和读取课程。"}),Ue&&c.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:Ue})]})})}function Hv({open:f,platforms:x,onClose:T,onSubmit:o}){var Ue;const[j,H]=D.useState(""),[A,W]=D.useState(""),[k,Z]=D.useState(""),[q,S]=D.useState(((Ue=x[0])==null?void 0:Ue.id)||""),[C,F]=D.useState(!1),[xe,L]=D.useState("");D.useEffect(()=>{var le;f&&(H(""),W(""),Z(""),S(((le=x[0])==null?void 0:le.id)||""),L(""),F(!1))},[f,x]);async function ee(){if(!q){L("没有可用的学习平台,请先在「插件」里启用一个平台插件");return}if(!j.trim()||!A){L("请填写账号和密码");return}F(!0),L("");try{await o({username:j.trim(),password:A,note:k.trim(),platform:q}),T()}catch(le){L(le instanceof Error?le.message:String(le))}finally{F(!1)}}return c.jsx(Ra,{open:f,onClose:T,title:"添加账号",subtitle:"账号密码保存在本机 SQLite,用于会话失效时自动重新登录",footer:c.jsxs(c.Fragment,{children:[c.jsx(Re,{onClick:T,disabled:C,children:"取消"}),c.jsx(Re,{variant:"primary",loading:C,onClick:ee,children:"保存并登录"})]}),children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"学习平台"}),c.jsxs("div",{className:"relative",children:[c.jsx(Lf,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),c.jsx("select",{className:`${Ie} appearance-none pl-8 pr-8`,value:q,onChange:le=>S(le.target.value),children:x.map(le=>c.jsx("option",{value:le.id,children:le.label},le.id))}),c.jsx(Xf,{className:"pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"})]}),c.jsx("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-400",children:"账号的登录、刷新课程、学习都按所选平台的插件实现;新增或启用平台插件后会出现在这里。"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"登录账号"}),c.jsx("input",{className:Ie,value:j,autoFocus:!0,placeholder:"手机号 / 身份证号 / 教师账号",onChange:le=>H(le.target.value),onKeyDown:le=>le.key==="Enter"&&ee()})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"密码"}),c.jsx("input",{className:Ie,type:"password",value:A,autoComplete:"off",placeholder:"平台登录密码",onChange:le=>W(le.target.value),onKeyDown:le=>le.key==="Enter"&&ee()})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:["备注 ",c.jsx("span",{className:"font-normal text-slate-400",children:"(可选)"})]}),c.jsx("input",{className:Ie,value:k,placeholder:"例如:张三 · 语文",onChange:le=>Z(le.target.value)})]}),c.jsx("p",{className:"rounded-lg border border-line bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:"保存后会自动尝试登录一次。若密码错误或需要验证码,卡片上会保留「登录」按钮,可手动重试。"}),xe&&c.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:xe})]})})}class Hl extends Error{constructor(T,o={}){super(T);$i(this,"offline",!1);$i(this,"status");$i(this,"code");this.name="ApiError",Object.assign(this,o)}}async function Xe(f,x={}){let T;try{T=await fetch(f,{...x,headers:{"Content-Type":"application/json",...x.headers||{}}})}catch{throw new Hl("后端未连接",{offline:!0})}if(T.status===401)throw new Hl("需要访问令牌:请用 /?token= 打开一次",{status:401});if(!T.ok)throw new Hl(`HTTP ${T.status}`,{status:T.status});return await T.json()}async function wv(f,x,T){let o;try{o=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)})}catch{throw new Hl("后端未连接",{offline:!0})}if(o.status===401)throw new Hl("需要访问令牌:请用 /?token= 打开一次");if(!o.ok)throw new Hl(`HTTP ${o.status}`);if(!o.body)throw new Hl("浏览器不支持流式响应");const j=o.body.getReader(),H=new TextDecoder;let A="";for(;;){const{value:W,done:k}=await j.read();if(k)break;A+=H.decode(W,{stream:!0});const Z=A.split(` `);A=Z.pop()||"";for(const q of Z){const S=q.trim();if(S.startsWith("data:"))try{T(JSON.parse(S.slice(5).trim()))}catch{}}}}const qv={login:"登录",session:"会话",renew:"续期",profile:"账号信息",courses:"课程列表",discover:"课程详情",study:"学习",quiz:"测验",capture:"抓包",push:"推送"};function Bv({open:f,onClose:x,notify:T,onChanged:o}){const[j,H]=D.useState([]),[A,W]=D.useState(""),[k,Z]=D.useState(!1),q=D.useCallback(async()=>{Z(!0);try{const C=await Xe("/api/plugins");H(C.plugins||[])}catch(C){T({message:el(C),tone:"error"})}finally{Z(!1)}},[T]);D.useEffect(()=>{f&&q()},[f,q]);async function S(C,F,xe){W(C);try{const L=await Xe(F,{method:"POST"});L.plugins&&H(L.plugins),L.ok===!1?T({message:L.error||"插件操作失败",tone:"error"}):(T({message:xe,tone:"success"}),o())}catch(L){T({message:el(L),tone:"error"})}finally{W("")}}return c.jsx(Ra,{open:f,onClose:x,title:"插件管理",size:"lg",footer:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",j.length," 个 · 停用后平台会从「添加账号」下拉里消失,推送渠道也会停止推送"]}),c.jsx(Re,{variant:"soft",size:"sm",icon:c.jsx(Fi,{className:"size-3.5"}),loading:A==="*",onClick:()=>void S("*","/api/plugins/reload","全部插件已重载"),children:"全部重载"})]}),children:c.jsxs("div",{className:"space-y-2.5",children:[j.map(C=>{var F;return c.jsxs("div",{className:"rounded-xl border border-line bg-slate-50/70 px-3.5 py-3",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(Am,{className:"size-4 shrink-0 text-brand-600"}),c.jsx("span",{className:"text-[13px] font-semibold text-slate-900",children:C.title||C.name}),c.jsx("span",{className:"text-[11px] text-slate-400",children:C.name}),c.jsx(Ua,{tone:C.enabled?"success":"neutral",dot:!0,children:C.enabled?"已启用":"已停用"}),C.enabled&&c.jsx(Ua,{tone:C.loaded?"brand":"warning",children:C.loaded?"已加载":"未加载"})]}),c.jsxs("div",{className:"mt-2 space-y-1.5 rounded-lg border border-line/80 bg-white px-3 py-2",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"w-[52px] shrink-0 text-[11px] text-slate-400",children:"适配网站"}),(F=C.sites)!=null&&F.length?C.sites.map(xe=>c.jsx("span",{className:"rounded-md border border-line bg-slate-50 px-1.5 py-0.5 font-mono text-[11px] text-slate-600",children:xe},xe)):c.jsx("span",{className:"text-[11px] text-slate-400",children:"—"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"w-[52px] shrink-0 text-[11px] text-slate-400",children:"能力"}),C.capabilities.length?C.capabilities.map(xe=>c.jsx("span",{className:"rounded-md bg-brand-50 px-1.5 py-0.5 text-[11px] font-medium text-brand-700 ring-1 ring-inset ring-brand-100",children:qv[xe]||xe},xe)):c.jsx("span",{className:"text-[11px] text-slate-400",children:"无"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 pl-[52px] text-[11px] text-slate-400",children:[c.jsxs("span",{children:["平台 ",c.jsx("span",{className:"text-slate-600",children:C.label||"—"})]}),c.jsxs("span",{children:["id ",c.jsx("span",{className:"text-slate-600",children:C.id||"—"})]})]})]}),c.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[c.jsx(Re,{size:"sm",variant:C.enabled?"secondary":"primary",loading:A===C.name,onClick:()=>void S(C.name,`/api/plugins/${C.name}/${C.enabled?"disable":"enable"}`,C.enabled?`${C.name} 已停用`:`${C.name} 已启用`),children:C.enabled?"停用":"启用"}),c.jsx(Re,{size:"sm",variant:"ghost",disabled:!C.enabled,loading:A===C.name,onClick:()=>void S(C.name,`/api/plugins/${C.name}/reload`,`${C.name} 已重载`),children:"重载"})]})]},C.name)}),!j.length&&!k&&c.jsx("p",{className:"py-8 text-center text-[12.5px] text-slate-400",children:"plugins/ 下还没有插件。建一个含 plugin.json + main.py 的目录丢进去,刷新即可看到。"})]})})}function Rm(){const[f,x]=D.useState(null),T=D.useRef(null);T.current=f;const o=D.useCallback(k=>new Promise(Z=>x({...k,resolve:Z})),[]),j=D.useCallback(k=>{const Z=T.current;T.current=null,x(null),Z==null||Z.resolve(k)},[]),H=((f==null?void 0:f.tone)||"danger")==="danger",A=H?bv:Iy,W=c.jsx(Ra,{open:!!f,onClose:()=>j(!1),size:"sm",title:(f==null?void 0:f.title)||"",footer:c.jsxs(c.Fragment,{children:[c.jsx(Re,{onClick:()=>j(!1),children:(f==null?void 0:f.cancelText)||"取消"}),c.jsx(Re,{variant:H?"danger-solid":"primary",onClick:()=>j(!0),autoFocus:!0,children:(f==null?void 0:f.confirmText)||"确定"})]}),children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("span",{className:ot("grid size-9 shrink-0 place-items-center rounded-xl ring-1",H?"bg-red-50 text-red-600 ring-red-100":"bg-brand-50 text-brand-600 ring-brand-100"),children:c.jsx(A,{className:"size-4"})}),c.jsx("div",{className:"min-w-0 flex-1 pt-1 text-[13px] leading-relaxed text-slate-600",children:f==null?void 0:f.message})]})});return{ask:o,dialog:W}}function Yv(f){const x=String((f==null?void 0:f.text)||"").replace(/\s+/g," ").trim();return x.length>24?`${x.slice(0,24)}…`:x}function Gv({open:f,account:x,course:T,onClose:o,notify:j,onSubmitted:H}){const[A,W]=D.useState(null),[k,Z]=D.useState({}),[q,S]=D.useState(!1),[C,F]=D.useState(!1),[xe,L]=D.useState(!1),[ee,Ue]=D.useState(!1),[le,I]=D.useState(""),[Le,Se]=D.useState("info"),$=D.useRef(0),{ask:ae,dialog:ve}=Rm();async function Ce(ne=!1){if(!x||!T)return!1;S(!0),I(ne?"正在生成新答卷…":"取题中…"),Se("info");try{const oe={cookies:x.cookies,platform:x.platform||"",plan_id:T.plan_id,project_id:T.project_id,name:T.name||""};ne&&(oe.retake=!0,oe.period_id=(A==null?void 0:A.period_id)||"");const d=await Xe("/api/quiz",{method:"POST",body:JSON.stringify(oe)});if(!d.ok)return W(null),I(d.error||"取题失败"),Se("error"),!1;W(d),Z(Object.fromEntries((d.questions||[]).map(B=>[B.no,B.picked||""])));const E=[];if(d.done){const B=d.surplus_exam_count;B!=null?E.push(`剩 ${B} 次`):d.allow_exam_count&&E.push(`共 ${d.allow_exam_count} 次`),d.show_answers?E.push("已显示标准答案"):d.exam_after_watch_answer==="0"&&E.push("本测验不开放答案"),I(`已交卷${E.length?` · ${E.join(" · ")}`:""}`),Se("success")}else I(d.started?"已自动创建答卷(限时考试已开始计时)":""),Se("info");return!0}catch(oe){return I(oe instanceof Error?oe.message:"取题失败"),Se("error"),!1}finally{S(!1)}}if(D.useEffect(()=>{!f||!x||!T||(W(null),Z({}),Ue(!1),Ce(!1))},[f,x==null?void 0:x.id,T==null?void 0:T.plan_id]),!x||!T)return null;const Y=(A==null?void 0:A.questions)||[],Me=!!(A!=null&&A.done),Ae=!!(A!=null&&A.show_answers),qe=!!(A!=null&&A.can_retake),U=A==null?void 0:A.surplus_exam_count,se=Me||q||C||ee;function R(ne,oe){Z(d=>({...d,[ne]:oe}))}function Q(ne,oe,d){Z(E=>{const B=pu(E[ne]),w=d?[...B,oe]:B.filter(ce=>ce!==oe);return w.sort(),{...E,[ne]:w.join("#")}})}async function te(){if(!A||!x)return;const ne=Y.filter(oe=>!k[oe.no]).length;if(!(ne&&!await ae({title:"提交测验",message:`还有 ${ne} 题没作答,提交后就不能再改了,确定提交?`,confirmText:"提交",tone:"normal"}))){F(!0),I("提交中…"),Se("info");try{const oe=await Xe("/api/quiz/submit",{method:"POST",body:JSON.stringify({cookies:x.cookies,platform:x.platform||"",plan_id:A.plan_id,object_id:A.object_id,generation:A.generation||"legacy",result_id:A.result_id||"",answers:k})});if(!oe.ok){oe.code==="already_finished"&&await Ce(),I(oe.error||"提交失败"),Se("error");return}j({message:`测验已提交${oe.score?`,得分 ${oe.score}`:""}`,tone:"success"}),await Ce(),H()}catch(oe){I(oe instanceof Error?oe.message:"提交失败"),Se("error")}finally{F(!1)}}}async function _e(){if(!A)return;if(!A.can_retake){j({message:"没有剩余考试机会",tone:"error"});return}const ne=U!=null?`(剩余 ${U} 次)`:"";if(await ae({title:"再考一次",message:`再考一次会消耗 1 次机会${ne};限时考试会立即开始计时,确定继续?`,confirmText:"再考一次",tone:"normal"})){L(!0);try{await Ce(!0)&&j({message:"已生成新答卷,可以重新答题了",tone:"success"})}finally{L(!1)}}}async function ze(){if(!A||!x)return;if(A.done){j({message:"已交卷,点「再考一次」生成新答卷后再 AI 答题",tone:"error"});return}Ue(!0),$.current=0;const ne=Date.now();let oe=0,d="";const E=window.setInterval(()=>{I(`AI 答题中… ${Math.round((Date.now()-ne)/1e3)}s · 已填 ${$.current}/${Y.length} 题`),Se("info")},1e3);I(`AI 答题中… 已填 0/${Y.length} 题`);try{await wv("/api/quiz/answer",{questions:A.questions,account_id:x.id},B=>{const w=B.answers;if(w&&typeof w=="object"){const ce=Object.keys(w).length;ce&&($.current+=ce,Z(me=>({...me,...w})))}B.error&&(d=String(B.error)),B.done&&typeof B.failed=="number"&&(oe=B.failed)}),$.current?oe?(I(`AI 已填 ${$.current} 题,${oe} 题失败${d?`:${d}`:""}`),Se("error")):(I(`AI 已填 ${$.current} 题`),Se("success")):(I(d?`AI 答题失败:${d}`:"AI 没有返回答案"),Se("error"))}catch(B){I(B instanceof Error?B.message:"AI 答题失败"),Se("error")}finally{window.clearInterval(E),Ue(!1)}}const it=qe?`再考一次${U!=null?`(剩 ${U} 次)`:""}`:U===0?"考试机会已用完":"再考一次";return c.jsxs(Ra,{open:f,onClose:o,title:`测验 · ${T.name||T.plan_id}`,subtitle:le||"取题后可手动作答,或让大模型逐批填写",size:"xl",footer:c.jsxs(c.Fragment,{children:[c.jsx("span",{className:ot("mr-auto max-w-[50%] truncate text-[11.5px]",Le==="error"?"text-red-600":Le==="success"?"text-emerald-600":"text-slate-500"),children:le}),Me&&c.jsx(Re,{size:"sm",loading:xe,disabled:q||!qe,icon:c.jsx(ov,{className:"size-3.5"}),onClick:_e,children:it}),c.jsx(Re,{size:"sm",onClick:o,children:"关闭"}),c.jsx(Re,{size:"sm",variant:"soft",loading:ee,disabled:se||!Y.length,icon:c.jsx($y,{className:"size-3.5"}),onClick:ze,children:"AI 答题"}),c.jsx(Re,{size:"sm",variant:"primary",loading:C,disabled:se||!Y.length,icon:c.jsx(Cm,{className:"size-3.5"}),onClick:te,children:"提交"})]}),children:[q&&!Y.length?c.jsx("div",{className:"py-16 text-center text-[13px] text-slate-400",children:"正在打开课程页取题…"}):Y.length?c.jsx("div",{className:"space-y-2.5",children:Y.map(ne=>{const oe=ne.options||[],d=k[ne.no]||"",E=ne.type==="02",B=oe.length>0;return c.jsxs("div",{className:"rounded-xl border border-line px-3.5 py-3",children:[c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-md bg-slate-100 text-[10.5px] font-semibold tabular-nums text-slate-500",children:ne.no}),c.jsx(Ua,{tone:"neutral",className:"mt-0.5 shrink-0",children:_v[ne.type||""]||"题目"}),c.jsx("p",{className:"min-w-0 flex-1 text-[13px] leading-relaxed text-slate-800",children:ne.title||`第 ${ne.no} 题`}),Ae&&ne.is_correct!==void 0&&c.jsx("span",{className:ot("shrink-0 text-[12px] font-semibold",ne.is_correct?"text-emerald-600":"text-red-500"),children:ne.is_correct?"✓":"✗"})]}),B&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5 pl-7",children:oe.map(w=>{const ce=Ae&&pu(ne.correct).includes(w.key),me=Ae&&pu(ne.picked).includes(w.key)&&!pu(ne.correct).includes(w.key);return c.jsxs("span",{className:ot("max-w-full rounded-lg border px-2 py-1 text-[11.5px] leading-snug",ce?"border-emerald-200 bg-emerald-50 text-emerald-800":me?"border-red-200 bg-red-50 text-red-700":"border-line bg-slate-50/70 text-slate-600"),children:[c.jsx("b",{className:"mr-1 font-semibold",children:w.key}),Yv(w)]},w.key)})}),c.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-2 pl-7",children:[E?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:oe.map(w=>{const ce=pu(d);return c.jsxs("label",{title:`${w.key}. ${w.text||""}`,className:ot("flex cursor-pointer items-center gap-1 rounded-lg border px-2 py-1 text-[11.5px] transition",ce.includes(w.key)?"border-brand-300 bg-brand-50 text-brand-700":"border-line text-slate-600 hover:border-slate-300",se&&"pointer-events-none opacity-60"),children:[c.jsx("input",{type:"checkbox",className:"size-3 accent-brand-500",checked:ce.includes(w.key),disabled:se,onChange:me=>Q(ne.no,w.key,me.target.checked)}),w.key]},w.key)})}):B?c.jsxs("select",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:d,disabled:se,onChange:w=>R(ne.no,w.target.value),children:[c.jsx("option",{value:"",children:"未选"}),oe.map(w=>c.jsxs("option",{value:w.key,children:[w.key,". ",w.text||""]},w.key))]}):c.jsx("input",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:d,placeholder:"填写答案",disabled:se,onChange:w=>R(ne.no,w.target.value)}),Ae&&ne.correct&&c.jsxs("span",{className:"text-[11.5px] text-slate-500",children:["标准答案:",c.jsx("b",{className:"font-semibold text-slate-700",children:ne.correct})]})]}),Ae&&ne.analysis&&c.jsxs("p",{className:"mt-2 rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] leading-relaxed text-slate-500",children:["解析:",ne.analysis]})]},ne.no)})}):c.jsx("div",{className:"py-16 text-center text-[13px] text-red-600",children:le||"没有题目"}),ve]})}const Qv=[{key:"llm",label:"大模型",icon:hv},{key:"study",label:"学习模式",icon:uv},{key:"notify",label:"故障推送",icon:Jy}];function Su({checked:f,label:x,onChange:T}){return c.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[12px] text-slate-600",children:[c.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-600",checked:f,onChange:o=>T(o.target.checked)}),x]})}function qf({title:f,desc:x,action:T,children:o}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("h3",{className:"text-[13.5px] font-semibold text-slate-900",children:f}),c.jsx("p",{className:"mt-0.5 text-[11.5px] text-slate-500",children:x})]}),T]}),c.jsx("div",{className:"space-y-3.5",children:o})]})}function Xv({open:f,onClose:x,notify:T}){const[o,j]=D.useState(!1),[H,A]=D.useState(!1),[W,k]=D.useState(!1),[Z,q]=D.useState(!1),[S,C]=D.useState("llm"),[F,xe]=D.useState({base_url:"",api_key:"",model:"",temperature:"0.2",timeout:"120",prompt:"",study_mode:"fast",study_parallel:"2"}),[L,ee]=D.useState("sk-..."),[Ue,le]=D.useState(!1),[I,Le]=D.useState({enabled:!0,base_url:"",app_key:"",app_secret:"",channel_name:"",on_error:!0,on_login:!0,on_progress:!0,on_retry:!0,retry_threshold:"3",cooldown_min:"10"}),[Se,$]=D.useState("未设置"),[ae,ve]=D.useState(!1);D.useEffect(()=>{f&&(j(!0),le(!1),ve(!1),Xe("/api/settings").then(U=>{const se=U.llm||{},R=U.study||{},Q=U.notify||{};xe({base_url:se.base_url||"",api_key:"",model:se.model||"",temperature:String(se.temperature??.2),timeout:String(se.timeout??120),prompt:se.prompt||"",study_mode:R.mode||"fast",study_parallel:String(R.parallel||2)}),ee(se.has_key?`已保存 ${se.key_hint||""},留空不修改`:"sk-..."),Le({enabled:Q.enabled!==!1,base_url:Q.base_url||"",app_key:Q.app_key||"",app_secret:"",channel_name:Q.channel_name||"",on_error:Q.on_error!==!1,on_login:Q.on_login!==!1,on_progress:Q.on_progress!==!1,on_retry:Q.on_retry!==!1,retry_threshold:String(Q.retry_threshold??3),cooldown_min:String(Q.cooldown_min??10)}),$(Q.has_secret?`已保存 ${Q.secret_hint||""},留空不修改`:"未设置")}).catch(U=>T({message:`读取设置失败:${U.message}`,tone:"error"})).finally(()=>j(!1)))},[f,T]);function Ce(U,se){xe(R=>({...R,[U]:se}))}function Y(U,se){Le(R=>({...R,[U]:se}))}async function Me(){A(!0);try{await Xe("/api/settings",{method:"POST",body:JSON.stringify({base_url:F.base_url.trim(),api_key:F.api_key.trim(),clear_api_key:Ue,model:F.model.trim(),temperature:Number.parseFloat(F.temperature)||.2,timeout:Number.parseInt(F.timeout,10)||120,prompt:F.prompt,study_mode:F.study_mode,study_parallel:Number.parseInt(F.study_parallel,10)||0,notify:{base_url:I.base_url.trim(),app_key:I.app_key.trim(),app_secret:I.app_secret.trim(),clear_app_secret:ae,channel_name:I.channel_name.trim(),enabled:I.enabled,on_error:I.on_error,on_login:I.on_login,on_progress:I.on_progress,on_retry:I.on_retry,retry_threshold:Number.parseInt(I.retry_threshold,10)||0,cooldown_min:Number.parseInt(I.cooldown_min,10)||0}})}),T({message:"设置已保存",tone:"success"}),x()}catch(U){T({message:`保存失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{A(!1)}}async function Ae(){k(!0);try{const U=await Xe("/api/llm/test",{method:"POST",body:JSON.stringify({base_url:F.base_url.trim(),api_key:F.api_key.trim(),model:F.model.trim()})});T({message:U.ok?`连接正常(${U.ms} ms):${U.reply||""}`:`连接失败:${U.error||"未知错误"}`,tone:U.ok?"success":"error"})}catch(U){T({message:`连接失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{k(!1)}}async function qe(){q(!0);try{const U=await Xe("/api/notify/test",{method:"POST"});T({message:U.message||(U.ok?"推送成功":"推送失败"),tone:U.ok?"success":"error"})}catch(U){T({message:`推送失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{q(!1)}}return c.jsx(Ra,{open:f,onClose:x,title:"系统设置",subtitle:"大模型接口、学习模式与故障推送",size:"settings",bodyClassName:"p-0",footer:c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mr-auto text-[11px] text-slate-400",children:"保存后立即生效;正在学习的账号从下一门课开始按新设置执行"}),c.jsx(Re,{onClick:x,disabled:H,children:"取消"}),c.jsx(Re,{variant:"primary",loading:H,onClick:Me,disabled:o,children:"保存"})]}),children:c.jsxs("div",{className:"grid min-h-[540px] grid-cols-[188px_1fr]",children:[c.jsxs("nav",{className:"border-r border-line bg-slate-50/70 p-2.5",children:[Qv.map(({key:U,label:se,icon:R})=>c.jsxs("button",{type:"button",onClick:()=>C(U),className:ot("mb-1 flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-[12.5px] font-medium transition",S===U?"bg-white text-brand-700 shadow-sm ring-1 ring-line":"text-slate-600 hover:bg-white/70"),children:[c.jsx(R,{className:"size-4 shrink-0"}),se]},U)),c.jsx("p",{className:"mt-3 px-2.5 text-[11px] leading-relaxed text-slate-400",children:"设置只保存在本机 SQLite,不会同步到学习平台。"})]}),c.jsx("div",{className:"min-w-0 px-5 py-4",children:o?c.jsx("div",{className:"py-20 text-center text-[12.5px] text-slate-400",children:"读取设置…"}):S==="llm"?c.jsxs(qf,{title:"大模型(OpenAI 兼容)",desc:"用于自动答题;接口地址写到 /v1 为止。",action:c.jsx(Re,{size:"sm",loading:W,onClick:Ae,icon:c.jsx(tv,{className:"size-3.5"}),children:"测试连接"}),children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"接口地址"}),c.jsx("input",{className:Ie,value:F.base_url,placeholder:"https://api.openai.com/v1",onChange:U=>Ce("base_url",U.target.value)})]}),c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 flex items-center justify-between text-[12px] text-slate-600",children:[c.jsx("span",{children:"API Key"}),L.startsWith("已保存")&&c.jsx("button",{type:"button",className:"text-[11px] text-slate-400 hover:text-rose-500",onClick:()=>{le(!0),ee("保存后清空")},children:Ue?"将清空":"清空"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(Bf,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),c.jsx("input",{className:`${Ie} pl-8`,type:"password",autoComplete:"off",value:F.api_key,placeholder:L,onChange:U=>Ce("api_key",U.target.value)})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模型"}),c.jsx("input",{className:Ie,value:F.model,placeholder:"gpt-4o-mini / deepseek-chat / qwen-plus",onChange:U=>Ce("model",U.target.value)})]})]}),c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"温度"}),c.jsx("input",{className:Ie,type:"number",min:0,max:2,step:.1,value:F.temperature,onChange:U=>Ce("temperature",U.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"超时(秒)"}),c.jsx("input",{className:Ie,type:"number",min:10,max:600,value:F.timeout,onChange:U=>Ce("timeout",U.target.value)})]})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["答题提示词 ",c.jsx("span",{className:"text-slate-400",children:"(留空使用内置)"})]}),c.jsx("textarea",{className:`${Ie} min-h-32 resize-y`,value:F.prompt,placeholder:'只输出 JSON {"answers":{"题号":"答案"}}',onChange:U=>Ce("prompt",U.target.value)})]})]}):S==="study"?c.jsxs(qf,{title:"学习模式",desc:"快速上报只调接口,常规模式开无头浏览器真播。",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模式"}),c.jsxs("select",{className:Ie,value:F.study_mode,onChange:U=>Ce("study_mode",U.target.value),children:[c.jsx("option",{value:"fast",children:"快速学习(只调接口上报)"}),c.jsx("option",{value:"normal",children:"常规学习(真实播放视频)"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"常规模式并发数"}),c.jsx("input",{className:Ie,type:"number",min:1,max:5,value:F.study_parallel,onChange:U=>Ce("study_parallel",U.target.value)})]})]}),c.jsxs("p",{className:"rounded-lg bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:["常规学习会开多个无头浏览器同时播视频;平台若按课节顺序放行,会被弹回并自动降为 1 路。 快速学习只调用 ",c.jsx("code",{className:"rounded bg-white px-1 ring-1 ring-line",children:"period/study/log"}),",不启动浏览器。"]})]}):c.jsxs(qf,{title:"故障推送",desc:"进度异常、反复重试、运行/登录异常时推送到配置的渠道。",action:c.jsx(Re,{size:"sm",loading:Z,onClick:qe,icon:c.jsx(Cm,{className:"size-3.5"}),children:"测试推送"}),children:[c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["推送地址 ",c.jsx("span",{className:"text-slate-400",children:"(baseurl,不带 /api)"})]}),c.jsx("input",{className:Ie,value:I.base_url,placeholder:"https://corn.hanhan.ltd",onChange:U=>Y("base_url",U.target.value)})]}),c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"app_key"}),c.jsx("input",{className:Ie,value:I.app_key,placeholder:"应用 app_key",onChange:U=>Y("app_key",U.target.value)})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["推送 channel_name ",c.jsx("span",{className:"text-slate-400",children:"(留空 = 默认渠道)"})]}),c.jsx("input",{className:Ie,value:I.channel_name,placeholder:"我的邮箱",onChange:U=>Y("channel_name",U.target.value)})]})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"mb-1.5 flex items-center justify-between text-[12px] text-slate-600",children:[c.jsx("span",{children:"app_secret"}),Se.startsWith("已保存")&&c.jsx("button",{type:"button",className:"text-[11px] text-slate-400 hover:text-rose-500",onClick:()=>{ve(!0),$("保存后清空")},children:ae?"将清空":"清空"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(Bf,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),c.jsx("input",{className:`${Ie} pl-8`,type:"password",autoComplete:"off",value:I.app_secret,placeholder:Se,onChange:U=>Y("app_secret",U.target.value)})]})]}),c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"重试几次算故障"}),c.jsx("input",{className:Ie,type:"number",min:2,max:10,value:I.retry_threshold,onChange:U=>Y("retry_threshold",U.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"同账号同类型冷却(分钟)"}),c.jsx("input",{className:Ie,type:"number",min:1,max:1440,value:I.cooldown_min,onChange:U=>Y("cooldown_min",U.target.value)})]})]}),c.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-2 rounded-lg bg-slate-50 px-3 py-2.5",children:[c.jsx(Su,{checked:I.enabled,label:"启用推送",onChange:U=>Y("enabled",U)}),c.jsx(Su,{checked:I.on_progress,label:"进度异常",onChange:U=>Y("on_progress",U)}),c.jsx(Su,{checked:I.on_retry,label:"多次重试",onChange:U=>Y("on_retry",U)}),c.jsx(Su,{checked:I.on_error,label:"运行/课程异常",onChange:U=>Y("on_error",U)}),c.jsx(Su,{checked:I.on_login,label:"登录/会话异常",onChange:U=>Y("on_login",U)})]}),c.jsx("p",{className:"text-[11.5px] leading-relaxed text-slate-500",children:"推送由「插件管理」里的推送渠道插件发出(默认自带「呆呆面板推送」)。关闭某个开关只是不推该类故障, 不影响学习流程。"})]})})]})})}function Lv({accounts:f}){const x=f.filter(A=>{var W;return((W=A.cookies)==null?void 0:W.length)>0||["logged_in","studying"].includes(A.status||"")}).length,T=f.filter(A=>{var W;return["discovering","studying"].includes(((W=A.run)==null?void 0:W.status)||"")}).length,o=f.reduce((A,W)=>{var k;return A+(((k=W.run)==null?void 0:k.done)||0)},0),j=f.reduce((A,W)=>{var k;return A+(((k=W.run)==null?void 0:k.total)||0)},0),H=[{label:"账号",value:f.length,hint:"已添加",icon:Mm,tone:"text-brand-600 bg-brand-50"},{label:"已登录",value:x,hint:f.length?`共 ${f.length} 个`:"等待添加",icon:vv,tone:"text-emerald-600 bg-emerald-50"},{label:"学习中",value:T,hint:T?"正在跑课":"空闲",icon:ky,tone:"text-sky-600 bg-sky-50"},{label:"课程进度",value:j?`${o}/${j}`:"—",hint:j?`${Math.round(o/j*100)}%`:"暂无任务",icon:Lf,tone:"text-amber-600 bg-amber-50"}];return c.jsx("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:H.map(A=>c.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-line bg-white px-4 py-3",children:[c.jsx("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg ${A.tone}`,children:c.jsx(A.icon,{className:"size-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] text-slate-400",children:A.label}),c.jsxs("div",{className:"flex items-baseline gap-1.5",children:[c.jsx("span",{className:"text-[17px] font-semibold tabular-nums leading-tight text-slate-900",children:A.value}),c.jsx("span",{className:"truncate text-[10.5px] text-slate-400",children:A.hint})]})]})]},A.label))})}function Vv({open:f,onClose:x}){const[T,o]=D.useState([]),[j,H]=D.useState(!1),A=D.useRef(null),W=D.useRef(!0);D.useEffect(()=>{if(!f)return;let Z=!0;const q=async()=>{try{const C=await Xe("/api/log/history?key=system&tail=500");Z&&o(C.lines||[])}catch{}};o([]),q();const S=window.setInterval(()=>{document.hidden||q()},2500);return()=>{Z=!1,window.clearInterval(S)}},[f]),D.useEffect(()=>{const Z=A.current;Z&&W.current&&(Z.scrollTop=Z.scrollHeight)},[T,f]);async function k(){H(!0);try{await Xe("/api/log/history?key=system",{method:"DELETE"}),o([])}finally{H(!1)}}return c.jsx(Ra,{open:f,onClose:x,title:"系统日志",subtitle:"全局事件与系统级错误,实时刷新",size:"xl",footer:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",T.length," 行 · 保留最近 500 行"]}),c.jsx(Re,{variant:"danger",size:"sm",loading:j,onClick:k,children:"清空"}),c.jsx(Re,{size:"sm",onClick:x,children:"关闭"})]}),bodyClassName:"bg-slate-50 p-0",children:c.jsx("pre",{ref:A,onScroll:Z=>{const q=Z.currentTarget;W.current=q.scrollHeight-q.scrollTop-q.clientHeight<24},className:"scrollbar-thin h-[60vh] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-[11.5px] leading-relaxed text-slate-600",children:c.jsx(Um,{lines:T,empty:"暂无系统日志"})})})}function Zv({toast:f}){if(!f)return null;const x=f.tone||"info",T=x==="error"?Fy:x==="success"?Wy:iv;return c.jsxs("div",{role:"status",className:ot("animate-toast-in fixed bottom-7 left-1/2 z-[60] flex max-w-[85vw] -translate-x-1/2 items-center gap-2","rounded-xl px-4 py-2.5 text-[12.5px] font-medium shadow-xl shadow-slate-900/20",x==="error"?"bg-red-600 text-white":x==="success"?"bg-emerald-600 text-white":"bg-slate-900 text-white"),children:[c.jsx(T,{className:"size-4 shrink-0 opacity-90"}),c.jsx("span",{className:"break-words",children:f.message})]})}function Kv({refreshing:f,onRefresh:x,onSettings:T,onSystemLog:o,onPlugins:j,onAdd:H}){return c.jsx("header",{className:"sticky top-0 z-30 border-b border-line/80 bg-white/85 backdrop-blur-xl",children:c.jsxs("div",{className:"mx-auto flex h-16 max-w-[1320px] items-center gap-3 px-4 sm:px-6",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[c.jsx("div",{className:"grid size-9 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-500 to-sky-400 text-[15px] font-bold text-white shadow-md shadow-brand-500/30",children:"学"}),c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h1",{className:"truncate text-[15px] font-semibold tracking-tight text-slate-900",children:"在线学习平台"}),c.jsx("span",{className:"hidden rounded-md bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 sm:inline",children:"多账号学习控制台"})]}),c.jsx("p",{className:"truncate text-[11.5px] text-slate-500",children:"快速解放学习的双手"})]})]}),c.jsx("div",{className:"flex-1"}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(Re,{variant:"ghost",size:"icon",onClick:x,loading:f,title:"刷新列表","aria-label":"刷新列表",children:c.jsx(Fi,{className:"size-4"})}),c.jsx(Re,{variant:"ghost",size:"icon",onClick:j,title:"插件管理","aria-label":"插件管理",children:c.jsx(Am,{className:"size-4"})}),c.jsx(Re,{variant:"ghost",size:"icon",onClick:o,title:"系统日志","aria-label":"系统日志",children:c.jsx(dv,{className:"size-4"})}),c.jsx(Re,{variant:"ghost",size:"icon",onClick:T,title:"系统设置","aria-label":"系统设置",children:c.jsx(yv,{className:"size-4"})}),c.jsx(Re,{variant:"primary",className:"ml-1",icon:c.jsx(Om,{className:"size-4"}),onClick:H,children:c.jsx("span",{className:"hidden sm:inline",children:"添加账号"})})]})]})})}const Hm="guanyixue.inlineLogsOpen";function kv(){try{const f=JSON.parse(localStorage.getItem(Hm)||"[]");return new Set(Array.isArray(f)?f.filter(x=>typeof x=="string"):[])}catch{return new Set}}function Jv(f){try{localStorage.setItem(Hm,JSON.stringify([...f]))}catch{}}function Em(f){return{id:f.id,username:f.username,platform:f.platform||"",note:f.note||"",user:f.user||"",cookies:f.cookies||[],courses:f.courses||[],selected:f.selected||[],status:f.status||"idle",lastError:f.lastError||"",lastErrorAt:f.lastErrorAt||0,optQuiz:f.optQuiz===!0,optFeedback:f.optFeedback!==!1,loginAt:f.loginAt||0}}function $v(){const[f,x]=D.useState([]),T=D.useRef(f),[o,j]=D.useState({}),[H,A]=D.useState([]),[W,k]=D.useState(!1),[Z,q]=D.useState(null),[S,C]=D.useState({}),[F,xe]=D.useState(!1),[L,ee]=D.useState(null),[Ue,le]=D.useState(()=>kv()),I=D.useRef(Ue),[Le,Se]=D.useState({}),$=D.useRef(Le),ae=D.useRef(void 0),{ask:ve,dialog:Ce}=Rm();D.useEffect(()=>{T.current=f},[f]),D.useEffect(()=>{$.current=Le},[Le]),D.useEffect(()=>{I.current=Ue,Jv(Ue)},[Ue]),D.useEffect(()=>()=>window.clearTimeout(ae.current),[]);const Y=D.useCallback(h=>{q(h),window.clearTimeout(ae.current),ae.current=window.setTimeout(()=>q(null),3800)},[]),Me=D.useCallback(async h=>{const M=await Xe("/api/accounts",{method:"POST",body:JSON.stringify(Em(h))});if(M.ok===!1)throw new Error(M.error||"保存失败");return M},[]),Ae=D.useCallback(h=>{x(M=>{const X=M.some(fe=>fe.id===h.id)?M.map(fe=>fe.id===h.id?h:fe):[...M,h];return T.current=X,X})},[]),qe=D.useCallback(async(h=!0)=>{var M,O;try{const[X,fe]=await Promise.all([Xe("/api/runs"),Xe("/api/accounts")]),de=(fe.accounts||[]).map(ge=>({...ge,run:X[ge.id]||null})).sort((ge,nt)=>(ge.created||0)-(nt.created||0));x(de),T.current=de,k(!1);for(const ge of de){const nt=(M=ge.run)==null?void 0:M.status;if(nt!=="discovering"&&nt!=="studying")continue;const bt=(O=ge.run)==null?void 0:O.cookies;if(bt&&bt.length&&JSON.stringify(bt)!==JSON.stringify(ge.cookies||[])){const ll={...ge,cookies:bt};ge.cookies=bt,Me(ll).catch(()=>{})}}}catch(X){X instanceof Hl&&X.offline?k(!0):h||Y({message:`读取账号失败:${el(X)}`,tone:"error"})}},[Y,Me]);D.useEffect(()=>{qe();const h=window.setInterval(()=>{document.hidden||qe()},5e3);return()=>window.clearInterval(h)},[qe]);const U=D.useCallback(async()=>{try{const M=(await Xe("/api/platforms")).platforms||[];A(M);const O={};for(const X of M)O[X.id]=X.label;j(O)}catch{}},[]);D.useEffect(()=>{U()},[U]);const se=D.useCallback(async h=>{var fe;const M=$.current[h]||{lines:[],since:0,busy:!1,historyTried:!1};if(M.busy)return;const O={...M,busy:!0},X=de=>{$.current={...$.current,[h]:de},Se(ge=>({...ge,[h]:de}))};X(O);try{let de=await Xe(`/api/log?key=${encodeURIComponent(h)}&since=${O.since}`);typeof de.next=="number"&&de.nextll.id===h);if(bt&&JSON.stringify(bt.cookies||[])!==JSON.stringify(nt)){const ll={...bt,cookies:nt};Ae(ll),Me(ll).catch(()=>{})}}}catch{}finally{O.busy=!1,X(O)}},[Ae,Me]);D.useEffect(()=>{const h=window.setInterval(()=>{document.hidden||I.current.forEach(M=>void se(M))},1500);return()=>window.clearInterval(h)},[se]);const R=D.useCallback((h,M)=>{const O=M===void 0?!I.current.has(h):M,X=new Set(I.current);O?X.add(h):X.delete(h),I.current=X,le(X),O&&se(h)},[se]);async function Q(h,M,O){C(X=>({...X,[h]:M}));try{return await O()}finally{C(X=>{const fe={...X};return delete fe[h],fe})}}async function te(h,M=!1){return Q(h.id,"login",async()=>{Ae({...h,status:"logging",lastError:""});try{await Me({...h,status:"logging",lastError:""});const O=await Xe("/api/login",{method:"POST",body:JSON.stringify({account_id:h.id})});if(!O.ok){const de={...h,status:"login_failed",lastError:O.error||`HTTP ${O.code||"失败"}`,lastErrorAt:Date.now(),run:null};return Ae(de),await Me(de).catch(()=>{}),M||Y({message:`登录失败:${de.lastError}`,tone:"error"}),!1}const X=O.courses||[],fe={...h,status:"logged_in",cookies:O.cookies||[],user:O.user||h.user||"",courses:X,selected:(h.selected||[]).filter(de=>X.some(ge=>ge.plan_id===de)),loginAt:Date.now(),updated:Date.now(),lastError:"",lastErrorAt:0,run:null};return Ae(fe),await Me(fe).catch(()=>{}),M||Y({message:O.warn?`登录成功,但课程读取异常:${O.warn}`:`登录成功:${fe.user||fe.username},读到 ${Gf(X).total} 门`,tone:O.warn?"info":"success"}),qe(),!0}catch(O){const X={...h,status:"login_failed",lastError:el(O),lastErrorAt:Date.now()};return Ae(X),await Me(X).catch(()=>{}),M||Y({message:`登录失败:${X.lastError}`,tone:"error"}),O instanceof Hl&&O.offline&&k(!0),!1}})}async function _e(h){return Q(h.id,"refresh",async()=>{var M;try{let O=await Xe("/api/courses",{method:"POST",body:JSON.stringify({cookies:h.cookies,platform:h.platform||""})});if(!O.ok&&O.code==="session_expired"){if(Y({message:"会话已失效,正在自动重新登录…"}),!await te(h,!0))return;const de=T.current.find(ge=>ge.id===h.id);if(!de)return;O=await Xe("/api/courses",{method:"POST",body:JSON.stringify({cookies:de.cookies,platform:de.platform||h.platform||""})})}if(!O.ok){Y({message:`读取失败:${O.error||O.code||"未知错误"}`,tone:"error"});return}const X=T.current.find(de=>de.id===h.id)||h,fe={...X,courses:O.courses||[],user:O.user||X.user,cookies:(M=O.cookies)!=null&&M.length?O.cookies:X.cookies,status:"logged_in",updated:Date.now(),lastError:"",lastErrorAt:0};Ae(fe),await Me(fe).catch(()=>{}),Y({message:`已刷新,读到 ${Gf(fe.courses).total} 门`,tone:"success"})}catch(O){Y({message:`读取失败:${el(O)}`,tone:"error"})}})}async function ze(h){var X;const M=h.selected||[],O=(h.courses||[]).filter(fe=>M.includes(fe.plan_id)&&fe.in_study!==!1);if(!O.length){Y({message:"请先勾选要学习的课程",tone:"error"});return}if(!((X=h.cookies)!=null&&X.length)){Y({message:"请先登录",tone:"error"});return}return Q(h.id,"study",async()=>{var fe,de;try{const ge=await Xe("/api/study",{method:"POST",body:JSON.stringify({key:h.id,username:h.user||h.username,cookies:h.cookies,courses:O,workers:40,cap_minutes:90,enable_quiz:h.optQuiz===!0,enable_feedback:h.optFeedback!==!1})});if(!ge.ok){Y({message:`启动失败:${ge.error||"未知错误"}`,tone:"error"});return}const nt=((fe=ge.study)==null?void 0:fe.mode)==="normal"?`常规真播 ${((de=ge.study)==null?void 0:de.parallel)||1} 路并发`:"快速模式(只调接口)";Y({message:`已开始 ${O.length} 门课程 · ${nt}${h.optQuiz?" · 含自动答题":" · 测验需手动作答"}`,tone:"success"}),R(h.id,!0),qe()}catch(ge){Y({message:`启动失败:${el(ge)}`,tone:"error"})}})}async function it(h){return Q(h.id,"stop",async()=>{try{await Xe("/api/stop",{method:"POST",body:JSON.stringify({key:h.id})}),Y({message:"已请求停止"}),qe()}catch(M){Y({message:`停止失败:${el(M)}`,tone:"error"})}})}async function ne(h){var M;if(!((M=h.cookies)!=null&&M.length)){Y({message:"请先登录",tone:"error"});return}return Q(h.id,"capture",async()=>{try{const O=await Xe("/api/capture",{method:"POST",body:JSON.stringify({key:h.id,cookies:h.cookies,minutes:10})});if(!O.ok){Y({message:`抓包失败:${O.error||"未知错误"}`,tone:"error"});return}Y({message:"已打开浏览器,请手动走一遍课程页;最多记录 10 分钟",tone:"success"})}catch(O){Y({message:`抓包失败:${el(O)}`,tone:"error"})}})}async function oe(h){return Q(h.id,"capture",async()=>{try{await Xe("/api/capture/stop",{method:"POST",body:JSON.stringify({key:h.id})}),Y({message:"已请求停止抓包"}),qe()}catch(M){Y({message:`停止抓包失败:${el(M)}`,tone:"error"})}})}async function d(h,M){const O={...h,username:M.username,note:M.note,platform:M.platform},X=await Xe("/api/accounts",{method:"POST",body:JSON.stringify({...Em(O),password:M.password})});if(X.ok===!1)throw new Error(X.error||"保存失败");Ae(O),Y({message:"账号信息已保存,正在用新凭据重新登录…"}),te(O)}async function E(h){if(await ve({title:"删除账号",message:`删除「${h.user||h.username}」?课程缓存和日志不会自动清理,删掉后要重新添加账号才能继续学习。`,confirmText:"删除账号"}))try{await Xe(`/api/accounts/${encodeURIComponent(h.id)}`,{method:"DELETE"}),x(O=>{const X=O.filter(fe=>fe.id!==h.id);return T.current=X,X}),Y({message:"账号已删除"})}catch(O){Y({message:`删除失败:${el(O)}`,tone:"error"})}}async function B(h,M){const O={...h,selected:M};Ae(O);try{await Me(O)}catch(X){Y({message:`保存勾选失败:${el(X)}`,tone:"error"})}}function w(h,M,O){const X=h.selected||[];B(h,O?[...new Set([...X,M])]:X.filter(fe=>fe!==M))}function ce(h){const M=(h.courses||[]).filter(O=>O.in_study!==!1).map(O=>O.plan_id);B(h,[...new Set([...h.selected||[],...M])])}async function me(h,M,O){const X=M==="quiz"?{...h,optQuiz:O}:{...h,optFeedback:O};Ae(X);try{await Me(X),Y({message:M==="quiz"?O?"已开启自动交测验(注意正确率)":"已关闭自动交测验":O?"已开启自动交反馈表":"已关闭自动交反馈表"})}catch(fe){Y({message:`保存失败:${el(fe)}`,tone:"error"})}}async function Ee(h){const M=await Xe("/api/accounts",{method:"POST",body:JSON.stringify({username:h.username,platform:h.platform,password:h.password,note:h.note,cookies:[],courses:[],selected:[],status:"idle",created:Date.now()})});if(M.ok===!1)throw new Error(M.error||"保存失败");const O=await Xe("/api/accounts"),X=M.account||(O.accounts||[]).find(ge=>ge.username===h.username);if(!X){Y({message:"已保存,但列表里没有找到新账号,请刷新页面",tone:"error"}),await qe();return}Y({message:"已保存,正在尝试首次登录…"});const fe=await te(X,!0),de=T.current.find(ge=>ge.id===X.id);Y(fe?{message:`登录成功:${(de==null?void 0:de.user)||h.username}`,tone:"success"}:{message:`登录失败:${(de==null?void 0:de.lastError)||"未知原因"}(请手动点击「登录」重试)`,tone:"error"}),await qe()}async function K(){xe(!0);try{await qe(!1)}finally{xe(!1)}}function ue(h){var O;const M=h.platform||((O=(h.courses||[]).find(X=>X.platform))==null?void 0:O.platform);return M&&o[M]||M||"未选择平台"}function jt(h){var M;return((M=H.find(O=>O.id===h.platform))==null?void 0:M.capabilities)||[]}const tl=(L==null?void 0:L.type)==="edit"&&f.find(h=>h.id===L.accountId)||null,St=(L==null?void 0:L.type)==="quiz"&&f.find(h=>h.id===L.accountId)||null,Nt=(L==null?void 0:L.type)==="quiz"?(St==null?void 0:St.courses.find(h=>h.plan_id===L.course.plan_id))||L.course:null;return c.jsxs("div",{className:"min-h-screen",children:[c.jsx(Kv,{refreshing:F,onRefresh:()=>void K(),onSettings:()=>ee({type:"settings"}),onSystemLog:()=>ee({type:"system"}),onPlugins:()=>ee({type:"plugins"}),onAdd:()=>ee({type:"add"})}),c.jsxs("main",{className:"mx-auto max-w-[1320px] px-4 pb-16 pt-5 sm:px-6",children:[W&&c.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2.5 rounded-xl border border-red-200 bg-red-50 px-4 py-2.5 text-[12.5px] text-red-700",children:[c.jsx(Sv,{className:"size-4 shrink-0"}),c.jsx("span",{className:"font-medium",children:"后端未连接"}),c.jsx("span",{className:"text-red-500",children:"页面显示的是上一次数据,请确认服务已启动、端口没有变化。"}),c.jsx("div",{className:"flex-1"}),c.jsx(Re,{size:"sm",variant:"secondary",loading:F,onClick:()=>void K(),children:"重试"})]}),c.jsx(Lv,{accounts:f}),c.jsxs("div",{className:"mb-3 mt-6 flex items-end justify-between gap-3",children:[c.jsx("div",{children:c.jsx("h2",{className:"text-[14px] font-semibold text-slate-900",children:"账号列表"})}),f.length>0&&c.jsx(Re,{size:"sm",variant:"secondary",icon:c.jsx(Fi,{className:"size-3.5"}),loading:F,onClick:()=>void K(),children:"刷新"})]}),f.length===0?c.jsxs("div",{className:"card-shadow grid place-items-center rounded-2xl border border-dashed border-slate-300 bg-white px-6 py-16 text-center",children:[c.jsx("div",{className:"grid size-12 place-items-center rounded-2xl bg-brand-50 text-brand-600",children:c.jsx(Mm,{className:"size-6"})}),c.jsx("h3",{className:"mt-4 text-[14px] font-semibold text-slate-800",children:"还没有账号"}),c.jsx("p",{className:"mt-1.5 max-w-md text-[12.5px] leading-relaxed text-slate-500",children:"添加平台账号后,可自动读取课程、勾选学习、提交反馈表与测验。"}),c.jsx(Re,{variant:"primary",className:"mt-5",icon:c.jsx(Om,{className:"size-4"}),onClick:()=>ee({type:"add"}),children:"添加第一个账号"})]}):c.jsx("div",{className:"grid items-start gap-4 md:grid-cols-2 xl:grid-cols-3",children:f.map(h=>{var M;return c.jsx(Dv,{account:h,platformLabel:ue(h),capabilities:jt(h),pending:S[h.id],openLog:Ue.has(h.id),logLines:((M=Le[h.id])==null?void 0:M.lines)||[],onToggleLog:()=>R(h.id),onLogin:()=>void te(h),onRefresh:()=>void _e(h),onStudy:()=>void ze(h),onStop:()=>void it(h),onCapture:()=>void ne(h),onStopCapture:()=>void oe(h),onEdit:()=>ee({type:"edit",accountId:h.id}),onDelete:()=>void E(h),onQuiz:()=>{var fe;const O=(h.courses||[]).filter(de=>de.in_study!==!1),X=O.find(de=>{var ge;return(ge=h.selected)==null?void 0:ge.includes(de.plan_id)})||O[0];if(!X){Y({message:"这门课还没有课程数据,先点「刷新课程」",tone:"error"});return}if(!((fe=h.cookies)!=null&&fe.length)){Y({message:"请先登录",tone:"error"});return}ee({type:"quiz",accountId:h.id,course:X})},onToggleCourse:(O,X)=>w(h,O,X),onSelectAll:()=>ce(h),onClearSelection:()=>void B(h,[]),onToggleOption:(O,X)=>void me(h,O,X)},h.id)})})]}),c.jsx("footer",{className:"border-t border-line/70 py-5 text-center text-[11px] text-slate-400",children:"多账号学习控制台 · 数据保存在本机"}),c.jsx(Hv,{open:(L==null?void 0:L.type)==="add",platforms:H,onClose:()=>ee(null),onSubmit:Ee}),c.jsx(Rv,{open:(L==null?void 0:L.type)==="edit"&&!!tl,account:tl,platforms:H,onClose:()=>ee(null),onSubmit:h=>tl?d(tl,h):Promise.resolve()}),c.jsx(Xv,{open:(L==null?void 0:L.type)==="settings",onClose:()=>ee(null),notify:Y}),c.jsx(Vv,{open:(L==null?void 0:L.type)==="system",onClose:()=>ee(null)}),c.jsx(Bv,{open:(L==null?void 0:L.type)==="plugins",onClose:()=>ee(null),notify:Y,onChanged:()=>void U()}),c.jsx(Gv,{open:(L==null?void 0:L.type)==="quiz"&&!!St,account:St,course:Nt,onClose:()=>ee(null),notify:Y,onSubmitted:()=>void qe()}),Ce,c.jsx(Zv,{toast:Z})]})}const Fv={discovering:{label:"发现课程中",tone:"running"},studying:{label:"学习中",tone:"running"},finished:{label:"已完成",tone:"success"},stopped:{label:"已停止",tone:"warning"},error:{label:"出错",tone:"danger"},interrupted:{label:"已中断",tone:"warning"},logged_in:{label:"已登录",tone:"success"},login_failed:{label:"登录失败",tone:"danger"},idle:{label:"未开始",tone:"neutral"}};function Wv({account:f}){const{run:x}=f,T=Fv[x.status||f.status]||{label:x.status||f.status,tone:"neutral"},o=x.total?Math.min(100,Math.round((x.done||0)/x.total*100)):null;return c.jsxs("section",{className:"rounded-2xl border border-line bg-white p-5 shadow-sm",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("h2",{className:"text-[15px] font-semibold text-slate-900",children:f.user||f.username}),c.jsx(Ua,{tone:"brand",children:f.platform||"未知平台"}),c.jsx(Ua,{tone:T.tone,dot:!0,children:T.label})]}),(o!==null||x.course||x.error)&&c.jsxs("div",{className:"mt-3 space-y-1.5",children:[o!==null&&c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-slate-100",children:c.jsx("div",{className:"h-full rounded-full bg-brand-500 transition-all",style:{width:`${o}%`}})}),c.jsxs("span",{className:"text-xs tabular-nums text-slate-500",children:[x.done||0,"/",x.total,"(",o,"%)"]})]}),x.course&&c.jsxs("p",{className:"truncate text-xs text-slate-500",children:["当前:",x.course,x.progress?` · ${x.progress}`:""]}),x.error&&c.jsx("p",{className:"text-xs text-red-600",children:x.error})]}),c.jsxs("div",{className:"mt-4 divide-y divide-line/70",children:[f.courses.length===0&&c.jsx("p",{className:"py-3 text-sm text-slate-400",children:"暂无课程"}),f.courses.map((j,H)=>c.jsxs("div",{className:"flex items-start gap-3 py-2.5",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate text-[13px] font-medium text-slate-700",children:j.name||"—"}),c.jsx("div",{className:"mt-0.5 truncate text-[11.5px] text-slate-400",children:[j.section,j.status_label,j.info].filter(Boolean).join(" · ")||"—"})]}),c.jsx("span",{className:"shrink-0 text-xs tabular-nums text-slate-600",children:j.progress||""})]},H))]})]})}function Iv(){const[f,x]=D.useState(""),[T,o]=D.useState(!1),[j,H]=D.useState(""),[A,W]=D.useState(null);async function k(Z){Z.preventDefault();const q=f.trim();if(q){o(!0),H("");try{const S=await Xe(`/api/query?username=${encodeURIComponent(q)}`);if(!S.ok)throw new Error(S.error||"查询失败");W(S.accounts||[])}catch(S){W(null),H(S instanceof Error?S.message:"查询失败")}finally{o(!1)}}}return c.jsx("div",{className:"min-h-screen bg-slate-50",children:c.jsxs("main",{className:"mx-auto max-w-[760px] px-4 py-10 sm:px-6",children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight text-slate-900",children:"学习进度查询"}),c.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"输入账号用户名,查看课程列表与当前学习进度"}),c.jsxs("form",{onSubmit:k,className:"mt-6 flex gap-2",children:[c.jsx("input",{value:f,onChange:Z=>x(Z.target.value),placeholder:"请输入账号用户名",autoFocus:!0,className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-white px-3 text-sm outline-none transition focus:border-brand-500 focus:ring-3 focus:ring-brand-500/20"}),c.jsx(Re,{type:"submit",variant:"primary",loading:T,disabled:!f.trim(),icon:c.jsx(mv,{className:"size-4"}),children:"查询"})]}),c.jsxs("div",{className:"mt-6 space-y-4",children:[j&&c.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:j}),(A==null?void 0:A.length)===0&&c.jsx("p",{className:"py-10 text-center text-sm text-slate-400",children:"没有找到该账号"}),A==null?void 0:A.map((Z,q)=>c.jsx(Wv,{account:Z},q))]})]})})}const Pv=window.location.pathname.replace(/\/+$/,"")==="/query"?Iv:$v;Ly.createRoot(document.getElementById("root")).render(c.jsx(D.StrictMode,{children:c.jsx(Pv,{})}));