diff --git a/backend/services/system.py b/backend/services/system.py index 06c6fac..24dda4b 100644 --- a/backend/services/system.py +++ b/backend/services/system.py @@ -23,16 +23,25 @@ def _read_int(path: str) -> int | None: def _gpu_sysfs() -> dict | None: - """AMD-GPU-Auslastung + VRAM via sysfs (Linux). None, wenn nicht vorhanden.""" - base = "/sys/class/drm/card0/device" - if not os.path.isdir(base): - return None - busy = _read_int(f"{base}/gpu_busy_percent") - vram_used = _read_int(f"{base}/mem_info_vram_used") - vram_total = _read_int(f"{base}/mem_info_vram_total") - if busy is None and vram_used is None: - return None - return {"busy_percent": busy, "vram_used": vram_used, "vram_total": vram_total} + """AMD-GPU-Auslastung + Speicher via sysfs (Linux). Findet die Basis-Card + dynamisch (Strix Halo ist oft card1, nicht card0) und überspringt die + Connector-Verzeichnisse (card1-DP-1 …). Strix Halo nutzt Unified Memory → + GTT ist der eigentliche große Pool; VRAM ist nur der kleine Carve-out.""" + for dev in sorted(glob.glob("/sys/class/drm/card*/device")): + card = dev.split("/")[-2] # z.B. "card1" oder "card1-DP-1" + if "-" in card: # Connector-Dir → kein GPU-Device + continue + busy = _read_int(f"{dev}/gpu_busy_percent") + if busy is None: + continue + return { + "busy_percent": busy, + "vram_used": _read_int(f"{dev}/mem_info_vram_used"), + "vram_total": _read_int(f"{dev}/mem_info_vram_total"), + "gtt_used": _read_int(f"{dev}/mem_info_gtt_used"), + "gtt_total": _read_int(f"{dev}/mem_info_gtt_total"), + } + return None def _temps() -> dict | None: diff --git a/frontend/dist/assets/index-BYe3GDjZ.js b/frontend/dist/assets/index-CDBFzDBf.js similarity index 86% rename from frontend/dist/assets/index-BYe3GDjZ.js rename to frontend/dist/assets/index-CDBFzDBf.js index d0802af..949ef9d 100644 --- a/frontend/dist/assets/index-BYe3GDjZ.js +++ b/frontend/dist/assets/index-CDBFzDBf.js @@ -34,10 +34,10 @@ function fm(l,u){for(var s=0;sh||o[a]!==i[h]){var y=` -`+o[a].replace(" at new "," at ");return e.displayName&&y.includes("")&&(y=y.replace("",e.displayName)),y}while(1<=a&&0<=h);break}}}finally{A=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function D(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1),e;case 11:return e=B(e.type.render,!1),e;case 1:return e=B(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case se:return"Fragment";case ne:return"Portal";case de:return"Profiler";case ye:return"StrictMode";case Le:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case xe:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oe:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(t);case 8:return t===ye?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ue(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function De(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nl(e){e._valueTracker||(e._valueTracker=De(e))}function Js(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bo(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ue(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tu(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Mo(e,t){tu(e,t);var n=ue(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?To(e,t.type,n):t.hasOwnProperty("defaultValue")&&To(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function To(e,t,n){(t!=="number"||rl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function _n(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vf=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){vf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function uu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function au(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var gf=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zo(e,t){if(t){if(gf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Io(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Do=null;function Ao(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fo=null,Pn=null,Rn=null;function cu(e){if(e=Or(e)){if(typeof Fo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=_l(t),Fo(e.stateNode,e.type,t))}}function du(e){Pn?Rn?Rn.push(e):Rn=[e]:Pn=e}function fu(){if(Pn){var e=Pn,t=Rn;if(Rn=Pn=null,cu(e),t)for(e=0;e>>=0,e===0?32:31-(Pf(e)/Rf|0)|0}var al=64,cl=4194304;function vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var h=a&~o;h!==0?r=vr(h):(i&=a,i!==0&&(r=vr(i)))}else a=n&~o,a!==0?r=vr(a):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function Lf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nr),Uu=" ",Bu=!1;function $u(e,t){switch(e){case"keyup":return sp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function ap(e,t){switch(e){case"compositionend":return Vu(t);case"keypress":return t.which!==32?null:(Bu=!0,Uu);case"textInput":return e=t.data,e===Uu&&Bu?null:e;default:return null}}function cp(e,t){if(Tn)return e==="compositionend"||!ri&&$u(e,t)?(e=Ou(),vl=Zo=Wt=null,Tn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function qu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ju(){for(var e=window,t=rl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rl(e.document)}return t}function ii(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xp(e){var t=Ju(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qu(n.ownerDocument.documentElement,n)){if(r!==null&&ii(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Zu(n,i);var a=Zu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ln=null,si=null,Rr=null,ui=!1;function ea(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ui||Ln==null||Ln!==rl(r)||(r=Ln,"selectionStart"in r&&ii(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&Pr(Rr,r)||(Rr=r,r=Cl(si,"onSelect"),0An||(e.current=wi[An],wi[An]=null,An--)}function ge(e,t){An++,wi[An]=e.current,e.current=t}var Qt={},We=Kt(Qt),Ze=Kt(!1),pn=Qt;function Fn(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function Pl(){ke(Ze),ke(We)}function ha(e,t,n){if(We.current!==Qt)throw Error(s(168));ge(We,t),ge(Ze,n)}function va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(s(108,re(e)||"Unknown",o));return U({},n,r)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,pn=We.current,ge(We,e),ge(Ze,Ze.current),!0}function ga(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=va(e,t,pn),r.__reactInternalMemoizedMergedChildContext=e,ke(Ze),ke(We),ge(We,e)):ke(Ze),ge(Ze,n)}var Mt=null,bl=!1,ki=!1;function ya(e){Mt===null?Mt=[e]:Mt.push(e)}function Mp(e){bl=!0,ya(e)}function Yt(){if(!ki&&Mt!==null){ki=!0;var e=0,t=ve;try{var n=Mt;for(ve=1;e>=a,o-=a,Tt=1<<32-mt(t)+o|n<oe?(Ue=ee,ee=null):Ue=ee.sibling;var me=T(S,ee,E[oe],I);if(me===null){ee===null&&(ee=Ue);break}e&&ee&&me.alternate===null&&t(S,ee),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me,ee=Ue}if(oe===E.length)return n(S,ee),Ee&&hn(S,oe),X;if(ee===null){for(;oeoe?(Ue=ee,ee=null):Ue=ee.sibling;var ln=T(S,ee,me.value,I);if(ln===null){ee===null&&(ee=Ue);break}e&&ee&&ln.alternate===null&&t(S,ee),x=i(ln,x,oe),J===null?X=ln:J.sibling=ln,J=ln,ee=Ue}if(me.done)return n(S,ee),Ee&&hn(S,oe),X;if(ee===null){for(;!me.done;oe++,me=E.next())me=z(S,me.value,I),me!==null&&(x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return Ee&&hn(S,oe),X}for(ee=r(S,ee);!me.done;oe++,me=E.next())me=$(ee,S,oe,me.value,I),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?oe:me.key),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(dm){return t(S,dm)}),Ee&&hn(S,oe),X}function Me(S,x,E,I){if(typeof E=="object"&&E!==null&&E.type===se&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case le:e:{for(var X=E.key,J=x;J!==null;){if(J.key===X){if(X=E.type,X===se){if(J.tag===7){n(S,J.sibling),x=o(J,E.props.children),x.return=S,S=x;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===je&&Ca(X)===J.type){n(S,J.sibling),x=o(J,E.props),x.ref=zr(S,J,E),x.return=S,S=x;break e}n(S,J);break}else t(S,J);J=J.sibling}E.type===se?(x=En(E.props.children,S.mode,I,E.key),x.return=S,S=x):(I=lo(E.type,E.key,E.props,null,S.mode,I),I.ref=zr(S,x,E),I.return=S,S=I)}return a(S);case ne:e:{for(J=E.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===E.containerInfo&&x.stateNode.implementation===E.implementation){n(S,x.sibling),x=o(x,E.children||[]),x.return=S,S=x;break e}else{n(S,x);break}else t(S,x);x=x.sibling}x=ys(E,S.mode,I),x.return=S,S=x}return a(S);case je:return J=E._init,Me(S,x,J(E._payload),I)}if(cr(E))return K(S,x,E,I);if(Z(E))return Q(S,x,E,I);Ol(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,x!==null&&x.tag===6?(n(S,x.sibling),x=o(x,E),x.return=S,S=x):(n(S,x),x=gs(E,S.mode,I),x.return=S,S=x),a(S)):n(S,x)}return Me}var Vn=Na(!0),ja=Na(!1),zl=Kt(null),Il=null,Wn=null,_i=null;function Pi(){_i=Wn=Il=null}function Ri(e){var t=zl.current;ke(zl),e._currentValue=t}function bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hn(e,t){Il=e,_i=Wn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Je=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},Wn===null){if(Il===null)throw Error(s(308));Wn=e,Il.dependencies={lanes:0,firstContext:e}}else Wn=Wn.next=e;return t}var vn=null;function Mi(e){vn===null?vn=[e]:vn.push(e)}function _a(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xt=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ot(e,n)}return o=r.interleaved,o===null?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ot(e,n)}function Dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Go(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Al(e,t,n,r){var o=e.updateQueue;Xt=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,h=o.shared.pending;if(h!==null){o.shared.pending=null;var y=h,N=y.next;y.next=null,a===null?i=N:a.next=N,a=y;var O=e.alternate;O!==null&&(O=O.updateQueue,h=O.lastBaseUpdate,h!==a&&(h===null?O.firstBaseUpdate=N:h.next=N,O.lastBaseUpdate=y))}if(i!==null){var z=o.baseState;a=0,O=N=y=null,h=i;do{var T=h.lane,$=h.eventTime;if((r&T)===T){O!==null&&(O=O.next={eventTime:$,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var K=e,Q=h;switch(T=t,$=n,Q.tag){case 1:if(K=Q.payload,typeof K=="function"){z=K.call($,z,T);break e}z=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=Q.payload,T=typeof K=="function"?K.call($,z,T):K,T==null)break e;z=U({},z,T);break e;case 2:Xt=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,T=o.effects,T===null?o.effects=[h]:T.push(h))}else $={eventTime:$,lane:T,tag:h.tag,payload:h.payload,callback:h.callback,next:null},O===null?(N=O=$,y=z):O=O.next=$,a|=T;if(h=h.next,h===null){if(h=o.shared.pending,h===null)break;T=h,h=T.next,T.next=null,o.lastBaseUpdate=T,o.shared.pending=null}}while(!0);if(O===null&&(y=z),o.baseState=y,o.firstBaseUpdate=N,o.lastBaseUpdate=O,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);xn|=a,e.lanes=a,e.memoizedState=z}}function ba(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Di.transition;Di.transition={};try{e(!1),t()}finally{ve=n,Di.transition=r}}function Ya(){return dt().memoizedState}function zp(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))Za(t,n);else if(n=_a(e,t,n,r),n!==null){var o=Xe();wt(n,e,r,o),qa(n,t,r)}}function Ip(e,t,n){var r=tn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))Za(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,h=i(a,n);if(o.hasEagerState=!0,o.eagerState=h,ht(h,a)){var y=t.interleaved;y===null?(o.next=o,Mi(t)):(o.next=y.next,y.next=o),t.interleaved=o;return}}catch{}finally{}n=_a(e,t,o,r),n!==null&&(o=Xe(),wt(n,e,r,o),qa(n,t,r))}}function Xa(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function Za(e,t){Fr=Bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qa(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Go(e,n)}}var Wl={readContext:ct,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Dp={readContext:ct,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Ba,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$l(4194308,4,Wa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zp.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:Wi,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Op.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=jt();if(Ee){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Fe===null)throw Error(s(349));(yn&30)!==0||Oa(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ba(Ia.bind(null,r,i,e),[e]),r.flags|=2048,$r(9,za.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=Fe.identifierPrefix;if(Ee){var n=Lt,r=Tt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ur++,0")&&(y=y.replace("",e.displayName)),y}while(1<=a&&0<=h);break}}}finally{A=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function D(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1),e;case 11:return e=B(e.type.render,!1),e;case 1:return e=B(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case se:return"Fragment";case ne:return"Portal";case de:return"Profiler";case ye:return"StrictMode";case Le:return"Suspense";case Ne:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case xe:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oe:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(t);case 8:return t===ye?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ue(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function De(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nl(e){e._valueTracker||(e._valueTracker=De(e))}function Js(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bo(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ue(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tu(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Mo(e,t){tu(e,t);var n=ue(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?To(e,t.type,n):t.hasOwnProperty("defaultValue")&&To(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function To(e,t,n){(t!=="number"||rl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function Pn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vf=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){vf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function uu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function au(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var gf=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zo(e,t){if(t){if(gf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Io(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Do=null;function Ao(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fo=null,Rn=null,bn=null;function cu(e){if(e=Or(e)){if(typeof Fo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=_l(t),Fo(e.stateNode,e.type,t))}}function du(e){Rn?bn?bn.push(e):bn=[e]:Rn=e}function fu(){if(Rn){var e=Rn,t=bn;if(bn=Rn=null,cu(e),t)for(e=0;e>>=0,e===0?32:31-(Pf(e)/Rf|0)|0}var al=64,cl=4194304;function vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var h=a&~o;h!==0?r=vr(h):(i&=a,i!==0&&(r=vr(i)))}else a=n&~o,a!==0?r=vr(a):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function Lf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nr),Uu=" ",Bu=!1;function $u(e,t){switch(e){case"keyup":return sp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function ap(e,t){switch(e){case"compositionend":return Vu(t);case"keypress":return t.which!==32?null:(Bu=!0,Uu);case"textInput":return e=t.data,e===Uu&&Bu?null:e;default:return null}}function cp(e,t){if(Ln)return e==="compositionend"||!ri&&$u(e,t)?(e=Ou(),vl=Zo=Wt=null,Ln=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function qu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ju(){for(var e=window,t=rl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rl(e.document)}return t}function ii(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xp(e){var t=Ju(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qu(n.ownerDocument.documentElement,n)){if(r!==null&&ii(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Zu(n,i);var a=Zu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,On=null,si=null,Rr=null,ui=!1;function ea(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ui||On==null||On!==rl(r)||(r=On,"selectionStart"in r&&ii(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&Pr(Rr,r)||(Rr=r,r=Cl(si,"onSelect"),0Fn||(e.current=wi[Fn],wi[Fn]=null,Fn--)}function ge(e,t){Fn++,wi[Fn]=e.current,e.current=t}var Qt={},We=Kt(Qt),Ze=Kt(!1),mn=Qt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function Pl(){ke(Ze),ke(We)}function ha(e,t,n){if(We.current!==Qt)throw Error(s(168));ge(We,t),ge(Ze,n)}function va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(s(108,re(e)||"Unknown",o));return U({},n,r)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,mn=We.current,ge(We,e),ge(Ze,Ze.current),!0}function ga(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=va(e,t,mn),r.__reactInternalMemoizedMergedChildContext=e,ke(Ze),ke(We),ge(We,e)):ke(Ze),ge(Ze,n)}var Mt=null,bl=!1,ki=!1;function ya(e){Mt===null?Mt=[e]:Mt.push(e)}function Mp(e){bl=!0,ya(e)}function Yt(){if(!ki&&Mt!==null){ki=!0;var e=0,t=ve;try{var n=Mt;for(ve=1;e>=a,o-=a,Tt=1<<32-mt(t)+o|n<oe?(Ue=ee,ee=null):Ue=ee.sibling;var me=T(S,ee,E[oe],I);if(me===null){ee===null&&(ee=Ue);break}e&&ee&&me.alternate===null&&t(S,ee),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me,ee=Ue}if(oe===E.length)return n(S,ee),Ee&&vn(S,oe),X;if(ee===null){for(;oeoe?(Ue=ee,ee=null):Ue=ee.sibling;var ln=T(S,ee,me.value,I);if(ln===null){ee===null&&(ee=Ue);break}e&&ee&&ln.alternate===null&&t(S,ee),x=i(ln,x,oe),J===null?X=ln:J.sibling=ln,J=ln,ee=Ue}if(me.done)return n(S,ee),Ee&&vn(S,oe),X;if(ee===null){for(;!me.done;oe++,me=E.next())me=z(S,me.value,I),me!==null&&(x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return Ee&&vn(S,oe),X}for(ee=r(S,ee);!me.done;oe++,me=E.next())me=$(ee,S,oe,me.value,I),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?oe:me.key),x=i(me,x,oe),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(dm){return t(S,dm)}),Ee&&vn(S,oe),X}function Me(S,x,E,I){if(typeof E=="object"&&E!==null&&E.type===se&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case le:e:{for(var X=E.key,J=x;J!==null;){if(J.key===X){if(X=E.type,X===se){if(J.tag===7){n(S,J.sibling),x=o(J,E.props.children),x.return=S,S=x;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===je&&Ca(X)===J.type){n(S,J.sibling),x=o(J,E.props),x.ref=zr(S,J,E),x.return=S,S=x;break e}n(S,J);break}else t(S,J);J=J.sibling}E.type===se?(x=Cn(E.props.children,S.mode,I,E.key),x.return=S,S=x):(I=lo(E.type,E.key,E.props,null,S.mode,I),I.ref=zr(S,x,E),I.return=S,S=I)}return a(S);case ne:e:{for(J=E.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===E.containerInfo&&x.stateNode.implementation===E.implementation){n(S,x.sibling),x=o(x,E.children||[]),x.return=S,S=x;break e}else{n(S,x);break}else t(S,x);x=x.sibling}x=ys(E,S.mode,I),x.return=S,S=x}return a(S);case je:return J=E._init,Me(S,x,J(E._payload),I)}if(cr(E))return K(S,x,E,I);if(Z(E))return Q(S,x,E,I);Ol(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,x!==null&&x.tag===6?(n(S,x.sibling),x=o(x,E),x.return=S,S=x):(n(S,x),x=gs(E,S.mode,I),x.return=S,S=x),a(S)):n(S,x)}return Me}var Wn=Na(!0),ja=Na(!1),zl=Kt(null),Il=null,Hn=null,_i=null;function Pi(){_i=Hn=Il=null}function Ri(e){var t=zl.current;ke(zl),e._currentValue=t}function bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gn(e,t){Il=e,_i=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Je=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},Hn===null){if(Il===null)throw Error(s(308));Hn=e,Il.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return t}var gn=null;function Mi(e){gn===null?gn=[e]:gn.push(e)}function _a(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xt=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ot(e,n)}return o=r.interleaved,o===null?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ot(e,n)}function Dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Go(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Al(e,t,n,r){var o=e.updateQueue;Xt=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,h=o.shared.pending;if(h!==null){o.shared.pending=null;var y=h,N=y.next;y.next=null,a===null?i=N:a.next=N,a=y;var O=e.alternate;O!==null&&(O=O.updateQueue,h=O.lastBaseUpdate,h!==a&&(h===null?O.firstBaseUpdate=N:h.next=N,O.lastBaseUpdate=y))}if(i!==null){var z=o.baseState;a=0,O=N=y=null,h=i;do{var T=h.lane,$=h.eventTime;if((r&T)===T){O!==null&&(O=O.next={eventTime:$,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var K=e,Q=h;switch(T=t,$=n,Q.tag){case 1:if(K=Q.payload,typeof K=="function"){z=K.call($,z,T);break e}z=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=Q.payload,T=typeof K=="function"?K.call($,z,T):K,T==null)break e;z=U({},z,T);break e;case 2:Xt=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,T=o.effects,T===null?o.effects=[h]:T.push(h))}else $={eventTime:$,lane:T,tag:h.tag,payload:h.payload,callback:h.callback,next:null},O===null?(N=O=$,y=z):O=O.next=$,a|=T;if(h=h.next,h===null){if(h=o.shared.pending,h===null)break;T=h,h=T.next,T.next=null,o.lastBaseUpdate=T,o.shared.pending=null}}while(!0);if(O===null&&(y=z),o.baseState=y,o.firstBaseUpdate=N,o.lastBaseUpdate=O,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);wn|=a,e.lanes=a,e.memoizedState=z}}function ba(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Di.transition;Di.transition={};try{e(!1),t()}finally{ve=n,Di.transition=r}}function Ya(){return dt().memoizedState}function zp(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))Za(t,n);else if(n=_a(e,t,n,r),n!==null){var o=Xe();wt(n,e,r,o),qa(n,t,r)}}function Ip(e,t,n){var r=tn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))Za(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,h=i(a,n);if(o.hasEagerState=!0,o.eagerState=h,ht(h,a)){var y=t.interleaved;y===null?(o.next=o,Mi(t)):(o.next=y.next,y.next=o),t.interleaved=o;return}}catch{}finally{}n=_a(e,t,o,r),n!==null&&(o=Xe(),wt(n,e,r,o),qa(n,t,r))}}function Xa(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function Za(e,t){Fr=Bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qa(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Go(e,n)}}var Wl={readContext:ct,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Dp={readContext:ct,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Ba,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$l(4194308,4,Wa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zp.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:Wi,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Op.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,o=jt();if(Ee){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Fe===null)throw Error(s(349));(xn&30)!==0||Oa(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ba(Ia.bind(null,r,i,e),[e]),r.flags|=2048,$r(9,za.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=Fe.identifierPrefix;if(Ee){var n=Lt,r=Tt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ur++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Ct]=t,e[Lr]=r,yc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Io(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;oXn&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ee)return Ge(t),null}else 2*be()-i.renderingStartTime>Xn&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=be(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return ms(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(st&1073741824)!==0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Hp(e,t){switch(Ei(t),t.tag){case 1:return qe(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gn(),ke(Ze),ke(We),Ii(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oi(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return Gn(),null;case 10:return Ri(t.type._context),null;case 22:case 23:return ms(),null;case 24:return null;default:return null}}var Ql=!1,Ke=!1,Gp=typeof WeakSet=="function"?WeakSet:Set,G=null;function Qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function ns(e,t,n){try{n()}catch(r){Re(e,t,r)}}var kc=!1;function Kp(e,t){if(mi=ml,e=Ju(),ii(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,h=-1,y=-1,N=0,O=0,z=e,T=null;t:for(;;){for(var $;z!==n||o!==0&&z.nodeType!==3||(h=a+o),z!==i||r!==0&&z.nodeType!==3||(y=a+r),z.nodeType===3&&(a+=z.nodeValue.length),($=z.firstChild)!==null;)T=z,z=$;for(;;){if(z===e)break t;if(T===n&&++N===o&&(h=a),T===i&&++O===r&&(y=a),($=z.nextSibling)!==null)break;z=T,T=z.parentNode}z=$}n=h===-1||y===-1?null:{start:h,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(hi={focusedElem:e,selectionRange:n},ml=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var K=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var Q=K.memoizedProps,Me=K.memoizedState,S=t.stateNode,x=S.getSnapshotBeforeUpdate(t.elementType===t.type?Q:gt(t.type,Q),Me);S.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(I){Re(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return K=kc,kc=!1,K}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ns(t,n,i)}o=o.next}while(o!==r)}}function Yl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[Lr],delete t[xi],delete t[Rp],delete t[bp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ls(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jl));else if(r!==4&&(e=e.child,e!==null))for(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}function os(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}var Be=null,yt=!1;function qt(e,t,n){for(n=n.child;n!==null;)Nc(e,t,n),n=n.sibling}function Nc(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(ul,n)}catch{}switch(n.tag){case 5:Ke||Qn(n,t);case 6:var r=Be,o=yt;Be=null,qt(e,t,n),Be=r,yt=o,Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?yi(e.parentNode,n):e.nodeType===1&&yi(e,n),Sr(e)):yi(Be,n.stateNode));break;case 4:r=Be,o=yt,Be=n.stateNode.containerInfo,yt=!0,qt(e,t,n),Be=r,yt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&ns(n,t,a),o=o.next}while(o!==r)}qt(e,t,n);break;case 1:if(!Ke&&(Qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){Re(n,t,h)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,qt(e,t,n),Ke=r):qt(e,t,n);break;default:qt(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Gp),t.forEach(function(r){var o=nm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yp(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,eo=0,(pe&6)!==0)throw Error(s(331));var o=pe;for(pe|=4,G=e.current;G!==null;){var i=G,a=i.child;if((G.flags&16)!==0){var h=i.deletions;if(h!==null){for(var y=0;ybe()-us?kn(e,0):ss|=n),tt(e,t)}function Fc(e,t){t===0&&((e.mode&1)===0?t=1:(t=cl,cl<<=1,(cl&130023424)===0&&(cl=4194304)));var n=Xe();e=Ot(e,t),e!==null&&(gr(e,t,n),tt(e,n))}function tm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fc(e,n)}function nm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Fc(e,n)}var Uc;Uc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Je=!1,Vp(e,t,n);Je=(e.flags&131072)!==0}else Je=!1,Ee&&(t.flags&1048576)!==0&&xa(t,Tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kl(e,t),e=t.pendingProps;var o=Fn(t,We.current);Hn(t,n),o=Fi(null,t,r,e,o,n);var i=Ui();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)?(i=!0,Rl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ti(t),o.updater=Hl,t.stateNode=o,o._reactInternals=t,Gi(t,r,e,n),t=Xi(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&Si(t),Ye(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=lm(r),e=gt(r,e),o){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=fc(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=uc(null,t,r,gt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Yi(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),fc(e,t,r,o,n);case 3:e:{if(pc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Pa(e,t),Al(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Kn(Error(s(423)),t),t=mc(e,t,r,n,o);break e}else if(r!==o){o=Kn(Error(s(424)),t),t=mc(e,t,r,n,o);break e}else for(it=Gt(t.stateNode.containerInfo.firstChild),ot=t,Ee=!0,vt=null,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($n(),r===o){t=It(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return Ma(t),e===null&&Ni(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,vi(r,o)?a=null:i!==null&&vi(r,i)&&(t.flags|=32),dc(e,t),Ye(e,t,a,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return hc(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vn(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),sc(e,t,r,o,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ge(zl,r._currentValue),r._currentValue=a,i!==null)if(ht(i.value,a)){if(i.children===o.children&&!Ze.current){t=It(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var h=i.dependencies;if(h!==null){a=i.child;for(var y=h.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=zt(-1,n&-n),y.tag=2;var N=i.updateQueue;if(N!==null){N=N.shared;var O=N.pending;O===null?y.next=y:(y.next=O.next,O.next=y),N.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),bi(i.return,n,t),h.lanes|=n;break}y=y.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(s(341));a.lanes|=n,h=a.alternate,h!==null&&(h.lanes|=n),bi(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hn(t,n),o=ct(o),r=r(o),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),uc(e,t,r,o,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Kl(e,t),t.tag=1,qe(r)?(e=!0,Rl(t)):e=!1,Hn(t,n),ec(t,r,o),Gi(t,r,o,n),Xi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 22:return cc(e,t,n)}throw Error(s(156,t.tag))};function Bc(e,t){return wu(e,t)}function rm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,n,r){return new rm(e,t,n,r)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return vs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Oe)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function lo(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")vs(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case se:return En(n.children,o,i,t);case ye:a=8,o|=8;break;case de:return e=pt(12,n,t,o|2),e.elementType=de,e.lanes=i,e;case Le:return e=pt(13,n,t,o),e.elementType=Le,e.lanes=i,e;case Ne:return e=pt(19,n,t,o),e.elementType=Ne,e.lanes=i,e;case he:return oo(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:a=10;break e;case Ce:a=9;break e;case ie:a=11;break e;case Oe:a=14;break e;case je:a=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=pt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function En(e,t,n,r){return e=pt(7,e,r,t),e.lanes=n,e}function oo(e,t,n,r){return e=pt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function om(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xs(e,t,n,r,o,i,a,h,y){return e=new om(e,t,n,h,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(i),e}function im(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ns.exports=ym(),Ns.exports}var td;function xm(){if(td)return po;td=1;var l=Nd();return po.createRoot=l.createRoot,po.hydrateRoot=l.hydrateRoot,po}var wm=xm();const km=Ed(wm);/** +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ki(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Up=typeof WeakMap=="function"?WeakMap:Map;function nc(e,t,n){n=zt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ql||(ql=!0,as=r),Qi(e,t)},n}function rc(e,t,n){n=zt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Qi(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Qi(e,t),typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function lc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Up;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=em.bind(null,e,t,n),t.then(e,e))}function oc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ic(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zt(-1,1),t.tag=2,Zt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Bp=q.ReactCurrentOwner,Je=!1;function Ye(e,t,n,r){t.child=e===null?ja(t,null,n,r):Wn(t,e.child,n,r)}function sc(e,t,n,r,o){n=n.render;var i=t.ref;return Gn(t,o),r=Fi(e,t,n,r,i,o),n=Ui(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,It(e,t,o)):(Ee&&n&&Si(t),t.flags|=1,Ye(e,t,r,o),t.child)}function uc(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!vs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ac(e,t,i,r,o)):(e=lo(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Pr,n(a,r)&&e.ref===t.ref)return It(e,t,o)}return t.flags|=1,e=rn(i,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Pr(i,r)&&e.ref===t.ref)if(Je=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,It(e,t,o)}return Yi(e,t,n,r,o)}function cc(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(Xn,st),st|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(Xn,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ge(Xn,st),st|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ge(Xn,st),st|=r;return Ye(e,t,o,n),t.child}function dc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Yi(e,t,n,r,o){var i=qe(n)?mn:We.current;return i=Un(t,i),Gn(t,o),n=Fi(e,t,n,r,i,o),r=Ui(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,It(e,t,o)):(Ee&&r&&Si(t),t.flags|=1,Ye(e,t,n,o),t.child)}function fc(e,t,n,r,o){if(qe(n)){var i=!0;Rl(t)}else i=!1;if(Gn(t,o),t.stateNode===null)Kl(e,t),ec(t,n,r),Gi(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,h=t.memoizedProps;a.props=h;var y=a.context,N=n.contextType;typeof N=="object"&&N!==null?N=ct(N):(N=qe(n)?mn:We.current,N=Un(t,N));var O=n.getDerivedStateFromProps,z=typeof O=="function"||typeof a.getSnapshotBeforeUpdate=="function";z||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(h!==r||y!==N)&&tc(t,a,r,N),Xt=!1;var T=t.memoizedState;a.state=T,Al(t,r,a,o),y=t.memoizedState,h!==r||T!==y||Ze.current||Xt?(typeof O=="function"&&(Hi(t,n,O,r),y=t.memoizedState),(h=Xt||Ja(t,n,h,r,T,y,N))?(z||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=N,r=h):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),h=t.memoizedProps,N=t.type===t.elementType?h:gt(t.type,h),a.props=N,z=t.pendingProps,T=a.context,y=n.contextType,typeof y=="object"&&y!==null?y=ct(y):(y=qe(n)?mn:We.current,y=Un(t,y));var $=n.getDerivedStateFromProps;(O=typeof $=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(h!==z||T!==y)&&tc(t,a,r,y),Xt=!1,T=t.memoizedState,a.state=T,Al(t,r,a,o);var K=t.memoizedState;h!==z||T!==K||Ze.current||Xt?(typeof $=="function"&&(Hi(t,n,$,r),K=t.memoizedState),(N=Xt||Ja(t,n,N,r,T,K,y)||!1)?(O||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,K,y),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,K,y)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=K),a.props=r,a.state=K,a.context=y,r=N):(typeof a.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),r=!1)}return Xi(e,t,n,r,i,o)}function Xi(e,t,n,r,o,i){dc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&ga(t,n,!1),It(e,t,i);r=t.stateNode,Bp.current=t;var h=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Wn(t,e.child,null,i),t.child=Wn(t,null,h,i)):Ye(e,t,h,i),t.memoizedState=r.state,o&&ga(t,n,!0),t.child}function pc(e){var t=e.stateNode;t.pendingContext?ha(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ha(e,t.context,!1),Li(e,t.containerInfo)}function mc(e,t,n,r,o){return Vn(),ji(o),t.flags|=256,Ye(e,t,n,r),t.child}var Zi={dehydrated:null,treeContext:null,retryLane:0};function qi(e){return{baseLanes:e,cachePool:null,transitions:null}}function hc(e,t,n){var r=t.pendingProps,o=_e.current,i=!1,a=(t.flags&128)!==0,h;if((h=a)||(h=e!==null&&e.memoizedState===null?!1:(o&2)!==0),h?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(_e,o&1),e===null)return Ni(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=oo(a,r,0,null),e=Cn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=qi(n),t.memoizedState=Zi,e):Ji(t,a));if(o=e.memoizedState,o!==null&&(h=o.dehydrated,h!==null))return $p(e,t,a,r,h,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,h=o.sibling;var y={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=y,t.deletions=null):(r=rn(o,y),r.subtreeFlags=o.subtreeFlags&14680064),h!==null?i=rn(h,i):(i=Cn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?qi(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Zi,r}return i=e.child,e=i.sibling,r=rn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ji(e,t){return t=oo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gl(e,t,n,r){return r!==null&&ji(r),Wn(t,e.child,null,n),e=Ji(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $p(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Ki(Error(s(422))),Gl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=oo({mode:"visible",children:r.children},o,0,null),i=Cn(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Wn(t,e.child,null,a),t.child.memoizedState=qi(a),t.memoizedState=Zi,i);if((t.mode&1)===0)return Gl(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var h=r.dgst;return r=h,i=Error(s(419)),r=Ki(i,r,void 0),Gl(e,t,a,r)}if(h=(a&e.childLanes)!==0,Je||h){if(r=Fe,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Ot(e,o),wt(r,e,o,-1))}return hs(),r=Ki(Error(s(421))),Gl(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=tm.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,it=Gt(o.nextSibling),ot=t,Ee=!0,vt=null,e!==null&&(ut[at++]=Tt,ut[at++]=Lt,ut[at++]=hn,Tt=e.id,Lt=e.overflow,hn=t),t=Ji(t,r.children),t.flags|=4096,t)}function vc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),bi(e.return,t,n)}function es(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function gc(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ye(e,t,r.children,n),r=_e.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vc(e,n,t);else if(e.tag===19)vc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(_e,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Fl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),es(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Fl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}es(t,!0,n,null,i);break;case"together":es(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function It(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Vp(e,t,n){switch(t.tag){case 3:pc(t),Vn();break;case 5:Ma(t);break;case 1:qe(t.type)&&Rl(t);break;case 4:Li(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(zl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(_e,_e.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?hc(e,t,n):(ge(_e,_e.current&1),e=It(e,t,n),e!==null?e.sibling:null);ge(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return gc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,cc(e,t,n)}return It(e,t,n)}var yc,ts,xc,wc;yc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ts=function(){},xc=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,yn(Nt.current);var i=null;switch(n){case"input":o=bo(e,o),r=bo(e,r),i=[];break;case"select":o=U({},o,{value:void 0}),r=U({},r,{value:void 0}),i=[];break;case"textarea":o=Lo(e,o),r=Lo(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jl)}zo(n,r);var a;n=null;for(N in o)if(!r.hasOwnProperty(N)&&o.hasOwnProperty(N)&&o[N]!=null)if(N==="style"){var h=o[N];for(a in h)h.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(d.hasOwnProperty(N)?i||(i=[]):(i=i||[]).push(N,null));for(N in r){var y=r[N];if(h=o!=null?o[N]:void 0,r.hasOwnProperty(N)&&y!==h&&(y!=null||h!=null))if(N==="style")if(h){for(a in h)!h.hasOwnProperty(a)||y&&y.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in y)y.hasOwnProperty(a)&&h[a]!==y[a]&&(n||(n={}),n[a]=y[a])}else n||(i||(i=[]),i.push(N,n)),n=y;else N==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,h=h?h.__html:void 0,y!=null&&h!==y&&(i=i||[]).push(N,y)):N==="children"?typeof y!="string"&&typeof y!="number"||(i=i||[]).push(N,""+y):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(d.hasOwnProperty(N)?(y!=null&&N==="onScroll"&&we("scroll",e),i||h===y||(i=[])):(i=i||[]).push(N,y))}n&&(i=i||[]).push("style",n);var N=i;(t.updateQueue=N)&&(t.flags|=4)}},wc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Vr(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wp(e,t,n){var r=t.pendingProps;switch(Ei(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return qe(t.type)&&Pl(),Ge(t),null;case 3:return r=t.stateNode,Kn(),ke(Ze),ke(We),Ii(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ll(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vt!==null&&(fs(vt),vt=null))),ts(e,t),Ge(t),null;case 5:Oi(t);var o=yn(Ar.current);if(n=t.type,e!==null&&t.stateNode!=null)xc(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ge(t),null}if(e=yn(Nt.current),Ll(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ct]=t,r[Lr]=i,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Ct]=t,e[Lr]=r,yc(e,t,!1,!1),t.stateNode=e;e:{switch(a=Io(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;oZn&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ee)return Ge(t),null}else 2*be()-i.renderingStartTime>Zn&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=be(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return ms(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(st&1073741824)!==0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Hp(e,t){switch(Ei(t),t.tag){case 1:return qe(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(),ke(Ze),ke(We),Ii(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oi(t),null;case 13:if(ke(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(_e),null;case 4:return Kn(),null;case 10:return Ri(t.type._context),null;case 22:case 23:return ms(),null;case 24:return null;default:return null}}var Ql=!1,Ke=!1,Gp=typeof WeakSet=="function"?WeakSet:Set,G=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function ns(e,t,n){try{n()}catch(r){Re(e,t,r)}}var kc=!1;function Kp(e,t){if(mi=ml,e=Ju(),ii(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,h=-1,y=-1,N=0,O=0,z=e,T=null;t:for(;;){for(var $;z!==n||o!==0&&z.nodeType!==3||(h=a+o),z!==i||r!==0&&z.nodeType!==3||(y=a+r),z.nodeType===3&&(a+=z.nodeValue.length),($=z.firstChild)!==null;)T=z,z=$;for(;;){if(z===e)break t;if(T===n&&++N===o&&(h=a),T===i&&++O===r&&(y=a),($=z.nextSibling)!==null)break;z=T,T=z.parentNode}z=$}n=h===-1||y===-1?null:{start:h,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(hi={focusedElem:e,selectionRange:n},ml=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var K=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var Q=K.memoizedProps,Me=K.memoizedState,S=t.stateNode,x=S.getSnapshotBeforeUpdate(t.elementType===t.type?Q:gt(t.type,Q),Me);S.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(I){Re(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return K=kc,kc=!1,K}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ns(t,n,i)}o=o.next}while(o!==r)}}function Yl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[Lr],delete t[xi],delete t[Rp],delete t[bp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ls(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jl));else if(r!==4&&(e=e.child,e!==null))for(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}function os(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}var Be=null,yt=!1;function qt(e,t,n){for(n=n.child;n!==null;)Nc(e,t,n),n=n.sibling}function Nc(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(ul,n)}catch{}switch(n.tag){case 5:Ke||Yn(n,t);case 6:var r=Be,o=yt;Be=null,qt(e,t,n),Be=r,yt=o,Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?yi(e.parentNode,n):e.nodeType===1&&yi(e,n),Sr(e)):yi(Be,n.stateNode));break;case 4:r=Be,o=yt,Be=n.stateNode.containerInfo,yt=!0,qt(e,t,n),Be=r,yt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&ns(n,t,a),o=o.next}while(o!==r)}qt(e,t,n);break;case 1:if(!Ke&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){Re(n,t,h)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,qt(e,t,n),Ke=r):qt(e,t,n);break;default:qt(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Gp),t.forEach(function(r){var o=nm.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yp(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,eo=0,(pe&6)!==0)throw Error(s(331));var o=pe;for(pe|=4,G=e.current;G!==null;){var i=G,a=i.child;if((G.flags&16)!==0){var h=i.deletions;if(h!==null){for(var y=0;ybe()-us?Sn(e,0):ss|=n),tt(e,t)}function Fc(e,t){t===0&&((e.mode&1)===0?t=1:(t=cl,cl<<=1,(cl&130023424)===0&&(cl=4194304)));var n=Xe();e=Ot(e,t),e!==null&&(gr(e,t,n),tt(e,n))}function tm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fc(e,n)}function nm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Fc(e,n)}var Uc;Uc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Je=!1,Vp(e,t,n);Je=(e.flags&131072)!==0}else Je=!1,Ee&&(t.flags&1048576)!==0&&xa(t,Tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kl(e,t),e=t.pendingProps;var o=Un(t,We.current);Gn(t,n),o=Fi(null,t,r,e,o,n);var i=Ui();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)?(i=!0,Rl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ti(t),o.updater=Hl,t.stateNode=o,o._reactInternals=t,Gi(t,r,e,n),t=Xi(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&Si(t),Ye(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=lm(r),e=gt(r,e),o){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=fc(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=uc(null,t,r,gt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Yi(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),fc(e,t,r,o,n);case 3:e:{if(pc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Pa(e,t),Al(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Qn(Error(s(423)),t),t=mc(e,t,r,n,o);break e}else if(r!==o){o=Qn(Error(s(424)),t),t=mc(e,t,r,n,o);break e}else for(it=Gt(t.stateNode.containerInfo.firstChild),ot=t,Ee=!0,vt=null,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===o){t=It(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return Ma(t),e===null&&Ni(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,vi(r,o)?a=null:i!==null&&vi(r,i)&&(t.flags|=32),dc(e,t),Ye(e,t,a,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return hc(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),sc(e,t,r,o,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ge(zl,r._currentValue),r._currentValue=a,i!==null)if(ht(i.value,a)){if(i.children===o.children&&!Ze.current){t=It(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var h=i.dependencies;if(h!==null){a=i.child;for(var y=h.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=zt(-1,n&-n),y.tag=2;var N=i.updateQueue;if(N!==null){N=N.shared;var O=N.pending;O===null?y.next=y:(y.next=O.next,O.next=y),N.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),bi(i.return,n,t),h.lanes|=n;break}y=y.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(s(341));a.lanes|=n,h=a.alternate,h!==null&&(h.lanes|=n),bi(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ye(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Gn(t,n),o=ct(o),r=r(o),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),uc(e,t,r,o,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),Kl(e,t),t.tag=1,qe(r)?(e=!0,Rl(t)):e=!1,Gn(t,n),ec(t,r,o),Gi(t,r,o,n),Xi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 22:return cc(e,t,n)}throw Error(s(156,t.tag))};function Bc(e,t){return wu(e,t)}function rm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,n,r){return new rm(e,t,n,r)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return vs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Oe)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function lo(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")vs(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case se:return Cn(n.children,o,i,t);case ye:a=8,o|=8;break;case de:return e=pt(12,n,t,o|2),e.elementType=de,e.lanes=i,e;case Le:return e=pt(13,n,t,o),e.elementType=Le,e.lanes=i,e;case Ne:return e=pt(19,n,t,o),e.elementType=Ne,e.lanes=i,e;case he:return oo(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:a=10;break e;case Ce:a=9;break e;case ie:a=11;break e;case Oe:a=14;break e;case je:a=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=pt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Cn(e,t,n,r){return e=pt(7,e,r,t),e.lanes=n,e}function oo(e,t,n,r){return e=pt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function om(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xs(e,t,n,r,o,i,a,h,y){return e=new om(e,t,n,h,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(i),e}function im(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),Ns.exports=ym(),Ns.exports}var td;function xm(){if(td)return po;td=1;var l=Nd();return po.createRoot=l.createRoot,po.hydrateRoot=l.hydrateRoot,po}var wm=xm();const km=Ed(wm);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -137,7 +137,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fm=Qe("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"}]]),Us=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:jm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:zm},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Tm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:_m},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Om},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:Nm}];var nd=1,Um=.9,Bm=.8,$m=.17,Ps=.1,Rs=.999,Vm=.9999,Wm=.99,Hm=/[\\\/_+.#"@\[\(\{&]/,Gm=/[\\\/_+.#"@\[\(\{&]/g,Km=/[\s-]/,_d=/[\s-]/g;function Bs(l,u,s,c,d,f,v){if(f===u.length)return d===l.length?nd:Wm;var m=`${d},${f}`;if(v[m]!==void 0)return v[m];for(var j=c.charAt(f),C=s.indexOf(j,d),P=0,_,M,L,H;C>=0;)_=Bs(l,u,s,c,C+1,f+1,v),_>P&&(C===d?_*=nd:Hm.test(l.charAt(C-1))?(_*=Bm,L=l.slice(d,C-1).match(Gm),L&&d>0&&(_*=Math.pow(Rs,L.length))):Km.test(l.charAt(C-1))?(_*=Um,H=l.slice(d,C-1).match(_d),H&&d>0&&(_*=Math.pow(Rs,H.length))):(_*=$m,d>0&&(_*=Math.pow(Rs,C-d))),l.charAt(C)!==u.charAt(f)&&(_*=Vm)),(__&&(_=M*Ps)),_>P&&(P=_),C=s.indexOf(j,C+1);return v[m]=P,P}function rd(l){return l.toLowerCase().replace(_d," ")}function Qm(l,u,s){return l=s&&s.length>0?`${l+" "+s.join(" ")}`:l,Bs(l,u,rd(l),rd(u),0,0,{})}function an(l,u,{checkForDefaultPrevented:s=!0}={}){return function(d){if(l==null||l(d),s===!1||!d.defaultPrevented)return u==null?void 0:u(d)}}function ld(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function sr(...l){return u=>{let s=!1;const c=l.map(d=>{const f=ld(d,u);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d{var V;const{scope:M,children:L,...H}=_,b=((V=M==null?void 0:M[l])==null?void 0:V[j])||m,R=g.useMemo(()=>H,Object.values(H));return p.jsx(b.Provider,{value:R,children:L})};C.displayName=f+"Provider";function P(_,M){var b;const L=((b=M==null?void 0:M[l])==null?void 0:b[j])||m,H=g.useContext(L);if(H)return H;if(v!==void 0)return v;throw new Error(`\`${_}\` must be used within \`${f}\``)}return[C,P]}const d=()=>{const f=s.map(v=>g.createContext(v));return function(m){const j=(m==null?void 0:m[l])||f;return g.useMemo(()=>({[`__scope${l}`]:{...m,[l]:j}}),[m,j])}};return d.scopeName=l,[c,Xm(d,...u)]}function Xm(...l){const u=l[0];if(l.length===1)return u;const s=()=>{const c=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const v=c.reduce((m,{useScope:j,scopeName:C})=>{const _=j(f)[`__scope${C}`];return{...m,..._}},{});return g.useMemo(()=>({[`__scope${u.scopeName}`]:v}),[v])}};return s.scopeName=u.scopeName,s}var Jr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Zm=Ks[" useId ".trim().toString()]||(()=>{}),qm=0;function Ft(l){const[u,s]=g.useState(Zm());return Jr(()=>{s(c=>c??String(qm++))},[l]),u?`radix-${u}`:""}var Jm=Ks[" useInsertionEffect ".trim().toString()]||Jr;function eh({prop:l,defaultProp:u,onChange:s=()=>{},caller:c}){const[d,f,v]=th({defaultProp:u,onChange:s}),m=l!==void 0,j=m?l:d;{const P=g.useRef(l!==void 0);g.useEffect(()=>{const _=P.current;_!==m&&console.warn(`${c} is changing from ${_?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),P.current=m},[m,c])}const C=g.useCallback(P=>{var _;if(m){const M=nh(P)?P(l):P;M!==l&&((_=v.current)==null||_.call(v,M))}else f(P)},[m,l,f,v]);return[j,C]}function th({defaultProp:l,onChange:u}){const[s,c]=g.useState(l),d=g.useRef(s),f=g.useRef(u);return Jm(()=>{f.current=u},[u]),g.useEffect(()=>{var v;d.current!==s&&((v=f.current)==null||v.call(f,s),d.current=s)},[s,d]),[s,c,f]}function nh(l){return typeof l=="function"}var Pd=Nd();function Rd(l){const u=g.forwardRef((s,c)=>{let{children:d,...f}=s,v=null,m=!1;const j=[];od(d)&&typeof mo=="function"&&(d=mo(d._payload)),g.Children.forEach(d,M=>{var L;if(sh(M)){m=!0;const H=M;let b="child"in H.props?H.props.child:H.props.children;od(b)&&typeof mo=="function"&&(b=mo(b._payload)),v=lh(H,b),j.push((L=v==null?void 0:v.props)==null?void 0:L.children)}else j.push(M)}),v?v=g.cloneElement(v,void 0,j):!m&&g.Children.count(d)===1&&g.isValidElement(d)&&(v=d);const C=v?ih(v):void 0,P=jn(c,C);if(!v){if(d||d===0)throw new Error(m?dh(l):ch(l));return d}const _=oh(f,v.props??{});return v.type!==g.Fragment&&(_.ref=c?P:C),g.cloneElement(v,_)});return u.displayName=`${l}.Slot`,u}var rh=Symbol.for("radix.slottable"),lh=(l,u)=>{if("child"in l.props){const s=l.props.child;return g.isValidElement(s)?g.cloneElement(s,void 0,l.props.children(s.props.children)):null}return g.isValidElement(u)?u:null};function oh(l,u){const s={...u};for(const c in u){const d=l[c],f=u[c];/^on[A-Z]/.test(c)?d&&f?s[c]=(...m)=>{const j=f(...m);return d(...m),j}:d&&(s[c]=d):c==="style"?s[c]={...d,...f}:c==="className"&&(s[c]=[d,f].filter(Boolean).join(" "))}return{...l,...s}}function ih(l){var c,d;let u=(c=Object.getOwnPropertyDescriptor(l.props,"ref"))==null?void 0:c.get,s=u&&"isReactWarning"in u&&u.isReactWarning;return s?l.ref:(u=(d=Object.getOwnPropertyDescriptor(l,"ref"))==null?void 0:d.get,s=u&&"isReactWarning"in u&&u.isReactWarning,s?l.props.ref:l.props.ref||l.ref)}function sh(l){return g.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===rh}var uh=Symbol.for("react.lazy");function od(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===uh&&"_payload"in l&&ah(l._payload)}function ah(l){return typeof l=="object"&&l!==null&&"then"in l}var ch=l=>`${l} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,dh=l=>`${l} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,mo=Ks[" use ".trim().toString()],fh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=fh.reduce((l,u)=>{const s=Rd(`Primitive.${u}`),c=g.forwardRef((d,f)=>{const{asChild:v,...m}=d,j=v?s:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(j,{...m,ref:f})});return c.displayName=`Primitive.${u}`,{...l,[u]:c}},{});function ph(l,u){l&&Pd.flushSync(()=>l.dispatchEvent(u))}function el(l){const u=g.useRef(l);return g.useEffect(()=>{u.current=l}),g.useMemo(()=>((...s)=>{var c;return(c=u.current)==null?void 0:c.call(u,...s)}),[])}function mh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l);g.useEffect(()=>{const c=d=>{d.key==="Escape"&&s(d)};return u.addEventListener("keydown",c,{capture:!0}),()=>u.removeEventListener("keydown",c,{capture:!0})},[s,u])}var hh="DismissableLayer",$s="dismissableLayer.update",vh="dismissableLayer.pointerDownOutside",gh="dismissableLayer.focusOutside",id,Qs=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bd=g.forwardRef((l,u)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:m,onDismiss:j,...C}=l,P=g.useContext(Qs),[_,M]=g.useState(null),L=(_==null?void 0:_.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,H]=g.useState({}),b=jn(u,de=>M(de)),R=Array.from(P.layers),[V]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),W=R.indexOf(V),te=_?R.indexOf(_):-1,q=P.layersWithOutsidePointerEventsDisabled.size>0,le=te>=W,ne=g.useRef(!1),se=kh(de=>{const xe=de.target;if(!(xe instanceof Node))return;const Ce=[...P.branches].some(ie=>ie.contains(xe));!le||Ce||(f==null||f(de),m==null||m(de),de.defaultPrevented||j==null||j())},{ownerDocument:L,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:P.dismissableSurfaces}),ye=Sh(de=>{if(c&&ne.current)return;const xe=de.target;[...P.branches].some(ie=>ie.contains(xe))||(v==null||v(de),m==null||m(de),de.defaultPrevented||j==null||j())},L);return mh(de=>{te===P.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&j&&(de.preventDefault(),j()))},L),g.useEffect(()=>{if(_)return s&&(P.layersWithOutsidePointerEventsDisabled.size===0&&(id=L.body.style.pointerEvents,L.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(_)),P.layers.add(_),sd(),()=>{s&&(P.layersWithOutsidePointerEventsDisabled.delete(_),P.layersWithOutsidePointerEventsDisabled.size===0&&(L.body.style.pointerEvents=id))}},[_,L,s,P]),g.useEffect(()=>()=>{_&&(P.layers.delete(_),P.layersWithOutsidePointerEventsDisabled.delete(_),sd())},[_,P]),g.useEffect(()=>{const de=()=>H({});return document.addEventListener($s,de),()=>document.removeEventListener($s,de)},[]),p.jsx(Ve.div,{...C,ref:b,style:{pointerEvents:q?le?"auto":"none":void 0,...l.style},onFocusCapture:an(l.onFocusCapture,ye.onFocusCapture),onBlurCapture:an(l.onBlurCapture,ye.onBlurCapture),onPointerDownCapture:an(l.onPointerDownCapture,se.onPointerDownCapture)})});bd.displayName=hh;var yh="DismissableLayerBranch",xh=g.forwardRef((l,u)=>{const s=g.useContext(Qs),c=g.useRef(null),d=jn(u,c);return g.useEffect(()=>{const f=c.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),p.jsx(Ve.div,{...l,ref:d})});xh.displayName=yh;function wh(){const l=g.useContext(Qs),[u,s]=g.useState(null);return g.useEffect(()=>{if(u)return l.dismissableSurfaces.add(u),()=>{l.dismissableSurfaces.delete(u)}},[u,l.dismissableSurfaces]),s}function kh(l,u){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=u,v=el(l),m=g.useRef(!1),j=g.useRef(!1),C=g.useRef(new Map),P=g.useRef(()=>{});return g.useEffect(()=>{function _(){j.current=!1,d.current=!1,C.current.clear()}function M(){return Array.from(C.current.values()).some(Boolean)}function L(W){if(!j.current)return;const te=W.target;te instanceof Node&&[...f].some(le=>le.contains(te))||C.current.set(W.type,!0),W.type==="click"&&window.setTimeout(()=>{j.current&&P.current()},0)}function H(W){j.current&&C.current.set(W.type,!1)}const b=W=>{if(W.target&&!m.current){let te=function(){s.removeEventListener("click",P.current);const le=M();_(),le||Md(vh,v,q,{discrete:!0})};const q={originalEvent:W};j.current=!0,d.current=c&&W.button===0,C.current.clear(),!c||W.button!==0?te():(s.removeEventListener("click",P.current),P.current=te,s.addEventListener("click",P.current,{once:!0}))}else s.removeEventListener("click",P.current),_();m.current=!1},R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const W of R)s.addEventListener(W,L,!0),s.addEventListener(W,H);const V=window.setTimeout(()=>{s.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(V),s.removeEventListener("pointerdown",b),s.removeEventListener("click",P.current);for(const W of R)s.removeEventListener(W,L,!0),s.removeEventListener(W,H)}},[s,v,c,d,f]),{onPointerDownCapture:()=>m.current=!0}}function Sh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l),c=g.useRef(!1);return g.useEffect(()=>{const d=f=>{f.target&&!c.current&&Md(gh,s,{originalEvent:f},{discrete:!1})};return u.addEventListener("focusin",d),()=>u.removeEventListener("focusin",d)},[u,s]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function sd(){const l=new CustomEvent($s);document.dispatchEvent(l)}function Md(l,u,s,{discrete:c}){const d=s.originalEvent.target,f=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:s});u&&d.addEventListener(l,u,{once:!0}),c?ph(d,f):d.dispatchEvent(f)}var bs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",ud={bubbles:!1,cancelable:!0},Eh="FocusScope",Td=g.forwardRef((l,u)=>{const{loop:s=!1,trapped:c=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...v}=l,[m,j]=g.useState(null),C=el(d),P=el(f),_=g.useRef(null),M=jn(u,b=>j(b)),L=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let b=function(te){if(L.paused||!m)return;const q=te.target;m.contains(q)?_.current=q:un(_.current,{select:!0})},R=function(te){if(L.paused||!m)return;const q=te.relatedTarget;q!==null&&(m.contains(q)||un(_.current,{select:!0}))},V=function(te){if(document.activeElement===document.body)for(const le of te)le.removedNodes.length>0&&un(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",R);const W=new MutationObserver(V);return m&&W.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",R),W.disconnect()}}},[c,m,L.paused]),g.useEffect(()=>{if(m){cd.add(L);const b=document.activeElement;if(!m.contains(b)){const V=new CustomEvent(bs,ud);m.addEventListener(bs,C),m.dispatchEvent(V),V.defaultPrevented||(Ch(Rh(Ld(m)),{select:!0}),document.activeElement===b&&un(m))}return()=>{m.removeEventListener(bs,C),setTimeout(()=>{const V=new CustomEvent(Ms,ud);m.addEventListener(Ms,P),m.dispatchEvent(V),V.defaultPrevented||un(b??document.body,{select:!0}),m.removeEventListener(Ms,P),cd.remove(L)},0)}}},[m,C,P,L]);const H=g.useCallback(b=>{if(!s&&!c||L.paused)return;const R=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,V=document.activeElement;if(R&&V){const W=b.currentTarget,[te,q]=Nh(W);te&&q?!b.shiftKey&&V===q?(b.preventDefault(),s&&un(te,{select:!0})):b.shiftKey&&V===te&&(b.preventDefault(),s&&un(q,{select:!0})):V===W&&b.preventDefault()}},[s,c,L.paused]);return p.jsx(Ve.div,{tabIndex:-1,...v,ref:M,onKeyDown:H})});Td.displayName=Eh;function Ch(l,{select:u=!1}={}){const s=document.activeElement;for(const c of l)if(un(c,{select:u}),document.activeElement!==s)return}function Nh(l){const u=Ld(l),s=ad(u,l),c=ad(u.reverse(),l);return[s,c]}function Ld(l){const u=[],s=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const d=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||d?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)u.push(s.currentNode);return u}function ad(l,u){for(const s of l)if(!jh(s,{upTo:u}))return s}function jh(l,{upTo:u}){if(getComputedStyle(l).visibility==="hidden")return!0;for(;l;){if(u!==void 0&&l===u)return!1;if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}function _h(l){return l instanceof HTMLInputElement&&"select"in l}function un(l,{select:u=!1}={}){if(l&&l.focus){const s=document.activeElement;l.focus({preventScroll:!0}),l!==s&&_h(l)&&u&&l.select()}}var cd=Ph();function Ph(){let l=[];return{add(u){const s=l[0];u!==s&&(s==null||s.pause()),l=dd(l,u),l.unshift(u)},remove(u){var s;l=dd(l,u),(s=l[0])==null||s.resume()}}}function dd(l,u){const s=[...l],c=s.indexOf(u);return c!==-1&&s.splice(c,1),s}function Rh(l){return l.filter(u=>u.tagName!=="A")}var bh="Portal",Od=g.forwardRef((l,u)=>{var m;const{container:s,...c}=l,[d,f]=g.useState(!1);Jr(()=>f(!0),[]);const v=s||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return v?Pd.createPortal(p.jsx(Ve.div,{...c,ref:u}),v):null});Od.displayName=bh;function Mh(l,u){return g.useReducer((s,c)=>u[s][c]??s,l)}var jo=l=>{const{present:u,children:s}=l,c=Th(u),d=typeof s=="function"?s({present:c.isPresent}):g.Children.only(s),f=Lh(c.ref,Oh(d));return typeof s=="function"||c.isPresent?g.cloneElement(d,{ref:f}):null};jo.displayName="Presence";function Th(l){const[u,s]=g.useState(),c=g.useRef(null),d=g.useRef(l),f=g.useRef("none"),v=l?"mounted":"unmounted",[m,j]=Mh(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const C=ho(c.current);f.current=m==="mounted"?C:"none"},[m]),Jr(()=>{const C=c.current,P=d.current;if(P!==l){const M=f.current,L=ho(C);l?j("MOUNT"):L==="none"||(C==null?void 0:C.display)==="none"?j("UNMOUNT"):j(P&&M!==L?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,j]),Jr(()=>{if(u){let C;const P=u.ownerDocument.defaultView??window,_=L=>{const b=ho(c.current).includes(CSS.escape(L.animationName));if(L.target===u&&b&&(j("ANIMATION_END"),!d.current)){const R=u.style.animationFillMode;u.style.animationFillMode="forwards",C=P.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=R)})}},M=L=>{L.target===u&&(f.current=ho(c.current))};return u.addEventListener("animationstart",M),u.addEventListener("animationcancel",_),u.addEventListener("animationend",_),()=>{P.clearTimeout(C),u.removeEventListener("animationstart",M),u.removeEventListener("animationcancel",_),u.removeEventListener("animationend",_)}}else j("ANIMATION_END")},[u,j]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:g.useCallback(C=>{c.current=C?getComputedStyle(C):null,s(C)},[])}}function fd(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function Lh(...l){const u=g.useRef(l);return u.current=l,g.useCallback(s=>{const c=u.current;let d=!1;const f=c.map(v=>{const m=fd(v,s);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let v=0;v{Pt||(Pt={start:pd(),end:pd()});const{start:l,end:u}=Pt;return document.body.firstElementChild!==l&&document.body.insertAdjacentElement("afterbegin",l),document.body.lastElementChild!==u&&document.body.insertAdjacentElement("beforeend",u),vo++,()=>{vo===1&&(Pt==null||Pt.start.remove(),Pt==null||Pt.end.remove(),Pt=null),vo=Math.max(0,vo-1)}},[])}function pd(){const l=document.createElement("span");return l.setAttribute("data-radix-focus-guard",""),l.tabIndex=0,l.style.outline="none",l.style.opacity="0",l.style.position="fixed",l.style.pointerEvents="none",l}var Rt=function(){return Rt=Object.assign||function(u){for(var s,c=1,d=arguments.length;c"u")return qh;var u=Jh(l),s=document.documentElement.clientWidth,c=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,c-s+u[2]-u[0])}},tv=Ad(),or="data-scroll-locked",nv=function(l,u,s,c){var d=l.left,f=l.top,v=l.right,m=l.gap;return s===void 0&&(s="margin"),` + */const Fm=Qe("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"}]]),Us=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:jm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:zm},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Tm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:_m},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Om},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:Nm}];var nd=1,Um=.9,Bm=.8,$m=.17,Ps=.1,Rs=.999,Vm=.9999,Wm=.99,Hm=/[\\\/_+.#"@\[\(\{&]/,Gm=/[\\\/_+.#"@\[\(\{&]/g,Km=/[\s-]/,_d=/[\s-]/g;function Bs(l,u,s,c,d,f,v){if(f===u.length)return d===l.length?nd:Wm;var m=`${d},${f}`;if(v[m]!==void 0)return v[m];for(var j=c.charAt(f),C=s.indexOf(j,d),P=0,_,M,L,H;C>=0;)_=Bs(l,u,s,c,C+1,f+1,v),_>P&&(C===d?_*=nd:Hm.test(l.charAt(C-1))?(_*=Bm,L=l.slice(d,C-1).match(Gm),L&&d>0&&(_*=Math.pow(Rs,L.length))):Km.test(l.charAt(C-1))?(_*=Um,H=l.slice(d,C-1).match(_d),H&&d>0&&(_*=Math.pow(Rs,H.length))):(_*=$m,d>0&&(_*=Math.pow(Rs,C-d))),l.charAt(C)!==u.charAt(f)&&(_*=Vm)),(__&&(_=M*Ps)),_>P&&(P=_),C=s.indexOf(j,C+1);return v[m]=P,P}function rd(l){return l.toLowerCase().replace(_d," ")}function Qm(l,u,s){return l=s&&s.length>0?`${l+" "+s.join(" ")}`:l,Bs(l,u,rd(l),rd(u),0,0,{})}function cn(l,u,{checkForDefaultPrevented:s=!0}={}){return function(d){if(l==null||l(d),s===!1||!d.defaultPrevented)return u==null?void 0:u(d)}}function ld(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function sr(...l){return u=>{let s=!1;const c=l.map(d=>{const f=ld(d,u);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d{var V;const{scope:M,children:L,...H}=_,b=((V=M==null?void 0:M[l])==null?void 0:V[j])||m,R=g.useMemo(()=>H,Object.values(H));return p.jsx(b.Provider,{value:R,children:L})};C.displayName=f+"Provider";function P(_,M){var b;const L=((b=M==null?void 0:M[l])==null?void 0:b[j])||m,H=g.useContext(L);if(H)return H;if(v!==void 0)return v;throw new Error(`\`${_}\` must be used within \`${f}\``)}return[C,P]}const d=()=>{const f=s.map(v=>g.createContext(v));return function(m){const j=(m==null?void 0:m[l])||f;return g.useMemo(()=>({[`__scope${l}`]:{...m,[l]:j}}),[m,j])}};return d.scopeName=l,[c,Xm(d,...u)]}function Xm(...l){const u=l[0];if(l.length===1)return u;const s=()=>{const c=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(f){const v=c.reduce((m,{useScope:j,scopeName:C})=>{const _=j(f)[`__scope${C}`];return{...m,..._}},{});return g.useMemo(()=>({[`__scope${u.scopeName}`]:v}),[v])}};return s.scopeName=u.scopeName,s}var Jr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Zm=Ks[" useId ".trim().toString()]||(()=>{}),qm=0;function Ft(l){const[u,s]=g.useState(Zm());return Jr(()=>{s(c=>c??String(qm++))},[l]),u?`radix-${u}`:""}var Jm=Ks[" useInsertionEffect ".trim().toString()]||Jr;function eh({prop:l,defaultProp:u,onChange:s=()=>{},caller:c}){const[d,f,v]=th({defaultProp:u,onChange:s}),m=l!==void 0,j=m?l:d;{const P=g.useRef(l!==void 0);g.useEffect(()=>{const _=P.current;_!==m&&console.warn(`${c} is changing from ${_?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),P.current=m},[m,c])}const C=g.useCallback(P=>{var _;if(m){const M=nh(P)?P(l):P;M!==l&&((_=v.current)==null||_.call(v,M))}else f(P)},[m,l,f,v]);return[j,C]}function th({defaultProp:l,onChange:u}){const[s,c]=g.useState(l),d=g.useRef(s),f=g.useRef(u);return Jm(()=>{f.current=u},[u]),g.useEffect(()=>{var v;d.current!==s&&((v=f.current)==null||v.call(f,s),d.current=s)},[s,d]),[s,c,f]}function nh(l){return typeof l=="function"}var Pd=Nd();function Rd(l){const u=g.forwardRef((s,c)=>{let{children:d,...f}=s,v=null,m=!1;const j=[];od(d)&&typeof mo=="function"&&(d=mo(d._payload)),g.Children.forEach(d,M=>{var L;if(sh(M)){m=!0;const H=M;let b="child"in H.props?H.props.child:H.props.children;od(b)&&typeof mo=="function"&&(b=mo(b._payload)),v=lh(H,b),j.push((L=v==null?void 0:v.props)==null?void 0:L.children)}else j.push(M)}),v?v=g.cloneElement(v,void 0,j):!m&&g.Children.count(d)===1&&g.isValidElement(d)&&(v=d);const C=v?ih(v):void 0,P=_n(c,C);if(!v){if(d||d===0)throw new Error(m?dh(l):ch(l));return d}const _=oh(f,v.props??{});return v.type!==g.Fragment&&(_.ref=c?P:C),g.cloneElement(v,_)});return u.displayName=`${l}.Slot`,u}var rh=Symbol.for("radix.slottable"),lh=(l,u)=>{if("child"in l.props){const s=l.props.child;return g.isValidElement(s)?g.cloneElement(s,void 0,l.props.children(s.props.children)):null}return g.isValidElement(u)?u:null};function oh(l,u){const s={...u};for(const c in u){const d=l[c],f=u[c];/^on[A-Z]/.test(c)?d&&f?s[c]=(...m)=>{const j=f(...m);return d(...m),j}:d&&(s[c]=d):c==="style"?s[c]={...d,...f}:c==="className"&&(s[c]=[d,f].filter(Boolean).join(" "))}return{...l,...s}}function ih(l){var c,d;let u=(c=Object.getOwnPropertyDescriptor(l.props,"ref"))==null?void 0:c.get,s=u&&"isReactWarning"in u&&u.isReactWarning;return s?l.ref:(u=(d=Object.getOwnPropertyDescriptor(l,"ref"))==null?void 0:d.get,s=u&&"isReactWarning"in u&&u.isReactWarning,s?l.props.ref:l.props.ref||l.ref)}function sh(l){return g.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===rh}var uh=Symbol.for("react.lazy");function od(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===uh&&"_payload"in l&&ah(l._payload)}function ah(l){return typeof l=="object"&&l!==null&&"then"in l}var ch=l=>`${l} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,dh=l=>`${l} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,mo=Ks[" use ".trim().toString()],fh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=fh.reduce((l,u)=>{const s=Rd(`Primitive.${u}`),c=g.forwardRef((d,f)=>{const{asChild:v,...m}=d,j=v?s:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(j,{...m,ref:f})});return c.displayName=`Primitive.${u}`,{...l,[u]:c}},{});function ph(l,u){l&&Pd.flushSync(()=>l.dispatchEvent(u))}function el(l){const u=g.useRef(l);return g.useEffect(()=>{u.current=l}),g.useMemo(()=>((...s)=>{var c;return(c=u.current)==null?void 0:c.call(u,...s)}),[])}function mh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l);g.useEffect(()=>{const c=d=>{d.key==="Escape"&&s(d)};return u.addEventListener("keydown",c,{capture:!0}),()=>u.removeEventListener("keydown",c,{capture:!0})},[s,u])}var hh="DismissableLayer",$s="dismissableLayer.update",vh="dismissableLayer.pointerDownOutside",gh="dismissableLayer.focusOutside",id,Qs=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bd=g.forwardRef((l,u)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:m,onDismiss:j,...C}=l,P=g.useContext(Qs),[_,M]=g.useState(null),L=(_==null?void 0:_.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,H]=g.useState({}),b=_n(u,de=>M(de)),R=Array.from(P.layers),[V]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),W=R.indexOf(V),te=_?R.indexOf(_):-1,q=P.layersWithOutsidePointerEventsDisabled.size>0,le=te>=W,ne=g.useRef(!1),se=kh(de=>{const xe=de.target;if(!(xe instanceof Node))return;const Ce=[...P.branches].some(ie=>ie.contains(xe));!le||Ce||(f==null||f(de),m==null||m(de),de.defaultPrevented||j==null||j())},{ownerDocument:L,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:P.dismissableSurfaces}),ye=Sh(de=>{if(c&&ne.current)return;const xe=de.target;[...P.branches].some(ie=>ie.contains(xe))||(v==null||v(de),m==null||m(de),de.defaultPrevented||j==null||j())},L);return mh(de=>{te===P.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&j&&(de.preventDefault(),j()))},L),g.useEffect(()=>{if(_)return s&&(P.layersWithOutsidePointerEventsDisabled.size===0&&(id=L.body.style.pointerEvents,L.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(_)),P.layers.add(_),sd(),()=>{s&&(P.layersWithOutsidePointerEventsDisabled.delete(_),P.layersWithOutsidePointerEventsDisabled.size===0&&(L.body.style.pointerEvents=id))}},[_,L,s,P]),g.useEffect(()=>()=>{_&&(P.layers.delete(_),P.layersWithOutsidePointerEventsDisabled.delete(_),sd())},[_,P]),g.useEffect(()=>{const de=()=>H({});return document.addEventListener($s,de),()=>document.removeEventListener($s,de)},[]),p.jsx(Ve.div,{...C,ref:b,style:{pointerEvents:q?le?"auto":"none":void 0,...l.style},onFocusCapture:cn(l.onFocusCapture,ye.onFocusCapture),onBlurCapture:cn(l.onBlurCapture,ye.onBlurCapture),onPointerDownCapture:cn(l.onPointerDownCapture,se.onPointerDownCapture)})});bd.displayName=hh;var yh="DismissableLayerBranch",xh=g.forwardRef((l,u)=>{const s=g.useContext(Qs),c=g.useRef(null),d=_n(u,c);return g.useEffect(()=>{const f=c.current;if(f)return s.branches.add(f),()=>{s.branches.delete(f)}},[s.branches]),p.jsx(Ve.div,{...l,ref:d})});xh.displayName=yh;function wh(){const l=g.useContext(Qs),[u,s]=g.useState(null);return g.useEffect(()=>{if(u)return l.dismissableSurfaces.add(u),()=>{l.dismissableSurfaces.delete(u)}},[u,l.dismissableSurfaces]),s}function kh(l,u){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:c=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:f}=u,v=el(l),m=g.useRef(!1),j=g.useRef(!1),C=g.useRef(new Map),P=g.useRef(()=>{});return g.useEffect(()=>{function _(){j.current=!1,d.current=!1,C.current.clear()}function M(){return Array.from(C.current.values()).some(Boolean)}function L(W){if(!j.current)return;const te=W.target;te instanceof Node&&[...f].some(le=>le.contains(te))||C.current.set(W.type,!0),W.type==="click"&&window.setTimeout(()=>{j.current&&P.current()},0)}function H(W){j.current&&C.current.set(W.type,!1)}const b=W=>{if(W.target&&!m.current){let te=function(){s.removeEventListener("click",P.current);const le=M();_(),le||Md(vh,v,q,{discrete:!0})};const q={originalEvent:W};j.current=!0,d.current=c&&W.button===0,C.current.clear(),!c||W.button!==0?te():(s.removeEventListener("click",P.current),P.current=te,s.addEventListener("click",P.current,{once:!0}))}else s.removeEventListener("click",P.current),_();m.current=!1},R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const W of R)s.addEventListener(W,L,!0),s.addEventListener(W,H);const V=window.setTimeout(()=>{s.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(V),s.removeEventListener("pointerdown",b),s.removeEventListener("click",P.current);for(const W of R)s.removeEventListener(W,L,!0),s.removeEventListener(W,H)}},[s,v,c,d,f]),{onPointerDownCapture:()=>m.current=!0}}function Sh(l,u=globalThis==null?void 0:globalThis.document){const s=el(l),c=g.useRef(!1);return g.useEffect(()=>{const d=f=>{f.target&&!c.current&&Md(gh,s,{originalEvent:f},{discrete:!1})};return u.addEventListener("focusin",d),()=>u.removeEventListener("focusin",d)},[u,s]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function sd(){const l=new CustomEvent($s);document.dispatchEvent(l)}function Md(l,u,s,{discrete:c}){const d=s.originalEvent.target,f=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:s});u&&d.addEventListener(l,u,{once:!0}),c?ph(d,f):d.dispatchEvent(f)}var bs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",ud={bubbles:!1,cancelable:!0},Eh="FocusScope",Td=g.forwardRef((l,u)=>{const{loop:s=!1,trapped:c=!1,onMountAutoFocus:d,onUnmountAutoFocus:f,...v}=l,[m,j]=g.useState(null),C=el(d),P=el(f),_=g.useRef(null),M=_n(u,b=>j(b)),L=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(c){let b=function(te){if(L.paused||!m)return;const q=te.target;m.contains(q)?_.current=q:an(_.current,{select:!0})},R=function(te){if(L.paused||!m)return;const q=te.relatedTarget;q!==null&&(m.contains(q)||an(_.current,{select:!0}))},V=function(te){if(document.activeElement===document.body)for(const le of te)le.removedNodes.length>0&&an(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",R);const W=new MutationObserver(V);return m&&W.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",R),W.disconnect()}}},[c,m,L.paused]),g.useEffect(()=>{if(m){cd.add(L);const b=document.activeElement;if(!m.contains(b)){const V=new CustomEvent(bs,ud);m.addEventListener(bs,C),m.dispatchEvent(V),V.defaultPrevented||(Ch(Rh(Ld(m)),{select:!0}),document.activeElement===b&&an(m))}return()=>{m.removeEventListener(bs,C),setTimeout(()=>{const V=new CustomEvent(Ms,ud);m.addEventListener(Ms,P),m.dispatchEvent(V),V.defaultPrevented||an(b??document.body,{select:!0}),m.removeEventListener(Ms,P),cd.remove(L)},0)}}},[m,C,P,L]);const H=g.useCallback(b=>{if(!s&&!c||L.paused)return;const R=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,V=document.activeElement;if(R&&V){const W=b.currentTarget,[te,q]=Nh(W);te&&q?!b.shiftKey&&V===q?(b.preventDefault(),s&&an(te,{select:!0})):b.shiftKey&&V===te&&(b.preventDefault(),s&&an(q,{select:!0})):V===W&&b.preventDefault()}},[s,c,L.paused]);return p.jsx(Ve.div,{tabIndex:-1,...v,ref:M,onKeyDown:H})});Td.displayName=Eh;function Ch(l,{select:u=!1}={}){const s=document.activeElement;for(const c of l)if(an(c,{select:u}),document.activeElement!==s)return}function Nh(l){const u=Ld(l),s=ad(u,l),c=ad(u.reverse(),l);return[s,c]}function Ld(l){const u=[],s=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const d=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||d?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)u.push(s.currentNode);return u}function ad(l,u){for(const s of l)if(!jh(s,{upTo:u}))return s}function jh(l,{upTo:u}){if(getComputedStyle(l).visibility==="hidden")return!0;for(;l;){if(u!==void 0&&l===u)return!1;if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}function _h(l){return l instanceof HTMLInputElement&&"select"in l}function an(l,{select:u=!1}={}){if(l&&l.focus){const s=document.activeElement;l.focus({preventScroll:!0}),l!==s&&_h(l)&&u&&l.select()}}var cd=Ph();function Ph(){let l=[];return{add(u){const s=l[0];u!==s&&(s==null||s.pause()),l=dd(l,u),l.unshift(u)},remove(u){var s;l=dd(l,u),(s=l[0])==null||s.resume()}}}function dd(l,u){const s=[...l],c=s.indexOf(u);return c!==-1&&s.splice(c,1),s}function Rh(l){return l.filter(u=>u.tagName!=="A")}var bh="Portal",Od=g.forwardRef((l,u)=>{var m;const{container:s,...c}=l,[d,f]=g.useState(!1);Jr(()=>f(!0),[]);const v=s||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return v?Pd.createPortal(p.jsx(Ve.div,{...c,ref:u}),v):null});Od.displayName=bh;function Mh(l,u){return g.useReducer((s,c)=>u[s][c]??s,l)}var jo=l=>{const{present:u,children:s}=l,c=Th(u),d=typeof s=="function"?s({present:c.isPresent}):g.Children.only(s),f=Lh(c.ref,Oh(d));return typeof s=="function"||c.isPresent?g.cloneElement(d,{ref:f}):null};jo.displayName="Presence";function Th(l){const[u,s]=g.useState(),c=g.useRef(null),d=g.useRef(l),f=g.useRef("none"),v=l?"mounted":"unmounted",[m,j]=Mh(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const C=ho(c.current);f.current=m==="mounted"?C:"none"},[m]),Jr(()=>{const C=c.current,P=d.current;if(P!==l){const M=f.current,L=ho(C);l?j("MOUNT"):L==="none"||(C==null?void 0:C.display)==="none"?j("UNMOUNT"):j(P&&M!==L?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,j]),Jr(()=>{if(u){let C;const P=u.ownerDocument.defaultView??window,_=L=>{const b=ho(c.current).includes(CSS.escape(L.animationName));if(L.target===u&&b&&(j("ANIMATION_END"),!d.current)){const R=u.style.animationFillMode;u.style.animationFillMode="forwards",C=P.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=R)})}},M=L=>{L.target===u&&(f.current=ho(c.current))};return u.addEventListener("animationstart",M),u.addEventListener("animationcancel",_),u.addEventListener("animationend",_),()=>{P.clearTimeout(C),u.removeEventListener("animationstart",M),u.removeEventListener("animationcancel",_),u.removeEventListener("animationend",_)}}else j("ANIMATION_END")},[u,j]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:g.useCallback(C=>{c.current=C?getComputedStyle(C):null,s(C)},[])}}function fd(l,u){if(typeof l=="function")return l(u);l!=null&&(l.current=u)}function Lh(...l){const u=g.useRef(l);return u.current=l,g.useCallback(s=>{const c=u.current;let d=!1;const f=c.map(v=>{const m=fd(v,s);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let v=0;v{Pt||(Pt={start:pd(),end:pd()});const{start:l,end:u}=Pt;return document.body.firstElementChild!==l&&document.body.insertAdjacentElement("afterbegin",l),document.body.lastElementChild!==u&&document.body.insertAdjacentElement("beforeend",u),vo++,()=>{vo===1&&(Pt==null||Pt.start.remove(),Pt==null||Pt.end.remove(),Pt=null),vo=Math.max(0,vo-1)}},[])}function pd(){const l=document.createElement("span");return l.setAttribute("data-radix-focus-guard",""),l.tabIndex=0,l.style.outline="none",l.style.opacity="0",l.style.position="fixed",l.style.pointerEvents="none",l}var Rt=function(){return Rt=Object.assign||function(u){for(var s,c=1,d=arguments.length;c"u")return qh;var u=Jh(l),s=document.documentElement.clientWidth,c=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,c-s+u[2]-u[0])}},tv=Ad(),or="data-scroll-locked",nv=function(l,u,s,c){var d=l.left,f=l.top,v=l.right,m=l.gap;return s===void 0&&(s="margin"),` .`.concat(Dh,` { overflow: hidden `).concat(c,`; padding-right: `).concat(m,"px ").concat(c,`; @@ -174,7 +174,7 @@ Error generating stack: `+i.message+` body[`).concat(or,`] { `).concat(Ah,": ").concat(m,`px; } -`)},hd=function(){var l=parseInt(document.body.getAttribute(or)||"0",10);return isFinite(l)?l:0},rv=function(){g.useEffect(function(){return document.body.setAttribute(or,(hd()+1).toString()),function(){var l=hd()-1;l<=0?document.body.removeAttribute(or):document.body.setAttribute(or,l.toString())}},[])},lv=function(l){var u=l.noRelative,s=l.noImportant,c=l.gapMode,d=c===void 0?"margin":c;rv();var f=g.useMemo(function(){return ev(d)},[d]);return g.createElement(tv,{styles:nv(f,!u,d,s?"":"!important")})},Vs=!1;if(typeof window<"u")try{var go=Object.defineProperty({},"passive",{get:function(){return Vs=!0,!0}});window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Vs=!1}var qn=Vs?{passive:!1}:!1,ov=function(l){return l.tagName==="TEXTAREA"},Fd=function(l,u){if(!(l instanceof Element))return!1;var s=window.getComputedStyle(l);return s[u]!=="hidden"&&!(s.overflowY===s.overflowX&&!ov(l)&&s[u]==="visible")},iv=function(l){return Fd(l,"overflowY")},sv=function(l){return Fd(l,"overflowX")},vd=function(l,u){var s=u.ownerDocument,c=u;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=Ud(l,c);if(d){var f=Bd(l,c),v=f[1],m=f[2];if(v>m)return!0}c=c.parentNode}while(c&&c!==s.body);return!1},uv=function(l){var u=l.scrollTop,s=l.scrollHeight,c=l.clientHeight;return[u,s,c]},av=function(l){var u=l.scrollLeft,s=l.scrollWidth,c=l.clientWidth;return[u,s,c]},Ud=function(l,u){return l==="v"?iv(u):sv(u)},Bd=function(l,u){return l==="v"?uv(u):av(u)},cv=function(l,u){return l==="h"&&u==="rtl"?-1:1},dv=function(l,u,s,c,d){var f=cv(l,window.getComputedStyle(u).direction),v=f*c,m=s.target,j=u.contains(m),C=!1,P=v>0,_=0,M=0;do{if(!m)break;var L=Bd(l,m),H=L[0],b=L[1],R=L[2],V=b-R-f*H;(H||V)&&Ud(l,m)&&(_+=V,M+=H);var W=m.parentNode;m=W&&W.nodeType===Node.DOCUMENT_FRAGMENT_NODE?W.host:W}while(!j&&m!==document.body||j&&(u.contains(m)||u===m));return(P&&Math.abs(_)<1||!P&&Math.abs(M)<1)&&(C=!0),C},yo=function(l){return"changedTouches"in l?[l.changedTouches[0].clientX,l.changedTouches[0].clientY]:[0,0]},gd=function(l){return[l.deltaX,l.deltaY]},yd=function(l){return l&&"current"in l?l.current:l},fv=function(l,u){return l[0]===u[0]&&l[1]===u[1]},pv=function(l){return` +`)},hd=function(){var l=parseInt(document.body.getAttribute(or)||"0",10);return isFinite(l)?l:0},rv=function(){g.useEffect(function(){return document.body.setAttribute(or,(hd()+1).toString()),function(){var l=hd()-1;l<=0?document.body.removeAttribute(or):document.body.setAttribute(or,l.toString())}},[])},lv=function(l){var u=l.noRelative,s=l.noImportant,c=l.gapMode,d=c===void 0?"margin":c;rv();var f=g.useMemo(function(){return ev(d)},[d]);return g.createElement(tv,{styles:nv(f,!u,d,s?"":"!important")})},Vs=!1;if(typeof window<"u")try{var go=Object.defineProperty({},"passive",{get:function(){return Vs=!0,!0}});window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Vs=!1}var Jn=Vs?{passive:!1}:!1,ov=function(l){return l.tagName==="TEXTAREA"},Fd=function(l,u){if(!(l instanceof Element))return!1;var s=window.getComputedStyle(l);return s[u]!=="hidden"&&!(s.overflowY===s.overflowX&&!ov(l)&&s[u]==="visible")},iv=function(l){return Fd(l,"overflowY")},sv=function(l){return Fd(l,"overflowX")},vd=function(l,u){var s=u.ownerDocument,c=u;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=Ud(l,c);if(d){var f=Bd(l,c),v=f[1],m=f[2];if(v>m)return!0}c=c.parentNode}while(c&&c!==s.body);return!1},uv=function(l){var u=l.scrollTop,s=l.scrollHeight,c=l.clientHeight;return[u,s,c]},av=function(l){var u=l.scrollLeft,s=l.scrollWidth,c=l.clientWidth;return[u,s,c]},Ud=function(l,u){return l==="v"?iv(u):sv(u)},Bd=function(l,u){return l==="v"?uv(u):av(u)},cv=function(l,u){return l==="h"&&u==="rtl"?-1:1},dv=function(l,u,s,c,d){var f=cv(l,window.getComputedStyle(u).direction),v=f*c,m=s.target,j=u.contains(m),C=!1,P=v>0,_=0,M=0;do{if(!m)break;var L=Bd(l,m),H=L[0],b=L[1],R=L[2],V=b-R-f*H;(H||V)&&Ud(l,m)&&(_+=V,M+=H);var W=m.parentNode;m=W&&W.nodeType===Node.DOCUMENT_FRAGMENT_NODE?W.host:W}while(!j&&m!==document.body||j&&(u.contains(m)||u===m));return(P&&Math.abs(_)<1||!P&&Math.abs(M)<1)&&(C=!0),C},yo=function(l){return"changedTouches"in l?[l.changedTouches[0].clientX,l.changedTouches[0].clientY]:[0,0]},gd=function(l){return[l.deltaX,l.deltaY]},yd=function(l){return l&&"current"in l?l.current:l},fv=function(l,u){return l[0]===u[0]&&l[1]===u[1]},pv=function(l){return` .block-interactivity-`.concat(l,` {pointer-events: none;} .allow-interactivity-`).concat(l,` {pointer-events: all;} -`)},mv=0,Jn=[];function hv(l){var u=g.useRef([]),s=g.useRef([0,0]),c=g.useRef(),d=g.useState(mv++)[0],f=g.useState(Ad)[0],v=g.useRef(l);g.useEffect(function(){v.current=l},[l]),g.useEffect(function(){if(l.inert){document.body.classList.add("block-interactivity-".concat(d));var b=Ih([l.lockRef.current],(l.shards||[]).map(yd),!0).filter(Boolean);return b.forEach(function(R){return R.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),b.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(d))})}}},[l.inert,l.lockRef.current,l.shards]);var m=g.useCallback(function(b,R){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!v.current.allowPinchZoom;var V=yo(b),W=s.current,te="deltaX"in b?b.deltaX:W[0]-V[0],q="deltaY"in b?b.deltaY:W[1]-V[1],le,ne=b.target,se=Math.abs(te)>Math.abs(q)?"h":"v";if("touches"in b&&se==="h"&&ne.type==="range")return!1;var ye=window.getSelection(),de=ye&&ye.anchorNode,xe=de?de===ne||de.contains(ne):!1;if(xe)return!1;var Ce=vd(se,ne);if(!Ce)return!0;if(Ce?le=se:(le=se==="v"?"h":"v",Ce=vd(se,ne)),!Ce)return!1;if(!c.current&&"changedTouches"in b&&(te||q)&&(c.current=le),!le)return!0;var ie=c.current||le;return dv(ie,R,b,ie==="h"?te:q)},[]),j=g.useCallback(function(b){var R=b;if(!(!Jn.length||Jn[Jn.length-1]!==f)){var V="deltaY"in R?gd(R):yo(R),W=u.current.filter(function(le){return le.name===R.type&&(le.target===R.target||R.target===le.shadowParent)&&fv(le.delta,V)})[0];if(W&&W.should){R.cancelable&&R.preventDefault();return}if(!W){var te=(v.current.shards||[]).map(yd).filter(Boolean).filter(function(le){return le.contains(R.target)}),q=te.length>0?m(R,te[0]):!v.current.noIsolation;q&&R.cancelable&&R.preventDefault()}}},[]),C=g.useCallback(function(b,R,V,W){var te={name:b,delta:R,target:V,should:W,shadowParent:vv(V)};u.current.push(te),setTimeout(function(){u.current=u.current.filter(function(q){return q!==te})},1)},[]),P=g.useCallback(function(b){s.current=yo(b),c.current=void 0},[]),_=g.useCallback(function(b){C(b.type,gd(b),b.target,m(b,l.lockRef.current))},[]),M=g.useCallback(function(b){C(b.type,yo(b),b.target,m(b,l.lockRef.current))},[]);g.useEffect(function(){return Jn.push(f),l.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:M}),document.addEventListener("wheel",j,qn),document.addEventListener("touchmove",j,qn),document.addEventListener("touchstart",P,qn),function(){Jn=Jn.filter(function(b){return b!==f}),document.removeEventListener("wheel",j,qn),document.removeEventListener("touchmove",j,qn),document.removeEventListener("touchstart",P,qn)}},[]);var L=l.removeScrollBar,H=l.inert;return g.createElement(g.Fragment,null,H?g.createElement(f,{styles:pv(d)}):null,L?g.createElement(lv,{noRelative:l.noRelative,gapMode:l.gapMode}):null)}function vv(l){for(var u=null;l!==null;)l instanceof ShadowRoot&&(u=l.host,l=l.host),l=l.parentNode;return u}const gv=Hh(Dd,hv);var $d=g.forwardRef(function(l,u){return g.createElement(_o,Rt({},l,{ref:u,sideCar:gv}))});$d.classNames=_o.classNames;var yv=function(l){if(typeof document>"u")return null;var u=Array.isArray(l)?l[0]:l;return u.ownerDocument.body},er=new WeakMap,xo=new WeakMap,wo={},zs=0,Vd=function(l){return l&&(l.host||Vd(l.parentNode))},xv=function(l,u){return u.map(function(s){if(l.contains(s))return s;var c=Vd(s);return c&&l.contains(c)?c:(console.error("aria-hidden",s,"in not contained inside",l,". Doing nothing"),null)}).filter(function(s){return!!s})},wv=function(l,u,s,c){var d=xv(u,Array.isArray(l)?l:[l]);wo[s]||(wo[s]=new WeakMap);var f=wo[s],v=[],m=new Set,j=new Set(d),C=function(_){!_||m.has(_)||(m.add(_),C(_.parentNode))};d.forEach(C);var P=function(_){!_||j.has(_)||Array.prototype.forEach.call(_.children,function(M){if(m.has(M))P(M);else try{var L=M.getAttribute(c),H=L!==null&&L!=="false",b=(er.get(M)||0)+1,R=(f.get(M)||0)+1;er.set(M,b),f.set(M,R),v.push(M),b===1&&H&&xo.set(M,!0),R===1&&M.setAttribute(s,"true"),H||M.setAttribute(c,"true")}catch(V){console.error("aria-hidden: cannot operate on ",M,V)}})};return P(u),m.clear(),zs++,function(){v.forEach(function(_){var M=er.get(_)-1,L=f.get(_)-1;er.set(_,M),f.set(_,L),M||(xo.has(_)||_.removeAttribute(c),xo.delete(_)),L||_.removeAttribute(s)}),zs--,zs||(er=new WeakMap,er=new WeakMap,xo=new WeakMap,wo={})}},kv=function(l,u,s){s===void 0&&(s="data-aria-hidden");var c=Array.from(Array.isArray(l)?l:[l]),d=yv(l);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),wv(c,d,s,"aria-hidden")):function(){return null}},Po="Dialog",[Wd]=Ym(Po),[Sv,St]=Wd(Po),Hd=l=>{const{__scopeDialog:u,children:s,open:c,defaultOpen:d,onOpenChange:f,modal:v=!0}=l,m=g.useRef(null),j=g.useRef(null),[C,P]=eh({prop:c,defaultProp:d??!1,onChange:f,caller:Po});return p.jsx(Sv,{scope:u,triggerRef:m,contentRef:j,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:C,onOpenChange:P,onOpenToggle:g.useCallback(()=>P(_=>!_),[P]),modal:v,children:s})};Hd.displayName=Po;var Gd="DialogTrigger",Ev=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Gd,s),f=jn(u,d.triggerRef);return p.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Xs(d.open),...c,ref:f,onClick:an(l.onClick,d.onOpenToggle)})});Ev.displayName=Gd;var Ys="DialogPortal",[Cv,Kd]=Wd(Ys,{forceMount:void 0}),Qd=l=>{const{__scopeDialog:u,forceMount:s,children:c,container:d}=l,f=St(Ys,u);return p.jsx(Cv,{scope:u,forceMount:s,children:g.Children.map(c,v=>p.jsx(jo,{present:s||f.open,children:p.jsx(Od,{asChild:!0,container:d,children:v})}))})};Qd.displayName=Ys;var No="DialogOverlay",Yd=g.forwardRef((l,u)=>{const s=Kd(No,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(No,l.__scopeDialog);return f.modal?p.jsx(jo,{present:c||f.open,children:p.jsx(jv,{...d,ref:u})}):null});Yd.displayName=No;var Nv=Rd("DialogOverlay.RemoveScroll"),jv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(No,s),f=wh(),v=jn(u,f);return p.jsx($d,{as:Nv,allowPinchZoom:!0,shards:[d.contentRef],children:p.jsx(Ve.div,{"data-state":Xs(d.open),...c,ref:v,style:{pointerEvents:"auto",...c.style}})})}),ur="DialogContent",Xd=g.forwardRef((l,u)=>{const s=Kd(ur,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(ur,l.__scopeDialog);return p.jsx(jo,{present:c||f.open,children:f.modal?p.jsx(_v,{...d,ref:u}):p.jsx(Pv,{...d,ref:u})})});Xd.displayName=ur;var _v=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(null),d=jn(u,s.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return kv(f)},[]),p.jsx(Zd,{...l,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:an(l.onCloseAutoFocus,f=>{var v;f.preventDefault(),(v=s.triggerRef.current)==null||v.focus()}),onPointerDownOutside:an(l.onPointerDownOutside,f=>{const v=f.detail.originalEvent,m=v.button===0&&v.ctrlKey===!0;(v.button===2||m)&&f.preventDefault()}),onFocusOutside:an(l.onFocusOutside,f=>f.preventDefault())})}),Pv=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(!1),d=g.useRef(!1);return p.jsx(Zd,{...l,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var v,m;(v=l.onCloseAutoFocus)==null||v.call(l,f),f.defaultPrevented||(c.current||(m=s.triggerRef.current)==null||m.focus(),f.preventDefault()),c.current=!1,d.current=!1},onInteractOutside:f=>{var j,C;(j=l.onInteractOutside)==null||j.call(l,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const v=f.target;((C=s.triggerRef.current)==null?void 0:C.contains(v))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),Zd=g.forwardRef((l,u)=>{const{__scopeDialog:s,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,...v}=l,m=St(ur,s);return zh(),p.jsx(p.Fragment,{children:p.jsx(Td,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:d,onUnmountAutoFocus:f,children:p.jsx(bd,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Xs(m.open),...v,ref:u,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),qd="DialogTitle",Rv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(qd,s);return p.jsx(Ve.h2,{id:d.titleId,...c,ref:u})});Rv.displayName=qd;var Jd="DialogDescription",bv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Jd,s);return p.jsx(Ve.p,{id:d.descriptionId,...c,ref:u})});bv.displayName=Jd;var ef="DialogClose",Mv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(ef,s);return p.jsx(Ve.button,{type:"button",...c,ref:u,onClick:an(l.onClick,()=>d.onOpenChange(!1))})});Mv.displayName=ef;function Xs(l){return l?"open":"closed"}var Xr='[cmdk-group=""]',Is='[cmdk-group-items=""]',Tv='[cmdk-group-heading=""]',tf='[cmdk-item=""]',xd=`${tf}:not([aria-disabled="true"])`,Ws="cmdk-item-select",rr="data-value",Lv=(l,u,s)=>Qm(l,u,s),nf=g.createContext(void 0),tl=()=>g.useContext(nf),rf=g.createContext(void 0),Zs=()=>g.useContext(rf),lf=g.createContext(void 0),of=g.forwardRef((l,u)=>{let s=lr(()=>{var w,A;return{search:"",value:(A=(w=l.value)!=null?w:l.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=lr(()=>new Set),d=lr(()=>new Map),f=lr(()=>new Map),v=lr(()=>new Set),m=sf(l),{label:j,children:C,value:P,onValueChange:_,filter:M,shouldFilter:L,loop:H,disablePointerSelection:b=!1,vimBindings:R=!0,...V}=l,W=Ft(),te=Ft(),q=Ft(),le=g.useRef(null),ne=Wv();Nn(()=>{if(P!==void 0){let w=P.trim();s.current.value=w,se.emit()}},[P]),Nn(()=>{ne(6,Le)},[]);let se=g.useMemo(()=>({subscribe:w=>(v.current.add(w),()=>v.current.delete(w)),snapshot:()=>s.current,setState:(w,A,B)=>{var D,Y,re,ue;if(!Object.is(s.current[w],A)){if(s.current[w]=A,w==="search")ie(),xe(),ne(1,Ce);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(q);ce?ce.focus():(D=document.getElementById(W))==null||D.focus()}if(ne(7,()=>{var ce;s.current.selectedItemId=(ce=Ne())==null?void 0:ce.id,se.emit()}),B||ne(5,Le),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=A??"";(ue=(re=m.current).onValueChange)==null||ue.call(re,ce);return}}se.emit()}},emit:()=>{v.current.forEach(w=>w())}}),[]),ye=g.useMemo(()=>({value:(w,A,B)=>{var D;A!==((D=f.current.get(w))==null?void 0:D.value)&&(f.current.set(w,{value:A,keywords:B}),s.current.filtered.items.set(w,de(A,B)),ne(2,()=>{xe(),se.emit()}))},item:(w,A)=>(c.current.add(w),A&&(d.current.has(A)?d.current.get(A).add(w):d.current.set(A,new Set([w]))),ne(3,()=>{ie(),xe(),s.current.value||Ce(),se.emit()}),()=>{f.current.delete(w),c.current.delete(w),s.current.filtered.items.delete(w);let B=Ne();ne(4,()=>{ie(),(B==null?void 0:B.getAttribute("id"))===w&&Ce(),se.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{f.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:j||l["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:W,inputId:q,labelId:te,listInnerRef:le}),[]);function de(w,A){var B,D;let Y=(D=(B=m.current)==null?void 0:B.filter)!=null?D:Lv;return w?Y(w,s.current.search,A):0}function xe(){if(!s.current.search||m.current.shouldFilter===!1)return;let w=s.current.filtered.items,A=[];s.current.filtered.groups.forEach(D=>{let Y=d.current.get(D),re=0;Y.forEach(ue=>{let ce=w.get(ue);re=Math.max(ce,re)}),A.push([D,re])});let B=le.current;Oe().sort((D,Y)=>{var re,ue;let ce=D.getAttribute("id"),De=Y.getAttribute("id");return((re=w.get(De))!=null?re:0)-((ue=w.get(ce))!=null?ue:0)}).forEach(D=>{let Y=D.closest(Is);Y?Y.appendChild(D.parentElement===Y?D:D.closest(`${Is} > *`)):B.appendChild(D.parentElement===B?D:D.closest(`${Is} > *`))}),A.sort((D,Y)=>Y[1]-D[1]).forEach(D=>{var Y;let re=(Y=le.current)==null?void 0:Y.querySelector(`${Xr}[${rr}="${encodeURIComponent(D[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ce(){let w=Oe().find(B=>B.getAttribute("aria-disabled")!=="true"),A=w==null?void 0:w.getAttribute(rr);se.setState("value",A||void 0)}function ie(){var w,A,B,D;if(!s.current.search||m.current.shouldFilter===!1){s.current.filtered.count=c.current.size;return}s.current.filtered.groups=new Set;let Y=0;for(let re of c.current){let ue=(A=(w=f.current.get(re))==null?void 0:w.value)!=null?A:"",ce=(D=(B=f.current.get(re))==null?void 0:B.keywords)!=null?D:[],De=de(ue,ce);s.current.filtered.items.set(re,De),De>0&&Y++}for(let[re,ue]of d.current)for(let ce of ue)if(s.current.filtered.items.get(ce)>0){s.current.filtered.groups.add(re);break}s.current.filtered.count=Y}function Le(){var w,A,B;let D=Ne();D&&(((w=D.parentElement)==null?void 0:w.firstChild)===D&&((B=(A=D.closest(Xr))==null?void 0:A.querySelector(Tv))==null||B.scrollIntoView({block:"nearest"})),D.scrollIntoView({block:"nearest"}))}function Ne(){var w;return(w=le.current)==null?void 0:w.querySelector(`${tf}[aria-selected="true"]`)}function Oe(){var w;return Array.from(((w=le.current)==null?void 0:w.querySelectorAll(xd))||[])}function je(w){let A=Oe()[w];A&&se.setState("value",A.getAttribute(rr))}function he(w){var A;let B=Ne(),D=Oe(),Y=D.findIndex(ue=>ue===B),re=D[Y+w];(A=m.current)!=null&&A.loop&&(re=Y+w<0?D[D.length-1]:Y+w===D.length?D[0]:D[Y+w]),re&&se.setState("value",re.getAttribute(rr))}function F(w){let A=Ne(),B=A==null?void 0:A.closest(Xr),D;for(;B&&!D;)B=w>0?$v(B,Xr):Vv(B,Xr),D=B==null?void 0:B.querySelector(xd);D?se.setState("value",D.getAttribute(rr)):he(w)}let Z=()=>je(Oe().length-1),U=w=>{w.preventDefault(),w.metaKey?Z():w.altKey?F(1):he(1)},k=w=>{w.preventDefault(),w.metaKey?je(0):w.altKey?F(-1):he(-1)};return g.createElement(Ve.div,{ref:u,tabIndex:-1,...V,"cmdk-root":"",onKeyDown:w=>{var A;(A=V.onKeyDown)==null||A.call(V,w);let B=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||B))switch(w.key){case"n":case"j":{R&&w.ctrlKey&&U(w);break}case"ArrowDown":{U(w);break}case"p":case"k":{R&&w.ctrlKey&&k(w);break}case"ArrowUp":{k(w);break}case"Home":{w.preventDefault(),je(0);break}case"End":{w.preventDefault(),Z();break}case"Enter":{w.preventDefault();let D=Ne();if(D){let Y=new Event(Ws);D.dispatchEvent(Y)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ye.inputId,id:ye.labelId,style:Gv},j),Ro(l,w=>g.createElement(rf.Provider,{value:se},g.createElement(nf.Provider,{value:ye},w))))}),Ov=g.forwardRef((l,u)=>{var s,c;let d=Ft(),f=g.useRef(null),v=g.useContext(lf),m=tl(),j=sf(l),C=(c=(s=j.current)==null?void 0:s.forceMount)!=null?c:v==null?void 0:v.forceMount;Nn(()=>{if(!C)return m.item(d,v==null?void 0:v.id)},[C]);let P=uf(d,f,[l.value,l.children,f],l.keywords),_=Zs(),M=cn(ne=>ne.value&&ne.value===P.current),L=cn(ne=>C||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);g.useEffect(()=>{let ne=f.current;if(!(!ne||l.disabled))return ne.addEventListener(Ws,H),()=>ne.removeEventListener(Ws,H)},[L,l.onSelect,l.disabled]);function H(){var ne,se;b(),(se=(ne=j.current).onSelect)==null||se.call(ne,P.current)}function b(){_.setState("value",P.current,!0)}if(!L)return null;let{disabled:R,value:V,onSelect:W,forceMount:te,keywords:q,...le}=l;return g.createElement(Ve.div,{ref:sr(f,u),...le,id:d,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!M,"data-disabled":!!R,"data-selected":!!M,onPointerMove:R||m.getDisablePointerSelection()?void 0:b,onClick:R?void 0:H},l.children)}),zv=g.forwardRef((l,u)=>{let{heading:s,children:c,forceMount:d,...f}=l,v=Ft(),m=g.useRef(null),j=g.useRef(null),C=Ft(),P=tl(),_=cn(L=>d||P.filter()===!1?!0:L.search?L.filtered.groups.has(v):!0);Nn(()=>P.group(v),[]),uf(v,m,[l.value,l.heading,j]);let M=g.useMemo(()=>({id:v,forceMount:d}),[d]);return g.createElement(Ve.div,{ref:sr(m,u),...f,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},s&&g.createElement("div",{ref:j,"cmdk-group-heading":"","aria-hidden":!0,id:C},s),Ro(l,L=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?C:void 0},g.createElement(lf.Provider,{value:M},L))))}),Iv=g.forwardRef((l,u)=>{let{alwaysRender:s,...c}=l,d=g.useRef(null),f=cn(v=>!v.search);return!s&&!f?null:g.createElement(Ve.div,{ref:sr(d,u),...c,"cmdk-separator":"",role:"separator"})}),Dv=g.forwardRef((l,u)=>{let{onValueChange:s,...c}=l,d=l.value!=null,f=Zs(),v=cn(C=>C.search),m=cn(C=>C.selectedItemId),j=tl();return g.useEffect(()=>{l.value!=null&&f.setState("search",l.value)},[l.value]),g.createElement(Ve.input,{ref:u,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":j.listId,"aria-labelledby":j.labelId,"aria-activedescendant":m,id:j.inputId,type:"text",value:d?l.value:v,onChange:C=>{d||f.setState("search",C.target.value),s==null||s(C.target.value)}})}),Av=g.forwardRef((l,u)=>{let{children:s,label:c="Suggestions",...d}=l,f=g.useRef(null),v=g.useRef(null),m=cn(C=>C.selectedItemId),j=tl();return g.useEffect(()=>{if(v.current&&f.current){let C=v.current,P=f.current,_,M=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let L=C.offsetHeight;P.style.setProperty("--cmdk-list-height",L.toFixed(1)+"px")})});return M.observe(C),()=>{cancelAnimationFrame(_),M.unobserve(C)}}},[]),g.createElement(Ve.div,{ref:sr(f,u),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:j.listId},Ro(l,C=>g.createElement("div",{ref:sr(v,j.listInnerRef),"cmdk-list-sizer":""},C)))}),Fv=g.forwardRef((l,u)=>{let{open:s,onOpenChange:c,overlayClassName:d,contentClassName:f,container:v,...m}=l;return g.createElement(Hd,{open:s,onOpenChange:c},g.createElement(Qd,{container:v},g.createElement(Yd,{"cmdk-overlay":"",className:d}),g.createElement(Xd,{"aria-label":l.label,"cmdk-dialog":"",className:f},g.createElement(of,{ref:u,...m}))))}),Uv=g.forwardRef((l,u)=>cn(s=>s.filtered.count===0)?g.createElement(Ve.div,{ref:u,...l,"cmdk-empty":"",role:"presentation"}):null),Bv=g.forwardRef((l,u)=>{let{progress:s,children:c,label:d="Loading...",...f}=l;return g.createElement(Ve.div,{ref:u,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Ro(l,v=>g.createElement("div",{"aria-hidden":!0},v)))}),tr=Object.assign(of,{List:Av,Item:Ov,Input:Dv,Group:zv,Separator:Iv,Dialog:Fv,Empty:Uv,Loading:Bv});function $v(l,u){let s=l.nextElementSibling;for(;s;){if(s.matches(u))return s;s=s.nextElementSibling}}function Vv(l,u){let s=l.previousElementSibling;for(;s;){if(s.matches(u))return s;s=s.previousElementSibling}}function sf(l){let u=g.useRef(l);return Nn(()=>{u.current=l}),u}var Nn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function lr(l){let u=g.useRef();return u.current===void 0&&(u.current=l()),u}function cn(l){let u=Zs(),s=()=>l(u.snapshot());return g.useSyncExternalStore(u.subscribe,s,s)}function uf(l,u,s,c=[]){let d=g.useRef(),f=tl();return Nn(()=>{var v;let m=(()=>{var C;for(let P of s){if(typeof P=="string")return P.trim();if(typeof P=="object"&&"current"in P)return P.current?(C=P.current.textContent)==null?void 0:C.trim():d.current}})(),j=c.map(C=>C.trim());f.value(l,m,j),(v=u.current)==null||v.setAttribute(rr,m),d.current=m}),d}var Wv=()=>{let[l,u]=g.useState(),s=lr(()=>new Map);return Nn(()=>{s.current.forEach(c=>c()),s.current=new Map},[l]),(c,d)=>{s.current.set(c,d),u({})}};function Hv(l){let u=l.type;return typeof u=="function"?u(l.props):"render"in u?u.render(l.props):l}function Ro({asChild:l,children:u},s){return l&&g.isValidElement(u)?g.cloneElement(Hv(u),{ref:u.ref},s(u.props.children)):s(u)}var Gv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Kv({onNavigate:l}){const[u,s]=g.useState(!1);return g.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),p.jsx(tr.Dialog,{open:u,onOpenChange:s,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>s(!1),children:p.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[p.jsx(tr.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),p.jsxs(tr.List,{className:"max-h-80 overflow-y-auto p-2",children:[p.jsx(tr.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),p.jsx(tr.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Us.map(c=>p.jsxs(tr.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{l(c.id),s(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[p.jsx(c.icon,{className:"h-4 w-4 text-primary"}),p.jsx("span",{children:c.label}),p.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function rt(l,u){const s=await fetch(l,{headers:{"Content-Type":"application/json"},...u});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Cn({children:l,tone:u="muted"}){const s={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return p.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${s[u]}`,children:l})}function af({caps:l}){return l?p.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[l.coder&&p.jsx(Cn,{children:"💻 Code"}),l.vision&&p.jsx(Cn,{children:"👁 Bild"}),l.reasoning&&p.jsx(Cn,{children:"🧠 Reason"}),l.moe&&p.jsxs(Cn,{tone:"primary",children:["🧩 MoE",l.active_b?`·${l.active_b}b`:""]}),l.tools==="yes"&&p.jsx(Cn,{tone:"primary",children:"🛠 Tools"}),l.tools==="likely"&&p.jsx(Cn,{tone:"warn",children:"🛠 Tools?"}),l.embedding&&p.jsx(Cn,{children:"🔢 Embed"})]}):null}function cf(l){var u,s,c="";if(typeof l=="string"||typeof l=="number")c+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(u=0;u{const u=Zv(l),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=l;return{getClassGroupId:v=>{const m=v.split(qs);return m[0]===""&&m.length!==1&&m.shift(),df(m,u)||Xv(v)},getConflictingClassGroupIds:(v,m)=>{const j=s[v]||[];return m&&c[v]?[...j,...c[v]]:j}}},df=(l,u)=>{var v;if(l.length===0)return u.classGroupId;const s=l[0],c=u.nextPart.get(s),d=c?df(l.slice(1),c):void 0;if(d)return d;if(u.validators.length===0)return;const f=l.join(qs);return(v=u.validators.find(({validator:m})=>m(f)))==null?void 0:v.classGroupId},wd=/^\[(.+)\]$/,Xv=l=>{if(wd.test(l)){const u=wd.exec(l)[1],s=u==null?void 0:u.substring(0,u.indexOf(":"));if(s)return"arbitrary.."+s}},Zv=l=>{const{theme:u,prefix:s}=l,c={nextPart:new Map,validators:[]};return Jv(Object.entries(l.classGroups),s).forEach(([f,v])=>{Hs(v,c,f,u)}),c},Hs=(l,u,s,c)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?u:kd(u,d);f.classGroupId=s;return}if(typeof d=="function"){if(qv(d)){Hs(d(c),u,s,c);return}u.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([f,v])=>{Hs(v,kd(u,f),s,c)})})},kd=(l,u)=>{let s=l;return u.split(qs).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},qv=l=>l.isThemeGetter,Jv=(l,u)=>u?l.map(([s,c])=>{const d=c.map(f=>typeof f=="string"?u+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([v,m])=>[u+v,m])):f);return[s,d]}):l,eg=l=>{if(l<1)return{get:()=>{},set:()=>{}};let u=0,s=new Map,c=new Map;const d=(f,v)=>{s.set(f,v),u++,u>l&&(u=0,c=s,s=new Map)};return{get(f){let v=s.get(f);if(v!==void 0)return v;if((v=c.get(f))!==void 0)return d(f,v),v},set(f,v){s.has(f)?s.set(f,v):d(f,v)}}},ff="!",tg=l=>{const{separator:u,experimentalParseClassName:s}=l,c=u.length===1,d=u[0],f=u.length,v=m=>{const j=[];let C=0,P=0,_;for(let R=0;RP?_-P:void 0;return{modifiers:j,hasImportantModifier:L,baseClassName:H,maybePostfixModifierPosition:b}};return s?m=>s({className:m,parseClassName:v}):v},ng=l=>{if(l.length<=1)return l;const u=[];let s=[];return l.forEach(c=>{c[0]==="["?(u.push(...s.sort(),c),s=[]):s.push(c)}),u.push(...s.sort()),u},rg=l=>({cache:eg(l.cacheSize),parseClassName:tg(l),...Yv(l)}),lg=/\s+/,og=(l,u)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:d}=u,f=[],v=l.trim().split(lg);let m="";for(let j=v.length-1;j>=0;j-=1){const C=v[j],{modifiers:P,hasImportantModifier:_,baseClassName:M,maybePostfixModifierPosition:L}=s(C);let H=!!L,b=c(H?M.substring(0,L):M);if(!b){if(!H){m=C+(m.length>0?" "+m:m);continue}if(b=c(M),!b){m=C+(m.length>0?" "+m:m);continue}H=!1}const R=ng(P).join(":"),V=_?R+ff:R,W=V+b;if(f.includes(W))continue;f.push(W);const te=d(b,H);for(let q=0;q0?" "+m:m)}return m};function ig(){let l=0,u,s,c="";for(;l{if(typeof l=="string")return l;let u,s="";for(let c=0;c_(P),l());return s=rg(C),c=s.cache.get,d=s.cache.set,f=m,m(j)}function m(j){const C=c(j);if(C)return C;const P=og(j,s);return d(j,P),P}return function(){return f(ig.apply(null,arguments))}}const Se=l=>{const u=s=>s[l]||[];return u.isThemeGetter=!0,u},mf=/^\[(?:([a-z-]+):)?(.+)\]$/i,ug=/^\d+\/\d+$/,ag=new Set(["px","full","screen"]),cg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=l=>ir(l)||ag.has(l)||ug.test(l),on=l=>ar(l,"length",Sg),ir=l=>!!l&&!Number.isNaN(Number(l)),Ds=l=>ar(l,"number",ir),Zr=l=>!!l&&Number.isInteger(Number(l)),hg=l=>l.endsWith("%")&&ir(l.slice(0,-1)),ae=l=>mf.test(l),sn=l=>cg.test(l),vg=new Set(["length","size","percentage"]),gg=l=>ar(l,vg,hf),yg=l=>ar(l,"position",hf),xg=new Set(["image","url"]),wg=l=>ar(l,xg,Cg),kg=l=>ar(l,"",Eg),qr=()=>!0,ar=(l,u,s)=>{const c=mf.exec(l);return c?c[1]?typeof u=="string"?c[1]===u:u.has(c[1]):s(c[2]):!1},Sg=l=>dg.test(l)&&!fg.test(l),hf=()=>!1,Eg=l=>pg.test(l),Cg=l=>mg.test(l),Ng=()=>{const l=Se("colors"),u=Se("spacing"),s=Se("blur"),c=Se("brightness"),d=Se("borderColor"),f=Se("borderRadius"),v=Se("borderSpacing"),m=Se("borderWidth"),j=Se("contrast"),C=Se("grayscale"),P=Se("hueRotate"),_=Se("invert"),M=Se("gap"),L=Se("gradientColorStops"),H=Se("gradientColorStopPositions"),b=Se("inset"),R=Se("margin"),V=Se("opacity"),W=Se("padding"),te=Se("saturate"),q=Se("scale"),le=Se("sepia"),ne=Se("skew"),se=Se("space"),ye=Se("translate"),de=()=>["auto","contain","none"],xe=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ae,u],ie=()=>[ae,u],Le=()=>["",At,on],Ne=()=>["auto",ir,ae],Oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],je=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[ir,ae];return{cacheSize:500,separator:":",theme:{colors:[qr],spacing:[At,on],blur:["none","",sn,ae],brightness:k(),borderColor:[l],borderRadius:["none","","full",sn,ae],borderSpacing:ie(),borderWidth:Le(),contrast:k(),grayscale:Z(),hueRotate:k(),invert:Z(),gap:ie(),gradientColorStops:[l],gradientColorStopPositions:[hg,on],inset:Ce(),margin:Ce(),opacity:k(),padding:ie(),saturate:k(),scale:k(),sepia:Z(),skew:k(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Oe(),ae]}],overflow:[{overflow:xe()}],"overflow-x":[{"overflow-x":xe()}],"overflow-y":[{"overflow-y":xe()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zr,ae]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Zr,ae]}],"grid-cols":[{"grid-cols":[qr]}],"col-start-end":[{col:["auto",{span:["full",Zr,ae]},ae]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[qr]}],"row-start-end":[{row:["auto",{span:[Zr,ae]},ae]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[W]}],px:[{px:[W]}],py:[{py:[W]}],ps:[{ps:[W]}],pe:[{pe:[W]}],pt:[{pt:[W]}],pr:[{pr:[W]}],pb:[{pb:[W]}],pl:[{pl:[W]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,u]}],"min-w":[{"min-w":[ae,u,"min","max","fit"]}],"max-w":[{"max-w":[ae,u,"none","full","min","max","fit","prose",{screen:[sn]},sn]}],h:[{h:[ae,u,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,u,"auto","min","max","fit"]}],"font-size":[{text:["base",sn,on]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[qr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",ir,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",At,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[l]}],"placeholder-opacity":[{"placeholder-opacity":[V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[l]}],"text-opacity":[{"text-opacity":[V]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",At,on]}],"underline-offset":[{"underline-offset":["auto",At,ae]}],"text-decoration-color":[{decoration:[l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[V]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Oe(),yg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wg]}],"bg-color":[{bg:[l]}],"gradient-from-pos":[{from:[H]}],"gradient-via-pos":[{via:[H]}],"gradient-to-pos":[{to:[H]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[V]}],"border-style":[{border:[...je(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[V]}],"divide-style":[{divide:je()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...je()]}],"outline-offset":[{"outline-offset":[At,ae]}],"outline-w":[{outline:[At,on]}],"outline-color":[{outline:[l]}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[l]}],"ring-opacity":[{"ring-opacity":[V]}],"ring-offset-w":[{"ring-offset":[At,on]}],"ring-offset-color":[{"ring-offset":[l]}],shadow:[{shadow:["","inner","none",sn,kg]}],"shadow-color":[{shadow:[qr]}],opacity:[{opacity:[V]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[c]}],contrast:[{contrast:[j]}],"drop-shadow":[{"drop-shadow":["","none",sn,ae]}],grayscale:[{grayscale:[C]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[_]}],saturate:[{saturate:[te]}],sepia:[{sepia:[le]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[j]}],"backdrop-grayscale":[{"backdrop-grayscale":[C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[V]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[v]}],"border-spacing-x":[{"border-spacing-x":[v]}],"border-spacing-y":[{"border-spacing-y":[v]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Zr,ae]}],"translate-x":[{"translate-x":[ye]}],"translate-y":[{"translate-y":[ye]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",l]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[l]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[l,"none"]}],"stroke-w":[{stroke:[At,on,Ds]}],stroke:[{stroke:[l,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jg=sg(Ng);function kt(...l){return jg(Qv(l))}function _g(l){if(!l)return"—";const u=l/1024**3;return u>=1?`${u.toFixed(1)} GB`:`${(l/1024**2).toFixed(0)} MB`}function Pg(l){return l?`${Math.round(l/1024)}k`:"—"}function Rg({fit:l}){const u={perfect:"bg-emerald-500/15 text-emerald-500",marginal:"bg-amber-500/15 text-amber-500",too_tight:"bg-red-500/15 text-red-500"}[l.level];return p.jsxs("span",{className:kt("rounded px-1.5 py-0.5 text-[11px] font-medium",u),children:[l.text," · ~",l.req_gb," GB"]})}function bg(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{rt("/api/models").then(v=>u(v.models)).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):s?p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",s,")."]}):p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"})]})}),p.jsxs("tbody",{children:[l.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),l.map(v=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:v.name}),p.jsx("td",{className:"px-4 py-2.5",children:v.role?p.jsx("span",{className:"rounded-md bg-primary/15 px-2 py-0.5 text-xs text-primary",children:v.role}):p.jsx("span",{className:"text-muted-foreground",children:"—"})}),p.jsx("td",{className:"px-4 py-2.5",children:p.jsx(af,{caps:v.capabilities})}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Pg(v.ctx)}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:_g(v.size_bytes)})]},v.name))]})]})})}function Mg(){const[l,u]=g.useState(null),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{rt("/api/discover").then(u).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):s||!l?p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",s,")."]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",l.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),l.categories.map(v=>p.jsxs("div",{className:"space-y-2",children:[p.jsx("h3",{className:"text-sm font-semibold",children:v.title}),p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.models.map(m=>p.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[v.recommended===m.repo&&p.jsx("span",{title:"beste Wahl",children:"⭐"}),p.jsx("span",{className:"truncate text-sm font-medium",children:m.name})]}),p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:m.author}),p.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[p.jsx(af,{caps:m.caps}),p.jsx(Rg,{fit:m.fit})]})]},m.repo))})]},v.role))]})}function Tg(){const[l,u]=g.useState("installed");return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),p.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(s=>p.jsx("button",{onClick:()=>u(s),className:kt("rounded-md px-3 py-1.5 transition-colors",l===s?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:s==="installed"?"Installiert":"Modelle finden"},s))}),l==="installed"?p.jsx(bg,{}):p.jsx(Mg,{})]})}function Lg(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{rt("/api/routing").then(u).catch(d=>c(String(d)))},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. ",p.jsx("code",{children:"auto"})," = schnell im Alltag, eskaliert bei Bedarf auf ",p.jsx("code",{children:"heavy"}),". Gilt für Hermes ",p.jsx("em",{children:"und"})," Vibe Coding."]})]}),s&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",l.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",l.gateway_reachable?"online":"offline (Config wird trotzdem angezeigt)"]}),p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),p.jsx("tbody",{children:l.routes.map(d=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),p.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),l.fallbacks.length>0&&p.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),p.jsx("ul",{className:"space-y-1 text-muted-foreground",children:l.fallbacks.map((d,f)=>{const[v,m]=Object.entries(d)[0];return p.jsxs("li",{children:[p.jsx("code",{children:v})," → ",p.jsx("code",{children:m.join(", ")})]},f)})})]})]})]})}function nr(l){return(l/1024**3).toFixed(1)}function ko({label:l,percent:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-baseline justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:l}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:[Math.round(u),"%"]})]}),p.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-muted",children:p.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(u,100)}%`}})}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Og(){const[l,u]=g.useState(null),[s,c]=g.useState(null),[d,f]=g.useState(""),[v,m]=g.useState("");g.useEffect(()=>{const C=()=>{rt("/api/system/status").then(u).catch(_=>f(String(_))),rt("/api/system/services").then(c).catch(()=>{})};C();const P=setInterval(C,3e3);return()=>clearInterval(P)},[]);async function j(){m("…");try{const C=await rt("/api/system/backup",{method:"POST"});m(C.ok?`Snapshot ${C.snapshot} (${C.files.length} Dateien)`:"Nichts zu sichern")}catch(C){m(`Fehler: ${C}`)}}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"System"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Live-Auslastung der Box, Dienste & Updates."})]}),d&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["System-Status nicht lesbar (",d,")."]}),l&&p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[p.jsx(ko,{label:"CPU",percent:l.cpu.percent,detail:l.cpu.cores?`${l.cpu.cores} Kerne`:void 0}),p.jsx(ko,{label:"RAM",percent:l.ram.percent,detail:`${nr(l.ram.used)} / ${nr(l.ram.total)} GB`}),l.gpu&&l.gpu.busy_percent!=null&&p.jsx(ko,{label:"GPU",percent:l.gpu.busy_percent,detail:l.gpu.vram_used!=null&&l.gpu.vram_total!=null?`${nr(l.gpu.vram_used)} / ${nr(l.gpu.vram_total)} GB VRAM`:void 0}),l.disk&&p.jsx(ko,{label:"Disk (Modelle)",percent:l.disk.percent,detail:`${nr(l.disk.used)} / ${nr(l.disk.total)} GB`})]}),(l==null?void 0:l.temp)&&(l.temp.cpu||l.temp.gpu)&&p.jsxs("div",{className:"flex gap-3 text-sm text-muted-foreground",children:[l.temp.cpu!=null&&p.jsxs("span",{children:["CPU ",l.temp.cpu," °C"]}),l.temp.gpu!=null&&p.jsxs("span",{children:["GPU ",l.temp.gpu," °C"]})]}),s&&p.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[p.jsx("div",{className:"mb-3 text-sm font-medium",children:"Dienste"}),p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:s.services.map(C=>p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",C.ok?"bg-emerald-500":"bg-amber-500")}),p.jsx("span",{children:C.name}),p.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground",children:C.url})]},C.name))}),p.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-xs",children:[p.jsxs("a",{href:s.links.engine_ui,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[p.jsx(Fs,{className:"h-3 w-3"})," Engine-Logs (llama-swap /ui)"]}),p.jsxs("a",{href:s.links.gateway,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[p.jsx(Fs,{className:"h-3 w-3"})," Gateway"]})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("button",{onClick:j,className:"flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm hover:bg-accent",children:[p.jsx(Im,{className:"h-3.5 w-3.5 text-primary"})," Backup jetzt"]}),v&&p.jsx("span",{className:"text-xs text-muted-foreground",children:v})]})]})}function zg(){const[l,u]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[s,c]=g.useState(null),[d,f]=g.useState("cline"),[v,m]=g.useState(!1),[j,C]=g.useState("");g.useEffect(()=>{rt(`/api/connect?host=${encodeURIComponent(l)}`).then(c).catch(L=>C(String(L)))},[l]);function P(L){u(L),L&&localStorage.setItem("mc_host",L)}const _=s==null?void 0:s.tools[d];async function M(){_&&(await navigator.clipboard.writeText(_.snippet),m(!0),setTimeout(()=>m(!1),1500))}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Verbinden"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Fertige Snippets für deine Tools auf dem lokalen PC — alle zeigen auf den Gateway der Box (",p.jsx("code",{children:"model: auto"}),") + das geteilte Gedächtnis."]})]}),p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("label",{className:"text-muted-foreground",children:"Box-LAN-IP:"}),p.jsx("input",{value:l,onChange:L=>P(L.target.value),className:"rounded-md border border-border bg-card px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"}),s&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",s.gateway_url]})]}),j&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Snippets nicht ladbar (",j,")."]}),s&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tools).map(([L,H])=>p.jsx("button",{onClick:()=>f(L),className:kt("rounded-md px-3 py-1.5 text-sm transition-colors",d===L?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:H.label},L))}),_&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:_.note}),p.jsxs("button",{onClick:M,className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent",children:[v?p.jsx(Pm,{className:"h-3.5 w-3.5 text-emerald-500"}):p.jsx(Mm,{className:"h-3.5 w-3.5"}),v?"Kopiert":"Kopieren"]})]}),p.jsx("pre",{className:"overflow-x-auto rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:p.jsx("code",{children:_.snippet})})]})]})]})}const Sd=["user","instruction","stable","versioned","ephemeral"],As={user:"👤 User",instruction:"📋 Regel",stable:"🔵 Fakt",versioned:"🟡 Version",ephemeral:"⏱ Temporär"};function Ig(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(""),[v,m]=g.useState(""),[j,C]=g.useState("stable"),[P,_]=g.useState("");function M(){const R=new URLSearchParams;d&&R.set("q",d),s&&R.set("category",s),rt(`/api/memory?${R}`).then(u).catch(V=>_(String(V)))}g.useEffect(M,[d,s]);async function L(){v.trim()&&(await rt("/api/memory",{method:"POST",body:JSON.stringify({content:v,category:j,source:"ui"})}),m(""),M())}async function H(R){await rt(`/api/memory/${R}`,{method:"DELETE"}),M()}async function b(){const R=await rt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(R.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${R.duplicate_count} Dublette(n) in ${R.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await rt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M())}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Gedächtnis"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:'Die geteilte „Verfassung" — alle Tools (Hermes, IDEs) lesen/schreiben hier via MCP.'})]}),p.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:[p.jsx(Dm,{className:"h-3.5 w-3.5 text-primary"})," Aufräumen"]})]}),p.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[p.jsx("textarea",{value:v,onChange:R=>m(R.target.value),placeholder:"Neuen Fakt / Regel hinzufügen…",rows:2,className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring"}),p.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[p.jsx("select",{value:j,onChange:R=>C(R.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none",children:Sd.map(R=>p.jsx("option",{value:R,children:As[R]},R))}),p.jsx("button",{onClick:L,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Speichern"})]})]}),p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.jsx("input",{value:d,onChange:R=>f(R.target.value),placeholder:"Suchen…",className:"rounded-md border border-border bg-card px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),p.jsx("button",{onClick:()=>c(""),className:kt("rounded-md px-2.5 py-1.5 text-xs",s?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary"),children:"Alle"}),Sd.map(R=>p.jsx("button",{onClick:()=>c(R),className:kt("rounded-md px-2.5 py-1.5 text-xs",s===R?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:As[R]},R))]}),P&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Fehler: ",P]}),p.jsxs("div",{className:"space-y-2",children:[l.length===0&&p.jsx("div",{className:"text-sm text-muted-foreground",children:"Keine Einträge."}),l.map(R=>p.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-3",children:[p.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:As[R.category]||R.category}),p.jsx("span",{className:"flex-1 text-sm",children:R.content}),p.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:R.source}),p.jsx("button",{onClick:()=>H(R.id),className:"shrink-0 text-muted-foreground hover:text-red-500",children:p.jsx(Fm,{className:"h-4 w-4"})})]},R.id))]})]})}function Dg({ok:l}){return p.jsx("span",{className:kt("h-2 w-2 rounded-full",l?"bg-emerald-500":"bg-amber-500")})}function So({label:l,ok:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Dg,{ok:u}),p.jsx("span",{className:"text-sm font-medium",children:l})]}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Ag(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{const d=()=>rt("/api/agent/status").then(u).catch(v=>c(String(v)));d();const f=setInterval(d,8e3);return()=>clearInterval(f)},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Hermes"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Der autonome Agent läuft eigenständig (Gateway :8642) und hat seine eigene Oberfläche (hermes-webui :8787). Mission Control verlinkt nur — Chat & Steuerung leben dort."})]}),(l==null?void 0:l.webui_url)&&p.jsxs("a",{href:l.webui_url,target:"_blank",rel:"noopener",className:kt("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium",l.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90":"border border-border text-muted-foreground"),children:[p.jsx(Fs,{className:"h-4 w-4"})," Hermes öffnen"]})]}),s&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Status nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[p.jsx(So,{label:"Gateway (:8642)",ok:l.gateway_reachable,detail:l.gateway_reachable?"erreichbar":"offline"}),p.jsx(So,{label:"WebUI (:8787)",ok:l.webui_reachable,detail:l.webui_reachable?"erreichbar":"offline"}),p.jsx(So,{label:"Brain",ok:l.gateway_reachable,detail:"model: auto (über Gateway)"}),p.jsx(So,{label:"Verdrahtung",ok:l.has_config,detail:`config ${l.has_config?"✓":"—"} · skills ${l.has_skills?"✓":"—"} · memories ${l.has_memories?"✓":"—"}`})]}),!l.gateway_reachable&&p.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card/50 p-5 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Hermes ist (hier) offline"}),p.jsxs("p",{className:"text-muted-foreground",children:["Der Agent + hermes-webui laufen auf der Box. Einrichtung & volle Verdrahtung (Brain = ",p.jsx("code",{children:"model: auto"}),", Tools/MCP inkl. ",p.jsx("code",{children:"mcp_mc"})," + ",p.jsx("code",{children:"mcp_memory"}),", SSH→Windows, lokale Browser-/Such-MCP) sind im Runbook beschrieben:",p.jsx("code",{className:"ml-1",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]})}function Fg({title:l,hint:u}){return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:l}),p.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),p.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[p.jsx(bm,{className:"h-8 w-8 text-muted-foreground"}),p.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function Ug(){const[l,u]=g.useState("models"),[s,c]=g.useState(null),[d,f]=g.useState(()=>localStorage.getItem("mc_theme")!=="light");g.useEffect(()=>{const m=()=>rt("/api/health").then(c).catch(()=>c(null));m();const j=setInterval(m,1e4);return()=>clearInterval(j)},[]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",d),localStorage.setItem("mc_theme",d?"dark":"light")},[d]);const v=Us.find(m=>m.id===l);return p.jsxs("div",{className:"flex h-full",children:[p.jsx(Kv,{onNavigate:u}),p.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[p.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[p.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),p.jsxs("div",{className:"leading-tight",children:[p.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),p.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),p.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Us.map(m=>p.jsxs("button",{onClick:()=>u(m.id),className:kt("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",l===m.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[p.jsx(m.icon,{className:"h-4 w-4"}),m.label]},m.id))}),p.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:s?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",s.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",s.engine_reachable?"online":"offline"," · v",s.version]}):p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[p.jsx("div",{className:"text-sm text-muted-foreground",children:v.hint}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>f(m=>!m),className:"flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent",title:"Hell/Dunkel",children:d?p.jsx(Am,{className:"h-3.5 w-3.5"}):p.jsx(Lm,{className:"h-3.5 w-3.5"})}),p.jsxs("button",{onClick:()=>{const m=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(m)},className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[p.jsx(Rm,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Springen"}),p.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]})]}),p.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[l==="models"&&p.jsx(Tg,{}),l==="routing"&&p.jsx(Lg,{}),l==="system"&&p.jsx(Og,{}),l==="connect"&&p.jsx(zg,{}),l==="memory"&&p.jsx(Ig,{}),l==="agent"&&p.jsx(Ag,{}),!["models","routing","system","connect","memory","agent"].includes(l)&&p.jsx(Fg,{title:v.label,hint:v.hint})]})]})]})}km.createRoot(document.getElementById("root")).render(p.jsx(Cd.StrictMode,{children:p.jsx(Ug,{})})); +`)},mv=0,er=[];function hv(l){var u=g.useRef([]),s=g.useRef([0,0]),c=g.useRef(),d=g.useState(mv++)[0],f=g.useState(Ad)[0],v=g.useRef(l);g.useEffect(function(){v.current=l},[l]),g.useEffect(function(){if(l.inert){document.body.classList.add("block-interactivity-".concat(d));var b=Ih([l.lockRef.current],(l.shards||[]).map(yd),!0).filter(Boolean);return b.forEach(function(R){return R.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),b.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(d))})}}},[l.inert,l.lockRef.current,l.shards]);var m=g.useCallback(function(b,R){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!v.current.allowPinchZoom;var V=yo(b),W=s.current,te="deltaX"in b?b.deltaX:W[0]-V[0],q="deltaY"in b?b.deltaY:W[1]-V[1],le,ne=b.target,se=Math.abs(te)>Math.abs(q)?"h":"v";if("touches"in b&&se==="h"&&ne.type==="range")return!1;var ye=window.getSelection(),de=ye&&ye.anchorNode,xe=de?de===ne||de.contains(ne):!1;if(xe)return!1;var Ce=vd(se,ne);if(!Ce)return!0;if(Ce?le=se:(le=se==="v"?"h":"v",Ce=vd(se,ne)),!Ce)return!1;if(!c.current&&"changedTouches"in b&&(te||q)&&(c.current=le),!le)return!0;var ie=c.current||le;return dv(ie,R,b,ie==="h"?te:q)},[]),j=g.useCallback(function(b){var R=b;if(!(!er.length||er[er.length-1]!==f)){var V="deltaY"in R?gd(R):yo(R),W=u.current.filter(function(le){return le.name===R.type&&(le.target===R.target||R.target===le.shadowParent)&&fv(le.delta,V)})[0];if(W&&W.should){R.cancelable&&R.preventDefault();return}if(!W){var te=(v.current.shards||[]).map(yd).filter(Boolean).filter(function(le){return le.contains(R.target)}),q=te.length>0?m(R,te[0]):!v.current.noIsolation;q&&R.cancelable&&R.preventDefault()}}},[]),C=g.useCallback(function(b,R,V,W){var te={name:b,delta:R,target:V,should:W,shadowParent:vv(V)};u.current.push(te),setTimeout(function(){u.current=u.current.filter(function(q){return q!==te})},1)},[]),P=g.useCallback(function(b){s.current=yo(b),c.current=void 0},[]),_=g.useCallback(function(b){C(b.type,gd(b),b.target,m(b,l.lockRef.current))},[]),M=g.useCallback(function(b){C(b.type,yo(b),b.target,m(b,l.lockRef.current))},[]);g.useEffect(function(){return er.push(f),l.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:M}),document.addEventListener("wheel",j,Jn),document.addEventListener("touchmove",j,Jn),document.addEventListener("touchstart",P,Jn),function(){er=er.filter(function(b){return b!==f}),document.removeEventListener("wheel",j,Jn),document.removeEventListener("touchmove",j,Jn),document.removeEventListener("touchstart",P,Jn)}},[]);var L=l.removeScrollBar,H=l.inert;return g.createElement(g.Fragment,null,H?g.createElement(f,{styles:pv(d)}):null,L?g.createElement(lv,{noRelative:l.noRelative,gapMode:l.gapMode}):null)}function vv(l){for(var u=null;l!==null;)l instanceof ShadowRoot&&(u=l.host,l=l.host),l=l.parentNode;return u}const gv=Hh(Dd,hv);var $d=g.forwardRef(function(l,u){return g.createElement(_o,Rt({},l,{ref:u,sideCar:gv}))});$d.classNames=_o.classNames;var yv=function(l){if(typeof document>"u")return null;var u=Array.isArray(l)?l[0]:l;return u.ownerDocument.body},tr=new WeakMap,xo=new WeakMap,wo={},zs=0,Vd=function(l){return l&&(l.host||Vd(l.parentNode))},xv=function(l,u){return u.map(function(s){if(l.contains(s))return s;var c=Vd(s);return c&&l.contains(c)?c:(console.error("aria-hidden",s,"in not contained inside",l,". Doing nothing"),null)}).filter(function(s){return!!s})},wv=function(l,u,s,c){var d=xv(u,Array.isArray(l)?l:[l]);wo[s]||(wo[s]=new WeakMap);var f=wo[s],v=[],m=new Set,j=new Set(d),C=function(_){!_||m.has(_)||(m.add(_),C(_.parentNode))};d.forEach(C);var P=function(_){!_||j.has(_)||Array.prototype.forEach.call(_.children,function(M){if(m.has(M))P(M);else try{var L=M.getAttribute(c),H=L!==null&&L!=="false",b=(tr.get(M)||0)+1,R=(f.get(M)||0)+1;tr.set(M,b),f.set(M,R),v.push(M),b===1&&H&&xo.set(M,!0),R===1&&M.setAttribute(s,"true"),H||M.setAttribute(c,"true")}catch(V){console.error("aria-hidden: cannot operate on ",M,V)}})};return P(u),m.clear(),zs++,function(){v.forEach(function(_){var M=tr.get(_)-1,L=f.get(_)-1;tr.set(_,M),f.set(_,L),M||(xo.has(_)||_.removeAttribute(c),xo.delete(_)),L||_.removeAttribute(s)}),zs--,zs||(tr=new WeakMap,tr=new WeakMap,xo=new WeakMap,wo={})}},kv=function(l,u,s){s===void 0&&(s="data-aria-hidden");var c=Array.from(Array.isArray(l)?l:[l]),d=yv(l);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),wv(c,d,s,"aria-hidden")):function(){return null}},Po="Dialog",[Wd]=Ym(Po),[Sv,St]=Wd(Po),Hd=l=>{const{__scopeDialog:u,children:s,open:c,defaultOpen:d,onOpenChange:f,modal:v=!0}=l,m=g.useRef(null),j=g.useRef(null),[C,P]=eh({prop:c,defaultProp:d??!1,onChange:f,caller:Po});return p.jsx(Sv,{scope:u,triggerRef:m,contentRef:j,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:C,onOpenChange:P,onOpenToggle:g.useCallback(()=>P(_=>!_),[P]),modal:v,children:s})};Hd.displayName=Po;var Gd="DialogTrigger",Ev=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Gd,s),f=_n(u,d.triggerRef);return p.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Xs(d.open),...c,ref:f,onClick:cn(l.onClick,d.onOpenToggle)})});Ev.displayName=Gd;var Ys="DialogPortal",[Cv,Kd]=Wd(Ys,{forceMount:void 0}),Qd=l=>{const{__scopeDialog:u,forceMount:s,children:c,container:d}=l,f=St(Ys,u);return p.jsx(Cv,{scope:u,forceMount:s,children:g.Children.map(c,v=>p.jsx(jo,{present:s||f.open,children:p.jsx(Od,{asChild:!0,container:d,children:v})}))})};Qd.displayName=Ys;var No="DialogOverlay",Yd=g.forwardRef((l,u)=>{const s=Kd(No,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(No,l.__scopeDialog);return f.modal?p.jsx(jo,{present:c||f.open,children:p.jsx(jv,{...d,ref:u})}):null});Yd.displayName=No;var Nv=Rd("DialogOverlay.RemoveScroll"),jv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(No,s),f=wh(),v=_n(u,f);return p.jsx($d,{as:Nv,allowPinchZoom:!0,shards:[d.contentRef],children:p.jsx(Ve.div,{"data-state":Xs(d.open),...c,ref:v,style:{pointerEvents:"auto",...c.style}})})}),ur="DialogContent",Xd=g.forwardRef((l,u)=>{const s=Kd(ur,l.__scopeDialog),{forceMount:c=s.forceMount,...d}=l,f=St(ur,l.__scopeDialog);return p.jsx(jo,{present:c||f.open,children:f.modal?p.jsx(_v,{...d,ref:u}):p.jsx(Pv,{...d,ref:u})})});Xd.displayName=ur;var _v=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(null),d=_n(u,s.contentRef,c);return g.useEffect(()=>{const f=c.current;if(f)return kv(f)},[]),p.jsx(Zd,{...l,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:cn(l.onCloseAutoFocus,f=>{var v;f.preventDefault(),(v=s.triggerRef.current)==null||v.focus()}),onPointerDownOutside:cn(l.onPointerDownOutside,f=>{const v=f.detail.originalEvent,m=v.button===0&&v.ctrlKey===!0;(v.button===2||m)&&f.preventDefault()}),onFocusOutside:cn(l.onFocusOutside,f=>f.preventDefault())})}),Pv=g.forwardRef((l,u)=>{const s=St(ur,l.__scopeDialog),c=g.useRef(!1),d=g.useRef(!1);return p.jsx(Zd,{...l,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var v,m;(v=l.onCloseAutoFocus)==null||v.call(l,f),f.defaultPrevented||(c.current||(m=s.triggerRef.current)==null||m.focus(),f.preventDefault()),c.current=!1,d.current=!1},onInteractOutside:f=>{var j,C;(j=l.onInteractOutside)==null||j.call(l,f),f.defaultPrevented||(c.current=!0,f.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const v=f.target;((C=s.triggerRef.current)==null?void 0:C.contains(v))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&d.current&&f.preventDefault()}})}),Zd=g.forwardRef((l,u)=>{const{__scopeDialog:s,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,...v}=l,m=St(ur,s);return zh(),p.jsx(p.Fragment,{children:p.jsx(Td,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:d,onUnmountAutoFocus:f,children:p.jsx(bd,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Xs(m.open),...v,ref:u,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),qd="DialogTitle",Rv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(qd,s);return p.jsx(Ve.h2,{id:d.titleId,...c,ref:u})});Rv.displayName=qd;var Jd="DialogDescription",bv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(Jd,s);return p.jsx(Ve.p,{id:d.descriptionId,...c,ref:u})});bv.displayName=Jd;var ef="DialogClose",Mv=g.forwardRef((l,u)=>{const{__scopeDialog:s,...c}=l,d=St(ef,s);return p.jsx(Ve.button,{type:"button",...c,ref:u,onClick:cn(l.onClick,()=>d.onOpenChange(!1))})});Mv.displayName=ef;function Xs(l){return l?"open":"closed"}var Xr='[cmdk-group=""]',Is='[cmdk-group-items=""]',Tv='[cmdk-group-heading=""]',tf='[cmdk-item=""]',xd=`${tf}:not([aria-disabled="true"])`,Ws="cmdk-item-select",rr="data-value",Lv=(l,u,s)=>Qm(l,u,s),nf=g.createContext(void 0),tl=()=>g.useContext(nf),rf=g.createContext(void 0),Zs=()=>g.useContext(rf),lf=g.createContext(void 0),of=g.forwardRef((l,u)=>{let s=lr(()=>{var w,A;return{search:"",value:(A=(w=l.value)!=null?w:l.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),c=lr(()=>new Set),d=lr(()=>new Map),f=lr(()=>new Map),v=lr(()=>new Set),m=sf(l),{label:j,children:C,value:P,onValueChange:_,filter:M,shouldFilter:L,loop:H,disablePointerSelection:b=!1,vimBindings:R=!0,...V}=l,W=Ft(),te=Ft(),q=Ft(),le=g.useRef(null),ne=Wv();jn(()=>{if(P!==void 0){let w=P.trim();s.current.value=w,se.emit()}},[P]),jn(()=>{ne(6,Le)},[]);let se=g.useMemo(()=>({subscribe:w=>(v.current.add(w),()=>v.current.delete(w)),snapshot:()=>s.current,setState:(w,A,B)=>{var D,Y,re,ue;if(!Object.is(s.current[w],A)){if(s.current[w]=A,w==="search")ie(),xe(),ne(1,Ce);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(q);ce?ce.focus():(D=document.getElementById(W))==null||D.focus()}if(ne(7,()=>{var ce;s.current.selectedItemId=(ce=Ne())==null?void 0:ce.id,se.emit()}),B||ne(5,Le),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=A??"";(ue=(re=m.current).onValueChange)==null||ue.call(re,ce);return}}se.emit()}},emit:()=>{v.current.forEach(w=>w())}}),[]),ye=g.useMemo(()=>({value:(w,A,B)=>{var D;A!==((D=f.current.get(w))==null?void 0:D.value)&&(f.current.set(w,{value:A,keywords:B}),s.current.filtered.items.set(w,de(A,B)),ne(2,()=>{xe(),se.emit()}))},item:(w,A)=>(c.current.add(w),A&&(d.current.has(A)?d.current.get(A).add(w):d.current.set(A,new Set([w]))),ne(3,()=>{ie(),xe(),s.current.value||Ce(),se.emit()}),()=>{f.current.delete(w),c.current.delete(w),s.current.filtered.items.delete(w);let B=Ne();ne(4,()=>{ie(),(B==null?void 0:B.getAttribute("id"))===w&&Ce(),se.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{f.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:j||l["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:W,inputId:q,labelId:te,listInnerRef:le}),[]);function de(w,A){var B,D;let Y=(D=(B=m.current)==null?void 0:B.filter)!=null?D:Lv;return w?Y(w,s.current.search,A):0}function xe(){if(!s.current.search||m.current.shouldFilter===!1)return;let w=s.current.filtered.items,A=[];s.current.filtered.groups.forEach(D=>{let Y=d.current.get(D),re=0;Y.forEach(ue=>{let ce=w.get(ue);re=Math.max(ce,re)}),A.push([D,re])});let B=le.current;Oe().sort((D,Y)=>{var re,ue;let ce=D.getAttribute("id"),De=Y.getAttribute("id");return((re=w.get(De))!=null?re:0)-((ue=w.get(ce))!=null?ue:0)}).forEach(D=>{let Y=D.closest(Is);Y?Y.appendChild(D.parentElement===Y?D:D.closest(`${Is} > *`)):B.appendChild(D.parentElement===B?D:D.closest(`${Is} > *`))}),A.sort((D,Y)=>Y[1]-D[1]).forEach(D=>{var Y;let re=(Y=le.current)==null?void 0:Y.querySelector(`${Xr}[${rr}="${encodeURIComponent(D[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ce(){let w=Oe().find(B=>B.getAttribute("aria-disabled")!=="true"),A=w==null?void 0:w.getAttribute(rr);se.setState("value",A||void 0)}function ie(){var w,A,B,D;if(!s.current.search||m.current.shouldFilter===!1){s.current.filtered.count=c.current.size;return}s.current.filtered.groups=new Set;let Y=0;for(let re of c.current){let ue=(A=(w=f.current.get(re))==null?void 0:w.value)!=null?A:"",ce=(D=(B=f.current.get(re))==null?void 0:B.keywords)!=null?D:[],De=de(ue,ce);s.current.filtered.items.set(re,De),De>0&&Y++}for(let[re,ue]of d.current)for(let ce of ue)if(s.current.filtered.items.get(ce)>0){s.current.filtered.groups.add(re);break}s.current.filtered.count=Y}function Le(){var w,A,B;let D=Ne();D&&(((w=D.parentElement)==null?void 0:w.firstChild)===D&&((B=(A=D.closest(Xr))==null?void 0:A.querySelector(Tv))==null||B.scrollIntoView({block:"nearest"})),D.scrollIntoView({block:"nearest"}))}function Ne(){var w;return(w=le.current)==null?void 0:w.querySelector(`${tf}[aria-selected="true"]`)}function Oe(){var w;return Array.from(((w=le.current)==null?void 0:w.querySelectorAll(xd))||[])}function je(w){let A=Oe()[w];A&&se.setState("value",A.getAttribute(rr))}function he(w){var A;let B=Ne(),D=Oe(),Y=D.findIndex(ue=>ue===B),re=D[Y+w];(A=m.current)!=null&&A.loop&&(re=Y+w<0?D[D.length-1]:Y+w===D.length?D[0]:D[Y+w]),re&&se.setState("value",re.getAttribute(rr))}function F(w){let A=Ne(),B=A==null?void 0:A.closest(Xr),D;for(;B&&!D;)B=w>0?$v(B,Xr):Vv(B,Xr),D=B==null?void 0:B.querySelector(xd);D?se.setState("value",D.getAttribute(rr)):he(w)}let Z=()=>je(Oe().length-1),U=w=>{w.preventDefault(),w.metaKey?Z():w.altKey?F(1):he(1)},k=w=>{w.preventDefault(),w.metaKey?je(0):w.altKey?F(-1):he(-1)};return g.createElement(Ve.div,{ref:u,tabIndex:-1,...V,"cmdk-root":"",onKeyDown:w=>{var A;(A=V.onKeyDown)==null||A.call(V,w);let B=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||B))switch(w.key){case"n":case"j":{R&&w.ctrlKey&&U(w);break}case"ArrowDown":{U(w);break}case"p":case"k":{R&&w.ctrlKey&&k(w);break}case"ArrowUp":{k(w);break}case"Home":{w.preventDefault(),je(0);break}case"End":{w.preventDefault(),Z();break}case"Enter":{w.preventDefault();let D=Ne();if(D){let Y=new Event(Ws);D.dispatchEvent(Y)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ye.inputId,id:ye.labelId,style:Gv},j),Ro(l,w=>g.createElement(rf.Provider,{value:se},g.createElement(nf.Provider,{value:ye},w))))}),Ov=g.forwardRef((l,u)=>{var s,c;let d=Ft(),f=g.useRef(null),v=g.useContext(lf),m=tl(),j=sf(l),C=(c=(s=j.current)==null?void 0:s.forceMount)!=null?c:v==null?void 0:v.forceMount;jn(()=>{if(!C)return m.item(d,v==null?void 0:v.id)},[C]);let P=uf(d,f,[l.value,l.children,f],l.keywords),_=Zs(),M=dn(ne=>ne.value&&ne.value===P.current),L=dn(ne=>C||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);g.useEffect(()=>{let ne=f.current;if(!(!ne||l.disabled))return ne.addEventListener(Ws,H),()=>ne.removeEventListener(Ws,H)},[L,l.onSelect,l.disabled]);function H(){var ne,se;b(),(se=(ne=j.current).onSelect)==null||se.call(ne,P.current)}function b(){_.setState("value",P.current,!0)}if(!L)return null;let{disabled:R,value:V,onSelect:W,forceMount:te,keywords:q,...le}=l;return g.createElement(Ve.div,{ref:sr(f,u),...le,id:d,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!M,"data-disabled":!!R,"data-selected":!!M,onPointerMove:R||m.getDisablePointerSelection()?void 0:b,onClick:R?void 0:H},l.children)}),zv=g.forwardRef((l,u)=>{let{heading:s,children:c,forceMount:d,...f}=l,v=Ft(),m=g.useRef(null),j=g.useRef(null),C=Ft(),P=tl(),_=dn(L=>d||P.filter()===!1?!0:L.search?L.filtered.groups.has(v):!0);jn(()=>P.group(v),[]),uf(v,m,[l.value,l.heading,j]);let M=g.useMemo(()=>({id:v,forceMount:d}),[d]);return g.createElement(Ve.div,{ref:sr(m,u),...f,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},s&&g.createElement("div",{ref:j,"cmdk-group-heading":"","aria-hidden":!0,id:C},s),Ro(l,L=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?C:void 0},g.createElement(lf.Provider,{value:M},L))))}),Iv=g.forwardRef((l,u)=>{let{alwaysRender:s,...c}=l,d=g.useRef(null),f=dn(v=>!v.search);return!s&&!f?null:g.createElement(Ve.div,{ref:sr(d,u),...c,"cmdk-separator":"",role:"separator"})}),Dv=g.forwardRef((l,u)=>{let{onValueChange:s,...c}=l,d=l.value!=null,f=Zs(),v=dn(C=>C.search),m=dn(C=>C.selectedItemId),j=tl();return g.useEffect(()=>{l.value!=null&&f.setState("search",l.value)},[l.value]),g.createElement(Ve.input,{ref:u,...c,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":j.listId,"aria-labelledby":j.labelId,"aria-activedescendant":m,id:j.inputId,type:"text",value:d?l.value:v,onChange:C=>{d||f.setState("search",C.target.value),s==null||s(C.target.value)}})}),Av=g.forwardRef((l,u)=>{let{children:s,label:c="Suggestions",...d}=l,f=g.useRef(null),v=g.useRef(null),m=dn(C=>C.selectedItemId),j=tl();return g.useEffect(()=>{if(v.current&&f.current){let C=v.current,P=f.current,_,M=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let L=C.offsetHeight;P.style.setProperty("--cmdk-list-height",L.toFixed(1)+"px")})});return M.observe(C),()=>{cancelAnimationFrame(_),M.unobserve(C)}}},[]),g.createElement(Ve.div,{ref:sr(f,u),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":c,id:j.listId},Ro(l,C=>g.createElement("div",{ref:sr(v,j.listInnerRef),"cmdk-list-sizer":""},C)))}),Fv=g.forwardRef((l,u)=>{let{open:s,onOpenChange:c,overlayClassName:d,contentClassName:f,container:v,...m}=l;return g.createElement(Hd,{open:s,onOpenChange:c},g.createElement(Qd,{container:v},g.createElement(Yd,{"cmdk-overlay":"",className:d}),g.createElement(Xd,{"aria-label":l.label,"cmdk-dialog":"",className:f},g.createElement(of,{ref:u,...m}))))}),Uv=g.forwardRef((l,u)=>dn(s=>s.filtered.count===0)?g.createElement(Ve.div,{ref:u,...l,"cmdk-empty":"",role:"presentation"}):null),Bv=g.forwardRef((l,u)=>{let{progress:s,children:c,label:d="Loading...",...f}=l;return g.createElement(Ve.div,{ref:u,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Ro(l,v=>g.createElement("div",{"aria-hidden":!0},v)))}),nr=Object.assign(of,{List:Av,Item:Ov,Input:Dv,Group:zv,Separator:Iv,Dialog:Fv,Empty:Uv,Loading:Bv});function $v(l,u){let s=l.nextElementSibling;for(;s;){if(s.matches(u))return s;s=s.nextElementSibling}}function Vv(l,u){let s=l.previousElementSibling;for(;s;){if(s.matches(u))return s;s=s.previousElementSibling}}function sf(l){let u=g.useRef(l);return jn(()=>{u.current=l}),u}var jn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function lr(l){let u=g.useRef();return u.current===void 0&&(u.current=l()),u}function dn(l){let u=Zs(),s=()=>l(u.snapshot());return g.useSyncExternalStore(u.subscribe,s,s)}function uf(l,u,s,c=[]){let d=g.useRef(),f=tl();return jn(()=>{var v;let m=(()=>{var C;for(let P of s){if(typeof P=="string")return P.trim();if(typeof P=="object"&&"current"in P)return P.current?(C=P.current.textContent)==null?void 0:C.trim():d.current}})(),j=c.map(C=>C.trim());f.value(l,m,j),(v=u.current)==null||v.setAttribute(rr,m),d.current=m}),d}var Wv=()=>{let[l,u]=g.useState(),s=lr(()=>new Map);return jn(()=>{s.current.forEach(c=>c()),s.current=new Map},[l]),(c,d)=>{s.current.set(c,d),u({})}};function Hv(l){let u=l.type;return typeof u=="function"?u(l.props):"render"in u?u.render(l.props):l}function Ro({asChild:l,children:u},s){return l&&g.isValidElement(u)?g.cloneElement(Hv(u),{ref:u.ref},s(u.props.children)):s(u)}var Gv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Kv({onNavigate:l}){const[u,s]=g.useState(!1);return g.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(f=>!f))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),p.jsx(nr.Dialog,{open:u,onOpenChange:s,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>s(!1),children:p.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:c=>c.stopPropagation(),children:[p.jsx(nr.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),p.jsxs(nr.List,{className:"max-h-80 overflow-y-auto p-2",children:[p.jsx(nr.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),p.jsx(nr.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Us.map(c=>p.jsxs(nr.Item,{value:`${c.label} ${c.hint}`,onSelect:()=>{l(c.id),s(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[p.jsx(c.icon,{className:"h-4 w-4 text-primary"}),p.jsx("span",{children:c.label}),p.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:c.hint})]},c.id))})]})]})})}async function rt(l,u){const s=await fetch(l,{headers:{"Content-Type":"application/json"},...u});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Nn({children:l,tone:u="muted"}){const s={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return p.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${s[u]}`,children:l})}function af({caps:l}){return l?p.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[l.coder&&p.jsx(Nn,{children:"💻 Code"}),l.vision&&p.jsx(Nn,{children:"👁 Bild"}),l.reasoning&&p.jsx(Nn,{children:"🧠 Reason"}),l.moe&&p.jsxs(Nn,{tone:"primary",children:["🧩 MoE",l.active_b?`·${l.active_b}b`:""]}),l.tools==="yes"&&p.jsx(Nn,{tone:"primary",children:"🛠 Tools"}),l.tools==="likely"&&p.jsx(Nn,{tone:"warn",children:"🛠 Tools?"}),l.embedding&&p.jsx(Nn,{children:"🔢 Embed"})]}):null}function cf(l){var u,s,c="";if(typeof l=="string"||typeof l=="number")c+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(u=0;u{const u=Zv(l),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=l;return{getClassGroupId:v=>{const m=v.split(qs);return m[0]===""&&m.length!==1&&m.shift(),df(m,u)||Xv(v)},getConflictingClassGroupIds:(v,m)=>{const j=s[v]||[];return m&&c[v]?[...j,...c[v]]:j}}},df=(l,u)=>{var v;if(l.length===0)return u.classGroupId;const s=l[0],c=u.nextPart.get(s),d=c?df(l.slice(1),c):void 0;if(d)return d;if(u.validators.length===0)return;const f=l.join(qs);return(v=u.validators.find(({validator:m})=>m(f)))==null?void 0:v.classGroupId},wd=/^\[(.+)\]$/,Xv=l=>{if(wd.test(l)){const u=wd.exec(l)[1],s=u==null?void 0:u.substring(0,u.indexOf(":"));if(s)return"arbitrary.."+s}},Zv=l=>{const{theme:u,prefix:s}=l,c={nextPart:new Map,validators:[]};return Jv(Object.entries(l.classGroups),s).forEach(([f,v])=>{Hs(v,c,f,u)}),c},Hs=(l,u,s,c)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?u:kd(u,d);f.classGroupId=s;return}if(typeof d=="function"){if(qv(d)){Hs(d(c),u,s,c);return}u.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([f,v])=>{Hs(v,kd(u,f),s,c)})})},kd=(l,u)=>{let s=l;return u.split(qs).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},qv=l=>l.isThemeGetter,Jv=(l,u)=>u?l.map(([s,c])=>{const d=c.map(f=>typeof f=="string"?u+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([v,m])=>[u+v,m])):f);return[s,d]}):l,eg=l=>{if(l<1)return{get:()=>{},set:()=>{}};let u=0,s=new Map,c=new Map;const d=(f,v)=>{s.set(f,v),u++,u>l&&(u=0,c=s,s=new Map)};return{get(f){let v=s.get(f);if(v!==void 0)return v;if((v=c.get(f))!==void 0)return d(f,v),v},set(f,v){s.has(f)?s.set(f,v):d(f,v)}}},ff="!",tg=l=>{const{separator:u,experimentalParseClassName:s}=l,c=u.length===1,d=u[0],f=u.length,v=m=>{const j=[];let C=0,P=0,_;for(let R=0;RP?_-P:void 0;return{modifiers:j,hasImportantModifier:L,baseClassName:H,maybePostfixModifierPosition:b}};return s?m=>s({className:m,parseClassName:v}):v},ng=l=>{if(l.length<=1)return l;const u=[];let s=[];return l.forEach(c=>{c[0]==="["?(u.push(...s.sort(),c),s=[]):s.push(c)}),u.push(...s.sort()),u},rg=l=>({cache:eg(l.cacheSize),parseClassName:tg(l),...Yv(l)}),lg=/\s+/,og=(l,u)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:d}=u,f=[],v=l.trim().split(lg);let m="";for(let j=v.length-1;j>=0;j-=1){const C=v[j],{modifiers:P,hasImportantModifier:_,baseClassName:M,maybePostfixModifierPosition:L}=s(C);let H=!!L,b=c(H?M.substring(0,L):M);if(!b){if(!H){m=C+(m.length>0?" "+m:m);continue}if(b=c(M),!b){m=C+(m.length>0?" "+m:m);continue}H=!1}const R=ng(P).join(":"),V=_?R+ff:R,W=V+b;if(f.includes(W))continue;f.push(W);const te=d(b,H);for(let q=0;q0?" "+m:m)}return m};function ig(){let l=0,u,s,c="";for(;l{if(typeof l=="string")return l;let u,s="";for(let c=0;c_(P),l());return s=rg(C),c=s.cache.get,d=s.cache.set,f=m,m(j)}function m(j){const C=c(j);if(C)return C;const P=og(j,s);return d(j,P),P}return function(){return f(ig.apply(null,arguments))}}const Se=l=>{const u=s=>s[l]||[];return u.isThemeGetter=!0,u},mf=/^\[(?:([a-z-]+):)?(.+)\]$/i,ug=/^\d+\/\d+$/,ag=new Set(["px","full","screen"]),cg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=l=>ir(l)||ag.has(l)||ug.test(l),on=l=>ar(l,"length",Sg),ir=l=>!!l&&!Number.isNaN(Number(l)),Ds=l=>ar(l,"number",ir),Zr=l=>!!l&&Number.isInteger(Number(l)),hg=l=>l.endsWith("%")&&ir(l.slice(0,-1)),ae=l=>mf.test(l),sn=l=>cg.test(l),vg=new Set(["length","size","percentage"]),gg=l=>ar(l,vg,hf),yg=l=>ar(l,"position",hf),xg=new Set(["image","url"]),wg=l=>ar(l,xg,Cg),kg=l=>ar(l,"",Eg),qr=()=>!0,ar=(l,u,s)=>{const c=mf.exec(l);return c?c[1]?typeof u=="string"?c[1]===u:u.has(c[1]):s(c[2]):!1},Sg=l=>dg.test(l)&&!fg.test(l),hf=()=>!1,Eg=l=>pg.test(l),Cg=l=>mg.test(l),Ng=()=>{const l=Se("colors"),u=Se("spacing"),s=Se("blur"),c=Se("brightness"),d=Se("borderColor"),f=Se("borderRadius"),v=Se("borderSpacing"),m=Se("borderWidth"),j=Se("contrast"),C=Se("grayscale"),P=Se("hueRotate"),_=Se("invert"),M=Se("gap"),L=Se("gradientColorStops"),H=Se("gradientColorStopPositions"),b=Se("inset"),R=Se("margin"),V=Se("opacity"),W=Se("padding"),te=Se("saturate"),q=Se("scale"),le=Se("sepia"),ne=Se("skew"),se=Se("space"),ye=Se("translate"),de=()=>["auto","contain","none"],xe=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto",ae,u],ie=()=>[ae,u],Le=()=>["",At,on],Ne=()=>["auto",ir,ae],Oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],je=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",ae],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[ir,ae];return{cacheSize:500,separator:":",theme:{colors:[qr],spacing:[At,on],blur:["none","",sn,ae],brightness:k(),borderColor:[l],borderRadius:["none","","full",sn,ae],borderSpacing:ie(),borderWidth:Le(),contrast:k(),grayscale:Z(),hueRotate:k(),invert:Z(),gap:ie(),gradientColorStops:[l],gradientColorStopPositions:[hg,on],inset:Ce(),margin:Ce(),opacity:k(),padding:ie(),saturate:k(),scale:k(),sepia:Z(),skew:k(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Oe(),ae]}],overflow:[{overflow:xe()}],"overflow-x":[{"overflow-x":xe()}],"overflow-y":[{"overflow-y":xe()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Zr,ae]}],basis:[{basis:Ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Zr,ae]}],"grid-cols":[{"grid-cols":[qr]}],"col-start-end":[{col:["auto",{span:["full",Zr,ae]},ae]}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":[qr]}],"row-start-end":[{row:["auto",{span:[Zr,ae]},ae]}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[W]}],px:[{px:[W]}],py:[{py:[W]}],ps:[{ps:[W]}],pe:[{pe:[W]}],pt:[{pt:[W]}],pr:[{pr:[W]}],pb:[{pb:[W]}],pl:[{pl:[W]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,u]}],"min-w":[{"min-w":[ae,u,"min","max","fit"]}],"max-w":[{"max-w":[ae,u,"none","full","min","max","fit","prose",{screen:[sn]},sn]}],h:[{h:[ae,u,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,u,"auto","min","max","fit"]}],"font-size":[{text:["base",sn,on]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[qr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",ir,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",At,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[l]}],"placeholder-opacity":[{"placeholder-opacity":[V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[l]}],"text-opacity":[{"text-opacity":[V]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",At,on]}],"underline-offset":[{"underline-offset":["auto",At,ae]}],"text-decoration-color":[{decoration:[l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[V]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Oe(),yg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wg]}],"bg-color":[{bg:[l]}],"gradient-from-pos":[{from:[H]}],"gradient-via-pos":[{via:[H]}],"gradient-to-pos":[{to:[H]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[V]}],"border-style":[{border:[...je(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[V]}],"divide-style":[{divide:je()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...je()]}],"outline-offset":[{"outline-offset":[At,ae]}],"outline-w":[{outline:[At,on]}],"outline-color":[{outline:[l]}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[l]}],"ring-opacity":[{"ring-opacity":[V]}],"ring-offset-w":[{"ring-offset":[At,on]}],"ring-offset-color":[{"ring-offset":[l]}],shadow:[{shadow:["","inner","none",sn,kg]}],"shadow-color":[{shadow:[qr]}],opacity:[{opacity:[V]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[c]}],contrast:[{contrast:[j]}],"drop-shadow":[{"drop-shadow":["","none",sn,ae]}],grayscale:[{grayscale:[C]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[_]}],saturate:[{saturate:[te]}],sepia:[{sepia:[le]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[j]}],"backdrop-grayscale":[{"backdrop-grayscale":[C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[V]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[v]}],"border-spacing-x":[{"border-spacing-x":[v]}],"border-spacing-y":[{"border-spacing-y":[v]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[q]}],"scale-x":[{"scale-x":[q]}],"scale-y":[{"scale-y":[q]}],rotate:[{rotate:[Zr,ae]}],"translate-x":[{"translate-x":[ye]}],"translate-y":[{"translate-y":[ye]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",l]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[l]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[l,"none"]}],"stroke-w":[{stroke:[At,on,Ds]}],stroke:[{stroke:[l,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jg=sg(Ng);function kt(...l){return jg(Qv(l))}function _g(l){if(!l)return"—";const u=l/1024**3;return u>=1?`${u.toFixed(1)} GB`:`${(l/1024**2).toFixed(0)} MB`}function Pg(l){return l?`${Math.round(l/1024)}k`:"—"}function Rg({fit:l}){const u={perfect:"bg-emerald-500/15 text-emerald-500",marginal:"bg-amber-500/15 text-amber-500",too_tight:"bg-red-500/15 text-red-500"}[l.level];return p.jsxs("span",{className:kt("rounded px-1.5 py-0.5 text-[11px] font-medium",u),children:[l.text," · ~",l.req_gb," GB"]})}function bg(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{rt("/api/models").then(v=>u(v.models)).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):s?p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",s,")."]}):p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"})]})}),p.jsxs("tbody",{children:[l.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),l.map(v=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:v.name}),p.jsx("td",{className:"px-4 py-2.5",children:v.role?p.jsx("span",{className:"rounded-md bg-primary/15 px-2 py-0.5 text-xs text-primary",children:v.role}):p.jsx("span",{className:"text-muted-foreground",children:"—"})}),p.jsx("td",{className:"px-4 py-2.5",children:p.jsx(af,{caps:v.capabilities})}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Pg(v.ctx)}),p.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:_g(v.size_bytes)})]},v.name))]})]})})}function Mg(){const[l,u]=g.useState(null),[s,c]=g.useState(""),[d,f]=g.useState(!0);return g.useEffect(()=>{rt("/api/discover").then(u).catch(v=>c(String(v))).finally(()=>f(!1))},[]),d?p.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):s||!l?p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",s,")."]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",l.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),l.categories.map(v=>p.jsxs("div",{className:"space-y-2",children:[p.jsx("h3",{className:"text-sm font-semibold",children:v.title}),p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.models.map(m=>p.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[v.recommended===m.repo&&p.jsx("span",{title:"beste Wahl",children:"⭐"}),p.jsx("span",{className:"truncate text-sm font-medium",children:m.name})]}),p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:m.author}),p.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[p.jsx(af,{caps:m.caps}),p.jsx(Rg,{fit:m.fit})]})]},m.repo))})]},v.role))]})}function Tg(){const[l,u]=g.useState("installed");return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),p.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(s=>p.jsx("button",{onClick:()=>u(s),className:kt("rounded-md px-3 py-1.5 transition-colors",l===s?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:s==="installed"?"Installiert":"Modelle finden"},s))}),l==="installed"?p.jsx(bg,{}):p.jsx(Mg,{})]})}function Lg(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{rt("/api/routing").then(u).catch(d=>c(String(d)))},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. ",p.jsx("code",{children:"auto"})," = schnell im Alltag, eskaliert bei Bedarf auf ",p.jsx("code",{children:"heavy"}),". Gilt für Hermes ",p.jsx("em",{children:"und"})," Vibe Coding."]})]}),s&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",l.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",l.gateway_reachable?"online":"offline (Config wird trotzdem angezeigt)"]}),p.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[p.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),p.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),p.jsx("tbody",{children:l.routes.map(d=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[p.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),p.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),l.fallbacks.length>0&&p.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),p.jsx("ul",{className:"space-y-1 text-muted-foreground",children:l.fallbacks.map((d,f)=>{const[v,m]=Object.entries(d)[0];return p.jsxs("li",{children:[p.jsx("code",{children:v})," → ",p.jsx("code",{children:m.join(", ")})]},f)})})]})]})]})}function un(l){return(l/1024**3).toFixed(1)}function ko({label:l,percent:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-baseline justify-between",children:[p.jsx("span",{className:"text-sm font-medium",children:l}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:[Math.round(u),"%"]})]}),p.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-muted",children:p.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(u,100)}%`}})}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Og(){const[l,u]=g.useState(null),[s,c]=g.useState(null),[d,f]=g.useState(""),[v,m]=g.useState("");g.useEffect(()=>{const C=()=>{rt("/api/system/status").then(u).catch(_=>f(String(_))),rt("/api/system/services").then(c).catch(()=>{})};C();const P=setInterval(C,3e3);return()=>clearInterval(P)},[]);async function j(){m("…");try{const C=await rt("/api/system/backup",{method:"POST"});m(C.ok?`Snapshot ${C.snapshot} (${C.files.length} Dateien)`:"Nichts zu sichern")}catch(C){m(`Fehler: ${C}`)}}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"System"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Live-Auslastung der Box, Dienste & Updates."})]}),d&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["System-Status nicht lesbar (",d,")."]}),l&&p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[p.jsx(ko,{label:"CPU",percent:l.cpu.percent,detail:l.cpu.cores?`${l.cpu.cores} Kerne`:void 0}),p.jsx(ko,{label:"RAM",percent:l.ram.percent,detail:`${un(l.ram.used)} / ${un(l.ram.total)} GB`}),l.gpu&&l.gpu.busy_percent!=null&&p.jsx(ko,{label:"GPU",percent:l.gpu.busy_percent,detail:l.gpu.gtt_used!=null&&l.gpu.gtt_total?`${un(l.gpu.gtt_used)} / ${un(l.gpu.gtt_total)} GB (GTT/unified)`:l.gpu.vram_used!=null&&l.gpu.vram_total?`${un(l.gpu.vram_used)} / ${un(l.gpu.vram_total)} GB VRAM`:void 0}),l.disk&&p.jsx(ko,{label:"Disk (Modelle)",percent:l.disk.percent,detail:`${un(l.disk.used)} / ${un(l.disk.total)} GB`})]}),(l==null?void 0:l.temp)&&(l.temp.cpu||l.temp.gpu)&&p.jsxs("div",{className:"flex gap-3 text-sm text-muted-foreground",children:[l.temp.cpu!=null&&p.jsxs("span",{children:["CPU ",l.temp.cpu," °C"]}),l.temp.gpu!=null&&p.jsxs("span",{children:["GPU ",l.temp.gpu," °C"]})]}),s&&p.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[p.jsx("div",{className:"mb-3 text-sm font-medium",children:"Dienste"}),p.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:s.services.map(C=>p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",C.ok?"bg-emerald-500":"bg-amber-500")}),p.jsx("span",{children:C.name}),p.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground",children:C.url})]},C.name))}),p.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-xs",children:[p.jsxs("a",{href:s.links.engine_ui,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[p.jsx(Fs,{className:"h-3 w-3"})," Engine-Logs (llama-swap /ui)"]}),p.jsxs("a",{href:s.links.gateway,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[p.jsx(Fs,{className:"h-3 w-3"})," Gateway"]})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("button",{onClick:j,className:"flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm hover:bg-accent",children:[p.jsx(Im,{className:"h-3.5 w-3.5 text-primary"})," Backup jetzt"]}),v&&p.jsx("span",{className:"text-xs text-muted-foreground",children:v})]})]})}function zg(){const[l,u]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[s,c]=g.useState(null),[d,f]=g.useState("cline"),[v,m]=g.useState(!1),[j,C]=g.useState("");g.useEffect(()=>{rt(`/api/connect?host=${encodeURIComponent(l)}`).then(c).catch(L=>C(String(L)))},[l]);function P(L){u(L),L&&localStorage.setItem("mc_host",L)}const _=s==null?void 0:s.tools[d];async function M(){_&&(await navigator.clipboard.writeText(_.snippet),m(!0),setTimeout(()=>m(!1),1500))}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Verbinden"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Fertige Snippets für deine Tools auf dem lokalen PC — alle zeigen auf den Gateway der Box (",p.jsx("code",{children:"model: auto"}),") + das geteilte Gedächtnis."]})]}),p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("label",{className:"text-muted-foreground",children:"Box-LAN-IP:"}),p.jsx("input",{value:l,onChange:L=>P(L.target.value),className:"rounded-md border border-border bg-card px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"}),s&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",s.gateway_url]})]}),j&&p.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Snippets nicht ladbar (",j,")."]}),s&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tools).map(([L,H])=>p.jsx("button",{onClick:()=>f(L),className:kt("rounded-md px-3 py-1.5 text-sm transition-colors",d===L?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:H.label},L))}),_&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:_.note}),p.jsxs("button",{onClick:M,className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent",children:[v?p.jsx(Pm,{className:"h-3.5 w-3.5 text-emerald-500"}):p.jsx(Mm,{className:"h-3.5 w-3.5"}),v?"Kopiert":"Kopieren"]})]}),p.jsx("pre",{className:"overflow-x-auto rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:p.jsx("code",{children:_.snippet})})]})]})]})}const Sd=["user","instruction","stable","versioned","ephemeral"],As={user:"👤 User",instruction:"📋 Regel",stable:"🔵 Fakt",versioned:"🟡 Version",ephemeral:"⏱ Temporär"};function Ig(){const[l,u]=g.useState([]),[s,c]=g.useState(""),[d,f]=g.useState(""),[v,m]=g.useState(""),[j,C]=g.useState("stable"),[P,_]=g.useState("");function M(){const R=new URLSearchParams;d&&R.set("q",d),s&&R.set("category",s),rt(`/api/memory?${R}`).then(u).catch(V=>_(String(V)))}g.useEffect(M,[d,s]);async function L(){v.trim()&&(await rt("/api/memory",{method:"POST",body:JSON.stringify({content:v,category:j,source:"ui"})}),m(""),M())}async function H(R){await rt(`/api/memory/${R}`,{method:"DELETE"}),M()}async function b(){const R=await rt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(R.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${R.duplicate_count} Dublette(n) in ${R.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await rt("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M())}return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Gedächtnis"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:'Die geteilte „Verfassung" — alle Tools (Hermes, IDEs) lesen/schreiben hier via MCP.'})]}),p.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:[p.jsx(Dm,{className:"h-3.5 w-3.5 text-primary"})," Aufräumen"]})]}),p.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[p.jsx("textarea",{value:v,onChange:R=>m(R.target.value),placeholder:"Neuen Fakt / Regel hinzufügen…",rows:2,className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring"}),p.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[p.jsx("select",{value:j,onChange:R=>C(R.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none",children:Sd.map(R=>p.jsx("option",{value:R,children:As[R]},R))}),p.jsx("button",{onClick:L,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Speichern"})]})]}),p.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.jsx("input",{value:d,onChange:R=>f(R.target.value),placeholder:"Suchen…",className:"rounded-md border border-border bg-card px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),p.jsx("button",{onClick:()=>c(""),className:kt("rounded-md px-2.5 py-1.5 text-xs",s?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary"),children:"Alle"}),Sd.map(R=>p.jsx("button",{onClick:()=>c(R),className:kt("rounded-md px-2.5 py-1.5 text-xs",s===R?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:As[R]},R))]}),P&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Fehler: ",P]}),p.jsxs("div",{className:"space-y-2",children:[l.length===0&&p.jsx("div",{className:"text-sm text-muted-foreground",children:"Keine Einträge."}),l.map(R=>p.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-3",children:[p.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:As[R.category]||R.category}),p.jsx("span",{className:"flex-1 text-sm",children:R.content}),p.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:R.source}),p.jsx("button",{onClick:()=>H(R.id),className:"shrink-0 text-muted-foreground hover:text-red-500",children:p.jsx(Fm,{className:"h-4 w-4"})})]},R.id))]})]})}function Dg({ok:l}){return p.jsx("span",{className:kt("h-2 w-2 rounded-full",l?"bg-emerald-500":"bg-amber-500")})}function So({label:l,ok:u,detail:s}){return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Dg,{ok:u}),p.jsx("span",{className:"text-sm font-medium",children:l})]}),s&&p.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Ag(){const[l,u]=g.useState(null),[s,c]=g.useState("");return g.useEffect(()=>{const d=()=>rt("/api/agent/status").then(u).catch(v=>c(String(v)));d();const f=setInterval(d,8e3);return()=>clearInterval(f)},[]),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:"Hermes"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Der autonome Agent läuft eigenständig (Gateway :8642) und hat seine eigene Oberfläche (hermes-webui :8787). Mission Control verlinkt nur — Chat & Steuerung leben dort."})]}),(l==null?void 0:l.webui_url)&&p.jsxs("a",{href:l.webui_url,target:"_blank",rel:"noopener",className:kt("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium",l.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90":"border border-border text-muted-foreground"),children:[p.jsx(Fs,{className:"h-4 w-4"})," Hermes öffnen"]})]}),s&&p.jsxs("div",{className:"text-sm text-muted-foreground",children:["Status nicht lesbar (",s,")."]}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[p.jsx(So,{label:"Gateway (:8642)",ok:l.gateway_reachable,detail:l.gateway_reachable?"erreichbar":"offline"}),p.jsx(So,{label:"WebUI (:8787)",ok:l.webui_reachable,detail:l.webui_reachable?"erreichbar":"offline"}),p.jsx(So,{label:"Brain",ok:l.gateway_reachable,detail:"model: auto (über Gateway)"}),p.jsx(So,{label:"Verdrahtung",ok:l.has_config,detail:`config ${l.has_config?"✓":"—"} · skills ${l.has_skills?"✓":"—"} · memories ${l.has_memories?"✓":"—"}`})]}),!l.gateway_reachable&&p.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card/50 p-5 text-sm",children:[p.jsx("div",{className:"mb-2 font-medium",children:"Hermes ist (hier) offline"}),p.jsxs("p",{className:"text-muted-foreground",children:["Der Agent + hermes-webui laufen auf der Box. Einrichtung & volle Verdrahtung (Brain = ",p.jsx("code",{children:"model: auto"}),", Tools/MCP inkl. ",p.jsx("code",{children:"mcp_mc"})," + ",p.jsx("code",{children:"mcp_memory"}),", SSH→Windows, lokale Browser-/Such-MCP) sind im Runbook beschrieben:",p.jsx("code",{className:"ml-1",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]})}function Fg({title:l,hint:u}){return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold",children:l}),p.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),p.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[p.jsx(bm,{className:"h-8 w-8 text-muted-foreground"}),p.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function Ug(){const[l,u]=g.useState("models"),[s,c]=g.useState(null),[d,f]=g.useState(()=>localStorage.getItem("mc_theme")!=="light");g.useEffect(()=>{const m=()=>rt("/api/health").then(c).catch(()=>c(null));m();const j=setInterval(m,1e4);return()=>clearInterval(j)},[]),g.useEffect(()=>{document.documentElement.classList.toggle("dark",d),localStorage.setItem("mc_theme",d?"dark":"light")},[d]);const v=Us.find(m=>m.id===l);return p.jsxs("div",{className:"flex h-full",children:[p.jsx(Kv,{onNavigate:u}),p.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[p.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[p.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),p.jsxs("div",{className:"leading-tight",children:[p.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),p.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),p.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Us.map(m=>p.jsxs("button",{onClick:()=>u(m.id),className:kt("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",l===m.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[p.jsx(m.icon,{className:"h-4 w-4"}),m.label]},m.id))}),p.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:s?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:kt("h-2 w-2 rounded-full",s.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",s.engine_reachable?"online":"offline"," · v",s.version]}):p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[p.jsx("div",{className:"text-sm text-muted-foreground",children:v.hint}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>f(m=>!m),className:"flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent",title:"Hell/Dunkel",children:d?p.jsx(Am,{className:"h-3.5 w-3.5"}):p.jsx(Lm,{className:"h-3.5 w-3.5"})}),p.jsxs("button",{onClick:()=>{const m=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(m)},className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[p.jsx(Rm,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Springen"}),p.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]})]}),p.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[l==="models"&&p.jsx(Tg,{}),l==="routing"&&p.jsx(Lg,{}),l==="system"&&p.jsx(Og,{}),l==="connect"&&p.jsx(zg,{}),l==="memory"&&p.jsx(Ig,{}),l==="agent"&&p.jsx(Ag,{}),!["models","routing","system","connect","memory","agent"].includes(l)&&p.jsx(Fg,{title:v.label,hint:v.hint})]})]})]})}km.createRoot(document.getElementById("root")).render(p.jsx(Cd.StrictMode,{children:p.jsx(Ug,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 487482b..87a6000 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,7 +6,7 @@ Mission Control 2.0 - + diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index a381c15..39cde2e 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -83,7 +83,13 @@ export interface RoutingResp { export interface SystemStatus { cpu: { percent: number; cores: number | null } ram: { total: number; used: number; percent: number } - gpu: { busy_percent: number | null; vram_used: number | null; vram_total: number | null } | null + gpu: { + busy_percent: number | null + vram_used: number | null + vram_total: number | null + gtt_used?: number | null + gtt_total?: number | null + } | null temp: { cpu?: number; gpu?: number } | null disk: { total: number; used: number; percent: number } | null } diff --git a/frontend/src/views/SystemView.tsx b/frontend/src/views/SystemView.tsx index 12452e8..7f00e0c 100644 --- a/frontend/src/views/SystemView.tsx +++ b/frontend/src/views/SystemView.tsx @@ -74,9 +74,11 @@ export function SystemView() { label="GPU" percent={s.gpu.busy_percent} detail={ - s.gpu.vram_used != null && s.gpu.vram_total != null - ? `${gb(s.gpu.vram_used)} / ${gb(s.gpu.vram_total)} GB VRAM` - : undefined + s.gpu.gtt_used != null && s.gpu.gtt_total + ? `${gb(s.gpu.gtt_used)} / ${gb(s.gpu.gtt_total)} GB (GTT/unified)` + : s.gpu.vram_used != null && s.gpu.vram_total + ? `${gb(s.gpu.vram_used)} / ${gb(s.gpu.vram_total)} GB VRAM` + : undefined } /> )}