(function(){const A=document.createElement("link").relList;if(A&&A.supports&&A.supports("modulepreload"))return;for(const O of document.querySelectorAll('link[rel="modulepreload"]'))d(O);new MutationObserver(O=>{for(const q of O)if(q.type==="childList")for(const al of q.addedNodes)al.tagName==="LINK"&&al.rel==="modulepreload"&&d(al)}).observe(document,{childList:!0,subtree:!0});function N(O){const q={};return O.integrity&&(q.integrity=O.integrity),O.referrerPolicy&&(q.referrerPolicy=O.referrerPolicy),O.crossOrigin==="use-credentials"?q.credentials="include":O.crossOrigin==="anonymous"?q.credentials="omit":q.credentials="same-origin",q}function d(O){if(O.ep)return;O.ep=!0;const q=N(O);fetch(O.href,q)}})();function m0(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var Ns={exports:{}},nn={};/** * @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 t0;function b1(){if(t0)return nn;t0=1;var x=Symbol.for("react.transitional.element"),A=Symbol.for("react.fragment");function N(d,O,q){var al=null;if(q!==void 0&&(al=""+q),O.key!==void 0&&(al=""+O.key),"key"in O){q={};for(var W in O)W!=="key"&&(q[W]=O[W])}else q=O;return O=q.ref,{$$typeof:x,type:d,key:al,ref:O!==void 0?O:null,props:q}}return nn.Fragment=A,nn.jsx=N,nn.jsxs=N,nn}var e0;function S1(){return e0||(e0=1,Ns.exports=b1()),Ns.exports}var s=S1(),Es={exports:{}},V={};/** * @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 a0;function x1(){if(a0)return V;a0=1;var x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),al=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),F=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),B=Symbol.iterator;function G(r){return r===null||typeof r!="object"?null:(r=B&&r[B]||r["@@iterator"],typeof r=="function"?r:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ul=Object.assign,Bl={};function nt(r,E,H){this.props=r,this.context=E,this.refs=Bl,this.updater=H||$}nt.prototype.isReactComponent={},nt.prototype.setState=function(r,E){if(typeof r!="object"&&typeof r!="function"&&r!=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,r,E,"setState")},nt.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function ke(){}ke.prototype=nt.prototype;function Bt(r,E,H){this.props=r,this.context=E,this.refs=Bl,this.updater=H||$}var Gt=Bt.prototype=new ke;Gt.constructor=Bt,ul(Gt,nt.prototype),Gt.isPureReactComponent=!0;var ct=Array.isArray;function I(){}var sl={H:null,A:null,T:null,S:null},wt=Object.prototype.hasOwnProperty;function St(r,E,H){var Y=H.ref;return{$$typeof:x,type:r,key:E,ref:Y!==void 0?Y:null,props:H}}function xt(r,E){return St(r.type,E,r.props)}function it(r){return typeof r=="object"&&r!==null&&r.$$typeof===x}function ge(r){var E={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(H){return E[H]})}var $e=/\/+/g;function Ul(r,E){return typeof r=="object"&&r!==null&&r.key!=null?ge(""+r.key):E.toString(36)}function M(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(I,I):(r.status="pending",r.then(function(E){r.status==="pending"&&(r.status="fulfilled",r.value=E)},function(E){r.status==="pending"&&(r.status="rejected",r.reason=E)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function Q(r,E,H,Y,cl){var il=typeof r;(il==="undefined"||il==="boolean")&&(r=null);var ol=!1;if(r===null)ol=!0;else switch(il){case"bigint":case"string":case"number":ol=!0;break;case"object":switch(r.$$typeof){case x:case A:ol=!0;break;case D:return ol=r._init,Q(ol(r._payload),E,H,Y,cl)}}if(ol)return cl=cl(r),ol=Y===""?"."+Ul(r,0):Y,ct(cl)?(H="",ol!=null&&(H=ol.replace($e,"$&/")+"/"),Q(cl,E,H,"",function(te){return te})):cl!=null&&(it(cl)&&(cl=xt(cl,H+(cl.key==null||r&&r.key===cl.key?"":(""+cl.key).replace($e,"$&/")+"/")+ol)),E.push(cl)),1;ol=0;var U=Y===""?".":Y+":";if(ct(r))for(var Z=0;Z>>1,dl=M[bl];if(0>>1;blO(We,X))rO(E,We)?(M[bl]=E,M[r]=X,bl=r):(M[bl]=We,M[le]=X,bl=le);else if(rO(E,X))M[bl]=E,M[r]=X,bl=r;else break l}}return Q}function O(M,Q){var X=M.sortIndex-Q.sortIndex;return X!==0?X:M.id-Q.id}if(x.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var q=performance;x.unstable_now=function(){return q.now()}}else{var al=Date,W=al.now();x.unstable_now=function(){return al.now()-W}}var k=[],F=[],D=1,S=null,_=3,B=!1,G=!1,$=!1,ul=!1,Bl=typeof setTimeout=="function"?setTimeout:null,nt=typeof clearTimeout=="function"?clearTimeout:null,ke=typeof setImmediate<"u"?setImmediate:null;function Bt(M){for(var Q=N(F);Q!==null;){if(Q.callback===null)d(F);else if(Q.startTime<=M)d(F),Q.sortIndex=Q.expirationTime,A(k,Q);else break;Q=N(F)}}function Gt(M){if($=!1,Bt(M),!G)if(N(k)!==null)G=!0,ct||(ct=!0,it());else{var Q=N(F);Q!==null&&Ul(Gt,Q.startTime-M)}}var ct=!1,I=-1,sl=5,wt=-1;function St(){return ul?!0:!(x.unstable_now()-wtM&&St());){var bl=S.callback;if(typeof bl=="function"){S.callback=null,_=S.priorityLevel;var dl=bl(S.expirationTime<=M);if(M=x.unstable_now(),typeof dl=="function"){S.callback=dl,Bt(M),Q=!0;break t}S===N(k)&&d(k),Bt(M)}else d(k);S=N(k)}if(S!==null)Q=!0;else{var jt=N(F);jt!==null&&Ul(Gt,jt.startTime-M),Q=!1}}break l}finally{S=null,_=X,B=!1}Q=void 0}}finally{Q?it():ct=!1}}}var it;if(typeof ke=="function")it=function(){ke(xt)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,$e=ge.port2;ge.port1.onmessage=xt,it=function(){$e.postMessage(null)}}else it=function(){Bl(xt,0)};function Ul(M,Q){I=Bl(function(){M(x.unstable_now())},Q)}x.unstable_IdlePriority=5,x.unstable_ImmediatePriority=1,x.unstable_LowPriority=4,x.unstable_NormalPriority=3,x.unstable_Profiling=null,x.unstable_UserBlockingPriority=2,x.unstable_cancelCallback=function(M){M.callback=null},x.unstable_forceFrameRate=function(M){0>M||125bl?(M.sortIndex=X,A(F,M),N(k)===null&&M===N(F)&&($?(nt(I),I=-1):$=!0,Ul(Gt,X-bl))):(M.sortIndex=dl,A(k,M),G||B||(G=!0,ct||(ct=!0,it()))),M},x.unstable_shouldYield=St,x.unstable_wrapCallback=function(M){var Q=_;return function(){var X=_;_=Q;try{return M.apply(this,arguments)}finally{_=X}}}})(Os)),Os}var c0;function T1(){return c0||(c0=1,zs.exports=p1()),zs.exports}var As={exports:{}},Kl={};/** * @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 i0;function N1(){if(i0)return Kl;i0=1;var x=Ms();function A(D){var S="https://react.dev/errors/"+D;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x)}catch(A){console.error(A)}}return x(),As.exports=N1(),As.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 s0;function _1(){if(s0)return cn;s0=1;var x=T1(),A=Ms(),N=E1();function d(l){var t="https://react.dev/errors/"+l;if(1xa||(l.current=Qc[xa],Qc[xa]=null,xa--)}function xl(l,t){xa++,Qc[xa]=l.current,l.current=t}var Xt=Qt(null),ru=Qt(null),be=Qt(null),fn=Qt(null);function sn(l,t){switch(xl(be,t),xl(ru,l),xl(Xt,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?om(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=om(t),l=rm(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}Gl(Xt),xl(Xt,l)}function pa(){Gl(Xt),Gl(ru),Gl(be)}function Xc(l){var t=l.memoizedState;t!==null&&(fu._currentValue=t.memoizedState,xl(fn,l)),t=Xt.current;var e=rm(t,l.type);t!==e&&(xl(ru,l),xl(Xt,e))}function on(l){ru.current===l&&(Gl(Xt),Gl(ru)),fn.current===l&&(Gl(fn),fu._currentValue=te)}var Zc,js;function Se(l){if(Zc===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Zc=t&&t[1]||"",js=-1)":-1u||f[a]!==v[u]){var b=` `+f[a].replace(" at new "," at ");return l.displayName&&b.includes("")&&(b=b.replace("",l.displayName)),b}while(1<=a&&0<=u);break}}}finally{Vc=!1,Error.prepareStackTrace=e}return(e=l?l.displayName||l.name:"")?Se(e):""}function T0(l,t){switch(l.tag){case 26:case 27:case 5:return Se(l.type);case 16:return Se("Lazy");case 13:return l.child!==t&&t!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return Lc(l.type,!1);case 11:return Lc(l.type.render,!1);case 1:return Lc(l.type,!0);case 31:return Se("Activity");case 30:return Se("ViewTransition");default:return""}}function Cs(l){try{var t="",e=null;do t+=T0(l,e),e=l,l=l.return;while(l);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var Kc=Object.prototype.hasOwnProperty,Jc=x.unstable_scheduleCallback,kc=x.unstable_cancelCallback,N0=x.unstable_shouldYield,E0=x.unstable_requestPaint,ft=x.unstable_now,_0=x.unstable_getCurrentPriorityLevel,Ds=x.unstable_ImmediatePriority,Us=x.unstable_UserBlockingPriority,rn=x.unstable_NormalPriority,z0=x.unstable_LowPriority,Rs=x.unstable_IdlePriority,O0=x.log,A0=x.unstable_setDisableYieldValue,du=null,st=null;function xe(l){if(typeof O0=="function"&&A0(l),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(du,l)}catch{}}var ot=Math.clz32?Math.clz32:C0,M0=Math.log,j0=Math.LN2;function C0(l){return l>>>=0,l===0?32:31-(M0(l)/j0|0)|0}var dn=256,mn=262144,hn=4194304;function Fe(l){var t=l&42;if(t!==0)return t;switch(l&-l){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 l&-l;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function vn(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var u=0,n=l.suspendedLanes,c=l.pingedLanes;l=l.warmLanes;var i=a&134217727;return i!==0?(a=i&~n,a!==0?u=Fe(a):(c&=i,c!==0?u=Fe(c):e||(e=i&~l,e!==0&&(u=Fe(e))))):(i=a&~n,i!==0?u=Fe(i):c!==0?u=Fe(c):e||(e=a&~l,e!==0&&(u=Fe(e)))),u===0?0:t!==0&&t!==u&&(t&n)===0&&(n=u&-u,e=t&-t,n>=e||n===32&&(e&4194048)!==0)?t:u}function mu(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function Hs(l,t){(t&8)!==0&&(t|=t&32);var e=l.entangledLanes;if(e!==0)for(l=l.entanglements,e&=t;0e;e++)t.push(l);return t}function hu(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function U0(l,t,e,a,u,n){var c=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var i=l.entanglements,f=l.expirationTimes,v=l.hiddenUpdates;for(e=c&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ni=!1;if(ue)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){ni=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{ni=!1}var pe=null,ci=null,pn=null;function no(){if(pn)return pn;var l,t=ci,e=t.length,a,u="value"in pe?pe.value:pe.textContent,n=u.length;for(l=0;l=pu),ro=" ",mo=!1;function ho(l,t){switch(l){case"keyup":return vh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vo(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var ja=!1;function gh(l,t){switch(l){case"compositionend":return vo(t);case"keypress":return t.which!==32?null:(mo=!0,ro);case"textInput":return l=t.data,l===ro&&mo?null:l;default:return null}}function bh(l,t){if(ja)return l==="compositionend"||!ri&&ho(l,t)?(l=no(),pn=ci=pe=null,ja=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function No(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Eo(l,t){var e=No(l);l=0;for(var a;e;){if(e.nodeType===3){if(a=l+e.textContent.length,l<=t&&a>=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=No(e)}}function _o(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?_o(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function zo(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=hi(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)l=t.contentWindow;else break;t=hi(l.document)}return t}function vi(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var zh=ue&&"documentMode"in document&&11>=document.documentMode,Ca=null,yi=null,_u=null,gi=!1;function Oo(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;gi||Ca==null||Ca!==hi(a)||(a=Ca,"selectionStart"in a&&vi(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}),_u&&Eu(_u,a)||(_u=a,a=zc(yi,"onSelect"),0>=c,u-=c,Vt=1<<32-ot(t)+u|e<w?(Cl=R,R=null):Cl=R.sibling;var nl=m(h,R,y[w],p);if(nl===null){R===null&&(R=Cl);break}l&&R&&nl.alternate===null&&t(h,R),o=n(nl,o,w),el===null?j=nl:el.sibling=nl,el=nl,R=Cl}if(w===y.length)return e(h,R),J&&fe(h,w),j;if(R===null){for(;ww?(Cl=R,R=null):Cl=R.sibling;var Ke=m(h,R,nl.value,p);if(Ke===null){R===null&&(R=Cl);break}l&&R&&Ke.alternate===null&&t(h,R),o=n(Ke,o,w),el===null?j=Ke:el.sibling=Ke,el=Ke,R=Cl}if(nl.done)return e(h,R),J&&fe(h,w),j;if(R===null){for(;!nl.done;w++,nl=y.next())nl=T(h,nl.value,p),nl!==null&&(o=n(nl,o,w),el===null?j=nl:el.sibling=nl,el=nl);return J&&fe(h,w),j}for(R=a(R);!nl.done;w++,nl=y.next())nl=g(R,h,w,nl.value,p),nl!==null&&(l&&(Cl=nl.alternate,Cl!==null&&R.delete(Cl.key===null?w:Cl.key)),o=n(nl,o,w),el===null?j=nl:el.sibling=nl,el=nl);return l&&R.forEach(function(g1){return t(h,g1)}),J&&fe(h,w),j}function K(h,o,y,p){if(typeof y=="object"&&y!==null&&y.type===xt&&y.key===null&&y.props.ref===void 0&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case wt:l:{for(var j=y.key;o!==null;){if(o.key===j){if(j=y.type,j===xt){if(o.tag===7){e(h,o.sibling),p=u(o,y.props.children),Oe(p,y),p.return=h,h=p;break l}}else if(o.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===dl&&oa(j)===o.type){e(h,o.sibling),p=u(o,y.props),Oe(p,y),p.return=h,h=p;break l}e(h,o);break}else t(h,o);o=o.sibling}y.type===xt?(p=aa(y.props.children,h.mode,p,y.key),Oe(p,y),p.return=h,h=p):(p=Cn(y.type,y.key,y.props,null,h.mode,p),Oe(p,y),p.return=h,h=p)}return c(h);case St:l:{for(j=y.key;o!==null;){if(o.key===j)if(o.tag===4&&o.stateNode.containerInfo===y.containerInfo&&o.stateNode.implementation===y.implementation){e(h,o.sibling),p=u(o,y.children||[]),p.return=h,h=p;break l}else{e(h,o);break}else t(h,o);o=o.sibling}p=Ei(y,h.mode,p),p.return=h,h=p}return c(h);case dl:return y=oa(y),K(h,o,y,p)}if(ol(y))return z(h,o,y,p);if(Y(y)){if(j=Y(y),typeof j!="function")throw Error(d(150));return y=j.call(y),C(h,o,y,p)}if(typeof y.then=="function")return K(h,o,Qn(y),p);if(y.$$typeof===Ul)return K(h,o,qn(h,y),p);Xn(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,o!==null&&o.tag===6?(e(h,o.sibling),p=u(o,y),p.return=h,h=p):(e(h,o),p=Ni(y,h.mode,p),p.return=h,h=p),c(h)):e(h,o)}return function(h,o,y,p){try{Cu=0;var j=K(h,o,y,p);return wa=null,j}catch(R){if(R===Ga||R===Gn)throw R;var el=lt(29,R,null,h.mode);return el.lanes=p,el.return=h,el}finally{}}}var da=Fo(!0),Io=Fo(!1),Ae=!1;function Ri(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hi(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Me(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function je(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(rl&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=jn(l),Ho(l,null,e),t}return Mn(l,a,t,e),jn(l)}function Du(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Bs(l,e)}}function Yi(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var u=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var c={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?u=n=c:n=n.next=c,e=e.next}while(e!==null);n===null?u=n=t:n=n.next=t}else u=n=t;e={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var qi=!1;function Uu(){if(qi){var l=Ba;if(l!==null)throw l}}function Ru(l,t,e,a){qi=!1;var u=l.updateQueue;Ae=!1;var n=u.firstBaseUpdate,c=u.lastBaseUpdate,i=u.shared.pending;if(i!==null){u.shared.pending=null;var f=i,v=f.next;f.next=null,c===null?n=v:c.next=v,c=f;var b=l.alternate;b!==null&&(b=b.updateQueue,i=b.lastBaseUpdate,i!==c&&(i===null?b.firstBaseUpdate=v:i.next=v,b.lastBaseUpdate=f))}if(n!==null){var T=u.baseState;c=0,b=v=f=null,i=n;do{var m=i.lane&-536870913,g=m!==i.lane;if(g?(tl&m)===m:(a&m)===m){m!==0&&m===fa&&(qi=!0),b!==null&&(b=b.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});l:{var z=l,C=i;m=t;var K=e;switch(C.tag){case 1:if(z=C.payload,typeof z=="function"){T=z.call(K,T,m);break l}T=z;break l;case 3:z.flags=z.flags&-65537|128;case 0:if(z=C.payload,m=typeof z=="function"?z.call(K,T,m):z,m==null)break l;T=I({},T,m);break l;case 2:Ae=!0}}m=i.callback,m!==null&&(l.flags|=64,g&&(l.flags|=8192),g=u.callbacks,g===null?u.callbacks=[m]:g.push(m))}else g={lane:m,tag:i.tag,payload:i.payload,callback:i.callback,next:null},b===null?(v=b=g,f=T):b=b.next=g,c|=m;if(i=i.next,i===null){if(i=u.shared.pending,i===null)break;g=i,i=g.next,g.next=null,u.lastBaseUpdate=g,u.shared.pending=null}}while(!0);b===null&&(f=T),u.baseState=f,u.firstBaseUpdate=v,u.lastBaseUpdate=b,n===null&&(u.shared.lanes=0),qe|=c,l.lanes=c,l.memoizedState=T}}function Po(l,t){if(typeof l!="function")throw Error(d(191,l));l.call(t)}function lr(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;ln?n:8;var c=U.T,i={};i.types=c!==null?c.types:null,U.T=i,af(l,!1,t,e);try{var f=u(),v=U.S;if(v!==null&&v(i,f),f!==null&&typeof f=="object"&&typeof f.then=="function"){var b=qh(f,a);Bu(l,t,b,gt(l))}else Bu(l,t,a,gt(l))}catch(T){Bu(l,t,{then:function(){},status:"rejected",reason:T},gt())}finally{Z.p=n,c!==null&&i.types!==null&&(c.types=i.types),U.T=c}}function Zh(){}function tf(l,t,e,a){if(l.tag!==5)throw Error(d(476));var u=Dr(l).queue;Cr(l,u,t,te,e===null?Zh:function(){return Ur(l),e(a)})}function Dr(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:de,lastRenderedState:te},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:de,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function Ur(l){var t=Dr(l);t.next===null&&(t=l.alternate.memoizedState),Bu(l,t.next.queue,{},gt())}function ef(){return Ql(fu)}function Rr(){return Ol().memoizedState}function Hr(){return Ol().memoizedState}function Vh(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=gt();l=Me(e);var a=je(t,l,e);a!==null&&(ut(a,t,e),Du(a,t,e)),t={cache:ji()},l.payload=t;return}t=t.return}}function Lh(l,t,e){var a=gt();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},In(l)?qr(t,e):(e=pi(l,t,e,a),e!==null&&(ut(e,l,a),Br(e,t,a)))}function Yr(l,t,e){var a=gt();Bu(l,t,e,a)}function Bu(l,t,e,a){var u={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(In(l))qr(t,u);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var c=t.lastRenderedState,i=n(c,e);if(u.hasEagerState=!0,u.eagerState=i,dt(i,c))return Mn(l,t,u,0),Sl===null&&An(),!1}catch{}finally{}if(e=pi(l,t,u,a),e!==null)return ut(e,l,a),Br(e,t,a),!0}return!1}function af(l,t,e,a){if(a={lane:2,revertLane:kf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},In(l)){if(t)throw Error(d(479))}else t=pi(l,e,a,2),t!==null&&ut(t,l,2)}function In(l){var t=l.alternate;return l===L||t!==null&&t===L}function qr(l,t){Qa=Ln=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function Br(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Bs(l,e)}}var Pn={readContext:Ql,use:kn,useCallback:_l,useContext:_l,useEffect:_l,useImperativeHandle:_l,useLayoutEffect:_l,useInsertionEffect:_l,useMemo:_l,useReducer:_l,useRef:_l,useState:_l,useDebugValue:_l,useDeferredValue:_l,useTransition:_l,useSyncExternalStore:_l,useId:_l,useHostTransitionStatus:_l,useFormState:_l,useActionState:_l,useOptimistic:_l,useMemoCache:_l,useCacheRefresh:_l,useEffectEvent:_l},Gr={readContext:Ql,use:kn,useCallback:function(l,t){return Wl().memoizedState=[l,t===void 0?null:t],l},useContext:Ql,useEffect:Tr,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,Wn(4194308,4,zr.bind(null,t,l),e)},useLayoutEffect:function(l,t){return Wn(4194308,4,l,t)},useInsertionEffect:function(l,t){Wn(4,2,l,t)},useMemo:function(l,t){var e=Wl();t=t===void 0?null:t;var a=l();if(ma){xe(!0);try{l()}finally{xe(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=Wl();if(e!==void 0){var u=e(t);if(ma){xe(!0);try{e(t)}finally{xe(!1)}}}else u=t;return a.memoizedState=a.baseState=u,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},a.queue=l,l=l.dispatch=Lh.bind(null,L,l),[a.memoizedState,l]},useRef:function(l){var t=Wl();return l={current:l},t.memoizedState=l},useState:function(l){l=Wi(l);var t=l.queue,e=Yr.bind(null,L,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:Pi,useDeferredValue:function(l,t){var e=Wl();return lf(e,l,t)},useTransition:function(){var l=Wi(!1);return l=Cr.bind(null,L,l.queue,!0,!1),Wl().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=L,u=Wl();if(J){if(e===void 0)throw Error(d(407));e=e()}else{if(e=t(),Sl===null)throw Error(d(349));(tl&127)!==0||cr(a,t,e)}u.memoizedState=e;var n={value:e,getSnapshot:t};return u.queue=n,Tr(fr.bind(null,a,n,l),[l]),a.flags|=2048,Za(9,{destroy:void 0},ir.bind(null,a,n,e,t),null),e},useId:function(){var l=Wl(),t=Sl.identifierPrefix;if(J){var e=Lt,a=Vt;e=(a&~(1<<32-ot(a)-1)).toString(32)+e,t="_"+t+"R_"+e,e=Kn++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?n.multiple=!0:a.size&&(n.size=a.size);break;default:n=typeof a.is=="string"?c.createElement(u,{is:a.is}):c.createElement(u)}}n[wl]=t,n[Pl]=a;l:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)n.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break l;for(;c.sibling===null;){if(c.return===null||c.return===t)break l;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=n;l:switch(Ll(n,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break l;case"img":a=!0;break l;default:a=!1}a&&he(t)}}return Tl(t),t.subtreeFlags&=-33554433,gf(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&he(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(l=be.current,qa(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,u=Hl,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}l[wl]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||fm(l.nodeValue,e)),l||_e(t,!0)}else l=Fu(l).createTextNode(a),l[wl]=t,t.stateNode=l}return Tl(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=qa(t),e!==null){if(l===null){if(!a)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(557));l[wl]=t}else ua(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tl(t),l=!1}else e=Oi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(mt(t),t):(mt(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Tl(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(u=qa(t),a!==null&&a.dehydrated!==null){if(l===null){if(!u)throw Error(d(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(d(317));u[wl]=t}else ua(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tl(t),u=!1}else u=Oi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(mt(t),t):(mt(t),null)}return mt(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==u&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),nc(t,t.updateQueue),Tl(t),null);case 4:return pa(),l===null&&If(t.stateNode.containerInfo),t.flags|=67108864,Tl(t),null;case 10:return oe(t.type),Tl(t),null;case 19:if(Qi(t),a=t.memoizedState,a===null)return Tl(t),null;if(u=(t.flags&128)!==0,n=a.rendering,n===null)if(u)wu(a,!1);else{if(zl!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=Vn(l),n!==null){for(t.flags|=128,wu(a,!1),l=n.updateQueue,t.updateQueue=l,nc(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)Yo(e,l),e=e.sibling;return Hu(t,Zl.current&1|2),J&&fe(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&ft()>gc&&(t.flags|=128,u=!0,wu(a,!1),t.lanes=4194304)}else{if(!u)if(l=Vn(n),l!==null){if(t.flags|=128,u=!0,l=l.updateQueue,t.updateQueue=l,nc(t,l),wu(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!n.alternate&&!J)return Tl(t),null}else 2*ft()-a.renderingStartTime>gc&&e!==536870912&&(t.flags|=128,u=!0,wu(a,!1),t.lanes=4194304);a.isBackwards?(n.sibling=t.child,t.child=n):(l=a.last,l!==null?l.sibling=n:t.child=n,a.last=n)}if(a.tail!==null){l=a.tail;l:{for(e=l;e!==null;){if(e.alternate!==null){e=!1;break l}e=e.sibling}e=!0}return a.rendering=l,a.tail=l.sibling,a.renderingStartTime=ft(),l.sibling=null,n=Zl.current,n=u?n&1|2:n&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||J?Hu(t,n):(e=n,xl(Xl,t),xl(Zl,e),kl===null&&(kl=t)),J&&fe(t,a.treeForkCount),l}return Tl(t),null;case 22:case 23:return mt(t),Gi(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(Tl(t),t.subtreeFlags&6&&(t.flags|=8192)):Tl(t),e=t.updateQueue,e!==null&&nc(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&Gl(sa),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),oe(Al),Tl(t),null;case 25:return null;case 30:return t.flags|=33554432,Tl(t),null}throw Error(d(156,t.tag))}function Ih(l,t){switch(_i(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return oe(Al),pa(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return on(t),null;case 31:if(t.memoizedState!==null){if(mt(t),t.alternate===null)throw Error(d(340));ua()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(mt(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(d(340));ua()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return Qi(t),l=t.flags,l&65536?(t.flags=l&-65537|128,l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null),t.flags|=4,t):null;case 4:return pa(),null;case 10:return oe(t.type),null;case 22:case 23:return mt(t),Gi(),l!==null&&Gl(sa),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return oe(Al),null;case 25:return null;default:return null}}function od(l,t){switch(_i(t),t.tag){case 3:oe(Al),pa();break;case 26:case 27:case 5:on(t);break;case 4:pa();break;case 31:t.memoizedState!==null&&mt(t);break;case 13:mt(t);break;case 19:Qi(t);break;case 10:oe(t.type);break;case 22:case 23:mt(t),Gi(),l!==null&&Gl(sa);break;case 24:oe(Al)}}function Qu(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var u=a.next;e=u;do{if((e.tag&l)===l){a=void 0;var n=e.create,c=e.inst;a=n(),c.destroy=a}e=e.next}while(e!==u)}}catch(i){vl(t,t.return,i)}}function Re(l,t,e){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var n=u.next;a=n;do{if((a.tag&l)===l){var c=a.inst,i=c.destroy;if(i!==void 0){c.destroy=void 0,u=t;var f=e,v=i;try{v()}catch(b){vl(u,f,b)}}}a=a.next}while(a!==n)}}catch(b){vl(t,t.return,b)}}function rd(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{lr(t,e)}catch(a){vl(l,l.return,a)}}}function dd(l,t,e){e.props=ha(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){vl(l,t,a)}}function Kt(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:var u=l.stateNode,n=ne(l.memoizedProps,u);(u.ref===null||u.ref.name!==n)&&(u.ref=Sm(n)),a=u.ref;break;case 7:if(l.stateNode===null){var c=new bt(l);S(l.child,!1,Xv,c,void 0,void 0),l.stateNode=c}a=l.stateNode;break;default:a=l.stateNode}typeof e=="function"?l.refCleanup=e(a):e.current=a}}catch(i){vl(l,t,i)}}function Vl(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(u){vl(l,t,u)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(u){vl(l,t,u)}else e.current=null}function cc(l,t){if((l.tag===5||l.tag===27||l.tag===6)&&l.alternate===null&&t!==null)for(var e=0;e title"))),Ll(a,t,e),a[wl]=l,Rl(a),t=a;break l;case"link":if(n=Ym("link","href",u).get(t+(e.href||""))){for(c=0;cK&&(c=K,K=C,C=c);var h=Eo(i,C),o=Eo(i,K);if(h&&o&&(g.rangeCount!==1||g.anchorNode!==h.node||g.anchorOffset!==h.offset||g.focusNode!==o.node||g.focusOffset!==o.offset)){var y=T.createRange();y.setStart(h.node,h.offset),g.removeAllRanges(),C>K?(g.addRange(y),g.extend(o.node,o.offset)):(y.setEnd(o.node,o.offset),g.addRange(y))}}}}for(T=[],g=i;g=g.parentNode;)g.nodeType===1&&T.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;ie?32:e,U.T=null,e=Bf,Bf=null;var n=Ht,c=It;if(El=0,ba=Ht=null,It=0,(rl&6)!==0)throw Error(d(331));var i=rl;if(rl|=4,Hd(n.current),Dd(n,n.current,c,e),rl=i,ku(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(du,n)}catch{}return!0}finally{Z.p=u,U.T=a,Wd(l,t)}}function Fd(l,t,e){t=Nt(e,t),t=cf(l.stateNode,t,2),l=je(l,t,2),l!==null&&(hu(l,2),Pt(l))}function vl(l,t,e){if(l.tag===3)Fd(l,l,e);else for(;t!==null;){if(t.tag===3){Fd(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Be===null||!Be.has(a))){l=Nt(e,l),e=Jr(2),a=je(t,e,2),a!==null&&(kr(e,a,t,l),hu(a,2),Pt(a));break}}t=t.return}}function Lf(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new ev;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(e)||(Hf=!0,u.add(e),l=ov.bind(null,l,t,e),t.then(l,l))}function ov(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,Sl===l&&(tl&e)===e&&((zl===4||zl===3&&(tl&62914560)===tl&&300>ft()-yc)&&(rl&2)===0?lu(l,0):vc|=e,$a===tl&&($a=0)),Pt(l)}function Id(l,t){t===0&&(t=Ys()),l=ea(l,t),l!==null&&(hu(l,t),Pt(l))}function rv(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),Id(l,e)}function dv(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,u=l.memoizedState;u!==null&&(e=u.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),Id(l,e)}function mv(l,t){return Jc(l,t)}var eu=null,au=null,Kf=!1,Ec=!1,Jf=!1,we=0;function Pt(l){l!==au&&l.next===null&&(au===null?eu=au=l:au=au.next=l),Ec=!0,Kf||(Kf=!0,vv())}function ku(l,t){if(!Jf&&Ec){Jf=!0;do for(var e=!1,a=eu;a!==null;){if(l!==0){var u=a.pendingLanes;if(u===0)var n=0;else{var c=a.suspendedLanes,i=a.pingedLanes;n=(1<<31-ot(42|l)+1)-1,n&=u&~(c&~i),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,em(a,n))}else n=tl,n=vn(a,a===Sl?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(n&3)===0||mu(a,n)||(e=!0,em(a,n));a=a.next}while(e);Jf=!1}}function hv(){Pd()}function Pd(){Ec=Kf=!1;var l=0;we!==0&&zv()&&(l=we);for(var t=ft(),e=null,a=eu;a!==null;){var u=a.next,n=lm(a,t);n===0?(a.next=null,e===null?eu=u:e.next=u,u===null&&(au=e)):(e=a,(l!==0||(n&3)!==0)&&(Ec=!0)),a=u}El!==0&&El!==5||ku(l),we!==0&&(we=0)}function lm(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,u=l.expirationTimes,n=l.pendingLanes&-62914561;0i)break;var b=f.transferSize,T=f.initiatorType;b&&sm(T)&&(f=f.responseEnd,c+=b*(fMc){C.length=z;break}y=new Promise(Dv.bind(y)),C.push(y)}}}if(0"u"?null:document;function Dm(l,t,e){var a=nu;if(a&&typeof t=="string"&&t){var u=pt(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),Cm.has(u)||(Cm.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Ll(t,"link",l),Rl(t),a.head.appendChild(t)))}}function Fv(l){ye.D(l),Dm("dns-prefetch",l,null)}function Iv(l,t){ye.C(l,t),Dm("preconnect",l,t)}function Pv(l,t,e){ye.L(l,t,e);var a=nu;if(a&&l&&t){var u='link[rel="preload"][as="'+pt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+pt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+pt(e.imageSizes)+'"]')):u+='[href="'+pt(l)+'"]';var n=u;switch(t){case"style":n=cu(l);break;case"script":n=iu(l)}if(!(Mt.has(n)||(l=I({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),Mt.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(Pu(n))||t==="script"&&a.querySelector(ln(n))))){var c=a.createElement("link");Ll(c,"link",l),t==="style"&&(c[yn]=!0,c.onload=c.onerror=function(){Vs(c)}),Rl(c),a.head.appendChild(c)}}}function l1(l,t){ye.m(l,t);var e=nu;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+pt(a)+'"][href="'+pt(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=iu(l)}if(!Mt.has(n)&&(l=I({rel:"modulepreload",href:l},t),Mt.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(ln(n)))return}a=e.createElement("link"),Ll(a,"link",l),Rl(a),e.head.appendChild(a)}}}function t1(l,t,e){ye.S(l,t,e);var a=nu;if(a&&l){var u=Ea(a).hoistableStyles,n=cu(l);t=t||"default";var c=u.get(n);if(!c){var i={loading:0,preload:null};if(c=a.querySelector(Pu(n)))i.loading=5;else{l=I({rel:"stylesheet",href:l,"data-precedence":t},e),(e=Mt.get(n))&&hs(l,e);var f=c=a.createElement("link");Rl(f),Ll(f,"link",l),f._p=new Promise(function(v,b){f.onload=v,f.onerror=b}),f.addEventListener("load",function(){i.loading|=1}),f.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Oc(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:i},u.set(n,c)}}}function e1(l,t){ye.X(l,t);var e=nu;if(e&&l){var a=Ea(e).hoistableScripts,u=iu(l),n=a.get(u);n||(n=e.querySelector(ln(u)),n||(l=I({src:l,async:!0},t),(t=Mt.get(u))&&vs(l,t),n=e.createElement("script"),Rl(n),Ll(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function a1(l,t){ye.M(l,t);var e=nu;if(e&&l){var a=Ea(e).hoistableScripts,u=iu(l),n=a.get(u);n||(n=e.querySelector(ln(u)),n||(l=I({src:l,async:!0,type:"module"},t),(t=Mt.get(u))&&vs(l,t),n=e.createElement("script"),Rl(n),Ll(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Um(l,t,e,a){var u=(u=be.current)?Iu(u):null;if(!u)throw Error(d(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=cu(e.href),t=Ea(u).hoistableStyles,a=t.get(e),a||(a={type:"style",instance:null,count:0,state:null},t.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"){l=cu(e.href);var n=Ea(u).hoistableStyles,c=n.get(l);if(c||(u=u.ownerDocument||u,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,c),(n=u.querySelector(Pu(l)))?n._p||(c.instance=n,c.state.loading=5):(n=Mt.get(l),n||(n={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},Mt.set(l,n)),u1(u,l,n,c.state))),t&&a===null)throw Error(d(528,""));return c}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(e=iu(e),t=Ea(u).hoistableScripts,a=t.get(e),a||(a={type:"script",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,l))}}function cu(l){return'href="'+pt(l)+'"'}function Pu(l){return'link[rel="stylesheet"]['+l+"]"}function Rm(l){return I({},l,{"data-precedence":l.precedence,precedence:null})}function u1(l,t,e,a){if(t=l.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[yn]!==!0){a.loading=1;return}}else t=l.createElement("link"),t[yn]=!0,t.onload=t.onerror=Vs.bind(null,t),Ll(t,"link",e),Rl(t),l.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function iu(l){return'[src="'+pt(l)+'"]'}function ln(l){return"script[async]"+l}function Hm(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+pt(e.href)+'"]');if(a)return t.instance=a,Rl(a),a;var u=I({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Rl(a),Ll(a,"style",u),Oc(a,e.precedence,l),t.instance=a;case"stylesheet":u=cu(e.href);var n=l.querySelector(Pu(u));if(n)return t.state.loading|=4,t.instance=n,Rl(n),n;a=Rm(e),(u=Mt.get(u))&&hs(a,u),n=(l.ownerDocument||l).createElement("link"),Rl(n);var c=n;return c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Ll(n,"link",a),t.state.loading|=4,Oc(n,e.precedence,l),t.instance=n;case"script":return n=iu(e.src),(u=l.querySelector(ln(n)))?(t.instance=u,Rl(u),u):(a=e,(u=Mt.get(n))&&(a=I({},e),vs(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),Rl(u),Ll(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Oc(a,e.precedence,l));return t.instance}function Oc(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,c=0;c title"):null)}function n1(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return l=t.disabled,typeof t.precedence=="string"&&l==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qm(l,t){return l==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Bm(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Gm(l){return(l.width||100)*(l.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function wm(l,t){typeof t.decode=="function"&&(l.imgCount++,t.complete||(l.imgBytes+=Gm(t),l.suspenseyImages.push(t)),l=f1.bind(l),t.decode().then(l,l))}function c1(l,t,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 u=cu(a.href),n=t.querySelector(Pu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=tn.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,Rl(n);return}n=t.ownerDocument||t,a=Rm(a),(u=Mt.get(u))&&hs(a,u),n=n.createElement("link"),Rl(n);var c=n;c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Ll(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=tn.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var Mc=0;function i1(l,t){return l.stylesheets&&l.count===0&&Cc(l,l.stylesheets),0Mc?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Qm(l){if(l.count===0&&(l.imgCount===0||!l.waitingForImages)){if(l.stylesheets)Cc(l,l.stylesheets);else if(l.unsuspend){var t=l.unsuspend;l.unsuspend=null,t()}}}function tn(){this.count--,Qm(this)}function f1(){this.imgCount--,Qm(this)}var jc=null;function Cc(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,jc=new Map,t.forEach(s1,l),jc=null,tn.call(l))}function s1(l,t){if(!(t.state.loading&4)){var e=jc.get(l);if(e)var a=e.get(null);else{e=new Map,jc.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x)}catch(A){console.error(A)}}return x(),_s.exports=_1(),_s.exports}var O1=z1();const A1=m0(O1),r0=x=>{let A;const N=new Set,d=(F,D)=>{const S=typeof F=="function"?F(A):F;if(!Object.is(S,A)){const _=A;A=D??(typeof S!="object"||S===null)?S:Object.assign({},A,S),N.forEach(B=>B(A,_))}},O=()=>A,W={setState:d,getState:O,getInitialState:()=>k,subscribe:F=>(N.add(F),()=>N.delete(F))},k=A=x(d,O,W);return W},M1=(x=>x?r0(x):r0),j1=x=>x;function C1(x,A=j1){const N=Gc.useSyncExternalStore(x.subscribe,Gc.useCallback(()=>A(x.getState()),[x,A]),()=>A(x.getInitialState()));return Gc.useDebugValue(N),N}const d0=x=>{const A=M1(x),N=d=>C1(A,d);return Object.assign(N,A),N},D1=(x=>x?d0(x):d0),U1=()=>typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,h0=x=>{const A=x==="system"?U1():x==="dark",N=A?"catppuccin":"zinc-light";return typeof document<"u"&&document.documentElement.setAttribute("data-theme",N),A?"dark":"light"},Bc=localStorage.getItem("hl_theme_v2"),v0=Bc==="light"||Bc==="dark"||Bc==="system"?Bc:"system",R1=h0(v0),H1=localStorage.getItem("hl_route_mode")||"auto",Y1=localStorage.getItem("hl_layout_preset")||"homepage-3col",q1=typeof window<"u"&&window.location.pathname.startsWith("/storybook")?"storybook":"dashboard",Je=D1((x,A)=>({theme:v0,resolvedTheme:R1,routeMode:H1,layoutPreset:Y1,viewMode:q1,showAgyModal:!1,showCmdPalette:!1,toast:"",actionLoading:!1,telemetry:{mini:{chip:"Apple M6 (12核)",ip:"192.168.31.164",tailscale_ip:"100.108.205.40",cpu_pct:6.5,load_1m:.85,mem_used_gb:11.8,mem_total_gb:24,mem_pct:49.2,disk_used_gb:59.9,disk_total_gb:460.4,disk_pct:13,uptime:"运行中",agy_tmux:!0},nas:{ip:"192.168.31.185",online:!0,mounted:!0,total_tb:19.94,used_tb:3.36,free_tb:16.58,pct:16.8,latest_backup:"11-06 23:17"},network:{home_wan_ip:"124.90.142.21",ai_policy:"Ai平台 → 狮城节点",sg_node:"233boy-sea",sg_egress_ip:"104.43.105.243",sg_delay_ms:68},services:{agy:!0,vaultwarden:!0,nas:!0,clash:!0,router:!0,uptime:!0}},setTheme:N=>{localStorage.setItem("hl_theme_v2",N);const d=h0(N);x({theme:N,resolvedTheme:d})},toggleTheme:()=>{const{resolvedTheme:N,setTheme:d}=A();d(N==="dark"?"light":"dark")},setRouteMode:N=>{localStorage.setItem("hl_route_mode",N),x({routeMode:N})},setLayoutPreset:N=>{localStorage.setItem("hl_layout_preset",N),x({layoutPreset:N})},setViewMode:N=>{if(typeof window<"u"){const d=N==="storybook"?"/storybook":"/";window.history.pushState({},"",d)}x({viewMode:N})},setShowAgyModal:N=>x({showAgyModal:N}),setShowCmdPalette:N=>x({showCmdPalette:N}),showToast:N=>{x({toast:N}),setTimeout(()=>{A().toast===N&&x({toast:""})},3e3)},fetchTelemetry:async()=>{try{const N=await fetch("/api/telemetry");if(N.ok){const d=await N.json();x({telemetry:d})}}catch{}},triggerAction:async(N,d)=>{const{showToast:O,fetchTelemetry:q}=A();x({actionLoading:!0}),O(d);try{const W=await(await fetch(`/api/action/${N}`,{method:"POST"})).json();O(W.message||"操作已完成"),await q()}catch{O("请求失败,请稍后重试")}finally{x({actionLoading:!1})}},copyCmd:async(N,d)=>{const{showToast:O}=A();try{await navigator.clipboard.writeText(N),O(`已复制「${d}」: ${N}`)}catch{O(N)}},getEffectiveMode:()=>{const{routeMode:N}=A();if(N!=="auto")return N;const d=window.location.hostname;return d.startsWith("192.168.")||d.startsWith("100.")||d==="localhost"?"lan":d.includes(".home.961504.xyz")||window.location.port==="10443"?"home10443":"edge443"}}));typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{const x=Je.getState();x.theme==="system"&&x.setTheme("system")});/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B1=x=>x.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y0=(...x)=>x.filter((A,N,d)=>!!A&&A.trim()!==""&&d.indexOf(A)===N).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var G1={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.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const w1=Jl.forwardRef(({color:x="currentColor",size:A=24,strokeWidth:N=2,absoluteStrokeWidth:d,className:O="",children:q,iconNode:al,...W},k)=>Jl.createElement("svg",{ref:k,...G1,width:A,height:A,stroke:x,strokeWidth:d?Number(N)*24/Number(A):N,className:y0("lucide",O),...W},[...al.map(([F,D])=>Jl.createElement(F,D)),...Array.isArray(q)?q:[q]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qt=(x,A)=>{const N=Jl.forwardRef(({className:d,...O},q)=>Jl.createElement(w1,{ref:q,iconNode:A,className:y0(`lucide-${B1(x)}`,d),...O}));return N.displayName=`${x}`,N};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q1=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],g0=qt("BookOpen",Q1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const X1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Z1=qt("Check",X1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],L1=qt("Layers",V1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const K1=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],J1=qt("LayoutGrid",K1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k1=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],$1=qt("Moon",k1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W1=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],F1=qt("Palette",W1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],P1=qt("PanelsTopLeft",I1);/** * @license lucide-react v0.475.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=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],b0=qt("Search",ly);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ty=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],ey=qt("Sparkles",ty);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ay=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],uy=qt("Sun",ay);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ny=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],S0=qt("Terminal",ny),cy=[{id:"auto",label:"智能路由"},{id:"edge443",label:"443 免端口"},{id:"home10443",label:"10443 家宽"},{id:"lan",label:"LAN 局域网"}],iy=()=>{const{theme:x,resolvedTheme:A,routeMode:N,viewMode:d,telemetry:O,setTheme:q,toggleTheme:al,setRouteMode:W,setViewMode:k,setShowAgyModal:F,setShowCmdPalette:D}=Je();return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"border-b hl-border sticky top-0 z-30 backdrop-blur-md",style:{backgroundColor:"color-mix(in srgb, var(--bg-card) 88%, transparent)"},children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-14 flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[s.jsxs("div",{onClick:()=>k("dashboard"),className:"flex items-center gap-2.5 cursor-pointer",children:[s.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/apple.png",alt:"Mac mini",className:"w-6 h-6 rounded"}),s.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"HomeLab"}),s.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"},title:"全屋 4 节点在线"})]}),s.jsx("div",{className:"h-4 w-[1px] hl-muted"}),s.jsxs("nav",{className:"flex items-center gap-1 text-xs",children:[s.jsxs("button",{onClick:()=>k("dashboard"),className:"px-2.5 py-1.5 rounded-md font-medium flex items-center gap-1.5 transition-all cursor-pointer",style:d==="dashboard"?{backgroundColor:"var(--bg-muted)",color:"var(--text-main)"}:{color:"var(--text-muted)"},children:[s.jsx(J1,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"中控台"})]}),s.jsxs("button",{onClick:()=>k("storybook"),className:"px-2.5 py-1.5 rounded-md font-medium flex items-center gap-1.5 transition-all cursor-pointer",style:d==="storybook"?{backgroundColor:"var(--bg-muted)",color:"var(--text-main)"}:{color:"var(--text-muted)"},children:[s.jsx(g0,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Storybook 设计规范"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 ml-auto",children:[s.jsxs("button",{onClick:()=>D(!0),className:"hl-btn-outline px-3 py-1.5 text-xs flex items-center gap-3 cursor-pointer",title:"按 Cmd+K 唤起全局命令面板",children:[s.jsxs("span",{className:"flex items-center gap-1.5",style:{color:"var(--text-muted)"},children:[s.jsx(b0,{className:"w-3.5 h-3.5"}),s.jsx("span",{className:"hidden sm:inline",children:"搜索服务或指令..."})]}),s.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted",style:{color:"var(--text-muted)"},children:"⌘K"})]}),s.jsxs("button",{onClick:()=>F(!0),className:"hl-btn-primary px-3 py-1.5 text-xs flex items-center gap-1.5 cursor-pointer",children:[s.jsx(S0,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"AGY 终端"})]}),s.jsxs("div",{className:"flex items-center p-0.5 rounded-lg hl-muted border hl-border text-xs",children:[s.jsx("button",{onClick:al,className:"px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 cursor-pointer",style:{backgroundColor:"var(--bg-card)",color:"var(--text-main)",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"},title:"点击切换深色 / 浅色主题(默认跟随系统)",children:A==="dark"?s.jsxs(s.Fragment,{children:[s.jsx($1,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"深色"})]}):s.jsxs(s.Fragment,{children:[s.jsx(uy,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"浅色"})]})}),x!=="system"&&s.jsx("button",{onClick:()=>q("system"),className:"px-2 py-1 rounded-md text-[11px] transition-all cursor-pointer",style:{color:"var(--text-muted)"},title:"恢复跟随设备系统深浅色自动切换",children:"自动"})]})]})]})}),d==="dashboard"&&s.jsx("div",{className:"border-b hl-border",style:{backgroundColor:"var(--bg-card)"},children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-2.5 flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-mono-num",children:[s.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[s.jsx("span",{style:{color:"var(--text-muted)"},children:"M6 CPU"}),s.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:s.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,O.mini.cpu_pct)}%`}})}),s.jsxs("span",{className:"font-medium",children:[O.mini.cpu_pct,"%"]})]}),s.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[s.jsx("span",{style:{color:"var(--text-muted)"},children:"RAM"}),s.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:s.jsx("div",{className:"h-full hl-bar-fill",style:{width:`${Math.max(5,O.mini.mem_pct)}%`}})}),s.jsxs("span",{className:"font-medium",children:[O.mini.mem_used_gb,"G"]})]}),s.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-2",children:[s.jsx("span",{style:{color:"var(--text-muted)"},children:"NAS 余量"}),s.jsx("div",{className:"w-12 h-1.5 rounded-full hl-muted overflow-hidden",children:s.jsx("div",{className:"h-full hl-bar-fill-green",style:{width:`${Math.max(5,O.nas.pct)}%`}})}),s.jsxs("span",{className:"font-medium",style:{color:"var(--success)"},children:[O.nas.free_tb," TB"]})]}),s.jsxs("div",{className:"hl-pill px-2.5 py-1 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--success)"}}),s.jsx("span",{style:{color:"var(--text-muted)"},children:"SG 专线"}),s.jsx("span",{className:"font-medium",children:O.network.sg_delay_ms>0?`${O.network.sg_delay_ms}ms`:"直连"})]})]}),s.jsx("div",{className:"flex items-center p-0.5 rounded-lg hl-muted border hl-border text-xs ml-auto",children:cy.map(S=>s.jsx("button",{onClick:()=>W(S.id),className:"px-2.5 py-1 rounded-md font-medium transition-all cursor-pointer",style:N===S.id?{backgroundColor:"var(--bg-card)",color:"var(--text-main)",boxShadow:"0 1px 2px rgba(0,0,0,0.08)"}:{color:"var(--text-muted)"},children:S.label},S.id))})]})})]})},x0=({card:x})=>{const{getEffectiveMode:A,setShowAgyModal:N,triggerAction:d}=Je(),O=A(),q=O==="lan"?x.lanUrl:O==="home10443"?x.homeUrl:x.edgeUrl,al=O==="lan"?"LAN 直连":O==="home10443"?"10443":"443 免端口";return s.jsxs("a",{href:q,target:"_blank",rel:"noopener noreferrer",className:"hl-card hl-card-interactive flex flex-col justify-between overflow-hidden group cursor-pointer",children:[s.jsxs("div",{className:"p-4 sm:p-5 space-y-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3.5 min-w-0",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl hl-muted border hl-border p-1.5 flex items-center justify-center shrink-0",children:s.jsx("img",{src:x.iconUrl,alt:x.title,className:"w-full h-full object-contain"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"text-sm font-semibold truncate group-hover:underline",children:x.title}),s.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:x.online!==!1?"var(--success)":"#ef4444"}})]}),s.jsx("p",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--text-muted)"},children:x.subtitle})]})]}),x.actionType==="drawer"?s.jsx("button",{onClick:W=>{W.preventDefault(),N(!0)},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--accent-soft)",color:"var(--accent)"},children:"页内终端"}):x.actionType==="backup"?s.jsx("button",{onClick:W=>{W.preventDefault(),d("backup_nas","正在打包备份至极空间 Z4...")},className:"px-2 py-1 rounded-md text-[11px] font-medium shrink-0 transition-opacity hover:opacity-80 cursor-pointer",style:{backgroundColor:"var(--success-soft)",color:"var(--success)"},children:"立即备份"}):s.jsx("span",{className:"text-xs font-mono-num px-2 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:al})]}),s.jsx("p",{className:"text-xs leading-relaxed line-clamp-2",style:{color:"var(--text-muted)"},children:x.desc})]}),s.jsx("div",{className:"hl-widget-footer grid grid-cols-3 divide-x hl-border text-center",children:x.stats.map((W,k)=>s.jsxs("div",{className:"py-2.5 px-2 flex flex-col items-center justify-center",children:[s.jsx("span",{className:"text-[10px] uppercase tracking-wider truncate max-w-full",style:{color:"var(--text-subtle)"},children:W.label}),s.jsx("span",{className:"text-xs font-semibold font-mono-num mt-0.5 truncate max-w-full",style:{color:W.highlight?"var(--success)":"var(--text-main)"},children:W.value})]},k))})]})},fy=[{label:"SSH 连接 Mac mini",cmd:"ssh mini"},{label:"终端接力 AGY 会话",cmd:'ssh mini -t "tmux attach -t agy"'},{label:"SSH 连接新加坡 Azure",cmd:"ssh azure"},{label:"SSH 连接小米主路由",cmd:"ssh root@192.168.31.1"}],p0=()=>{const{copyCmd:x,triggerAction:A}=Je();return s.jsxs("section",{className:"space-y-3 pt-1",children:[s.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:"终端快捷指令与备用直连书签"}),s.jsx("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:"· 点击指令即复制"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[s.jsx("button",{onClick:()=>A("refresh_ddns","正在同步 Cloudflare DDNS..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"刷新 DDNS 解析"}),s.jsx("button",{onClick:()=>A("mount_nas","正在巡检极空间 20TB SMB 挂载..."),className:"hover:underline font-medium cursor-pointer",style:{color:"var(--accent)"},children:"巡检极空间挂载"})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:fy.map(N=>s.jsxs("button",{onClick:()=>x(N.cmd,N.label),className:"hl-card hl-card-interactive px-4 py-3 text-left flex items-center justify-between gap-2 cursor-pointer",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold",children:N.label}),s.jsx("div",{className:"text-[11px] font-mono-num truncate mt-0.5",style:{color:"var(--accent)"},children:N.cmd})]}),s.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted shrink-0",style:{color:"var(--text-muted)"},children:"COPY"})]},N.cmd))})]})},sy=()=>{const{showCmdPalette:x,setShowCmdPalette:A,setShowAgyModal:N,setTheme:d,triggerAction:O,copyCmd:q,getEffectiveMode:al}=Je(),[W,k]=Jl.useState(""),F=Jl.useRef(null);Jl.useEffect(()=>{x&&(k(""),setTimeout(()=>{var B;return(B=F.current)==null?void 0:B.focus()},20))},[x]);const D=Jl.useMemo(()=>{const B=al(),G=($,ul,Bl)=>B==="lan"?Bl:B==="home10443"?ul:$;return[{id:"open-agy-drawer",title:"在页内唤起 AGY 云端终端",hint:"tmux attach -t agy",type:"终端",run:()=>N(!0)},{id:"open-agy",title:"新窗口打开 AGY 云端工作台",hint:"https://agy.961504.xyz",type:"跳转",run:()=>window.open(G("https://agy.961504.xyz","https://agy.home.961504.xyz:10443","http://192.168.31.164:7681"),"_blank")},{id:"open-z4",title:"打开 极空间 Z4 私有云 (20TB)",hint:"192.168.31.185:5055",type:"跳转",run:()=>window.open(G("https://z4.home.961504.xyz:10443","https://z4.home.961504.xyz:10443","http://192.168.31.185:5055"),"_blank")},{id:"open-vw",title:"打开 Vaultwarden 密码保险箱",hint:"https://vw.961504.xyz",type:"跳转",run:()=>window.open(G("https://vw.961504.xyz","https://vw.home.961504.xyz:10443","http://192.168.31.164:8222"),"_blank")},{id:"open-clash",title:"打开 Mihomo 路由分流面板",hint:"192.168.31.1:9999",type:"跳转",run:()=>window.open(G("https://clash.home.961504.xyz:10443/ui/","https://clash.home.961504.xyz:10443/ui/","http://192.168.31.1:9999/ui/"),"_blank")},{id:"act-backup",title:"立即打包备份核心数据至极空间 Z4",hint:"backup-to-nas.sh",type:"运维",run:()=>O("backup_nas","正在打包备份至极空间 Z4...")},{id:"act-ddns",title:"立即刷新 Cloudflare DDNS 解析",hint:"cloudflare-ddns.sh",type:"运维",run:()=>O("refresh_ddns","正在同步 Cloudflare DDNS...")},{id:"ssh-mini",title:"复制 SSH 连接 Mac mini 指令",hint:"ssh mini",type:"SSH",run:()=>q("ssh mini","SSH Mac mini")},{id:"ssh-agy",title:"复制 终端接力 AGY 会话指令",hint:'ssh mini -t "tmux attach -t agy"',type:"SSH",run:()=>q('ssh mini -t "tmux attach -t agy"',"接力 AGY")},{id:"theme-system",title:"主题模式: 跟随设备系统深浅色自动切换",hint:"system",type:"主题",run:()=>d("system")},{id:"theme-light",title:"切换主题: 浅色纯净 (Light)",hint:"light",type:"主题",run:()=>d("light")},{id:"theme-dark",title:"切换主题: 深色极客 (Dark)",hint:"dark",type:"主题",run:()=>d("dark")}]},[al,N,d,O,q]),S=Jl.useMemo(()=>{const B=W.trim().toLowerCase();return B?D.filter(G=>G.title.toLowerCase().includes(B)||G.hint.toLowerCase().includes(B)):D},[W,D]);if(!x)return null;const _=B=>{A(!1),B.run()};return s.jsx("div",{onClick:B=>{B.target===B.currentTarget&&A(!1)},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-start justify-center pt-20 px-4",children:s.jsxs("div",{className:"w-full max-w-xl hl-card overflow-hidden shadow-2xl",children:[s.jsxs("div",{className:"px-4 py-3 border-b hl-border flex items-center gap-3",children:[s.jsx(b0,{className:"w-4 h-4",style:{color:"var(--text-muted)"}}),s.jsx("input",{ref:F,value:W,onChange:B=>k(B.target.value),type:"text",placeholder:"输入服务名称、SSH 指令、路由模式或主题...",className:"w-full bg-transparent text-sm outline-none",onKeyDown:B=>{B.key==="Escape"&&A(!1),B.key==="Enter"&&S.length>0&&_(S[0])}}),s.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono-num rounded hl-muted",style:{color:"var(--text-muted)"},children:"ESC"})]}),s.jsxs("div",{className:"max-h-80 overflow-y-auto p-2 text-xs",children:[s.jsx("div",{className:"px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-subtle)"},children:"快速操作与服务直达"}),S.map(B=>s.jsxs("button",{onClick:()=>_(B),className:"w-full px-3 py-2 rounded-lg text-left flex items-center justify-between transition-colors cursor-pointer",onMouseEnter:G=>{G.currentTarget.style.backgroundColor="var(--bg-muted)"},onMouseLeave:G=>{G.currentTarget.style.backgroundColor="transparent"},children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"font-medium",children:B.title}),s.jsx("span",{className:"font-mono-num text-[11px]",style:{color:"var(--text-muted)"},children:B.hint})]}),s.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted",style:{color:"var(--text-muted)"},children:B.type})]},B.id))]})]})})},oy=()=>{const{showAgyModal:x,setShowAgyModal:A,getEffectiveMode:N}=Je();if(!x)return null;const d=N(),O=d==="lan"?"http://192.168.31.164:7681":d==="home10443"?"https://agy.home.961504.xyz:10443":"https://agy.961504.xyz";return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-3 sm:p-6",children:s.jsxs("div",{className:"w-full h-full max-w-6xl hl-card flex flex-col overflow-hidden shadow-2xl",children:[s.jsxs("div",{className:"px-4 py-2.5 border-b hl-border flex items-center justify-between hl-muted",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("img",{src:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",alt:"AGY",className:"w-4 h-4"}),s.jsx("span",{className:"text-xs font-mono-num font-medium",children:"AGY 云端工作台 · tmux 持久会话 (关窗不断连)"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("a",{href:O,target:"_blank",rel:"noopener noreferrer",className:"hl-btn-outline px-2.5 py-1 text-xs font-mono-num",children:"新标签页全屏 ↗"}),s.jsx("button",{onClick:()=>A(!1),className:"hl-btn-primary px-3 py-1 text-xs cursor-pointer",children:"收起终端"})]})]}),s.jsx("iframe",{src:O,title:"AGY Cloud Workbench",className:"w-full flex-1 bg-black border-0"})]})})},ry={light:{id:"light",name:"Shadcn Clean Light (浅色纯净)",description:"对标 Apple / Stripe / Linear 浅色日光模式,高对比深灰文字配纯净白卡片与冷灰微边框。",tokens:{"--bg-page":"#f8fafc","--bg-card":"#ffffff","--bg-widget":"#f8fafc","--bg-muted":"#f1f5f9","--bg-hover":"#ffffff","--text-main":"#0f172a","--text-muted":"#64748b","--text-subtle":"#94a3b8","--border-color":"#e2e8f0","--border-hover":"#cbd5e1","--primary":"#0f172a","--primary-fg":"#ffffff","--accent":"#2563eb","--accent-soft":"rgba(37, 99, 235, 0.08)","--success":"#10b981","--success-soft":"rgba(16, 185, 129, 0.10)"}},dark:{id:"dark",name:"Catppuccin / Linear Dark (深色极客)",description:"融合 Catppuccin Mocha 与 Linear 暗黑规范,柔和护眼的深邃蓝黑基底配高辨识度状态色。",tokens:{"--bg-page":"#11111b","--bg-card":"#1e1e2e","--bg-widget":"#181825","--bg-muted":"#313244","--bg-hover":"#242438","--text-main":"#cdd6f4","--text-muted":"#a6adc8","--text-subtle":"#6c7086","--border-color":"#313244","--border-hover":"#45475a","--primary":"#cba6f7","--primary-fg":"#11111b","--accent":"#89b4fa","--accent-soft":"rgba(137, 180, 250, 0.15)","--success":"#a6e3a1","--success-soft":"rgba(166, 227, 161, 0.15)"}}},wc={"homepage-3col":{id:"homepage-3col",name:"Homepage 经典三列矩阵 (3-Column Grid)",description:"gethomepage.dev 标志性对称 3 列分组卡片,底部内嵌 3 格实时遥测单元。",gridClass:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},"bento-split":{id:"bento-split",name:"Shadcn 双列宽屏卡片 (2-Column Wide Bento)",description:"适合大字号阅读的 2 列宽体卡片布局,留白更充裕。",gridClass:"grid-cols-1 lg:grid-cols-2 gap-5"},"compact-2col":{id:"compact-2col",name:"高密度四列紧凑矩阵 (4-Column Dense)",description:"适合超宽显示器的一屏高密度 4 列布局。",gridClass:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5"}},dy=()=>{const[x,A]=Jl.useState("layout-architecture"),{theme:N,resolvedTheme:d,layoutPreset:O,setTheme:q,setLayoutPreset:al,setViewMode:W,telemetry:k}=Je(),[F,D]=Jl.useState(!0),[S,_]=Jl.useState("drawer"),B=[{id:"layout-architecture",group:"FOUNDATIONS / 架构与布局",title:"01. AppShell 双层顶栏与网格布局",icon:s.jsx(P1,{className:"w-3.5 h-3.5"})},{id:"theme-tokens",group:"FOUNDATIONS / 架构与布局",title:"02. 双主题色板与自动切换规范",icon:s.jsx(F1,{className:"w-3.5 h-3.5"})},{id:"service-card",group:"COMPONENTS / 核心组件",title:"03. ServiceCard 内联遥测卡片",icon:s.jsx(L1,{className:"w-3.5 h-3.5"})},{id:"ssh-shelf",group:"COMPONENTS / 核心组件",title:"04. SshShelf 快捷指令栏",icon:s.jsx(S0,{className:"w-3.5 h-3.5"})}];return s.jsx("div",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 items-start",children:[s.jsxs("aside",{className:"hl-card p-4 space-y-4 lg:sticky lg:top-20",children:[s.jsxs("div",{className:"flex items-center justify-between border-b hl-border pb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(g0,{className:"w-4 h-4",style:{color:"var(--accent)"}}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:"Storybook 组件库"})]}),s.jsx("span",{className:"text-[10px] font-mono-num px-1.5 py-0.5 rounded hl-muted",children:"v3.1"})]}),s.jsx("div",{className:"space-y-1",children:B.map(G=>s.jsxs("button",{onClick:()=>A(G.id),className:"w-full px-3 py-2 rounded-lg text-left text-xs font-medium flex items-center gap-2.5 transition-all cursor-pointer",style:x===G.id?{backgroundColor:"var(--accent-soft)",color:"var(--accent)"}:{color:"var(--text-muted)"},children:[G.icon,s.jsx("span",{className:"truncate",children:G.title})]},G.id))}),s.jsxs("div",{className:"pt-3 border-t hl-border space-y-2 text-xs",children:[s.jsx("div",{className:"text-[11px] font-semibold",style:{color:"var(--text-muted)"},children:"全局外观状态预览"}),s.jsx("div",{className:"grid grid-cols-3 gap-1 p-1 rounded-lg hl-muted border hl-border",children:["system","light","dark"].map(G=>s.jsx("button",{onClick:()=>q(G),className:"py-1 rounded text-[11px] font-medium cursor-pointer",style:N===G?{backgroundColor:"var(--bg-card)",color:"var(--text-main)"}:{color:"var(--text-muted)"},children:G==="system"?"自动":G==="light"?"浅色":"深色"},G))}),s.jsx("button",{onClick:()=>W("dashboard"),className:"w-full hl-btn-primary py-2 text-xs text-center mt-2 cursor-pointer",children:"返回中控台主页"})]})]}),s.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[x==="layout-architecture"&&s.jsx("div",{className:"space-y-6",children:s.jsxs("div",{className:"hl-card p-6 space-y-4",children:[s.jsx("div",{className:"flex items-center justify-between border-b hl-border pb-4",children:s.jsxs("div",{children:[s.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / AppShell Layout"}),s.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"标准双层顶栏架构 (Two-Tier AppShell) & 响应式网格切换"})]})}),s.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-muted)"},children:["参考 ",s.jsx("strong",{children:"Vercel Geist / shadcn/ui Dashboard-01 / GitHub AppShell"})," ","标准规范,将原本容易挤压折行的单层顶栏拆分为职责清晰的双层结构:"]}),s.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border space-y-2.5 font-mono-num text-xs",children:[s.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[s.jsx("span",{children:"[左] 🍎 HomeLab · 导航切换 (中控台 / Storybook)"}),s.jsx("span",{style:{color:"var(--accent)"},children:"[最右固定] 🔍 搜索 ⌘K · >_ AGY 终端 · ☀️/🌙 主题切换"})]}),s.jsxs("div",{className:"p-3 rounded-lg hl-card flex items-center justify-between",children:[s.jsx("span",{style:{color:"var(--success)"},children:"[左] 实时硬件遥测条 (M6 CPU · RAM · Z4 20TB · SG 专线)"}),s.jsx("span",{children:"[右对齐] 路由模式切换器 (智能路由 / 443 / 10443 / LAN)"})]})]}),s.jsxs("div",{className:"pt-2 space-y-3",children:[s.jsx("div",{className:"text-xs font-semibold",children:"选择主页卡片网格布局预设(点击立即应用到主页):"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3.5",children:Object.keys(wc).map(G=>{const $=wc[G],ul=O===G;return s.jsxs("div",{onClick:()=>al(G),className:"hl-card hl-card-interactive p-4 cursor-pointer space-y-2",style:ul?{borderColor:"var(--accent)"}:{},children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-bold",children:$.name}),ul&&s.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:s.jsx(Z1,{className:"w-2.5 h-2.5"})})]}),s.jsx("p",{className:"text-[11px]",style:{color:"var(--text-muted)"},children:$.description}),s.jsx("code",{className:"text-[10px] font-mono-num block pt-1",style:{color:"var(--accent)"},children:$.gridClass})]},G)})})]})]})}),x==="theme-tokens"&&s.jsxs("div",{className:"hl-card p-6 space-y-6",children:[s.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Foundations / Color System"}),s.jsxs("h2",{className:"text-lg font-bold mt-0.5",children:["主流双主题色板规范(当前生效:",d==="dark"?"深色极客":"浅色纯净",")"]})]}),s.jsxs("span",{className:"text-xs font-mono-num px-2.5 py-1 rounded hl-muted",children:["模式: ",N==="system"?"跟随设备自动切换":"手动锁定"]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:["light","dark"].map(G=>{const $=ry[G];return s.jsxs("div",{className:"rounded-xl p-5 space-y-4 border",style:{backgroundColor:$.tokens["--bg-page"],color:$.tokens["--text-main"],borderColor:$.tokens["--border-color"]},children:[s.jsxs("div",{className:"flex items-center justify-between border-b pb-3",style:{borderColor:$.tokens["--border-color"]},children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-bold",children:$.name}),s.jsx("div",{className:"text-xs mt-0.5",style:{color:$.tokens["--text-muted"]},children:$.description})]}),s.jsx("button",{onClick:()=>q(G),className:"px-2.5 py-1 rounded-md text-xs font-mono-num font-semibold cursor-pointer",style:{backgroundColor:$.tokens["--primary"],color:$.tokens["--primary-fg"]},children:"预览此主题"})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries($.tokens).map(([ul,Bl])=>s.jsxs("div",{className:"p-2 rounded-lg border flex items-center gap-2",style:{backgroundColor:$.tokens["--bg-card"],borderColor:$.tokens["--border-color"]},children:[s.jsx("span",{className:"w-5 h-5 rounded border shrink-0",style:{backgroundColor:Bl,borderColor:$.tokens["--border-hover"]}}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[10px] font-mono-num font-semibold truncate",children:ul}),s.jsx("div",{className:"text-[10px] font-mono-num truncate",style:{color:$.tokens["--text-muted"]},children:Bl})]})]},ul))})]},$.id)})})]}),x==="service-card"&&s.jsxs("div",{className:"hl-card p-6 space-y-6",children:[s.jsxs("div",{className:"border-b hl-border pb-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / ServiceCard"}),s.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"三段式内联遥测卡片 (ServiceCard Interactive Story)"})]}),s.jsx(ey,{className:"w-4 h-4",style:{color:"var(--accent)"}})]}),s.jsxs("div",{className:"p-4 rounded-xl hl-muted border hl-border flex flex-wrap items-center gap-6 text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-semibold",children:"在线状态 (online):"}),s.jsx("button",{onClick:()=>D(!F),className:"px-2.5 py-1 rounded hl-card font-mono-num cursor-pointer",children:F?"true (绿灯)":"false (离线红灯)"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-semibold",children:"右上角动作按钮 (actionType):"}),["drawer","backup",void 0].map((G,$)=>s.jsx("button",{onClick:()=>_(G),className:"px-2.5 py-1 rounded hl-card font-mono-num cursor-pointer",style:S===G?{borderColor:"var(--accent)"}:{},children:G||"route-badge"},$))]})]}),s.jsx("div",{className:"max-w-md mx-auto py-4",children:s.jsx(x0,{card:{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:F,actionType:S,desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${k.mini.cpu_pct}%`},{label:"已用内存",value:`${k.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:"常驻运行中",highlight:!0}]}})})]}),x==="ssh-shelf"&&s.jsxs("div",{className:"hl-card p-6 space-y-6",children:[s.jsxs("div",{className:"border-b hl-border pb-4",children:[s.jsx("span",{className:"text-[11px] font-mono-num uppercase tracking-wider",style:{color:"var(--accent)"},children:"Components / SshShelf"}),s.jsx("h2",{className:"text-lg font-bold mt-0.5",children:"底部 SSH 快捷复制与运维操作栏"})]}),s.jsx(p0,{})]})]})]})})},my=()=>{var S;const{telemetry:x,toast:A,viewMode:N,layoutPreset:d,fetchTelemetry:O,setShowCmdPalette:q,getEffectiveMode:al,routeMode:W}=Je();Jl.useEffect(()=>{O();const _=setInterval(O,3e3),B=G=>{(G.metaKey||G.ctrlKey)&&G.key.toLowerCase()==="k"&&(G.preventDefault(),q(!0))};return window.addEventListener("keydown",B),()=>{clearInterval(_),window.removeEventListener("keydown",B)}},[O,q]);const k=Jl.useMemo(()=>{const _=al();return _==="lan"?"LAN 局域网极速直连 (192.168.31.x)":_==="home10443"?"10443 家宽公网 HTTPS 直连":"443 免端口 HTTPS 直达 (*.961504.xyz)"},[al,W]),F=((S=wc[d])==null?void 0:S.gridClass)||wc["homepage-3col"].gridClass,D=Jl.useMemo(()=>{const _=x;return[{title:"核心工作台与私有云存储",subtitle:"Core Workbench & Storage",showRouteHint:!0,items:[{id:"agy",title:"AGY 云端工作台",subtitle:"agy.961504.xyz · ttyd + tmux",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/google-gemini.png",online:_.services.agy,actionType:"drawer",desc:"M6 Mac mini 上的 24 小时常驻 AI 编程终端,已同步 Google 登录态并锁定新加坡出口,关掉网页后台继续运行。",edgeUrl:"https://agy.961504.xyz",homeUrl:"https://agy.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:7681",stats:[{label:"M6 CPU 负载",value:`${_.mini.cpu_pct}%`},{label:"已用内存",value:`${_.mini.mem_used_gb} / 24 GB`},{label:"tmux 会话",value:_.mini.agy_tmux?"常驻运行中":"待机",highlight:!0}]},{id:"zspace",title:"极空间 Z4 私有云",subtitle:"192.168.31.185 · 20TB RAID 存储池",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/synology-drive.png",online:_.services.nas,desc:"家庭 20TB 大容量存储中心、极影视蓝光影院与手机相册备份,已自动 SMB 挂载至 Mac mini ~/nas。",edgeUrl:"https://z4.home.961504.xyz:10443",homeUrl:"https://z4.home.961504.xyz:10443",lanUrl:"http://192.168.31.185:5055",stats:[{label:"剩余可用",value:`${_.nas.free_tb} TB`,highlight:!0},{label:"已用容量",value:`${_.nas.used_tb} TB (${_.nas.pct}%)`},{label:"SMB 挂载",value:_.nas.mounted?"~/nas 已挂载":"重连中"}]},{id:"vaultwarden",title:"Vaultwarden 密码保险箱",subtitle:"vw.961504.xyz · Bitwarden 兼容",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/vaultwarden.png",online:_.services.vaultwarden,actionType:"backup",desc:"自托管全平台加密密码库,支持 iOS / Android / 浏览器插件自动填充,每天凌晨 03:30 自动打包灾备至极空间。",edgeUrl:"https://vw.961504.xyz",homeUrl:"https://vw.home.961504.xyz:10443",lanUrl:"http://192.168.31.164:8222",stats:[{label:"容器状态",value:"Healthy",highlight:!0},{label:"最近极空间灾备",value:_.nas.latest_backup},{label:"Mac SSD 占用",value:`${_.mini.disk_pct}%`}]}]},{title:"网络网关、AI 专线与外部哨兵",subtitle:"Network Gateway & Cloud Edge",showRouteHint:!1,items:[{id:"clash",title:"Mihomo 路由分流面板",subtitle:"192.168.31.1:9999 · ShellCrash",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/clash.png",online:_.services.clash,desc:"小米主路由器透明网关控制台,实时监控全屋设备流量、分流规则与狮城 AI 算力专线锁定状态。",edgeUrl:"https://clash.home.961504.xyz:10443/ui/",homeUrl:"https://clash.home.961504.xyz:10443/ui/",lanUrl:"http://192.168.31.1:9999/ui/",stats:[{label:"AI 锁定策略",value:"狮城节点",highlight:!0},{label:"新加坡延迟",value:_.network.sg_delay_ms>0?`${_.network.sg_delay_ms} ms`:"直连"},{label:"固定出口 IP",value:_.network.sg_egress_ip}]},{id:"router",title:"小米主路由器后台",subtitle:"192.168.31.1 · PPPoE 公网网关",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/openwrt.png",online:_.services.router,desc:"管理家庭联通公网宽带拨号、DHCP 静态 IP 绑定、10443 与 41641 端口转发及全屋内网 Split-DNS。",edgeUrl:"https://router.home.961504.xyz:10443",homeUrl:"https://router.home.961504.xyz:10443",lanUrl:"http://192.168.31.1",stats:[{label:"联通公网 IPv4",value:_.network.home_wan_ip,highlight:!0},{label:"泛域名 DDNS",value:"*.home.961504.xyz"},{label:"内网网关",value:"192.168.31.1"}]},{id:"uptime",title:"Uptime Kuma 外部哨兵",subtitle:"status.961504.xyz · SG Azure",iconUrl:"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/uptime-kuma.png",online:_.services.uptime,desc:"独立部署在新加坡 Azure 公有云上的 24 小时外部监控哨兵,通过 Tailscale P2P 专线实时探测家庭服务。",edgeUrl:"https://status.961504.xyz",homeUrl:"https://status.961504.xyz",lanUrl:"https://status.961504.xyz",stats:[{label:"云端公网 IP",value:"104.43.105.243"},{label:"Tailscale 专线",value:"100.115.204.51"},{label:"外部探测状态",value:"100% 在线",highlight:!0}]}]}]},[x]);return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[A&&s.jsxs("div",{className:"fixed bottom-5 right-5 z-50 hl-card px-4 py-3 flex items-center gap-2.5 shadow-2xl",children:[s.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--success)"}}),s.jsx("span",{className:"text-xs font-medium",children:A})]}),s.jsx(iy,{}),N==="storybook"?s.jsx(dy,{}):s.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 space-y-7",children:[D.map(_=>s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between px-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"var(--text-muted)"},children:_.title}),s.jsxs("span",{className:"text-[11px] font-mono-num",style:{color:"var(--text-subtle)"},children:["· ",_.subtitle]})]}),_.showRouteHint&&s.jsxs("span",{className:"text-[11px] font-mono-num hidden sm:inline",style:{color:"var(--text-subtle)"},children:["当前路由模式: ",k]})]}),s.jsx("div",{className:`grid ${F}`,children:_.items.map(B=>s.jsx(x0,{card:B},B.id))})]},_.title)),s.jsx(p0,{})]}),s.jsx(sy,{}),s.jsx(oy,{})]})};A1.createRoot(document.getElementById("root")).render(s.jsx(Gc.StrictMode,{children:s.jsx(my,{})}));