var zy=Object.defineProperty;var Ey=(r,z,T)=>z in r?zy(r,z,{enumerable:!0,configurable:!0,writable:!0,value:T}):r[z]=T;var Ji=(r,z,T)=>Ey(r,typeof z!="symbol"?z+"":z,T);(function(){const z=document.createElement("link").relList;if(z&&z.supports&&z.supports("modulepreload"))return;for(const C of document.querySelectorAll('link[rel="modulepreload"]'))d(C);new MutationObserver(C=>{for(const w of C)if(w.type==="childList")for(const M of w.addedNodes)M.tagName==="LINK"&&M.rel==="modulepreload"&&d(M)}).observe(document,{childList:!0,subtree:!0});function T(C){const w={};return C.integrity&&(w.integrity=C.integrity),C.referrerPolicy&&(w.referrerPolicy=C.referrerPolicy),C.crossOrigin==="use-credentials"?w.credentials="include":C.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function d(C){if(C.ep)return;C.ep=!0;const w=T(C);fetch(C.href,w)}})();var Ms={exports:{}},du={};/** * @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 sm;function _y(){if(sm)return du;sm=1;var r=Symbol.for("react.transitional.element"),z=Symbol.for("react.fragment");function T(d,C,w){var M=null;if(w!==void 0&&(M=""+w),C.key!==void 0&&(M=""+C.key),"key"in C){w={};for(var nt in C)nt!=="key"&&(w[nt]=C[nt])}else w=C;return C=w.ref,{$$typeof:r,type:d,key:M,ref:C!==void 0?C:null,props:w}}return du.Fragment=z,du.jsx=T,du.jsxs=T,du}var rm;function Oy(){return rm||(rm=1,Ms.exports=_y()),Ms.exports}var f=Oy(),Cs={exports:{}},it={};/** * @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 om;function jy(){if(om)return it;om=1;var r=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),M=Symbol.for("react.context"),nt=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),X=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),ct=Symbol.iterator;function wt(o){return o===null||typeof o!="object"?null:(o=ct&&o[ct]||o["@@iterator"],typeof o=="function"?o:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,ht={};function et(o,N,Q){this.props=o,this.context=N,this.refs=ht,this.updater=Q||$}et.prototype.isReactComponent={},et.prototype.setState=function(o,N){if(typeof o!="object"&&typeof o!="function"&&o!=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,o,N,"setState")},et.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function Nt(){}Nt.prototype=et.prototype;function Ft(o,N,Q){this.props=o,this.context=N,this.refs=ht,this.updater=Q||$}var Ct=Ft.prototype=new Nt;Ct.constructor=Ft,U(Ct,et.prototype),Ct.isPureReactComponent=!0;var Ht=Array.isArray;function tt(){}var D={H:null,A:null,T:null,S:null},jt=Object.prototype.hasOwnProperty;function _t(o,N,Q){var Z=Q.ref;return{$$typeof:r,type:o,key:N,ref:Z!==void 0?Z:null,props:Q}}function Tt(o,N){return _t(o.type,N,o.props)}function qt(o){return typeof o=="object"&&o!==null&&o.$$typeof===r}function Kt(o){var N={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(Q){return N[Q]})}var al=/\/+/g;function At(o,N){return typeof o=="object"&&o!==null&&o.key!=null?Kt(""+o.key):N.toString(36)}function R(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(tt,tt):(o.status="pending",o.then(function(N){o.status==="pending"&&(o.status="fulfilled",o.value=N)},function(N){o.status==="pending"&&(o.status="rejected",o.reason=N)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function F(o,N,Q,Z,ot){var yt=typeof o;(yt==="undefined"||yt==="boolean")&&(o=null);var dt=!1;if(o===null)dt=!0;else switch(yt){case"bigint":case"string":case"number":dt=!0;break;case"object":switch(o.$$typeof){case r:case z:dt=!0;break;case q:return dt=o._init,F(dt(o._payload),N,Q,Z,ot)}}if(dt)return ot=ot(o),dt=Z===""?"."+At(o,0):Z,Ht(ot)?(Q="",dt!=null&&(Q=dt.replace(al,"$&/")+"/"),F(ot,N,Q,"",function(B){return B})):ot!=null&&(qt(ot)&&(ot=Tt(ot,Q+(ot.key==null||o&&o.key===ot.key?"":(""+ot.key).replace(al,"$&/")+"/")+dt)),N.push(ot)),1;dt=0;var K=Z===""?".":Z+":";if(Ht(o))for(var g=0;g>>1,G=R[pt];if(0>>1;ptC(Bt,lt))oC(N,Bt)?(R[pt]=N,R[o]=lt,pt=o):(R[pt]=Bt,R[rt]=lt,pt=rt);else if(oC(N,lt))R[pt]=N,R[o]=lt,pt=o;else break t}}return F}function C(R,F){var lt=R.sortIndex-F.sortIndex;return lt!==0?lt:R.id-F.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var w=performance;r.unstable_now=function(){return w.now()}}else{var M=Date,nt=M.now();r.unstable_now=function(){return M.now()-nt}}var I=[],X=[],q=1,S=null,A=3,ct=!1,wt=!1,$=!1,U=!1,ht=typeof setTimeout=="function"?setTimeout:null,et=typeof clearTimeout=="function"?clearTimeout:null,Nt=typeof setImmediate<"u"?setImmediate:null;function Ft(R){for(var F=T(X);F!==null;){if(F.callback===null)d(X);else if(F.startTime<=R)d(X),F.sortIndex=F.expirationTime,z(I,F);else break;F=T(X)}}function Ct(R){if($=!1,Ft(R),!wt)if(T(I)!==null)wt=!0,Ht||(Ht=!0,qt());else{var F=T(X);F!==null&&At(Ct,F.startTime-R)}}var Ht=!1,tt=-1,D=5,jt=-1;function _t(){return U?!0:!(r.unstable_now()-jtR&&_t());){var pt=S.callback;if(typeof pt=="function"){S.callback=null,A=S.priorityLevel;var G=pt(S.expirationTime<=R);if(R=r.unstable_now(),typeof G=="function"){S.callback=G,Ft(R),F=!0;break l}S===T(I)&&d(I),Ft(R)}else d(I);S=T(I)}if(S!==null)F=!0;else{var ut=T(X);ut!==null&&At(Ct,ut.startTime-R),F=!1}}break t}finally{S=null,A=lt,ct=!1}F=void 0}}finally{F?qt():Ht=!1}}}var qt;if(typeof Nt=="function")qt=function(){Nt(Tt)};else if(typeof MessageChannel<"u"){var Kt=new MessageChannel,al=Kt.port2;Kt.port1.onmessage=Tt,qt=function(){al.postMessage(null)}}else qt=function(){ht(Tt,0)};function At(R,F){tt=ht(function(){R(r.unstable_now())},F)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(R){R.callback=null},r.unstable_forceFrameRate=function(R){0>R||125pt?(R.sortIndex=lt,z(X,R),T(I)===null&&R===T(X)&&($?(et(tt),tt=-1):$=!0,At(Ct,lt-pt))):(R.sortIndex=G,z(I,R),wt||ct||(wt=!0,Ht||(Ht=!0,qt()))),R},r.unstable_shouldYield=_t,r.unstable_wrapCallback=function(R){var F=A;return function(){var lt=A;A=F;try{return R.apply(this,arguments)}finally{A=lt}}}})(Rs)),Rs}var hm;function My(){return hm||(hm=1,Us.exports=Ay()),Us.exports}var Hs={exports:{}},yl={};/** * @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 ym;function Cy(){if(ym)return yl;ym=1;var r=Bs();function z(q){var S="https://react.dev/errors/"+q;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(z){console.error(z)}}return r(),Hs.exports=Cy(),Hs.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 gm;function Uy(){if(gm)return mu;gm=1;var r=My(),z=Bs(),T=Dy();function d(t){var l="https://react.dev/errors/"+t;if(1j||(t.current=O[j],O[j]=null,j--)}function k(t,l){j++,O[j]=t.current,t.current=l}var It=P(null),Gl=P(null),jl=P(null),gu=P(null);function bu(t,l){switch(k(jl,l),k(Gl,t),k(It,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?b0(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=b0(l),t=x0(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(It),k(It,t)}function ja(){L(It),L(Gl),L(jl)}function $i(t){var l=t.memoizedState;l!==null&&(vn._currentValue=l.memoizedState,k(gu,t)),l=It.current;var e=x0(l,t.type);l!==e&&(k(Gl,t),k(It,e))}function xu(t){Gl.current===t&&(L(It),L(Gl)),gu.current===t&&(L(gu),vn._currentValue=B)}var Fi,Ys;function Ce(t){if(Fi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);Fi=l&&l[1]||"",Ys=-1)":-1n||s[a]!==v[n]){var p=` `+s[a].replace(" at new "," at ");return t.displayName&&p.includes("")&&(p=p.replace("",t.displayName)),p}while(1<=a&&0<=n);break}}}finally{Wi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?Ce(e):""}function jm(t,l){switch(t.tag){case 26:case 27:case 5:return Ce(t.type);case 16:return Ce("Lazy");case 13:return t.child!==l&&l!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Ii(t.type,!1);case 11:return Ii(t.type.render,!1);case 1:return Ii(t.type,!0);case 31:return Ce("Activity");case 30:return Ce("ViewTransition");default:return""}}function ws(t){try{var l="",e=null;do l+=jm(t,e),e=t,t=t.return;while(t);return l}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var Pi=Object.prototype.hasOwnProperty,tc=r.unstable_scheduleCallback,lc=r.unstable_cancelCallback,Am=r.unstable_shouldYield,Mm=r.unstable_requestPaint,Al=r.unstable_now,Cm=r.unstable_getCurrentPriorityLevel,Gs=r.unstable_ImmediatePriority,Qs=r.unstable_UserBlockingPriority,pu=r.unstable_NormalPriority,Dm=r.unstable_LowPriority,Xs=r.unstable_IdlePriority,Um=r.log,Rm=r.unstable_setDisableYieldValue,xn=null,Ml=null;function De(t){if(typeof Um=="function"&&Rm(t),Ml&&typeof Ml.setStrictMode=="function")try{Ml.setStrictMode(xn,t)}catch{}}var Cl=Math.clz32?Math.clz32:Bm,Hm=Math.log,qm=Math.LN2;function Bm(t){return t>>>=0,t===0?32:31-(Hm(t)/qm|0)|0}var Su=256,Nu=262144,Tu=4194304;function ua(t){var l=t&42;if(l!==0)return l;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function zu(t,l,e){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=ua(a):(i&=c,i!==0?n=ua(i):e||(e=c&~t,e!==0&&(n=ua(e))))):(c=a&~u,c!==0?n=ua(c):i!==0?n=ua(i):e||(e=a&~t,e!==0&&(n=ua(e)))),n===0?0:l!==0&&l!==n&&(l&u)===0&&(u=n&-n,e=l&-l,u>=e||u===32&&(e&4194048)!==0)?l:n}function pn(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Vs(t,l){(l&8)!==0&&(l|=l&32);var e=t.entangledLanes;if(e!==0)for(t=t.entanglements,e&=l;0e;e++)l.push(t);return l}function Sn(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function wm(t,l,e,a,n,u){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var c=t.entanglements,s=t.expirationTimes,v=t.hiddenUpdates;for(e=i&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dc=!1;if(ge)try{var En={};Object.defineProperty(En,"passive",{get:function(){dc=!0}}),window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{dc=!1}var Ue=null,mc=null,Mu=null;function mr(){if(Mu)return Mu;var t,l=mc,e=l.length,a,n="value"in Ue?Ue.value:Ue.textContent,u=n.length;for(t=0;t=jn),xr=" ",pr=!1;function Sr(t,l){switch(t){case"keyup":return S1.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ba=!1;function T1(t,l){switch(t){case"compositionend":return Nr(l);case"keypress":return l.which!==32?null:(pr=!0,xr);case"textInput":return t=l.data,t===xr&&pr?null:t;default:return null}}function z1(t,l){if(Ba)return t==="compositionend"||!bc&&Sr(t,l)?(t=mr(),Mu=mc=Ue=null,Ba=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Mr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cr(t,l){var e=Mr(t);t=0;for(var a;e;){if(e.nodeType===3){if(a=t+e.textContent.length,t<=l&&a>=l)return{node:e,offset:l-t};t=a}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=Mr(e)}}function Dr(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?Dr(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function Ur(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Sc(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Sc(t.document)}return l}function Nc(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var D1=ge&&"documentMode"in document&&11>=document.documentMode,Ya=null,Tc=null,Dn=null,zc=!1;function Rr(t,l,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;zc||Ya==null||Ya!==Sc(a)||(a=Ya,"selectionStart"in a&&Nc(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}),Dn&&Cn(Dn,a)||(Dn=a,a=Hi(Tc,"onSelect"),0>=i,n-=i,ue=1<<32-Cl(l)+n|e<at?(el=W,W=null):el=W.sibling;var St=h(y,W,b[at],E);if(St===null){W===null&&(W=el);break}t&&W&&St.alternate===null&&l(y,W),m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St,W=el}if(at===b.length)return e(y,W),mt&&Se(y,at),V;if(W===null){for(;atat?(el=W,W=null):el=W.sibling;var na=h(y,W,St.value,E);if(na===null){W===null&&(W=el);break}t&&W&&na.alternate===null&&l(y,W),m=u(na,m,at),xt===null?V=na:xt.sibling=na,xt=na,W=el}if(St.done)return e(y,W),mt&&Se(y,at),V;if(W===null){for(;!St.done;at++,St=b.next())St=_(y,St.value,E),St!==null&&(m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St);return mt&&Se(y,at),V}for(W=a(W);!St.done;at++,St=b.next())St=x(W,y,at,St.value,E),St!==null&&(t&&(el=St.alternate,el!==null&&W.delete(el.key===null?at:el.key)),m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St);return t&&W.forEach(function(Ty){return l(y,Ty)}),mt&&Se(y,at),V}function st(y,m,b,E){if(typeof b=="object"&&b!==null&&b.type===Tt&&b.key===null&&b.props.ref===void 0&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case jt:t:{for(var V=b.key;m!==null;){if(m.key===V){if(V=b.type,V===Tt){if(m.tag===7){e(y,m.sibling),E=n(m,b.props.children),we(E,b),E.return=y,y=E;break t}}else if(m.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===G&&ba(V)===m.type){e(y,m.sibling),E=n(m,b.props),we(E,b),E.return=y,y=E;break t}e(y,m);break}else l(y,m);m=m.sibling}b.type===Tt?(E=oa(b.props.children,y.mode,E,b.key),we(E,b),E.return=y,y=E):(E=Gu(b.type,b.key,b.props,null,y.mode,E),we(E,b),E.return=y,y=E)}return i(y);case _t:t:{for(V=b.key;m!==null;){if(m.key===V)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){e(y,m.sibling),E=n(m,b.children||[]),E.return=y,y=E;break t}else{e(y,m);break}else l(y,m);m=m.sibling}E=Cc(b,y.mode,E),E.return=y,y=E}return i(y);case G:return b=ba(b),st(y,m,b,E)}if(dt(b))return H(y,m,b,E);if(Z(b)){if(V=Z(b),typeof V!="function")throw Error(d(150));return b=V.call(b),J(y,m,b,E)}if(typeof b.then=="function")return st(y,m,Fu(b),E);if(b.$$typeof===At)return st(y,m,Ku(y,b),E);Wu(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(e(y,m.sibling),E=n(m,b),E.return=y,y=E):(e(y,m),E=Mc(b,y.mode,E),E.return=y,y=E),i(y)):e(y,m)}return function(y,m,b,E){try{Yn=0;var V=st(y,m,b,E);return Ja=null,V}catch(W){if(W===Ka||W===ku)throw W;var xt=Tl(29,W,null,y.mode);return xt.lanes=E,xt.return=y,xt}finally{}}}var pa=no(!0),uo=no(!1),Ge=!1;function Qc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Qe(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xe(t,l,e){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Ot&2)!==0){var n=a.pending;return n===null?l.next=l:(l.next=n.next,n.next=l),a.pending=l,l=wu(t),Xr(t,null,e),l}return Yu(t,a,l,e),wu(t)}function wn(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}function Vc(t,l){var e=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var n=null,u=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,e=e.next}while(e!==null);u===null?n=u=l:u=u.next=l}else n=u=l;e={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var Zc=!1;function Gn(){if(Zc){var t=La;if(t!==null)throw t}}function Qn(t,l,e,a){Zc=!1;var n=t.updateQueue;Ge=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var s=c,v=s.next;s.next=null,i===null?u=v:i.next=v,i=s;var p=t.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==i&&(c===null?p.firstBaseUpdate=v:c.next=v,p.lastBaseUpdate=s))}if(u!==null){var _=n.baseState;i=0,p=v=s=null,c=u;do{var h=c.lane&-536870913,x=h!==c.lane;if(x?(bt&h)===h:(a&h)===h){h!==0&&h===va&&(Zc=!0),p!==null&&(p=p.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});t:{var H=t,J=c;h=l;var st=e;switch(J.tag){case 1:if(H=J.payload,typeof H=="function"){_=H.call(st,_,h);break t}_=H;break t;case 3:H.flags=H.flags&-65537|128;case 0:if(H=J.payload,h=typeof H=="function"?H.call(st,_,h):H,h==null)break t;_=tt({},_,h);break t;case 2:Ge=!0}}h=c.callback,h!==null&&(t.flags|=64,x&&(t.flags|=8192),x=n.callbacks,x===null?n.callbacks=[h]:x.push(h))}else x={lane:h,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(v=p=x,s=_):p=p.next=x,i|=h;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;x=c,c=x.next,x.next=null,n.lastBaseUpdate=x,n.shared.pending=null}}while(!0);p===null&&(s=_),n.baseState=s,n.firstBaseUpdate=v,n.lastBaseUpdate=p,u===null&&(n.shared.lanes=0),$e|=i,t.lanes=i,t.memoizedState=_}}function io(t,l){if(typeof t!="function")throw Error(d(191,t));t.call(l)}function co(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tu?u:8;var i=K.T,c={};c.types=i!==null?i.types:null,K.T=c,of(t,!1,l,e);try{var s=n(),v=K.S;if(v!==null&&v(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var p=V1(s,a);Ln(t,l,p,Yl(t))}else Ln(t,l,a,Yl(t))}catch(_){Ln(t,l,{then:function(){},status:"rejected",reason:_},Yl())}finally{g.p=u,i!==null&&c.types!==null&&(i.types=c.types),K.T=i}}function $1(){}function sf(t,l,e,a){if(t.tag!==5)throw Error(d(476));var n=Go(t).queue;wo(t,n,l,B,e===null?$1:function(){return Qo(t),e(a)})}function Go(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:B},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function Qo(t){var l=Go(t);l.next===null&&(l=t.alternate.memoizedState),Ln(t,l.next.queue,{},Yl())}function rf(){return rl(vn)}function Xo(){return Wt().memoizedState}function Vo(){return Wt().memoizedState}function F1(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Yl();t=Qe(e);var a=Xe(l,t,e);a!==null&&(Ol(a,l,e),wn(a,l,e)),l={cache:Bc()},t.payload=l;return}l=l.return}}function W1(t,l,e){var a=Yl();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},ci(t)?Lo(l,e):(e=jc(t,l,e,a),e!==null&&(Ol(e,t,a),Ko(e,l,a)))}function Zo(t,l,e){var a=Yl();Ln(t,l,e,a)}function Ln(t,l,e,a){var n={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(ci(t))Lo(l,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var i=l.lastRenderedState,c=u(i,e);if(n.hasEagerState=!0,n.eagerState=c,Ul(c,i))return Yu(t,l,n,0),Gt===null&&Bu(),!1}catch{}finally{}if(e=jc(t,l,n,a),e!==null)return Ol(e,t,a),Ko(e,l,a),!0}return!1}function of(t,l,e,a){if(a={lane:2,revertLane:ls(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ci(t)){if(l)throw Error(d(479))}else l=jc(t,e,a,2),l!==null&&Ol(l,t,2)}function ci(t){var l=t.alternate;return t===ft||l!==null&&l===ft}function Lo(t,l){ka=ti=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function Ko(t,l,e){if((e&4194048)!==0){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}var fi={readContext:rl,use:ai,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt,useEffectEvent:kt},Jo={readContext:rl,use:ai,useCallback:function(t,l){return xl().memoizedState=[t,l===void 0?null:l],t},useContext:rl,useEffect:Mo,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,ui(4194308,4,Ro.bind(null,l,t),e)},useLayoutEffect:function(t,l){return ui(4194308,4,t,l)},useInsertionEffect:function(t,l){ui(4,2,t,l)},useMemo:function(t,l){var e=xl();l=l===void 0?null:l;var a=t();if(Sa){De(!0);try{t()}finally{De(!1)}}return e.memoizedState=[a,l],a},useReducer:function(t,l,e){var a=xl();if(e!==void 0){var n=e(l);if(Sa){De(!0);try{e(l)}finally{De(!1)}}}else n=l;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=W1.bind(null,ft,t),[a.memoizedState,t]},useRef:function(t){var l=xl();return t={current:t},l.memoizedState=t},useState:function(t){t=af(t);var l=t.queue,e=Zo.bind(null,ft,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:cf,useDeferredValue:function(t,l){var e=xl();return ff(e,t,l)},useTransition:function(){var t=af(!1);return t=wo.bind(null,ft,t.queue,!0,!1),xl().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var a=ft,n=xl();if(mt){if(e===void 0)throw Error(d(407));e=e()}else{if(e=l(),Gt===null)throw Error(d(349));(bt&127)!==0||ho(a,l,e)}n.memoizedState=e;var u={value:e,getSnapshot:l};return n.queue=u,Mo(vo.bind(null,a,u,t),[t]),a.flags|=2048,Fa(9,{destroy:void 0},yo.bind(null,a,u,e,l),null),e},useId:function(){var t=xl(),l=Gt.identifierPrefix;if(mt){var e=ie,a=ue;e=(a&~(1<<32-Cl(a)-1)).toString(32)+e,l="_"+l+"R_"+e,e=li++,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[sl]=l,u[Nl]=a;t:for(i=l.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===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=u;t:switch(hl(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Oe(l)}}return Vt(l),l.subtreeFlags&=-33554433,zf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==a&&Oe(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(d(166));if(t=jl.current,Za(l)){if(t=l.stateNode,e=l.memoizedProps,a=null,n=il,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[sl]=l,t=!!(t.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||v0(t.nodeValue,e)),t||Be(l,!0)}else t=nu(t).createTextNode(a),t[sl]=l,l.stateNode=t}return Vt(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(a=Za(l),e!==null){if(t===null){if(!a)throw Error(d(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(d(557));t[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Vt(l),t=!1}else e=Rc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Rl(l),l):(Rl(l),null);if((l.flags&128)!==0)throw Error(d(558))}return Vt(l),null;case 13:if(a=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=Za(l),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(d(318));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(d(317));n[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Vt(l),n=!1}else n=Rc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return l.flags&256?(Rl(l),l):(Rl(l),null)}return Rl(l),(l.flags&128)!==0?(l.lanes=e,l):(e=a!==null,t=t!==null&&t.memoizedState!==null,e&&(a=l.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)),e!==t&&e&&(l.child.flags|=8192),hi(l,l.updateQueue),Vt(l),null);case 4:return ja(),t===null&&us(l.stateNode.containerInfo),l.flags|=67108864,Vt(l),null;case 10:return Te(l.type),Vt(l),null;case 19:if(kc(l),a=l.memoizedState,a===null)return Vt(l),null;if(n=(l.flags&128)!==0,u=a.rendering,u===null)if(n)Jn(a,!1);else{if($t!==0||t!==null&&(t.flags&128)!==0)for(t=l.child;t!==null;){if(u=Pu(t),u!==null){for(l.flags|=128,Jn(a,!1),t=u.updateQueue,l.updateQueue=t,hi(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)Vr(e,t),e=e.sibling;return Xn(l,dl.current&1|2),mt&&Se(l,a.treeForkCount),l.child}t=t.sibling}a.tail!==null&&Al()>_i&&(l.flags|=128,n=!0,Jn(a,!1),l.lanes=4194304)}else{if(!n)if(t=Pu(u),t!==null){if(l.flags|=128,n=!0,t=t.updateQueue,l.updateQueue=t,hi(l,t),Jn(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!u.alternate&&!mt)return Vt(l),null}else 2*Al()-a.renderingStartTime>_i&&e!==536870912&&(l.flags|=128,n=!0,Jn(a,!1),l.lanes=4194304);a.isBackwards?(u.sibling=l.child,l.child=u):(t=a.last,t!==null?t.sibling=u:l.child=u,a.last=u)}if(a.tail!==null){t=a.tail;t:{for(e=t;e!==null;){if(e.alternate!==null){e=!1;break t}e=e.sibling}e=!0}return a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Al(),t.sibling=null,u=dl.current,u=n?u&1|2:u&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||mt?Xn(l,u):(e=u,k(ol,l),k(dl,e),vl===null&&(vl=l)),mt&&Se(l,a.treeForkCount),t}return Vt(l),null;case 22:case 23:return Rl(l),Kc(),a=l.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(e&536870912)!==0&&(l.flags&128)===0&&(Vt(l),l.subtreeFlags&6&&(l.flags|=8192)):Vt(l),e=l.updateQueue,e!==null&&hi(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==e&&(l.flags|=2048),t!==null&&L(ga),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),Te(Pt),Vt(l),null;case 25:return null;case 30:return l.flags|=33554432,Vt(l),null}throw Error(d(156,l.tag))}function nh(t,l){switch(Dc(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return Te(Pt),ja(),t=l.flags,(t&65536)!==0&&(t&128)===0?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return xu(l),null;case 31:if(l.memoizedState!==null){if(Rl(l),l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Rl(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return kc(l),t=l.flags,t&65536?(l.flags=t&-65537|128,t=l.memoizedState,t!==null&&(t.rendering=null,t.tail=null),l.flags|=4,l):null;case 4:return ja(),null;case 10:return Te(l.type),null;case 22:case 23:return Rl(l),Kc(),t!==null&&L(ga),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return Te(Pt),null;case 25:return null;default:return null}}function bd(t,l){switch(Dc(l),l.tag){case 3:Te(Pt),ja();break;case 26:case 27:case 5:xu(l);break;case 4:ja();break;case 31:l.memoizedState!==null&&Rl(l);break;case 13:Rl(l);break;case 19:kc(l);break;case 10:Te(l.type);break;case 22:case 23:Rl(l),Kc(),t!==null&&L(ga);break;case 24:Te(Pt)}}function kn(t,l){try{var e=l.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var n=a.next;e=n;do{if((e.tag&t)===t){a=void 0;var u=e.create,i=e.inst;a=u(),i.destroy=a}e=e.next}while(e!==n)}}catch(c){Ut(l,l.return,c)}}function Ke(t,l,e){try{var a=l.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,n=l;var s=e,v=c;try{v()}catch(p){Ut(n,s,p)}}}a=a.next}while(a!==u)}}catch(p){Ut(l,l.return,p)}}function xd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{co(l,e)}catch(a){Ut(t,t.return,a)}}}function pd(t,l,e){e.props=Na(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(a){Ut(t,l,a)}}function ce(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:var n=t.stateNode,u=be(t.memoizedProps,n);(n.ref===null||n.ref.name!==u)&&(n.ref=O0(u)),a=n.ref;break;case 7:if(t.stateNode===null){var i=new wl(t);S(t.child,!1,kh,i,void 0,void 0),t.stateNode=i}a=t.stateNode;break;default:a=t.stateNode}typeof e=="function"?t.refCleanup=e(a):e.current=a}}catch(c){Ut(t,l,c)}}function ml(t,l){var e=t.ref,a=t.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(n){Ut(t,l,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(n){Ut(t,l,n)}else e.current=null}function yi(t,l){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&l!==null)for(var e=0;e title"))),hl(a,l,e),a[sl]=t,ul(a),l=a;break t;case"link":if(u=Z0("link","href",n).get(l+(e.href||""))){for(i=0;ist&&(i=st,st=J,J=i);var y=Cr(c,J),m=Cr(c,st);if(y&&m&&(x.rangeCount!==1||x.anchorNode!==y.node||x.anchorOffset!==y.offset||x.focusNode!==m.node||x.focusOffset!==m.offset)){var b=_.createRange();b.setStart(y.node,y.offset),x.removeAllRanges(),J>st?(x.addRange(b),x.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),x.addRange(b))}}}}for(_=[],x=c;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<_.length;c++){var E=_[c];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}gn=!!fs,ss=fs=null}finally{Ot=u,g.p=n,K.T=a}}t.current=l,Jt=2}}function $f(){if(Jt===2){Jt=0;var t=ee,l=_a,e=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||e){e=K.T,K.T=null;var a=g.p;g.p=2;var n=Ot;Ot|=4;try{Cd(t,l.alternate,l)}finally{Ot=n,g.p=a,K.T=e}}Jt=3}}function Ff(){if(Jt===4||Jt===3){Jt=0;var t=an;an=null,Mm();var l=ee,e=_a,a=me,n=Kd,u=(a&335544064)===a?10262:10256;if((e.subtreeFlags&u)!==0||(e.flags&u)!==0?Jt=5:(Jt=0,_a=ee=null,n0(l,l.pendingLanes)),u=l.pendingLanes,u===0&&(Fe=null),nc(a),e=e.stateNode,Ml&&typeof Ml.onCommitFiberRoot=="function")try{Ml.onCommitFiberRoot(xn,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=K.T,u=g.p,g.p=2,K.T=null;try{for(var i=l.onRecoverableError,c=0;ce?32:e,K.T=null,e=Lf,Lf=null;var u=ee,i=me;if(Jt=0,_a=ee=null,me=0,(Ot&6)!==0)throw Error(d(331));var c=Ot;if(Ot|=4,Vd(u.current),Gd(u,u.current,i,e),Ot=c,lu(0,!1),Ml&&typeof Ml.onPostCommitFiberRoot=="function")try{Ml.onPostCommitFiberRoot(xn,u)}catch{}return!0}finally{g.p=n,K.T=a,n0(t,l)}}function u0(t,l,e){l=Vl(e,l),l=hf(t.stateNode,l,2),t=Xe(t,l,2),t!==null&&(Sn(t,2),he(t))}function Ut(t,l,e){if(t.tag===3)u0(t,t,e);else for(;l!==null;){if(l.tag===3){u0(l,t,e);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Fe===null||!Fe.has(a))){t=Vl(e,t),e=ld(2),a=Xe(l,e,2),a!==null&&(ed(e,a,l,t),Sn(a,2),he(a));break}}l=l.return}}function If(t,l,e){var a=t.pingCache;if(a===null){a=t.pingCache=new fh;var n=new Set;a.set(l,n)}else n=a.get(l),n===void 0&&(n=new Set,a.set(l,n));n.has(e)||(Xf=!0,n.add(e),t=vh.bind(null,t,l,e),l.then(t,t))}function vh(t,l,e){var a=t.pingCache;a!==null&&a.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,Gt===t&&(bt&e)===e&&(($t===4||$t===3&&(bt&62914560)===bt&&300>Al()-Ei)&&(Ot&2)===0?fn(t,0):zi|=e,en===bt&&(en=0)),he(t)}function i0(t,l){l===0&&(l=Zs()),t=ra(t,l),t!==null&&(Sn(t,l),he(t))}function gh(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),i0(t,e)}function bh(t,l){var e=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(e=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(l),i0(t,e)}function xh(t,l){return tc(t,l)}var rn=null,on=null,Pf=!1,Ui=!1,ts=!1,Ie=0;function he(t){t!==on&&t.next===null&&(on===null?rn=on=t:on=on.next=t),Ui=!0,Pf||(Pf=!0,Sh())}function lu(t,l){if(!ts&&Ui){ts=!0;do for(var e=!1,a=rn;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,c=a.pingedLanes;u=(1<<31-Cl(42|t)+1)-1,u&=n&~(i&~c),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(e=!0,r0(a,u))}else u=bt,u=zu(a,a===Gt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||pn(a,u)||(e=!0,r0(a,u));a=a.next}while(e);ts=!1}}function ph(){c0()}function c0(){Ui=Pf=!1;var t=0;Ie!==0&&Dh()&&(t=Ie);for(var l=Al(),e=null,a=rn;a!==null;){var n=a.next,u=f0(a,l);u===0?(a.next=null,e===null?rn=n:e.next=n,n===null&&(on=e)):(e=a,(t!==0||(u&3)!==0)&&(Ui=!0)),a=n}Jt!==0&&Jt!==5||lu(t),Ie!==0&&(Ie=0)}function f0(t,l){for(var e=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0c)break;var p=s.transferSize,_=s.initiatorType;p&&g0(_)&&(s=s.responseEnd,i+=p*(sYi){J.length=H;break}b=new Promise(Yh.bind(b)),J.push(b)}}}if(0"u"?null:document;function G0(t,l,e){var a=mn;if(a&&typeof l=="string"&&l){var n=Ql(l);n='link[rel="'+t+'"][href="'+n+'"]',typeof e=="string"&&(n+='[crossorigin="'+e+'"]'),w0.has(n)||(w0.add(n),t={rel:t,crossOrigin:e,href:l},a.querySelector(n)===null&&(l=a.createElement("link"),hl(l,"link",t),ul(l),a.head.appendChild(l)))}}function ay(t){Ae.D(t),G0("dns-prefetch",t,null)}function ny(t,l){Ae.C(t,l),G0("preconnect",t,l)}function uy(t,l,e){Ae.L(t,l,e);var a=mn;if(a&&t&&l){var n='link[rel="preload"][as="'+Ql(l)+'"]';l==="image"&&e&&e.imageSrcSet?(n+='[imagesrcset="'+Ql(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(n+='[imagesizes="'+Ql(e.imageSizes)+'"]')):n+='[href="'+Ql(t)+'"]';var u=n;switch(l){case"style":u=hn(t);break;case"script":u=yn(t)}if(!($l.has(u)||(t=tt({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),$l.set(u,t),a.querySelector(n)!==null||l==="style"&&a.querySelector(iu(u))||l==="script"&&a.querySelector(cu(u))))){var i=a.createElement("link");hl(i,"link",t),l==="style"&&(i[Eu]=!0,i.onload=i.onerror=function(){Is(i)}),ul(i),a.head.appendChild(i)}}}function iy(t,l){Ae.m(t,l);var e=mn;if(e&&t){var a=l&&typeof l.as=="string"?l.as:"script",n='link[rel="modulepreload"][as="'+Ql(a)+'"][href="'+Ql(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=yn(t)}if(!$l.has(u)&&(t=tt({rel:"modulepreload",href:t},l),$l.set(u,t),e.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(cu(u)))return}a=e.createElement("link"),hl(a,"link",t),ul(a),e.head.appendChild(a)}}}function cy(t,l,e){Ae.S(t,l,e);var a=mn;if(a&&t){var n=Ca(a).hoistableStyles,u=hn(t);l=l||"default";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(iu(u)))c.loading=5;else{t=tt({rel:"stylesheet",href:t,"data-precedence":l},e),(e=$l.get(u))&&Ss(t,e);var s=i=a.createElement("link");ul(s),hl(s,"link",t),s._p=new Promise(function(v,p){s.onload=v,s.onerror=p}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,qi(i,l,a)}i={type:"stylesheet",instance:i,count:1,state:c},n.set(u,i)}}}function fy(t,l){Ae.X(t,l);var e=mn;if(e&&t){var a=Ca(e).hoistableScripts,n=yn(t),u=a.get(n);u||(u=e.querySelector(cu(n)),u||(t=tt({src:t,async:!0},l),(l=$l.get(n))&&Ns(t,l),u=e.createElement("script"),ul(u),hl(u,"link",t),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function sy(t,l){Ae.M(t,l);var e=mn;if(e&&t){var a=Ca(e).hoistableScripts,n=yn(t),u=a.get(n);u||(u=e.querySelector(cu(n)),u||(t=tt({src:t,async:!0,type:"module"},l),(l=$l.get(n))&&Ns(t,l),u=e.createElement("script"),ul(u),hl(u,"link",t),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Q0(t,l,e,a){var n=(n=jl.current)?uu(n):null;if(!n)throw Error(d(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=hn(e.href),l=Ca(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hn(e.href);var u=Ca(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(iu(t)))?u._p||(i.instance=u,i.state.loading=5):(u=$l.get(t),u||(u={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},$l.set(t,u)),ry(n,t,u,i.state))),l&&a===null)throw Error(d(528,""));return i}if(l&&a!==null)throw Error(d(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(e=yn(e),l=Ca(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,t))}}function hn(t){return'href="'+Ql(t)+'"'}function iu(t){return'link[rel="stylesheet"]['+t+"]"}function X0(t){return tt({},t,{"data-precedence":t.precedence,precedence:null})}function ry(t,l,e,a){if(l=t.querySelector('link[rel="preload"][as="style"]['+l+"]")){if(l[Eu]!==!0){a.loading=1;return}}else l=t.createElement("link"),l[Eu]=!0,l.onload=l.onerror=Is.bind(null,l),hl(l,"link",e),ul(l),t.head.appendChild(l);a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2})}function yn(t){return'[src="'+Ql(t)+'"]'}function cu(t){return"script[async]"+t}function V0(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var a=t.querySelector('style[data-href~="'+Ql(e.href)+'"]');if(a)return l.instance=a,ul(a),a;var n=tt({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),ul(a),hl(a,"style",n),qi(a,e.precedence,t),l.instance=a;case"stylesheet":n=hn(e.href);var u=t.querySelector(iu(n));if(u)return l.state.loading|=4,l.instance=u,ul(u),u;a=X0(e),(n=$l.get(n))&&Ss(a,n),u=(t.ownerDocument||t).createElement("link"),ul(u);var i=u;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),hl(u,"link",a),l.state.loading|=4,qi(u,e.precedence,t),l.instance=u;case"script":return u=yn(e.src),(n=t.querySelector(cu(u)))?(l.instance=n,ul(n),n):(a=e,(n=$l.get(u))&&(a=tt({},e),Ns(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),ul(n),hl(n,"link",a),t.head.appendChild(n),l.instance=n);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,qi(a,e.precedence,t));return l.instance}function qi(t,l,e){for(var a=e.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 oy(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function L0(t,l){return t==="img"&&l.src!=null&&l.src!==""&&l.onLoad==null&&l.loading!=="lazy"}function K0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function J0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function k0(t,l){typeof l.decode=="function"&&(t.imgCount++,l.complete||(t.imgBytes+=J0(l),t.suspenseyImages.push(l)),t=hy.bind(t),l.decode().then(t,t))}function dy(t,l,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var n=hn(a.href),u=l.querySelector(iu(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=fu.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=u,ul(u);return}u=l.ownerDocument||l,a=X0(a),(n=$l.get(n))&&Ss(a,n),u=u.createElement("link"),ul(u);var i=u;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),hl(u,"link",a),e.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&(e.state.loading&3)===0&&(t.count++,e=fu.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Yi=0;function my(t,l){return t.stylesheets&&t.count===0&&Gi(t,t.stylesheets),0Yi?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function $0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Gi(t,t.stylesheets);else if(t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}}}function fu(){this.count--,$0(this)}function hy(){this.imgCount--,$0(this)}var wi=null;function Gi(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,wi=new Map,l.forEach(yy,t),wi=null,fu.call(t))}function yy(t,l){if(!(l.state.loading&4)){var e=wi.get(t);if(e)var a=e.get(null);else{e=new Map,wi.set(t,e);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(z){console.error(z)}}return r(),Ds.exports=Uy(),Ds.exports}var Hy=Ry();/** * @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 qy=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pm=(...r)=>r.filter((z,T,d)=>!!z&&z.trim()!==""&&d.indexOf(z)===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 By={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 Yy=Y.forwardRef(({color:r="currentColor",size:z=24,strokeWidth:T=2,absoluteStrokeWidth:d,className:C="",children:w,iconNode:M,...nt},I)=>Y.createElement("svg",{ref:I,...By,width:z,height:z,stroke:r,strokeWidth:d?Number(T)*24/Number(z):T,className:pm("lucide",C),...nt},[...M.map(([X,q])=>Y.createElement(X,q)),...Array.isArray(w)?w:[w]]));/** * @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 Et=(r,z)=>{const T=Y.forwardRef(({className:d,...C},w)=>Y.createElement(Yy,{ref:w,iconNode:z,className:pm(`lucide-${qy(r)}`,d),...C}));return T.displayName=`${r}`,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 wy=Et("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 Gy=Et("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 Sm=Et("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 Qy=Et("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 Xy=Et("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 Vy=Et("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 Zy=Et("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 Ly=Et("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 Ky=Et("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 Jy=Et("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 Nm=Et("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 ky=Et("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 $y=Et("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 Fy=Et("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 Wy=Et("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 Iy=Et("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 Py=Et("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 Tm=Et("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 zm=Et("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 ki=Et("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 tv=Et("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 lv=Et("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 ev=Et("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 av=Et("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 nv=Et("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 uv=Et("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 iv=Et("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 cv=Et("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 Em=Et("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 fv=Et("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=Et("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 rv=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function _m(r){var z,T,d="";if(typeof r=="string"||typeof r=="number")d+=r;else if(typeof r=="object")if(Array.isArray(r)){var C=r.length;for(z=0;zov(r),Wl="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 xm(r){if(!r)return"—";const z=Math.floor((Date.now()-r)/6e4);return z<1?"刚刚":z<60?`${z} 分钟前`:`${Math.floor(z/60)} 小时前`}function qs(r=[]){return{total:r.length,studyable:r.filter(z=>z.in_study!==!1).length}}function hu(r){return String(r||"").split("#").filter(Boolean)}const dv={"01":"单选","02":"多选","03":"判断","04":"问答"};function Fl(r){return r instanceof Error?r.message:String(r)}const mv={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 yu({tone:r="neutral",children:z,dot:T=!1,className:d}){return f.jsxs("span",{className:gl("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium ring-1 ring-inset",mv[r],d),children:[T&&f.jsx("span",{className:"size-1.5 rounded-full bg-current opacity-70"}),z]})}const hv={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",soft:"border-brand-100 bg-brand-50 text-brand-700 hover:border-brand-200 hover:bg-brand-100"},yv={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 Qt({variant:r="secondary",size:z="md",loading:T=!1,icon:d,className:C,children:w,disabled:M,type:nt="button",...I}){return f.jsxs("button",{type:nt,disabled:M||T,className:gl("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",hv[r],yv[z],C),...I,children:[T?f.jsx(Wy,{className:"size-3.5 animate-spin"}):d,w]})}function vv(r,z){var w,M;const T=z==="login"||r.status==="logging"||((w=r.run)==null?void 0:w.status)==="logging"?"logging":((M=r.run)==null?void 0:M.status)||r.status||"idle",C={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:C.label,tone:C.tone,pulse:!!C.pulse}}function gv({account:r,course:z,disabled:T,onToggle:d}){var w;const C=(w=r.selected)==null?void 0:w.includes(z.plan_id);return f.jsxs("label",{className:gl("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:[f.jsx("input",{type:"checkbox",className:"mt-0.5 size-3.5 shrink-0 accent-brand-500",checked:!!C,disabled:T,onChange:M=>d(z.plan_id,M.target.checked)}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12.5px] font-medium text-slate-700",children:z.name||z.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[11px] text-slate-400",children:[z.section,z.status_label,z.info].filter(Boolean).join(" · ")||"—"})]}),f.jsx("span",{className:"shrink-0 pt-0.5 text-[11px] tabular-nums text-slate-500",children:z.progress||""})]})}function bv({account:r,platformLabel:z,pending:T,openLog:d,logLines:C,onToggleLog:w,onLogin:M,onRefresh:nt,onStudy:I,onStop:X,onCapture:q,onStopCapture:S,onQuiz:A,onDelete:ct,onToggleCourse:wt,onSelectAll:$,onClearSelection:U,onToggleOption:ht}){var pt,G,ut,rt,Bt,o,N,Q,Z,ot,yt,dt,K,g,B,O;const[et,Nt]=Y.useState(!1),Ft=Y.useRef(null),Ct=Y.useRef(null),Ht=Y.useRef(!0);Y.useEffect(()=>{if(!et)return;const j=P=>{var L;(L=Ft.current)!=null&&L.contains(P.target)||Nt(!1)};return document.addEventListener("pointerdown",j),()=>document.removeEventListener("pointerdown",j)},[et]),Y.useEffect(()=>{const j=Ct.current;j&&Ht.current&&(j.scrollTop=j.scrollHeight)},[C,d]);const tt=vv(r,T),D=!!T||r.status==="logging"||((pt=r.run)==null?void 0:pt.status)==="logging",jt=r.courses||[],_t=jt.filter(j=>j.in_study!==!1),Tt=jt.filter(j=>j.in_study===!1),qt=qs(jt),Kt=((G=r.run)==null?void 0:G.done)||0,al=((ut=r.run)==null?void 0:ut.total)||0,At=al?Math.round(Kt/al*100):0,R=["discovering","studying"].includes(((rt=r.run)==null?void 0:rt.status)||""),F=((Bt=r.selected)==null?void 0:Bt.length)||0,lt=F>0&&(((o=r.cookies)==null?void 0:o.length)||0)>0;return f.jsxs("article",{"data-id":r.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:[f.jsxs("header",{className:"flex items-start gap-3 px-4 pt-4",children:[f.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:[(r.user||r.username||"?").slice(0,1).toUpperCase(),f.jsx("span",{className:gl("absolute -bottom-0.5 -right-0.5 size-3 rounded-full border-2 border-white",tt.tone==="success"?"bg-emerald-500":tt.tone==="danger"?"bg-red-500":tt.tone==="running"?"bg-sky-500":tt.tone==="warning"?"bg-amber-500":"bg-slate-300",tt.pulse&&"animate-pulse")})]}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h2",{className:"truncate text-[13.5px] font-semibold text-slate-900",children:r.user||r.username}),f.jsx(yu,{tone:tt.tone,dot:!0,children:tt.label})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"truncate",children:r.username}),r.note&&f.jsxs("span",{className:"truncate",children:["· ",r.note]}),f.jsxs("span",{children:["· ",xm(r.updated||r.loginAt)]})]})]}),f.jsx(yu,{tone:"brand",className:"mt-0.5 shrink-0",children:z})]}),f.jsxs("div",{className:"px-4 pt-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"text-[11.5px] text-slate-500",children:["共 ",f.jsx("b",{className:"font-semibold text-slate-700",children:qt.total})," 门 · 可学"," ",f.jsx("b",{className:"font-semibold text-slate-700",children:qt.studyable}),Tt.length>0&&f.jsxs("span",{className:"text-slate-400",children:[" · 已完成 ",Tt.length]})]}),_t.length>0&&f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{type:"button",disabled:D,className:"rounded px-1.5 py-0.5 text-[11px] text-brand-600 transition hover:bg-brand-50 disabled:opacity-40",onClick:$,children:"全选"}),f.jsx("button",{type:"button",disabled:D||F===0,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100 disabled:opacity-40",onClick:U,children:"清空"})]})]}),f.jsx("div",{className:"scrollbar-thin mt-1.5 max-h-[196px] min-h-[70px] overflow-y-auto pr-0.5",children:jt.length===0?f.jsx("div",{className:"grid min-h-[70px] place-items-center rounded-lg border border-dashed border-line text-[12px] text-slate-400",children:"还没有课程,先登录或刷新课程"}):f.jsxs(f.Fragment,{children:[_t.map(j=>f.jsx(gv,{account:r,course:j,disabled:D,onToggle:wt},j.plan_id)),Tt.length>0&&f.jsx("div",{className:"mt-1 border-t border-dashed border-line pt-1",children:Tt.map(j=>f.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg px-2 py-1.5 text-slate-400",children:[f.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:"✓"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12px]",children:j.name||j.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[10.5px] opacity-80",children:[j.section,j.info].filter(Boolean).join(" · ")})]}),f.jsx("span",{className:"shrink-0 text-[10.5px]",children:j.status_label||"已结束"})]},j.plan_id))})]})})]}),f.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:[f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optQuiz===!0,disabled:D,onChange:j=>ht("quiz",j.target.checked)}),"自动交测验"]}),f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optFeedback!==!1,disabled:D,onChange:j=>ht("feedback",j.target.checked)}),"自动交反馈表"]}),f.jsx("div",{className:"flex-1"}),f.jsx("span",{className:"text-[11px] tabular-nums text-slate-400",children:F>0?`已选 ${F} 门`:"未选择课程"})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-line/70 px-4 py-2.5",children:[f.jsx(Qt,{size:"sm",variant:"soft",loading:T==="login"||r.status==="logging"||((N=r.run)==null?void 0:N.status)==="logging",disabled:D,icon:f.jsx(Iy,{className:"size-3.5"}),onClick:M,children:(Q=r.cookies)!=null&&Q.length?"重新登录":"登录"}),f.jsx(Qt,{size:"sm",loading:T==="refresh",disabled:D||!((Z=r.cookies)!=null&&Z.length),icon:f.jsx(ki,{className:"size-3.5"}),onClick:nt,children:"刷新课程"}),f.jsx(Qt,{size:"sm",variant:"primary",loading:T==="study",disabled:D||!lt,icon:f.jsx(Py,{className:"size-3.5"}),onClick:I,children:"开始学习"}),f.jsx("div",{className:"flex-1"}),R&&f.jsx(Qt,{size:"icon",variant:"danger",loading:T==="stop",onClick:X,title:"停止学习","aria-label":"停止学习",children:f.jsx(Vy,{className:"size-4"})}),f.jsxs("div",{className:"relative",ref:Ft,children:[f.jsx(Qt,{size:"icon",variant:"ghost",onClick:()=>Nt(j=>!j),"aria-label":"更多操作",title:"更多操作",children:f.jsx(Ky,{className:"size-4"})}),et&&f.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:Fy,action:w},{label:"打开测验",icon:Zy,action:A},(ot=r.run)!=null&&ot.capturing?{label:"停止抓包",icon:iv,action:S}:{label:"抓包 10 分钟",icon:fv,action:q},{label:"删除账号",icon:cv,action:ct,danger:!0}].map(j=>f.jsxs("button",{type:"button",className:gl("flex w-full items-center gap-2 px-3 py-2 text-left text-[12px] transition hover:bg-slate-50",j.danger?"text-red-600":"text-slate-700"),onClick:()=>{Nt(!1),j.action()},children:[f.jsx(j.icon,{className:"size-3.5 opacity-70"}),j.label]},j.label))})]})]}),(al>0||((yt=r.run)==null?void 0:yt.error))&&f.jsxs("div",{className:"border-t border-line/70 px-4 py-3",children:[f.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-2 text-[11px] text-slate-500",children:[f.jsx("span",{className:"truncate",children:((dt=r.run)==null?void 0:dt.course)||((K=r.run)==null?void 0:K.status)||"学习进度"}),f.jsxs("span",{className:"shrink-0 tabular-nums",children:[Kt," / ",al,al>0&&f.jsxs("span",{className:"ml-1 text-slate-400",children:["(",At,"%)"]})]})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-slate-100",children:f.jsx("div",{className:gl("h-full rounded-full transition-all duration-500",((g=r.run)==null?void 0:g.status)==="error"?"bg-red-500":((B=r.run)==null?void 0:B.status)==="finished"?"bg-emerald-500":"bg-gradient-to-r from-brand-500 to-sky-400"),style:{width:`${Math.min(100,At)}%`}})}),((O=r.run)==null?void 0:O.error)&&f.jsx("p",{className:"mt-2 rounded-lg bg-red-50 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:r.run.error})]}),r.lastError&&f.jsx("div",{className:"border-t border-line/70 px-4 py-2.5",children:f.jsxs("p",{className:"rounded-lg bg-red-50/80 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:[r.lastError,r.lastErrorAt?f.jsxs("span",{className:"ml-1 text-red-400",children:["· ",xm(r.lastErrorAt)]}):null]})}),f.jsxs("div",{className:gl("border-t border-line/70",d?"block":"hidden"),children:[f.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"font-medium text-slate-500",children:"课程日志"}),f.jsxs("span",{className:"tabular-nums",children:["(",C.length,")"]}),f.jsx("div",{className:"flex-1"}),f.jsx("button",{type:"button",onClick:w,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100",children:"收起"})]}),f.jsx("pre",{ref:Ct,onScroll:j=>{const P=j.currentTarget;Ht.current=P.scrollHeight-P.scrollTop-P.clientHeight<24},className:gl("scrollbar-thin mx-4 mb-3 mt-2 max-h-56 overflow-auto rounded-lg bg-slate-950/95 p-3","font-mono text-[11px] leading-relaxed text-slate-300",C.length===0&&"text-slate-500"),children:C.length?C.join(` `):"暂无日志 · 开始学习后这里会实时显示"})]}),f.jsxs("button",{type:"button",onClick:w,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":d,children:[f.jsx(Sm,{className:gl("size-3 transition-transform",d&&"rotate-180")}),d?"收起课程日志":"展开课程日志"]})]})}const xv={md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-6xl"};function vu({open:r,onClose:z,title:T,subtitle:d,size:C="md",footer:w,children:M,bodyClassName:nt}){return Y.useEffect(()=>{if(!r)return;const I=q=>{q.key==="Escape"&&z()};window.addEventListener("keydown",I);const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",I),document.body.style.overflow=X}},[r,z]),r?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-[2px]",onClick:z}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:gl("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",xv[C]),children:[f.jsxs("header",{className:"flex items-start gap-3 border-b border-line px-5 py-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h2",{className:"truncate text-[15px] font-semibold text-slate-900",children:T}),d&&f.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:d})]}),f.jsx("button",{type:"button",onClick:z,className:"-mr-1 rounded-lg p-1.5 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"关闭",children:f.jsx(rv,{className:"size-4"})})]}),f.jsx("div",{className:gl("min-h-0 flex-1 overflow-auto px-5 py-4",nt),children:M}),w&&f.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:w})]})]}):null}function pv({open:r,platforms:z,onClose:T,onSubmit:d}){var ht;const[C,w]=Y.useState(""),[M,nt]=Y.useState(""),[I,X]=Y.useState(""),[q,S]=Y.useState(((ht=z[0])==null?void 0:ht.id)||"guanyixue"),[A,ct]=Y.useState(!1),[wt,$]=Y.useState("");Y.useEffect(()=>{var et;r&&(w(""),nt(""),X(""),S(((et=z[0])==null?void 0:et.id)||"guanyixue"),$(""),ct(!1))},[r,z]);async function U(){if(!C.trim()||!M){$("请填写账号和密码");return}ct(!0),$("");try{await d({username:C.trim(),password:M,note:I.trim(),platform:q}),T()}catch(et){$(et instanceof Error?et.message:String(et))}finally{ct(!1)}}return f.jsx(vu,{open:r,onClose:T,title:"添加账号",subtitle:"账号密码保存在本机 SQLite,用于会话失效时自动重新登录",footer:f.jsxs(f.Fragment,{children:[f.jsx(Qt,{onClick:T,disabled:A,children:"取消"}),f.jsx(Qt,{variant:"primary",loading:A,onClick:U,children:"保存并登录"})]}),children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"学习平台"}),f.jsxs("div",{className:"relative",children:[f.jsx(Nm,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("select",{className:`${Wl} appearance-none pl-8 pr-8`,value:q,onChange:et=>S(et.target.value),children:z.map(et=>f.jsx("option",{value:et.id,children:et.label},et.id))}),f.jsx(Sm,{className:"pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"})]}),f.jsx("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-400",children:"选「莞易学」后,后台会自动识别旧版 / 新版课程页并按对应实现学习;后续新增的平台会出现在这里。"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"登录账号"}),f.jsx("input",{className:Wl,value:C,autoFocus:!0,placeholder:"手机号 / 身份证号 / 教师账号",onChange:et=>w(et.target.value),onKeyDown:et=>et.key==="Enter"&&U()})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"密码"}),f.jsx("input",{className:Wl,type:"password",value:M,autoComplete:"off",placeholder:"平台登录密码",onChange:et=>nt(et.target.value),onKeyDown:et=>et.key==="Enter"&&U()})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:["备注 ",f.jsx("span",{className:"font-normal text-slate-400",children:"(可选)"})]}),f.jsx("input",{className:Wl,value:I,placeholder:"例如:张三 · 语文",onChange:et=>X(et.target.value)})]}),f.jsx("p",{className:"rounded-lg border border-line bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:"保存后会自动尝试登录一次。若密码错误或需要验证码,卡片上会保留「登录」按钮,可手动重试。"}),wt&&f.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:wt})]})})}class Me extends Error{constructor(T,d={}){super(T);Ji(this,"offline",!1);Ji(this,"status");Ji(this,"code");this.name="ApiError",Object.assign(this,d)}}async function Zt(r,z={}){let T;try{T=await fetch(r,{...z,headers:{"Content-Type":"application/json",...z.headers||{}}})}catch{throw new Me("后端未连接",{offline:!0})}if(T.status===401)throw new Me("需要访问令牌:请用 /?token= 打开一次",{status:401});if(!T.ok)throw new Me(`HTTP ${T.status}`,{status:T.status});return await T.json()}async function Sv(r,z,T){let d;try{d=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})}catch{throw new Me("后端未连接",{offline:!0})}if(d.status===401)throw new Me("需要访问令牌:请用 /?token= 打开一次");if(!d.ok)throw new Me(`HTTP ${d.status}`);if(!d.body)throw new Me("浏览器不支持流式响应");const C=d.body.getReader(),w=new TextDecoder;let M="";for(;;){const{value:nt,done:I}=await C.read();if(I)break;M+=w.decode(nt,{stream:!0});const X=M.split(` `);M=X.pop()||"";for(const q of X){const S=q.trim();if(S.startsWith("data:"))try{T(JSON.parse(S.slice(5).trim()))}catch{}}}}function Nv({open:r,onClose:z,notify:T,onChanged:d}){const[C,w]=Y.useState([]),[M,nt]=Y.useState(""),[I,X]=Y.useState(!1),q=Y.useCallback(async()=>{X(!0);try{const A=await Zt("/api/plugins");w(A.plugins||[])}catch(A){T({message:Fl(A),tone:"error"})}finally{X(!1)}},[T]);Y.useEffect(()=>{r&&q()},[r,q]);async function S(A,ct,wt){nt(A);try{const $=await Zt(ct,{method:"POST"});$.plugins&&w($.plugins),$.ok===!1?T({message:$.error||"插件操作失败",tone:"error"}):(T({message:wt,tone:"success"}),d())}catch($){T({message:Fl($),tone:"error"})}finally{nt("")}}return f.jsx(vu,{open:r,onClose:z,title:"插件管理",subtitle:"pugins/<名字>/ 下的平台插件:启停立即生效,改完代码重载即可,不用重启服务",size:"lg",footer:f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",C.length," 个 · 停用后该平台会从「添加账号」的平台下拉里消失"]}),f.jsx(Qt,{variant:"soft",size:"sm",icon:f.jsx(ki,{className:"size-3.5"}),loading:M==="*",onClick:()=>void S("*","/api/plugins/reload","全部插件已重载"),children:"全部重载"})]}),children:f.jsxs("div",{className:"space-y-2.5",children:[C.map(A=>f.jsxs("div",{className:"rounded-xl border border-line bg-slate-50/70 px-3.5 py-3",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(zm,{className:"size-4 shrink-0 text-brand-600"}),f.jsx("span",{className:"text-[13px] font-semibold text-slate-900",children:A.title||A.name}),f.jsx("span",{className:"text-[11px] text-slate-400",children:A.name}),f.jsx(yu,{tone:A.enabled?"success":"neutral",dot:!0,children:A.enabled?"已启用":"已停用"}),A.enabled&&f.jsx(yu,{tone:A.loaded?"brand":"warning",children:A.loaded?"已加载":"未加载"})]}),f.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-slate-500",children:[f.jsxs("span",{children:["平台 ",A.label||"—"]}),f.jsxs("span",{children:["id ",A.id||"—"]}),f.jsxs("span",{children:["能力 ",A.capabilities.length?A.capabilities.join(" / "):"无"]})]}),f.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[f.jsx(Qt,{size:"sm",variant:A.enabled?"secondary":"primary",loading:M===A.name,onClick:()=>void S(A.name,`/api/plugins/${A.name}/${A.enabled?"disable":"enable"}`,A.enabled?`${A.name} 已停用`:`${A.name} 已启用`),children:A.enabled?"停用":"启用"}),f.jsx(Qt,{size:"sm",variant:"ghost",disabled:!A.enabled,loading:M===A.name,onClick:()=>void S(A.name,`/api/plugins/${A.name}/reload`,`${A.name} 已重载`),children:"重载"})]})]},A.name)),!C.length&&!I&&f.jsx("p",{className:"py-8 text-center text-[12.5px] text-slate-400",children:"pugins/ 下还没有插件。建一个含 pugin.json + main.py 的目录丢进去,刷新即可看到。"})]})})}function Tv(r){const z=String((r==null?void 0:r.text)||"").replace(/\s+/g," ").trim();return z.length>24?`${z.slice(0,24)}…`:z}function zv({open:r,account:z,course:T,onClose:d,notify:C,onSubmitted:w}){const[M,nt]=Y.useState(null),[I,X]=Y.useState({}),[q,S]=Y.useState(!1),[A,ct]=Y.useState(!1),[wt,$]=Y.useState(!1),[U,ht]=Y.useState(!1),[et,Nt]=Y.useState(""),[Ft,Ct]=Y.useState("info"),Ht=Y.useRef(0);async function tt(G=!1){if(!z||!T)return!1;S(!0),Nt(G?"正在生成新答卷…":"取题中…"),Ct("info");try{const ut={cookies:z.cookies,platform:z.platform||"guanyixue",plan_id:T.plan_id,project_id:T.project_id,name:T.name||""};G&&(ut.retake=!0,ut.period_id=(M==null?void 0:M.period_id)||"");const rt=await Zt("/api/quiz",{method:"POST",body:JSON.stringify(ut)});if(!rt.ok)return nt(null),Nt(rt.error||"取题失败"),Ct("error"),!1;nt(rt),X(Object.fromEntries((rt.questions||[]).map(o=>[o.no,o.picked||""])));const Bt=[];if(rt.done){const o=rt.surplus_exam_count;o!=null?Bt.push(`剩 ${o} 次`):rt.allow_exam_count&&Bt.push(`共 ${rt.allow_exam_count} 次`),rt.show_answers?Bt.push("已显示标准答案"):rt.exam_after_watch_answer==="0"&&Bt.push("本测验不开放答案"),Nt(`已交卷${Bt.length?` · ${Bt.join(" · ")}`:""}`),Ct("success")}else Nt(rt.started?"已自动创建答卷(限时考试已开始计时)":""),Ct("info");return!0}catch(ut){return Nt(ut instanceof Error?ut.message:"取题失败"),Ct("error"),!1}finally{S(!1)}}if(Y.useEffect(()=>{!r||!z||!T||(nt(null),X({}),ht(!1),tt(!1))},[r,z==null?void 0:z.id,T==null?void 0:T.plan_id]),!z||!T)return null;const D=(M==null?void 0:M.questions)||[],jt=!!(M!=null&&M.done),_t=!!(M!=null&&M.show_answers),Tt=!!(M!=null&&M.can_retake),qt=M==null?void 0:M.surplus_exam_count,Kt=jt||q||A||U;function al(G,ut){X(rt=>({...rt,[G]:ut}))}function At(G,ut,rt){X(Bt=>{const o=hu(Bt[G]),N=rt?[...o,ut]:o.filter(Q=>Q!==ut);return N.sort(),{...Bt,[G]:N.join("#")}})}async function R(){if(!M||!z)return;const G=D.filter(ut=>!I[ut.no]).length;if(!(G&&!window.confirm(`还有 ${G} 题没作答,确定提交?`))){ct(!0),Nt("提交中…"),Ct("info");try{const ut=await Zt("/api/quiz/submit",{method:"POST",body:JSON.stringify({cookies:z.cookies,plan_id:M.plan_id,object_id:M.object_id,generation:M.generation||"legacy",result_id:M.result_id||"",answers:I})});if(!ut.ok){ut.code==="already_finished"&&await tt(),Nt(ut.error||"提交失败"),Ct("error");return}C({message:`测验已提交${ut.score?`,得分 ${ut.score}`:""}`,tone:"success"}),await tt(),w()}catch(ut){Nt(ut instanceof Error?ut.message:"提交失败"),Ct("error")}finally{ct(!1)}}}async function F(){if(!M)return;if(!M.can_retake){C({message:"没有剩余考试机会",tone:"error"});return}const G=qt!=null?`(剩余 ${qt} 次)`:"";if(window.confirm(`再考一次会消耗 1 次机会${G};限时考试会立即开始计时,确定?`)){$(!0);try{await tt(!0)&&C({message:"已生成新答卷,可以重新答题了",tone:"success"})}finally{$(!1)}}}async function lt(){if(!M||!z)return;if(M.done){C({message:"已交卷,点「再考一次」生成新答卷后再 AI 答题",tone:"error"});return}ht(!0),Ht.current=0;const G=Date.now();let ut=0,rt="";const Bt=window.setInterval(()=>{Nt(`AI 答题中… ${Math.round((Date.now()-G)/1e3)}s · 已填 ${Ht.current}/${D.length} 题`),Ct("info")},1e3);Nt(`AI 答题中… 已填 0/${D.length} 题`);try{await Sv("/api/quiz/answer",{questions:M.questions,account_id:z.id},o=>{const N=o.answers;if(N&&typeof N=="object"){const Q=Object.keys(N).length;Q&&(Ht.current+=Q,X(Z=>({...Z,...N})))}o.error&&(rt=String(o.error)),o.done&&typeof o.failed=="number"&&(ut=o.failed)}),Ht.current?ut?(Nt(`AI 已填 ${Ht.current} 题,${ut} 题失败${rt?`:${rt}`:""}`),Ct("error")):(Nt(`AI 已填 ${Ht.current} 题`),Ct("success")):(Nt(rt?`AI 答题失败:${rt}`:"AI 没有返回答案"),Ct("error"))}catch(o){Nt(o instanceof Error?o.message:"AI 答题失败"),Ct("error")}finally{window.clearInterval(Bt),ht(!1)}}const pt=Tt?`再考一次${qt!=null?`(剩 ${qt} 次)`:""}`:qt===0?"考试机会已用完":"再考一次";return f.jsx(vu,{open:r,onClose:d,title:`测验 · ${T.name||T.plan_id}`,subtitle:et||"取题后可手动作答,或让大模型逐批填写",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsx("span",{className:gl("mr-auto max-w-[50%] truncate text-[11.5px]",Ft==="error"?"text-red-600":Ft==="success"?"text-emerald-600":"text-slate-500"),children:et}),jt&&f.jsx(Qt,{size:"sm",loading:wt,disabled:q||!Tt,icon:f.jsx(tv,{className:"size-3.5"}),onClick:F,children:pt}),f.jsx(Qt,{size:"sm",onClick:d,children:"关闭"}),f.jsx(Qt,{size:"sm",variant:"soft",loading:U,disabled:Kt||!D.length,icon:f.jsx(Gy,{className:"size-3.5"}),onClick:lt,children:"AI 答题"}),f.jsx(Qt,{size:"sm",variant:"primary",loading:A,disabled:Kt||!D.length,icon:f.jsx(ev,{className:"size-3.5"}),onClick:R,children:"提交"})]}),children:q&&!D.length?f.jsx("div",{className:"py-16 text-center text-[13px] text-slate-400",children:"正在打开课程页取题…"}):D.length?f.jsx("div",{className:"space-y-2.5",children:D.map(G=>{const ut=G.options||[],rt=I[G.no]||"",Bt=G.type==="02",o=ut.length>0;return f.jsxs("div",{className:"rounded-xl border border-line px-3.5 py-3",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.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:G.no}),f.jsx(yu,{tone:"neutral",className:"mt-0.5 shrink-0",children:dv[G.type||""]||"题目"}),f.jsx("p",{className:"min-w-0 flex-1 text-[13px] leading-relaxed text-slate-800",children:G.title||`第 ${G.no} 题`}),_t&&G.is_correct!==void 0&&f.jsx("span",{className:gl("shrink-0 text-[12px] font-semibold",G.is_correct?"text-emerald-600":"text-red-500"),children:G.is_correct?"✓":"✗"})]}),o&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5 pl-7",children:ut.map(N=>{const Q=_t&&hu(G.correct).includes(N.key),Z=_t&&hu(G.picked).includes(N.key)&&!hu(G.correct).includes(N.key);return f.jsxs("span",{className:gl("max-w-full rounded-lg border px-2 py-1 text-[11.5px] leading-snug",Q?"border-emerald-200 bg-emerald-50 text-emerald-800":Z?"border-red-200 bg-red-50 text-red-700":"border-line bg-slate-50/70 text-slate-600"),children:[f.jsx("b",{className:"mr-1 font-semibold",children:N.key}),Tv(N)]},N.key)})}),f.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-2 pl-7",children:[Bt?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:ut.map(N=>{const Q=hu(rt);return f.jsxs("label",{title:`${N.key}. ${N.text||""}`,className:gl("flex cursor-pointer items-center gap-1 rounded-lg border px-2 py-1 text-[11.5px] transition",Q.includes(N.key)?"border-brand-300 bg-brand-50 text-brand-700":"border-line text-slate-600 hover:border-slate-300",Kt&&"pointer-events-none opacity-60"),children:[f.jsx("input",{type:"checkbox",className:"size-3 accent-brand-500",checked:Q.includes(N.key),disabled:Kt,onChange:Z=>At(G.no,N.key,Z.target.checked)}),N.key]},N.key)})}):o?f.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:rt,disabled:Kt,onChange:N=>al(G.no,N.target.value),children:[f.jsx("option",{value:"",children:"未选"}),ut.map(N=>f.jsxs("option",{value:N.key,children:[N.key,". ",N.text||""]},N.key))]}):f.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:rt,placeholder:"填写答案",disabled:Kt,onChange:N=>al(G.no,N.target.value)}),_t&&G.correct&&f.jsxs("span",{className:"text-[11.5px] text-slate-500",children:["标准答案:",f.jsx("b",{className:"font-semibold text-slate-700",children:G.correct})]})]}),_t&&G.analysis&&f.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:["解析:",G.analysis]})]},G.no)})}):f.jsx("div",{className:"py-16 text-center text-[13px] text-red-600",children:et||"没有题目"})})}function Ev({open:r,onClose:z,notify:T}){const[d,C]=Y.useState(!1),[w,M]=Y.useState(!1),[nt,I]=Y.useState(!1),[X,q]=Y.useState({base_url:"",api_key:"",model:"",temperature:"0.2",timeout:"120",prompt:"",study_mode:"fast",study_parallel:"2"}),[S,A]=Y.useState("sk-...");Y.useEffect(()=>{r&&(C(!0),Zt("/api/settings").then(U=>{const ht=U.llm||{},et=U.study||{};q({base_url:ht.base_url||"",api_key:"",model:ht.model||"",temperature:String(ht.temperature??.2),timeout:String(ht.timeout??120),prompt:ht.prompt||"",study_mode:et.mode||"fast",study_parallel:String(et.parallel||2)}),A(ht.has_key?`已保存 ${ht.key_hint||""},留空不修改`:"sk-...")}).catch(U=>T({message:`读取设置失败:${U.message}`,tone:"error"})).finally(()=>C(!1)))},[r,T]);function ct(U,ht){q(et=>({...et,[U]:ht}))}async function wt(){M(!0);try{await Zt("/api/settings",{method:"POST",body:JSON.stringify({base_url:X.base_url.trim(),api_key:X.api_key.trim(),model:X.model.trim(),temperature:Number.parseFloat(X.temperature)||.2,timeout:Number.parseInt(X.timeout,10)||120,prompt:X.prompt,study_mode:X.study_mode,study_parallel:Number.parseInt(X.study_parallel,10)||0})}),T({message:"设置已保存",tone:"success"}),z()}catch(U){T({message:`保存失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{M(!1)}}async function $(){I(!0);try{const U=await Zt("/api/llm/test",{method:"POST",body:JSON.stringify({base_url:X.base_url.trim(),api_key:X.api_key.trim(),model:X.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{I(!1)}}return f.jsx(vu,{open:r,onClose:z,title:"系统设置",subtitle:"大模型接口、答题提示词与学习模式",size:"lg",footer:f.jsxs(f.Fragment,{children:[f.jsx(Qt,{loading:nt,onClick:$,icon:f.jsx(Ly,{className:"size-3.5"}),children:"测试连接"}),f.jsx(Qt,{onClick:z,disabled:w,children:"取消"}),f.jsx(Qt,{variant:"primary",loading:w,onClick:wt,disabled:d,children:"保存"})]}),children:d?f.jsx("div",{className:"py-10 text-center text-[12.5px] text-slate-400",children:"读取设置…"}):f.jsxs("div",{className:"space-y-6",children:[f.jsxs("section",{children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(av,{className:"size-4 text-brand-500"}),"大模型(OpenAI 兼容)"]}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["接口地址 ",f.jsx("span",{className:"text-slate-400",children:"(写到 /v1 为止)"})]}),f.jsx("input",{className:Wl,value:X.base_url,placeholder:"https://api.openai.com/v1",onChange:U=>ct("base_url",U.target.value)})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"API Key"}),f.jsxs("div",{className:"relative",children:[f.jsx($y,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("input",{className:`${Wl} pl-8`,type:"password",autoComplete:"off",value:X.api_key,placeholder:S,onChange:U=>ct("api_key",U.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模型"}),f.jsx("input",{className:Wl,value:X.model,placeholder:"gpt-4o-mini / deepseek-chat / qwen-plus",onChange:U=>ct("model",U.target.value)})]})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"温度"}),f.jsx("input",{className:Wl,type:"number",min:0,max:2,step:.1,value:X.temperature,onChange:U=>ct("temperature",U.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"超时(秒)"}),f.jsx("input",{className:Wl,type:"number",min:10,max:600,value:X.timeout,onChange:U=>ct("timeout",U.target.value)})]})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["答题提示词 ",f.jsx("span",{className:"text-slate-400",children:"(留空使用内置)"})]}),f.jsx("textarea",{className:`${Wl} min-h-24 resize-y`,value:X.prompt,placeholder:'只输出 JSON {"answers":{"题号":"答案"}}',onChange:U=>ct("prompt",U.target.value)})]})]})]}),f.jsxs("section",{className:"border-t border-line pt-5",children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(Jy,{className:"size-4 text-brand-500"}),"学习模式"]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模式"}),f.jsxs("select",{className:Wl,value:X.study_mode,onChange:U=>ct("study_mode",U.target.value),children:[f.jsx("option",{value:"fast",children:"快速学习(只调接口上报)"}),f.jsx("option",{value:"normal",children:"常规学习(真实播放视频)"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"常规模式并发数"}),f.jsx("input",{className:Wl,type:"number",min:1,max:5,value:X.study_parallel,onChange:U=>ct("study_parallel",U.target.value)})]})]}),f.jsxs("p",{className:"mt-3 rounded-lg bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:["常规学习会开多个无头浏览器同时播视频;平台若按课节顺序放行,会被弹回并自动降为 1 路。快速学习只调用 ",f.jsx("code",{className:"rounded bg-white px-1 ring-1 ring-line",children:"period/study/log"}),",不启动浏览器。"]})]})]})})}function _v({accounts:r}){const z=r.filter(M=>{var nt;return((nt=M.cookies)==null?void 0:nt.length)>0||["logged_in","studying"].includes(M.status||"")}).length,T=r.filter(M=>{var nt;return["discovering","studying"].includes(((nt=M.run)==null?void 0:nt.status)||"")}).length,d=r.reduce((M,nt)=>{var I;return M+(((I=nt.run)==null?void 0:I.done)||0)},0),C=r.reduce((M,nt)=>{var I;return M+(((I=nt.run)==null?void 0:I.total)||0)},0),w=[{label:"账号",value:r.length,hint:"已添加",icon:Em,tone:"text-brand-600 bg-brand-50"},{label:"已登录",value:z,hint:r.length?`共 ${r.length} 个`:"等待添加",icon:uv,tone:"text-emerald-600 bg-emerald-50"},{label:"学习中",value:T,hint:T?"正在跑课":"空闲",icon:wy,tone:"text-sky-600 bg-sky-50"},{label:"课程进度",value:C?`${d}/${C}`:"—",hint:C?`${Math.round(d/C*100)}%`:"暂无任务",icon:Nm,tone:"text-amber-600 bg-amber-50"}];return f.jsx("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:w.map(M=>f.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-line bg-white px-4 py-3",children:[f.jsx("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg ${M.tone}`,children:f.jsx(M.icon,{className:"size-4"})}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-[11px] text-slate-400",children:M.label}),f.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f.jsx("span",{className:"text-[17px] font-semibold tabular-nums leading-tight text-slate-900",children:M.value}),f.jsx("span",{className:"truncate text-[10.5px] text-slate-400",children:M.hint})]})]})]},M.label))})}function Ov({open:r,onClose:z}){const[T,d]=Y.useState([]),[C,w]=Y.useState(!1),M=Y.useRef(null),nt=Y.useRef(!0);Y.useEffect(()=>{if(!r)return;let X=!0;const q=async()=>{try{const A=await Zt("/api/log/history?key=system&tail=500");X&&d(A.lines||[])}catch{}};d([]),q();const S=window.setInterval(()=>{document.hidden||q()},2500);return()=>{X=!1,window.clearInterval(S)}},[r]),Y.useEffect(()=>{const X=M.current;X&&nt.current&&(X.scrollTop=X.scrollHeight)},[T,r]);async function I(){w(!0);try{await Zt("/api/log/history?key=system",{method:"DELETE"}),d([])}finally{w(!1)}}return f.jsx(vu,{open:r,onClose:z,title:"系统日志",subtitle:"全局事件与系统级错误,实时刷新",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",T.length," 行 · 保留最近 500 行"]}),f.jsx(Qt,{variant:"danger",size:"sm",loading:C,onClick:I,children:"清空"}),f.jsx(Qt,{size:"sm",onClick:z,children:"关闭"})]}),bodyClassName:"bg-slate-950 p-0",children:f.jsx("pre",{ref:M,onScroll:X=>{const q=X.currentTarget;nt.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-300",children:T.length?T.join(` `):"暂无系统日志"})})}function jv({toast:r}){if(!r)return null;const z=r.tone||"info",T=z==="error"?Qy:z==="success"?Xy:ky;return f.jsxs("div",{role:"status",className:gl("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",z==="error"?"bg-red-600 text-white":z==="success"?"bg-emerald-600 text-white":"bg-slate-900 text-white"),children:[f.jsx(T,{className:"size-4 shrink-0 opacity-90"}),f.jsx("span",{className:"break-words",children:r.message})]})}function Av({refreshing:r,onRefresh:z,onSettings:T,onSystemLog:d,onPlugins:C,onAdd:w}){return f.jsx("header",{className:"sticky top-0 z-30 border-b border-line/80 bg-white/85 backdrop-blur-xl",children:f.jsxs("div",{className:"mx-auto flex h-16 max-w-[1320px] items-center gap-3 px-4 sm:px-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.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:"学"}),f.jsxs("div",{className:"min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h1",{className:"truncate text-[15px] font-semibold tracking-tight text-slate-900",children:"莞易学"}),f.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:"多账号学习控制台"})]}),f.jsx("p",{className:"truncate text-[11.5px] text-slate-500",children:"东莞市教师培训平台 · 新旧版课程自动识别"})]})]}),f.jsx("div",{className:"flex-1"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(Qt,{variant:"ghost",size:"icon",onClick:z,loading:r,title:"刷新列表","aria-label":"刷新列表",children:f.jsx(ki,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:C,title:"插件管理","aria-label":"插件管理",children:f.jsx(zm,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:d,title:"系统日志","aria-label":"系统日志",children:f.jsx(lv,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:T,title:"系统设置","aria-label":"系统设置",children:f.jsx(nv,{className:"size-4"})}),f.jsx(Qt,{variant:"primary",className:"ml-1",icon:f.jsx(Tm,{className:"size-4"}),onClick:w,children:f.jsx("span",{className:"hidden sm:inline",children:"添加账号"})})]})]})})}const Om="guanyixue.inlineLogsOpen";function Mv(){try{const r=JSON.parse(localStorage.getItem(Om)||"[]");return new Set(Array.isArray(r)?r.filter(z=>typeof z=="string"):[])}catch{return new Set}}function Cv(r){try{localStorage.setItem(Om,JSON.stringify([...r]))}catch{}}function Dv(r){return{id:r.id,username:r.username,platform:r.platform||"guanyixue",note:r.note||"",user:r.user||"",cookies:r.cookies||[],courses:r.courses||[],selected:r.selected||[],status:r.status||"idle",lastError:r.lastError||"",lastErrorAt:r.lastErrorAt||0,optQuiz:r.optQuiz===!0,optFeedback:r.optFeedback!==!1,loginAt:r.loginAt||0}}function Uv(){const[r,z]=Y.useState([]),T=Y.useRef(r),[d,C]=Y.useState({guanyixue:"莞易学"}),[w,M]=Y.useState([{id:"guanyixue",label:"莞易学"}]),[nt,I]=Y.useState(!1),[X,q]=Y.useState(null),[S,A]=Y.useState({}),[ct,wt]=Y.useState(!1),[$,U]=Y.useState(null),[ht,et]=Y.useState(()=>Mv()),Nt=Y.useRef(ht),[Ft,Ct]=Y.useState({}),Ht=Y.useRef(Ft),tt=Y.useRef(void 0);Y.useEffect(()=>{T.current=r},[r]),Y.useEffect(()=>{Ht.current=Ft},[Ft]),Y.useEffect(()=>{Nt.current=ht,Cv(ht)},[ht]),Y.useEffect(()=>()=>window.clearTimeout(tt.current),[]);const D=Y.useCallback(g=>{q(g),window.clearTimeout(tt.current),tt.current=window.setTimeout(()=>q(null),3800)},[]),jt=Y.useCallback(async g=>{const B=await Zt("/api/accounts",{method:"POST",body:JSON.stringify(Dv(g))});if(B.ok===!1)throw new Error(B.error||"保存失败");return B},[]),_t=Y.useCallback(g=>{z(B=>{const j=B.some(P=>P.id===g.id)?B.map(P=>P.id===g.id?g:P):[...B,g];return T.current=j,j})},[]),Tt=Y.useCallback(async(g=!0)=>{var B;try{const[O,j]=await Promise.all([Zt("/api/runs"),Zt("/api/accounts")]),P=(j.accounts||[]).map(L=>({...L,run:O[L.id]||null})).sort((L,k)=>(L.created||0)-(k.created||0));z(P),T.current=P,I(!1);for(const L of P){const k=(B=L.run)==null?void 0:B.cookies;if(k&&k.length&&JSON.stringify(k)!==JSON.stringify(L.cookies||[])){const It={...L,cookies:k};L.cookies=k,jt(It).catch(()=>{})}}}catch(O){O instanceof Me&&O.offline?I(!0):g||D({message:`读取账号失败:${Fl(O)}`,tone:"error"})}},[D,jt]);Y.useEffect(()=>{Tt();const g=window.setInterval(()=>{document.hidden||Tt()},5e3);return()=>window.clearInterval(g)},[Tt]);const qt=Y.useCallback(async()=>{try{const B=(await Zt("/api/platforms")).platforms||[];M(B);const O={};for(const j of B)O[j.id]=j.label;C(O)}catch{}},[]);Y.useEffect(()=>{qt()},[qt]);const Kt=Y.useCallback(async g=>{var P;const B=Ht.current[g]||{lines:[],since:0,busy:!1,historyTried:!1};if(B.busy)return;const O={...B,busy:!0},j=L=>{Ht.current={...Ht.current,[g]:L},Ct(k=>({...k,[g]:L}))};j(O);try{let L=await Zt(`/api/log?key=${encodeURIComponent(g)}&since=${O.since}`);typeof L.next=="number"&&L.nextjl.id===g);if(Gl&&JSON.stringify(Gl.cookies||[])!==JSON.stringify(It)){const jl={...Gl,cookies:It};_t(jl),jt(jl).catch(()=>{})}}}catch{}finally{O.busy=!1,j(O)}},[_t,jt]);Y.useEffect(()=>{const g=window.setInterval(()=>{document.hidden||Nt.current.forEach(B=>void Kt(B))},1500);return()=>window.clearInterval(g)},[Kt]);const al=Y.useCallback((g,B)=>{const O=B===void 0?!Nt.current.has(g):B,j=new Set(Nt.current);O?j.add(g):j.delete(g),Nt.current=j,et(j),O&&Kt(g)},[Kt]);async function At(g,B,O){A(j=>({...j,[g]:B}));try{return await O()}finally{A(j=>{const P={...j};return delete P[g],P})}}async function R(g,B=!1){return At(g.id,"login",async()=>{_t({...g,status:"logging",lastError:""});try{await jt({...g,status:"logging",lastError:""});const O=await Zt("/api/login",{method:"POST",body:JSON.stringify({account_id:g.id})});if(!O.ok){const L={...g,status:"login_failed",lastError:O.error||`HTTP ${O.code||"失败"}`,lastErrorAt:Date.now(),run:null};return _t(L),await jt(L).catch(()=>{}),B||D({message:`登录失败:${L.lastError}`,tone:"error"}),!1}const j=O.courses||[],P={...g,status:"logged_in",cookies:O.cookies||[],user:O.user||g.user||"",courses:j,selected:(g.selected||[]).filter(L=>j.some(k=>k.plan_id===L)),loginAt:Date.now(),updated:Date.now(),lastError:"",lastErrorAt:0,run:null};return _t(P),await jt(P).catch(()=>{}),B||D({message:O.warn?`登录成功,但课程读取异常:${O.warn}`:`登录成功:${P.user||P.username},读到 ${qs(j).total} 门`,tone:O.warn?"info":"success"}),Tt(),!0}catch(O){const j={...g,status:"login_failed",lastError:Fl(O),lastErrorAt:Date.now()};return _t(j),await jt(j).catch(()=>{}),B||D({message:`登录失败:${j.lastError}`,tone:"error"}),O instanceof Me&&O.offline&&I(!0),!1}})}async function F(g){return At(g.id,"refresh",async()=>{var B;try{let O=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:g.cookies,platform:g.platform||"guanyixue"})});if(!O.ok&&O.code==="session_expired"){if(D({message:"会话已失效,正在自动重新登录…"}),!await R(g,!0))return;const L=T.current.find(k=>k.id===g.id);if(!L)return;O=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:L.cookies})})}if(!O.ok){D({message:`读取失败:${O.error||O.code||"未知错误"}`,tone:"error"});return}const j=T.current.find(L=>L.id===g.id)||g,P={...j,courses:O.courses||[],user:O.user||j.user,cookies:(B=O.cookies)!=null&&B.length?O.cookies:j.cookies,status:"logged_in",updated:Date.now(),lastError:"",lastErrorAt:0};_t(P),await jt(P).catch(()=>{}),D({message:`已刷新,读到 ${qs(P.courses).total} 门`,tone:"success"})}catch(O){D({message:`读取失败:${Fl(O)}`,tone:"error"})}})}async function lt(g){var j;const B=g.selected||[],O=(g.courses||[]).filter(P=>B.includes(P.plan_id)&&P.in_study!==!1);if(!O.length){D({message:"请先勾选要学习的课程",tone:"error"});return}if(!((j=g.cookies)!=null&&j.length)){D({message:"请先登录",tone:"error"});return}return At(g.id,"study",async()=>{var P,L;try{const k=await Zt("/api/study",{method:"POST",body:JSON.stringify({key:g.id,username:g.user||g.username,cookies:g.cookies,courses:O,workers:40,cap_minutes:90,enable_quiz:g.optQuiz===!0,enable_feedback:g.optFeedback!==!1})});if(!k.ok){D({message:`启动失败:${k.error||"未知错误"}`,tone:"error"});return}const It=((P=k.study)==null?void 0:P.mode)==="normal"?`常规真播 ${((L=k.study)==null?void 0:L.parallel)||1} 路并发`:"快速模式(只调接口)";D({message:`已开始 ${O.length} 门课程 · ${It}${g.optQuiz?" · 含自动答题":" · 测验需手动作答"}`,tone:"success"}),al(g.id,!0),Tt()}catch(k){D({message:`启动失败:${Fl(k)}`,tone:"error"})}})}async function pt(g){return At(g.id,"stop",async()=>{try{await Zt("/api/stop",{method:"POST",body:JSON.stringify({key:g.id})}),D({message:"已请求停止"}),Tt()}catch(B){D({message:`停止失败:${Fl(B)}`,tone:"error"})}})}async function G(g){var B;if(!((B=g.cookies)!=null&&B.length)){D({message:"请先登录",tone:"error"});return}return At(g.id,"capture",async()=>{try{const O=await Zt("/api/capture",{method:"POST",body:JSON.stringify({key:g.id,cookies:g.cookies,minutes:10})});if(!O.ok){D({message:`抓包失败:${O.error||"未知错误"}`,tone:"error"});return}D({message:"已打开浏览器,请手动走一遍课程页;最多记录 10 分钟",tone:"success"})}catch(O){D({message:`抓包失败:${Fl(O)}`,tone:"error"})}})}async function ut(g){return At(g.id,"capture",async()=>{try{await Zt("/api/capture/stop",{method:"POST",body:JSON.stringify({key:g.id})}),D({message:"已请求停止抓包"}),Tt()}catch(B){D({message:`停止抓包失败:${Fl(B)}`,tone:"error"})}})}async function rt(g){if(window.confirm(`删除账号「${g.user||g.username}」?课程缓存和日志不会自动清理。`))try{await Zt(`/api/accounts/${encodeURIComponent(g.id)}`,{method:"DELETE"}),z(B=>{const O=B.filter(j=>j.id!==g.id);return T.current=O,O}),D({message:"账号已删除"})}catch(B){D({message:`删除失败:${Fl(B)}`,tone:"error"})}}async function Bt(g,B){const O={...g,selected:B};_t(O);try{await jt(O)}catch(j){D({message:`保存勾选失败:${Fl(j)}`,tone:"error"})}}function o(g,B,O){const j=g.selected||[];Bt(g,O?[...new Set([...j,B])]:j.filter(P=>P!==B))}function N(g){const B=(g.courses||[]).filter(O=>O.in_study!==!1).map(O=>O.plan_id);Bt(g,[...new Set([...g.selected||[],...B])])}async function Q(g,B,O){const j=B==="quiz"?{...g,optQuiz:O}:{...g,optFeedback:O};_t(j);try{await jt(j),D({message:B==="quiz"?O?"已开启自动交测验(注意正确率)":"已关闭自动交测验":O?"已开启自动交反馈表":"已关闭自动交反馈表"})}catch(P){D({message:`保存失败:${Fl(P)}`,tone:"error"})}}async function Z(g){const B=await Zt("/api/accounts",{method:"POST",body:JSON.stringify({username:g.username,platform:g.platform,password:g.password,note:g.note,cookies:[],courses:[],selected:[],status:"idle",created:Date.now()})});if(B.ok===!1)throw new Error(B.error||"保存失败");const O=await Zt("/api/accounts"),j=B.account||(O.accounts||[]).find(k=>k.username===g.username);if(!j){D({message:"已保存,但列表里没有找到新账号,请刷新页面",tone:"error"}),await Tt();return}D({message:"已保存,正在尝试首次登录…"});const P=await R(j,!0),L=T.current.find(k=>k.id===j.id);D(P?{message:`登录成功:${(L==null?void 0:L.user)||g.username}`,tone:"success"}:{message:`登录失败:${(L==null?void 0:L.lastError)||"未知原因"}(请手动点击「登录」重试)`,tone:"error"}),await Tt()}async function ot(){wt(!0);try{await Tt(!1)}finally{wt(!1)}}function yt(g){var O;const B=g.platform||((O=(g.courses||[]).find(j=>j.platform))==null?void 0:O.platform);return B&&d[B]||"莞易学"}const dt=($==null?void 0:$.type)==="quiz"&&r.find(g=>g.id===$.accountId)||null,K=($==null?void 0:$.type)==="quiz"?(dt==null?void 0:dt.courses.find(g=>g.plan_id===$.course.plan_id))||$.course:null;return f.jsxs("div",{className:"min-h-screen",children:[f.jsx(Av,{refreshing:ct,onRefresh:()=>void ot(),onSettings:()=>U({type:"settings"}),onSystemLog:()=>U({type:"system"}),onPlugins:()=>U({type:"plugins"}),onAdd:()=>U({type:"add"})}),f.jsxs("main",{className:"mx-auto max-w-[1320px] px-4 pb-16 pt-5 sm:px-6",children:[nt&&f.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:[f.jsx(sv,{className:"size-4 shrink-0"}),f.jsx("span",{className:"font-medium",children:"后端未连接"}),f.jsx("span",{className:"text-red-500",children:"页面显示的是上一次数据,请确认服务已启动、端口没有变化。"}),f.jsx("div",{className:"flex-1"}),f.jsx(Qt,{size:"sm",variant:"secondary",loading:ct,onClick:()=>void ot(),children:"重试"})]}),f.jsx(_v,{accounts:r}),f.jsxs("div",{className:"mb-3 mt-6 flex items-end justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-[14px] font-semibold text-slate-900",children:"账号列表"}),f.jsx("p",{className:"mt-0.5 text-[11.5px] text-slate-400",children:"新旧版课程自动识别为「莞易学」,每 5 秒自动刷新状态"})]}),r.length>0&&f.jsx(Qt,{size:"sm",variant:"secondary",icon:f.jsx(ki,{className:"size-3.5"}),loading:ct,onClick:()=>void ot(),children:"刷新"})]}),r.length===0?f.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:[f.jsx("div",{className:"grid size-12 place-items-center rounded-2xl bg-brand-50 text-brand-600",children:f.jsx(Em,{className:"size-6"})}),f.jsx("h3",{className:"mt-4 text-[14px] font-semibold text-slate-800",children:"还没有账号"}),f.jsx("p",{className:"mt-1.5 max-w-md text-[12.5px] leading-relaxed text-slate-500",children:"添加东莞市教师培训平台账号后,可自动读取课程、勾选学习、提交反馈表与测验。 新旧版课程页会统一识别为「莞易学」。"}),f.jsx(Qt,{variant:"primary",className:"mt-5",icon:f.jsx(Tm,{className:"size-4"}),onClick:()=>U({type:"add"}),children:"添加第一个账号"})]}):f.jsx("div",{className:"grid items-start gap-4 md:grid-cols-2 xl:grid-cols-3",children:r.map(g=>{var B;return f.jsx(bv,{account:g,platformLabel:yt(g),pending:S[g.id],openLog:ht.has(g.id),logLines:((B=Ft[g.id])==null?void 0:B.lines)||[],onToggleLog:()=>al(g.id),onLogin:()=>void R(g),onRefresh:()=>void F(g),onStudy:()=>void lt(g),onStop:()=>void pt(g),onCapture:()=>void G(g),onStopCapture:()=>void ut(g),onDelete:()=>void rt(g),onQuiz:()=>{var P;const O=(g.courses||[]).filter(L=>L.in_study!==!1),j=O.find(L=>{var k;return(k=g.selected)==null?void 0:k.includes(L.plan_id)})||O[0];if(!j){D({message:"这门课还没有课程数据,先点「刷新课程」",tone:"error"});return}if(!((P=g.cookies)!=null&&P.length)){D({message:"请先登录",tone:"error"});return}U({type:"quiz",accountId:g.id,course:j})},onToggleCourse:(O,j)=>o(g,O,j),onSelectAll:()=>N(g),onClearSelection:()=>void Bt(g,[]),onToggleOption:(O,j)=>void Q(g,O,j)},g.id)})})]}),f.jsx("footer",{className:"border-t border-line/70 py-5 text-center text-[11px] text-slate-400",children:"莞易学 · 多账号学习控制台 · 数据保存在本机"}),f.jsx(pv,{open:($==null?void 0:$.type)==="add",platforms:w,onClose:()=>U(null),onSubmit:Z}),f.jsx(Ev,{open:($==null?void 0:$.type)==="settings",onClose:()=>U(null),notify:D}),f.jsx(Ov,{open:($==null?void 0:$.type)==="system",onClose:()=>U(null)}),f.jsx(Nv,{open:($==null?void 0:$.type)==="plugins",onClose:()=>U(null),notify:D,onChanged:()=>void qt()}),f.jsx(zv,{open:($==null?void 0:$.type)==="quiz"&&!!dt,account:dt,course:K,onClose:()=>U(null),notify:D,onSubmitted:()=>void Tt()}),f.jsx(jv,{toast:X})]})}Hy.createRoot(document.getElementById("root")).render(f.jsx(Y.StrictMode,{children:f.jsx(Uv,{})}));