apteva 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ub=Object.create;var{getPrototypeOf:gb,defineProperty:RK,getOwnPropertyNames:xb}=Object;var jb=Object.prototype.hasOwnProperty;var B0=(Y,G,U)=>{U=Y!=null?ub(gb(Y)):{};let O=G||!Y||!Y.__esModule?RK(U,"default",{value:Y,enumerable:!0}):U;for(let q of xb(Y))if(!jb.call(O,q))RK(O,q,{get:()=>Y[q],enumerable:!0});return O};var _z=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var f1=_z((pb,J3)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y="18.3.1",G=Symbol.for("react.element"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),_=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function g(L){if(L===null||typeof L!=="object")return null;var E=v&&L[v]||L[m];if(typeof E==="function")return E;return null}var C={current:null},V={transition:null},k={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},x={current:null},j={},u=null;function p(L){u=L}j.setExtraStackFrame=function(L){u=L},j.getCurrentStack=null,j.getStackAddendum=function(){var L="";if(u)L+=u;var E=j.getCurrentStack;if(E)L+=E()||"";return L};var s=!1,a=!1,D=!1,z0=!1,Q0=!1,U0={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:V,ReactCurrentOwner:x};U0.ReactDebugCurrentFrame=j,U0.ReactCurrentActQueue=k;function b0(L){{for(var E=arguments.length,X0=Array(E>1?E-1:0),$0=1;$0<E;$0++)X0[$0-1]=arguments[$0];y0("warn",L,X0)}}function e(L){{for(var E=arguments.length,X0=Array(E>1?E-1:0),$0=1;$0<E;$0++)X0[$0-1]=arguments[$0];y0("error",L,X0)}}function y0(L,E,X0){{var $0=U0.ReactDebugCurrentFrame,S0=$0.getStackAddendum();if(S0!=="")E+="%s",X0=X0.concat([S0]);var L1=X0.map(function(t0){return String(t0)});L1.unshift("Warning: "+E),Function.prototype.apply.call(console[L],console,L1)}}var I0={};function i(L,E){{var X0=L.constructor,$0=X0&&(X0.displayName||X0.name)||"ReactClass",S0=$0+"."+E;if(I0[S0])return;e("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",E,$0),I0[S0]=!0}}var R0={isMounted:function(L){return!1},enqueueForceUpdate:function(L,E,X0){i(L,"forceUpdate")},enqueueReplaceState:function(L,E,X0,$0){i(L,"replaceState")},enqueueSetState:function(L,E,X0,$0){i(L,"setState")}},O0=Object.assign,q0={};Object.freeze(q0);function o(L,E,X0){this.props=L,this.context=E,this.refs=q0,this.updater=X0||R0}o.prototype.isReactComponent={},o.prototype.setState=function(L,E){if(typeof L!=="object"&&typeof L!=="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,E,"setState")},o.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};{var T0={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},v0=function(L,E){Object.defineProperty(o.prototype,L,{get:function(){b0("%s(...) is deprecated in plain JavaScript React classes. %s",E[0],E[1]);return}})};for(var X1 in T0)if(T0.hasOwnProperty(X1))v0(X1,T0[X1])}function r0(){}r0.prototype=o.prototype;function f0(L,E,X0){this.props=L,this.context=E,this.refs=q0,this.updater=X0||R0}var o0=f0.prototype=new r0;o0.constructor=f0,O0(o0,o.prototype),o0.isPureReactComponent=!0;function J1(){var L={current:null};return Object.seal(L),L}var A0=Array.isArray;function Y1(L){return A0(L)}function h1(L){{var E=typeof Symbol==="function"&&Symbol.toStringTag,X0=E&&L[Symbol.toStringTag]||L.constructor.name||"Object";return X0}}function l1(L){try{return r1(L),!1}catch(E){return!0}}function r1(L){return""+L}function O1(L){if(l1(L))return e("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",h1(L)),r1(L)}function w0(L,E,X0){var $0=L.displayName;if($0)return $0;var S0=E.displayName||E.name||"";return S0!==""?X0+"("+S0+")":X0}function Q1(L){return L.displayName||"Context"}function I1(L){if(L==null)return null;if(typeof L.tag==="number")e("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof L==="function")return L.displayName||L.name||null;if(typeof L==="string")return L;switch(L){case O:return"Fragment";case U:return"Portal";case R:return"Profiler";case q:return"StrictMode";case b:return"Suspense";case P:return"SuspenseList"}if(typeof L==="object")switch(L.$$typeof){case _:var E=L;return Q1(E)+".Consumer";case K:var X0=L;return Q1(X0._context)+".Provider";case A:return w0(L,L.render,"ForwardRef");case M:var $0=L.displayName||null;if($0!==null)return $0;return I1(L.type)||"Memo";case w:{var S0=L,L1=S0._payload,t0=S0._init;try{return I1(t0(L1))}catch(M1){return null}}}return null}var i1=Object.prototype.hasOwnProperty,C4={key:!0,ref:!0,__self:!0,__source:!0},$4,b7,F4;F4={};function A7(L){if(i1.call(L,"ref")){var E=Object.getOwnPropertyDescriptor(L,"ref").get;if(E&&E.isReactWarning)return!1}return L.ref!==void 0}function S4(L){if(i1.call(L,"key")){var E=Object.getOwnPropertyDescriptor(L,"key").get;if(E&&E.isReactWarning)return!1}return L.key!==void 0}function h4(L,E){var X0=function(){if(!$4)$4=!0,e("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};X0.isReactWarning=!0,Object.defineProperty(L,"key",{get:X0,configurable:!0})}function L7(L,E){var X0=function(){if(!b7)b7=!0,e("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};X0.isReactWarning=!0,Object.defineProperty(L,"ref",{get:X0,configurable:!0})}function E7(L){if(typeof L.ref==="string"&&x.current&&L.__self&&x.current.stateNode!==L.__self){var E=I1(x.current.type);if(!F4[E])e('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E,L.ref),F4[E]=!0}}var d4=function(L,E,X0,$0,S0,L1,t0){var M1={$$typeof:G,type:L,key:E,ref:X0,props:t0,_owner:L1};if(M1._store={},Object.defineProperty(M1._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M1,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$0}),Object.defineProperty(M1,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S0}),Object.freeze)Object.freeze(M1.props),Object.freeze(M1);return M1};function e4(L,E,X0){var $0,S0={},L1=null,t0=null,M1=null,p1=null;if(E!=null){if(A7(E))t0=E.ref,E7(E);if(S4(E))O1(E.key),L1=""+E.key;M1=E.__self===void 0?null:E.__self,p1=E.__source===void 0?null:E.__source;for($0 in E)if(i1.call(E,$0)&&!C4.hasOwnProperty($0))S0[$0]=E[$0]}var U4=arguments.length-2;if(U4===1)S0.children=X0;else if(U4>1){var P4=Array(U4);for(var b4=0;b4<U4;b4++)P4[b4]=arguments[b4+2];if(Object.freeze)Object.freeze(P4);S0.children=P4}if(L&&L.defaultProps){var y4=L.defaultProps;for($0 in y4)if(S0[$0]===void 0)S0[$0]=y4[$0]}if(L1||t0){var l4=typeof L==="function"?L.displayName||L.name||"Unknown":L;if(L1)h4(S0,l4);if(t0)L7(S0,l4)}return d4(L,L1,t0,M1,p1,x.current,S0)}function V0(L,E){var X0=d4(L.type,E,L.ref,L._self,L._source,L._owner,L.props);return X0}function $1(L,E,X0){if(L===null||L===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var $0,S0=O0({},L.props),L1=L.key,t0=L.ref,M1=L._self,p1=L._source,U4=L._owner;if(E!=null){if(A7(E))t0=E.ref,U4=x.current;if(S4(E))O1(E.key),L1=""+E.key;var P4;if(L.type&&L.type.defaultProps)P4=L.type.defaultProps;for($0 in E)if(i1.call(E,$0)&&!C4.hasOwnProperty($0))if(E[$0]===void 0&&P4!==void 0)S0[$0]=P4[$0];else S0[$0]=E[$0]}var b4=arguments.length-2;if(b4===1)S0.children=X0;else if(b4>1){var y4=Array(b4);for(var l4=0;l4<b4;l4++)y4[l4]=arguments[l4+2];S0.children=y4}return d4(L.type,L1,t0,M1,p1,U4,S0)}function W1(L){return typeof L==="object"&&L!==null&&L.$$typeof===G}var o1=".",H4=":";function E4(L){var E=/[=:]/g,X0={"=":"=0",":":"=2"},$0=L.replace(E,function(S0){return X0[S0]});return"$"+$0}var L4=!1,t4=/\/+/g;function C1(L){return L.replace(t4,"$&/")}function b1(L,E){if(typeof L==="object"&&L!==null&&L.key!=null)return O1(L.key),E4(""+L.key);return E.toString(36)}function i7(L,E,X0,$0,S0){var L1=typeof L;if(L1==="undefined"||L1==="boolean")L=null;var t0=!1;if(L===null)t0=!0;else switch(L1){case"string":case"number":t0=!0;break;case"object":switch(L.$$typeof){case G:case U:t0=!0}}if(t0){var M1=L,p1=S0(M1),U4=$0===""?o1+b1(M1,0):$0;if(Y1(p1)){var P4="";if(U4!=null)P4=C1(U4)+"/";i7(p1,E,P4,"",function(S3){return S3})}else if(p1!=null){if(W1(p1)){if(p1.key&&(!M1||M1.key!==p1.key))O1(p1.key);p1=V0(p1,X0+(p1.key&&(!M1||M1.key!==p1.key)?C1(""+p1.key)+"/":"")+U4)}E.push(p1)}return 1}var b4,y4,l4=0,z4=$0===""?o1:$0+H4;if(Y1(L))for(var u8=0;u8<L.length;u8++)b4=L[u8],y4=z4+b1(b4,u8),l4+=i7(b4,E,X0,y4,S0);else{var hz=g(L);if(typeof hz==="function"){var tQ=L;if(hz===tQ.entries){if(!L4)b0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");L4=!0}var C3=hz.call(tQ),I6,sQ=0;while(!(I6=C3.next()).done)b4=I6.value,y4=z4+b1(b4,sQ++),l4+=i7(b4,E,X0,y4,S0)}else if(L1==="object"){var eQ=String(L);throw Error("Objects are not valid as a React child (found: "+(eQ==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":eQ)+"). If you meant to render a collection of children, use an array instead.")}}return l4}function R7(L,E,X0){if(L==null)return L;var $0=[],S0=0;return i7(L,$0,"","",function(L1){return E.call(X0,L1,S0++)}),$0}function o7(L){var E=0;return R7(L,function(){E++}),E}function J6(L,E,X0){R7(L,function(){E.apply(this,arguments)},X0)}function g5(L){return R7(L,function(E){return E})||[]}function Y6(L){if(!W1(L))throw Error("React.Children.only expected to receive a single React element child.");return L}function I5(L){var E={$$typeof:_,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};E.Provider={$$typeof:K,_context:E};var X0=!1,$0=!1,S0=!1;{var L1={$$typeof:_,_context:E};Object.defineProperties(L1,{Provider:{get:function(){if(!$0)$0=!0,e("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");return E.Provider},set:function(t0){E.Provider=t0}},_currentValue:{get:function(){return E._currentValue},set:function(t0){E._currentValue=t0}},_currentValue2:{get:function(){return E._currentValue2},set:function(t0){E._currentValue2=t0}},_threadCount:{get:function(){return E._threadCount},set:function(t0){E._threadCount=t0}},Consumer:{get:function(){if(!X0)X0=!0,e("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");return E.Consumer}},displayName:{get:function(){return E.displayName},set:function(t0){if(!S0)b0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",t0),S0=!0}}}),E.Consumer=L1}return E._currentRenderer=null,E._currentRenderer2=null,E}var u7=-1,x5=0,x1=1,G4=2;function N4(L){if(L._status===u7){var E=L._result,X0=E();if(X0.then(function(L1){if(L._status===x5||L._status===u7){var t0=L;t0._status=x1,t0._result=L1}},function(L1){if(L._status===x5||L._status===u7){var t0=L;t0._status=G4,t0._result=L1}}),L._status===u7){var $0=L;$0._status=x5,$0._result=X0}}if(L._status===x1){var S0=L._result;if(S0===void 0)e(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
1
|
+
var ub=Object.create;var{getPrototypeOf:gb,defineProperty:RK,getOwnPropertyNames:xb}=Object;var jb=Object.prototype.hasOwnProperty;var B0=(Y,G,U)=>{U=Y!=null?ub(gb(Y)):{};let O=G||!Y||!Y.__esModule?RK(U,"default",{value:Y,enumerable:!0}):U;for(let q of xb(Y))if(!jb.call(O,q))RK(O,q,{get:()=>Y[q],enumerable:!0});return O};var _z=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var f1=_z((pb,J3)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y="18.3.1",G=Symbol.for("react.element"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),_=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function g(L){if(L===null||typeof L!=="object")return null;var E=v&&L[v]||L[m];if(typeof E==="function")return E;return null}var C={current:null},V={transition:null},k={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},x={current:null},j={},u=null;function p(L){u=L}j.setExtraStackFrame=function(L){u=L},j.getCurrentStack=null,j.getStackAddendum=function(){var L="";if(u)L+=u;var E=j.getCurrentStack;if(E)L+=E()||"";return L};var s=!1,a=!1,D=!1,z0=!1,Q0=!1,U0={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:V,ReactCurrentOwner:x};U0.ReactDebugCurrentFrame=j,U0.ReactCurrentActQueue=k;function b0(L){{for(var E=arguments.length,X0=Array(E>1?E-1:0),$0=1;$0<E;$0++)X0[$0-1]=arguments[$0];y0("warn",L,X0)}}function e(L){{for(var E=arguments.length,X0=Array(E>1?E-1:0),$0=1;$0<E;$0++)X0[$0-1]=arguments[$0];y0("error",L,X0)}}function y0(L,E,X0){{var $0=U0.ReactDebugCurrentFrame,S0=$0.getStackAddendum();if(S0!=="")E+="%s",X0=X0.concat([S0]);var L1=X0.map(function(t0){return String(t0)});L1.unshift("Warning: "+E),Function.prototype.apply.call(console[L],console,L1)}}var I0={};function i(L,E){{var X0=L.constructor,$0=X0&&(X0.displayName||X0.name)||"ReactClass",S0=$0+"."+E;if(I0[S0])return;e("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",E,$0),I0[S0]=!0}}var R0={isMounted:function(L){return!1},enqueueForceUpdate:function(L,E,X0){i(L,"forceUpdate")},enqueueReplaceState:function(L,E,X0,$0){i(L,"replaceState")},enqueueSetState:function(L,E,X0,$0){i(L,"setState")}},O0=Object.assign,q0={};Object.freeze(q0);function o(L,E,X0){this.props=L,this.context=E,this.refs=q0,this.updater=X0||R0}o.prototype.isReactComponent={},o.prototype.setState=function(L,E){if(typeof L!=="object"&&typeof L!=="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,E,"setState")},o.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};{var T0={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},v0=function(L,E){Object.defineProperty(o.prototype,L,{get:function(){b0("%s(...) is deprecated in plain JavaScript React classes. %s",E[0],E[1]);return}})};for(var X1 in T0)if(T0.hasOwnProperty(X1))v0(X1,T0[X1])}function r0(){}r0.prototype=o.prototype;function f0(L,E,X0){this.props=L,this.context=E,this.refs=q0,this.updater=X0||R0}var o0=f0.prototype=new r0;o0.constructor=f0,O0(o0,o.prototype),o0.isPureReactComponent=!0;function J1(){var L={current:null};return Object.seal(L),L}var A0=Array.isArray;function Y1(L){return A0(L)}function h1(L){{var E=typeof Symbol==="function"&&Symbol.toStringTag,X0=E&&L[Symbol.toStringTag]||L.constructor.name||"Object";return X0}}function l1(L){try{return r1(L),!1}catch(E){return!0}}function r1(L){return""+L}function O1(L){if(l1(L))return e("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",h1(L)),r1(L)}function w0(L,E,X0){var $0=L.displayName;if($0)return $0;var S0=E.displayName||E.name||"";return S0!==""?X0+"("+S0+")":X0}function Q1(L){return L.displayName||"Context"}function I1(L){if(L==null)return null;if(typeof L.tag==="number")e("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof L==="function")return L.displayName||L.name||null;if(typeof L==="string")return L;switch(L){case O:return"Fragment";case U:return"Portal";case R:return"Profiler";case q:return"StrictMode";case b:return"Suspense";case P:return"SuspenseList"}if(typeof L==="object")switch(L.$$typeof){case _:var E=L;return Q1(E)+".Consumer";case K:var X0=L;return Q1(X0._context)+".Provider";case A:return w0(L,L.render,"ForwardRef");case M:var $0=L.displayName||null;if($0!==null)return $0;return I1(L.type)||"Memo";case w:{var S0=L,L1=S0._payload,t0=S0._init;try{return I1(t0(L1))}catch(M1){return null}}}return null}var i1=Object.prototype.hasOwnProperty,C4={key:!0,ref:!0,__self:!0,__source:!0},$4,b7,F4;F4={};function A7(L){if(i1.call(L,"ref")){var E=Object.getOwnPropertyDescriptor(L,"ref").get;if(E&&E.isReactWarning)return!1}return L.ref!==void 0}function S4(L){if(i1.call(L,"key")){var E=Object.getOwnPropertyDescriptor(L,"key").get;if(E&&E.isReactWarning)return!1}return L.key!==void 0}function y4(L,E){var X0=function(){if(!$4)$4=!0,e("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};X0.isReactWarning=!0,Object.defineProperty(L,"key",{get:X0,configurable:!0})}function L7(L,E){var X0=function(){if(!b7)b7=!0,e("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};X0.isReactWarning=!0,Object.defineProperty(L,"ref",{get:X0,configurable:!0})}function E7(L){if(typeof L.ref==="string"&&x.current&&L.__self&&x.current.stateNode!==L.__self){var E=I1(x.current.type);if(!F4[E])e('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',E,L.ref),F4[E]=!0}}var d4=function(L,E,X0,$0,S0,L1,t0){var M1={$$typeof:G,type:L,key:E,ref:X0,props:t0,_owner:L1};if(M1._store={},Object.defineProperty(M1._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M1,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$0}),Object.defineProperty(M1,"_source",{configurable:!1,enumerable:!1,writable:!1,value:S0}),Object.freeze)Object.freeze(M1.props),Object.freeze(M1);return M1};function e4(L,E,X0){var $0,S0={},L1=null,t0=null,M1=null,p1=null;if(E!=null){if(A7(E))t0=E.ref,E7(E);if(S4(E))O1(E.key),L1=""+E.key;M1=E.__self===void 0?null:E.__self,p1=E.__source===void 0?null:E.__source;for($0 in E)if(i1.call(E,$0)&&!C4.hasOwnProperty($0))S0[$0]=E[$0]}var U4=arguments.length-2;if(U4===1)S0.children=X0;else if(U4>1){var P4=Array(U4);for(var b4=0;b4<U4;b4++)P4[b4]=arguments[b4+2];if(Object.freeze)Object.freeze(P4);S0.children=P4}if(L&&L.defaultProps){var V4=L.defaultProps;for($0 in V4)if(S0[$0]===void 0)S0[$0]=V4[$0]}if(L1||t0){var l4=typeof L==="function"?L.displayName||L.name||"Unknown":L;if(L1)y4(S0,l4);if(t0)L7(S0,l4)}return d4(L,L1,t0,M1,p1,x.current,S0)}function V0(L,E){var X0=d4(L.type,E,L.ref,L._self,L._source,L._owner,L.props);return X0}function $1(L,E,X0){if(L===null||L===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var $0,S0=O0({},L.props),L1=L.key,t0=L.ref,M1=L._self,p1=L._source,U4=L._owner;if(E!=null){if(A7(E))t0=E.ref,U4=x.current;if(S4(E))O1(E.key),L1=""+E.key;var P4;if(L.type&&L.type.defaultProps)P4=L.type.defaultProps;for($0 in E)if(i1.call(E,$0)&&!C4.hasOwnProperty($0))if(E[$0]===void 0&&P4!==void 0)S0[$0]=P4[$0];else S0[$0]=E[$0]}var b4=arguments.length-2;if(b4===1)S0.children=X0;else if(b4>1){var V4=Array(b4);for(var l4=0;l4<b4;l4++)V4[l4]=arguments[l4+2];S0.children=V4}return d4(L.type,L1,t0,M1,p1,U4,S0)}function W1(L){return typeof L==="object"&&L!==null&&L.$$typeof===G}var o1=".",H4=":";function u4(L){var E=/[=:]/g,X0={"=":"=0",":":"=2"},$0=L.replace(E,function(S0){return X0[S0]});return"$"+$0}var L4=!1,t4=/\/+/g;function C1(L){return L.replace(t4,"$&/")}function b1(L,E){if(typeof L==="object"&&L!==null&&L.key!=null)return O1(L.key),u4(""+L.key);return E.toString(36)}function i7(L,E,X0,$0,S0){var L1=typeof L;if(L1==="undefined"||L1==="boolean")L=null;var t0=!1;if(L===null)t0=!0;else switch(L1){case"string":case"number":t0=!0;break;case"object":switch(L.$$typeof){case G:case U:t0=!0}}if(t0){var M1=L,p1=S0(M1),U4=$0===""?o1+b1(M1,0):$0;if(Y1(p1)){var P4="";if(U4!=null)P4=C1(U4)+"/";i7(p1,E,P4,"",function(S3){return S3})}else if(p1!=null){if(W1(p1)){if(p1.key&&(!M1||M1.key!==p1.key))O1(p1.key);p1=V0(p1,X0+(p1.key&&(!M1||M1.key!==p1.key)?C1(""+p1.key)+"/":"")+U4)}E.push(p1)}return 1}var b4,V4,l4=0,z4=$0===""?o1:$0+H4;if(Y1(L))for(var u8=0;u8<L.length;u8++)b4=L[u8],V4=z4+b1(b4,u8),l4+=i7(b4,E,X0,V4,S0);else{var hz=g(L);if(typeof hz==="function"){var tQ=L;if(hz===tQ.entries){if(!L4)b0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");L4=!0}var C3=hz.call(tQ),I6,sQ=0;while(!(I6=C3.next()).done)b4=I6.value,V4=z4+b1(b4,sQ++),l4+=i7(b4,E,X0,V4,S0)}else if(L1==="object"){var eQ=String(L);throw Error("Objects are not valid as a React child (found: "+(eQ==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":eQ)+"). If you meant to render a collection of children, use an array instead.")}}return l4}function R7(L,E,X0){if(L==null)return L;var $0=[],S0=0;return i7(L,$0,"","",function(L1){return E.call(X0,L1,S0++)}),$0}function o7(L){var E=0;return R7(L,function(){E++}),E}function J6(L,E,X0){R7(L,function(){E.apply(this,arguments)},X0)}function x5(L){return R7(L,function(E){return E})||[]}function Y6(L){if(!W1(L))throw Error("React.Children.only expected to receive a single React element child.");return L}function T5(L){var E={$$typeof:_,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};E.Provider={$$typeof:K,_context:E};var X0=!1,$0=!1,S0=!1;{var L1={$$typeof:_,_context:E};Object.defineProperties(L1,{Provider:{get:function(){if(!$0)$0=!0,e("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");return E.Provider},set:function(t0){E.Provider=t0}},_currentValue:{get:function(){return E._currentValue},set:function(t0){E._currentValue=t0}},_currentValue2:{get:function(){return E._currentValue2},set:function(t0){E._currentValue2=t0}},_threadCount:{get:function(){return E._threadCount},set:function(t0){E._threadCount=t0}},Consumer:{get:function(){if(!X0)X0=!0,e("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");return E.Consumer}},displayName:{get:function(){return E.displayName},set:function(t0){if(!S0)b0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",t0),S0=!0}}}),E.Consumer=L1}return E._currentRenderer=null,E._currentRenderer2=null,E}var u7=-1,j5=0,x1=1,G4=2;function N4(L){if(L._status===u7){var E=L._result,X0=E();if(X0.then(function(L1){if(L._status===j5||L._status===u7){var t0=L;t0._status=x1,t0._result=L1}},function(L1){if(L._status===j5||L._status===u7){var t0=L;t0._status=G4,t0._result=L1}}),L._status===u7){var $0=L;$0._status=j5,$0._result=X0}}if(L._status===x1){var S0=L._result;if(S0===void 0)e(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
2
|
|
|
3
3
|
Your code should look like:
|
|
4
4
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -10,26 +10,26 @@ Your code should look like:
|
|
|
10
10
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
11
|
2. You might be breaking the Rules of Hooks
|
|
12
12
|
3. You might have more than one copy of React in the same app
|
|
13
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return L}function K0(L){var E=l();if(L._context!==void 0){var X0=L._context;if(X0.Consumer===L)e("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");else if(X0.Provider===L)e("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return E.useContext(L)}function k0(L){var E=l();return E.useState(L)}function m0(L,E,X0){var $0=l();return $0.useReducer(L,E,X0)}function e0(L){var E=l();return E.useRef(L)}function d0(L,E){var X0=l();return X0.useEffect(L,E)}function _0(L,E){var X0=l();return X0.useInsertionEffect(L,E)}function h0(L,E){var X0=l();return X0.useLayoutEffect(L,E)}function Z1(L,E){var X0=l();return X0.useCallback(L,E)}function j1(L,E){var X0=l();return X0.useMemo(L,E)}function q4(L,E,X0){var $0=l();return $0.useImperativeHandle(L,E,X0)}function a7(L,E){{var X0=l();return X0.useDebugValue(L,E)}}function O5(){var L=l();return L.useTransition()}function v4(L){var E=l();return E.useDeferredValue(L)}function y1(){var L=l();return L.useId()}function b6(L,E,X0){var $0=l();return $0.useSyncExternalStore(L,E,X0)}var $6=0,gQ,xQ,jQ,pQ,cQ,dQ,lQ;function jZ(){}jZ.__reactDisabledLog=!0;function I3(){{if($6===0){gQ=console.log,xQ=console.info,jQ=console.warn,pQ=console.error,cQ=console.group,dQ=console.groupCollapsed,lQ=console.groupEnd;var L={configurable:!0,enumerable:!0,value:jZ,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}$6++}}function iQ(){{if($6--,$6===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O0({},L,{value:gQ}),info:O0({},L,{value:xQ}),warn:O0({},L,{value:jQ}),error:O0({},L,{value:pQ}),group:O0({},L,{value:cQ}),groupCollapsed:O0({},L,{value:dQ}),groupEnd:O0({},L,{value:lQ})})}if($6<0)e("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var D8=U0.ReactCurrentDispatcher,
|
|
14
|
-
`+
|
|
13
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return L}function K0(L){var E=l();if(L._context!==void 0){var X0=L._context;if(X0.Consumer===L)e("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");else if(X0.Provider===L)e("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return E.useContext(L)}function k0(L){var E=l();return E.useState(L)}function m0(L,E,X0){var $0=l();return $0.useReducer(L,E,X0)}function e0(L){var E=l();return E.useRef(L)}function d0(L,E){var X0=l();return X0.useEffect(L,E)}function _0(L,E){var X0=l();return X0.useInsertionEffect(L,E)}function h0(L,E){var X0=l();return X0.useLayoutEffect(L,E)}function Z1(L,E){var X0=l();return X0.useCallback(L,E)}function j1(L,E){var X0=l();return X0.useMemo(L,E)}function q4(L,E,X0){var $0=l();return $0.useImperativeHandle(L,E,X0)}function a7(L,E){{var X0=l();return X0.useDebugValue(L,E)}}function O5(){var L=l();return L.useTransition()}function v4(L){var E=l();return E.useDeferredValue(L)}function y1(){var L=l();return L.useId()}function b6(L,E,X0){var $0=l();return $0.useSyncExternalStore(L,E,X0)}var $6=0,gQ,xQ,jQ,pQ,cQ,dQ,lQ;function jZ(){}jZ.__reactDisabledLog=!0;function I3(){{if($6===0){gQ=console.log,xQ=console.info,jQ=console.warn,pQ=console.error,cQ=console.group,dQ=console.groupCollapsed,lQ=console.groupEnd;var L={configurable:!0,enumerable:!0,value:jZ,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}$6++}}function iQ(){{if($6--,$6===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O0({},L,{value:gQ}),info:O0({},L,{value:xQ}),warn:O0({},L,{value:jQ}),error:O0({},L,{value:pQ}),group:O0({},L,{value:cQ}),groupCollapsed:O0({},L,{value:dQ}),groupEnd:O0({},L,{value:lQ})})}if($6<0)e("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var D8=U0.ReactCurrentDispatcher,k5;function z8(L,E,X0){{if(k5===void 0)try{throw Error()}catch(S0){var $0=S0.stack.trim().match(/\n( *(at )?)/);k5=$0&&$0[1]||""}return`
|
|
14
|
+
`+k5+L}}var Q8=!1,kz;{var oQ=typeof WeakMap==="function"?WeakMap:Map;kz=new oQ}function pZ(L,E){if(!L||Q8)return"";{var X0=kz.get(L);if(X0!==void 0)return X0}var $0;Q8=!0;var S0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L1;L1=D8.current,D8.current=null,I3();try{if(E){var t0=function(){throw Error()};if(Object.defineProperty(t0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(t0,[])}catch(z4){$0=z4}Reflect.construct(L,[],t0)}else{try{t0.call()}catch(z4){$0=z4}L.call(t0.prototype)}}else{try{throw Error()}catch(z4){$0=z4}L()}}catch(z4){if(z4&&$0&&typeof z4.stack==="string"){var M1=z4.stack.split(`
|
|
15
15
|
`),p1=$0.stack.split(`
|
|
16
16
|
`),U4=M1.length-1,P4=p1.length-1;while(U4>=1&&P4>=0&&M1[U4]!==p1[P4])P4--;for(;U4>=1&&P4>=0;U4--,P4--)if(M1[U4]!==p1[P4]){if(U4!==1||P4!==1)do if(U4--,P4--,P4<0||M1[U4]!==p1[P4]){var b4=`
|
|
17
|
-
`+M1[U4].replace(" at new "," at ");if(L.displayName&&b4.includes("<anonymous>"))b4=b4.replace("<anonymous>",L.displayName);if(typeof L==="function")kz.set(L,b4);return b4}while(U4>=1&&P4>=0);break}}}finally{Q8=!1,D8.current=L1,iQ(),Error.prepareStackTrace=S0}var
|
|
17
|
+
`+M1[U4].replace(" at new "," at ");if(L.displayName&&b4.includes("<anonymous>"))b4=b4.replace("<anonymous>",L.displayName);if(typeof L==="function")kz.set(L,b4);return b4}while(U4>=1&&P4>=0);break}}}finally{Q8=!1,D8.current=L1,iQ(),Error.prepareStackTrace=S0}var V4=L?L.displayName||L.name:"",l4=V4?z8(V4):"";if(typeof L==="function")kz.set(L,l4);return l4}function aQ(L,E,X0){return pZ(L,!1)}function T3(L){var E=L.prototype;return!!(E&&E.isReactComponent)}function X8(L,E,X0){if(L==null)return"";if(typeof L==="function")return pZ(L,T3(L));if(typeof L==="string")return z8(L);switch(L){case b:return z8("Suspense");case P:return z8("SuspenseList")}if(typeof L==="object")switch(L.$$typeof){case A:return aQ(L.render);case M:return X8(L.type,E,X0);case w:{var $0=L,S0=$0._payload,L1=$0._init;try{return X8(L1(S0),E,X0)}catch(t0){}}}return""}var cZ={},nQ=U0.ReactDebugCurrentFrame;function Cz(L){if(L){var E=L._owner,X0=X8(L.type,L._source,E?E.type:null);nQ.setExtraStackFrame(X0)}else nQ.setExtraStackFrame(null)}function dZ(L,E,X0,$0,S0){{var L1=Function.call.bind(i1);for(var t0 in L)if(L1(L,t0)){var M1=void 0;try{if(typeof L[t0]!=="function"){var p1=Error(($0||"React class")+": "+X0+" type `"+t0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[t0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p1.name="Invariant Violation",p1}M1=L[t0](E,t0,$0,X0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U4){M1=U4}if(M1&&!(M1 instanceof Error))Cz(S0),e("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$0||"React class",X0,t0,typeof M1),Cz(null);if(M1 instanceof Error&&!(M1.message in cZ))cZ[M1.message]=!0,Cz(S0),e("Failed %s type: %s",X0,M1.message),Cz(null)}}}function n1(L){if(L){var E=L._owner,X0=X8(L.type,L._source,E?E.type:null);p(X0)}else p(null)}var lZ=!1;function rQ(){if(x.current){var L=I1(x.current.type);if(L)return`
|
|
18
18
|
|
|
19
19
|
Check the render method of \``+L+"`."}return""}function S1(L){if(L!==void 0){var E=L.fileName.replace(/^.*[\\\/]/,""),X0=L.lineNumber;return`
|
|
20
20
|
|
|
21
21
|
Check your code at `+E+":"+X0+"."}return""}function iZ(L){if(L!==null&&L!==void 0)return S1(L.__source);return""}var g7={};function m8(L){var E=rQ();if(!E){var X0=typeof L==="string"?L:L.displayName||L.name;if(X0)E=`
|
|
22
22
|
|
|
23
|
-
Check the top-level render call using <`+X0+">."}return E}function Z8(L,E){if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var X0=m8(E);if(g7[X0])return;g7[X0]=!0;var $0="";if(L&&L._owner&&L._owner!==x.current)$0=" It was passed a child from "+I1(L._owner.type)+".";n1(L),e('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X0,$0),n1(null)}function oZ(L,E){if(typeof L!=="object")return;if(Y1(L))for(var X0=0;X0<L.length;X0++){var $0=L[X0];if(W1($0))Z8($0,E)}else if(W1(L)){if(L._store)L._store.validated=!0}else if(L){var S0=g(L);if(typeof S0==="function"){if(S0!==L.entries){var L1=S0.call(L),t0;while(!(t0=L1.next()).done)if(W1(t0.value))Z8(t0.value,E)}}}}function N7(L){{var E=L.type;if(E===null||E===void 0||typeof E==="string")return;var X0;if(typeof E==="function")X0=E.propTypes;else if(typeof E==="object"&&(E.$$typeof===A||E.$$typeof===M))X0=E.propTypes;else return;if(X0){var $0=I1(E);dZ(X0,L.props,"prop",$0,L)}else if(E.PropTypes!==void 0&&!lZ){lZ=!0;var S0=I1(E);e("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S0||"Unknown")}if(typeof E.getDefaultProps==="function"&&!E.getDefaultProps.isReactClassApproved)e("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function j4(L){{var E=Object.keys(L.props);for(var X0=0;X0<E.length;X0++){var $0=E[X0];if($0!=="children"&&$0!=="key"){n1(L),e("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$0),n1(null);break}}if(L.ref!==null)n1(L),e("Invalid attribute `ref` supplied to `React.Fragment`."),n1(null)}}function aZ(L,E,X0){var $0=N0(L);if(!$0){var S0="";if(L===void 0||typeof L==="object"&&L!==null&&Object.keys(L).length===0)S0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var L1=iZ(E);if(L1)S0+=L1;else S0+=rQ();var t0;if(L===null)t0="null";else if(Y1(L))t0="array";else if(L!==void 0&&L.$$typeof===G)t0="<"+(I1(L.type)||"Unknown")+" />",S0=" Did you accidentally export a JSX literal instead of a component?";else t0=typeof L;e("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",t0,S0)}var M1=e4.apply(this,arguments);if(M1==null)return M1;if($0)for(var p1=2;p1<arguments.length;p1++)oZ(arguments[p1],L);if(L===O)j4(M1);else N7(M1);return M1}var _5=!1;function Y5(L){var E=aZ.bind(null,L);E.type=L;{if(!_5)_5=!0,b0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(E,"type",{enumerable:!1,get:function(){return b0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:L}),L}})}return E}function H6(L,E,X0){var $0=$1.apply(this,arguments);for(var S0=2;S0<arguments.length;S0++)oZ(arguments[S0],$0.type);return N7($0),$0}function k3(L,E){var X0=V.transition;V.transition={};var $0=V.transition;V.transition._updatedFibers=new Set;try{L()}finally{if(V.transition=X0,X0===null&&$0._updatedFibers){var S0=$0._updatedFibers.size;if(S0>10)b0("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");$0._updatedFibers.clear()}}}var Sz=!1,E8=null;function nZ(L){if(E8===null)try{var E=("require"+Math.random()).slice(0,7),X0=J3&&J3[E];E8=X0.call(J3,"timers").setImmediate}catch($0){E8=function(S0){if(Sz===!1){if(Sz=!0,typeof MessageChannel>"u")e("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")}var L1=new MessageChannel;L1.port1.onmessage=S0,L1.port2.postMessage(void 0)}}return E8(L)}var J8=0,rZ=!1;function tZ(L){{var E=J8;if(J8++,k.current===null)k.current=[];var X0=k.isBatchingLegacy,$0;try{if(k.isBatchingLegacy=!0,$0=L(),!X0&&k.didScheduleLegacyUpdate){var S0=k.current;if(S0!==null)k.didScheduleLegacyUpdate=!1,fz(S0)}}catch(y4){throw A6(E),y4}finally{k.isBatchingLegacy=X0}if($0!==null&&typeof $0==="object"&&typeof $0.then==="function"){var L1=$0,t0=!1,M1={then:function(y4,l4){t0=!0,L1.then(function(z4){if(A6(E),J8===0)vz(z4,y4,l4);else y4(z4)},function(z4){A6(E),l4(z4)})}};if(!rZ&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!t0)rZ=!0,e("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")});return M1}else{var p1=$0;if(A6(E),J8===0){var U4=k.current;if(U4!==null)fz(U4),k.current=null;var P4={then:function(y4,l4){if(k.current===null)k.current=[],vz(p1,y4,l4);else y4(p1)}};return P4}else{var b4={then:function(y4,l4){y4(p1)}};return b4}}}}function A6(L){{if(L!==J8-1)e("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");J8=L}}function vz(L,E,X0){{var $0=k.current;if($0!==null)try{fz($0),nZ(function(){if($0.length===0)k.current=null,E(L);else vz(L,E,X0)})}catch(S0){X0(S0)}else E(L)}}var Y8=!1;function fz(L){if(!Y8){Y8=!0;var E=0;try{for(;E<L.length;E++){var X0=L[E];do X0=X0(!0);while(X0!==null)}L.length=0}catch($0){throw L=L.slice(E+1),$0}finally{Y8=!1}}}var sZ=aZ,eZ=H6,zJ=Y5,QJ={map:R7,forEach:J6,count:o7,toArray:g5,only:Y6};if(pb.Children=QJ,pb.Component=o,pb.Fragment=O,pb.Profiler=R,pb.PureComponent=f0,pb.StrictMode=q,pb.Suspense=b,pb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U0,pb.act=tZ,pb.cloneElement=eZ,pb.createContext=I5,pb.createElement=sZ,pb.createFactory=zJ,pb.createRef=J1,pb.forwardRef=y,pb.isValidElement=W1,pb.lazy=t1,pb.memo=T,pb.startTransition=k3,pb.unstable_act=tZ,pb.useCallback=Z1,pb.useContext=K0,pb.useDebugValue=a7,pb.useDeferredValue=v4,pb.useEffect=d0,pb.useId=y1,pb.useImperativeHandle=q4,pb.useInsertionEffect=_0,pb.useLayoutEffect=h0,pb.useMemo=j1,pb.useReducer=m0,pb.useRef=e0,pb.useState=k0,pb.useSyncExternalStore=b6,pb.useTransition=O5,pb.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var NK=_z((cb)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=!1,G=!1,U=5;function O(V0,$1){var W1=V0.length;V0.push($1),K(V0,$1,W1)}function q(V0){return V0.length===0?null:V0[0]}function R(V0){if(V0.length===0)return null;var $1=V0[0],W1=V0.pop();if(W1!==$1)V0[0]=W1,_(V0,W1,0);return $1}function K(V0,$1,W1){var o1=W1;while(o1>0){var H4=o1-1>>>1,E4=V0[H4];if(A(E4,$1)>0)V0[H4]=$1,V0[o1]=E4,o1=H4;else return}}function _(V0,$1,W1){var o1=W1,H4=V0.length,E4=H4>>>1;while(o1<E4){var L4=(o1+1)*2-1,t4=V0[L4],C1=L4+1,b1=V0[C1];if(A(t4,$1)<0)if(C1<H4&&A(b1,t4)<0)V0[o1]=b1,V0[C1]=$1,o1=C1;else V0[o1]=t4,V0[L4]=$1,o1=L4;else if(C1<H4&&A(b1,$1)<0)V0[o1]=b1,V0[C1]=$1,o1=C1;else return}}function A(V0,$1){var W1=V0.sortIndex-$1.sortIndex;return W1!==0?W1:V0.id-$1.id}var b=1,P=2,M=3,w=4,f=5;function v(V0,$1){}var m=typeof performance==="object"&&typeof performance.now==="function";if(m){var g=performance;cb.unstable_now=function(){return g.now()}}else{var C=Date,V=C.now();cb.unstable_now=function(){return C.now()-V}}var k=1073741823,x=-1,j=250,u=5000,p=1e4,s=k,a=[],D=[],z0=1,Q0=null,U0=M,b0=!1,e=!1,y0=!1,I0=typeof setTimeout==="function"?setTimeout:null,i=typeof clearTimeout==="function"?clearTimeout:null,R0=typeof setImmediate<"u"?setImmediate:null,O0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function q0(V0){var $1=q(D);while($1!==null){if($1.callback===null)R(D);else if($1.startTime<=V0)R(D),$1.sortIndex=$1.expirationTime,O(a,$1);else return;$1=q(D)}}function o(V0){if(y0=!1,q0(V0),!e)if(q(a)!==null)e=!0,h4(T0);else{var $1=q(D);if($1!==null)L7(o,$1.startTime-V0)}}function T0(V0,$1){if(e=!1,y0)y0=!1,E7();b0=!0;var W1=U0;try{if(G)try{return v0(V0,$1)}catch(H4){if(Q0!==null){var o1=cb.unstable_now();v(Q0,o1),Q0.isQueued=!1}throw H4}else return v0(V0,$1)}finally{Q0=null,U0=W1,b0=!1}}function v0(V0,$1){var W1=$1;q0(W1),Q0=q(a);while(Q0!==null&&!Y){if(Q0.expirationTime>W1&&(!V0||i1()))break;var o1=Q0.callback;if(typeof o1==="function"){Q0.callback=null,U0=Q0.priorityLevel;var H4=Q0.expirationTime<=W1,E4=o1(H4);if(W1=cb.unstable_now(),typeof E4==="function")Q0.callback=E4;else if(Q0===q(a))R(a);q0(W1)}else R(a);Q0=q(a)}if(Q0!==null)return!0;else{var L4=q(D);if(L4!==null)L7(o,L4.startTime-W1);return!1}}function X1(V0,$1){switch(V0){case b:case P:case M:case w:case f:break;default:V0=M}var W1=U0;U0=V0;try{return $1()}finally{U0=W1}}function r0(V0){var $1;switch(U0){case b:case P:case M:$1=M;break;default:$1=U0;break}var W1=U0;U0=$1;try{return V0()}finally{U0=W1}}function f0(V0){var $1=U0;return function(){var W1=U0;U0=$1;try{return V0.apply(this,arguments)}finally{U0=W1}}}function o0(V0,$1,W1){var o1=cb.unstable_now(),H4;if(typeof W1==="object"&&W1!==null){var E4=W1.delay;if(typeof E4==="number"&&E4>0)H4=o1+E4;else H4=o1}else H4=o1;var L4;switch(V0){case b:L4=x;break;case P:L4=j;break;case f:L4=s;break;case w:L4=p;break;case M:default:L4=u;break}var t4=H4+L4,C1={id:z0++,callback:$1,priorityLevel:V0,startTime:H4,expirationTime:t4,sortIndex:-1};if(H4>o1){if(C1.sortIndex=H4,O(D,C1),q(a)===null&&C1===q(D)){if(y0)E7();else y0=!0;L7(o,H4-o1)}}else if(C1.sortIndex=t4,O(a,C1),!e&&!b0)e=!0,h4(T0);return C1}function J1(){}function A0(){if(!e&&!b0)e=!0,h4(T0)}function Y1(){return q(a)}function h1(V0){V0.callback=null}function l1(){return U0}var r1=!1,O1=null,w0=-1,Q1=U,I1=-1;function i1(){var V0=cb.unstable_now()-I1;if(V0<Q1)return!1;return!0}function C4(){}function $4(V0){if(V0<0||V0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(V0>0)Q1=Math.floor(1000/V0);else Q1=U}var b7=function(){if(O1!==null){var V0=cb.unstable_now();I1=V0;var $1=!0,W1=!0;try{W1=O1($1,V0)}finally{if(W1)F4();else r1=!1,O1=null}}else r1=!1},F4;if(typeof R0==="function")F4=function(){R0(b7)};else if(typeof MessageChannel<"u"){var A7=new MessageChannel,S4=A7.port2;A7.port1.onmessage=b7,F4=function(){S4.postMessage(null)}}else F4=function(){I0(b7,0)};function h4(V0){if(O1=V0,!r1)r1=!0,F4()}function L7(V0,$1){w0=I0(function(){V0(cb.unstable_now())},$1)}function E7(){i(w0),w0=-1}var d4=C4,e4=null;if(cb.unstable_IdlePriority=f,cb.unstable_ImmediatePriority=b,cb.unstable_LowPriority=w,cb.unstable_NormalPriority=M,cb.unstable_Profiling=e4,cb.unstable_UserBlockingPriority=P,cb.unstable_cancelCallback=h1,cb.unstable_continueExecution=A0,cb.unstable_forceFrameRate=$4,cb.unstable_getCurrentPriorityLevel=l1,cb.unstable_getFirstCallbackNode=Y1,cb.unstable_next=r0,cb.unstable_pauseExecution=J1,cb.unstable_requestPaint=d4,cb.unstable_runWithPriority=X1,cb.unstable_scheduleCallback=o0,cb.unstable_shouldYield=i1,cb.unstable_wrapCallback=f0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var MK=_z((db)=>{var SZ=B0(f1()),_4=B0(NK());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=SZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=!1;function U(z){G=z}function O(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("warn",z,X)}}function q(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("error",z,X)}}function R(z,Q,X){{var Z=Y.ReactDebugCurrentFrame,J=Z.getStackAddendum();if(J!=="")Q+="%s",X=X.concat([J]);var $=X.map(function(H){return String(H)});$.unshift("Warning: "+Q),Function.prototype.apply.call(console[z],console,$)}}var K=0,_=1,A=2,b=3,P=4,M=5,w=6,f=7,v=8,m=9,g=10,C=11,V=12,k=13,x=14,j=15,u=16,p=17,s=18,a=19,D=21,z0=22,Q0=23,U0=24,b0=25,e=!0,y0=!1,I0=!1,i=!1,R0=!1,O0=!0,q0=!1,o=!0,T0=!0,v0=!0,X1=!0,r0=new Set,f0={},o0={};function J1(z,Q){A0(z,Q),A0(z+"Capture",Q)}function A0(z,Q){if(f0[z])q("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);f0[z]=Q;{var X=z.toLowerCase();if(o0[X]=z,z==="onDoubleClick")o0.ondblclick=z}for(var Z=0;Z<Q.length;Z++)r0.add(Q[Z])}var Y1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",h1=Object.prototype.hasOwnProperty;function l1(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function r1(z){try{return O1(z),!1}catch(Q){return!0}}function O1(z){return""+z}function w0(z,Q){if(r1(z))return q("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function Q1(z){if(r1(z))return q("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}function I1(z,Q){if(r1(z))return q("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function i1(z,Q){if(r1(z))return q("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function C4(z){if(r1(z))return q("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}function $4(z){if(r1(z))return q("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}var b7=0,F4=1,A7=2,S4=3,h4=4,L7=5,E7=6,d4=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",e4=d4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",V0=new RegExp("^["+d4+"]["+e4+"]*$"),$1={},W1={};function o1(z){if(h1.call(W1,z))return!0;if(h1.call($1,z))return!1;if(V0.test(z))return W1[z]=!0,!0;return $1[z]=!0,q("Invalid attribute name: `%s`",z),!1}function H4(z,Q,X){if(Q!==null)return Q.type===b7;if(X)return!1;if(z.length>2&&(z[0]==="o"||z[0]==="O")&&(z[1]==="n"||z[1]==="N"))return!0;return!1}function E4(z,Q,X,Z){if(X!==null&&X.type===b7)return!1;switch(typeof Q){case"function":case"symbol":return!0;case"boolean":{if(Z)return!1;if(X!==null)return!X.acceptsBooleans;else{var J=z.toLowerCase().slice(0,5);return J!=="data-"&&J!=="aria-"}}default:return!1}}function L4(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(E4(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case S4:return!Q;case h4:return Q===!1;case L7:return isNaN(Q);case E7:return isNaN(Q)||Q<1}return!1}function t4(z){return b1.hasOwnProperty(z)?b1[z]:null}function C1(z,Q,X,Z,J,$,H){this.acceptsBooleans=Q===A7||Q===S4||Q===h4,this.attributeName=Z,this.attributeNamespace=J,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=$,this.removeEmptyString=H}var b1={},i7=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];i7.forEach(function(z){b1[z]=new C1(z,b7,!1,z,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(z){var Q=z[0],X=z[1];b1[Q]=new C1(Q,F4,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){b1[z]=new C1(z,A7,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){b1[z]=new C1(z,A7,!1,z,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(z){b1[z]=new C1(z,S4,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){b1[z]=new C1(z,S4,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){b1[z]=new C1(z,h4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){b1[z]=new C1(z,E7,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){b1[z]=new C1(z,L7,!1,z.toLowerCase(),null,!1,!1)});var R7=/[\-\:]([a-z])/g,o7=function(z){return z[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){b1[z]=new C1(z,F4,!1,z.toLowerCase(),null,!1,!1)});var J6="xlinkHref";b1[J6]=new C1("xlinkHref",F4,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){b1[z]=new C1(z,F4,!1,z.toLowerCase(),null,!0,!0)});var g5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Y6=!1;function I5(z){if(!Y6&&g5.test(z))Y6=!0,q("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(z))}function u7(z,Q,X,Z){if(Z.mustUseProperty){var J=Z.propertyName;return z[J]}else{if(w0(X,Q),Z.sanitizeURL)I5(""+X);var $=Z.attributeName,H=null;if(Z.type===h4){if(z.hasAttribute($)){var B=z.getAttribute($);if(B==="")return!0;if(L4(Q,X,Z,!1))return B;if(B===""+X)return X;return B}}else if(z.hasAttribute($)){if(L4(Q,X,Z,!1))return z.getAttribute($);if(Z.type===S4)return X;H=z.getAttribute($)}if(L4(Q,X,Z,!1))return H===null?X:H;else if(H===""+X)return X;else return H}}function x5(z,Q,X,Z){{if(!o1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var J=z.getAttribute(Q);if(w0(X,Q),J===""+X)return X;return J}}function x1(z,Q,X,Z){var J=t4(Q);if(H4(Q,J,Z))return;if(L4(Q,X,J,Z))X=null;if(Z||J===null){if(o1(Q)){var $=Q;if(X===null)z.removeAttribute($);else w0(X,Q),z.setAttribute($,""+X)}return}var H=J.mustUseProperty;if(H){var B=J.propertyName;if(X===null){var W=J.type;z[B]=W===S4?!1:""}else z[B]=X;return}var{attributeName:F,attributeNamespace:I}=J;if(X===null)z.removeAttribute(F);else{var d=J.type,c;if(d===S4||d===h4&&X===!0)c="";else if(w0(X,F),c=""+X,J.sanitizeURL)I5(c.toString());if(I)z.setAttributeNS(I,F,c);else z.setAttribute(F,c)}}var G4=Symbol.for("react.element"),N4=Symbol.for("react.portal"),t1=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),H0=Symbol.for("react.profiler"),N0=Symbol.for("react.provider"),T=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),K0=Symbol.for("react.suspense"),k0=Symbol.for("react.suspense_list"),m0=Symbol.for("react.memo"),e0=Symbol.for("react.lazy"),d0=Symbol.for("react.scope"),_0=Symbol.for("react.debug_trace_mode"),h0=Symbol.for("react.offscreen"),Z1=Symbol.for("react.legacy_hidden"),j1=Symbol.for("react.cache"),q4=Symbol.for("react.tracing_marker"),a7=Symbol.iterator,O5="@@iterator";function v4(z){if(z===null||typeof z!=="object")return null;var Q=a7&&z[a7]||z[O5];if(typeof Q==="function")return Q;return null}var y1=Object.assign,b6=0,$6,gQ,xQ,jQ,pQ,cQ,dQ;function lQ(){}lQ.__reactDisabledLog=!0;function jZ(){{if(b6===0){$6=console.log,gQ=console.info,xQ=console.warn,jQ=console.error,pQ=console.group,cQ=console.groupCollapsed,dQ=console.groupEnd;var z={configurable:!0,enumerable:!0,value:lQ,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}b6++}}function I3(){{if(b6--,b6===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:y1({},z,{value:$6}),info:y1({},z,{value:gQ}),warn:y1({},z,{value:xQ}),error:y1({},z,{value:jQ}),group:y1({},z,{value:pQ}),groupCollapsed:y1({},z,{value:cQ}),groupEnd:y1({},z,{value:dQ})})}if(b6<0)q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var iQ=Y.ReactCurrentDispatcher,D8;function T5(z,Q,X){{if(D8===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);D8=Z&&Z[1]||""}return`
|
|
23
|
+
Check the top-level render call using <`+X0+">."}return E}function Z8(L,E){if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var X0=m8(E);if(g7[X0])return;g7[X0]=!0;var $0="";if(L&&L._owner&&L._owner!==x.current)$0=" It was passed a child from "+I1(L._owner.type)+".";n1(L),e('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X0,$0),n1(null)}function oZ(L,E){if(typeof L!=="object")return;if(Y1(L))for(var X0=0;X0<L.length;X0++){var $0=L[X0];if(W1($0))Z8($0,E)}else if(W1(L)){if(L._store)L._store.validated=!0}else if(L){var S0=g(L);if(typeof S0==="function"){if(S0!==L.entries){var L1=S0.call(L),t0;while(!(t0=L1.next()).done)if(W1(t0.value))Z8(t0.value,E)}}}}function N7(L){{var E=L.type;if(E===null||E===void 0||typeof E==="string")return;var X0;if(typeof E==="function")X0=E.propTypes;else if(typeof E==="object"&&(E.$$typeof===A||E.$$typeof===M))X0=E.propTypes;else return;if(X0){var $0=I1(E);dZ(X0,L.props,"prop",$0,L)}else if(E.PropTypes!==void 0&&!lZ){lZ=!0;var S0=I1(E);e("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",S0||"Unknown")}if(typeof E.getDefaultProps==="function"&&!E.getDefaultProps.isReactClassApproved)e("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function j4(L){{var E=Object.keys(L.props);for(var X0=0;X0<E.length;X0++){var $0=E[X0];if($0!=="children"&&$0!=="key"){n1(L),e("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$0),n1(null);break}}if(L.ref!==null)n1(L),e("Invalid attribute `ref` supplied to `React.Fragment`."),n1(null)}}function aZ(L,E,X0){var $0=N0(L);if(!$0){var S0="";if(L===void 0||typeof L==="object"&&L!==null&&Object.keys(L).length===0)S0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var L1=iZ(E);if(L1)S0+=L1;else S0+=rQ();var t0;if(L===null)t0="null";else if(Y1(L))t0="array";else if(L!==void 0&&L.$$typeof===G)t0="<"+(I1(L.type)||"Unknown")+" />",S0=" Did you accidentally export a JSX literal instead of a component?";else t0=typeof L;e("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",t0,S0)}var M1=e4.apply(this,arguments);if(M1==null)return M1;if($0)for(var p1=2;p1<arguments.length;p1++)oZ(arguments[p1],L);if(L===O)j4(M1);else N7(M1);return M1}var _5=!1;function Y5(L){var E=aZ.bind(null,L);E.type=L;{if(!_5)_5=!0,b0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(E,"type",{enumerable:!1,get:function(){return b0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:L}),L}})}return E}function H6(L,E,X0){var $0=$1.apply(this,arguments);for(var S0=2;S0<arguments.length;S0++)oZ(arguments[S0],$0.type);return N7($0),$0}function k3(L,E){var X0=V.transition;V.transition={};var $0=V.transition;V.transition._updatedFibers=new Set;try{L()}finally{if(V.transition=X0,X0===null&&$0._updatedFibers){var S0=$0._updatedFibers.size;if(S0>10)b0("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");$0._updatedFibers.clear()}}}var Sz=!1,E8=null;function nZ(L){if(E8===null)try{var E=("require"+Math.random()).slice(0,7),X0=J3&&J3[E];E8=X0.call(J3,"timers").setImmediate}catch($0){E8=function(S0){if(Sz===!1){if(Sz=!0,typeof MessageChannel>"u")e("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")}var L1=new MessageChannel;L1.port1.onmessage=S0,L1.port2.postMessage(void 0)}}return E8(L)}var J8=0,rZ=!1;function tZ(L){{var E=J8;if(J8++,k.current===null)k.current=[];var X0=k.isBatchingLegacy,$0;try{if(k.isBatchingLegacy=!0,$0=L(),!X0&&k.didScheduleLegacyUpdate){var S0=k.current;if(S0!==null)k.didScheduleLegacyUpdate=!1,fz(S0)}}catch(V4){throw A6(E),V4}finally{k.isBatchingLegacy=X0}if($0!==null&&typeof $0==="object"&&typeof $0.then==="function"){var L1=$0,t0=!1,M1={then:function(V4,l4){t0=!0,L1.then(function(z4){if(A6(E),J8===0)vz(z4,V4,l4);else V4(z4)},function(z4){A6(E),l4(z4)})}};if(!rZ&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!t0)rZ=!0,e("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")});return M1}else{var p1=$0;if(A6(E),J8===0){var U4=k.current;if(U4!==null)fz(U4),k.current=null;var P4={then:function(V4,l4){if(k.current===null)k.current=[],vz(p1,V4,l4);else V4(p1)}};return P4}else{var b4={then:function(V4,l4){V4(p1)}};return b4}}}}function A6(L){{if(L!==J8-1)e("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");J8=L}}function vz(L,E,X0){{var $0=k.current;if($0!==null)try{fz($0),nZ(function(){if($0.length===0)k.current=null,E(L);else vz(L,E,X0)})}catch(S0){X0(S0)}else E(L)}}var Y8=!1;function fz(L){if(!Y8){Y8=!0;var E=0;try{for(;E<L.length;E++){var X0=L[E];do X0=X0(!0);while(X0!==null)}L.length=0}catch($0){throw L=L.slice(E+1),$0}finally{Y8=!1}}}var sZ=aZ,eZ=H6,zJ=Y5,QJ={map:R7,forEach:J6,count:o7,toArray:x5,only:Y6};if(pb.Children=QJ,pb.Component=o,pb.Fragment=O,pb.Profiler=R,pb.PureComponent=f0,pb.StrictMode=q,pb.Suspense=b,pb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U0,pb.act=tZ,pb.cloneElement=eZ,pb.createContext=T5,pb.createElement=sZ,pb.createFactory=zJ,pb.createRef=J1,pb.forwardRef=y,pb.isValidElement=W1,pb.lazy=t1,pb.memo=T,pb.startTransition=k3,pb.unstable_act=tZ,pb.useCallback=Z1,pb.useContext=K0,pb.useDebugValue=a7,pb.useDeferredValue=v4,pb.useEffect=d0,pb.useId=y1,pb.useImperativeHandle=q4,pb.useInsertionEffect=_0,pb.useLayoutEffect=h0,pb.useMemo=j1,pb.useReducer=m0,pb.useRef=e0,pb.useState=k0,pb.useSyncExternalStore=b6,pb.useTransition=O5,pb.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var NK=_z((cb)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=!1,G=!1,U=5;function O(V0,$1){var W1=V0.length;V0.push($1),K(V0,$1,W1)}function q(V0){return V0.length===0?null:V0[0]}function R(V0){if(V0.length===0)return null;var $1=V0[0],W1=V0.pop();if(W1!==$1)V0[0]=W1,_(V0,W1,0);return $1}function K(V0,$1,W1){var o1=W1;while(o1>0){var H4=o1-1>>>1,u4=V0[H4];if(A(u4,$1)>0)V0[H4]=$1,V0[o1]=u4,o1=H4;else return}}function _(V0,$1,W1){var o1=W1,H4=V0.length,u4=H4>>>1;while(o1<u4){var L4=(o1+1)*2-1,t4=V0[L4],C1=L4+1,b1=V0[C1];if(A(t4,$1)<0)if(C1<H4&&A(b1,t4)<0)V0[o1]=b1,V0[C1]=$1,o1=C1;else V0[o1]=t4,V0[L4]=$1,o1=L4;else if(C1<H4&&A(b1,$1)<0)V0[o1]=b1,V0[C1]=$1,o1=C1;else return}}function A(V0,$1){var W1=V0.sortIndex-$1.sortIndex;return W1!==0?W1:V0.id-$1.id}var b=1,P=2,M=3,w=4,f=5;function v(V0,$1){}var m=typeof performance==="object"&&typeof performance.now==="function";if(m){var g=performance;cb.unstable_now=function(){return g.now()}}else{var C=Date,V=C.now();cb.unstable_now=function(){return C.now()-V}}var k=1073741823,x=-1,j=250,u=5000,p=1e4,s=k,a=[],D=[],z0=1,Q0=null,U0=M,b0=!1,e=!1,y0=!1,I0=typeof setTimeout==="function"?setTimeout:null,i=typeof clearTimeout==="function"?clearTimeout:null,R0=typeof setImmediate<"u"?setImmediate:null,O0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function q0(V0){var $1=q(D);while($1!==null){if($1.callback===null)R(D);else if($1.startTime<=V0)R(D),$1.sortIndex=$1.expirationTime,O(a,$1);else return;$1=q(D)}}function o(V0){if(y0=!1,q0(V0),!e)if(q(a)!==null)e=!0,y4(T0);else{var $1=q(D);if($1!==null)L7(o,$1.startTime-V0)}}function T0(V0,$1){if(e=!1,y0)y0=!1,E7();b0=!0;var W1=U0;try{if(G)try{return v0(V0,$1)}catch(H4){if(Q0!==null){var o1=cb.unstable_now();v(Q0,o1),Q0.isQueued=!1}throw H4}else return v0(V0,$1)}finally{Q0=null,U0=W1,b0=!1}}function v0(V0,$1){var W1=$1;q0(W1),Q0=q(a);while(Q0!==null&&!Y){if(Q0.expirationTime>W1&&(!V0||i1()))break;var o1=Q0.callback;if(typeof o1==="function"){Q0.callback=null,U0=Q0.priorityLevel;var H4=Q0.expirationTime<=W1,u4=o1(H4);if(W1=cb.unstable_now(),typeof u4==="function")Q0.callback=u4;else if(Q0===q(a))R(a);q0(W1)}else R(a);Q0=q(a)}if(Q0!==null)return!0;else{var L4=q(D);if(L4!==null)L7(o,L4.startTime-W1);return!1}}function X1(V0,$1){switch(V0){case b:case P:case M:case w:case f:break;default:V0=M}var W1=U0;U0=V0;try{return $1()}finally{U0=W1}}function r0(V0){var $1;switch(U0){case b:case P:case M:$1=M;break;default:$1=U0;break}var W1=U0;U0=$1;try{return V0()}finally{U0=W1}}function f0(V0){var $1=U0;return function(){var W1=U0;U0=$1;try{return V0.apply(this,arguments)}finally{U0=W1}}}function o0(V0,$1,W1){var o1=cb.unstable_now(),H4;if(typeof W1==="object"&&W1!==null){var u4=W1.delay;if(typeof u4==="number"&&u4>0)H4=o1+u4;else H4=o1}else H4=o1;var L4;switch(V0){case b:L4=x;break;case P:L4=j;break;case f:L4=s;break;case w:L4=p;break;case M:default:L4=u;break}var t4=H4+L4,C1={id:z0++,callback:$1,priorityLevel:V0,startTime:H4,expirationTime:t4,sortIndex:-1};if(H4>o1){if(C1.sortIndex=H4,O(D,C1),q(a)===null&&C1===q(D)){if(y0)E7();else y0=!0;L7(o,H4-o1)}}else if(C1.sortIndex=t4,O(a,C1),!e&&!b0)e=!0,y4(T0);return C1}function J1(){}function A0(){if(!e&&!b0)e=!0,y4(T0)}function Y1(){return q(a)}function h1(V0){V0.callback=null}function l1(){return U0}var r1=!1,O1=null,w0=-1,Q1=U,I1=-1;function i1(){var V0=cb.unstable_now()-I1;if(V0<Q1)return!1;return!0}function C4(){}function $4(V0){if(V0<0||V0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(V0>0)Q1=Math.floor(1000/V0);else Q1=U}var b7=function(){if(O1!==null){var V0=cb.unstable_now();I1=V0;var $1=!0,W1=!0;try{W1=O1($1,V0)}finally{if(W1)F4();else r1=!1,O1=null}}else r1=!1},F4;if(typeof R0==="function")F4=function(){R0(b7)};else if(typeof MessageChannel<"u"){var A7=new MessageChannel,S4=A7.port2;A7.port1.onmessage=b7,F4=function(){S4.postMessage(null)}}else F4=function(){I0(b7,0)};function y4(V0){if(O1=V0,!r1)r1=!0,F4()}function L7(V0,$1){w0=I0(function(){V0(cb.unstable_now())},$1)}function E7(){i(w0),w0=-1}var d4=C4,e4=null;if(cb.unstable_IdlePriority=f,cb.unstable_ImmediatePriority=b,cb.unstable_LowPriority=w,cb.unstable_NormalPriority=M,cb.unstable_Profiling=e4,cb.unstable_UserBlockingPriority=P,cb.unstable_cancelCallback=h1,cb.unstable_continueExecution=A0,cb.unstable_forceFrameRate=$4,cb.unstable_getCurrentPriorityLevel=l1,cb.unstable_getFirstCallbackNode=Y1,cb.unstable_next=r0,cb.unstable_pauseExecution=J1,cb.unstable_requestPaint=d4,cb.unstable_runWithPriority=X1,cb.unstable_scheduleCallback=o0,cb.unstable_shouldYield=i1,cb.unstable_wrapCallback=f0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var MK=_z((db)=>{var SZ=B0(f1()),_4=B0(NK());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=SZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=!1;function U(z){G=z}function O(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("warn",z,X)}}function q(z){if(!G){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("error",z,X)}}function R(z,Q,X){{var Z=Y.ReactDebugCurrentFrame,J=Z.getStackAddendum();if(J!=="")Q+="%s",X=X.concat([J]);var $=X.map(function(H){return String(H)});$.unshift("Warning: "+Q),Function.prototype.apply.call(console[z],console,$)}}var K=0,_=1,A=2,b=3,P=4,M=5,w=6,f=7,v=8,m=9,g=10,C=11,V=12,k=13,x=14,j=15,u=16,p=17,s=18,a=19,D=21,z0=22,Q0=23,U0=24,b0=25,e=!0,y0=!1,I0=!1,i=!1,R0=!1,O0=!0,q0=!1,o=!0,T0=!0,v0=!0,X1=!0,r0=new Set,f0={},o0={};function J1(z,Q){A0(z,Q),A0(z+"Capture",Q)}function A0(z,Q){if(f0[z])q("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);f0[z]=Q;{var X=z.toLowerCase();if(o0[X]=z,z==="onDoubleClick")o0.ondblclick=z}for(var Z=0;Z<Q.length;Z++)r0.add(Q[Z])}var Y1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",h1=Object.prototype.hasOwnProperty;function l1(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function r1(z){try{return O1(z),!1}catch(Q){return!0}}function O1(z){return""+z}function w0(z,Q){if(r1(z))return q("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function Q1(z){if(r1(z))return q("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}function I1(z,Q){if(r1(z))return q("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function i1(z,Q){if(r1(z))return q("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,l1(z)),O1(z)}function C4(z){if(r1(z))return q("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}function $4(z){if(r1(z))return q("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",l1(z)),O1(z)}var b7=0,F4=1,A7=2,S4=3,y4=4,L7=5,E7=6,d4=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",e4=d4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",V0=new RegExp("^["+d4+"]["+e4+"]*$"),$1={},W1={};function o1(z){if(h1.call(W1,z))return!0;if(h1.call($1,z))return!1;if(V0.test(z))return W1[z]=!0,!0;return $1[z]=!0,q("Invalid attribute name: `%s`",z),!1}function H4(z,Q,X){if(Q!==null)return Q.type===b7;if(X)return!1;if(z.length>2&&(z[0]==="o"||z[0]==="O")&&(z[1]==="n"||z[1]==="N"))return!0;return!1}function u4(z,Q,X,Z){if(X!==null&&X.type===b7)return!1;switch(typeof Q){case"function":case"symbol":return!0;case"boolean":{if(Z)return!1;if(X!==null)return!X.acceptsBooleans;else{var J=z.toLowerCase().slice(0,5);return J!=="data-"&&J!=="aria-"}}default:return!1}}function L4(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(u4(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case S4:return!Q;case y4:return Q===!1;case L7:return isNaN(Q);case E7:return isNaN(Q)||Q<1}return!1}function t4(z){return b1.hasOwnProperty(z)?b1[z]:null}function C1(z,Q,X,Z,J,$,H){this.acceptsBooleans=Q===A7||Q===S4||Q===y4,this.attributeName=Z,this.attributeNamespace=J,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=$,this.removeEmptyString=H}var b1={},i7=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];i7.forEach(function(z){b1[z]=new C1(z,b7,!1,z,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(z){var Q=z[0],X=z[1];b1[Q]=new C1(Q,F4,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){b1[z]=new C1(z,A7,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){b1[z]=new C1(z,A7,!1,z,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(z){b1[z]=new C1(z,S4,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){b1[z]=new C1(z,S4,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){b1[z]=new C1(z,y4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){b1[z]=new C1(z,E7,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){b1[z]=new C1(z,L7,!1,z.toLowerCase(),null,!1,!1)});var R7=/[\-\:]([a-z])/g,o7=function(z){return z[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(R7,o7);b1[Q]=new C1(Q,F4,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){b1[z]=new C1(z,F4,!1,z.toLowerCase(),null,!1,!1)});var J6="xlinkHref";b1[J6]=new C1("xlinkHref",F4,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){b1[z]=new C1(z,F4,!1,z.toLowerCase(),null,!0,!0)});var x5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Y6=!1;function T5(z){if(!Y6&&x5.test(z))Y6=!0,q("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(z))}function u7(z,Q,X,Z){if(Z.mustUseProperty){var J=Z.propertyName;return z[J]}else{if(w0(X,Q),Z.sanitizeURL)T5(""+X);var $=Z.attributeName,H=null;if(Z.type===y4){if(z.hasAttribute($)){var B=z.getAttribute($);if(B==="")return!0;if(L4(Q,X,Z,!1))return B;if(B===""+X)return X;return B}}else if(z.hasAttribute($)){if(L4(Q,X,Z,!1))return z.getAttribute($);if(Z.type===S4)return X;H=z.getAttribute($)}if(L4(Q,X,Z,!1))return H===null?X:H;else if(H===""+X)return X;else return H}}function j5(z,Q,X,Z){{if(!o1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var J=z.getAttribute(Q);if(w0(X,Q),J===""+X)return X;return J}}function x1(z,Q,X,Z){var J=t4(Q);if(H4(Q,J,Z))return;if(L4(Q,X,J,Z))X=null;if(Z||J===null){if(o1(Q)){var $=Q;if(X===null)z.removeAttribute($);else w0(X,Q),z.setAttribute($,""+X)}return}var H=J.mustUseProperty;if(H){var B=J.propertyName;if(X===null){var W=J.type;z[B]=W===S4?!1:""}else z[B]=X;return}var{attributeName:F,attributeNamespace:I}=J;if(X===null)z.removeAttribute(F);else{var d=J.type,c;if(d===S4||d===y4&&X===!0)c="";else if(w0(X,F),c=""+X,J.sanitizeURL)T5(c.toString());if(I)z.setAttributeNS(I,F,c);else z.setAttribute(F,c)}}var G4=Symbol.for("react.element"),N4=Symbol.for("react.portal"),t1=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),H0=Symbol.for("react.profiler"),N0=Symbol.for("react.provider"),T=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),K0=Symbol.for("react.suspense"),k0=Symbol.for("react.suspense_list"),m0=Symbol.for("react.memo"),e0=Symbol.for("react.lazy"),d0=Symbol.for("react.scope"),_0=Symbol.for("react.debug_trace_mode"),h0=Symbol.for("react.offscreen"),Z1=Symbol.for("react.legacy_hidden"),j1=Symbol.for("react.cache"),q4=Symbol.for("react.tracing_marker"),a7=Symbol.iterator,O5="@@iterator";function v4(z){if(z===null||typeof z!=="object")return null;var Q=a7&&z[a7]||z[O5];if(typeof Q==="function")return Q;return null}var y1=Object.assign,b6=0,$6,gQ,xQ,jQ,pQ,cQ,dQ;function lQ(){}lQ.__reactDisabledLog=!0;function jZ(){{if(b6===0){$6=console.log,gQ=console.info,xQ=console.warn,jQ=console.error,pQ=console.group,cQ=console.groupCollapsed,dQ=console.groupEnd;var z={configurable:!0,enumerable:!0,value:lQ,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}b6++}}function I3(){{if(b6--,b6===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:y1({},z,{value:$6}),info:y1({},z,{value:gQ}),warn:y1({},z,{value:xQ}),error:y1({},z,{value:jQ}),group:y1({},z,{value:pQ}),groupCollapsed:y1({},z,{value:cQ}),groupEnd:y1({},z,{value:dQ})})}if(b6<0)q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var iQ=Y.ReactCurrentDispatcher,D8;function k5(z,Q,X){{if(D8===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);D8=Z&&Z[1]||""}return`
|
|
24
24
|
`+D8+z}}var z8=!1,Q8;{var kz=typeof WeakMap==="function"?WeakMap:Map;Q8=new kz}function oQ(z,Q){if(!z||z8)return"";{var X=Q8.get(z);if(X!==void 0)return X}var Z;z8=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=iQ.current,iQ.current=null,jZ();try{if(Q){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(J0){Z=J0}Reflect.construct(z,[],H)}else{try{H.call()}catch(J0){Z=J0}z.call(H.prototype)}}else{try{throw Error()}catch(J0){Z=J0}z()}}catch(J0){if(J0&&Z&&typeof J0.stack==="string"){var B=J0.stack.split(`
|
|
25
25
|
`),W=Z.stack.split(`
|
|
26
26
|
`),F=B.length-1,I=W.length-1;while(F>=1&&I>=0&&B[F]!==W[I])I--;for(;F>=1&&I>=0;F--,I--)if(B[F]!==W[I]){if(F!==1||I!==1)do if(F--,I--,I<0||B[F]!==W[I]){var d=`
|
|
27
|
-
`+B[F].replace(" at new "," at ");if(z.displayName&&d.includes("<anonymous>"))d=d.replace("<anonymous>",z.displayName);if(typeof z==="function")Q8.set(z,d);return d}while(F>=1&&I>=0);break}}}finally{z8=!1,iQ.current=$,I3(),Error.prepareStackTrace=J}var c=z?z.displayName||z.name:"",Z0=c?
|
|
27
|
+
`+B[F].replace(" at new "," at ");if(z.displayName&&d.includes("<anonymous>"))d=d.replace("<anonymous>",z.displayName);if(typeof z==="function")Q8.set(z,d);return d}while(F>=1&&I>=0);break}}}finally{z8=!1,iQ.current=$,I3(),Error.prepareStackTrace=J}var c=z?z.displayName||z.name:"",Z0=c?k5(c):"";if(typeof z==="function")Q8.set(z,Z0);return Z0}function pZ(z,Q,X){return oQ(z,!0)}function aQ(z,Q,X){return oQ(z,!1)}function T3(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function X8(z,Q,X){if(z==null)return"";if(typeof z==="function")return oQ(z,T3(z));if(typeof z==="string")return k5(z);switch(z){case K0:return k5("Suspense");case k0:return k5("SuspenseList")}if(typeof z==="object")switch(z.$$typeof){case l:return aQ(z.render);case m0:return X8(z.type,Q,X);case e0:{var Z=z,J=Z._payload,$=Z._init;try{return X8($(J),Q,X)}catch(H){}}}return""}function cZ(z){var Q=z._debugOwner?z._debugOwner.type:null,X=z._debugSource;switch(z.tag){case M:return k5(z.type);case u:return k5("Lazy");case k:return k5("Suspense");case a:return k5("SuspenseList");case K:case A:case j:return aQ(z.type);case C:return aQ(z.type.render);case _:return pZ(z.type);default:return""}}function nQ(z){try{var Q="",X=z;do Q+=cZ(X),X=X.return;while(X);return Q}catch(Z){return`
|
|
28
28
|
Error generating stack: `+Z.message+`
|
|
29
|
-
`+Z.stack}}function Cz(z,Q,X){var Z=z.displayName;if(Z)return Z;var J=Q.displayName||Q.name||"";return J!==""?X+"("+J+")":X}function dZ(z){return z.displayName||"Context"}function n1(z){if(z==null)return null;if(typeof z.tag==="number")q("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;switch(z){case t1:return"Fragment";case N4:return"Portal";case H0:return"Profiler";case y:return"StrictMode";case K0:return"Suspense";case k0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case T:var Q=z;return dZ(Q)+".Consumer";case N0:var X=z;return dZ(X._context)+".Provider";case l:return Cz(z,z.render,"ForwardRef");case m0:var Z=z.displayName||null;if(Z!==null)return Z;return n1(z.type)||"Memo";case e0:{var J=z,$=J._payload,H=J._init;try{return n1(H($))}catch(B){return null}}}return null}function lZ(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function rQ(z){return z.displayName||"Context"}function S1(z){var{tag:Q,type:X}=z;switch(Q){case U0:return"Cache";case m:var Z=X;return rQ(Z)+".Consumer";case g:var J=X;return rQ(J._context)+".Provider";case s:return"DehydratedFragment";case C:return lZ(X,X.render,"ForwardRef");case f:return"Fragment";case M:return X;case P:return"Portal";case b:return"Root";case w:return"Text";case u:return n1(X);case v:if(X===y)return"StrictMode";return"Mode";case z0:return"Offscreen";case V:return"Profiler";case D:return"Scope";case k:return"Suspense";case a:return"SuspenseList";case b0:return"TracingMarker";case _:case K:case p:case A:case x:case j:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var iZ=Y.ReactDebugCurrentFrame,g7=null,m8=!1;function Z8(){{if(g7===null)return null;var z=g7._debugOwner;if(z!==null&&typeof z<"u")return S1(z)}return null}function oZ(){{if(g7===null)return"";return nQ(g7)}}function N7(){iZ.getCurrentStack=null,g7=null,m8=!1}function j4(z){iZ.getCurrentStack=z===null?null:oZ,g7=z,m8=!1}function aZ(){return g7}function _5(z){m8=z}function Y5(z){return""+z}function H6(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return $4(z),z;default:return""}}var k3={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Sz(z,Q){{if(!(k3[Q.type]||Q.onChange||Q.onInput||Q.readOnly||Q.disabled||Q.value==null))q("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");if(!(Q.onChange||Q.readOnly||Q.disabled||Q.checked==null))q("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}}function E8(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function nZ(z){return z._valueTracker}function J8(z){z._valueTracker=null}function rZ(z){var Q="";if(!z)return Q;if(E8(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function tZ(z){var Q=E8(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);$4(z[Q]);var Z=""+z[Q];if(z.hasOwnProperty(Q)||typeof X>"u"||typeof X.get!=="function"||typeof X.set!=="function")return;var{get:J,set:$}=X;Object.defineProperty(z,Q,{configurable:!0,get:function(){return J.call(this)},set:function(B){$4(B),Z=""+B,$.call(this,B)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var H={getValue:function(){return Z},setValue:function(B){$4(B),Z=""+B},stopTracking:function(){J8(z),delete z[Q]}};return H}function A6(z){if(nZ(z))return;z._valueTracker=tZ(z)}function vz(z){if(!z)return!1;var Q=nZ(z);if(!Q)return!0;var X=Q.getValue(),Z=rZ(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function Y8(z){if(z=z||(typeof document<"u"?document:void 0),typeof z>"u")return null;try{return z.activeElement||z.body}catch(Q){return z.body}}var fz=!1,sZ=!1,eZ=!1,zJ=!1;function QJ(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function L(z,Q){var X=z,Z=Q.checked,J=y1({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return J}function E(z,Q){{if(Sz("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!sZ)q("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component",Q.type),sZ=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!fz)q("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component",Q.type),fz=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:H6(Q.value!=null?Q.value:Z),controlled:QJ(Q)}}function X0(z,Q){var X=z,Z=Q.checked;if(Z!=null)x1(X,"checked",Z,!1)}function $0(z,Q){var X=z;{var Z=QJ(Q);if(!X._wrapperState.controlled&&Z&&!zJ)q("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),zJ=!0;if(X._wrapperState.controlled&&!Z&&!eZ)q("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),eZ=!0}X0(z,Q);var J=H6(Q.value),$=Q.type;if(J!=null){if($==="number"){if(J===0&&X.value===""||X.value!=J)X.value=Y5(J)}else if(X.value!==Y5(J))X.value=Y5(J)}else if($==="submit"||$==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))M1(X,Q.type,J);else if(Q.hasOwnProperty("defaultValue"))M1(X,Q.type,H6(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function S0(z,Q,X){var Z=z;if(Q.hasOwnProperty("value")||Q.hasOwnProperty("defaultValue")){var J=Q.type,$=J==="submit"||J==="reset";if($&&(Q.value===void 0||Q.value===null))return;var H=Y5(Z._wrapperState.initialValue);if(!X){if(H!==Z.value)Z.value=H}Z.defaultValue=H}var B=Z.name;if(B!=="")Z.name="";if(Z.defaultChecked=!Z.defaultChecked,Z.defaultChecked=!!Z._wrapperState.initialChecked,B!=="")Z.name=B}function L1(z,Q){var X=z;$0(X,Q),t0(X,Q)}function t0(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;w0(X,"name");var J=Z.querySelectorAll("input[name="+JSON.stringify(""+X)+'][type="radio"]');for(var $=0;$<J.length;$++){var H=J[$];if(H===z||H.form!==z.form)continue;var B=pJ(H);if(!B)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");vz(H),$0(H,B)}}}function M1(z,Q,X){if(Q!=="number"||Y8(z.ownerDocument)!==z){if(X==null)z.defaultValue=Y5(z._wrapperState.initialValue);else if(z.defaultValue!==Y5(X))z.defaultValue=Y5(X)}}var p1=!1,U4=!1,P4=!1;function b4(z,Q){{if(Q.value==null){if(typeof Q.children==="object"&&Q.children!==null)SZ.Children.forEach(Q.children,function(X){if(X==null)return;if(typeof X==="string"||typeof X==="number")return;if(!U4)U4=!0,q("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(Q.dangerouslySetInnerHTML!=null){if(!P4)P4=!0,q("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!p1)q("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),p1=!0}}function
|
|
29
|
+
`+Z.stack}}function Cz(z,Q,X){var Z=z.displayName;if(Z)return Z;var J=Q.displayName||Q.name||"";return J!==""?X+"("+J+")":X}function dZ(z){return z.displayName||"Context"}function n1(z){if(z==null)return null;if(typeof z.tag==="number")q("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;switch(z){case t1:return"Fragment";case N4:return"Portal";case H0:return"Profiler";case y:return"StrictMode";case K0:return"Suspense";case k0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case T:var Q=z;return dZ(Q)+".Consumer";case N0:var X=z;return dZ(X._context)+".Provider";case l:return Cz(z,z.render,"ForwardRef");case m0:var Z=z.displayName||null;if(Z!==null)return Z;return n1(z.type)||"Memo";case e0:{var J=z,$=J._payload,H=J._init;try{return n1(H($))}catch(B){return null}}}return null}function lZ(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function rQ(z){return z.displayName||"Context"}function S1(z){var{tag:Q,type:X}=z;switch(Q){case U0:return"Cache";case m:var Z=X;return rQ(Z)+".Consumer";case g:var J=X;return rQ(J._context)+".Provider";case s:return"DehydratedFragment";case C:return lZ(X,X.render,"ForwardRef");case f:return"Fragment";case M:return X;case P:return"Portal";case b:return"Root";case w:return"Text";case u:return n1(X);case v:if(X===y)return"StrictMode";return"Mode";case z0:return"Offscreen";case V:return"Profiler";case D:return"Scope";case k:return"Suspense";case a:return"SuspenseList";case b0:return"TracingMarker";case _:case K:case p:case A:case x:case j:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var iZ=Y.ReactDebugCurrentFrame,g7=null,m8=!1;function Z8(){{if(g7===null)return null;var z=g7._debugOwner;if(z!==null&&typeof z<"u")return S1(z)}return null}function oZ(){{if(g7===null)return"";return nQ(g7)}}function N7(){iZ.getCurrentStack=null,g7=null,m8=!1}function j4(z){iZ.getCurrentStack=z===null?null:oZ,g7=z,m8=!1}function aZ(){return g7}function _5(z){m8=z}function Y5(z){return""+z}function H6(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return $4(z),z;default:return""}}var k3={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Sz(z,Q){{if(!(k3[Q.type]||Q.onChange||Q.onInput||Q.readOnly||Q.disabled||Q.value==null))q("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");if(!(Q.onChange||Q.readOnly||Q.disabled||Q.checked==null))q("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}}function E8(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function nZ(z){return z._valueTracker}function J8(z){z._valueTracker=null}function rZ(z){var Q="";if(!z)return Q;if(E8(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function tZ(z){var Q=E8(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);$4(z[Q]);var Z=""+z[Q];if(z.hasOwnProperty(Q)||typeof X>"u"||typeof X.get!=="function"||typeof X.set!=="function")return;var{get:J,set:$}=X;Object.defineProperty(z,Q,{configurable:!0,get:function(){return J.call(this)},set:function(B){$4(B),Z=""+B,$.call(this,B)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var H={getValue:function(){return Z},setValue:function(B){$4(B),Z=""+B},stopTracking:function(){J8(z),delete z[Q]}};return H}function A6(z){if(nZ(z))return;z._valueTracker=tZ(z)}function vz(z){if(!z)return!1;var Q=nZ(z);if(!Q)return!0;var X=Q.getValue(),Z=rZ(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function Y8(z){if(z=z||(typeof document<"u"?document:void 0),typeof z>"u")return null;try{return z.activeElement||z.body}catch(Q){return z.body}}var fz=!1,sZ=!1,eZ=!1,zJ=!1;function QJ(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function L(z,Q){var X=z,Z=Q.checked,J=y1({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return J}function E(z,Q){{if(Sz("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!sZ)q("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component",Q.type),sZ=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!fz)q("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component",Q.type),fz=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:H6(Q.value!=null?Q.value:Z),controlled:QJ(Q)}}function X0(z,Q){var X=z,Z=Q.checked;if(Z!=null)x1(X,"checked",Z,!1)}function $0(z,Q){var X=z;{var Z=QJ(Q);if(!X._wrapperState.controlled&&Z&&!zJ)q("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),zJ=!0;if(X._wrapperState.controlled&&!Z&&!eZ)q("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),eZ=!0}X0(z,Q);var J=H6(Q.value),$=Q.type;if(J!=null){if($==="number"){if(J===0&&X.value===""||X.value!=J)X.value=Y5(J)}else if(X.value!==Y5(J))X.value=Y5(J)}else if($==="submit"||$==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))M1(X,Q.type,J);else if(Q.hasOwnProperty("defaultValue"))M1(X,Q.type,H6(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function S0(z,Q,X){var Z=z;if(Q.hasOwnProperty("value")||Q.hasOwnProperty("defaultValue")){var J=Q.type,$=J==="submit"||J==="reset";if($&&(Q.value===void 0||Q.value===null))return;var H=Y5(Z._wrapperState.initialValue);if(!X){if(H!==Z.value)Z.value=H}Z.defaultValue=H}var B=Z.name;if(B!=="")Z.name="";if(Z.defaultChecked=!Z.defaultChecked,Z.defaultChecked=!!Z._wrapperState.initialChecked,B!=="")Z.name=B}function L1(z,Q){var X=z;$0(X,Q),t0(X,Q)}function t0(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;w0(X,"name");var J=Z.querySelectorAll("input[name="+JSON.stringify(""+X)+'][type="radio"]');for(var $=0;$<J.length;$++){var H=J[$];if(H===z||H.form!==z.form)continue;var B=pJ(H);if(!B)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");vz(H),$0(H,B)}}}function M1(z,Q,X){if(Q!=="number"||Y8(z.ownerDocument)!==z){if(X==null)z.defaultValue=Y5(z._wrapperState.initialValue);else if(z.defaultValue!==Y5(X))z.defaultValue=Y5(X)}}var p1=!1,U4=!1,P4=!1;function b4(z,Q){{if(Q.value==null){if(typeof Q.children==="object"&&Q.children!==null)SZ.Children.forEach(Q.children,function(X){if(X==null)return;if(typeof X==="string"||typeof X==="number")return;if(!U4)U4=!0,q("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(Q.dangerouslySetInnerHTML!=null){if(!P4)P4=!0,q("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!p1)q("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),p1=!0}}function V4(z,Q){if(Q.value!=null)z.setAttribute("value",Y5(H6(Q.value)))}var l4=Array.isArray;function z4(z){return l4(z)}var u8=!1;function hz(){var z=Z8();if(z)return`
|
|
30
30
|
|
|
31
|
-
Check the render method of \``+z+"`.";return""}var tQ=["value","defaultValue"];function C3(z){{Sz("select",z);for(var Q=0;Q<tQ.length;Q++){var X=tQ[Q];if(z[X]==null)continue;var Z=z4(z[X]);if(z.multiple&&!Z)q("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,hz());else if(!z.multiple&&Z)q("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,hz())}}}function I6(z,Q,X,Z){var J=z.options;if(Q){var $=X,H={};for(var B=0;B<$.length;B++)H["$"+$[B]]=!0;for(var W=0;W<J.length;W++){var F=H.hasOwnProperty("$"+J[W].value);if(J[W].selected!==F)J[W].selected=F;if(F&&Z)J[W].defaultSelected=!0}}else{var I=Y5(H6(X)),d=null;for(var c=0;c<J.length;c++){if(J[c].value===I){if(J[c].selected=!0,Z)J[c].defaultSelected=!0;return}if(d===null&&!J[c].disabled)d=J[c]}if(d!==null)d.selected=!0}}function sQ(z,Q){return y1({},Q,{value:void 0})}function eQ(z,Q){var X=z;if(C3(Q),X._wrapperState={wasMultiple:!!Q.multiple},Q.value!==void 0&&Q.defaultValue!==void 0&&!u8)q("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),u8=!0}function S3(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)I6(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)I6(X,!!Q.multiple,Q.defaultValue,!0)}function NO(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var J=Q.value;if(J!=null)I6(X,!!Q.multiple,J,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)I6(X,!!Q.multiple,Q.defaultValue,!0);else I6(X,!!Q.multiple,Q.multiple?[]:"",!1)}function MO(z,Q){var X=z,Z=Q.value;if(Z!=null)I6(X,!!Q.multiple,Z,!1)}var G2=!1;function v3(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=y1({},Q,{value:void 0,defaultValue:void 0,children:Y5(X._wrapperState.initialValue)});return Z}function q2(z,Q){var X=z;if(Sz("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!G2)q("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component"),G2=!0;var Z=Q.value;if(Z==null){var{children:J,defaultValue:$}=Q;if(J!=null){q("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if($!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(z4(J)){if(J.length>1)throw Error("<textarea> can only have at most one child.");J=J[0]}$=J}}if($==null)$="";Z=$}X._wrapperState={initialValue:H6(Z)}}function B2(z,Q){var X=z,Z=H6(Q.value),J=H6(Q.defaultValue);if(Z!=null){var $=Y5(Z);if($!==X.value)X.value=$;if(Q.defaultValue==null&&X.defaultValue!==$)X.defaultValue=$}if(J!=null)X.defaultValue=Y5(J)}function U2(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function wO(z,Q){B2(z,Q)}var T6="http://www.w3.org/1999/xhtml",FO="http://www.w3.org/1998/Math/MathML",f3="http://www.w3.org/2000/svg";function h3(z){switch(z){case"svg":return f3;case"math":return FO;default:return T6}}function y3(z,Q){if(z==null||z===T6)return h3(Q);if(z===f3&&Q==="foreignObject")return T6;return z}var PO=function(z){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(Q,X,Z,J){MSApp.execUnsafeLocalFunction(function(){return z(Q,X,Z,J)})};else return z},XJ,W2=PO(function(z,Q){if(z.namespaceURI===f3){if(!("innerHTML"in z)){XJ=XJ||document.createElement("div"),XJ.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=XJ.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),$5=1,k6=3,z7=8,C6=9,V3=11,ZJ=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===k6){X.nodeValue=Q;return}}z.textContent=Q},bO={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},zX={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};function AO(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var IO=["Webkit","ms","Moz","O"];Object.keys(zX).forEach(function(z){IO.forEach(function(Q){zX[AO(Q,z)]=zX[z]})});function D3(z,Q,X){var Z=Q==null||typeof Q==="boolean"||Q==="";if(Z)return"";if(!X&&typeof Q==="number"&&Q!==0&&!(zX.hasOwnProperty(z)&&zX[z]))return Q+"px";return i1(Q,z),(""+Q).trim()}var TO=/([A-Z])/g,kO=/^ms-/;function CO(z){return z.replace(TO,"-$1").toLowerCase().replace(kO,"-ms-")}var K2=function(){};{var SO=/^(?:webkit|moz|o)[A-Z]/,vO=/^-ms-/,fO=/-(.)/g,O2=/;\s*$/,yz={},m3={},_2=!1,L2=!1,hO=function(z){return z.replace(fO,function(Q,X){return X.toUpperCase()})},yO=function(z){if(yz.hasOwnProperty(z)&&yz[z])return;yz[z]=!0,q("Unsupported style property %s. Did you mean %s?",z,hO(z.replace(vO,"ms-")))},VO=function(z){if(yz.hasOwnProperty(z)&&yz[z])return;yz[z]=!0,q("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},DO=function(z,Q){if(m3.hasOwnProperty(Q)&&m3[Q])return;m3[Q]=!0,q(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,z,Q.replace(O2,""))},mO=function(z,Q){if(_2)return;_2=!0,q("`NaN` is an invalid value for the `%s` css style property.",z)},EO=function(z,Q){if(L2)return;L2=!0,q("`Infinity` is an invalid value for the `%s` css style property.",z)};K2=function(z,Q){if(z.indexOf("-")>-1)yO(z);else if(SO.test(z))VO(z);else if(O2.test(Q))DO(z,Q);if(typeof Q==="number"){if(isNaN(Q))mO(z,Q);else if(!isFinite(Q))EO(z,Q)}}}var uO=K2;function gO(z){{var Q="",X="";for(var Z in z){if(!z.hasOwnProperty(Z))continue;var J=z[Z];if(J!=null){var $=Z.indexOf("--")===0;Q+=X+($?Z:CO(Z))+":",Q+=D3(Z,J,$),X=";"}}return Q||null}}function R2(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var J=Z.indexOf("--")===0;if(!J)uO(Z,Q[Z]);var $=D3(Z,Q[Z],J);if(Z==="float")Z="cssFloat";if(J)X.setProperty(Z,$);else X[Z]=$}}function xO(z){return z==null||typeof z==="boolean"||z===""}function N2(z){var Q={};for(var X in z){var Z=bO[X]||[X];for(var J=0;J<Z.length;J++)Q[Z[J]]=X}return Q}function jO(z,Q){{if(!Q)return;var X=N2(z),Z=N2(Q),J={};for(var $ in X){var H=X[$],B=Z[$];if(B&&H!==B){var W=H+","+B;if(J[W])continue;J[W]=!0,q("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",xO(z[H])?"Removing":"Updating",H,B)}}}}var pO={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},cO=y1({menuitem:!0},pO),dO="__html";function E3(z,Q){if(!Q)return;if(cO[z]){if(Q.children!=null||Q.dangerouslySetInnerHTML!=null)throw Error(z+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(Q.dangerouslySetInnerHTML!=null){if(Q.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof Q.dangerouslySetInnerHTML!=="object"||!(dO in Q.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!Q.suppressContentEditableWarning&&Q.contentEditable&&Q.children!=null)q("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");if(Q.style!=null&&typeof Q.style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}function g8(z,Q){if(z.indexOf("-")===-1)return typeof Q.is==="string";switch(z){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 JJ={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},M2={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Vz={},lO=new RegExp("^(aria)-["+e4+"]*$"),iO=new RegExp("^(aria)[A-Z]["+e4+"]*$");function oO(z,Q){{if(h1.call(Vz,Q)&&Vz[Q])return!0;if(iO.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=M2.hasOwnProperty(X)?X:null;if(Z==null)return q("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),Vz[Q]=!0,!0;if(Q!==Z)return q("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),Vz[Q]=!0,!0}if(lO.test(Q)){var J=Q.toLowerCase(),$=M2.hasOwnProperty(J)?J:null;if($==null)return Vz[Q]=!0,!1;if(Q!==$)return q("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,$),Vz[Q]=!0,!0}}return!0}function aO(z,Q){{var X=[];for(var Z in Q){var J=oO(z,Z);if(!J)X.push(Z)}var $=X.map(function(H){return"`"+H+"`"}).join(", ");if(X.length===1)q("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z);else if(X.length>1)q("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z)}}function nO(z,Q){if(g8(z,Q))return;aO(z,Q)}var w2=!1;function rO(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!w2)if(w2=!0,z==="select"&&Q.multiple)q("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",z);else q("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",z)}}var F2=function(){};{var n7={},P2=/^on./,tO=/^on[^A-Z]/,sO=new RegExp("^(aria)-["+e4+"]*$"),eO=new RegExp("^(aria)[A-Z]["+e4+"]*$");F2=function(z,Q,X,Z){if(h1.call(n7,Q)&&n7[Q])return!0;var J=Q.toLowerCase();if(J==="onfocusin"||J==="onfocusout")return q("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),n7[Q]=!0,!0;if(Z!=null){var{registrationNameDependencies:$,possibleRegistrationNames:H}=Z;if($.hasOwnProperty(Q))return!0;var B=H.hasOwnProperty(J)?H[J]:null;if(B!=null)return q("Invalid event handler property `%s`. Did you mean `%s`?",Q,B),n7[Q]=!0,!0;if(P2.test(Q))return q("Unknown event handler property `%s`. It will be ignored.",Q),n7[Q]=!0,!0}else if(P2.test(Q)){if(tO.test(Q))q("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return n7[Q]=!0,!0}if(sO.test(Q)||eO.test(Q))return!0;if(J==="innerhtml")return q("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),n7[Q]=!0,!0;if(J==="aria")return q("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),n7[Q]=!0,!0;if(J==="is"&&X!==null&&X!==void 0&&typeof X!=="string")return q("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof X),n7[Q]=!0,!0;if(typeof X==="number"&&isNaN(X))return q("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Q),n7[Q]=!0,!0;var W=t4(Q),F=W!==null&&W.type===b7;if(JJ.hasOwnProperty(J)){var I=JJ[J];if(I!==Q)return q("Invalid DOM property `%s`. Did you mean `%s`?",Q,I),n7[Q]=!0,!0}else if(!F&&Q!==J)return q("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",Q,J),n7[Q]=!0,!0;if(typeof X==="boolean"&&E4(Q,X,W,!1)){if(X)q('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',X,Q,Q,X,Q);else q('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',X,Q,Q,X,Q,Q,Q);return n7[Q]=!0,!0}if(F)return!0;if(E4(Q,X,W,!1))return n7[Q]=!0,!1;if((X==="false"||X==="true")&&W!==null&&W.type===S4)return q("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",X,Q,X==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',Q,X),n7[Q]=!0,!0;return!0}}var z_=function(z,Q,X){{var Z=[];for(var J in Q){var $=F2(z,J,Q[J],X);if(!$)Z.push(J)}var H=Z.map(function(B){return"`"+B+"`"}).join(", ");if(Z.length===1)q("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",H,z);else if(Z.length>1)q("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",H,z)}};function Q_(z,Q,X){if(g8(z,Q))return;z_(z,Q,X)}var b2=1,u3=2,QX=4,X_=b2|u3|QX,XX=null;function Z_(z){if(XX!==null)q("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");XX=z}function J_(){if(XX===null)q("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");XX=null}function Y_(z){return z===XX}function g3(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===k6?Q.parentNode:Q}var x3=null,Dz=null,mz=null;function A2(z){var Q=K8(z);if(!Q)return;if(typeof x3!=="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var X=Q.stateNode;if(X){var Z=pJ(X);x3(Q.stateNode,Q.type,Z)}}function $_(z){x3=z}function I2(z){if(Dz)if(mz)mz.push(z);else mz=[z];else Dz=z}function H_(){return Dz!==null||mz!==null}function T2(){if(!Dz)return;var z=Dz,Q=mz;if(Dz=null,mz=null,A2(z),Q)for(var X=0;X<Q.length;X++)A2(Q[X])}var k2=function(z,Q){return z(Q)},C2=function(){},j3=!1;function G_(){var z=H_();if(z)C2(),T2()}function S2(z,Q,X){if(j3)return z(Q,X);j3=!0;try{return k2(z,Q,X)}finally{j3=!1,G_()}}function q_(z,Q,X){k2=z,C2=X}function B_(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function U_(z,Q,X){switch(z){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(X.disabled&&B_(Q));default:return!1}}function ZX(z,Q){var X=z.stateNode;if(X===null)return null;var Z=pJ(X);if(Z===null)return null;var J=Z[Q];if(U_(Q,z.type,Z))return null;if(J&&typeof J!=="function")throw Error("Expected `"+Q+"` listener to be a function, instead got a value of `"+typeof J+"` type.");return J}var p3=!1;if(Y1)try{var JX={};Object.defineProperty(JX,"passive",{get:function(){p3=!0}}),window.addEventListener("test",JX,JX),window.removeEventListener("test",JX,JX)}catch(z){p3=!1}function v2(z,Q,X,Z,J,$,H,B,W){var F=Array.prototype.slice.call(arguments,3);try{Q.apply(X,F)}catch(I){this.onError(I)}}var f2=v2;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var c3=document.createElement("react");f2=function(Q,X,Z,J,$,H,B,W,F){if(typeof document>"u"||document===null)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var I=document.createEvent("Event"),d=!1,c=!0,Z0=window.event,J0=Object.getOwnPropertyDescriptor(window,"event");function Y0(){if(c3.removeEventListener(G0,G1,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=Z0}var u0=Array.prototype.slice.call(arguments,3);function G1(){d=!0,Y0(),X.apply(Z,u0),c=!1}var z1,u1=!1,g1=!1;function r(t){if(z1=t.error,u1=!0,z1===null&&t.colno===0&&t.lineno===0)g1=!0;if(t.defaultPrevented){if(z1!=null&&typeof z1==="object")try{z1._suppressLogging=!0}catch(P0){}}}var G0="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",r),c3.addEventListener(G0,G1,!1),I.initEvent(G0,!1,!1),c3.dispatchEvent(I),J0)Object.defineProperty(window,"event",J0);if(d&&c){if(!u1)z1=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(g1)z1=Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");this.onError(z1)}if(window.removeEventListener("error",r),!d)return Y0(),v2.apply(this,arguments)}}var W_=f2,Ez=!1,YJ=null,$J=!1,d3=null,K_={onError:function(z){Ez=!0,YJ=z}};function l3(z,Q,X,Z,J,$,H,B,W){Ez=!1,YJ=null,W_.apply(K_,arguments)}function O_(z,Q,X,Z,J,$,H,B,W){if(l3.apply(this,arguments),Ez){var F=i3();if(!$J)$J=!0,d3=F}}function __(){if($J){var z=d3;throw $J=!1,d3=null,z}}function L_(){return Ez}function i3(){if(Ez){var z=YJ;return Ez=!1,YJ=null,z}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function uz(z){return z._reactInternals}function R_(z){return z._reactInternals!==void 0}function N_(z,Q){z._reactInternals=Q}var _1=0,gz=1,Q7=2,a1=4,x8=16,YX=32,o3=64,Q4=128,S6=256,$8=512,j8=1024,j5=2048,v6=4096,p8=8192,HJ=16384,M_=j5|a1|o3|$8|j8|HJ,w_=32767,$X=32768,r7=65536,a3=131072,h2=1048576,n3=2097152,c8=4194304,r3=8388608,f6=16777216,GJ=33554432,t3=a1|j8|0,s3=Q7|a1|x8|YX|$8|v6|p8,HX=a1|o3|$8|p8,xz=j5|x8,h6=c8|r3|n3,F_=Y.ReactCurrentOwner;function d8(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(Q7|v6))!==_1)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===b)return X;return null}function y2(z){if(z.tag===k){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null)Q=X.memoizedState}if(Q!==null)return Q.dehydrated}return null}function V2(z){return z.tag===b?z.stateNode.containerInfo:null}function P_(z){return d8(z)===z}function b_(z){{var Q=F_.current;if(Q!==null&&Q.tag===_){var X=Q,Z=X.stateNode;if(!Z._warnedAboutRefsInRender)q("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",S1(X)||"A component");Z._warnedAboutRefsInRender=!0}}var J=uz(z);if(!J)return!1;return d8(J)===J}function D2(z){if(d8(z)!==z)throw Error("Unable to find node on an unmounted component.")}function m2(z){var Q=z.alternate;if(!Q){var X=d8(z);if(X===null)throw Error("Unable to find node on an unmounted component.");if(X!==z)return null;return z}var Z=z,J=Q;while(!0){var $=Z.return;if($===null)break;var H=$.alternate;if(H===null){var B=$.return;if(B!==null){Z=J=B;continue}break}if($.child===H.child){var W=$.child;while(W){if(W===Z)return D2($),z;if(W===J)return D2($),Q;W=W.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==J.return)Z=$,J=H;else{var F=!1,I=$.child;while(I){if(I===Z){F=!0,Z=$,J=H;break}if(I===J){F=!0,J=$,Z=H;break}I=I.sibling}if(!F){I=H.child;while(I){if(I===Z){F=!0,Z=H,J=$;break}if(I===J){F=!0,J=H,Z=$;break}I=I.sibling}if(!F)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==J)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==b)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function E2(z){var Q=m2(z);return Q!==null?u2(Q):null}function u2(z){if(z.tag===M||z.tag===w)return z;var Q=z.child;while(Q!==null){var X=u2(Q);if(X!==null)return X;Q=Q.sibling}return null}function A_(z){var Q=m2(z);return Q!==null?g2(Q):null}function g2(z){if(z.tag===M||z.tag===w)return z;var Q=z.child;while(Q!==null){if(Q.tag!==P){var X=g2(Q);if(X!==null)return X}Q=Q.sibling}return null}var x2=_4.unstable_scheduleCallback,I_=_4.unstable_cancelCallback,T_=_4.unstable_shouldYield,k_=_4.unstable_requestPaint,M7=_4.unstable_now,C_=_4.unstable_getCurrentPriorityLevel,qJ=_4.unstable_ImmediatePriority,e3=_4.unstable_UserBlockingPriority,l8=_4.unstable_NormalPriority,S_=_4.unstable_LowPriority,z$=_4.unstable_IdlePriority,v_=_4.unstable_yieldValue,f_=_4.unstable_setDisableYieldValue,i8=null,I7=null,x0=null,G6=!1,p5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function h_(z){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var Q=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Q.isDisabled)return!0;if(!Q.supportsFiber)return q("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{if(T0)z=y1({},z,{getLaneLabelMap:u_,injectProfilingHooks:E_});i8=Q.inject(z),I7=Q}catch(X){q("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function y_(z,Q){if(I7&&typeof I7.onScheduleFiberRoot==="function")try{I7.onScheduleFiberRoot(i8,z,Q)}catch(X){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",X)}}function V_(z,Q){if(I7&&typeof I7.onCommitFiberRoot==="function")try{var X=(z.current.flags&Q4)===Q4;if(v0){var Z;switch(Q){case N5:Z=qJ;break;case V6:Z=e3;break;case D6:Z=l8;break;case RJ:Z=z$;break;default:Z=l8;break}I7.onCommitFiberRoot(i8,z,Z,X)}else I7.onCommitFiberRoot(i8,z,void 0,X)}catch(J){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",J)}}function D_(z){if(I7&&typeof I7.onPostCommitFiberRoot==="function")try{I7.onPostCommitFiberRoot(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}function m_(z){if(I7&&typeof I7.onCommitFiberUnmount==="function")try{I7.onCommitFiberUnmount(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}function w7(z){{if(typeof v_==="function")f_(z),U(z);if(I7&&typeof I7.setStrictMode==="function")try{I7.setStrictMode(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}}function E_(z){x0=z}function u_(){{var z=new Map,Q=1;for(var X=0;X<X$;X++){var Z=JL(Q);z.set(Q,Z),Q*=2}return z}}function g_(z){if(x0!==null&&typeof x0.markCommitStarted==="function")x0.markCommitStarted(z)}function j2(){if(x0!==null&&typeof x0.markCommitStopped==="function")x0.markCommitStopped()}function GX(z){if(x0!==null&&typeof x0.markComponentRenderStarted==="function")x0.markComponentRenderStarted(z)}function jz(){if(x0!==null&&typeof x0.markComponentRenderStopped==="function")x0.markComponentRenderStopped()}function x_(z){if(x0!==null&&typeof x0.markComponentPassiveEffectMountStarted==="function")x0.markComponentPassiveEffectMountStarted(z)}function j_(){if(x0!==null&&typeof x0.markComponentPassiveEffectMountStopped==="function")x0.markComponentPassiveEffectMountStopped()}function p_(z){if(x0!==null&&typeof x0.markComponentPassiveEffectUnmountStarted==="function")x0.markComponentPassiveEffectUnmountStarted(z)}function c_(){if(x0!==null&&typeof x0.markComponentPassiveEffectUnmountStopped==="function")x0.markComponentPassiveEffectUnmountStopped()}function d_(z){if(x0!==null&&typeof x0.markComponentLayoutEffectMountStarted==="function")x0.markComponentLayoutEffectMountStarted(z)}function l_(){if(x0!==null&&typeof x0.markComponentLayoutEffectMountStopped==="function")x0.markComponentLayoutEffectMountStopped()}function p2(z){if(x0!==null&&typeof x0.markComponentLayoutEffectUnmountStarted==="function")x0.markComponentLayoutEffectUnmountStarted(z)}function c2(){if(x0!==null&&typeof x0.markComponentLayoutEffectUnmountStopped==="function")x0.markComponentLayoutEffectUnmountStopped()}function i_(z,Q,X){if(x0!==null&&typeof x0.markComponentErrored==="function")x0.markComponentErrored(z,Q,X)}function o_(z,Q,X){if(x0!==null&&typeof x0.markComponentSuspended==="function")x0.markComponentSuspended(z,Q,X)}function a_(z){if(x0!==null&&typeof x0.markLayoutEffectsStarted==="function")x0.markLayoutEffectsStarted(z)}function n_(){if(x0!==null&&typeof x0.markLayoutEffectsStopped==="function")x0.markLayoutEffectsStopped()}function r_(z){if(x0!==null&&typeof x0.markPassiveEffectsStarted==="function")x0.markPassiveEffectsStarted(z)}function t_(){if(x0!==null&&typeof x0.markPassiveEffectsStopped==="function")x0.markPassiveEffectsStopped()}function d2(z){if(x0!==null&&typeof x0.markRenderStarted==="function")x0.markRenderStarted(z)}function s_(){if(x0!==null&&typeof x0.markRenderYielded==="function")x0.markRenderYielded()}function l2(){if(x0!==null&&typeof x0.markRenderStopped==="function")x0.markRenderStopped()}function e_(z){if(x0!==null&&typeof x0.markRenderScheduled==="function")x0.markRenderScheduled(z)}function zL(z,Q){if(x0!==null&&typeof x0.markForceUpdateScheduled==="function")x0.markForceUpdateScheduled(z,Q)}function Q$(z,Q){if(x0!==null&&typeof x0.markStateUpdateScheduled==="function")x0.markStateUpdateScheduled(z,Q)}var K1=0,c1=1,W4=2,i4=8,q6=16,i2=Math.clz32?Math.clz32:ZL,QL=Math.log,XL=Math.LN2;function ZL(z){var Q=z>>>0;if(Q===0)return 32;return 31-(QL(Q)/XL|0)|0}var X$=31,M0=0,F7=0,w1=1,pz=2,y6=4,o8=8,B6=16,qX=32,cz=4194240,BX=64,Z$=128,J$=256,Y$=512,$$=1024,H$=2048,G$=4096,q$=8192,B$=16384,U$=32768,W$=65536,K$=131072,O$=262144,_$=524288,L$=1048576,R$=2097152,BJ=130023424,dz=4194304,N$=8388608,M$=16777216,w$=33554432,F$=67108864,o2=dz,UX=134217728,a2=268435455,WX=268435456,a8=536870912,L5=1073741824;function JL(z){{if(z&w1)return"Sync";if(z&pz)return"InputContinuousHydration";if(z&y6)return"InputContinuous";if(z&o8)return"DefaultHydration";if(z&B6)return"Default";if(z&qX)return"TransitionHydration";if(z&cz)return"Transition";if(z&BJ)return"Retry";if(z&UX)return"SelectiveHydration";if(z&WX)return"IdleHydration";if(z&a8)return"Idle";if(z&L5)return"Offscreen"}}var f4=-1,UJ=BX,WJ=dz;function KX(z){switch(n8(z)){case w1:return w1;case pz:return pz;case y6:return y6;case o8:return o8;case B6:return B6;case qX:return qX;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:return z&cz;case dz:case N$:case M$:case w$:case F$:return z&BJ;case UX:return UX;case WX:return WX;case a8:return a8;case L5:return L5;default:return q("Should have found matching lanes. This is a bug in React."),z}}function KJ(z,Q){var X=z.pendingLanes;if(X===M0)return M0;var Z=M0,J=z.suspendedLanes,$=z.pingedLanes,H=X&a2;if(H!==M0){var B=H&~J;if(B!==M0)Z=KX(B);else{var W=H&$;if(W!==M0)Z=KX(W)}}else{var F=X&~J;if(F!==M0)Z=KX(F);else if($!==M0)Z=KX($)}if(Z===M0)return M0;if(Q!==M0&&Q!==Z&&(Q&J)===M0){var I=n8(Z),d=n8(Q);if(I>=d||I===B6&&(d&cz)!==M0)return Q}if((Z&y6)!==M0)Z|=X&B6;var c=z.entangledLanes;if(c!==M0){var Z0=z.entanglements,J0=Z&c;while(J0>0){var Y0=r8(J0),u0=1<<Y0;Z|=Z0[Y0],J0&=~u0}}return Z}function YL(z,Q){var X=z.eventTimes,Z=f4;while(Q>0){var J=r8(Q),$=1<<J,H=X[J];if(H>Z)Z=H;Q&=~$}return Z}function $L(z,Q){switch(z){case w1:case pz:case y6:return Q+250;case o8:case B6:case qX:case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:return Q+5000;case dz:case N$:case M$:case w$:case F$:return f4;case UX:case WX:case a8:case L5:return f4;default:return q("Should have found matching lanes. This is a bug in React."),f4}}function HL(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:J,expirationTimes:$}=z,H=X;while(H>0){var B=r8(H),W=1<<B,F=$[B];if(F===f4){if((W&Z)===M0||(W&J)!==M0)$[B]=$L(W,Q)}else if(F<=Q)z.expiredLanes|=W;H&=~W}}function GL(z){return KX(z.pendingLanes)}function P$(z){var Q=z.pendingLanes&~L5;if(Q!==M0)return Q;if(Q&L5)return L5;return M0}function qL(z){return(z&w1)!==M0}function b$(z){return(z&a2)!==M0}function n2(z){return(z&BJ)===z}function BL(z){var Q=w1|y6|B6;return(z&Q)===M0}function UL(z){return(z&cz)===z}function OJ(z,Q){var X=pz|y6|o8|B6;return(Q&X)!==M0}function WL(z,Q){return(Q&z.expiredLanes)!==M0}function r2(z){return(z&cz)!==M0}function t2(){var z=UJ;if(UJ<<=1,(UJ&cz)===M0)UJ=BX;return z}function KL(){var z=WJ;if(WJ<<=1,(WJ&BJ)===M0)WJ=dz;return z}function n8(z){return z&-z}function OX(z){return n8(z)}function r8(z){return 31-i2(z)}function A$(z){return r8(z)}function R5(z,Q){return(z&Q)!==M0}function lz(z,Q){return(z&Q)===Q}function v1(z,Q){return z|Q}function _J(z,Q){return z&~Q}function s2(z,Q){return z&Q}function LJ(z){return z}function OL(z,Q){return z!==F7&&z<Q?z:Q}function I$(z){var Q=[];for(var X=0;X<X$;X++)Q.push(z);return Q}function _X(z,Q,X){if(z.pendingLanes|=Q,Q!==a8)z.suspendedLanes=M0,z.pingedLanes=M0;var Z=z.eventTimes,J=A$(Q);Z[J]=X}function _L(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var J=r8(Z),$=1<<J;X[J]=f4,Z&=~$}}function e2(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function LL(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=M0,z.pingedLanes=M0,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:J,expirationTimes:$}=z,H=X;while(H>0){var B=r8(H),W=1<<B;Z[B]=M0,J[B]=f4,$[B]=f4,H&=~W}}function T$(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,J=X;while(J){var $=r8(J),H=1<<$;if(H&Q|Z[$]&Q)Z[$]|=Q;J&=~H}}function RL(z,Q){var X=n8(Q),Z;switch(X){case y6:Z=pz;break;case B6:Z=o8;break;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:case dz:case N$:case M$:case w$:case F$:Z=qX;break;case a8:Z=WX;break;default:Z=F7;break}if((Z&(z.suspendedLanes|Q))!==F7)return F7;return Z}function zq(z,Q,X){if(!p5)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var J=A$(X),$=1<<J,H=Z[J];H.add(Q),X&=~$}}function Qq(z,Q){if(!p5)return;var{pendingUpdatersLaneMap:X,memoizedUpdaters:Z}=z;while(Q>0){var J=A$(Q),$=1<<J,H=X[J];if(H.size>0)H.forEach(function(B){var W=B.alternate;if(W===null||!Z.has(W))Z.add(B)}),H.clear();Q&=~$}}function Xq(z,Q){return null}var N5=w1,V6=y6,D6=B6,RJ=a8,LX=F7;function c5(){return LX}function P7(z){LX=z}function NL(z,Q){var X=LX;try{return LX=z,Q()}finally{LX=X}}function ML(z,Q){return z!==0&&z<Q?z:Q}function wL(z,Q){return z===0||z>Q?z:Q}function k$(z,Q){return z!==0&&z<Q}function Zq(z){var Q=n8(z);if(!k$(N5,Q))return N5;if(!k$(V6,Q))return V6;if(b$(Q))return D6;return RJ}function NJ(z){var Q=z.current.memoizedState;return Q.isDehydrated}var Jq;function FL(z){Jq=z}function PL(z){Jq(z)}var C$;function bL(z){C$=z}var Yq;function AL(z){Yq=z}var $q;function IL(z){$q=z}var Hq;function TL(z){Hq=z}var S$=!1,MJ=[],H8=null,G8=null,q8=null,RX=new Map,NX=new Map,B8=[],kL=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function CL(z){return kL.indexOf(z)>-1}function SL(z,Q,X,Z,J){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:J,targetContainers:[Z]}}function Gq(z,Q){switch(z){case"focusin":case"focusout":H8=null;break;case"dragenter":case"dragleave":G8=null;break;case"mouseover":case"mouseout":q8=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;RX.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;NX.delete(Z);break}}}function MX(z,Q,X,Z,J,$){if(z===null||z.nativeEvent!==$){var H=SL(Q,X,Z,J,$);if(Q!==null){var B=K8(Q);if(B!==null)C$(B)}return H}z.eventSystemFlags|=Z;var W=z.targetContainers;if(J!==null&&W.indexOf(J)===-1)W.push(J);return z}function vL(z,Q,X,Z,J){switch(Q){case"focusin":{var $=J;return H8=MX(H8,z,Q,X,Z,$),!0}case"dragenter":{var H=J;return G8=MX(G8,z,Q,X,Z,H),!0}case"mouseover":{var B=J;return q8=MX(q8,z,Q,X,Z,B),!0}case"pointerover":{var W=J,F=W.pointerId;return RX.set(F,MX(RX.get(F)||null,z,Q,X,Z,W)),!0}case"gotpointercapture":{var I=J,d=I.pointerId;return NX.set(d,MX(NX.get(d)||null,z,Q,X,Z,I)),!0}}return!1}function qq(z){var Q=e8(z.target);if(Q!==null){var X=d8(Q);if(X!==null){var Z=X.tag;if(Z===k){var J=y2(X);if(J!==null){z.blockedOn=J,Hq(z.priority,function(){Yq(X)});return}}else if(Z===b){var $=X.stateNode;if(NJ($)){z.blockedOn=V2(X);return}}}}z.blockedOn=null}function fL(z){var Q=$q(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<B8.length;Z++)if(!k$(Q,B8[Z].priority))break;if(B8.splice(Z,0,X),Z===0)qq(X)}function wJ(z){if(z.blockedOn!==null)return!1;var Q=z.targetContainers;while(Q.length>0){var X=Q[0],Z=h$(z.domEventName,z.eventSystemFlags,X,z.nativeEvent);if(Z===null){var J=z.nativeEvent,$=new J.constructor(J.type,J);Z_($),J.target.dispatchEvent($),J_()}else{var H=K8(Z);if(H!==null)C$(H);return z.blockedOn=Z,!1}Q.shift()}return!0}function Bq(z,Q,X){if(wJ(z))X.delete(Q)}function hL(){if(S$=!1,H8!==null&&wJ(H8))H8=null;if(G8!==null&&wJ(G8))G8=null;if(q8!==null&&wJ(q8))q8=null;RX.forEach(Bq),NX.forEach(Bq)}function wX(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!S$)S$=!0,_4.unstable_scheduleCallback(_4.unstable_NormalPriority,hL)}}function FX(z){if(MJ.length>0){wX(MJ[0],z);for(var Q=1;Q<MJ.length;Q++){var X=MJ[Q];if(X.blockedOn===z)X.blockedOn=null}}if(H8!==null)wX(H8,z);if(G8!==null)wX(G8,z);if(q8!==null)wX(q8,z);var Z=function(B){return wX(B,z)};RX.forEach(Z),NX.forEach(Z);for(var J=0;J<B8.length;J++){var $=B8[J];if($.blockedOn===z)$.blockedOn=null}while(B8.length>0){var H=B8[0];if(H.blockedOn!==null)break;else if(qq(H),H.blockedOn===null)B8.shift()}}var iz=Y.ReactCurrentBatchConfig,v$=!0;function Uq(z){v$=!!z}function yL(){return v$}function VL(z,Q,X){var Z=Wq(Q),J;switch(Z){case N5:J=DL;break;case V6:J=mL;break;case D6:default:J=f$;break}return J.bind(null,Q,X,z)}function DL(z,Q,X,Z){var J=c5(),$=iz.transition;iz.transition=null;try{P7(N5),f$(z,Q,X,Z)}finally{P7(J),iz.transition=$}}function mL(z,Q,X,Z){var J=c5(),$=iz.transition;iz.transition=null;try{P7(V6),f$(z,Q,X,Z)}finally{P7(J),iz.transition=$}}function f$(z,Q,X,Z){if(!v$)return;EL(z,Q,X,Z)}function EL(z,Q,X,Z){var J=h$(z,Q,X,Z);if(J===null){i$(z,Q,Z,FJ,X),Gq(z,Z);return}if(vL(J,z,Q,X,Z)){Z.stopPropagation();return}if(Gq(z,Z),Q&QX&&CL(z)){while(J!==null){var $=K8(J);if($!==null)PL($);var H=h$(z,Q,X,Z);if(H===null)i$(z,Q,Z,FJ,X);if(H===J)break;J=H}if(J!==null)Z.stopPropagation();return}i$(z,Q,Z,null,X)}var FJ=null;function h$(z,Q,X,Z){FJ=null;var J=g3(Z),$=e8(J);if($!==null){var H=d8($);if(H===null)$=null;else{var B=H.tag;if(B===k){var W=y2(H);if(W!==null)return W;$=null}else if(B===b){var F=H.stateNode;if(NJ(F))return V2(H);$=null}else if(H!==$)$=null}}return FJ=$,null}function Wq(z){switch(z){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return N5;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return V6;case"message":{var Q=C_();switch(Q){case qJ:return N5;case e3:return V6;case l8:case S_:return D6;case z$:return RJ;default:return D6}}default:return D6}}function uL(z,Q,X){return z.addEventListener(Q,X,!1),X}function gL(z,Q,X){return z.addEventListener(Q,X,!0),X}function xL(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function jL(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var PX=null,y$=null,bX=null;function pL(z){return PX=z,y$=Oq(),!0}function cL(){PX=null,y$=null,bX=null}function Kq(){if(bX)return bX;var z,Q=y$,X=Q.length,Z,J=Oq(),$=J.length;for(z=0;z<X;z++)if(Q[z]!==J[z])break;var H=X-z;for(Z=1;Z<=H;Z++)if(Q[X-Z]!==J[$-Z])break;var B=Z>1?1-Z:void 0;return bX=J.slice(z,B),bX}function Oq(){if("value"in PX)return PX.value;return PX.textContent}function PJ(z){var Q,X=z.keyCode;if("charCode"in z){if(Q=z.charCode,Q===0&&X===13)Q=13}else Q=X;if(Q===10)Q=13;if(Q>=32||Q===13)return Q;return 0}function bJ(){return!0}function _q(){return!1}function M5(z){function Q(X,Z,J,$,H){this._reactName=X,this._targetInst=J,this.type=Z,this.nativeEvent=$,this.target=H,this.currentTarget=null;for(var B in z){if(!z.hasOwnProperty(B))continue;var W=z[B];if(W)this[B]=W($);else this[B]=$[B]}var F=$.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1;if(F)this.isDefaultPrevented=bJ;else this.isDefaultPrevented=_q;return this.isPropagationStopped=_q,this}return y1(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var X=this.nativeEvent;if(!X)return;if(X.preventDefault)X.preventDefault();else if(typeof X.returnValue!=="unknown")X.returnValue=!1;this.isDefaultPrevented=bJ},stopPropagation:function(){var X=this.nativeEvent;if(!X)return;if(X.stopPropagation)X.stopPropagation();else if(typeof X.cancelBubble!=="unknown")X.cancelBubble=!0;this.isPropagationStopped=bJ},persist:function(){},isPersistent:bJ}),Q}var oz={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},V$=M5(oz),AX=y1({},oz,{view:0,detail:0}),dL=M5(AX),D$,m$,IX;function lL(z){if(z!==IX){if(IX&&z.type==="mousemove")D$=z.screenX-IX.screenX,m$=z.screenY-IX.screenY;else D$=0,m$=0;IX=z}}var AJ=y1({},AX,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:u$,button:0,buttons:0,relatedTarget:function(z){if(z.relatedTarget===void 0)return z.fromElement===z.srcElement?z.toElement:z.fromElement;return z.relatedTarget},movementX:function(z){if("movementX"in z)return z.movementX;return lL(z),D$},movementY:function(z){if("movementY"in z)return z.movementY;return m$}}),Lq=M5(AJ),iL=y1({},AJ,{dataTransfer:0}),oL=M5(iL),aL=y1({},AX,{relatedTarget:0}),E$=M5(aL),nL=y1({},oz,{animationName:0,elapsedTime:0,pseudoElement:0}),rL=M5(nL),tL=y1({},oz,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),sL=M5(tL),eL=y1({},oz,{data:0}),Rq=M5(eL),zR=Rq,QR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XR={"8":"Backspace","9":"Tab","12":"Clear","13":"Enter","16":"Shift","17":"Control","18":"Alt","19":"Pause","20":"CapsLock","27":"Escape","32":" ","33":"PageUp","34":"PageDown","35":"End","36":"Home","37":"ArrowLeft","38":"ArrowUp","39":"ArrowRight","40":"ArrowDown","45":"Insert","46":"Delete","112":"F1","113":"F2","114":"F3","115":"F4","116":"F5","117":"F6","118":"F7","119":"F8","120":"F9","121":"F10","122":"F11","123":"F12","144":"NumLock","145":"ScrollLock","224":"Meta"};function ZR(z){if(z.key){var Q=QR[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=PJ(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return XR[z.keyCode]||"Unidentified";return""}var JR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YR(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=JR[z];return Z?!!X[Z]:!1}function u$(z){return YR}var $R=y1({},AX,{key:ZR,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:u$,charCode:function(z){if(z.type==="keypress")return PJ(z);return 0},keyCode:function(z){if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0},which:function(z){if(z.type==="keypress")return PJ(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),HR=M5($R),GR=y1({},AJ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nq=M5(GR),qR=y1({},AX,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:u$}),BR=M5(qR),UR=y1({},oz,{propertyName:0,elapsedTime:0,pseudoElement:0}),WR=M5(UR),KR=y1({},AJ,{deltaX:function(z){return"deltaX"in z?z.deltaX:("wheelDeltaX"in z)?-z.wheelDeltaX:0},deltaY:function(z){return"deltaY"in z?z.deltaY:("wheelDeltaY"in z)?-z.wheelDeltaY:("wheelDelta"in z)?-z.wheelDelta:0},deltaZ:0,deltaMode:0}),OR=M5(KR),_R=[9,13,27,32],Mq=229,g$=Y1&&"CompositionEvent"in window,TX=null;if(Y1&&"documentMode"in document)TX=document.documentMode;var LR=Y1&&"TextEvent"in window&&!TX,wq=Y1&&(!g$||TX&&TX>8&&TX<=11),Fq=32,Pq=String.fromCharCode(Fq);function RR(){J1("onBeforeInput",["compositionend","keypress","textInput","paste"]),J1("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),J1("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),J1("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var bq=!1;function NR(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function MR(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function wR(z,Q){return z==="keydown"&&Q.keyCode===Mq}function Aq(z,Q){switch(z){case"keyup":return _R.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==Mq;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iq(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function Tq(z){return z.locale==="ko"}var az=!1;function FR(z,Q,X,Z,J){var $,H;if(g$)$=MR(Q);else if(!az){if(wR(Q,Z))$="onCompositionStart"}else if(Aq(Q,Z))$="onCompositionEnd";if(!$)return null;if(wq&&!Tq(Z)){if(!az&&$==="onCompositionStart")az=pL(J);else if($==="onCompositionEnd"){if(az)H=Kq()}}var B=SJ(X,$);if(B.length>0){var W=new Rq($,Q,null,Z,J);if(z.push({event:W,listeners:B}),H)W.data=H;else{var F=Iq(Z);if(F!==null)W.data=F}}}function PR(z,Q){switch(z){case"compositionend":return Iq(Q);case"keypress":var X=Q.which;if(X!==Fq)return null;return bq=!0,Pq;case"textInput":var Z=Q.data;if(Z===Pq&&bq)return null;return Z;default:return null}}function bR(z,Q){if(az){if(z==="compositionend"||!g$&&Aq(z,Q)){var X=Kq();return cL(),az=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!NR(Q)){if(Q.char&&Q.char.length>1)return Q.char;else if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return wq&&!Tq(Q)?null:Q.data;default:return null}}function AR(z,Q,X,Z,J){var $;if(LR)$=PR(Q,Z);else $=bR(Q,Z);if(!$)return null;var H=SJ(X,"onBeforeInput");if(H.length>0){var B=new zR("onBeforeInput","beforeinput",null,Z,J);z.push({event:B,listeners:H}),B.data=$}}function IR(z,Q,X,Z,J,$,H){FR(z,Q,X,Z,J),AR(z,Q,X,Z,J)}var TR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function kq(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!TR[z.type];if(Q==="textarea")return!0;return!1}function kR(z){if(!Y1)return!1;var Q="on"+z,X=Q in document;if(!X){var Z=document.createElement("div");Z.setAttribute(Q,"return;"),X=typeof Z[Q]==="function"}return X}function CR(){J1("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Cq(z,Q,X,Z){I2(Z);var J=SJ(Q,"onChange");if(J.length>0){var $=new V$("onChange","change",null,X,Z);z.push({event:$,listeners:J})}}var kX=null,CX=null;function SR(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function vR(z){var Q=[];Cq(Q,CX,z,g3(z)),S2(fR,Q)}function fR(z){iq(z,0)}function IJ(z){var Q=zQ(z);if(vz(Q))return z}function hR(z,Q){if(z==="change")return Q}var Sq=!1;if(Y1)Sq=kR("input")&&(!document.documentMode||document.documentMode>9);function yR(z,Q){kX=z,CX=Q,kX.attachEvent("onpropertychange",fq)}function vq(){if(!kX)return;kX.detachEvent("onpropertychange",fq),kX=null,CX=null}function fq(z){if(z.propertyName!=="value")return;if(IJ(CX))vR(z)}function VR(z,Q,X){if(z==="focusin")vq(),yR(Q,X);else if(z==="focusout")vq()}function DR(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return IJ(CX)}function mR(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function ER(z,Q){if(z==="click")return IJ(Q)}function uR(z,Q){if(z==="input"||z==="change")return IJ(Q)}function gR(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;M1(z,"number",z.value)}function xR(z,Q,X,Z,J,$,H){var B=X?zQ(X):window,W,F;if(SR(B))W=hR;else if(kq(B))if(Sq)W=uR;else W=DR,F=VR;else if(mR(B))W=ER;if(W){var I=W(Q,X);if(I){Cq(z,I,Z,J);return}}if(F)F(Q,B,X);if(Q==="focusout")gR(B)}function jR(){A0("onMouseEnter",["mouseout","mouseover"]),A0("onMouseLeave",["mouseout","mouseover"]),A0("onPointerEnter",["pointerout","pointerover"]),A0("onPointerLeave",["pointerout","pointerover"])}function pR(z,Q,X,Z,J,$,H){var B=Q==="mouseover"||Q==="pointerover",W=Q==="mouseout"||Q==="pointerout";if(B&&!Y_(Z)){var F=Z.relatedTarget||Z.fromElement;if(F){if(e8(F)||cX(F))return}}if(!W&&!B)return;var I;if(J.window===J)I=J;else{var d=J.ownerDocument;if(d)I=d.defaultView||d.parentWindow;else I=window}var c,Z0;if(W){var J0=Z.relatedTarget||Z.toElement;if(c=X,Z0=J0?e8(J0):null,Z0!==null){var Y0=d8(Z0);if(Z0!==Y0||Z0.tag!==M&&Z0.tag!==w)Z0=null}}else c=null,Z0=X;if(c===Z0)return;var u0=Lq,G1="onMouseLeave",z1="onMouseEnter",u1="mouse";if(Q==="pointerout"||Q==="pointerover")u0=Nq,G1="onPointerLeave",z1="onPointerEnter",u1="pointer";var g1=c==null?I:zQ(c),r=Z0==null?I:zQ(Z0),G0=new u0(G1,u1+"leave",c,Z,J);G0.target=g1,G0.relatedTarget=r;var t=null,P0=e8(J);if(P0===X){var p0=new u0(z1,u1+"enter",Z0,Z,J);p0.target=r,p0.relatedTarget=g1,t=p0}WN(z,G0,t,c,Z0)}function cR(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var w5=typeof Object.is==="function"?Object.is:cR;function SX(z,Q){if(w5(z,Q))return!0;if(typeof z!=="object"||z===null||typeof Q!=="object"||Q===null)return!1;var X=Object.keys(z),Z=Object.keys(Q);if(X.length!==Z.length)return!1;for(var J=0;J<X.length;J++){var $=X[J];if(!h1.call(Q,$)||!w5(z[$],Q[$]))return!1}return!0}function hq(z){while(z&&z.firstChild)z=z.firstChild;return z}function dR(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function yq(z,Q){var X=hq(z),Z=0,J=0;while(X){if(X.nodeType===k6){if(J=Z+X.textContent.length,Z<=Q&&J>=Q)return{node:X,offset:Q-Z};Z=J}X=hq(dR(X))}}function lR(z){var Q=z.ownerDocument,X=Q&&Q.defaultView||window,Z=X.getSelection&&X.getSelection();if(!Z||Z.rangeCount===0)return null;var{anchorNode:J,anchorOffset:$,focusNode:H,focusOffset:B}=Z;try{J.nodeType,H.nodeType}catch(W){return null}return iR(z,J,$,H,B)}function iR(z,Q,X,Z,J){var $=0,H=-1,B=-1,W=0,F=0,I=z,d=null;z:while(!0){var c=null;while(!0){if(I===Q&&(X===0||I.nodeType===k6))H=$+X;if(I===Z&&(J===0||I.nodeType===k6))B=$+J;if(I.nodeType===k6)$+=I.nodeValue.length;if((c=I.firstChild)===null)break;d=I,I=c}while(!0){if(I===z)break z;if(d===Q&&++W===X)H=$;if(d===Z&&++F===J)B=$;if((c=I.nextSibling)!==null)break;I=d,d=I.parentNode}I=c}if(H===-1||B===-1)return null;return{start:H,end:B}}function oR(z,Q){var X=z.ownerDocument||document,Z=X&&X.defaultView||window;if(!Z.getSelection)return;var J=Z.getSelection(),$=z.textContent.length,H=Math.min(Q.start,$),B=Q.end===void 0?H:Math.min(Q.end,$);if(!J.extend&&H>B){var W=B;B=H,H=W}var F=yq(z,H),I=yq(z,B);if(F&&I){if(J.rangeCount===1&&J.anchorNode===F.node&&J.anchorOffset===F.offset&&J.focusNode===I.node&&J.focusOffset===I.offset)return;var d=X.createRange();if(d.setStart(F.node,F.offset),J.removeAllRanges(),H>B)J.addRange(d),J.extend(I.node,I.offset);else d.setEnd(I.node,I.offset),J.addRange(d)}}function Vq(z){return z&&z.nodeType===k6}function Dq(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(Vq(z))return!1;else if(Vq(Q))return Dq(z,Q.parentNode);else if("contains"in z)return z.contains(Q);else if(z.compareDocumentPosition)return!!(z.compareDocumentPosition(Q)&16);else return!1}function aR(z){return z&&z.ownerDocument&&Dq(z.ownerDocument.documentElement,z)}function nR(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function mq(){var z=window,Q=Y8();while(Q instanceof z.HTMLIFrameElement){if(nR(Q))z=Q.contentWindow;else return Q;Q=Y8(z.document)}return Q}function x$(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();return Q&&(Q==="input"&&(z.type==="text"||z.type==="search"||z.type==="tel"||z.type==="url"||z.type==="password")||Q==="textarea"||z.contentEditable==="true")}function rR(){var z=mq();return{focusedElem:z,selectionRange:x$(z)?sR(z):null}}function tR(z){var Q=mq(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&aR(X)){if(Z!==null&&x$(X))eR(X,Z);var J=[],$=X;while($=$.parentNode)if($.nodeType===$5)J.push({element:$,left:$.scrollLeft,top:$.scrollTop});if(typeof X.focus==="function")X.focus();for(var H=0;H<J.length;H++){var B=J[H];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}}function sR(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=lR(z);return Q||{start:0,end:0}}function eR(z,Q){var{start:X,end:Z}=Q;if(Z===void 0)Z=X;if("selectionStart"in z)z.selectionStart=X,z.selectionEnd=Math.min(Z,z.value.length);else oR(z,Q)}var zN=Y1&&"documentMode"in document&&document.documentMode<=11;function QN(){J1("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var nz=null,j$=null,vX=null,p$=!1;function XN(z){if("selectionStart"in z&&x$(z))return{start:z.selectionStart,end:z.selectionEnd};else{var Q=z.ownerDocument&&z.ownerDocument.defaultView||window,X=Q.getSelection();return{anchorNode:X.anchorNode,anchorOffset:X.anchorOffset,focusNode:X.focusNode,focusOffset:X.focusOffset}}}function ZN(z){return z.window===z?z.document:z.nodeType===C6?z:z.ownerDocument}function Eq(z,Q,X){var Z=ZN(X);if(p$||nz==null||nz!==Y8(Z))return;var J=XN(nz);if(!vX||!SX(vX,J)){vX=J;var $=SJ(j$,"onSelect");if($.length>0){var H=new V$("onSelect","select",null,Q,X);z.push({event:H,listeners:$}),H.target=nz}}}function JN(z,Q,X,Z,J,$,H){var B=X?zQ(X):window;switch(Q){case"focusin":if(kq(B)||B.contentEditable==="true")nz=B,j$=X,vX=null;break;case"focusout":nz=null,j$=null,vX=null;break;case"mousedown":p$=!0;break;case"contextmenu":case"mouseup":case"dragend":p$=!1,Eq(z,Z,J);break;case"selectionchange":if(zN)break;case"keydown":case"keyup":Eq(z,Z,J)}}function TJ(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var rz={animationend:TJ("Animation","AnimationEnd"),animationiteration:TJ("Animation","AnimationIteration"),animationstart:TJ("Animation","AnimationStart"),transitionend:TJ("Transition","TransitionEnd")},c$={},uq={};if(Y1){if(uq=document.createElement("div").style,!("AnimationEvent"in window))delete rz.animationend.animation,delete rz.animationiteration.animation,delete rz.animationstart.animation;if(!("TransitionEvent"in window))delete rz.transitionend.transition}function kJ(z){if(c$[z])return c$[z];else if(!rz[z])return z;var Q=rz[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in uq)return c$[z]=Q[X];return z}var gq=kJ("animationend"),xq=kJ("animationiteration"),jq=kJ("animationstart"),pq=kJ("transitionend"),cq=new Map,dq=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function U8(z,Q){cq.set(z,Q),J1(Q,[z])}function YN(){for(var z=0;z<dq.length;z++){var Q=dq[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);U8(X,"on"+Z)}U8(gq,"onAnimationEnd"),U8(xq,"onAnimationIteration"),U8(jq,"onAnimationStart"),U8("dblclick","onDoubleClick"),U8("focusin","onFocus"),U8("focusout","onBlur"),U8(pq,"onTransitionEnd")}function $N(z,Q,X,Z,J,$,H){var B=cq.get(Q);if(B===void 0)return;var W=V$,F=Q;switch(Q){case"keypress":if(PJ(Z)===0)return;case"keydown":case"keyup":W=HR;break;case"focusin":F="focus",W=E$;break;case"focusout":F="blur",W=E$;break;case"beforeblur":case"afterblur":W=E$;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Lq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=oL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=BR;break;case gq:case xq:case jq:W=rL;break;case pq:W=WR;break;case"scroll":W=dL;break;case"wheel":W=OR;break;case"copy":case"cut":case"paste":W=sL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Nq;break}var I=($&QX)!==0;{var d=!I&&Q==="scroll",c=BN(X,B,Z.type,I,d);if(c.length>0){var Z0=new W(B,F,null,Z,J);z.push({event:Z0,listeners:c})}}}YN(),jR(),CR(),QN(),RR();function HN(z,Q,X,Z,J,$,H){$N(z,Q,X,Z,J,$);var B=($&X_)===0;if(B)pR(z,Q,X,Z,J),xR(z,Q,X,Z,J),JN(z,Q,X,Z,J),IR(z,Q,X,Z,J)}var fX=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],d$=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(fX));function lq(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,O_(Z,Q,void 0,z),z.currentTarget=null}function GN(z,Q,X){var Z;if(X)for(var J=Q.length-1;J>=0;J--){var $=Q[J],H=$.instance,B=$.currentTarget,W=$.listener;if(H!==Z&&z.isPropagationStopped())return;lq(z,W,B),Z=H}else for(var F=0;F<Q.length;F++){var I=Q[F],d=I.instance,c=I.currentTarget,Z0=I.listener;if(d!==Z&&z.isPropagationStopped())return;lq(z,Z0,c),Z=d}}function iq(z,Q){var X=(Q&QX)!==0;for(var Z=0;Z<z.length;Z++){var J=z[Z],$=J.event,H=J.listeners;GN($,H,X)}__()}function qN(z,Q,X,Z,J){var $=g3(X),H=[];HN(H,z,Z,X,$,Q),iq(H,Q)}function V4(z,Q){if(!d$.has(z))q('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',z);var X=!1,Z=gM(Q),J=KN(z,X);if(!Z.has(J))oq(Q,z,u3,X),Z.add(J)}function l$(z,Q,X){if(d$.has(z)&&!Q)q('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',z);var Z=0;if(Q)Z|=QX;oq(X,z,Z,Q)}var CJ="_reactListening"+Math.random().toString(36).slice(2);function hX(z){if(!z[CJ]){z[CJ]=!0,r0.forEach(function(X){if(X!=="selectionchange"){if(!d$.has(X))l$(X,!1,z);l$(X,!0,z)}});var Q=z.nodeType===C6?z:z.ownerDocument;if(Q!==null){if(!Q[CJ])Q[CJ]=!0,l$("selectionchange",!1,Q)}}}function oq(z,Q,X,Z,J){var $=VL(z,Q,X),H=void 0;if(p3){if(Q==="touchstart"||Q==="touchmove"||Q==="wheel")H=!0}z=z;var B;if(Z)if(H!==void 0)B=xL(z,Q,$,H);else B=gL(z,Q,$);else if(H!==void 0)B=jL(z,Q,$,H);else B=uL(z,Q,$)}function aq(z,Q){return z===Q||z.nodeType===z7&&z.parentNode===Q}function i$(z,Q,X,Z,J){var $=Z;if((Q&b2)===0&&(Q&u3)===0){var H=J;if(Z!==null){var B=Z;z:while(!0){if(B===null)return;var W=B.tag;if(W===b||W===P){var F=B.stateNode.containerInfo;if(aq(F,H))break;if(W===P){var I=B.return;while(I!==null){var d=I.tag;if(d===b||d===P){var c=I.stateNode.containerInfo;if(aq(c,H))return}I=I.return}}while(F!==null){var Z0=e8(F);if(Z0===null)return;var J0=Z0.tag;if(J0===M||J0===w){B=$=Z0;continue z}F=F.parentNode}}B=B.return}}}S2(function(){return qN(z,Q,X,$)})}function yX(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function BN(z,Q,X,Z,J,$){var H=Q!==null?Q+"Capture":null,B=Z?H:Q,W=[],F=z,I=null;while(F!==null){var d=F,c=d.stateNode,Z0=d.tag;if(Z0===M&&c!==null){if(I=c,B!==null){var J0=ZX(F,B);if(J0!=null)W.push(yX(F,J0,I))}}if(J)break;F=F.return}return W}function SJ(z,Q){var X=Q+"Capture",Z=[],J=z;while(J!==null){var $=J,H=$.stateNode,B=$.tag;if(B===M&&H!==null){var W=H,F=ZX(J,X);if(F!=null)Z.unshift(yX(J,F,W));var I=ZX(J,Q);if(I!=null)Z.push(yX(J,I,W))}J=J.return}return Z}function tz(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==M);if(z)return z;return null}function UN(z,Q){var X=z,Z=Q,J=0;for(var $=X;$;$=tz($))J++;var H=0;for(var B=Z;B;B=tz(B))H++;while(J-H>0)X=tz(X),J--;while(H-J>0)Z=tz(Z),H--;var W=J;while(W--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=tz(X),Z=tz(Z)}return null}function nq(z,Q,X,Z,J){var $=Q._reactName,H=[],B=X;while(B!==null){if(B===Z)break;var W=B,F=W.alternate,I=W.stateNode,d=W.tag;if(F!==null&&F===Z)break;if(d===M&&I!==null){var c=I;if(J){var Z0=ZX(B,$);if(Z0!=null)H.unshift(yX(B,Z0,c))}else if(!J){var J0=ZX(B,$);if(J0!=null)H.push(yX(B,J0,c))}}B=B.return}if(H.length!==0)z.push({event:Q,listeners:H})}function WN(z,Q,X,Z,J){var $=Z&&J?UN(Z,J):null;if(Z!==null)nq(z,Q,Z,$,!1);if(J!==null&&X!==null)nq(z,X,J,$,!0)}function KN(z,Q){return z+"__"+(Q?"capture":"bubble")}var H5=!1,VX="dangerouslySetInnerHTML",vJ="suppressContentEditableWarning",W8="suppressHydrationWarning",rq="autoFocus",t8="children",s8="style",fJ="__html",o$,hJ,DX,tq,yJ,sq,eq;o$={dialog:!0,webview:!0},hJ=function(z,Q){nO(z,Q),rO(z,Q),Q_(z,Q,{registrationNameDependencies:f0,possibleRegistrationNames:o0})},sq=Y1&&!document.documentMode,DX=function(z,Q,X){if(H5)return;var Z=VJ(X),J=VJ(Q);if(J===Z)return;H5=!0,q("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(J),JSON.stringify(Z))},tq=function(z){if(H5)return;H5=!0;var Q=[];z.forEach(function(X){Q.push(X)}),q("Extra attributes from the server: %s",Q)},yJ=function(z,Q){if(Q===!1)q("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",z,z,z);else q("Expected `%s` listener to be a function, instead got a value of `%s` type.",z,typeof Q)},eq=function(z,Q){var X=z.namespaceURI===T6?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var ON=/\r\n?/g,_N=/\u0000|\uFFFD/g;function VJ(z){C4(z);var Q=typeof z==="string"?z:""+z;return Q.replace(ON,`
|
|
32
|
-
`).replace(_N,"")}function DJ(z,Q,X,Z){var J=VJ(Q),$=VJ(z);if($===J)return;if(Z){if(!H5)H5=!0,q('Text content did not match. Server: "%s" Client: "%s"',$,J)}if(X&&e)throw Error("Text content does not match server-rendered HTML.")}function zB(z){return z.nodeType===C6?z:z.ownerDocument}function LN(){}function mJ(z){z.onclick=LN}function RN(z,Q,X,Z,J){for(var $ in Z){if(!Z.hasOwnProperty($))continue;var H=Z[$];if($===s8){if(H)Object.freeze(H);R2(Q,H)}else if($===VX){var B=H?H[fJ]:void 0;if(B!=null)W2(Q,B)}else if($===t8){if(typeof H==="string"){var W=z!=="textarea"||H!=="";if(W)ZJ(Q,H)}else if(typeof H==="number")ZJ(Q,""+H)}else if($===vJ||$===W8);else if($===rq);else if(f0.hasOwnProperty($)){if(H!=null){if(typeof H!=="function")yJ($,H);if($==="onScroll")V4("scroll",Q)}}else if(H!=null)x1(Q,$,H,J)}}function NN(z,Q,X,Z){for(var J=0;J<Q.length;J+=2){var $=Q[J],H=Q[J+1];if($===s8)R2(z,H);else if($===VX)W2(z,H);else if($===t8)ZJ(z,H);else x1(z,$,H,Z)}}function MN(z,Q,X,Z){var J,$=zB(X),H,B=Z;if(B===T6)B=h3(z);if(B===T6){if(J=g8(z,Q),!J&&z!==z.toLowerCase())q("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",z);if(z==="script"){var W=$.createElement("div");W.innerHTML="<script></script>";var F=W.firstChild;H=W.removeChild(F)}else if(typeof Q.is==="string")H=$.createElement(z,{is:Q.is});else if(H=$.createElement(z),z==="select"){var I=H;if(Q.multiple)I.multiple=!0;else if(Q.size)I.size=Q.size}}else H=$.createElementNS(B,z);if(B===T6){if(!J&&Object.prototype.toString.call(H)==="[object HTMLUnknownElement]"&&!h1.call(o$,z))o$[z]=!0,q("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",z)}return H}function wN(z,Q){return zB(Q).createTextNode(z)}function FN(z,Q,X,Z){var J=g8(Q,X);hJ(Q,X);var $;switch(Q){case"dialog":V4("cancel",z),V4("close",z),$=X;break;case"iframe":case"object":case"embed":V4("load",z),$=X;break;case"video":case"audio":for(var H=0;H<fX.length;H++)V4(fX[H],z);$=X;break;case"source":V4("error",z),$=X;break;case"img":case"image":case"link":V4("error",z),V4("load",z),$=X;break;case"details":V4("toggle",z),$=X;break;case"input":E(z,X),$=L(z,X),V4("invalid",z);break;case"option":b4(z,X),$=X;break;case"select":eQ(z,X),$=sQ(z,X),V4("invalid",z);break;case"textarea":q2(z,X),$=v3(z,X),V4("invalid",z);break;default:$=X}switch(E3(Q,$),RN(Q,z,Z,$,J),Q){case"input":A6(z),S0(z,X,!1);break;case"textarea":A6(z),U2(z);break;case"option":y4(z,X);break;case"select":S3(z,X);break;default:if(typeof $.onClick==="function")mJ(z);break}}function PN(z,Q,X,Z,J){hJ(Q,Z);var $=null,H,B;switch(Q){case"input":H=L(z,X),B=L(z,Z),$=[];break;case"select":H=sQ(z,X),B=sQ(z,Z),$=[];break;case"textarea":H=v3(z,X),B=v3(z,Z),$=[];break;default:if(H=X,B=Z,typeof H.onClick!=="function"&&typeof B.onClick==="function")mJ(z);break}E3(Q,B);var W,F,I=null;for(W in H){if(B.hasOwnProperty(W)||!H.hasOwnProperty(W)||H[W]==null)continue;if(W===s8){var d=H[W];for(F in d)if(d.hasOwnProperty(F)){if(!I)I={};I[F]=""}}else if(W===VX||W===t8);else if(W===vJ||W===W8);else if(W===rq);else if(f0.hasOwnProperty(W)){if(!$)$=[]}else($=$||[]).push(W,null)}for(W in B){var c=B[W],Z0=H!=null?H[W]:void 0;if(!B.hasOwnProperty(W)||c===Z0||c==null&&Z0==null)continue;if(W===s8){if(c)Object.freeze(c);if(Z0){for(F in Z0)if(Z0.hasOwnProperty(F)&&(!c||!c.hasOwnProperty(F))){if(!I)I={};I[F]=""}for(F in c)if(c.hasOwnProperty(F)&&Z0[F]!==c[F]){if(!I)I={};I[F]=c[F]}}else{if(!I){if(!$)$=[];$.push(W,I)}I=c}}else if(W===VX){var J0=c?c[fJ]:void 0,Y0=Z0?Z0[fJ]:void 0;if(J0!=null){if(Y0!==J0)($=$||[]).push(W,J0)}}else if(W===t8){if(typeof c==="string"||typeof c==="number")($=$||[]).push(W,""+c)}else if(W===vJ||W===W8);else if(f0.hasOwnProperty(W)){if(c!=null){if(typeof c!=="function")yJ(W,c);if(W==="onScroll")V4("scroll",z)}if(!$&&Z0!==c)$=[]}else($=$||[]).push(W,c)}if(I)jO(I,B[s8]),($=$||[]).push(s8,I);return $}function bN(z,Q,X,Z,J){if(X==="input"&&J.type==="radio"&&J.name!=null)X0(z,J);var $=g8(X,Z),H=g8(X,J);switch(NN(z,Q,$,H),X){case"input":$0(z,J);break;case"textarea":B2(z,J);break;case"select":NO(z,J);break}}function AN(z){{var Q=z.toLowerCase();if(!JJ.hasOwnProperty(Q))return null;return JJ[Q]||null}}function IN(z,Q,X,Z,J,$,H){var B,W;switch(B=g8(Q,X),hJ(Q,X),Q){case"dialog":V4("cancel",z),V4("close",z);break;case"iframe":case"object":case"embed":V4("load",z);break;case"video":case"audio":for(var F=0;F<fX.length;F++)V4(fX[F],z);break;case"source":V4("error",z);break;case"img":case"image":case"link":V4("error",z),V4("load",z);break;case"details":V4("toggle",z);break;case"input":E(z,X),V4("invalid",z);break;case"option":b4(z,X);break;case"select":eQ(z,X),V4("invalid",z);break;case"textarea":q2(z,X),V4("invalid",z);break}E3(Q,X);{W=new Set;var I=z.attributes;for(var d=0;d<I.length;d++){var c=I[d].name.toLowerCase();switch(c){case"value":break;case"checked":break;case"selected":break;default:W.add(I[d].name)}}}var Z0=null;for(var J0 in X){if(!X.hasOwnProperty(J0))continue;var Y0=X[J0];if(J0===t8){if(typeof Y0==="string"){if(z.textContent!==Y0){if(X[W8]!==!0)DJ(z.textContent,Y0,$,H);Z0=[t8,Y0]}}else if(typeof Y0==="number"){if(z.textContent!==""+Y0){if(X[W8]!==!0)DJ(z.textContent,Y0,$,H);Z0=[t8,""+Y0]}}}else if(f0.hasOwnProperty(J0)){if(Y0!=null){if(typeof Y0!=="function")yJ(J0,Y0);if(J0==="onScroll")V4("scroll",z)}}else if(H&&!0&&typeof B==="boolean"){var u0=void 0,G1=B&&q0?null:t4(J0);if(X[W8]===!0);else if(J0===vJ||J0===W8||J0==="value"||J0==="checked"||J0==="selected");else if(J0===VX){var z1=z.innerHTML,u1=Y0?Y0[fJ]:void 0;if(u1!=null){var g1=eq(z,u1);if(g1!==z1)DX(J0,z1,g1)}}else if(J0===s8){if(W.delete(J0),sq){var r=gO(Y0);if(u0=z.getAttribute("style"),r!==u0)DX(J0,u0,r)}}else if(B&&!q0){if(W.delete(J0.toLowerCase()),u0=x5(z,J0,Y0),Y0!==u0)DX(J0,u0,Y0)}else if(!H4(J0,G1,B)&&!L4(J0,Y0,G1,B)){var G0=!1;if(G1!==null)W.delete(G1.attributeName),u0=u7(z,J0,Y0,G1);else{var t=Z;if(t===T6)t=h3(Q);if(t===T6)W.delete(J0.toLowerCase());else{var P0=AN(J0);if(P0!==null&&P0!==J0)G0=!0,W.delete(P0);W.delete(J0)}u0=x5(z,J0,Y0)}var p0=q0;if(!p0&&Y0!==u0&&!G0)DX(J0,u0,Y0)}}}if(H){if(W.size>0&&X[W8]!==!0)tq(W)}switch(Q){case"input":A6(z),S0(z,X,!0);break;case"textarea":A6(z),U2(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")mJ(z);break}return Z0}function TN(z,Q,X){var Z=z.nodeValue!==Q;return Z}function a$(z,Q){{if(H5)return;H5=!0,q("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function n$(z,Q){{if(H5)return;H5=!0,q('Did not expect server HTML to contain the text node "%s" in <%s>.',Q.nodeValue,z.nodeName.toLowerCase())}}function r$(z,Q,X){{if(H5)return;H5=!0,q("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function t$(z,Q){{if(Q==="")return;if(H5)return;H5=!0,q('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function kN(z,Q,X){switch(Q){case"input":L1(z,X);return;case"textarea":wO(z,X);return;case"select":MO(z,X);return}}var mX=function(){},EX=function(){};{var CN=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],QB=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],SN=QB.concat(["button"]),vN=["dd","dt","li","option","optgroup","p","rp","rt"],XB={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};EX=function(z,Q){var X=y1({},z||XB),Z={tag:Q};if(QB.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(SN.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(CN.indexOf(Q)!==-1&&Q!=="address"&&Q!=="div"&&Q!=="p")X.listItemTagAutoclosing=null,X.dlItemTagAutoclosing=null;if(X.current=Z,Q==="form")X.formTag=Z;if(Q==="a")X.aTagInScope=Z;if(Q==="button")X.buttonTagInScope=Z;if(Q==="nobr")X.nobrTagInScope=Z;if(Q==="p")X.pTagInButtonScope=Z;if(Q==="li")X.listItemTagAutoclosing=Z;if(Q==="dd"||Q==="dt")X.dlItemTagAutoclosing=Z;return X};var fN=function(z,Q){switch(Q){case"select":return z==="option"||z==="optgroup"||z==="#text";case"optgroup":return z==="option"||z==="#text";case"option":return z==="#text";case"tr":return z==="th"||z==="td"||z==="style"||z==="script"||z==="template";case"tbody":case"thead":case"tfoot":return z==="tr"||z==="style"||z==="script"||z==="template";case"colgroup":return z==="col"||z==="template";case"table":return z==="caption"||z==="colgroup"||z==="tbody"||z==="tfoot"||z==="thead"||z==="style"||z==="script"||z==="template";case"head":return z==="base"||z==="basefont"||z==="bgsound"||z==="link"||z==="meta"||z==="title"||z==="noscript"||z==="noframes"||z==="style"||z==="script"||z==="template";case"html":return z==="head"||z==="body"||z==="frameset";case"frameset":return z==="frame";case"#document":return z==="html"}switch(z){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q!=="h1"&&Q!=="h2"&&Q!=="h3"&&Q!=="h4"&&Q!=="h5"&&Q!=="h6";case"rp":case"rt":return vN.indexOf(Q)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return Q==null}return!0},hN=function(z,Q){switch(z){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q.pTagInButtonScope;case"form":return Q.formTag||Q.pTagInButtonScope;case"li":return Q.listItemTagAutoclosing;case"dd":case"dt":return Q.dlItemTagAutoclosing;case"button":return Q.buttonTagInScope;case"a":return Q.aTagInScope;case"nobr":return Q.nobrTagInScope}return null},ZB={};mX=function(z,Q,X){X=X||XB;var Z=X.current,J=Z&&Z.tag;if(Q!=null){if(z!=null)q("validateDOMNesting: when childText is passed, childTag should be null");z="#text"}var $=fN(z,J)?null:Z,H=$?null:hN(z,X),B=$||H;if(!B)return;var W=B.tag,F=!!$+"|"+z+"|"+W;if(ZB[F])return;ZB[F]=!0;var I=z,d="";if(z==="#text")if(/\S/.test(Q))I="Text nodes";else I="Whitespace text nodes",d=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else I="<"+z+">";if($){var c="";if(W==="table"&&z==="tr")c+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";q("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",I,W,d,c)}else q("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",I,W)}}var EJ="suppressHydrationWarning",uJ="$",gJ="/$",uX="$?",gX="$!",yN="style",s$=null,e$=null;function VN(z){var Q,X,Z=z.nodeType;switch(Z){case C6:case V3:{Q=Z===C6?"#document":"#fragment";var J=z.documentElement;X=J?J.namespaceURI:y3(null,"");break}default:{var $=Z===z7?z.parentNode:z,H=$.namespaceURI||null;Q=$.tagName,X=y3(H,Q);break}}{var B=Q.toLowerCase(),W=EX(null,B);return{namespace:X,ancestorInfo:W}}}function DN(z,Q,X){{var Z=z,J=y3(Z.namespace,Q),$=EX(Z.ancestorInfo,Q);return{namespace:J,ancestorInfo:$}}}function z9(z){return z}function mN(z){s$=yL(),e$=rR();var Q=null;return Uq(!1),Q}function EN(z){tR(e$),Uq(s$),s$=null,e$=null}function uN(z,Q,X,Z,J){var $;{var H=Z;if(mX(z,null,H.ancestorInfo),typeof Q.children==="string"||typeof Q.children==="number"){var B=""+Q.children,W=EX(H.ancestorInfo,z);mX(null,B,W)}$=H.namespace}var F=MN(z,Q,X,$);return pX(J,F),G9(F,Q),F}function gN(z,Q){z.appendChild(Q)}function xN(z,Q,X,Z,J){switch(FN(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function jN(z,Q,X,Z,J,$){{var H=$;if(typeof Z.children!==typeof X.children&&(typeof Z.children==="string"||typeof Z.children==="number")){var B=""+Z.children,W=EX(H.ancestorInfo,Q);mX(null,B,W)}}return PN(z,Q,X,Z)}function Q9(z,Q){return z==="textarea"||z==="noscript"||typeof Q.children==="string"||typeof Q.children==="number"||typeof Q.dangerouslySetInnerHTML==="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}function pN(z,Q,X,Z){{var J=X;mX(null,z,J.ancestorInfo)}var $=wN(z,Q);return pX(Z,$),$}function cN(){var z=window.event;if(z===void 0)return D6;return Wq(z.type)}var X9=typeof setTimeout==="function"?setTimeout:void 0,dN=typeof clearTimeout==="function"?clearTimeout:void 0,Z9=-1,JB=typeof Promise==="function"?Promise:void 0,lN=typeof queueMicrotask==="function"?queueMicrotask:typeof JB<"u"?function(z){return JB.resolve(null).then(z).catch(iN)}:X9;function iN(z){setTimeout(function(){throw z})}function oN(z,Q,X,Z){switch(Q){case"button":case"input":case"select":case"textarea":if(X.autoFocus)z.focus();return;case"img":{if(X.src)z.src=X.src;return}}}function aN(z,Q,X,Z,J,$){bN(z,Q,X,Z,J),G9(z,J)}function YB(z){ZJ(z,"")}function nN(z,Q,X){z.nodeValue=X}function rN(z,Q){z.appendChild(Q)}function tN(z,Q){var X;if(z.nodeType===z7)X=z.parentNode,X.insertBefore(Q,z);else X=z,X.appendChild(Q);var Z=z._reactRootContainer;if((Z===null||Z===void 0)&&X.onclick===null)mJ(X)}function sN(z,Q,X){z.insertBefore(Q,X)}function eN(z,Q,X){if(z.nodeType===z7)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function zM(z,Q){z.removeChild(Q)}function QM(z,Q){if(z.nodeType===z7)z.parentNode.removeChild(Q);else z.removeChild(Q)}function J9(z,Q){var X=Q,Z=0;do{var J=X.nextSibling;if(z.removeChild(X),J&&J.nodeType===z7){var $=J.data;if($===gJ)if(Z===0){z.removeChild(J),FX(Q);return}else Z--;else if($===uJ||$===uX||$===gX)Z++}X=J}while(X);FX(Q)}function XM(z,Q){if(z.nodeType===z7)J9(z.parentNode,Q);else if(z.nodeType===$5)J9(z,Q);FX(z)}function ZM(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function JM(z){z.nodeValue=""}function YM(z,Q){z=z;var X=Q[yN],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=D3("display",Z)}function $M(z,Q){z.nodeValue=Q}function HM(z){if(z.nodeType===$5)z.textContent="";else if(z.nodeType===C6){if(z.documentElement)z.removeChild(z.documentElement)}}function GM(z,Q,X){if(z.nodeType!==$5||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function qM(z,Q){if(Q===""||z.nodeType!==k6)return null;return z}function BM(z){if(z.nodeType!==z7)return null;return z}function $B(z){return z.data===uX}function Y9(z){return z.data===gX}function UM(z){var Q=z.nextSibling&&z.nextSibling.dataset,X,Z,J;if(Q)X=Q.dgst,Z=Q.msg,J=Q.stck;return{message:Z,digest:X,stack:J}}function WM(z,Q){z._reactRetry=Q}function xJ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===$5||Q===k6)break;if(Q===z7){var X=z.data;if(X===uJ||X===gX||X===uX)break;if(X===gJ)return null}}return z}function xX(z){return xJ(z.nextSibling)}function KM(z){return xJ(z.firstChild)}function OM(z){return xJ(z.firstChild)}function _M(z){return xJ(z.nextSibling)}function LM(z,Q,X,Z,J,$,H){pX($,z),G9(z,X);var B;{var W=J;B=W.namespace}var F=($.mode&c1)!==K1;return IN(z,Q,X,B,Z,F,H)}function RM(z,Q,X,Z){pX(X,z);var J=(X.mode&c1)!==K1;return TN(z,Q)}function NM(z,Q){pX(Q,z)}function MM(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===z7){var Z=Q.data;if(Z===gJ)if(X===0)return xX(Q);else X--;else if(Z===uJ||Z===gX||Z===uX)X++}Q=Q.nextSibling}return null}function HB(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===z7){var Z=Q.data;if(Z===uJ||Z===gX||Z===uX)if(X===0)return Q;else X--;else if(Z===gJ)X++}Q=Q.previousSibling}return null}function wM(z){FX(z)}function FM(z){FX(z)}function PM(z){return z!=="head"&&z!=="body"}function bM(z,Q,X,Z){var J=!0;DJ(Q.nodeValue,X,Z,J)}function AM(z,Q,X,Z,J,$){if(Q[EJ]!==!0){var H=!0;DJ(Z.nodeValue,J,$,H)}}function IM(z,Q){if(Q.nodeType===$5)a$(z,Q);else if(Q.nodeType===z7);else n$(z,Q)}function TM(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===$5)a$(X,Q);else if(Q.nodeType===z7);else n$(X,Q)}}function kM(z,Q,X,Z,J){if(J||Q[EJ]!==!0)if(Z.nodeType===$5)a$(X,Z);else if(Z.nodeType===z7);else n$(X,Z)}function CM(z,Q,X){r$(z,Q)}function SM(z,Q){t$(z,Q)}function vM(z,Q,X){{var Z=z.parentNode;if(Z!==null)r$(Z,Q)}}function fM(z,Q){{var X=z.parentNode;if(X!==null)t$(X,Q)}}function hM(z,Q,X,Z,J,$){if($||Q[EJ]!==!0)r$(X,Z)}function yM(z,Q,X,Z,J){if(J||Q[EJ]!==!0)t$(X,Z)}function VM(z){q("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function DM(z){hX(z)}var sz=Math.random().toString(36).slice(2),ez="__reactFiber$"+sz,$9="__reactProps$"+sz,jX="__reactContainer$"+sz,H9="__reactEvents$"+sz,mM="__reactListeners$"+sz,EM="__reactHandles$"+sz;function uM(z){delete z[ez],delete z[$9],delete z[H9],delete z[mM],delete z[EM]}function pX(z,Q){Q[ez]=z}function jJ(z,Q){Q[jX]=z}function GB(z){z[jX]=null}function cX(z){return!!z[jX]}function e8(z){var Q=z[ez];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[jX]||X[ez],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var J=HB(z);while(J!==null){var $=J[ez];if($)return $;J=HB(J)}}return Q}z=X,X=z.parentNode}return null}function K8(z){var Q=z[ez]||z[jX];if(Q)if(Q.tag===M||Q.tag===w||Q.tag===k||Q.tag===b)return Q;else return null;return null}function zQ(z){if(z.tag===M||z.tag===w)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function pJ(z){return z[$9]||null}function G9(z,Q){z[$9]=Q}function gM(z){var Q=z[H9];if(Q===void 0)Q=z[H9]=new Set;return Q}var qB={},BB=Y.ReactDebugCurrentFrame;function cJ(z){if(z){var Q=z._owner,X=X8(z.type,z._source,Q?Q.type:null);BB.setExtraStackFrame(X)}else BB.setExtraStackFrame(null)}function d5(z,Q,X,Z,J){{var $=Function.call.bind(h1);for(var H in z)if($(z,H)){var B=void 0;try{if(typeof z[H]!=="function"){var W=Error((Z||"React class")+": "+X+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw W.name="Invariant Violation",W}B=z[H](Q,H,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){B=F}if(B&&!(B instanceof Error))cJ(J),q("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",X,H,typeof B),cJ(null);if(B instanceof Error&&!(B.message in qB))qB[B.message]=!0,cJ(J),q("Failed %s type: %s",X,B.message),cJ(null)}}}var q9=[],dJ;dJ=[];var m6=-1;function O8(z){return{current:z}}function x7(z,Q){if(m6<0){q("Unexpected pop.");return}if(Q!==dJ[m6])q("Unexpected Fiber popped.");z.current=q9[m6],q9[m6]=null,dJ[m6]=null,m6--}function j7(z,Q,X){m6++,q9[m6]=z.current,dJ[m6]=X,z.current=Q}var UB={},F5={};Object.freeze(F5);var E6=O8(F5),U6=O8(!1),B9=F5;function QQ(z,Q,X){{if(X&&W6(Q))return B9;return E6.current}}function WB(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function XQ(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return F5;var J=z.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===Q)return J.__reactInternalMemoizedMaskedChildContext;var $={};for(var H in Z)$[H]=Q[H];{var B=S1(z)||"Unknown";d5(Z,$,"context",B)}if(J)WB(z,Q,$);return $}}function lJ(){return U6.current}function W6(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function iJ(z){x7(U6,z),x7(E6,z)}function U9(z){x7(U6,z),x7(E6,z)}function KB(z,Q,X){{if(E6.current!==F5)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");j7(E6,Q,z),j7(U6,X,z)}}function OB(z,Q,X){{var Z=z.stateNode,J=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var $=S1(z)||"Unknown";if(!UB[$])UB[$]=!0,q("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",$,$)}return X}var H=Z.getChildContext();for(var B in H)if(!(B in J))throw Error((S1(z)||"Unknown")+'.getChildContext(): key "'+B+'" is not defined in childContextTypes.');{var W=S1(z)||"Unknown";d5(J,H,"child context",W)}return y1({},X,H)}}function oJ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||F5;return B9=E6.current,j7(E6,X,z),j7(U6,U6.current,z),!0}}function _B(z,Q,X){{var Z=z.stateNode;if(!Z)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(X){var J=OB(z,Q,B9);Z.__reactInternalMemoizedMergedChildContext=J,x7(U6,z),x7(E6,z),j7(E6,J,z),j7(U6,X,z)}else x7(U6,z),j7(U6,X,z)}}function xM(z){{if(!P_(z)||z.tag!==_)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var Q=z;do{switch(Q.tag){case b:return Q.stateNode.context;case _:{var X=Q.type;if(W6(X))return Q.stateNode.__reactInternalMemoizedMergedChildContext;break}}Q=Q.return}while(Q!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var _8=0,aJ=1,u6=null,W9=!1,K9=!1;function LB(z){if(u6===null)u6=[z];else u6.push(z)}function jM(z){W9=!0,LB(z)}function RB(){if(W9)L8()}function L8(){if(!K9&&u6!==null){K9=!0;var z=0,Q=c5();try{var X=!0,Z=u6;P7(N5);for(;z<Z.length;z++){var J=Z[z];do J=J(X);while(J!==null)}u6=null,W9=!1}catch($){if(u6!==null)u6=u6.slice(z+1);throw x2(qJ,L8),$}finally{P7(Q),K9=!1}}return null}var ZQ=[],JQ=0,nJ=null,rJ=0,k5=[],C5=0,zz=null,g6=1,x6="";function pM(z){return Xz(),(z.flags&h2)!==_1}function cM(z){return Xz(),rJ}function dM(){var z=x6,Q=g6,X=Q&~lM(Q);return X.toString(32)+z}function Qz(z,Q){Xz(),ZQ[JQ++]=rJ,ZQ[JQ++]=nJ,nJ=z,rJ=Q}function NB(z,Q,X){Xz(),k5[C5++]=g6,k5[C5++]=x6,k5[C5++]=zz,zz=z;var Z=g6,J=x6,$=tJ(Z)-1,H=Z&~(1<<$),B=X+1,W=tJ(Q)+$;if(W>30){var F=$-$%5,I=(1<<F)-1,d=(H&I).toString(32),c=H>>F,Z0=$-F,J0=tJ(Q)+Z0,Y0=B<<Z0,u0=Y0|c,G1=d+J;g6=1<<J0|u0,x6=G1}else{var z1=B<<$,u1=z1|H,g1=J;g6=1<<W|u1,x6=g1}}function O9(z){Xz();var Q=z.return;if(Q!==null){var X=1,Z=0;Qz(z,X),NB(z,X,Z)}}function tJ(z){return 32-i2(z)}function lM(z){return 1<<tJ(z)-1}function _9(z){while(z===nJ)nJ=ZQ[--JQ],ZQ[JQ]=null,rJ=ZQ[--JQ],ZQ[JQ]=null;while(z===zz)zz=k5[--C5],k5[C5]=null,x6=k5[--C5],k5[C5]=null,g6=k5[--C5],k5[C5]=null}function iM(){if(Xz(),zz!==null)return{id:g6,overflow:x6};else return null}function oM(z,Q){Xz(),k5[C5++]=g6,k5[C5++]=x6,k5[C5++]=zz,g6=Q.id,x6=Q.overflow,zz=z}function Xz(){if(!k7())q("Expected to be hydrating. This is a bug in React. Please file an issue.")}var T7=null,S5=null,l5=!1,Zz=!1,R8=null;function aM(){if(l5)q("We should not be hydrating here. This is a bug in React. Please file a bug.")}function MB(){Zz=!0}function nM(){return Zz}function rM(z){var Q=z.stateNode.containerInfo;return S5=OM(Q),T7=z,l5=!0,R8=null,Zz=!1,!0}function tM(z,Q,X){if(S5=_M(Q),T7=z,l5=!0,R8=null,Zz=!1,X!==null)oM(z,X);return!0}function wB(z,Q){switch(z.tag){case b:{IM(z.stateNode.containerInfo,Q);break}case M:{var X=(z.mode&c1)!==K1;kM(z.type,z.memoizedProps,z.stateNode,Q,X);break}case k:{var Z=z.memoizedState;if(Z.dehydrated!==null)TM(Z.dehydrated,Q);break}}}function FB(z,Q){wB(z,Q);var X=Yb();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=x8;else Z.push(X)}function L9(z,Q){{if(Zz)return;switch(z.tag){case b:{var X=z.stateNode.containerInfo;switch(Q.tag){case M:var{type:Z,pendingProps:J}=Q;CM(X,Z);break;case w:var $=Q.pendingProps;SM(X,$);break}break}case M:{var{type:H,memoizedProps:B,stateNode:W}=z;switch(Q.tag){case M:{var{type:F,pendingProps:I}=Q,d=(z.mode&c1)!==K1;hM(H,B,W,F,I,d);break}case w:{var c=Q.pendingProps,Z0=(z.mode&c1)!==K1;yM(H,B,W,c,Z0);break}}break}case k:{var J0=z.memoizedState,Y0=J0.dehydrated;if(Y0!==null)switch(Q.tag){case M:var{type:u0,pendingProps:G1}=Q;vM(Y0,u0);break;case w:var z1=Q.pendingProps;fM(Y0,z1);break}break}default:return}}}function PB(z,Q){Q.flags=Q.flags&~v6|Q7,L9(z,Q)}function bB(z,Q){switch(z.tag){case M:{var{type:X,pendingProps:Z}=z,J=GM(Q,X);if(J!==null)return z.stateNode=J,T7=z,S5=KM(J),!0;return!1}case w:{var $=z.pendingProps,H=qM(Q,$);if(H!==null)return z.stateNode=H,T7=z,S5=null,!0;return!1}case k:{var B=BM(Q);if(B!==null){var W={dehydrated:B,treeContext:iM(),retryLane:L5};z.memoizedState=W;var F=$b(B);return F.return=z,z.child=F,T7=z,S5=null,!0}return!1}default:return!1}}function R9(z){return(z.mode&c1)!==K1&&(z.flags&Q4)===_1}function N9(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function M9(z){if(!l5)return;var Q=S5;if(!Q){if(R9(z))L9(T7,z),N9();PB(T7,z),l5=!1,T7=z;return}var X=Q;if(!bB(z,Q)){if(R9(z))L9(T7,z),N9();Q=xX(X);var Z=T7;if(!Q||!bB(z,Q)){PB(T7,z),l5=!1,T7=z;return}FB(Z,X)}}function sM(z,Q,X){var Z=z.stateNode,J=!Zz,$=LM(Z,z.type,z.memoizedProps,Q,X,z,J);if(z.updateQueue=$,$!==null)return!0;return!1}function eM(z){var{stateNode:Q,memoizedProps:X}=z,Z=RM(Q,X,z);if(Z){var J=T7;if(J!==null)switch(J.tag){case b:{var $=J.stateNode.containerInfo,H=(J.mode&c1)!==K1;bM($,Q,X,H);break}case M:{var{type:B,memoizedProps:W,stateNode:F}=J,I=(J.mode&c1)!==K1;AM(B,W,F,Q,X,I);break}}}return Z}function zw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");NM(X,z)}function Qw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return MM(X)}function AB(z){var Q=z.return;while(Q!==null&&Q.tag!==M&&Q.tag!==b&&Q.tag!==k)Q=Q.return;T7=Q}function sJ(z){if(z!==T7)return!1;if(!l5)return AB(z),l5=!0,!1;if(z.tag!==b&&(z.tag!==M||PM(z.type)&&!Q9(z.type,z.memoizedProps))){var Q=S5;if(Q)if(R9(z))IB(z),N9();else while(Q)FB(z,Q),Q=xX(Q)}if(AB(z),z.tag===k)S5=Qw(z);else S5=T7?xX(z.stateNode):null;return!0}function Xw(){return l5&&S5!==null}function IB(z){var Q=S5;while(Q)wB(z,Q),Q=xX(Q)}function YQ(){T7=null,S5=null,l5=!1,Zz=!1}function TB(){if(R8!==null)wW(R8),R8=null}function k7(){return l5}function w9(z){if(R8===null)R8=[z];else R8.push(z)}var Zw=Y.ReactCurrentBatchConfig,Jw=null;function Yw(){return Zw.transition}var i5={recordUnsafeLifecycleWarnings:function(z,Q){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(z,Q){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var $w=function(z){var Q=null,X=z;while(X!==null){if(X.mode&i4)Q=X;X=X.return}return Q},Jz=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],Yz=new Set;i5.recordUnsafeLifecycleWarnings=function(z,Q){if(Yz.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)dX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillMount==="function")lX.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)iX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillReceiveProps==="function")oX.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)aX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillUpdate==="function")nX.push(z)},i5.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(dX.length>0)dX.forEach(function(c){z.add(S1(c)||"Component"),Yz.add(c.type)}),dX=[];var Q=new Set;if(lX.length>0)lX.forEach(function(c){Q.add(S1(c)||"Component"),Yz.add(c.type)}),lX=[];var X=new Set;if(iX.length>0)iX.forEach(function(c){X.add(S1(c)||"Component"),Yz.add(c.type)}),iX=[];var Z=new Set;if(oX.length>0)oX.forEach(function(c){Z.add(S1(c)||"Component"),Yz.add(c.type)}),oX=[];var J=new Set;if(aX.length>0)aX.forEach(function(c){J.add(S1(c)||"Component"),Yz.add(c.type)}),aX=[];var $=new Set;if(nX.length>0)nX.forEach(function(c){$.add(S1(c)||"Component"),Yz.add(c.type)}),nX=[];if(Q.size>0){var H=Jz(Q);q(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
31
|
+
Check the render method of \``+z+"`.";return""}var tQ=["value","defaultValue"];function C3(z){{Sz("select",z);for(var Q=0;Q<tQ.length;Q++){var X=tQ[Q];if(z[X]==null)continue;var Z=z4(z[X]);if(z.multiple&&!Z)q("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,hz());else if(!z.multiple&&Z)q("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,hz())}}}function I6(z,Q,X,Z){var J=z.options;if(Q){var $=X,H={};for(var B=0;B<$.length;B++)H["$"+$[B]]=!0;for(var W=0;W<J.length;W++){var F=H.hasOwnProperty("$"+J[W].value);if(J[W].selected!==F)J[W].selected=F;if(F&&Z)J[W].defaultSelected=!0}}else{var I=Y5(H6(X)),d=null;for(var c=0;c<J.length;c++){if(J[c].value===I){if(J[c].selected=!0,Z)J[c].defaultSelected=!0;return}if(d===null&&!J[c].disabled)d=J[c]}if(d!==null)d.selected=!0}}function sQ(z,Q){return y1({},Q,{value:void 0})}function eQ(z,Q){var X=z;if(C3(Q),X._wrapperState={wasMultiple:!!Q.multiple},Q.value!==void 0&&Q.defaultValue!==void 0&&!u8)q("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),u8=!0}function S3(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)I6(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)I6(X,!!Q.multiple,Q.defaultValue,!0)}function NO(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var J=Q.value;if(J!=null)I6(X,!!Q.multiple,J,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)I6(X,!!Q.multiple,Q.defaultValue,!0);else I6(X,!!Q.multiple,Q.multiple?[]:"",!1)}function MO(z,Q){var X=z,Z=Q.value;if(Z!=null)I6(X,!!Q.multiple,Z,!1)}var G2=!1;function v3(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=y1({},Q,{value:void 0,defaultValue:void 0,children:Y5(X._wrapperState.initialValue)});return Z}function q2(z,Q){var X=z;if(Sz("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!G2)q("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Z8()||"A component"),G2=!0;var Z=Q.value;if(Z==null){var{children:J,defaultValue:$}=Q;if(J!=null){q("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if($!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(z4(J)){if(J.length>1)throw Error("<textarea> can only have at most one child.");J=J[0]}$=J}}if($==null)$="";Z=$}X._wrapperState={initialValue:H6(Z)}}function B2(z,Q){var X=z,Z=H6(Q.value),J=H6(Q.defaultValue);if(Z!=null){var $=Y5(Z);if($!==X.value)X.value=$;if(Q.defaultValue==null&&X.defaultValue!==$)X.defaultValue=$}if(J!=null)X.defaultValue=Y5(J)}function U2(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function wO(z,Q){B2(z,Q)}var T6="http://www.w3.org/1999/xhtml",FO="http://www.w3.org/1998/Math/MathML",f3="http://www.w3.org/2000/svg";function h3(z){switch(z){case"svg":return f3;case"math":return FO;default:return T6}}function y3(z,Q){if(z==null||z===T6)return h3(Q);if(z===f3&&Q==="foreignObject")return T6;return z}var PO=function(z){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(Q,X,Z,J){MSApp.execUnsafeLocalFunction(function(){return z(Q,X,Z,J)})};else return z},XJ,W2=PO(function(z,Q){if(z.namespaceURI===f3){if(!("innerHTML"in z)){XJ=XJ||document.createElement("div"),XJ.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=XJ.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),$5=1,k6=3,z7=8,C6=9,V3=11,ZJ=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===k6){X.nodeValue=Q;return}}z.textContent=Q},bO={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},zX={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};function AO(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var IO=["Webkit","ms","Moz","O"];Object.keys(zX).forEach(function(z){IO.forEach(function(Q){zX[AO(Q,z)]=zX[z]})});function D3(z,Q,X){var Z=Q==null||typeof Q==="boolean"||Q==="";if(Z)return"";if(!X&&typeof Q==="number"&&Q!==0&&!(zX.hasOwnProperty(z)&&zX[z]))return Q+"px";return i1(Q,z),(""+Q).trim()}var TO=/([A-Z])/g,kO=/^ms-/;function CO(z){return z.replace(TO,"-$1").toLowerCase().replace(kO,"-ms-")}var K2=function(){};{var SO=/^(?:webkit|moz|o)[A-Z]/,vO=/^-ms-/,fO=/-(.)/g,O2=/;\s*$/,yz={},m3={},_2=!1,L2=!1,hO=function(z){return z.replace(fO,function(Q,X){return X.toUpperCase()})},yO=function(z){if(yz.hasOwnProperty(z)&&yz[z])return;yz[z]=!0,q("Unsupported style property %s. Did you mean %s?",z,hO(z.replace(vO,"ms-")))},VO=function(z){if(yz.hasOwnProperty(z)&&yz[z])return;yz[z]=!0,q("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},DO=function(z,Q){if(m3.hasOwnProperty(Q)&&m3[Q])return;m3[Q]=!0,q(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,z,Q.replace(O2,""))},mO=function(z,Q){if(_2)return;_2=!0,q("`NaN` is an invalid value for the `%s` css style property.",z)},EO=function(z,Q){if(L2)return;L2=!0,q("`Infinity` is an invalid value for the `%s` css style property.",z)};K2=function(z,Q){if(z.indexOf("-")>-1)yO(z);else if(SO.test(z))VO(z);else if(O2.test(Q))DO(z,Q);if(typeof Q==="number"){if(isNaN(Q))mO(z,Q);else if(!isFinite(Q))EO(z,Q)}}}var uO=K2;function gO(z){{var Q="",X="";for(var Z in z){if(!z.hasOwnProperty(Z))continue;var J=z[Z];if(J!=null){var $=Z.indexOf("--")===0;Q+=X+($?Z:CO(Z))+":",Q+=D3(Z,J,$),X=";"}}return Q||null}}function R2(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var J=Z.indexOf("--")===0;if(!J)uO(Z,Q[Z]);var $=D3(Z,Q[Z],J);if(Z==="float")Z="cssFloat";if(J)X.setProperty(Z,$);else X[Z]=$}}function xO(z){return z==null||typeof z==="boolean"||z===""}function N2(z){var Q={};for(var X in z){var Z=bO[X]||[X];for(var J=0;J<Z.length;J++)Q[Z[J]]=X}return Q}function jO(z,Q){{if(!Q)return;var X=N2(z),Z=N2(Q),J={};for(var $ in X){var H=X[$],B=Z[$];if(B&&H!==B){var W=H+","+B;if(J[W])continue;J[W]=!0,q("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",xO(z[H])?"Removing":"Updating",H,B)}}}}var pO={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},cO=y1({menuitem:!0},pO),dO="__html";function E3(z,Q){if(!Q)return;if(cO[z]){if(Q.children!=null||Q.dangerouslySetInnerHTML!=null)throw Error(z+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(Q.dangerouslySetInnerHTML!=null){if(Q.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof Q.dangerouslySetInnerHTML!=="object"||!(dO in Q.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!Q.suppressContentEditableWarning&&Q.contentEditable&&Q.children!=null)q("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");if(Q.style!=null&&typeof Q.style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}function g8(z,Q){if(z.indexOf("-")===-1)return typeof Q.is==="string";switch(z){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 JJ={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},M2={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Vz={},lO=new RegExp("^(aria)-["+e4+"]*$"),iO=new RegExp("^(aria)[A-Z]["+e4+"]*$");function oO(z,Q){{if(h1.call(Vz,Q)&&Vz[Q])return!0;if(iO.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=M2.hasOwnProperty(X)?X:null;if(Z==null)return q("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),Vz[Q]=!0,!0;if(Q!==Z)return q("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),Vz[Q]=!0,!0}if(lO.test(Q)){var J=Q.toLowerCase(),$=M2.hasOwnProperty(J)?J:null;if($==null)return Vz[Q]=!0,!1;if(Q!==$)return q("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,$),Vz[Q]=!0,!0}}return!0}function aO(z,Q){{var X=[];for(var Z in Q){var J=oO(z,Z);if(!J)X.push(Z)}var $=X.map(function(H){return"`"+H+"`"}).join(", ");if(X.length===1)q("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z);else if(X.length>1)q("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",$,z)}}function nO(z,Q){if(g8(z,Q))return;aO(z,Q)}var w2=!1;function rO(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!w2)if(w2=!0,z==="select"&&Q.multiple)q("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",z);else q("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",z)}}var F2=function(){};{var n7={},P2=/^on./,tO=/^on[^A-Z]/,sO=new RegExp("^(aria)-["+e4+"]*$"),eO=new RegExp("^(aria)[A-Z]["+e4+"]*$");F2=function(z,Q,X,Z){if(h1.call(n7,Q)&&n7[Q])return!0;var J=Q.toLowerCase();if(J==="onfocusin"||J==="onfocusout")return q("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),n7[Q]=!0,!0;if(Z!=null){var{registrationNameDependencies:$,possibleRegistrationNames:H}=Z;if($.hasOwnProperty(Q))return!0;var B=H.hasOwnProperty(J)?H[J]:null;if(B!=null)return q("Invalid event handler property `%s`. Did you mean `%s`?",Q,B),n7[Q]=!0,!0;if(P2.test(Q))return q("Unknown event handler property `%s`. It will be ignored.",Q),n7[Q]=!0,!0}else if(P2.test(Q)){if(tO.test(Q))q("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return n7[Q]=!0,!0}if(sO.test(Q)||eO.test(Q))return!0;if(J==="innerhtml")return q("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),n7[Q]=!0,!0;if(J==="aria")return q("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),n7[Q]=!0,!0;if(J==="is"&&X!==null&&X!==void 0&&typeof X!=="string")return q("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof X),n7[Q]=!0,!0;if(typeof X==="number"&&isNaN(X))return q("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Q),n7[Q]=!0,!0;var W=t4(Q),F=W!==null&&W.type===b7;if(JJ.hasOwnProperty(J)){var I=JJ[J];if(I!==Q)return q("Invalid DOM property `%s`. Did you mean `%s`?",Q,I),n7[Q]=!0,!0}else if(!F&&Q!==J)return q("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",Q,J),n7[Q]=!0,!0;if(typeof X==="boolean"&&u4(Q,X,W,!1)){if(X)q('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',X,Q,Q,X,Q);else q('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',X,Q,Q,X,Q,Q,Q);return n7[Q]=!0,!0}if(F)return!0;if(u4(Q,X,W,!1))return n7[Q]=!0,!1;if((X==="false"||X==="true")&&W!==null&&W.type===S4)return q("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",X,Q,X==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',Q,X),n7[Q]=!0,!0;return!0}}var z_=function(z,Q,X){{var Z=[];for(var J in Q){var $=F2(z,J,Q[J],X);if(!$)Z.push(J)}var H=Z.map(function(B){return"`"+B+"`"}).join(", ");if(Z.length===1)q("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",H,z);else if(Z.length>1)q("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",H,z)}};function Q_(z,Q,X){if(g8(z,Q))return;z_(z,Q,X)}var b2=1,u3=2,QX=4,X_=b2|u3|QX,XX=null;function Z_(z){if(XX!==null)q("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");XX=z}function J_(){if(XX===null)q("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");XX=null}function Y_(z){return z===XX}function g3(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===k6?Q.parentNode:Q}var x3=null,Dz=null,mz=null;function A2(z){var Q=K8(z);if(!Q)return;if(typeof x3!=="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var X=Q.stateNode;if(X){var Z=pJ(X);x3(Q.stateNode,Q.type,Z)}}function $_(z){x3=z}function I2(z){if(Dz)if(mz)mz.push(z);else mz=[z];else Dz=z}function H_(){return Dz!==null||mz!==null}function T2(){if(!Dz)return;var z=Dz,Q=mz;if(Dz=null,mz=null,A2(z),Q)for(var X=0;X<Q.length;X++)A2(Q[X])}var k2=function(z,Q){return z(Q)},C2=function(){},j3=!1;function G_(){var z=H_();if(z)C2(),T2()}function S2(z,Q,X){if(j3)return z(Q,X);j3=!0;try{return k2(z,Q,X)}finally{j3=!1,G_()}}function q_(z,Q,X){k2=z,C2=X}function B_(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function U_(z,Q,X){switch(z){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(X.disabled&&B_(Q));default:return!1}}function ZX(z,Q){var X=z.stateNode;if(X===null)return null;var Z=pJ(X);if(Z===null)return null;var J=Z[Q];if(U_(Q,z.type,Z))return null;if(J&&typeof J!=="function")throw Error("Expected `"+Q+"` listener to be a function, instead got a value of `"+typeof J+"` type.");return J}var p3=!1;if(Y1)try{var JX={};Object.defineProperty(JX,"passive",{get:function(){p3=!0}}),window.addEventListener("test",JX,JX),window.removeEventListener("test",JX,JX)}catch(z){p3=!1}function v2(z,Q,X,Z,J,$,H,B,W){var F=Array.prototype.slice.call(arguments,3);try{Q.apply(X,F)}catch(I){this.onError(I)}}var f2=v2;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var c3=document.createElement("react");f2=function(Q,X,Z,J,$,H,B,W,F){if(typeof document>"u"||document===null)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var I=document.createEvent("Event"),d=!1,c=!0,Z0=window.event,J0=Object.getOwnPropertyDescriptor(window,"event");function Y0(){if(c3.removeEventListener(G0,G1,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=Z0}var u0=Array.prototype.slice.call(arguments,3);function G1(){d=!0,Y0(),X.apply(Z,u0),c=!1}var z1,u1=!1,g1=!1;function r(t){if(z1=t.error,u1=!0,z1===null&&t.colno===0&&t.lineno===0)g1=!0;if(t.defaultPrevented){if(z1!=null&&typeof z1==="object")try{z1._suppressLogging=!0}catch(P0){}}}var G0="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",r),c3.addEventListener(G0,G1,!1),I.initEvent(G0,!1,!1),c3.dispatchEvent(I),J0)Object.defineProperty(window,"event",J0);if(d&&c){if(!u1)z1=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(g1)z1=Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");this.onError(z1)}if(window.removeEventListener("error",r),!d)return Y0(),v2.apply(this,arguments)}}var W_=f2,Ez=!1,YJ=null,$J=!1,d3=null,K_={onError:function(z){Ez=!0,YJ=z}};function l3(z,Q,X,Z,J,$,H,B,W){Ez=!1,YJ=null,W_.apply(K_,arguments)}function O_(z,Q,X,Z,J,$,H,B,W){if(l3.apply(this,arguments),Ez){var F=i3();if(!$J)$J=!0,d3=F}}function __(){if($J){var z=d3;throw $J=!1,d3=null,z}}function L_(){return Ez}function i3(){if(Ez){var z=YJ;return Ez=!1,YJ=null,z}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function uz(z){return z._reactInternals}function R_(z){return z._reactInternals!==void 0}function N_(z,Q){z._reactInternals=Q}var _1=0,gz=1,Q7=2,a1=4,x8=16,YX=32,o3=64,Q4=128,S6=256,$8=512,j8=1024,p5=2048,v6=4096,p8=8192,HJ=16384,M_=p5|a1|o3|$8|j8|HJ,w_=32767,$X=32768,r7=65536,a3=131072,h2=1048576,n3=2097152,c8=4194304,r3=8388608,f6=16777216,GJ=33554432,t3=a1|j8|0,s3=Q7|a1|x8|YX|$8|v6|p8,HX=a1|o3|$8|p8,xz=p5|x8,h6=c8|r3|n3,F_=Y.ReactCurrentOwner;function d8(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(Q7|v6))!==_1)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===b)return X;return null}function y2(z){if(z.tag===k){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null)Q=X.memoizedState}if(Q!==null)return Q.dehydrated}return null}function V2(z){return z.tag===b?z.stateNode.containerInfo:null}function P_(z){return d8(z)===z}function b_(z){{var Q=F_.current;if(Q!==null&&Q.tag===_){var X=Q,Z=X.stateNode;if(!Z._warnedAboutRefsInRender)q("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",S1(X)||"A component");Z._warnedAboutRefsInRender=!0}}var J=uz(z);if(!J)return!1;return d8(J)===J}function D2(z){if(d8(z)!==z)throw Error("Unable to find node on an unmounted component.")}function m2(z){var Q=z.alternate;if(!Q){var X=d8(z);if(X===null)throw Error("Unable to find node on an unmounted component.");if(X!==z)return null;return z}var Z=z,J=Q;while(!0){var $=Z.return;if($===null)break;var H=$.alternate;if(H===null){var B=$.return;if(B!==null){Z=J=B;continue}break}if($.child===H.child){var W=$.child;while(W){if(W===Z)return D2($),z;if(W===J)return D2($),Q;W=W.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==J.return)Z=$,J=H;else{var F=!1,I=$.child;while(I){if(I===Z){F=!0,Z=$,J=H;break}if(I===J){F=!0,J=$,Z=H;break}I=I.sibling}if(!F){I=H.child;while(I){if(I===Z){F=!0,Z=H,J=$;break}if(I===J){F=!0,J=H,Z=$;break}I=I.sibling}if(!F)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==J)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==b)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function E2(z){var Q=m2(z);return Q!==null?u2(Q):null}function u2(z){if(z.tag===M||z.tag===w)return z;var Q=z.child;while(Q!==null){var X=u2(Q);if(X!==null)return X;Q=Q.sibling}return null}function A_(z){var Q=m2(z);return Q!==null?g2(Q):null}function g2(z){if(z.tag===M||z.tag===w)return z;var Q=z.child;while(Q!==null){if(Q.tag!==P){var X=g2(Q);if(X!==null)return X}Q=Q.sibling}return null}var x2=_4.unstable_scheduleCallback,I_=_4.unstable_cancelCallback,T_=_4.unstable_shouldYield,k_=_4.unstable_requestPaint,M7=_4.unstable_now,C_=_4.unstable_getCurrentPriorityLevel,qJ=_4.unstable_ImmediatePriority,e3=_4.unstable_UserBlockingPriority,l8=_4.unstable_NormalPriority,S_=_4.unstable_LowPriority,z$=_4.unstable_IdlePriority,v_=_4.unstable_yieldValue,f_=_4.unstable_setDisableYieldValue,i8=null,I7=null,x0=null,G6=!1,c5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function h_(z){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var Q=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Q.isDisabled)return!0;if(!Q.supportsFiber)return q("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{if(T0)z=y1({},z,{getLaneLabelMap:u_,injectProfilingHooks:E_});i8=Q.inject(z),I7=Q}catch(X){q("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function y_(z,Q){if(I7&&typeof I7.onScheduleFiberRoot==="function")try{I7.onScheduleFiberRoot(i8,z,Q)}catch(X){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",X)}}function V_(z,Q){if(I7&&typeof I7.onCommitFiberRoot==="function")try{var X=(z.current.flags&Q4)===Q4;if(v0){var Z;switch(Q){case N5:Z=qJ;break;case V6:Z=e3;break;case D6:Z=l8;break;case RJ:Z=z$;break;default:Z=l8;break}I7.onCommitFiberRoot(i8,z,Z,X)}else I7.onCommitFiberRoot(i8,z,void 0,X)}catch(J){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",J)}}function D_(z){if(I7&&typeof I7.onPostCommitFiberRoot==="function")try{I7.onPostCommitFiberRoot(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}function m_(z){if(I7&&typeof I7.onCommitFiberUnmount==="function")try{I7.onCommitFiberUnmount(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}function w7(z){{if(typeof v_==="function")f_(z),U(z);if(I7&&typeof I7.setStrictMode==="function")try{I7.setStrictMode(i8,z)}catch(Q){if(!G6)G6=!0,q("React instrumentation encountered an error: %s",Q)}}}function E_(z){x0=z}function u_(){{var z=new Map,Q=1;for(var X=0;X<X$;X++){var Z=JL(Q);z.set(Q,Z),Q*=2}return z}}function g_(z){if(x0!==null&&typeof x0.markCommitStarted==="function")x0.markCommitStarted(z)}function j2(){if(x0!==null&&typeof x0.markCommitStopped==="function")x0.markCommitStopped()}function GX(z){if(x0!==null&&typeof x0.markComponentRenderStarted==="function")x0.markComponentRenderStarted(z)}function jz(){if(x0!==null&&typeof x0.markComponentRenderStopped==="function")x0.markComponentRenderStopped()}function x_(z){if(x0!==null&&typeof x0.markComponentPassiveEffectMountStarted==="function")x0.markComponentPassiveEffectMountStarted(z)}function j_(){if(x0!==null&&typeof x0.markComponentPassiveEffectMountStopped==="function")x0.markComponentPassiveEffectMountStopped()}function p_(z){if(x0!==null&&typeof x0.markComponentPassiveEffectUnmountStarted==="function")x0.markComponentPassiveEffectUnmountStarted(z)}function c_(){if(x0!==null&&typeof x0.markComponentPassiveEffectUnmountStopped==="function")x0.markComponentPassiveEffectUnmountStopped()}function d_(z){if(x0!==null&&typeof x0.markComponentLayoutEffectMountStarted==="function")x0.markComponentLayoutEffectMountStarted(z)}function l_(){if(x0!==null&&typeof x0.markComponentLayoutEffectMountStopped==="function")x0.markComponentLayoutEffectMountStopped()}function p2(z){if(x0!==null&&typeof x0.markComponentLayoutEffectUnmountStarted==="function")x0.markComponentLayoutEffectUnmountStarted(z)}function c2(){if(x0!==null&&typeof x0.markComponentLayoutEffectUnmountStopped==="function")x0.markComponentLayoutEffectUnmountStopped()}function i_(z,Q,X){if(x0!==null&&typeof x0.markComponentErrored==="function")x0.markComponentErrored(z,Q,X)}function o_(z,Q,X){if(x0!==null&&typeof x0.markComponentSuspended==="function")x0.markComponentSuspended(z,Q,X)}function a_(z){if(x0!==null&&typeof x0.markLayoutEffectsStarted==="function")x0.markLayoutEffectsStarted(z)}function n_(){if(x0!==null&&typeof x0.markLayoutEffectsStopped==="function")x0.markLayoutEffectsStopped()}function r_(z){if(x0!==null&&typeof x0.markPassiveEffectsStarted==="function")x0.markPassiveEffectsStarted(z)}function t_(){if(x0!==null&&typeof x0.markPassiveEffectsStopped==="function")x0.markPassiveEffectsStopped()}function d2(z){if(x0!==null&&typeof x0.markRenderStarted==="function")x0.markRenderStarted(z)}function s_(){if(x0!==null&&typeof x0.markRenderYielded==="function")x0.markRenderYielded()}function l2(){if(x0!==null&&typeof x0.markRenderStopped==="function")x0.markRenderStopped()}function e_(z){if(x0!==null&&typeof x0.markRenderScheduled==="function")x0.markRenderScheduled(z)}function zL(z,Q){if(x0!==null&&typeof x0.markForceUpdateScheduled==="function")x0.markForceUpdateScheduled(z,Q)}function Q$(z,Q){if(x0!==null&&typeof x0.markStateUpdateScheduled==="function")x0.markStateUpdateScheduled(z,Q)}var K1=0,c1=1,W4=2,i4=8,q6=16,i2=Math.clz32?Math.clz32:ZL,QL=Math.log,XL=Math.LN2;function ZL(z){var Q=z>>>0;if(Q===0)return 32;return 31-(QL(Q)/XL|0)|0}var X$=31,M0=0,F7=0,w1=1,pz=2,y6=4,o8=8,B6=16,qX=32,cz=4194240,BX=64,Z$=128,J$=256,Y$=512,$$=1024,H$=2048,G$=4096,q$=8192,B$=16384,U$=32768,W$=65536,K$=131072,O$=262144,_$=524288,L$=1048576,R$=2097152,BJ=130023424,dz=4194304,N$=8388608,M$=16777216,w$=33554432,F$=67108864,o2=dz,UX=134217728,a2=268435455,WX=268435456,a8=536870912,L5=1073741824;function JL(z){{if(z&w1)return"Sync";if(z&pz)return"InputContinuousHydration";if(z&y6)return"InputContinuous";if(z&o8)return"DefaultHydration";if(z&B6)return"Default";if(z&qX)return"TransitionHydration";if(z&cz)return"Transition";if(z&BJ)return"Retry";if(z&UX)return"SelectiveHydration";if(z&WX)return"IdleHydration";if(z&a8)return"Idle";if(z&L5)return"Offscreen"}}var f4=-1,UJ=BX,WJ=dz;function KX(z){switch(n8(z)){case w1:return w1;case pz:return pz;case y6:return y6;case o8:return o8;case B6:return B6;case qX:return qX;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:return z&cz;case dz:case N$:case M$:case w$:case F$:return z&BJ;case UX:return UX;case WX:return WX;case a8:return a8;case L5:return L5;default:return q("Should have found matching lanes. This is a bug in React."),z}}function KJ(z,Q){var X=z.pendingLanes;if(X===M0)return M0;var Z=M0,J=z.suspendedLanes,$=z.pingedLanes,H=X&a2;if(H!==M0){var B=H&~J;if(B!==M0)Z=KX(B);else{var W=H&$;if(W!==M0)Z=KX(W)}}else{var F=X&~J;if(F!==M0)Z=KX(F);else if($!==M0)Z=KX($)}if(Z===M0)return M0;if(Q!==M0&&Q!==Z&&(Q&J)===M0){var I=n8(Z),d=n8(Q);if(I>=d||I===B6&&(d&cz)!==M0)return Q}if((Z&y6)!==M0)Z|=X&B6;var c=z.entangledLanes;if(c!==M0){var Z0=z.entanglements,J0=Z&c;while(J0>0){var Y0=r8(J0),u0=1<<Y0;Z|=Z0[Y0],J0&=~u0}}return Z}function YL(z,Q){var X=z.eventTimes,Z=f4;while(Q>0){var J=r8(Q),$=1<<J,H=X[J];if(H>Z)Z=H;Q&=~$}return Z}function $L(z,Q){switch(z){case w1:case pz:case y6:return Q+250;case o8:case B6:case qX:case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:return Q+5000;case dz:case N$:case M$:case w$:case F$:return f4;case UX:case WX:case a8:case L5:return f4;default:return q("Should have found matching lanes. This is a bug in React."),f4}}function HL(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:J,expirationTimes:$}=z,H=X;while(H>0){var B=r8(H),W=1<<B,F=$[B];if(F===f4){if((W&Z)===M0||(W&J)!==M0)$[B]=$L(W,Q)}else if(F<=Q)z.expiredLanes|=W;H&=~W}}function GL(z){return KX(z.pendingLanes)}function P$(z){var Q=z.pendingLanes&~L5;if(Q!==M0)return Q;if(Q&L5)return L5;return M0}function qL(z){return(z&w1)!==M0}function b$(z){return(z&a2)!==M0}function n2(z){return(z&BJ)===z}function BL(z){var Q=w1|y6|B6;return(z&Q)===M0}function UL(z){return(z&cz)===z}function OJ(z,Q){var X=pz|y6|o8|B6;return(Q&X)!==M0}function WL(z,Q){return(Q&z.expiredLanes)!==M0}function r2(z){return(z&cz)!==M0}function t2(){var z=UJ;if(UJ<<=1,(UJ&cz)===M0)UJ=BX;return z}function KL(){var z=WJ;if(WJ<<=1,(WJ&BJ)===M0)WJ=dz;return z}function n8(z){return z&-z}function OX(z){return n8(z)}function r8(z){return 31-i2(z)}function A$(z){return r8(z)}function R5(z,Q){return(z&Q)!==M0}function lz(z,Q){return(z&Q)===Q}function v1(z,Q){return z|Q}function _J(z,Q){return z&~Q}function s2(z,Q){return z&Q}function LJ(z){return z}function OL(z,Q){return z!==F7&&z<Q?z:Q}function I$(z){var Q=[];for(var X=0;X<X$;X++)Q.push(z);return Q}function _X(z,Q,X){if(z.pendingLanes|=Q,Q!==a8)z.suspendedLanes=M0,z.pingedLanes=M0;var Z=z.eventTimes,J=A$(Q);Z[J]=X}function _L(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var J=r8(Z),$=1<<J;X[J]=f4,Z&=~$}}function e2(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function LL(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=M0,z.pingedLanes=M0,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:J,expirationTimes:$}=z,H=X;while(H>0){var B=r8(H),W=1<<B;Z[B]=M0,J[B]=f4,$[B]=f4,H&=~W}}function T$(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,J=X;while(J){var $=r8(J),H=1<<$;if(H&Q|Z[$]&Q)Z[$]|=Q;J&=~H}}function RL(z,Q){var X=n8(Q),Z;switch(X){case y6:Z=pz;break;case B6:Z=o8;break;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case W$:case K$:case O$:case _$:case L$:case R$:case dz:case N$:case M$:case w$:case F$:Z=qX;break;case a8:Z=WX;break;default:Z=F7;break}if((Z&(z.suspendedLanes|Q))!==F7)return F7;return Z}function zq(z,Q,X){if(!c5)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var J=A$(X),$=1<<J,H=Z[J];H.add(Q),X&=~$}}function Qq(z,Q){if(!c5)return;var{pendingUpdatersLaneMap:X,memoizedUpdaters:Z}=z;while(Q>0){var J=A$(Q),$=1<<J,H=X[J];if(H.size>0)H.forEach(function(B){var W=B.alternate;if(W===null||!Z.has(W))Z.add(B)}),H.clear();Q&=~$}}function Xq(z,Q){return null}var N5=w1,V6=y6,D6=B6,RJ=a8,LX=F7;function d5(){return LX}function P7(z){LX=z}function NL(z,Q){var X=LX;try{return LX=z,Q()}finally{LX=X}}function ML(z,Q){return z!==0&&z<Q?z:Q}function wL(z,Q){return z===0||z>Q?z:Q}function k$(z,Q){return z!==0&&z<Q}function Zq(z){var Q=n8(z);if(!k$(N5,Q))return N5;if(!k$(V6,Q))return V6;if(b$(Q))return D6;return RJ}function NJ(z){var Q=z.current.memoizedState;return Q.isDehydrated}var Jq;function FL(z){Jq=z}function PL(z){Jq(z)}var C$;function bL(z){C$=z}var Yq;function AL(z){Yq=z}var $q;function IL(z){$q=z}var Hq;function TL(z){Hq=z}var S$=!1,MJ=[],H8=null,G8=null,q8=null,RX=new Map,NX=new Map,B8=[],kL=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function CL(z){return kL.indexOf(z)>-1}function SL(z,Q,X,Z,J){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:J,targetContainers:[Z]}}function Gq(z,Q){switch(z){case"focusin":case"focusout":H8=null;break;case"dragenter":case"dragleave":G8=null;break;case"mouseover":case"mouseout":q8=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;RX.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;NX.delete(Z);break}}}function MX(z,Q,X,Z,J,$){if(z===null||z.nativeEvent!==$){var H=SL(Q,X,Z,J,$);if(Q!==null){var B=K8(Q);if(B!==null)C$(B)}return H}z.eventSystemFlags|=Z;var W=z.targetContainers;if(J!==null&&W.indexOf(J)===-1)W.push(J);return z}function vL(z,Q,X,Z,J){switch(Q){case"focusin":{var $=J;return H8=MX(H8,z,Q,X,Z,$),!0}case"dragenter":{var H=J;return G8=MX(G8,z,Q,X,Z,H),!0}case"mouseover":{var B=J;return q8=MX(q8,z,Q,X,Z,B),!0}case"pointerover":{var W=J,F=W.pointerId;return RX.set(F,MX(RX.get(F)||null,z,Q,X,Z,W)),!0}case"gotpointercapture":{var I=J,d=I.pointerId;return NX.set(d,MX(NX.get(d)||null,z,Q,X,Z,I)),!0}}return!1}function qq(z){var Q=e8(z.target);if(Q!==null){var X=d8(Q);if(X!==null){var Z=X.tag;if(Z===k){var J=y2(X);if(J!==null){z.blockedOn=J,Hq(z.priority,function(){Yq(X)});return}}else if(Z===b){var $=X.stateNode;if(NJ($)){z.blockedOn=V2(X);return}}}}z.blockedOn=null}function fL(z){var Q=$q(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<B8.length;Z++)if(!k$(Q,B8[Z].priority))break;if(B8.splice(Z,0,X),Z===0)qq(X)}function wJ(z){if(z.blockedOn!==null)return!1;var Q=z.targetContainers;while(Q.length>0){var X=Q[0],Z=h$(z.domEventName,z.eventSystemFlags,X,z.nativeEvent);if(Z===null){var J=z.nativeEvent,$=new J.constructor(J.type,J);Z_($),J.target.dispatchEvent($),J_()}else{var H=K8(Z);if(H!==null)C$(H);return z.blockedOn=Z,!1}Q.shift()}return!0}function Bq(z,Q,X){if(wJ(z))X.delete(Q)}function hL(){if(S$=!1,H8!==null&&wJ(H8))H8=null;if(G8!==null&&wJ(G8))G8=null;if(q8!==null&&wJ(q8))q8=null;RX.forEach(Bq),NX.forEach(Bq)}function wX(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!S$)S$=!0,_4.unstable_scheduleCallback(_4.unstable_NormalPriority,hL)}}function FX(z){if(MJ.length>0){wX(MJ[0],z);for(var Q=1;Q<MJ.length;Q++){var X=MJ[Q];if(X.blockedOn===z)X.blockedOn=null}}if(H8!==null)wX(H8,z);if(G8!==null)wX(G8,z);if(q8!==null)wX(q8,z);var Z=function(B){return wX(B,z)};RX.forEach(Z),NX.forEach(Z);for(var J=0;J<B8.length;J++){var $=B8[J];if($.blockedOn===z)$.blockedOn=null}while(B8.length>0){var H=B8[0];if(H.blockedOn!==null)break;else if(qq(H),H.blockedOn===null)B8.shift()}}var iz=Y.ReactCurrentBatchConfig,v$=!0;function Uq(z){v$=!!z}function yL(){return v$}function VL(z,Q,X){var Z=Wq(Q),J;switch(Z){case N5:J=DL;break;case V6:J=mL;break;case D6:default:J=f$;break}return J.bind(null,Q,X,z)}function DL(z,Q,X,Z){var J=d5(),$=iz.transition;iz.transition=null;try{P7(N5),f$(z,Q,X,Z)}finally{P7(J),iz.transition=$}}function mL(z,Q,X,Z){var J=d5(),$=iz.transition;iz.transition=null;try{P7(V6),f$(z,Q,X,Z)}finally{P7(J),iz.transition=$}}function f$(z,Q,X,Z){if(!v$)return;EL(z,Q,X,Z)}function EL(z,Q,X,Z){var J=h$(z,Q,X,Z);if(J===null){i$(z,Q,Z,FJ,X),Gq(z,Z);return}if(vL(J,z,Q,X,Z)){Z.stopPropagation();return}if(Gq(z,Z),Q&QX&&CL(z)){while(J!==null){var $=K8(J);if($!==null)PL($);var H=h$(z,Q,X,Z);if(H===null)i$(z,Q,Z,FJ,X);if(H===J)break;J=H}if(J!==null)Z.stopPropagation();return}i$(z,Q,Z,null,X)}var FJ=null;function h$(z,Q,X,Z){FJ=null;var J=g3(Z),$=e8(J);if($!==null){var H=d8($);if(H===null)$=null;else{var B=H.tag;if(B===k){var W=y2(H);if(W!==null)return W;$=null}else if(B===b){var F=H.stateNode;if(NJ(F))return V2(H);$=null}else if(H!==$)$=null}}return FJ=$,null}function Wq(z){switch(z){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return N5;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return V6;case"message":{var Q=C_();switch(Q){case qJ:return N5;case e3:return V6;case l8:case S_:return D6;case z$:return RJ;default:return D6}}default:return D6}}function uL(z,Q,X){return z.addEventListener(Q,X,!1),X}function gL(z,Q,X){return z.addEventListener(Q,X,!0),X}function xL(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function jL(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var PX=null,y$=null,bX=null;function pL(z){return PX=z,y$=Oq(),!0}function cL(){PX=null,y$=null,bX=null}function Kq(){if(bX)return bX;var z,Q=y$,X=Q.length,Z,J=Oq(),$=J.length;for(z=0;z<X;z++)if(Q[z]!==J[z])break;var H=X-z;for(Z=1;Z<=H;Z++)if(Q[X-Z]!==J[$-Z])break;var B=Z>1?1-Z:void 0;return bX=J.slice(z,B),bX}function Oq(){if("value"in PX)return PX.value;return PX.textContent}function PJ(z){var Q,X=z.keyCode;if("charCode"in z){if(Q=z.charCode,Q===0&&X===13)Q=13}else Q=X;if(Q===10)Q=13;if(Q>=32||Q===13)return Q;return 0}function bJ(){return!0}function _q(){return!1}function M5(z){function Q(X,Z,J,$,H){this._reactName=X,this._targetInst=J,this.type=Z,this.nativeEvent=$,this.target=H,this.currentTarget=null;for(var B in z){if(!z.hasOwnProperty(B))continue;var W=z[B];if(W)this[B]=W($);else this[B]=$[B]}var F=$.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1;if(F)this.isDefaultPrevented=bJ;else this.isDefaultPrevented=_q;return this.isPropagationStopped=_q,this}return y1(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var X=this.nativeEvent;if(!X)return;if(X.preventDefault)X.preventDefault();else if(typeof X.returnValue!=="unknown")X.returnValue=!1;this.isDefaultPrevented=bJ},stopPropagation:function(){var X=this.nativeEvent;if(!X)return;if(X.stopPropagation)X.stopPropagation();else if(typeof X.cancelBubble!=="unknown")X.cancelBubble=!0;this.isPropagationStopped=bJ},persist:function(){},isPersistent:bJ}),Q}var oz={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},V$=M5(oz),AX=y1({},oz,{view:0,detail:0}),dL=M5(AX),D$,m$,IX;function lL(z){if(z!==IX){if(IX&&z.type==="mousemove")D$=z.screenX-IX.screenX,m$=z.screenY-IX.screenY;else D$=0,m$=0;IX=z}}var AJ=y1({},AX,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:u$,button:0,buttons:0,relatedTarget:function(z){if(z.relatedTarget===void 0)return z.fromElement===z.srcElement?z.toElement:z.fromElement;return z.relatedTarget},movementX:function(z){if("movementX"in z)return z.movementX;return lL(z),D$},movementY:function(z){if("movementY"in z)return z.movementY;return m$}}),Lq=M5(AJ),iL=y1({},AJ,{dataTransfer:0}),oL=M5(iL),aL=y1({},AX,{relatedTarget:0}),E$=M5(aL),nL=y1({},oz,{animationName:0,elapsedTime:0,pseudoElement:0}),rL=M5(nL),tL=y1({},oz,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),sL=M5(tL),eL=y1({},oz,{data:0}),Rq=M5(eL),zR=Rq,QR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XR={"8":"Backspace","9":"Tab","12":"Clear","13":"Enter","16":"Shift","17":"Control","18":"Alt","19":"Pause","20":"CapsLock","27":"Escape","32":" ","33":"PageUp","34":"PageDown","35":"End","36":"Home","37":"ArrowLeft","38":"ArrowUp","39":"ArrowRight","40":"ArrowDown","45":"Insert","46":"Delete","112":"F1","113":"F2","114":"F3","115":"F4","116":"F5","117":"F6","118":"F7","119":"F8","120":"F9","121":"F10","122":"F11","123":"F12","144":"NumLock","145":"ScrollLock","224":"Meta"};function ZR(z){if(z.key){var Q=QR[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=PJ(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return XR[z.keyCode]||"Unidentified";return""}var JR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YR(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=JR[z];return Z?!!X[Z]:!1}function u$(z){return YR}var $R=y1({},AX,{key:ZR,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:u$,charCode:function(z){if(z.type==="keypress")return PJ(z);return 0},keyCode:function(z){if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0},which:function(z){if(z.type==="keypress")return PJ(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),HR=M5($R),GR=y1({},AJ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nq=M5(GR),qR=y1({},AX,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:u$}),BR=M5(qR),UR=y1({},oz,{propertyName:0,elapsedTime:0,pseudoElement:0}),WR=M5(UR),KR=y1({},AJ,{deltaX:function(z){return"deltaX"in z?z.deltaX:("wheelDeltaX"in z)?-z.wheelDeltaX:0},deltaY:function(z){return"deltaY"in z?z.deltaY:("wheelDeltaY"in z)?-z.wheelDeltaY:("wheelDelta"in z)?-z.wheelDelta:0},deltaZ:0,deltaMode:0}),OR=M5(KR),_R=[9,13,27,32],Mq=229,g$=Y1&&"CompositionEvent"in window,TX=null;if(Y1&&"documentMode"in document)TX=document.documentMode;var LR=Y1&&"TextEvent"in window&&!TX,wq=Y1&&(!g$||TX&&TX>8&&TX<=11),Fq=32,Pq=String.fromCharCode(Fq);function RR(){J1("onBeforeInput",["compositionend","keypress","textInput","paste"]),J1("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),J1("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),J1("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var bq=!1;function NR(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function MR(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function wR(z,Q){return z==="keydown"&&Q.keyCode===Mq}function Aq(z,Q){switch(z){case"keyup":return _R.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==Mq;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iq(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function Tq(z){return z.locale==="ko"}var az=!1;function FR(z,Q,X,Z,J){var $,H;if(g$)$=MR(Q);else if(!az){if(wR(Q,Z))$="onCompositionStart"}else if(Aq(Q,Z))$="onCompositionEnd";if(!$)return null;if(wq&&!Tq(Z)){if(!az&&$==="onCompositionStart")az=pL(J);else if($==="onCompositionEnd"){if(az)H=Kq()}}var B=SJ(X,$);if(B.length>0){var W=new Rq($,Q,null,Z,J);if(z.push({event:W,listeners:B}),H)W.data=H;else{var F=Iq(Z);if(F!==null)W.data=F}}}function PR(z,Q){switch(z){case"compositionend":return Iq(Q);case"keypress":var X=Q.which;if(X!==Fq)return null;return bq=!0,Pq;case"textInput":var Z=Q.data;if(Z===Pq&&bq)return null;return Z;default:return null}}function bR(z,Q){if(az){if(z==="compositionend"||!g$&&Aq(z,Q)){var X=Kq();return cL(),az=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!NR(Q)){if(Q.char&&Q.char.length>1)return Q.char;else if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return wq&&!Tq(Q)?null:Q.data;default:return null}}function AR(z,Q,X,Z,J){var $;if(LR)$=PR(Q,Z);else $=bR(Q,Z);if(!$)return null;var H=SJ(X,"onBeforeInput");if(H.length>0){var B=new zR("onBeforeInput","beforeinput",null,Z,J);z.push({event:B,listeners:H}),B.data=$}}function IR(z,Q,X,Z,J,$,H){FR(z,Q,X,Z,J),AR(z,Q,X,Z,J)}var TR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function kq(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!TR[z.type];if(Q==="textarea")return!0;return!1}function kR(z){if(!Y1)return!1;var Q="on"+z,X=Q in document;if(!X){var Z=document.createElement("div");Z.setAttribute(Q,"return;"),X=typeof Z[Q]==="function"}return X}function CR(){J1("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Cq(z,Q,X,Z){I2(Z);var J=SJ(Q,"onChange");if(J.length>0){var $=new V$("onChange","change",null,X,Z);z.push({event:$,listeners:J})}}var kX=null,CX=null;function SR(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function vR(z){var Q=[];Cq(Q,CX,z,g3(z)),S2(fR,Q)}function fR(z){iq(z,0)}function IJ(z){var Q=zQ(z);if(vz(Q))return z}function hR(z,Q){if(z==="change")return Q}var Sq=!1;if(Y1)Sq=kR("input")&&(!document.documentMode||document.documentMode>9);function yR(z,Q){kX=z,CX=Q,kX.attachEvent("onpropertychange",fq)}function vq(){if(!kX)return;kX.detachEvent("onpropertychange",fq),kX=null,CX=null}function fq(z){if(z.propertyName!=="value")return;if(IJ(CX))vR(z)}function VR(z,Q,X){if(z==="focusin")vq(),yR(Q,X);else if(z==="focusout")vq()}function DR(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return IJ(CX)}function mR(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function ER(z,Q){if(z==="click")return IJ(Q)}function uR(z,Q){if(z==="input"||z==="change")return IJ(Q)}function gR(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;M1(z,"number",z.value)}function xR(z,Q,X,Z,J,$,H){var B=X?zQ(X):window,W,F;if(SR(B))W=hR;else if(kq(B))if(Sq)W=uR;else W=DR,F=VR;else if(mR(B))W=ER;if(W){var I=W(Q,X);if(I){Cq(z,I,Z,J);return}}if(F)F(Q,B,X);if(Q==="focusout")gR(B)}function jR(){A0("onMouseEnter",["mouseout","mouseover"]),A0("onMouseLeave",["mouseout","mouseover"]),A0("onPointerEnter",["pointerout","pointerover"]),A0("onPointerLeave",["pointerout","pointerover"])}function pR(z,Q,X,Z,J,$,H){var B=Q==="mouseover"||Q==="pointerover",W=Q==="mouseout"||Q==="pointerout";if(B&&!Y_(Z)){var F=Z.relatedTarget||Z.fromElement;if(F){if(e8(F)||cX(F))return}}if(!W&&!B)return;var I;if(J.window===J)I=J;else{var d=J.ownerDocument;if(d)I=d.defaultView||d.parentWindow;else I=window}var c,Z0;if(W){var J0=Z.relatedTarget||Z.toElement;if(c=X,Z0=J0?e8(J0):null,Z0!==null){var Y0=d8(Z0);if(Z0!==Y0||Z0.tag!==M&&Z0.tag!==w)Z0=null}}else c=null,Z0=X;if(c===Z0)return;var u0=Lq,G1="onMouseLeave",z1="onMouseEnter",u1="mouse";if(Q==="pointerout"||Q==="pointerover")u0=Nq,G1="onPointerLeave",z1="onPointerEnter",u1="pointer";var g1=c==null?I:zQ(c),r=Z0==null?I:zQ(Z0),G0=new u0(G1,u1+"leave",c,Z,J);G0.target=g1,G0.relatedTarget=r;var t=null,P0=e8(J);if(P0===X){var p0=new u0(z1,u1+"enter",Z0,Z,J);p0.target=r,p0.relatedTarget=g1,t=p0}WN(z,G0,t,c,Z0)}function cR(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var w5=typeof Object.is==="function"?Object.is:cR;function SX(z,Q){if(w5(z,Q))return!0;if(typeof z!=="object"||z===null||typeof Q!=="object"||Q===null)return!1;var X=Object.keys(z),Z=Object.keys(Q);if(X.length!==Z.length)return!1;for(var J=0;J<X.length;J++){var $=X[J];if(!h1.call(Q,$)||!w5(z[$],Q[$]))return!1}return!0}function hq(z){while(z&&z.firstChild)z=z.firstChild;return z}function dR(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function yq(z,Q){var X=hq(z),Z=0,J=0;while(X){if(X.nodeType===k6){if(J=Z+X.textContent.length,Z<=Q&&J>=Q)return{node:X,offset:Q-Z};Z=J}X=hq(dR(X))}}function lR(z){var Q=z.ownerDocument,X=Q&&Q.defaultView||window,Z=X.getSelection&&X.getSelection();if(!Z||Z.rangeCount===0)return null;var{anchorNode:J,anchorOffset:$,focusNode:H,focusOffset:B}=Z;try{J.nodeType,H.nodeType}catch(W){return null}return iR(z,J,$,H,B)}function iR(z,Q,X,Z,J){var $=0,H=-1,B=-1,W=0,F=0,I=z,d=null;z:while(!0){var c=null;while(!0){if(I===Q&&(X===0||I.nodeType===k6))H=$+X;if(I===Z&&(J===0||I.nodeType===k6))B=$+J;if(I.nodeType===k6)$+=I.nodeValue.length;if((c=I.firstChild)===null)break;d=I,I=c}while(!0){if(I===z)break z;if(d===Q&&++W===X)H=$;if(d===Z&&++F===J)B=$;if((c=I.nextSibling)!==null)break;I=d,d=I.parentNode}I=c}if(H===-1||B===-1)return null;return{start:H,end:B}}function oR(z,Q){var X=z.ownerDocument||document,Z=X&&X.defaultView||window;if(!Z.getSelection)return;var J=Z.getSelection(),$=z.textContent.length,H=Math.min(Q.start,$),B=Q.end===void 0?H:Math.min(Q.end,$);if(!J.extend&&H>B){var W=B;B=H,H=W}var F=yq(z,H),I=yq(z,B);if(F&&I){if(J.rangeCount===1&&J.anchorNode===F.node&&J.anchorOffset===F.offset&&J.focusNode===I.node&&J.focusOffset===I.offset)return;var d=X.createRange();if(d.setStart(F.node,F.offset),J.removeAllRanges(),H>B)J.addRange(d),J.extend(I.node,I.offset);else d.setEnd(I.node,I.offset),J.addRange(d)}}function Vq(z){return z&&z.nodeType===k6}function Dq(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(Vq(z))return!1;else if(Vq(Q))return Dq(z,Q.parentNode);else if("contains"in z)return z.contains(Q);else if(z.compareDocumentPosition)return!!(z.compareDocumentPosition(Q)&16);else return!1}function aR(z){return z&&z.ownerDocument&&Dq(z.ownerDocument.documentElement,z)}function nR(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function mq(){var z=window,Q=Y8();while(Q instanceof z.HTMLIFrameElement){if(nR(Q))z=Q.contentWindow;else return Q;Q=Y8(z.document)}return Q}function x$(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();return Q&&(Q==="input"&&(z.type==="text"||z.type==="search"||z.type==="tel"||z.type==="url"||z.type==="password")||Q==="textarea"||z.contentEditable==="true")}function rR(){var z=mq();return{focusedElem:z,selectionRange:x$(z)?sR(z):null}}function tR(z){var Q=mq(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&aR(X)){if(Z!==null&&x$(X))eR(X,Z);var J=[],$=X;while($=$.parentNode)if($.nodeType===$5)J.push({element:$,left:$.scrollLeft,top:$.scrollTop});if(typeof X.focus==="function")X.focus();for(var H=0;H<J.length;H++){var B=J[H];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}}function sR(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=lR(z);return Q||{start:0,end:0}}function eR(z,Q){var{start:X,end:Z}=Q;if(Z===void 0)Z=X;if("selectionStart"in z)z.selectionStart=X,z.selectionEnd=Math.min(Z,z.value.length);else oR(z,Q)}var zN=Y1&&"documentMode"in document&&document.documentMode<=11;function QN(){J1("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var nz=null,j$=null,vX=null,p$=!1;function XN(z){if("selectionStart"in z&&x$(z))return{start:z.selectionStart,end:z.selectionEnd};else{var Q=z.ownerDocument&&z.ownerDocument.defaultView||window,X=Q.getSelection();return{anchorNode:X.anchorNode,anchorOffset:X.anchorOffset,focusNode:X.focusNode,focusOffset:X.focusOffset}}}function ZN(z){return z.window===z?z.document:z.nodeType===C6?z:z.ownerDocument}function Eq(z,Q,X){var Z=ZN(X);if(p$||nz==null||nz!==Y8(Z))return;var J=XN(nz);if(!vX||!SX(vX,J)){vX=J;var $=SJ(j$,"onSelect");if($.length>0){var H=new V$("onSelect","select",null,Q,X);z.push({event:H,listeners:$}),H.target=nz}}}function JN(z,Q,X,Z,J,$,H){var B=X?zQ(X):window;switch(Q){case"focusin":if(kq(B)||B.contentEditable==="true")nz=B,j$=X,vX=null;break;case"focusout":nz=null,j$=null,vX=null;break;case"mousedown":p$=!0;break;case"contextmenu":case"mouseup":case"dragend":p$=!1,Eq(z,Z,J);break;case"selectionchange":if(zN)break;case"keydown":case"keyup":Eq(z,Z,J)}}function TJ(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var rz={animationend:TJ("Animation","AnimationEnd"),animationiteration:TJ("Animation","AnimationIteration"),animationstart:TJ("Animation","AnimationStart"),transitionend:TJ("Transition","TransitionEnd")},c$={},uq={};if(Y1){if(uq=document.createElement("div").style,!("AnimationEvent"in window))delete rz.animationend.animation,delete rz.animationiteration.animation,delete rz.animationstart.animation;if(!("TransitionEvent"in window))delete rz.transitionend.transition}function kJ(z){if(c$[z])return c$[z];else if(!rz[z])return z;var Q=rz[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in uq)return c$[z]=Q[X];return z}var gq=kJ("animationend"),xq=kJ("animationiteration"),jq=kJ("animationstart"),pq=kJ("transitionend"),cq=new Map,dq=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function U8(z,Q){cq.set(z,Q),J1(Q,[z])}function YN(){for(var z=0;z<dq.length;z++){var Q=dq[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);U8(X,"on"+Z)}U8(gq,"onAnimationEnd"),U8(xq,"onAnimationIteration"),U8(jq,"onAnimationStart"),U8("dblclick","onDoubleClick"),U8("focusin","onFocus"),U8("focusout","onBlur"),U8(pq,"onTransitionEnd")}function $N(z,Q,X,Z,J,$,H){var B=cq.get(Q);if(B===void 0)return;var W=V$,F=Q;switch(Q){case"keypress":if(PJ(Z)===0)return;case"keydown":case"keyup":W=HR;break;case"focusin":F="focus",W=E$;break;case"focusout":F="blur",W=E$;break;case"beforeblur":case"afterblur":W=E$;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Lq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=oL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=BR;break;case gq:case xq:case jq:W=rL;break;case pq:W=WR;break;case"scroll":W=dL;break;case"wheel":W=OR;break;case"copy":case"cut":case"paste":W=sL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Nq;break}var I=($&QX)!==0;{var d=!I&&Q==="scroll",c=BN(X,B,Z.type,I,d);if(c.length>0){var Z0=new W(B,F,null,Z,J);z.push({event:Z0,listeners:c})}}}YN(),jR(),CR(),QN(),RR();function HN(z,Q,X,Z,J,$,H){$N(z,Q,X,Z,J,$);var B=($&X_)===0;if(B)pR(z,Q,X,Z,J),xR(z,Q,X,Z,J),JN(z,Q,X,Z,J),IR(z,Q,X,Z,J)}var fX=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],d$=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(fX));function lq(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,O_(Z,Q,void 0,z),z.currentTarget=null}function GN(z,Q,X){var Z;if(X)for(var J=Q.length-1;J>=0;J--){var $=Q[J],H=$.instance,B=$.currentTarget,W=$.listener;if(H!==Z&&z.isPropagationStopped())return;lq(z,W,B),Z=H}else for(var F=0;F<Q.length;F++){var I=Q[F],d=I.instance,c=I.currentTarget,Z0=I.listener;if(d!==Z&&z.isPropagationStopped())return;lq(z,Z0,c),Z=d}}function iq(z,Q){var X=(Q&QX)!==0;for(var Z=0;Z<z.length;Z++){var J=z[Z],$=J.event,H=J.listeners;GN($,H,X)}__()}function qN(z,Q,X,Z,J){var $=g3(X),H=[];HN(H,z,Z,X,$,Q),iq(H,Q)}function D4(z,Q){if(!d$.has(z))q('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',z);var X=!1,Z=gM(Q),J=KN(z,X);if(!Z.has(J))oq(Q,z,u3,X),Z.add(J)}function l$(z,Q,X){if(d$.has(z)&&!Q)q('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',z);var Z=0;if(Q)Z|=QX;oq(X,z,Z,Q)}var CJ="_reactListening"+Math.random().toString(36).slice(2);function hX(z){if(!z[CJ]){z[CJ]=!0,r0.forEach(function(X){if(X!=="selectionchange"){if(!d$.has(X))l$(X,!1,z);l$(X,!0,z)}});var Q=z.nodeType===C6?z:z.ownerDocument;if(Q!==null){if(!Q[CJ])Q[CJ]=!0,l$("selectionchange",!1,Q)}}}function oq(z,Q,X,Z,J){var $=VL(z,Q,X),H=void 0;if(p3){if(Q==="touchstart"||Q==="touchmove"||Q==="wheel")H=!0}z=z;var B;if(Z)if(H!==void 0)B=xL(z,Q,$,H);else B=gL(z,Q,$);else if(H!==void 0)B=jL(z,Q,$,H);else B=uL(z,Q,$)}function aq(z,Q){return z===Q||z.nodeType===z7&&z.parentNode===Q}function i$(z,Q,X,Z,J){var $=Z;if((Q&b2)===0&&(Q&u3)===0){var H=J;if(Z!==null){var B=Z;z:while(!0){if(B===null)return;var W=B.tag;if(W===b||W===P){var F=B.stateNode.containerInfo;if(aq(F,H))break;if(W===P){var I=B.return;while(I!==null){var d=I.tag;if(d===b||d===P){var c=I.stateNode.containerInfo;if(aq(c,H))return}I=I.return}}while(F!==null){var Z0=e8(F);if(Z0===null)return;var J0=Z0.tag;if(J0===M||J0===w){B=$=Z0;continue z}F=F.parentNode}}B=B.return}}}S2(function(){return qN(z,Q,X,$)})}function yX(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function BN(z,Q,X,Z,J,$){var H=Q!==null?Q+"Capture":null,B=Z?H:Q,W=[],F=z,I=null;while(F!==null){var d=F,c=d.stateNode,Z0=d.tag;if(Z0===M&&c!==null){if(I=c,B!==null){var J0=ZX(F,B);if(J0!=null)W.push(yX(F,J0,I))}}if(J)break;F=F.return}return W}function SJ(z,Q){var X=Q+"Capture",Z=[],J=z;while(J!==null){var $=J,H=$.stateNode,B=$.tag;if(B===M&&H!==null){var W=H,F=ZX(J,X);if(F!=null)Z.unshift(yX(J,F,W));var I=ZX(J,Q);if(I!=null)Z.push(yX(J,I,W))}J=J.return}return Z}function tz(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==M);if(z)return z;return null}function UN(z,Q){var X=z,Z=Q,J=0;for(var $=X;$;$=tz($))J++;var H=0;for(var B=Z;B;B=tz(B))H++;while(J-H>0)X=tz(X),J--;while(H-J>0)Z=tz(Z),H--;var W=J;while(W--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=tz(X),Z=tz(Z)}return null}function nq(z,Q,X,Z,J){var $=Q._reactName,H=[],B=X;while(B!==null){if(B===Z)break;var W=B,F=W.alternate,I=W.stateNode,d=W.tag;if(F!==null&&F===Z)break;if(d===M&&I!==null){var c=I;if(J){var Z0=ZX(B,$);if(Z0!=null)H.unshift(yX(B,Z0,c))}else if(!J){var J0=ZX(B,$);if(J0!=null)H.push(yX(B,J0,c))}}B=B.return}if(H.length!==0)z.push({event:Q,listeners:H})}function WN(z,Q,X,Z,J){var $=Z&&J?UN(Z,J):null;if(Z!==null)nq(z,Q,Z,$,!1);if(J!==null&&X!==null)nq(z,X,J,$,!0)}function KN(z,Q){return z+"__"+(Q?"capture":"bubble")}var H5=!1,VX="dangerouslySetInnerHTML",vJ="suppressContentEditableWarning",W8="suppressHydrationWarning",rq="autoFocus",t8="children",s8="style",fJ="__html",o$,hJ,DX,tq,yJ,sq,eq;o$={dialog:!0,webview:!0},hJ=function(z,Q){nO(z,Q),rO(z,Q),Q_(z,Q,{registrationNameDependencies:f0,possibleRegistrationNames:o0})},sq=Y1&&!document.documentMode,DX=function(z,Q,X){if(H5)return;var Z=VJ(X),J=VJ(Q);if(J===Z)return;H5=!0,q("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(J),JSON.stringify(Z))},tq=function(z){if(H5)return;H5=!0;var Q=[];z.forEach(function(X){Q.push(X)}),q("Extra attributes from the server: %s",Q)},yJ=function(z,Q){if(Q===!1)q("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",z,z,z);else q("Expected `%s` listener to be a function, instead got a value of `%s` type.",z,typeof Q)},eq=function(z,Q){var X=z.namespaceURI===T6?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var ON=/\r\n?/g,_N=/\u0000|\uFFFD/g;function VJ(z){C4(z);var Q=typeof z==="string"?z:""+z;return Q.replace(ON,`
|
|
32
|
+
`).replace(_N,"")}function DJ(z,Q,X,Z){var J=VJ(Q),$=VJ(z);if($===J)return;if(Z){if(!H5)H5=!0,q('Text content did not match. Server: "%s" Client: "%s"',$,J)}if(X&&e)throw Error("Text content does not match server-rendered HTML.")}function zB(z){return z.nodeType===C6?z:z.ownerDocument}function LN(){}function mJ(z){z.onclick=LN}function RN(z,Q,X,Z,J){for(var $ in Z){if(!Z.hasOwnProperty($))continue;var H=Z[$];if($===s8){if(H)Object.freeze(H);R2(Q,H)}else if($===VX){var B=H?H[fJ]:void 0;if(B!=null)W2(Q,B)}else if($===t8){if(typeof H==="string"){var W=z!=="textarea"||H!=="";if(W)ZJ(Q,H)}else if(typeof H==="number")ZJ(Q,""+H)}else if($===vJ||$===W8);else if($===rq);else if(f0.hasOwnProperty($)){if(H!=null){if(typeof H!=="function")yJ($,H);if($==="onScroll")D4("scroll",Q)}}else if(H!=null)x1(Q,$,H,J)}}function NN(z,Q,X,Z){for(var J=0;J<Q.length;J+=2){var $=Q[J],H=Q[J+1];if($===s8)R2(z,H);else if($===VX)W2(z,H);else if($===t8)ZJ(z,H);else x1(z,$,H,Z)}}function MN(z,Q,X,Z){var J,$=zB(X),H,B=Z;if(B===T6)B=h3(z);if(B===T6){if(J=g8(z,Q),!J&&z!==z.toLowerCase())q("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",z);if(z==="script"){var W=$.createElement("div");W.innerHTML="<script></script>";var F=W.firstChild;H=W.removeChild(F)}else if(typeof Q.is==="string")H=$.createElement(z,{is:Q.is});else if(H=$.createElement(z),z==="select"){var I=H;if(Q.multiple)I.multiple=!0;else if(Q.size)I.size=Q.size}}else H=$.createElementNS(B,z);if(B===T6){if(!J&&Object.prototype.toString.call(H)==="[object HTMLUnknownElement]"&&!h1.call(o$,z))o$[z]=!0,q("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",z)}return H}function wN(z,Q){return zB(Q).createTextNode(z)}function FN(z,Q,X,Z){var J=g8(Q,X);hJ(Q,X);var $;switch(Q){case"dialog":D4("cancel",z),D4("close",z),$=X;break;case"iframe":case"object":case"embed":D4("load",z),$=X;break;case"video":case"audio":for(var H=0;H<fX.length;H++)D4(fX[H],z);$=X;break;case"source":D4("error",z),$=X;break;case"img":case"image":case"link":D4("error",z),D4("load",z),$=X;break;case"details":D4("toggle",z),$=X;break;case"input":E(z,X),$=L(z,X),D4("invalid",z);break;case"option":b4(z,X),$=X;break;case"select":eQ(z,X),$=sQ(z,X),D4("invalid",z);break;case"textarea":q2(z,X),$=v3(z,X),D4("invalid",z);break;default:$=X}switch(E3(Q,$),RN(Q,z,Z,$,J),Q){case"input":A6(z),S0(z,X,!1);break;case"textarea":A6(z),U2(z);break;case"option":V4(z,X);break;case"select":S3(z,X);break;default:if(typeof $.onClick==="function")mJ(z);break}}function PN(z,Q,X,Z,J){hJ(Q,Z);var $=null,H,B;switch(Q){case"input":H=L(z,X),B=L(z,Z),$=[];break;case"select":H=sQ(z,X),B=sQ(z,Z),$=[];break;case"textarea":H=v3(z,X),B=v3(z,Z),$=[];break;default:if(H=X,B=Z,typeof H.onClick!=="function"&&typeof B.onClick==="function")mJ(z);break}E3(Q,B);var W,F,I=null;for(W in H){if(B.hasOwnProperty(W)||!H.hasOwnProperty(W)||H[W]==null)continue;if(W===s8){var d=H[W];for(F in d)if(d.hasOwnProperty(F)){if(!I)I={};I[F]=""}}else if(W===VX||W===t8);else if(W===vJ||W===W8);else if(W===rq);else if(f0.hasOwnProperty(W)){if(!$)$=[]}else($=$||[]).push(W,null)}for(W in B){var c=B[W],Z0=H!=null?H[W]:void 0;if(!B.hasOwnProperty(W)||c===Z0||c==null&&Z0==null)continue;if(W===s8){if(c)Object.freeze(c);if(Z0){for(F in Z0)if(Z0.hasOwnProperty(F)&&(!c||!c.hasOwnProperty(F))){if(!I)I={};I[F]=""}for(F in c)if(c.hasOwnProperty(F)&&Z0[F]!==c[F]){if(!I)I={};I[F]=c[F]}}else{if(!I){if(!$)$=[];$.push(W,I)}I=c}}else if(W===VX){var J0=c?c[fJ]:void 0,Y0=Z0?Z0[fJ]:void 0;if(J0!=null){if(Y0!==J0)($=$||[]).push(W,J0)}}else if(W===t8){if(typeof c==="string"||typeof c==="number")($=$||[]).push(W,""+c)}else if(W===vJ||W===W8);else if(f0.hasOwnProperty(W)){if(c!=null){if(typeof c!=="function")yJ(W,c);if(W==="onScroll")D4("scroll",z)}if(!$&&Z0!==c)$=[]}else($=$||[]).push(W,c)}if(I)jO(I,B[s8]),($=$||[]).push(s8,I);return $}function bN(z,Q,X,Z,J){if(X==="input"&&J.type==="radio"&&J.name!=null)X0(z,J);var $=g8(X,Z),H=g8(X,J);switch(NN(z,Q,$,H),X){case"input":$0(z,J);break;case"textarea":B2(z,J);break;case"select":NO(z,J);break}}function AN(z){{var Q=z.toLowerCase();if(!JJ.hasOwnProperty(Q))return null;return JJ[Q]||null}}function IN(z,Q,X,Z,J,$,H){var B,W;switch(B=g8(Q,X),hJ(Q,X),Q){case"dialog":D4("cancel",z),D4("close",z);break;case"iframe":case"object":case"embed":D4("load",z);break;case"video":case"audio":for(var F=0;F<fX.length;F++)D4(fX[F],z);break;case"source":D4("error",z);break;case"img":case"image":case"link":D4("error",z),D4("load",z);break;case"details":D4("toggle",z);break;case"input":E(z,X),D4("invalid",z);break;case"option":b4(z,X);break;case"select":eQ(z,X),D4("invalid",z);break;case"textarea":q2(z,X),D4("invalid",z);break}E3(Q,X);{W=new Set;var I=z.attributes;for(var d=0;d<I.length;d++){var c=I[d].name.toLowerCase();switch(c){case"value":break;case"checked":break;case"selected":break;default:W.add(I[d].name)}}}var Z0=null;for(var J0 in X){if(!X.hasOwnProperty(J0))continue;var Y0=X[J0];if(J0===t8){if(typeof Y0==="string"){if(z.textContent!==Y0){if(X[W8]!==!0)DJ(z.textContent,Y0,$,H);Z0=[t8,Y0]}}else if(typeof Y0==="number"){if(z.textContent!==""+Y0){if(X[W8]!==!0)DJ(z.textContent,Y0,$,H);Z0=[t8,""+Y0]}}}else if(f0.hasOwnProperty(J0)){if(Y0!=null){if(typeof Y0!=="function")yJ(J0,Y0);if(J0==="onScroll")D4("scroll",z)}}else if(H&&!0&&typeof B==="boolean"){var u0=void 0,G1=B&&q0?null:t4(J0);if(X[W8]===!0);else if(J0===vJ||J0===W8||J0==="value"||J0==="checked"||J0==="selected");else if(J0===VX){var z1=z.innerHTML,u1=Y0?Y0[fJ]:void 0;if(u1!=null){var g1=eq(z,u1);if(g1!==z1)DX(J0,z1,g1)}}else if(J0===s8){if(W.delete(J0),sq){var r=gO(Y0);if(u0=z.getAttribute("style"),r!==u0)DX(J0,u0,r)}}else if(B&&!q0){if(W.delete(J0.toLowerCase()),u0=j5(z,J0,Y0),Y0!==u0)DX(J0,u0,Y0)}else if(!H4(J0,G1,B)&&!L4(J0,Y0,G1,B)){var G0=!1;if(G1!==null)W.delete(G1.attributeName),u0=u7(z,J0,Y0,G1);else{var t=Z;if(t===T6)t=h3(Q);if(t===T6)W.delete(J0.toLowerCase());else{var P0=AN(J0);if(P0!==null&&P0!==J0)G0=!0,W.delete(P0);W.delete(J0)}u0=j5(z,J0,Y0)}var p0=q0;if(!p0&&Y0!==u0&&!G0)DX(J0,u0,Y0)}}}if(H){if(W.size>0&&X[W8]!==!0)tq(W)}switch(Q){case"input":A6(z),S0(z,X,!0);break;case"textarea":A6(z),U2(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")mJ(z);break}return Z0}function TN(z,Q,X){var Z=z.nodeValue!==Q;return Z}function a$(z,Q){{if(H5)return;H5=!0,q("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function n$(z,Q){{if(H5)return;H5=!0,q('Did not expect server HTML to contain the text node "%s" in <%s>.',Q.nodeValue,z.nodeName.toLowerCase())}}function r$(z,Q,X){{if(H5)return;H5=!0,q("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function t$(z,Q){{if(Q==="")return;if(H5)return;H5=!0,q('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function kN(z,Q,X){switch(Q){case"input":L1(z,X);return;case"textarea":wO(z,X);return;case"select":MO(z,X);return}}var mX=function(){},EX=function(){};{var CN=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],QB=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],SN=QB.concat(["button"]),vN=["dd","dt","li","option","optgroup","p","rp","rt"],XB={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};EX=function(z,Q){var X=y1({},z||XB),Z={tag:Q};if(QB.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(SN.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(CN.indexOf(Q)!==-1&&Q!=="address"&&Q!=="div"&&Q!=="p")X.listItemTagAutoclosing=null,X.dlItemTagAutoclosing=null;if(X.current=Z,Q==="form")X.formTag=Z;if(Q==="a")X.aTagInScope=Z;if(Q==="button")X.buttonTagInScope=Z;if(Q==="nobr")X.nobrTagInScope=Z;if(Q==="p")X.pTagInButtonScope=Z;if(Q==="li")X.listItemTagAutoclosing=Z;if(Q==="dd"||Q==="dt")X.dlItemTagAutoclosing=Z;return X};var fN=function(z,Q){switch(Q){case"select":return z==="option"||z==="optgroup"||z==="#text";case"optgroup":return z==="option"||z==="#text";case"option":return z==="#text";case"tr":return z==="th"||z==="td"||z==="style"||z==="script"||z==="template";case"tbody":case"thead":case"tfoot":return z==="tr"||z==="style"||z==="script"||z==="template";case"colgroup":return z==="col"||z==="template";case"table":return z==="caption"||z==="colgroup"||z==="tbody"||z==="tfoot"||z==="thead"||z==="style"||z==="script"||z==="template";case"head":return z==="base"||z==="basefont"||z==="bgsound"||z==="link"||z==="meta"||z==="title"||z==="noscript"||z==="noframes"||z==="style"||z==="script"||z==="template";case"html":return z==="head"||z==="body"||z==="frameset";case"frameset":return z==="frame";case"#document":return z==="html"}switch(z){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q!=="h1"&&Q!=="h2"&&Q!=="h3"&&Q!=="h4"&&Q!=="h5"&&Q!=="h6";case"rp":case"rt":return vN.indexOf(Q)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return Q==null}return!0},hN=function(z,Q){switch(z){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q.pTagInButtonScope;case"form":return Q.formTag||Q.pTagInButtonScope;case"li":return Q.listItemTagAutoclosing;case"dd":case"dt":return Q.dlItemTagAutoclosing;case"button":return Q.buttonTagInScope;case"a":return Q.aTagInScope;case"nobr":return Q.nobrTagInScope}return null},ZB={};mX=function(z,Q,X){X=X||XB;var Z=X.current,J=Z&&Z.tag;if(Q!=null){if(z!=null)q("validateDOMNesting: when childText is passed, childTag should be null");z="#text"}var $=fN(z,J)?null:Z,H=$?null:hN(z,X),B=$||H;if(!B)return;var W=B.tag,F=!!$+"|"+z+"|"+W;if(ZB[F])return;ZB[F]=!0;var I=z,d="";if(z==="#text")if(/\S/.test(Q))I="Text nodes";else I="Whitespace text nodes",d=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else I="<"+z+">";if($){var c="";if(W==="table"&&z==="tr")c+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";q("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",I,W,d,c)}else q("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",I,W)}}var EJ="suppressHydrationWarning",uJ="$",gJ="/$",uX="$?",gX="$!",yN="style",s$=null,e$=null;function VN(z){var Q,X,Z=z.nodeType;switch(Z){case C6:case V3:{Q=Z===C6?"#document":"#fragment";var J=z.documentElement;X=J?J.namespaceURI:y3(null,"");break}default:{var $=Z===z7?z.parentNode:z,H=$.namespaceURI||null;Q=$.tagName,X=y3(H,Q);break}}{var B=Q.toLowerCase(),W=EX(null,B);return{namespace:X,ancestorInfo:W}}}function DN(z,Q,X){{var Z=z,J=y3(Z.namespace,Q),$=EX(Z.ancestorInfo,Q);return{namespace:J,ancestorInfo:$}}}function z9(z){return z}function mN(z){s$=yL(),e$=rR();var Q=null;return Uq(!1),Q}function EN(z){tR(e$),Uq(s$),s$=null,e$=null}function uN(z,Q,X,Z,J){var $;{var H=Z;if(mX(z,null,H.ancestorInfo),typeof Q.children==="string"||typeof Q.children==="number"){var B=""+Q.children,W=EX(H.ancestorInfo,z);mX(null,B,W)}$=H.namespace}var F=MN(z,Q,X,$);return pX(J,F),G9(F,Q),F}function gN(z,Q){z.appendChild(Q)}function xN(z,Q,X,Z,J){switch(FN(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function jN(z,Q,X,Z,J,$){{var H=$;if(typeof Z.children!==typeof X.children&&(typeof Z.children==="string"||typeof Z.children==="number")){var B=""+Z.children,W=EX(H.ancestorInfo,Q);mX(null,B,W)}}return PN(z,Q,X,Z)}function Q9(z,Q){return z==="textarea"||z==="noscript"||typeof Q.children==="string"||typeof Q.children==="number"||typeof Q.dangerouslySetInnerHTML==="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}function pN(z,Q,X,Z){{var J=X;mX(null,z,J.ancestorInfo)}var $=wN(z,Q);return pX(Z,$),$}function cN(){var z=window.event;if(z===void 0)return D6;return Wq(z.type)}var X9=typeof setTimeout==="function"?setTimeout:void 0,dN=typeof clearTimeout==="function"?clearTimeout:void 0,Z9=-1,JB=typeof Promise==="function"?Promise:void 0,lN=typeof queueMicrotask==="function"?queueMicrotask:typeof JB<"u"?function(z){return JB.resolve(null).then(z).catch(iN)}:X9;function iN(z){setTimeout(function(){throw z})}function oN(z,Q,X,Z){switch(Q){case"button":case"input":case"select":case"textarea":if(X.autoFocus)z.focus();return;case"img":{if(X.src)z.src=X.src;return}}}function aN(z,Q,X,Z,J,$){bN(z,Q,X,Z,J),G9(z,J)}function YB(z){ZJ(z,"")}function nN(z,Q,X){z.nodeValue=X}function rN(z,Q){z.appendChild(Q)}function tN(z,Q){var X;if(z.nodeType===z7)X=z.parentNode,X.insertBefore(Q,z);else X=z,X.appendChild(Q);var Z=z._reactRootContainer;if((Z===null||Z===void 0)&&X.onclick===null)mJ(X)}function sN(z,Q,X){z.insertBefore(Q,X)}function eN(z,Q,X){if(z.nodeType===z7)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function zM(z,Q){z.removeChild(Q)}function QM(z,Q){if(z.nodeType===z7)z.parentNode.removeChild(Q);else z.removeChild(Q)}function J9(z,Q){var X=Q,Z=0;do{var J=X.nextSibling;if(z.removeChild(X),J&&J.nodeType===z7){var $=J.data;if($===gJ)if(Z===0){z.removeChild(J),FX(Q);return}else Z--;else if($===uJ||$===uX||$===gX)Z++}X=J}while(X);FX(Q)}function XM(z,Q){if(z.nodeType===z7)J9(z.parentNode,Q);else if(z.nodeType===$5)J9(z,Q);FX(z)}function ZM(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function JM(z){z.nodeValue=""}function YM(z,Q){z=z;var X=Q[yN],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=D3("display",Z)}function $M(z,Q){z.nodeValue=Q}function HM(z){if(z.nodeType===$5)z.textContent="";else if(z.nodeType===C6){if(z.documentElement)z.removeChild(z.documentElement)}}function GM(z,Q,X){if(z.nodeType!==$5||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function qM(z,Q){if(Q===""||z.nodeType!==k6)return null;return z}function BM(z){if(z.nodeType!==z7)return null;return z}function $B(z){return z.data===uX}function Y9(z){return z.data===gX}function UM(z){var Q=z.nextSibling&&z.nextSibling.dataset,X,Z,J;if(Q)X=Q.dgst,Z=Q.msg,J=Q.stck;return{message:Z,digest:X,stack:J}}function WM(z,Q){z._reactRetry=Q}function xJ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===$5||Q===k6)break;if(Q===z7){var X=z.data;if(X===uJ||X===gX||X===uX)break;if(X===gJ)return null}}return z}function xX(z){return xJ(z.nextSibling)}function KM(z){return xJ(z.firstChild)}function OM(z){return xJ(z.firstChild)}function _M(z){return xJ(z.nextSibling)}function LM(z,Q,X,Z,J,$,H){pX($,z),G9(z,X);var B;{var W=J;B=W.namespace}var F=($.mode&c1)!==K1;return IN(z,Q,X,B,Z,F,H)}function RM(z,Q,X,Z){pX(X,z);var J=(X.mode&c1)!==K1;return TN(z,Q)}function NM(z,Q){pX(Q,z)}function MM(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===z7){var Z=Q.data;if(Z===gJ)if(X===0)return xX(Q);else X--;else if(Z===uJ||Z===gX||Z===uX)X++}Q=Q.nextSibling}return null}function HB(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===z7){var Z=Q.data;if(Z===uJ||Z===gX||Z===uX)if(X===0)return Q;else X--;else if(Z===gJ)X++}Q=Q.previousSibling}return null}function wM(z){FX(z)}function FM(z){FX(z)}function PM(z){return z!=="head"&&z!=="body"}function bM(z,Q,X,Z){var J=!0;DJ(Q.nodeValue,X,Z,J)}function AM(z,Q,X,Z,J,$){if(Q[EJ]!==!0){var H=!0;DJ(Z.nodeValue,J,$,H)}}function IM(z,Q){if(Q.nodeType===$5)a$(z,Q);else if(Q.nodeType===z7);else n$(z,Q)}function TM(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===$5)a$(X,Q);else if(Q.nodeType===z7);else n$(X,Q)}}function kM(z,Q,X,Z,J){if(J||Q[EJ]!==!0)if(Z.nodeType===$5)a$(X,Z);else if(Z.nodeType===z7);else n$(X,Z)}function CM(z,Q,X){r$(z,Q)}function SM(z,Q){t$(z,Q)}function vM(z,Q,X){{var Z=z.parentNode;if(Z!==null)r$(Z,Q)}}function fM(z,Q){{var X=z.parentNode;if(X!==null)t$(X,Q)}}function hM(z,Q,X,Z,J,$){if($||Q[EJ]!==!0)r$(X,Z)}function yM(z,Q,X,Z,J){if(J||Q[EJ]!==!0)t$(X,Z)}function VM(z){q("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function DM(z){hX(z)}var sz=Math.random().toString(36).slice(2),ez="__reactFiber$"+sz,$9="__reactProps$"+sz,jX="__reactContainer$"+sz,H9="__reactEvents$"+sz,mM="__reactListeners$"+sz,EM="__reactHandles$"+sz;function uM(z){delete z[ez],delete z[$9],delete z[H9],delete z[mM],delete z[EM]}function pX(z,Q){Q[ez]=z}function jJ(z,Q){Q[jX]=z}function GB(z){z[jX]=null}function cX(z){return!!z[jX]}function e8(z){var Q=z[ez];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[jX]||X[ez],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var J=HB(z);while(J!==null){var $=J[ez];if($)return $;J=HB(J)}}return Q}z=X,X=z.parentNode}return null}function K8(z){var Q=z[ez]||z[jX];if(Q)if(Q.tag===M||Q.tag===w||Q.tag===k||Q.tag===b)return Q;else return null;return null}function zQ(z){if(z.tag===M||z.tag===w)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function pJ(z){return z[$9]||null}function G9(z,Q){z[$9]=Q}function gM(z){var Q=z[H9];if(Q===void 0)Q=z[H9]=new Set;return Q}var qB={},BB=Y.ReactDebugCurrentFrame;function cJ(z){if(z){var Q=z._owner,X=X8(z.type,z._source,Q?Q.type:null);BB.setExtraStackFrame(X)}else BB.setExtraStackFrame(null)}function l5(z,Q,X,Z,J){{var $=Function.call.bind(h1);for(var H in z)if($(z,H)){var B=void 0;try{if(typeof z[H]!=="function"){var W=Error((Z||"React class")+": "+X+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw W.name="Invariant Violation",W}B=z[H](Q,H,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){B=F}if(B&&!(B instanceof Error))cJ(J),q("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",X,H,typeof B),cJ(null);if(B instanceof Error&&!(B.message in qB))qB[B.message]=!0,cJ(J),q("Failed %s type: %s",X,B.message),cJ(null)}}}var q9=[],dJ;dJ=[];var m6=-1;function O8(z){return{current:z}}function x7(z,Q){if(m6<0){q("Unexpected pop.");return}if(Q!==dJ[m6])q("Unexpected Fiber popped.");z.current=q9[m6],q9[m6]=null,dJ[m6]=null,m6--}function j7(z,Q,X){m6++,q9[m6]=z.current,dJ[m6]=X,z.current=Q}var UB={},F5={};Object.freeze(F5);var E6=O8(F5),U6=O8(!1),B9=F5;function QQ(z,Q,X){{if(X&&W6(Q))return B9;return E6.current}}function WB(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function XQ(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return F5;var J=z.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===Q)return J.__reactInternalMemoizedMaskedChildContext;var $={};for(var H in Z)$[H]=Q[H];{var B=S1(z)||"Unknown";l5(Z,$,"context",B)}if(J)WB(z,Q,$);return $}}function lJ(){return U6.current}function W6(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function iJ(z){x7(U6,z),x7(E6,z)}function U9(z){x7(U6,z),x7(E6,z)}function KB(z,Q,X){{if(E6.current!==F5)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");j7(E6,Q,z),j7(U6,X,z)}}function OB(z,Q,X){{var Z=z.stateNode,J=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var $=S1(z)||"Unknown";if(!UB[$])UB[$]=!0,q("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",$,$)}return X}var H=Z.getChildContext();for(var B in H)if(!(B in J))throw Error((S1(z)||"Unknown")+'.getChildContext(): key "'+B+'" is not defined in childContextTypes.');{var W=S1(z)||"Unknown";l5(J,H,"child context",W)}return y1({},X,H)}}function oJ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||F5;return B9=E6.current,j7(E6,X,z),j7(U6,U6.current,z),!0}}function _B(z,Q,X){{var Z=z.stateNode;if(!Z)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(X){var J=OB(z,Q,B9);Z.__reactInternalMemoizedMergedChildContext=J,x7(U6,z),x7(E6,z),j7(E6,J,z),j7(U6,X,z)}else x7(U6,z),j7(U6,X,z)}}function xM(z){{if(!P_(z)||z.tag!==_)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var Q=z;do{switch(Q.tag){case b:return Q.stateNode.context;case _:{var X=Q.type;if(W6(X))return Q.stateNode.__reactInternalMemoizedMergedChildContext;break}}Q=Q.return}while(Q!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var _8=0,aJ=1,u6=null,W9=!1,K9=!1;function LB(z){if(u6===null)u6=[z];else u6.push(z)}function jM(z){W9=!0,LB(z)}function RB(){if(W9)L8()}function L8(){if(!K9&&u6!==null){K9=!0;var z=0,Q=d5();try{var X=!0,Z=u6;P7(N5);for(;z<Z.length;z++){var J=Z[z];do J=J(X);while(J!==null)}u6=null,W9=!1}catch($){if(u6!==null)u6=u6.slice(z+1);throw x2(qJ,L8),$}finally{P7(Q),K9=!1}}return null}var ZQ=[],JQ=0,nJ=null,rJ=0,C5=[],S5=0,zz=null,g6=1,x6="";function pM(z){return Xz(),(z.flags&h2)!==_1}function cM(z){return Xz(),rJ}function dM(){var z=x6,Q=g6,X=Q&~lM(Q);return X.toString(32)+z}function Qz(z,Q){Xz(),ZQ[JQ++]=rJ,ZQ[JQ++]=nJ,nJ=z,rJ=Q}function NB(z,Q,X){Xz(),C5[S5++]=g6,C5[S5++]=x6,C5[S5++]=zz,zz=z;var Z=g6,J=x6,$=tJ(Z)-1,H=Z&~(1<<$),B=X+1,W=tJ(Q)+$;if(W>30){var F=$-$%5,I=(1<<F)-1,d=(H&I).toString(32),c=H>>F,Z0=$-F,J0=tJ(Q)+Z0,Y0=B<<Z0,u0=Y0|c,G1=d+J;g6=1<<J0|u0,x6=G1}else{var z1=B<<$,u1=z1|H,g1=J;g6=1<<W|u1,x6=g1}}function O9(z){Xz();var Q=z.return;if(Q!==null){var X=1,Z=0;Qz(z,X),NB(z,X,Z)}}function tJ(z){return 32-i2(z)}function lM(z){return 1<<tJ(z)-1}function _9(z){while(z===nJ)nJ=ZQ[--JQ],ZQ[JQ]=null,rJ=ZQ[--JQ],ZQ[JQ]=null;while(z===zz)zz=C5[--S5],C5[S5]=null,x6=C5[--S5],C5[S5]=null,g6=C5[--S5],C5[S5]=null}function iM(){if(Xz(),zz!==null)return{id:g6,overflow:x6};else return null}function oM(z,Q){Xz(),C5[S5++]=g6,C5[S5++]=x6,C5[S5++]=zz,g6=Q.id,x6=Q.overflow,zz=z}function Xz(){if(!k7())q("Expected to be hydrating. This is a bug in React. Please file an issue.")}var T7=null,v5=null,i5=!1,Zz=!1,R8=null;function aM(){if(i5)q("We should not be hydrating here. This is a bug in React. Please file a bug.")}function MB(){Zz=!0}function nM(){return Zz}function rM(z){var Q=z.stateNode.containerInfo;return v5=OM(Q),T7=z,i5=!0,R8=null,Zz=!1,!0}function tM(z,Q,X){if(v5=_M(Q),T7=z,i5=!0,R8=null,Zz=!1,X!==null)oM(z,X);return!0}function wB(z,Q){switch(z.tag){case b:{IM(z.stateNode.containerInfo,Q);break}case M:{var X=(z.mode&c1)!==K1;kM(z.type,z.memoizedProps,z.stateNode,Q,X);break}case k:{var Z=z.memoizedState;if(Z.dehydrated!==null)TM(Z.dehydrated,Q);break}}}function FB(z,Q){wB(z,Q);var X=Yb();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=x8;else Z.push(X)}function L9(z,Q){{if(Zz)return;switch(z.tag){case b:{var X=z.stateNode.containerInfo;switch(Q.tag){case M:var{type:Z,pendingProps:J}=Q;CM(X,Z);break;case w:var $=Q.pendingProps;SM(X,$);break}break}case M:{var{type:H,memoizedProps:B,stateNode:W}=z;switch(Q.tag){case M:{var{type:F,pendingProps:I}=Q,d=(z.mode&c1)!==K1;hM(H,B,W,F,I,d);break}case w:{var c=Q.pendingProps,Z0=(z.mode&c1)!==K1;yM(H,B,W,c,Z0);break}}break}case k:{var J0=z.memoizedState,Y0=J0.dehydrated;if(Y0!==null)switch(Q.tag){case M:var{type:u0,pendingProps:G1}=Q;vM(Y0,u0);break;case w:var z1=Q.pendingProps;fM(Y0,z1);break}break}default:return}}}function PB(z,Q){Q.flags=Q.flags&~v6|Q7,L9(z,Q)}function bB(z,Q){switch(z.tag){case M:{var{type:X,pendingProps:Z}=z,J=GM(Q,X);if(J!==null)return z.stateNode=J,T7=z,v5=KM(J),!0;return!1}case w:{var $=z.pendingProps,H=qM(Q,$);if(H!==null)return z.stateNode=H,T7=z,v5=null,!0;return!1}case k:{var B=BM(Q);if(B!==null){var W={dehydrated:B,treeContext:iM(),retryLane:L5};z.memoizedState=W;var F=$b(B);return F.return=z,z.child=F,T7=z,v5=null,!0}return!1}default:return!1}}function R9(z){return(z.mode&c1)!==K1&&(z.flags&Q4)===_1}function N9(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function M9(z){if(!i5)return;var Q=v5;if(!Q){if(R9(z))L9(T7,z),N9();PB(T7,z),i5=!1,T7=z;return}var X=Q;if(!bB(z,Q)){if(R9(z))L9(T7,z),N9();Q=xX(X);var Z=T7;if(!Q||!bB(z,Q)){PB(T7,z),i5=!1,T7=z;return}FB(Z,X)}}function sM(z,Q,X){var Z=z.stateNode,J=!Zz,$=LM(Z,z.type,z.memoizedProps,Q,X,z,J);if(z.updateQueue=$,$!==null)return!0;return!1}function eM(z){var{stateNode:Q,memoizedProps:X}=z,Z=RM(Q,X,z);if(Z){var J=T7;if(J!==null)switch(J.tag){case b:{var $=J.stateNode.containerInfo,H=(J.mode&c1)!==K1;bM($,Q,X,H);break}case M:{var{type:B,memoizedProps:W,stateNode:F}=J,I=(J.mode&c1)!==K1;AM(B,W,F,Q,X,I);break}}}return Z}function zw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");NM(X,z)}function Qw(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return MM(X)}function AB(z){var Q=z.return;while(Q!==null&&Q.tag!==M&&Q.tag!==b&&Q.tag!==k)Q=Q.return;T7=Q}function sJ(z){if(z!==T7)return!1;if(!i5)return AB(z),i5=!0,!1;if(z.tag!==b&&(z.tag!==M||PM(z.type)&&!Q9(z.type,z.memoizedProps))){var Q=v5;if(Q)if(R9(z))IB(z),N9();else while(Q)FB(z,Q),Q=xX(Q)}if(AB(z),z.tag===k)v5=Qw(z);else v5=T7?xX(z.stateNode):null;return!0}function Xw(){return i5&&v5!==null}function IB(z){var Q=v5;while(Q)wB(z,Q),Q=xX(Q)}function YQ(){T7=null,v5=null,i5=!1,Zz=!1}function TB(){if(R8!==null)wW(R8),R8=null}function k7(){return i5}function w9(z){if(R8===null)R8=[z];else R8.push(z)}var Zw=Y.ReactCurrentBatchConfig,Jw=null;function Yw(){return Zw.transition}var o5={recordUnsafeLifecycleWarnings:function(z,Q){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(z,Q){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var $w=function(z){var Q=null,X=z;while(X!==null){if(X.mode&i4)Q=X;X=X.return}return Q},Jz=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],Yz=new Set;o5.recordUnsafeLifecycleWarnings=function(z,Q){if(Yz.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)dX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillMount==="function")lX.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)iX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillReceiveProps==="function")oX.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)aX.push(z);if(z.mode&i4&&typeof Q.UNSAFE_componentWillUpdate==="function")nX.push(z)},o5.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(dX.length>0)dX.forEach(function(c){z.add(S1(c)||"Component"),Yz.add(c.type)}),dX=[];var Q=new Set;if(lX.length>0)lX.forEach(function(c){Q.add(S1(c)||"Component"),Yz.add(c.type)}),lX=[];var X=new Set;if(iX.length>0)iX.forEach(function(c){X.add(S1(c)||"Component"),Yz.add(c.type)}),iX=[];var Z=new Set;if(oX.length>0)oX.forEach(function(c){Z.add(S1(c)||"Component"),Yz.add(c.type)}),oX=[];var J=new Set;if(aX.length>0)aX.forEach(function(c){J.add(S1(c)||"Component"),Yz.add(c.type)}),aX=[];var $=new Set;if(nX.length>0)nX.forEach(function(c){$.add(S1(c)||"Component"),Yz.add(c.type)}),nX=[];if(Q.size>0){var H=Jz(Q);q(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
33
33
|
|
|
34
34
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
35
35
|
|
|
@@ -58,17 +58,17 @@ Please update the following components: %s`,I)}if(J.size>0){var d=Jz(J);O(`compo
|
|
|
58
58
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
59
59
|
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
60
60
|
|
|
61
|
-
Please update the following components: %s`,d)}};var eJ=new Map,kB=new Set;
|
|
61
|
+
Please update the following components: %s`,d)}};var eJ=new Map,kB=new Set;o5.recordLegacyContextWarning=function(z,Q){var X=$w(z);if(X===null){q("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(kB.has(z.type))return;var Z=eJ.get(X);if(z.type.contextTypes!=null||z.type.childContextTypes!=null||Q!==null&&typeof Q.getChildContext==="function"){if(Z===void 0)Z=[],eJ.set(X,Z);Z.push(z)}},o5.flushLegacyContextWarning=function(){eJ.forEach(function(z,Q){if(z.length===0)return;var X=z[0],Z=new Set;z.forEach(function($){Z.add(S1($)||"Component"),kB.add($.type)});var J=Jz(Z);try{j4(X),q(`Legacy context API has been detected within a strict-mode tree.
|
|
62
62
|
|
|
63
63
|
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
64
64
|
|
|
65
65
|
Please update the following components: %s
|
|
66
66
|
|
|
67
|
-
Learn more about this warning here: https://reactjs.org/link/legacy-context`,J)}finally{N7()}})},
|
|
67
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,J)}finally{N7()}})},o5.discardPendingWarnings=function(){dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],eJ=new Map}}var F9,P9,b9,A9,I9,CB=function(z,Q){};F9=!1,P9=!1,b9={},A9={},I9={},CB=function(z,Q){if(z===null||typeof z!=="object")return;if(!z._store||z._store.validated||z.key!=null)return;if(typeof z._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");z._store.validated=!0;var X=S1(Q)||"Component";if(A9[X])return;A9[X]=!0,q('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function Hw(z){return z.prototype&&z.prototype.isReactComponent}function rX(z,Q,X){var Z=X.ref;if(Z!==null&&typeof Z!=="function"&&typeof Z!=="object"){if((z.mode&i4||o)&&!(X._owner&&X._self&&X._owner.stateNode!==X._self)&&!(X._owner&&X._owner.tag!==_)&&!(typeof X.type==="function"&&!Hw(X.type))&&X._owner){var J=S1(z)||"Component";if(!b9[J])q('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J,Z),b9[J]=!0}if(X._owner){var $=X._owner,H;if($){var B=$;if(B.tag!==_)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");H=B.stateNode}if(!H)throw Error("Missing owner for string ref "+Z+". This error is likely caused by a bug in React. Please file an issue.");var W=H;I1(Z,"ref");var F=""+Z;if(Q!==null&&Q.ref!==null&&typeof Q.ref==="function"&&Q.ref._stringRef===F)return Q.ref;var I=function(d){var c=W.refs;if(d===null)delete c[F];else c[F]=d};return I._stringRef=F,I}else{if(typeof Z!=="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!X._owner)throw Error("Element ref was specified as a string ("+Z+`) but no owner was set. This could happen for one of the following reasons:
|
|
68
68
|
1. You may be adding a ref to a function component
|
|
69
69
|
2. You may be adding a ref to a component that was not created inside a component's render method
|
|
70
70
|
3. You have multiple copies of React loaded
|
|
71
|
-
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return Z}function zY(z,Q){var X=Object.prototype.toString.call(Q);throw Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}function QY(z){{var Q=S1(z)||"Component";if(I9[Q])return;I9[Q]=!0,q("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function SB(z){var{_payload:Q,_init:X}=z;return X(Q)}function vB(z){function Q(r,G0){if(!z)return;var t=r.deletions;if(t===null)r.deletions=[G0],r.flags|=x8;else t.push(G0)}function X(r,G0){if(!z)return null;var t=G0;while(t!==null)Q(r,t),t=t.sibling;return null}function Z(r,G0){var t=new Map,P0=G0;while(P0!==null){if(P0.key!==null)t.set(P0.key,P0);else t.set(P0.index,P0);P0=P0.sibling}return t}function J(r,G0){var t=Oz(r,G0);return t.index=0,t.sibling=null,t}function $(r,G0,t){if(r.index=t,!z)return r.flags|=h2,G0;var P0=r.alternate;if(P0!==null){var p0=P0.index;if(p0<G0)return r.flags|=Q7,G0;else return p0}else return r.flags|=Q7,G0}function H(r){if(z&&r.alternate===null)r.flags|=Q7;return r}function B(r,G0,t,P0){if(G0===null||G0.tag!==w){var p0=PG(t,r.mode,P0);return p0.return=r,p0}else{var g0=J(G0,t);return g0.return=r,g0}}function W(r,G0,t,P0){var p0=t.type;if(p0===t1)return I(r,G0,t.props.children,P0,t.key);if(G0!==null){if(G0.elementType===p0||mW(G0,t)||typeof p0==="object"&&p0!==null&&p0.$$typeof===e0&&SB(p0)===G0.type){var g0=J(G0,t.props);return g0.ref=rX(r,G0,t),g0.return=r,g0._debugSource=t._source,g0._debugOwner=t._owner,g0}}var R1=FG(t,r.mode,P0);return R1.ref=rX(r,G0,t),R1.return=r,R1}function F(r,G0,t,P0){if(G0===null||G0.tag!==P||G0.stateNode.containerInfo!==t.containerInfo||G0.stateNode.implementation!==t.implementation){var p0=bG(t,r.mode,P0);return p0.return=r,p0}else{var g0=J(G0,t.children||[]);return g0.return=r,g0}}function I(r,G0,t,P0,p0){if(G0===null||G0.tag!==f){var g0=C8(t,r.mode,P0,p0);return g0.return=r,g0}else{var R1=J(G0,t);return R1.return=r,R1}}function d(r,G0,t){if(typeof G0==="string"&&G0!==""||typeof G0==="number"){var P0=PG(""+G0,r.mode,t);return P0.return=r,P0}if(typeof G0==="object"&&G0!==null){switch(G0.$$typeof){case G4:{var p0=FG(G0,r.mode,t);return p0.ref=rX(r,null,G0),p0.return=r,p0}case N4:{var g0=bG(G0,r.mode,t);return g0.return=r,g0}case e0:{var{_payload:R1,_init:A1}=G0;return d(r,A1(R1),t)}}if(z4(G0)||v4(G0)){var O4=C8(G0,r.mode,t,null);return O4.return=r,O4}zY(r,G0)}if(typeof G0==="function")QY(r);return null}function c(r,G0,t,P0){var p0=G0!==null?G0.key:null;if(typeof t==="string"&&t!==""||typeof t==="number"){if(p0!==null)return null;return B(r,G0,""+t,P0)}if(typeof t==="object"&&t!==null){switch(t.$$typeof){case G4:if(t.key===p0)return W(r,G0,t,P0);else return null;case N4:if(t.key===p0)return F(r,G0,t,P0);else return null;case e0:{var{_payload:g0,_init:R1}=t;return c(r,G0,R1(g0),P0)}}if(z4(t)||v4(t)){if(p0!==null)return null;return I(r,G0,t,P0,null)}zY(r,t)}if(typeof t==="function")QY(r);return null}function Z0(r,G0,t,P0,p0){if(typeof P0==="string"&&P0!==""||typeof P0==="number"){var g0=r.get(t)||null;return B(G0,g0,""+P0,p0)}if(typeof P0==="object"&&P0!==null){switch(P0.$$typeof){case G4:{var R1=r.get(P0.key===null?t:P0.key)||null;return W(G0,R1,P0,p0)}case N4:{var A1=r.get(P0.key===null?t:P0.key)||null;return F(G0,A1,P0,p0)}case e0:var{_payload:O4,_init:s1}=P0;return Z0(r,G0,t,s1(O4),p0)}if(z4(P0)||v4(P0)){var s4=r.get(t)||null;return I(G0,s4,P0,p0,null)}zY(G0,P0)}if(typeof P0==="function")QY(G0);return null}function J0(r,G0,t){{if(typeof r!=="object"||r===null)return G0;switch(r.$$typeof){case G4:case N4:CB(r,t);var P0=r.key;if(typeof P0!=="string")break;if(G0===null){G0=new Set,G0.add(P0);break}if(!G0.has(P0)){G0.add(P0);break}q("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be "+"duplicated and/or omitted — the behavior is unsupported and "+"could change in a future version.",P0);break;case e0:var{_payload:p0,_init:g0}=r;J0(g0(p0),G0,t);break}}return G0}function Y0(r,G0,t,P0){{var p0=null;for(var g0=0;g0<t.length;g0++){var R1=t[g0];p0=J0(R1,p0,r)}}var A1=null,O4=null,s1=G0,s4=0,e1=0,o4=null;for(;s1!==null&&e1<t.length;e1++){if(s1.index>e1)o4=s1,s1=null;else o4=s1.sibling;var c7=c(r,s1,t[e1],P0);if(c7===null){if(s1===null)s1=o4;break}if(z){if(s1&&c7.alternate===null)Q(r,s1)}if(s4=$(c7,s4,e1),O4===null)A1=c7;else O4.sibling=c7;O4=c7,s1=o4}if(e1===t.length){if(X(r,s1),k7()){var V7=e1;Qz(r,V7)}return A1}if(s1===null){for(;e1<t.length;e1++){var b5=d(r,t[e1],P0);if(b5===null)continue;if(s4=$(b5,s4,e1),O4===null)A1=b5;else O4.sibling=b5;O4=b5}if(k7()){var z5=e1;Qz(r,z5)}return A1}var Q5=Z(r,s1);for(;e1<t.length;e1++){var d7=Z0(Q5,r,e1,t[e1],P0);if(d7!==null){if(z){if(d7.alternate!==null)Q5.delete(d7.key===null?e1:d7.key)}if(s4=$(d7,s4,e1),O4===null)A1=d7;else O4.sibling=d7;O4=d7}}if(z)Q5.forEach(function(AQ){return Q(r,AQ)});if(k7()){var o6=e1;Qz(r,o6)}return A1}function u0(r,G0,t,P0){var p0=v4(t);if(typeof p0!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{if(typeof Symbol==="function"&&t[Symbol.toStringTag]==="Generator"){if(!P9)q("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");P9=!0}if(t.entries===p0){if(!F9)q("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");F9=!0}var g0=p0.call(t);if(g0){var R1=null,A1=g0.next();for(;!A1.done;A1=g0.next()){var O4=A1.value;R1=J0(O4,R1,r)}}}var s1=p0.call(t);if(s1==null)throw Error("An iterable object provided no iterator.");var s4=null,e1=null,o4=G0,c7=0,V7=0,b5=null,z5=s1.next();for(;o4!==null&&!z5.done;V7++,z5=s1.next()){if(o4.index>V7)b5=o4,o4=null;else b5=o4.sibling;var Q5=c(r,o4,z5.value,P0);if(Q5===null){if(o4===null)o4=b5;break}if(z){if(o4&&Q5.alternate===null)Q(r,o4)}if(c7=$(Q5,c7,V7),e1===null)s4=Q5;else e1.sibling=Q5;e1=Q5,o4=b5}if(z5.done){if(X(r,o4),k7()){var d7=V7;Qz(r,d7)}return s4}if(o4===null){for(;!z5.done;V7++,z5=s1.next()){var o6=d(r,z5.value,P0);if(o6===null)continue;if(c7=$(o6,c7,V7),e1===null)s4=o6;else e1.sibling=o6;e1=o6}if(k7()){var AQ=V7;Qz(r,AQ)}return s4}var CZ=Z(r,o4);for(;!z5.done;V7++,z5=s1.next()){var w6=Z0(CZ,r,V7,z5.value,P0);if(w6!==null){if(z){if(w6.alternate!==null)CZ.delete(w6.key===null?V7:w6.key)}if(c7=$(w6,c7,V7),e1===null)s4=w6;else e1.sibling=w6;e1=w6}}if(z)CZ.forEach(function(Eb){return Q(r,Eb)});if(k7()){var mb=V7;Qz(r,mb)}return s4}function G1(r,G0,t,P0){if(G0!==null&&G0.tag===w){X(r,G0.sibling);var p0=J(G0,t);return p0.return=r,p0}X(r,G0);var g0=PG(t,r.mode,P0);return g0.return=r,g0}function z1(r,G0,t,P0){var p0=t.key,g0=G0;while(g0!==null){if(g0.key===p0){var R1=t.type;if(R1===t1){if(g0.tag===f){X(r,g0.sibling);var A1=J(g0,t.props.children);return A1.return=r,A1._debugSource=t._source,A1._debugOwner=t._owner,A1}}else if(g0.elementType===R1||mW(g0,t)||typeof R1==="object"&&R1!==null&&R1.$$typeof===e0&&SB(R1)===g0.type){X(r,g0.sibling);var O4=J(g0,t.props);return O4.ref=rX(r,g0,t),O4.return=r,O4._debugSource=t._source,O4._debugOwner=t._owner,O4}X(r,g0);break}else Q(r,g0);g0=g0.sibling}if(t.type===t1){var s1=C8(t.props.children,r.mode,P0,t.key);return s1.return=r,s1}else{var s4=FG(t,r.mode,P0);return s4.ref=rX(r,G0,t),s4.return=r,s4}}function u1(r,G0,t,P0){var p0=t.key,g0=G0;while(g0!==null){if(g0.key===p0)if(g0.tag===P&&g0.stateNode.containerInfo===t.containerInfo&&g0.stateNode.implementation===t.implementation){X(r,g0.sibling);var R1=J(g0,t.children||[]);return R1.return=r,R1}else{X(r,g0);break}else Q(r,g0);g0=g0.sibling}var A1=bG(t,r.mode,P0);return A1.return=r,A1}function g1(r,G0,t,P0){var p0=typeof t==="object"&&t!==null&&t.type===t1&&t.key===null;if(p0)t=t.props.children;if(typeof t==="object"&&t!==null){switch(t.$$typeof){case G4:return H(z1(r,G0,t,P0));case N4:return H(u1(r,G0,t,P0));case e0:var{_payload:g0,_init:R1}=t;return g1(r,G0,R1(g0),P0)}if(z4(t))return Y0(r,G0,t,P0);if(v4(t))return u0(r,G0,t,P0);zY(r,t)}if(typeof t==="string"&&t!==""||typeof t==="number")return H(G1(r,G0,""+t,P0));if(typeof t==="function")QY(r);return X(r,G0)}return g1}var $Q=vB(!0),fB=vB(!1);function Gw(z,Q){if(z!==null&&Q.child!==z.child)throw Error("Resuming work not yet implemented.");if(Q.child===null)return;var X=Q.child,Z=Oz(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Oz(X,X.pendingProps),Z.return=Q;Z.sibling=null}function qw(z,Q){var X=z.child;while(X!==null)zb(X,Q),X=X.sibling}var T9=O8(null),k9;k9={};var XY=null,HQ=null,C9=null,ZY=!1;function JY(){XY=null,HQ=null,C9=null,ZY=!1}function hB(){ZY=!0}function yB(){ZY=!1}function VB(z,Q,X){{j7(T9,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==k9)q("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=k9}}}function S9(z,Q){var X=T9.current;x7(T9,Q),z._currentValue=X}function v9(z,Q,X){var Z=z;while(Z!==null){var J=Z.alternate;if(!lz(Z.childLanes,Q)){if(Z.childLanes=v1(Z.childLanes,Q),J!==null)J.childLanes=v1(J.childLanes,Q)}else if(J!==null&&!lz(J.childLanes,Q))J.childLanes=v1(J.childLanes,Q);if(Z===X)break;Z=Z.return}if(Z!==X)q("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Bw(z,Q,X){Uw(z,Q,X)}function Uw(z,Q,X){var Z=z.child;if(Z!==null)Z.return=z;while(Z!==null){var J=void 0,$=Z.dependencies;if($!==null){J=Z.child;var H=$.firstContext;while(H!==null){if(H.context===Q){if(Z.tag===_){var B=OX(X),W=j6(f4,B);W.tag=$Y;var F=Z.updateQueue;if(F===null);else{var I=F.shared,d=I.pending;if(d===null)W.next=W;else W.next=d.next,d.next=W;I.pending=W}}Z.lanes=v1(Z.lanes,X);var c=Z.alternate;if(c!==null)c.lanes=v1(c.lanes,X);v9(Z.return,X,z),$.lanes=v1($.lanes,X);break}H=H.next}}else if(Z.tag===g)J=Z.type===z.type?null:Z.child;else if(Z.tag===s){var Z0=Z.return;if(Z0===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");Z0.lanes=v1(Z0.lanes,X);var J0=Z0.alternate;if(J0!==null)J0.lanes=v1(J0.lanes,X);v9(Z0,X,z),J=Z.sibling}else J=Z.child;if(J!==null)J.return=Z;else{J=Z;while(J!==null){if(J===z){J=null;break}var Y0=J.sibling;if(Y0!==null){Y0.return=J.return,J=Y0;break}J=J.return}}Z=J}}function GQ(z,Q){XY=z,HQ=null,C9=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(R5(X.lanes,Q))UZ();X.firstContext=null}}}function X7(z){if(ZY)q("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var Q=z._currentValue;if(C9===z);else{var X={context:z,memoizedValue:Q,next:null};if(HQ===null){if(XY===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");HQ=X,XY.dependencies={lanes:M0,firstContext:X}}else HQ=HQ.next=X}return Q}var $z=null;function f9(z){if($z===null)$z=[z];else $z.push(z)}function Ww(){if($z!==null){for(var z=0;z<$z.length;z++){var Q=$z[z],X=Q.interleaved;if(X!==null){Q.interleaved=null;var Z=X.next,J=Q.pending;if(J!==null){var $=J.next;J.next=Z,X.next=$}Q.pending=X}}$z=null}}function DB(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,YY(z,Z)}function Kw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;Q.interleaved=X}function Ow(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,YY(z,Z)}function G5(z,Q){return YY(z,Q)}var _w=YY;function YY(z,Q){z.lanes=v1(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=v1(X.lanes,Q);if(X===null&&(z.flags&(Q7|v6))!==_1)hW(z);var Z=z,J=z.return;while(J!==null){if(J.childLanes=v1(J.childLanes,Q),X=J.alternate,X!==null)X.childLanes=v1(X.childLanes,Q);else if((J.flags&(Q7|v6))!==_1)hW(z);Z=J,J=J.return}if(Z.tag===b){var $=Z.stateNode;return $}else return null}var mB=0,EB=1,$Y=2,h9=3,HY=!1,y9,GY;y9=!1,GY=null;function V9(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:M0},effects:null};z.updateQueue=Q}function uB(z,Q){var X=Q.updateQueue,Z=z.updateQueue;if(X===Z){var J={baseState:Z.baseState,firstBaseUpdate:Z.firstBaseUpdate,lastBaseUpdate:Z.lastBaseUpdate,shared:Z.shared,effects:Z.effects};Q.updateQueue=J}}function j6(z,Q){var X={eventTime:z,lane:Q,tag:mB,payload:null,callback:null,next:null};return X}function N8(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var J=Z.shared;if(GY===J&&!y9)q("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),y9=!0;if(RP()){var $=J.pending;if($===null)Q.next=Q;else Q.next=$.next,$.next=Q;return J.pending=Q,_w(z,X)}else return Ow(z,J,Q,X)}function qY(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var J=Z.shared;if(r2(X)){var $=J.lanes;$=s2($,z.pendingLanes);var H=v1($,X);J.lanes=H,T$(z,H)}}function D9(z,Q){var{updateQueue:X,alternate:Z}=z;if(Z!==null){var J=Z.updateQueue;if(X===J){var $=null,H=null,B=X.firstBaseUpdate;if(B!==null){var W=B;do{var F={eventTime:W.eventTime,lane:W.lane,tag:W.tag,payload:W.payload,callback:W.callback,next:null};if(H===null)$=H=F;else H.next=F,H=F;W=W.next}while(W!==null);if(H===null)$=H=Q;else H.next=Q,H=Q}else $=H=Q;X={baseState:J.baseState,firstBaseUpdate:$,lastBaseUpdate:H,shared:J.shared,effects:J.effects},z.updateQueue=X;return}}var I=X.lastBaseUpdate;if(I===null)X.firstBaseUpdate=Q;else I.next=Q;X.lastBaseUpdate=Q}function Lw(z,Q,X,Z,J,$){switch(X.tag){case EB:{var H=X.payload;if(typeof H==="function"){hB();var B=H.call($,Z,J);{if(z.mode&i4){w7(!0);try{H.call($,Z,J)}finally{w7(!1)}}yB()}return B}return H}case h9:z.flags=z.flags&~r7|Q4;case mB:{var W=X.payload,F;if(typeof W==="function"){hB(),F=W.call($,Z,J);{if(z.mode&i4){w7(!0);try{W.call($,Z,J)}finally{w7(!1)}}yB()}}else F=W;if(F===null||F===void 0)return Z;return y1({},Z,F)}case $Y:return HY=!0,Z}return Z}function BY(z,Q,X,Z){var J=z.updateQueue;HY=!1,GY=J.shared;var{firstBaseUpdate:$,lastBaseUpdate:H}=J,B=J.shared.pending;if(B!==null){J.shared.pending=null;var W=B,F=W.next;if(W.next=null,H===null)$=F;else H.next=F;H=W;var I=z.alternate;if(I!==null){var d=I.updateQueue,c=d.lastBaseUpdate;if(c!==H){if(c===null)d.firstBaseUpdate=F;else c.next=F;d.lastBaseUpdate=W}}}if($!==null){var Z0=J.baseState,J0=M0,Y0=null,u0=null,G1=null,z1=$;do{var{lane:u1,eventTime:g1}=z1;if(!lz(Z,u1)){var r={eventTime:g1,lane:u1,tag:z1.tag,payload:z1.payload,callback:z1.callback,next:null};if(G1===null)u0=G1=r,Y0=Z0;else G1=G1.next=r;J0=v1(J0,u1)}else{if(G1!==null){var G0={eventTime:g1,lane:F7,tag:z1.tag,payload:z1.payload,callback:z1.callback,next:null};G1=G1.next=G0}Z0=Lw(z,J,z1,Z0,Q,X);var t=z1.callback;if(t!==null&&z1.lane!==F7){z.flags|=o3;var P0=J.effects;if(P0===null)J.effects=[z1];else P0.push(z1)}}if(z1=z1.next,z1===null)if(B=J.shared.pending,B===null)break;else{var p0=B,g0=p0.next;p0.next=null,z1=g0,J.lastBaseUpdate=p0,J.shared.pending=null}}while(!0);if(G1===null)Y0=Z0;J.baseState=Y0,J.firstBaseUpdate=u0,J.lastBaseUpdate=G1;var R1=J.shared.interleaved;if(R1!==null){var A1=R1;do J0=v1(J0,A1.lane),A1=A1.next;while(A1!==R1)}else if($===null)J.shared.lanes=M0;bZ(J0),z.lanes=J0,z.memoizedState=Z0}GY=null}function Rw(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function gB(){HY=!1}function UY(){return HY}function xB(z,Q,X){var Z=Q.effects;if(Q.effects=null,Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.callback;if(H!==null)$.callback=null,Rw(H,X)}}var tX={},M8=O8(tX),sX=O8(tX),WY=O8(tX);function KY(z){if(z===tX)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return z}function jB(){var z=KY(WY.current);return z}function m9(z,Q){j7(WY,Q,z),j7(sX,z,z),j7(M8,tX,z);var X=VN(Q);x7(M8,z),j7(M8,X,z)}function qQ(z){x7(M8,z),x7(sX,z),x7(WY,z)}function E9(){var z=KY(M8.current);return z}function pB(z){var Q=KY(WY.current),X=KY(M8.current),Z=DN(X,z.type);if(X===Z)return;j7(sX,z,z),j7(M8,Z,z)}function u9(z){if(sX.current!==z)return;x7(M8,z),x7(sX,z)}var Nw=0,cB=1,dB=1,eX=2,o5=O8(Nw);function g9(z,Q){return(z&Q)!==0}function BQ(z){return z&cB}function x9(z,Q){return z&cB|Q}function Mw(z,Q){return z|Q}function w8(z,Q){j7(o5,Q,z)}function UQ(z){x7(o5,z)}function ww(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function OY(z){var Q=z;while(Q!==null){if(Q.tag===k){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||$B(Z)||Y9(Z))return Q}}else if(Q.tag===a&&Q.memoizedProps.revealOrder!==void 0){var J=(Q.flags&Q4)!==_1;if(J)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===z)return null;while(Q.sibling===null){if(Q.return===null||Q.return===z)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var q5=0,$7=1,K6=2,H7=4,C7=8,j9=[];function p9(){for(var z=0;z<j9.length;z++){var Q=j9[z];Q._workInProgressVersionPrimary=null}j9.length=0}function Fw(z,Q){var X=Q._getVersion,Z=X(Q._source);if(z.mutableSourceEagerHydrationData==null)z.mutableSourceEagerHydrationData=[Q,Z];else z.mutableSourceEagerHydrationData.push(Q,Z)}var{ReactCurrentDispatcher:j0,ReactCurrentBatchConfig:zZ}=Y,c9,WQ;c9=new Set;var Hz=M0,K4=null,G7=null,q7=null,_Y=!1,QZ=!1,XZ=0,Pw=0,bw=25,W0=null,v5=null,F8=-1,d9=!1;function J4(){{var z=W0;if(v5===null)v5=[z];else v5.push(z)}}function E0(){{var z=W0;if(v5!==null){if(F8++,v5[F8]!==z)Aw(z)}}}function KQ(z){if(z!==void 0&&z!==null&&!z4(z))q("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",W0,typeof z)}function Aw(z){{var Q=S1(K4);if(!c9.has(Q)){if(c9.add(Q),v5!==null){var X="",Z=30;for(var J=0;J<=F8;J++){var $=v5[J],H=J===F8?z:$,B=J+1+". "+$;while(B.length<Z)B+=" ";B+=H+`
|
|
71
|
+
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return Z}function zY(z,Q){var X=Object.prototype.toString.call(Q);throw Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}function QY(z){{var Q=S1(z)||"Component";if(I9[Q])return;I9[Q]=!0,q("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function SB(z){var{_payload:Q,_init:X}=z;return X(Q)}function vB(z){function Q(r,G0){if(!z)return;var t=r.deletions;if(t===null)r.deletions=[G0],r.flags|=x8;else t.push(G0)}function X(r,G0){if(!z)return null;var t=G0;while(t!==null)Q(r,t),t=t.sibling;return null}function Z(r,G0){var t=new Map,P0=G0;while(P0!==null){if(P0.key!==null)t.set(P0.key,P0);else t.set(P0.index,P0);P0=P0.sibling}return t}function J(r,G0){var t=Oz(r,G0);return t.index=0,t.sibling=null,t}function $(r,G0,t){if(r.index=t,!z)return r.flags|=h2,G0;var P0=r.alternate;if(P0!==null){var p0=P0.index;if(p0<G0)return r.flags|=Q7,G0;else return p0}else return r.flags|=Q7,G0}function H(r){if(z&&r.alternate===null)r.flags|=Q7;return r}function B(r,G0,t,P0){if(G0===null||G0.tag!==w){var p0=PG(t,r.mode,P0);return p0.return=r,p0}else{var g0=J(G0,t);return g0.return=r,g0}}function W(r,G0,t,P0){var p0=t.type;if(p0===t1)return I(r,G0,t.props.children,P0,t.key);if(G0!==null){if(G0.elementType===p0||mW(G0,t)||typeof p0==="object"&&p0!==null&&p0.$$typeof===e0&&SB(p0)===G0.type){var g0=J(G0,t.props);return g0.ref=rX(r,G0,t),g0.return=r,g0._debugSource=t._source,g0._debugOwner=t._owner,g0}}var R1=FG(t,r.mode,P0);return R1.ref=rX(r,G0,t),R1.return=r,R1}function F(r,G0,t,P0){if(G0===null||G0.tag!==P||G0.stateNode.containerInfo!==t.containerInfo||G0.stateNode.implementation!==t.implementation){var p0=bG(t,r.mode,P0);return p0.return=r,p0}else{var g0=J(G0,t.children||[]);return g0.return=r,g0}}function I(r,G0,t,P0,p0){if(G0===null||G0.tag!==f){var g0=C8(t,r.mode,P0,p0);return g0.return=r,g0}else{var R1=J(G0,t);return R1.return=r,R1}}function d(r,G0,t){if(typeof G0==="string"&&G0!==""||typeof G0==="number"){var P0=PG(""+G0,r.mode,t);return P0.return=r,P0}if(typeof G0==="object"&&G0!==null){switch(G0.$$typeof){case G4:{var p0=FG(G0,r.mode,t);return p0.ref=rX(r,null,G0),p0.return=r,p0}case N4:{var g0=bG(G0,r.mode,t);return g0.return=r,g0}case e0:{var{_payload:R1,_init:A1}=G0;return d(r,A1(R1),t)}}if(z4(G0)||v4(G0)){var O4=C8(G0,r.mode,t,null);return O4.return=r,O4}zY(r,G0)}if(typeof G0==="function")QY(r);return null}function c(r,G0,t,P0){var p0=G0!==null?G0.key:null;if(typeof t==="string"&&t!==""||typeof t==="number"){if(p0!==null)return null;return B(r,G0,""+t,P0)}if(typeof t==="object"&&t!==null){switch(t.$$typeof){case G4:if(t.key===p0)return W(r,G0,t,P0);else return null;case N4:if(t.key===p0)return F(r,G0,t,P0);else return null;case e0:{var{_payload:g0,_init:R1}=t;return c(r,G0,R1(g0),P0)}}if(z4(t)||v4(t)){if(p0!==null)return null;return I(r,G0,t,P0,null)}zY(r,t)}if(typeof t==="function")QY(r);return null}function Z0(r,G0,t,P0,p0){if(typeof P0==="string"&&P0!==""||typeof P0==="number"){var g0=r.get(t)||null;return B(G0,g0,""+P0,p0)}if(typeof P0==="object"&&P0!==null){switch(P0.$$typeof){case G4:{var R1=r.get(P0.key===null?t:P0.key)||null;return W(G0,R1,P0,p0)}case N4:{var A1=r.get(P0.key===null?t:P0.key)||null;return F(G0,A1,P0,p0)}case e0:var{_payload:O4,_init:s1}=P0;return Z0(r,G0,t,s1(O4),p0)}if(z4(P0)||v4(P0)){var s4=r.get(t)||null;return I(G0,s4,P0,p0,null)}zY(G0,P0)}if(typeof P0==="function")QY(G0);return null}function J0(r,G0,t){{if(typeof r!=="object"||r===null)return G0;switch(r.$$typeof){case G4:case N4:CB(r,t);var P0=r.key;if(typeof P0!=="string")break;if(G0===null){G0=new Set,G0.add(P0);break}if(!G0.has(P0)){G0.add(P0);break}q("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be "+"duplicated and/or omitted — the behavior is unsupported and "+"could change in a future version.",P0);break;case e0:var{_payload:p0,_init:g0}=r;J0(g0(p0),G0,t);break}}return G0}function Y0(r,G0,t,P0){{var p0=null;for(var g0=0;g0<t.length;g0++){var R1=t[g0];p0=J0(R1,p0,r)}}var A1=null,O4=null,s1=G0,s4=0,e1=0,o4=null;for(;s1!==null&&e1<t.length;e1++){if(s1.index>e1)o4=s1,s1=null;else o4=s1.sibling;var c7=c(r,s1,t[e1],P0);if(c7===null){if(s1===null)s1=o4;break}if(z){if(s1&&c7.alternate===null)Q(r,s1)}if(s4=$(c7,s4,e1),O4===null)A1=c7;else O4.sibling=c7;O4=c7,s1=o4}if(e1===t.length){if(X(r,s1),k7()){var V7=e1;Qz(r,V7)}return A1}if(s1===null){for(;e1<t.length;e1++){var b5=d(r,t[e1],P0);if(b5===null)continue;if(s4=$(b5,s4,e1),O4===null)A1=b5;else O4.sibling=b5;O4=b5}if(k7()){var z5=e1;Qz(r,z5)}return A1}var Q5=Z(r,s1);for(;e1<t.length;e1++){var d7=Z0(Q5,r,e1,t[e1],P0);if(d7!==null){if(z){if(d7.alternate!==null)Q5.delete(d7.key===null?e1:d7.key)}if(s4=$(d7,s4,e1),O4===null)A1=d7;else O4.sibling=d7;O4=d7}}if(z)Q5.forEach(function(AQ){return Q(r,AQ)});if(k7()){var o6=e1;Qz(r,o6)}return A1}function u0(r,G0,t,P0){var p0=v4(t);if(typeof p0!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{if(typeof Symbol==="function"&&t[Symbol.toStringTag]==="Generator"){if(!P9)q("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");P9=!0}if(t.entries===p0){if(!F9)q("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");F9=!0}var g0=p0.call(t);if(g0){var R1=null,A1=g0.next();for(;!A1.done;A1=g0.next()){var O4=A1.value;R1=J0(O4,R1,r)}}}var s1=p0.call(t);if(s1==null)throw Error("An iterable object provided no iterator.");var s4=null,e1=null,o4=G0,c7=0,V7=0,b5=null,z5=s1.next();for(;o4!==null&&!z5.done;V7++,z5=s1.next()){if(o4.index>V7)b5=o4,o4=null;else b5=o4.sibling;var Q5=c(r,o4,z5.value,P0);if(Q5===null){if(o4===null)o4=b5;break}if(z){if(o4&&Q5.alternate===null)Q(r,o4)}if(c7=$(Q5,c7,V7),e1===null)s4=Q5;else e1.sibling=Q5;e1=Q5,o4=b5}if(z5.done){if(X(r,o4),k7()){var d7=V7;Qz(r,d7)}return s4}if(o4===null){for(;!z5.done;V7++,z5=s1.next()){var o6=d(r,z5.value,P0);if(o6===null)continue;if(c7=$(o6,c7,V7),e1===null)s4=o6;else e1.sibling=o6;e1=o6}if(k7()){var AQ=V7;Qz(r,AQ)}return s4}var CZ=Z(r,o4);for(;!z5.done;V7++,z5=s1.next()){var w6=Z0(CZ,r,V7,z5.value,P0);if(w6!==null){if(z){if(w6.alternate!==null)CZ.delete(w6.key===null?V7:w6.key)}if(c7=$(w6,c7,V7),e1===null)s4=w6;else e1.sibling=w6;e1=w6}}if(z)CZ.forEach(function(Eb){return Q(r,Eb)});if(k7()){var mb=V7;Qz(r,mb)}return s4}function G1(r,G0,t,P0){if(G0!==null&&G0.tag===w){X(r,G0.sibling);var p0=J(G0,t);return p0.return=r,p0}X(r,G0);var g0=PG(t,r.mode,P0);return g0.return=r,g0}function z1(r,G0,t,P0){var p0=t.key,g0=G0;while(g0!==null){if(g0.key===p0){var R1=t.type;if(R1===t1){if(g0.tag===f){X(r,g0.sibling);var A1=J(g0,t.props.children);return A1.return=r,A1._debugSource=t._source,A1._debugOwner=t._owner,A1}}else if(g0.elementType===R1||mW(g0,t)||typeof R1==="object"&&R1!==null&&R1.$$typeof===e0&&SB(R1)===g0.type){X(r,g0.sibling);var O4=J(g0,t.props);return O4.ref=rX(r,g0,t),O4.return=r,O4._debugSource=t._source,O4._debugOwner=t._owner,O4}X(r,g0);break}else Q(r,g0);g0=g0.sibling}if(t.type===t1){var s1=C8(t.props.children,r.mode,P0,t.key);return s1.return=r,s1}else{var s4=FG(t,r.mode,P0);return s4.ref=rX(r,G0,t),s4.return=r,s4}}function u1(r,G0,t,P0){var p0=t.key,g0=G0;while(g0!==null){if(g0.key===p0)if(g0.tag===P&&g0.stateNode.containerInfo===t.containerInfo&&g0.stateNode.implementation===t.implementation){X(r,g0.sibling);var R1=J(g0,t.children||[]);return R1.return=r,R1}else{X(r,g0);break}else Q(r,g0);g0=g0.sibling}var A1=bG(t,r.mode,P0);return A1.return=r,A1}function g1(r,G0,t,P0){var p0=typeof t==="object"&&t!==null&&t.type===t1&&t.key===null;if(p0)t=t.props.children;if(typeof t==="object"&&t!==null){switch(t.$$typeof){case G4:return H(z1(r,G0,t,P0));case N4:return H(u1(r,G0,t,P0));case e0:var{_payload:g0,_init:R1}=t;return g1(r,G0,R1(g0),P0)}if(z4(t))return Y0(r,G0,t,P0);if(v4(t))return u0(r,G0,t,P0);zY(r,t)}if(typeof t==="string"&&t!==""||typeof t==="number")return H(G1(r,G0,""+t,P0));if(typeof t==="function")QY(r);return X(r,G0)}return g1}var $Q=vB(!0),fB=vB(!1);function Gw(z,Q){if(z!==null&&Q.child!==z.child)throw Error("Resuming work not yet implemented.");if(Q.child===null)return;var X=Q.child,Z=Oz(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Oz(X,X.pendingProps),Z.return=Q;Z.sibling=null}function qw(z,Q){var X=z.child;while(X!==null)zb(X,Q),X=X.sibling}var T9=O8(null),k9;k9={};var XY=null,HQ=null,C9=null,ZY=!1;function JY(){XY=null,HQ=null,C9=null,ZY=!1}function hB(){ZY=!0}function yB(){ZY=!1}function VB(z,Q,X){{j7(T9,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==k9)q("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=k9}}}function S9(z,Q){var X=T9.current;x7(T9,Q),z._currentValue=X}function v9(z,Q,X){var Z=z;while(Z!==null){var J=Z.alternate;if(!lz(Z.childLanes,Q)){if(Z.childLanes=v1(Z.childLanes,Q),J!==null)J.childLanes=v1(J.childLanes,Q)}else if(J!==null&&!lz(J.childLanes,Q))J.childLanes=v1(J.childLanes,Q);if(Z===X)break;Z=Z.return}if(Z!==X)q("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Bw(z,Q,X){Uw(z,Q,X)}function Uw(z,Q,X){var Z=z.child;if(Z!==null)Z.return=z;while(Z!==null){var J=void 0,$=Z.dependencies;if($!==null){J=Z.child;var H=$.firstContext;while(H!==null){if(H.context===Q){if(Z.tag===_){var B=OX(X),W=j6(f4,B);W.tag=$Y;var F=Z.updateQueue;if(F===null);else{var I=F.shared,d=I.pending;if(d===null)W.next=W;else W.next=d.next,d.next=W;I.pending=W}}Z.lanes=v1(Z.lanes,X);var c=Z.alternate;if(c!==null)c.lanes=v1(c.lanes,X);v9(Z.return,X,z),$.lanes=v1($.lanes,X);break}H=H.next}}else if(Z.tag===g)J=Z.type===z.type?null:Z.child;else if(Z.tag===s){var Z0=Z.return;if(Z0===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");Z0.lanes=v1(Z0.lanes,X);var J0=Z0.alternate;if(J0!==null)J0.lanes=v1(J0.lanes,X);v9(Z0,X,z),J=Z.sibling}else J=Z.child;if(J!==null)J.return=Z;else{J=Z;while(J!==null){if(J===z){J=null;break}var Y0=J.sibling;if(Y0!==null){Y0.return=J.return,J=Y0;break}J=J.return}}Z=J}}function GQ(z,Q){XY=z,HQ=null,C9=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(R5(X.lanes,Q))UZ();X.firstContext=null}}}function X7(z){if(ZY)q("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var Q=z._currentValue;if(C9===z);else{var X={context:z,memoizedValue:Q,next:null};if(HQ===null){if(XY===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");HQ=X,XY.dependencies={lanes:M0,firstContext:X}}else HQ=HQ.next=X}return Q}var $z=null;function f9(z){if($z===null)$z=[z];else $z.push(z)}function Ww(){if($z!==null){for(var z=0;z<$z.length;z++){var Q=$z[z],X=Q.interleaved;if(X!==null){Q.interleaved=null;var Z=X.next,J=Q.pending;if(J!==null){var $=J.next;J.next=Z,X.next=$}Q.pending=X}}$z=null}}function DB(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,YY(z,Z)}function Kw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;Q.interleaved=X}function Ow(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,f9(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,YY(z,Z)}function G5(z,Q){return YY(z,Q)}var _w=YY;function YY(z,Q){z.lanes=v1(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=v1(X.lanes,Q);if(X===null&&(z.flags&(Q7|v6))!==_1)hW(z);var Z=z,J=z.return;while(J!==null){if(J.childLanes=v1(J.childLanes,Q),X=J.alternate,X!==null)X.childLanes=v1(X.childLanes,Q);else if((J.flags&(Q7|v6))!==_1)hW(z);Z=J,J=J.return}if(Z.tag===b){var $=Z.stateNode;return $}else return null}var mB=0,EB=1,$Y=2,h9=3,HY=!1,y9,GY;y9=!1,GY=null;function V9(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:M0},effects:null};z.updateQueue=Q}function uB(z,Q){var X=Q.updateQueue,Z=z.updateQueue;if(X===Z){var J={baseState:Z.baseState,firstBaseUpdate:Z.firstBaseUpdate,lastBaseUpdate:Z.lastBaseUpdate,shared:Z.shared,effects:Z.effects};Q.updateQueue=J}}function j6(z,Q){var X={eventTime:z,lane:Q,tag:mB,payload:null,callback:null,next:null};return X}function N8(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var J=Z.shared;if(GY===J&&!y9)q("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),y9=!0;if(RP()){var $=J.pending;if($===null)Q.next=Q;else Q.next=$.next,$.next=Q;return J.pending=Q,_w(z,X)}else return Ow(z,J,Q,X)}function qY(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var J=Z.shared;if(r2(X)){var $=J.lanes;$=s2($,z.pendingLanes);var H=v1($,X);J.lanes=H,T$(z,H)}}function D9(z,Q){var{updateQueue:X,alternate:Z}=z;if(Z!==null){var J=Z.updateQueue;if(X===J){var $=null,H=null,B=X.firstBaseUpdate;if(B!==null){var W=B;do{var F={eventTime:W.eventTime,lane:W.lane,tag:W.tag,payload:W.payload,callback:W.callback,next:null};if(H===null)$=H=F;else H.next=F,H=F;W=W.next}while(W!==null);if(H===null)$=H=Q;else H.next=Q,H=Q}else $=H=Q;X={baseState:J.baseState,firstBaseUpdate:$,lastBaseUpdate:H,shared:J.shared,effects:J.effects},z.updateQueue=X;return}}var I=X.lastBaseUpdate;if(I===null)X.firstBaseUpdate=Q;else I.next=Q;X.lastBaseUpdate=Q}function Lw(z,Q,X,Z,J,$){switch(X.tag){case EB:{var H=X.payload;if(typeof H==="function"){hB();var B=H.call($,Z,J);{if(z.mode&i4){w7(!0);try{H.call($,Z,J)}finally{w7(!1)}}yB()}return B}return H}case h9:z.flags=z.flags&~r7|Q4;case mB:{var W=X.payload,F;if(typeof W==="function"){hB(),F=W.call($,Z,J);{if(z.mode&i4){w7(!0);try{W.call($,Z,J)}finally{w7(!1)}}yB()}}else F=W;if(F===null||F===void 0)return Z;return y1({},Z,F)}case $Y:return HY=!0,Z}return Z}function BY(z,Q,X,Z){var J=z.updateQueue;HY=!1,GY=J.shared;var{firstBaseUpdate:$,lastBaseUpdate:H}=J,B=J.shared.pending;if(B!==null){J.shared.pending=null;var W=B,F=W.next;if(W.next=null,H===null)$=F;else H.next=F;H=W;var I=z.alternate;if(I!==null){var d=I.updateQueue,c=d.lastBaseUpdate;if(c!==H){if(c===null)d.firstBaseUpdate=F;else c.next=F;d.lastBaseUpdate=W}}}if($!==null){var Z0=J.baseState,J0=M0,Y0=null,u0=null,G1=null,z1=$;do{var{lane:u1,eventTime:g1}=z1;if(!lz(Z,u1)){var r={eventTime:g1,lane:u1,tag:z1.tag,payload:z1.payload,callback:z1.callback,next:null};if(G1===null)u0=G1=r,Y0=Z0;else G1=G1.next=r;J0=v1(J0,u1)}else{if(G1!==null){var G0={eventTime:g1,lane:F7,tag:z1.tag,payload:z1.payload,callback:z1.callback,next:null};G1=G1.next=G0}Z0=Lw(z,J,z1,Z0,Q,X);var t=z1.callback;if(t!==null&&z1.lane!==F7){z.flags|=o3;var P0=J.effects;if(P0===null)J.effects=[z1];else P0.push(z1)}}if(z1=z1.next,z1===null)if(B=J.shared.pending,B===null)break;else{var p0=B,g0=p0.next;p0.next=null,z1=g0,J.lastBaseUpdate=p0,J.shared.pending=null}}while(!0);if(G1===null)Y0=Z0;J.baseState=Y0,J.firstBaseUpdate=u0,J.lastBaseUpdate=G1;var R1=J.shared.interleaved;if(R1!==null){var A1=R1;do J0=v1(J0,A1.lane),A1=A1.next;while(A1!==R1)}else if($===null)J.shared.lanes=M0;bZ(J0),z.lanes=J0,z.memoizedState=Z0}GY=null}function Rw(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function gB(){HY=!1}function UY(){return HY}function xB(z,Q,X){var Z=Q.effects;if(Q.effects=null,Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.callback;if(H!==null)$.callback=null,Rw(H,X)}}var tX={},M8=O8(tX),sX=O8(tX),WY=O8(tX);function KY(z){if(z===tX)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return z}function jB(){var z=KY(WY.current);return z}function m9(z,Q){j7(WY,Q,z),j7(sX,z,z),j7(M8,tX,z);var X=VN(Q);x7(M8,z),j7(M8,X,z)}function qQ(z){x7(M8,z),x7(sX,z),x7(WY,z)}function E9(){var z=KY(M8.current);return z}function pB(z){var Q=KY(WY.current),X=KY(M8.current),Z=DN(X,z.type);if(X===Z)return;j7(sX,z,z),j7(M8,Z,z)}function u9(z){if(sX.current!==z)return;x7(M8,z),x7(sX,z)}var Nw=0,cB=1,dB=1,eX=2,a5=O8(Nw);function g9(z,Q){return(z&Q)!==0}function BQ(z){return z&cB}function x9(z,Q){return z&cB|Q}function Mw(z,Q){return z|Q}function w8(z,Q){j7(a5,Q,z)}function UQ(z){x7(a5,z)}function ww(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function OY(z){var Q=z;while(Q!==null){if(Q.tag===k){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||$B(Z)||Y9(Z))return Q}}else if(Q.tag===a&&Q.memoizedProps.revealOrder!==void 0){var J=(Q.flags&Q4)!==_1;if(J)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===z)return null;while(Q.sibling===null){if(Q.return===null||Q.return===z)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var q5=0,$7=1,K6=2,H7=4,C7=8,j9=[];function p9(){for(var z=0;z<j9.length;z++){var Q=j9[z];Q._workInProgressVersionPrimary=null}j9.length=0}function Fw(z,Q){var X=Q._getVersion,Z=X(Q._source);if(z.mutableSourceEagerHydrationData==null)z.mutableSourceEagerHydrationData=[Q,Z];else z.mutableSourceEagerHydrationData.push(Q,Z)}var{ReactCurrentDispatcher:j0,ReactCurrentBatchConfig:zZ}=Y,c9,WQ;c9=new Set;var Hz=M0,K4=null,G7=null,q7=null,_Y=!1,QZ=!1,XZ=0,Pw=0,bw=25,W0=null,f5=null,F8=-1,d9=!1;function J4(){{var z=W0;if(f5===null)f5=[z];else f5.push(z)}}function E0(){{var z=W0;if(f5!==null){if(F8++,f5[F8]!==z)Aw(z)}}}function KQ(z){if(z!==void 0&&z!==null&&!z4(z))q("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",W0,typeof z)}function Aw(z){{var Q=S1(K4);if(!c9.has(Q)){if(c9.add(Q),f5!==null){var X="",Z=30;for(var J=0;J<=F8;J++){var $=f5[J],H=J===F8?z:$,B=J+1+". "+$;while(B.length<Z)B+=" ";B+=H+`
|
|
72
72
|
`,X+=B}q(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
|
|
73
73
|
|
|
74
74
|
Previous render Next render
|
|
@@ -81,7 +81,7 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}retur
|
|
|
81
81
|
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function l9(z,Q){if(d9)return!1;if(Q===null)return q("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",W0),!1;if(z.length!==Q.length)q(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
82
82
|
|
|
83
83
|
Previous: %s
|
|
84
|
-
Incoming: %s`,W0,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(w5(z[X],Q[X]))continue;return!1}return!0}function OQ(z,Q,X,Z,J,$){if(Hz=$,K4=Q,v5=z!==null?z._debugHookTypes:null,F8=-1,d9=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=M0,z!==null&&z.memoizedState!==null)j0.current=WU;else if(v5!==null)j0.current=UU;else j0.current=BU;var H=X(Z,J);if(QZ){var B=0;do{if(QZ=!1,XZ=0,B>=bw)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");B+=1,d9=!1,G7=null,q7=null,Q.updateQueue=null,F8=-1,j0.current=KU,H=X(Z,J)}while(QZ)}j0.current=vY,Q._debugHookTypes=v5;var W=G7!==null&&G7.next!==null;if(Hz=M0,K4=null,G7=null,q7=null,W0=null,v5=null,F8=-1,z!==null&&(z.flags&h6)!==(Q.flags&h6)&&(z.mode&c1)!==K1)q("Internal React error: Expected static flag was missing. Please notify the React team.");if(_Y=!1,W)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return H}function _Q(){var z=XZ!==0;return XZ=0,z}function lB(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&q6)!==K1)Q.flags&=~(GJ|f6|j5|a1);else Q.flags&=~(j5|a1);z.lanes=_J(z.lanes,X)}function iB(){if(j0.current=vY,_Y){var z=K4.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}_Y=!1}Hz=M0,K4=null,G7=null,q7=null,v5=null,F8=-1,W0=null,YU=!1,QZ=!1,XZ=0}function O6(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(q7===null)K4.memoizedState=q7=z;else q7=q7.next=z;return q7}function f5(){var z;if(G7===null){var Q=K4.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=G7.next;var X;if(q7===null)X=K4.memoizedState;else X=q7.next;if(X!==null)q7=X,X=q7.next,G7=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");G7=z;var Z={memoizedState:G7.memoizedState,baseState:G7.baseState,baseQueue:G7.baseQueue,queue:G7.queue,next:null};if(q7===null)K4.memoizedState=q7=Z;else q7=q7.next=Z}return q7}function oB(){return{lastEffect:null,stores:null}}function i9(z,Q){return typeof Q==="function"?Q(z):Q}function o9(z,Q,X){var Z=O6(),J;if(X!==void 0)J=X(Q);else J=Q;Z.memoizedState=Z.baseState=J;var $={pending:null,interleaved:null,lanes:M0,dispatch:null,lastRenderedReducer:z,lastRenderedState:J};Z.queue=$;var H=$.dispatch=kw.bind(null,K4,$);return[Z.memoizedState,H]}function a9(z,Q,X){var Z=f5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var $=G7,H=$.baseQueue,B=J.pending;if(B!==null){if(H!==null){var W=H.next,F=B.next;H.next=F,B.next=W}if($.baseQueue!==H)q("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");$.baseQueue=H=B,J.pending=null}if(H!==null){var I=H.next,d=$.baseState,c=null,Z0=null,J0=null,Y0=I;do{var u0=Y0.lane;if(!lz(Hz,u0)){var G1={lane:u0,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};if(J0===null)Z0=J0=G1,c=d;else J0=J0.next=G1;K4.lanes=v1(K4.lanes,u0),bZ(u0)}else{if(J0!==null){var z1={lane:F7,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};J0=J0.next=z1}if(Y0.hasEagerState)d=Y0.eagerState;else{var u1=Y0.action;d=z(d,u1)}}Y0=Y0.next}while(Y0!==null&&Y0!==I);if(J0===null)c=d;else J0.next=Z0;if(!w5(d,Z.memoizedState))UZ();Z.memoizedState=d,Z.baseState=c,Z.baseQueue=J0,J.lastRenderedState=d}var g1=J.interleaved;if(g1!==null){var r=g1;do{var G0=r.lane;K4.lanes=v1(K4.lanes,G0),bZ(G0),r=r.next}while(r!==g1)}else if(H===null)J.lanes=M0;var t=J.dispatch;return[Z.memoizedState,t]}function n9(z,Q,X){var Z=f5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var{dispatch:$,pending:H}=J,B=Z.memoizedState;if(H!==null){J.pending=null;var W=H.next,F=W;do{var I=F.action;B=z(B,I),F=F.next}while(F!==W);if(!w5(B,Z.memoizedState))UZ();if(Z.memoizedState=B,Z.baseQueue===null)Z.baseState=B;J.lastRenderedState=B}return[B,$]}function r9(z,Q,X){return}function LY(z,Q,X){return}function t9(z,Q,X){var Z=K4,J=O6(),$,H=k7();if(H){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if($=X(),!WQ){if($!==X())q("The result of getServerSnapshot should be cached to avoid an infinite loop"),WQ=!0}}else{if($=Q(),!WQ){var B=Q();if(!w5($,B))q("The result of getSnapshot should be cached to avoid an infinite loop"),WQ=!0}var W=nY();if(W===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!OJ(W,Hz))aB(Z,Q,$)}J.memoizedState=$;var F={value:$,getSnapshot:Q};return J.queue=F,FY(rB.bind(null,Z,F,z),[z]),Z.flags|=j5,ZZ($7|C7,nB.bind(null,Z,F,$,Q),void 0,null),$}function RY(z,Q,X){var Z=K4,J=f5(),$=Q();if(!WQ){var H=Q();if(!w5($,H))q("The result of getSnapshot should be cached to avoid an infinite loop"),WQ=!0}var B=J.memoizedState,W=!w5(B,$);if(W)J.memoizedState=$,UZ();var F=J.queue;if(YZ(rB.bind(null,Z,F,z),[z]),F.getSnapshot!==Q||W||q7!==null&&q7.memoizedState.tag&$7){Z.flags|=j5,ZZ($7|C7,nB.bind(null,Z,F,$,Q),void 0,null);var I=nY();if(I===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!OJ(I,Hz))aB(Z,Q,$)}return $}function aB(z,Q,X){z.flags|=HJ;var Z={getSnapshot:Q,value:X},J=K4.updateQueue;if(J===null)J=oB(),K4.updateQueue=J,J.stores=[Z];else{var $=J.stores;if($===null)J.stores=[Z];else $.push(Z)}}function nB(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,tB(Q))sB(z)}function rB(z,Q,X){var Z=function(){if(tB(Q))sB(z)};return X(Z)}function tB(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!w5(X,Z)}catch(J){return!0}}function sB(z){var Q=G5(z,w1);if(Q!==null)K7(Q,z,w1,f4)}function NY(z){var Q=O6();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:M0,dispatch:null,lastRenderedReducer:i9,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=Cw.bind(null,K4,X);return[Q.memoizedState,Z]}function s9(z){return a9(i9)}function e9(z){return n9(i9)}function ZZ(z,Q,X,Z){var J={tag:z,create:Q,destroy:X,deps:Z,next:null},$=K4.updateQueue;if($===null)$=oB(),K4.updateQueue=$,$.lastEffect=J.next=J;else{var H=$.lastEffect;if(H===null)$.lastEffect=J.next=J;else{var B=H.next;H.next=J,J.next=B,$.lastEffect=J}}return J}function zH(z){var Q=O6();{var X={current:z};return Q.memoizedState=X,X}}function MY(z){var Q=f5();return Q.memoizedState}function JZ(z,Q,X,Z){var J=O6(),$=Z===void 0?null:Z;K4.flags|=z,J.memoizedState=ZZ($7|Q,X,void 0,$)}function wY(z,Q,X,Z){var J=f5(),$=Z===void 0?null:Z,H=void 0;if(G7!==null){var B=G7.memoizedState;if(H=B.destroy,$!==null){var W=B.deps;if(l9($,W)){J.memoizedState=ZZ(Q,X,H,$);return}}}K4.flags|=z,J.memoizedState=ZZ($7|Q,X,H,$)}function FY(z,Q){if((K4.mode&q6)!==K1)return JZ(GJ|j5|r3,C7,z,Q);else return JZ(j5|r3,C7,z,Q)}function YZ(z,Q){return wY(j5,C7,z,Q)}function QH(z,Q){return JZ(a1,K6,z,Q)}function PY(z,Q){return wY(a1,K6,z,Q)}function XH(z,Q){var X=a1;if(X|=c8,(K4.mode&q6)!==K1)X|=f6;return JZ(X,H7,z,Q)}function bY(z,Q){return wY(a1,H7,z,Q)}function eB(z,Q){if(typeof Q==="function"){var X=Q,Z=z();return X(Z),function(){X(null)}}else if(Q!==null&&Q!==void 0){var J=Q;if(!J.hasOwnProperty("current"))q("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(J).join(", ")+"}");var $=z();return J.current=$,function(){J.current=null}}}function ZH(z,Q,X){if(typeof Q!=="function")q("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null,J=a1;if(J|=c8,(K4.mode&q6)!==K1)J|=f6;return JZ(J,H7,eB.bind(null,Q,z),Z)}function AY(z,Q,X){if(typeof Q!=="function")q("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null;return wY(a1,H7,eB.bind(null,Q,z),Z)}function IY(z,Q){}var TY=IY;function JH(z,Q){var X=O6(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function kY(z,Q){var X=f5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(l9(Z,$))return J[0]}}return X.memoizedState=[z,Z],z}function YH(z,Q){var X=O6(),Z=Q===void 0?null:Q,J=z();return X.memoizedState=[J,Z],J}function CY(z,Q){var X=f5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(l9(Z,$))return J[0]}}var H=z();return X.memoizedState=[H,Z],H}function $H(z){var Q=O6();return Q.memoizedState=z,z}function zU(z){var Q=f5(),X=G7,Z=X.memoizedState;return XU(Q,Z,z)}function QU(z){var Q=f5();if(G7===null)return Q.memoizedState=z,z;else{var X=G7.memoizedState;return XU(Q,X,z)}}function XU(z,Q,X){var Z=!BL(Hz);if(Z){if(!w5(X,Q)){var J=t2();K4.lanes=v1(K4.lanes,J),bZ(J),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,UZ();return z.memoizedState=X,X}}function Iw(z,Q,X){var Z=c5();P7(ML(Z,V6)),z(!0);var J=zZ.transition;zZ.transition={};var $=zZ.transition;zZ.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(P7(Z),zZ.transition=J,J===null&&$._updatedFibers){var H=$._updatedFibers.size;if(H>10)O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");$._updatedFibers.clear()}}}function HH(){var z=NY(!1),Q=z[0],X=z[1],Z=Iw.bind(null,X),J=O6();return J.memoizedState=Z,[Q,Z]}function ZU(){var z=s9(),Q=z[0],X=f5(),Z=X.memoizedState;return[Q,Z]}function JU(){var z=e9(),Q=z[0],X=f5(),Z=X.memoizedState;return[Q,Z]}var YU=!1;function Tw(){return YU}function GH(){var z=O6(),Q=nY(),X=Q.identifierPrefix,Z;if(k7()){var J=dM();Z=":"+X+"R"+J;var $=XZ++;if($>0)Z+="H"+$.toString(32);Z+=":"}else{var H=Pw++;Z=":"+X+"r"+H.toString(32)+":"}return z.memoizedState=Z,Z}function SY(){var z=f5(),Q=z.memoizedState;return Q}function kw(z,Q,X){if(typeof arguments[3]==="function")q("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=T8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if($U(z))HU(Q,J);else{var $=DB(z,Q,J,Z);if($!==null){var H=e7();K7($,z,Z,H),GU($,Q,Z)}}qU(z,Z)}function Cw(z,Q,X){if(typeof arguments[3]==="function")q("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=T8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if($U(z))HU(Q,J);else{var $=z.alternate;if(z.lanes===M0&&($===null||$.lanes===M0)){var H=Q.lastRenderedReducer;if(H!==null){var B;B=j0.current,j0.current=a5;try{var W=Q.lastRenderedState,F=H(W,X);if(J.hasEagerState=!0,J.eagerState=F,w5(F,W)){Kw(z,Q,J,Z);return}}catch(c){}finally{j0.current=B}}}var I=DB(z,Q,J,Z);if(I!==null){var d=e7();K7(I,z,Z,d),GU(I,Q,Z)}}qU(z,Z)}function $U(z){var Q=z.alternate;return z===K4||Q!==null&&Q===K4}function HU(z,Q){QZ=_Y=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function GU(z,Q,X){if(r2(X)){var Z=Q.lanes;Z=s2(Z,z.pendingLanes);var J=v1(Z,X);Q.lanes=J,T$(z,J)}}function qU(z,Q,X){Q$(z,Q)}var vY={readContext:X7,useCallback:p7,useContext:p7,useEffect:p7,useImperativeHandle:p7,useInsertionEffect:p7,useLayoutEffect:p7,useMemo:p7,useReducer:p7,useRef:p7,useState:p7,useDebugValue:p7,useDeferredValue:p7,useTransition:p7,useMutableSource:p7,useSyncExternalStore:p7,useId:p7,unstable_isNewReconciler:y0},BU=null,UU=null,WU=null,KU=null,_6=null,a5=null,fY=null;{var qH=function(){q("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},F1=function(){q("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};BU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",J4(),KQ(Q),JH(z,Q)},useContext:function(z){return W0="useContext",J4(),X7(z)},useEffect:function(z,Q){return W0="useEffect",J4(),KQ(Q),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",J4(),KQ(X),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",J4(),KQ(Q),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",J4(),KQ(Q),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",J4(),KQ(Q);var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",J4();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",J4(),zH(z)},useState:function(z){W0="useState",J4();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",J4(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",J4(),$H(z)},useTransition:function(){return W0="useTransition",J4(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",J4(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",J4(),t9(z,Q,X)},useId:function(){return W0="useId",J4(),GH()},unstable_isNewReconciler:y0},UU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),JH(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),zH(z)},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),$H(z)},useTransition:function(){return W0="useTransition",E0(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),t9(z,Q,X)},useId:function(){return W0="useId",E0(),GH()},unstable_isNewReconciler:y0},WU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),kY(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=a5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=a5;try{return a9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),MY()},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=a5;try{return s9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),zU(z)},useTransition:function(){return W0="useTransition",E0(),ZU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),RY(z,Q)},useId:function(){return W0="useId",E0(),SY()},unstable_isNewReconciler:y0},KU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),kY(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=fY;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=fY;try{return n9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),MY()},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=fY;try{return e9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),QU(z)},useTransition:function(){return W0="useTransition",E0(),JU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),RY(z,Q)},useId:function(){return W0="useId",E0(),SY()},unstable_isNewReconciler:y0},_6={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),J4(),JH(z,Q)},useContext:function(z){return W0="useContext",F1(),J4(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),J4(),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),J4(),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),J4(),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),J4(),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),J4();var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),J4();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),J4(),zH(z)},useState:function(z){W0="useState",F1(),J4();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),J4(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),J4(),$H(z)},useTransition:function(){return W0="useTransition",F1(),J4(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),J4(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),J4(),t9(z,Q,X)},useId:function(){return W0="useId",F1(),J4(),GH()},unstable_isNewReconciler:y0},a5={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),E0(),kY(z,Q)},useContext:function(z){return W0="useContext",F1(),E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),E0();var X=j0.current;j0.current=a5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),E0();var Z=j0.current;j0.current=a5;try{return a9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),E0(),MY()},useState:function(z){W0="useState",F1(),E0();var Q=j0.current;j0.current=a5;try{return s9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),E0(),zU(z)},useTransition:function(){return W0="useTransition",F1(),E0(),ZU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),E0(),RY(z,Q)},useId:function(){return W0="useId",F1(),E0(),SY()},unstable_isNewReconciler:y0},fY={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),E0(),kY(z,Q)},useContext:function(z){return W0="useContext",F1(),E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),E0();var X=j0.current;j0.current=a5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),E0();var Z=j0.current;j0.current=a5;try{return n9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),E0(),MY()},useState:function(z){W0="useState",F1(),E0();var Q=j0.current;j0.current=a5;try{return e9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),E0(),QU(z)},useTransition:function(){return W0="useTransition",F1(),E0(),JU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),E0(),RY(z,Q)},useId:function(){return W0="useId",F1(),E0(),SY()},unstable_isNewReconciler:y0}}var P8=_4.unstable_now,OU=0,hY=-1,$Z=-1,yY=-1,BH=!1,VY=!1;function _U(){return BH}function Sw(){VY=!0}function vw(){BH=!1,VY=!1}function fw(){BH=VY,VY=!1}function LU(){return OU}function RU(){OU=P8()}function UH(z){if($Z=P8(),z.actualStartTime<0)z.actualStartTime=P8()}function NU(z){$Z=-1}function DY(z,Q){if($Z>=0){var X=P8()-$Z;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;$Z=-1}}function L6(z){if(hY>=0){var Q=P8()-hY;hY=-1;var X=z.return;while(X!==null){switch(X.tag){case b:var Z=X.stateNode;Z.effectDuration+=Q;return;case V:var J=X.stateNode;J.effectDuration+=Q;return}X=X.return}}}function WH(z){if(yY>=0){var Q=P8()-yY;yY=-1;var X=z.return;while(X!==null){switch(X.tag){case b:var Z=X.stateNode;if(Z!==null)Z.passiveEffectDuration+=Q;return;case V:var J=X.stateNode;if(J!==null)J.passiveEffectDuration+=Q;return}X=X.return}}}function R6(){hY=P8()}function KH(){yY=P8()}function OH(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function n5(z,Q){if(z&&z.defaultProps){var X=y1({},Q),Z=z.defaultProps;for(var J in Z)if(X[J]===void 0)X[J]=Z[J];return X}return Q}var _H={},LH,RH,NH,MH,wH,MU,mY,FH,PH,bH,HZ;{LH=new Set,RH=new Set,NH=new Set,MH=new Set,FH=new Set,wH=new Set,PH=new Set,bH=new Set,HZ=new Set;var wU=new Set;mY=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!wU.has(X))wU.add(X),q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},MU=function(z,Q){if(Q===void 0){var X=n1(z)||"Component";if(!wH.has(X))wH.add(X),q("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty(_H,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(_H)}function AH(z,Q,X,Z){var J=z.memoizedState,$=X(Z,J);{if(z.mode&i4){w7(!0);try{$=X(Z,J)}finally{w7(!1)}}MU(Q,$)}var H=$===null||$===void 0?J:y1({},J,$);if(z.memoizedState=H,z.lanes===M0){var B=z.updateQueue;B.baseState=H}}var IH={isMounted:b_,enqueueSetState:function(z,Q,X){var Z=uz(z),J=e7(),$=T8(Z),H=j6(J,$);if(H.payload=Q,X!==void 0&&X!==null)mY(X,"setState"),H.callback=X;var B=N8(Z,H,$);if(B!==null)K7(B,Z,$,J),qY(B,Z,$);Q$(Z,$)},enqueueReplaceState:function(z,Q,X){var Z=uz(z),J=e7(),$=T8(Z),H=j6(J,$);if(H.tag=EB,H.payload=Q,X!==void 0&&X!==null)mY(X,"replaceState"),H.callback=X;var B=N8(Z,H,$);if(B!==null)K7(B,Z,$,J),qY(B,Z,$);Q$(Z,$)},enqueueForceUpdate:function(z,Q){var X=uz(z),Z=e7(),J=T8(X),$=j6(Z,J);if($.tag=$Y,Q!==void 0&&Q!==null)mY(Q,"forceUpdate"),$.callback=Q;var H=N8(X,$,J);if(H!==null)K7(H,X,J,Z),qY(H,X,J);zL(X,J)}};function FU(z,Q,X,Z,J,$,H){var B=z.stateNode;if(typeof B.shouldComponentUpdate==="function"){var W=B.shouldComponentUpdate(Z,$,H);{if(z.mode&i4){w7(!0);try{W=B.shouldComponentUpdate(Z,$,H)}finally{w7(!1)}}if(W===void 0)q("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",n1(Q)||"Component")}return W}if(Q.prototype&&Q.prototype.isPureReactComponent)return!SX(X,Z)||!SX(J,$);return!0}function hw(z,Q,X){var Z=z.stateNode;{var J=n1(Q)||"Component",$=Z.render;if(!$)if(Q.prototype&&typeof Q.prototype.render==="function")q("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",J);else q("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",J);if(Z.getInitialState&&!Z.getInitialState.isReactClassApproved&&!Z.state)q("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",J);if(Z.getDefaultProps&&!Z.getDefaultProps.isReactClassApproved)q("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",J);if(Z.propTypes)q("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",J);if(Z.contextType)q("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",J);{if(Q.childContextTypes&&!HZ.has(Q)&&(z.mode&i4)===K1)HZ.add(Q),q(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
84
|
+
Incoming: %s`,W0,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(w5(z[X],Q[X]))continue;return!1}return!0}function OQ(z,Q,X,Z,J,$){if(Hz=$,K4=Q,f5=z!==null?z._debugHookTypes:null,F8=-1,d9=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=M0,z!==null&&z.memoizedState!==null)j0.current=WU;else if(f5!==null)j0.current=UU;else j0.current=BU;var H=X(Z,J);if(QZ){var B=0;do{if(QZ=!1,XZ=0,B>=bw)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");B+=1,d9=!1,G7=null,q7=null,Q.updateQueue=null,F8=-1,j0.current=KU,H=X(Z,J)}while(QZ)}j0.current=vY,Q._debugHookTypes=f5;var W=G7!==null&&G7.next!==null;if(Hz=M0,K4=null,G7=null,q7=null,W0=null,f5=null,F8=-1,z!==null&&(z.flags&h6)!==(Q.flags&h6)&&(z.mode&c1)!==K1)q("Internal React error: Expected static flag was missing. Please notify the React team.");if(_Y=!1,W)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return H}function _Q(){var z=XZ!==0;return XZ=0,z}function lB(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&q6)!==K1)Q.flags&=~(GJ|f6|p5|a1);else Q.flags&=~(p5|a1);z.lanes=_J(z.lanes,X)}function iB(){if(j0.current=vY,_Y){var z=K4.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}_Y=!1}Hz=M0,K4=null,G7=null,q7=null,f5=null,F8=-1,W0=null,YU=!1,QZ=!1,XZ=0}function O6(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(q7===null)K4.memoizedState=q7=z;else q7=q7.next=z;return q7}function h5(){var z;if(G7===null){var Q=K4.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=G7.next;var X;if(q7===null)X=K4.memoizedState;else X=q7.next;if(X!==null)q7=X,X=q7.next,G7=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");G7=z;var Z={memoizedState:G7.memoizedState,baseState:G7.baseState,baseQueue:G7.baseQueue,queue:G7.queue,next:null};if(q7===null)K4.memoizedState=q7=Z;else q7=q7.next=Z}return q7}function oB(){return{lastEffect:null,stores:null}}function i9(z,Q){return typeof Q==="function"?Q(z):Q}function o9(z,Q,X){var Z=O6(),J;if(X!==void 0)J=X(Q);else J=Q;Z.memoizedState=Z.baseState=J;var $={pending:null,interleaved:null,lanes:M0,dispatch:null,lastRenderedReducer:z,lastRenderedState:J};Z.queue=$;var H=$.dispatch=kw.bind(null,K4,$);return[Z.memoizedState,H]}function a9(z,Q,X){var Z=h5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var $=G7,H=$.baseQueue,B=J.pending;if(B!==null){if(H!==null){var W=H.next,F=B.next;H.next=F,B.next=W}if($.baseQueue!==H)q("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");$.baseQueue=H=B,J.pending=null}if(H!==null){var I=H.next,d=$.baseState,c=null,Z0=null,J0=null,Y0=I;do{var u0=Y0.lane;if(!lz(Hz,u0)){var G1={lane:u0,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};if(J0===null)Z0=J0=G1,c=d;else J0=J0.next=G1;K4.lanes=v1(K4.lanes,u0),bZ(u0)}else{if(J0!==null){var z1={lane:F7,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};J0=J0.next=z1}if(Y0.hasEagerState)d=Y0.eagerState;else{var u1=Y0.action;d=z(d,u1)}}Y0=Y0.next}while(Y0!==null&&Y0!==I);if(J0===null)c=d;else J0.next=Z0;if(!w5(d,Z.memoizedState))UZ();Z.memoizedState=d,Z.baseState=c,Z.baseQueue=J0,J.lastRenderedState=d}var g1=J.interleaved;if(g1!==null){var r=g1;do{var G0=r.lane;K4.lanes=v1(K4.lanes,G0),bZ(G0),r=r.next}while(r!==g1)}else if(H===null)J.lanes=M0;var t=J.dispatch;return[Z.memoizedState,t]}function n9(z,Q,X){var Z=h5(),J=Z.queue;if(J===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");J.lastRenderedReducer=z;var{dispatch:$,pending:H}=J,B=Z.memoizedState;if(H!==null){J.pending=null;var W=H.next,F=W;do{var I=F.action;B=z(B,I),F=F.next}while(F!==W);if(!w5(B,Z.memoizedState))UZ();if(Z.memoizedState=B,Z.baseQueue===null)Z.baseState=B;J.lastRenderedState=B}return[B,$]}function r9(z,Q,X){return}function LY(z,Q,X){return}function t9(z,Q,X){var Z=K4,J=O6(),$,H=k7();if(H){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if($=X(),!WQ){if($!==X())q("The result of getServerSnapshot should be cached to avoid an infinite loop"),WQ=!0}}else{if($=Q(),!WQ){var B=Q();if(!w5($,B))q("The result of getSnapshot should be cached to avoid an infinite loop"),WQ=!0}var W=nY();if(W===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!OJ(W,Hz))aB(Z,Q,$)}J.memoizedState=$;var F={value:$,getSnapshot:Q};return J.queue=F,FY(rB.bind(null,Z,F,z),[z]),Z.flags|=p5,ZZ($7|C7,nB.bind(null,Z,F,$,Q),void 0,null),$}function RY(z,Q,X){var Z=K4,J=h5(),$=Q();if(!WQ){var H=Q();if(!w5($,H))q("The result of getSnapshot should be cached to avoid an infinite loop"),WQ=!0}var B=J.memoizedState,W=!w5(B,$);if(W)J.memoizedState=$,UZ();var F=J.queue;if(YZ(rB.bind(null,Z,F,z),[z]),F.getSnapshot!==Q||W||q7!==null&&q7.memoizedState.tag&$7){Z.flags|=p5,ZZ($7|C7,nB.bind(null,Z,F,$,Q),void 0,null);var I=nY();if(I===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!OJ(I,Hz))aB(Z,Q,$)}return $}function aB(z,Q,X){z.flags|=HJ;var Z={getSnapshot:Q,value:X},J=K4.updateQueue;if(J===null)J=oB(),K4.updateQueue=J,J.stores=[Z];else{var $=J.stores;if($===null)J.stores=[Z];else $.push(Z)}}function nB(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,tB(Q))sB(z)}function rB(z,Q,X){var Z=function(){if(tB(Q))sB(z)};return X(Z)}function tB(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!w5(X,Z)}catch(J){return!0}}function sB(z){var Q=G5(z,w1);if(Q!==null)K7(Q,z,w1,f4)}function NY(z){var Q=O6();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:M0,dispatch:null,lastRenderedReducer:i9,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=Cw.bind(null,K4,X);return[Q.memoizedState,Z]}function s9(z){return a9(i9)}function e9(z){return n9(i9)}function ZZ(z,Q,X,Z){var J={tag:z,create:Q,destroy:X,deps:Z,next:null},$=K4.updateQueue;if($===null)$=oB(),K4.updateQueue=$,$.lastEffect=J.next=J;else{var H=$.lastEffect;if(H===null)$.lastEffect=J.next=J;else{var B=H.next;H.next=J,J.next=B,$.lastEffect=J}}return J}function zH(z){var Q=O6();{var X={current:z};return Q.memoizedState=X,X}}function MY(z){var Q=h5();return Q.memoizedState}function JZ(z,Q,X,Z){var J=O6(),$=Z===void 0?null:Z;K4.flags|=z,J.memoizedState=ZZ($7|Q,X,void 0,$)}function wY(z,Q,X,Z){var J=h5(),$=Z===void 0?null:Z,H=void 0;if(G7!==null){var B=G7.memoizedState;if(H=B.destroy,$!==null){var W=B.deps;if(l9($,W)){J.memoizedState=ZZ(Q,X,H,$);return}}}K4.flags|=z,J.memoizedState=ZZ($7|Q,X,H,$)}function FY(z,Q){if((K4.mode&q6)!==K1)return JZ(GJ|p5|r3,C7,z,Q);else return JZ(p5|r3,C7,z,Q)}function YZ(z,Q){return wY(p5,C7,z,Q)}function QH(z,Q){return JZ(a1,K6,z,Q)}function PY(z,Q){return wY(a1,K6,z,Q)}function XH(z,Q){var X=a1;if(X|=c8,(K4.mode&q6)!==K1)X|=f6;return JZ(X,H7,z,Q)}function bY(z,Q){return wY(a1,H7,z,Q)}function eB(z,Q){if(typeof Q==="function"){var X=Q,Z=z();return X(Z),function(){X(null)}}else if(Q!==null&&Q!==void 0){var J=Q;if(!J.hasOwnProperty("current"))q("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(J).join(", ")+"}");var $=z();return J.current=$,function(){J.current=null}}}function ZH(z,Q,X){if(typeof Q!=="function")q("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null,J=a1;if(J|=c8,(K4.mode&q6)!==K1)J|=f6;return JZ(J,H7,eB.bind(null,Q,z),Z)}function AY(z,Q,X){if(typeof Q!=="function")q("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null;return wY(a1,H7,eB.bind(null,Q,z),Z)}function IY(z,Q){}var TY=IY;function JH(z,Q){var X=O6(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function kY(z,Q){var X=h5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(l9(Z,$))return J[0]}}return X.memoizedState=[z,Z],z}function YH(z,Q){var X=O6(),Z=Q===void 0?null:Q,J=z();return X.memoizedState=[J,Z],J}function CY(z,Q){var X=h5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(l9(Z,$))return J[0]}}var H=z();return X.memoizedState=[H,Z],H}function $H(z){var Q=O6();return Q.memoizedState=z,z}function zU(z){var Q=h5(),X=G7,Z=X.memoizedState;return XU(Q,Z,z)}function QU(z){var Q=h5();if(G7===null)return Q.memoizedState=z,z;else{var X=G7.memoizedState;return XU(Q,X,z)}}function XU(z,Q,X){var Z=!BL(Hz);if(Z){if(!w5(X,Q)){var J=t2();K4.lanes=v1(K4.lanes,J),bZ(J),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,UZ();return z.memoizedState=X,X}}function Iw(z,Q,X){var Z=d5();P7(ML(Z,V6)),z(!0);var J=zZ.transition;zZ.transition={};var $=zZ.transition;zZ.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(P7(Z),zZ.transition=J,J===null&&$._updatedFibers){var H=$._updatedFibers.size;if(H>10)O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");$._updatedFibers.clear()}}}function HH(){var z=NY(!1),Q=z[0],X=z[1],Z=Iw.bind(null,X),J=O6();return J.memoizedState=Z,[Q,Z]}function ZU(){var z=s9(),Q=z[0],X=h5(),Z=X.memoizedState;return[Q,Z]}function JU(){var z=e9(),Q=z[0],X=h5(),Z=X.memoizedState;return[Q,Z]}var YU=!1;function Tw(){return YU}function GH(){var z=O6(),Q=nY(),X=Q.identifierPrefix,Z;if(k7()){var J=dM();Z=":"+X+"R"+J;var $=XZ++;if($>0)Z+="H"+$.toString(32);Z+=":"}else{var H=Pw++;Z=":"+X+"r"+H.toString(32)+":"}return z.memoizedState=Z,Z}function SY(){var z=h5(),Q=z.memoizedState;return Q}function kw(z,Q,X){if(typeof arguments[3]==="function")q("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=T8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if($U(z))HU(Q,J);else{var $=DB(z,Q,J,Z);if($!==null){var H=e7();K7($,z,Z,H),GU($,Q,Z)}}qU(z,Z)}function Cw(z,Q,X){if(typeof arguments[3]==="function")q("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=T8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if($U(z))HU(Q,J);else{var $=z.alternate;if(z.lanes===M0&&($===null||$.lanes===M0)){var H=Q.lastRenderedReducer;if(H!==null){var B;B=j0.current,j0.current=n5;try{var W=Q.lastRenderedState,F=H(W,X);if(J.hasEagerState=!0,J.eagerState=F,w5(F,W)){Kw(z,Q,J,Z);return}}catch(c){}finally{j0.current=B}}}var I=DB(z,Q,J,Z);if(I!==null){var d=e7();K7(I,z,Z,d),GU(I,Q,Z)}}qU(z,Z)}function $U(z){var Q=z.alternate;return z===K4||Q!==null&&Q===K4}function HU(z,Q){QZ=_Y=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function GU(z,Q,X){if(r2(X)){var Z=Q.lanes;Z=s2(Z,z.pendingLanes);var J=v1(Z,X);Q.lanes=J,T$(z,J)}}function qU(z,Q,X){Q$(z,Q)}var vY={readContext:X7,useCallback:p7,useContext:p7,useEffect:p7,useImperativeHandle:p7,useInsertionEffect:p7,useLayoutEffect:p7,useMemo:p7,useReducer:p7,useRef:p7,useState:p7,useDebugValue:p7,useDeferredValue:p7,useTransition:p7,useMutableSource:p7,useSyncExternalStore:p7,useId:p7,unstable_isNewReconciler:y0},BU=null,UU=null,WU=null,KU=null,_6=null,n5=null,fY=null;{var qH=function(){q("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},F1=function(){q("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};BU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",J4(),KQ(Q),JH(z,Q)},useContext:function(z){return W0="useContext",J4(),X7(z)},useEffect:function(z,Q){return W0="useEffect",J4(),KQ(Q),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",J4(),KQ(X),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",J4(),KQ(Q),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",J4(),KQ(Q),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",J4(),KQ(Q);var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",J4();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",J4(),zH(z)},useState:function(z){W0="useState",J4();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",J4(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",J4(),$H(z)},useTransition:function(){return W0="useTransition",J4(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",J4(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",J4(),t9(z,Q,X)},useId:function(){return W0="useId",J4(),GH()},unstable_isNewReconciler:y0},UU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),JH(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),zH(z)},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),$H(z)},useTransition:function(){return W0="useTransition",E0(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),t9(z,Q,X)},useId:function(){return W0="useId",E0(),GH()},unstable_isNewReconciler:y0},WU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),kY(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=n5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=n5;try{return a9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),MY()},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=n5;try{return s9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),zU(z)},useTransition:function(){return W0="useTransition",E0(),ZU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),RY(z,Q)},useId:function(){return W0="useId",E0(),SY()},unstable_isNewReconciler:y0},KU={readContext:function(z){return X7(z)},useCallback:function(z,Q){return W0="useCallback",E0(),kY(z,Q)},useContext:function(z){return W0="useContext",E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",E0();var X=j0.current;j0.current=fY;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",E0();var Z=j0.current;j0.current=fY;try{return n9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",E0(),MY()},useState:function(z){W0="useState",E0();var Q=j0.current;j0.current=fY;try{return e9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",E0(),QU(z)},useTransition:function(){return W0="useTransition",E0(),JU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",E0(),RY(z,Q)},useId:function(){return W0="useId",E0(),SY()},unstable_isNewReconciler:y0},_6={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),J4(),JH(z,Q)},useContext:function(z){return W0="useContext",F1(),J4(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),J4(),FY(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),J4(),ZH(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),J4(),QH(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),J4(),XH(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),J4();var X=j0.current;j0.current=_6;try{return YH(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),J4();var Z=j0.current;j0.current=_6;try{return o9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),J4(),zH(z)},useState:function(z){W0="useState",F1(),J4();var Q=j0.current;j0.current=_6;try{return NY(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),J4(),IY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),J4(),$H(z)},useTransition:function(){return W0="useTransition",F1(),J4(),HH()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),J4(),r9()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),J4(),t9(z,Q,X)},useId:function(){return W0="useId",F1(),J4(),GH()},unstable_isNewReconciler:y0},n5={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),E0(),kY(z,Q)},useContext:function(z){return W0="useContext",F1(),E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),E0();var X=j0.current;j0.current=n5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),E0();var Z=j0.current;j0.current=n5;try{return a9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),E0(),MY()},useState:function(z){W0="useState",F1(),E0();var Q=j0.current;j0.current=n5;try{return s9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),E0(),zU(z)},useTransition:function(){return W0="useTransition",F1(),E0(),ZU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),E0(),RY(z,Q)},useId:function(){return W0="useId",F1(),E0(),SY()},unstable_isNewReconciler:y0},fY={readContext:function(z){return qH(),X7(z)},useCallback:function(z,Q){return W0="useCallback",F1(),E0(),kY(z,Q)},useContext:function(z){return W0="useContext",F1(),E0(),X7(z)},useEffect:function(z,Q){return W0="useEffect",F1(),E0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return W0="useImperativeHandle",F1(),E0(),AY(z,Q,X)},useInsertionEffect:function(z,Q){return W0="useInsertionEffect",F1(),E0(),PY(z,Q)},useLayoutEffect:function(z,Q){return W0="useLayoutEffect",F1(),E0(),bY(z,Q)},useMemo:function(z,Q){W0="useMemo",F1(),E0();var X=j0.current;j0.current=n5;try{return CY(z,Q)}finally{j0.current=X}},useReducer:function(z,Q,X){W0="useReducer",F1(),E0();var Z=j0.current;j0.current=n5;try{return n9(z,Q,X)}finally{j0.current=Z}},useRef:function(z){return W0="useRef",F1(),E0(),MY()},useState:function(z){W0="useState",F1(),E0();var Q=j0.current;j0.current=n5;try{return e9(z)}finally{j0.current=Q}},useDebugValue:function(z,Q){return W0="useDebugValue",F1(),E0(),TY()},useDeferredValue:function(z){return W0="useDeferredValue",F1(),E0(),QU(z)},useTransition:function(){return W0="useTransition",F1(),E0(),JU()},useMutableSource:function(z,Q,X){return W0="useMutableSource",F1(),E0(),LY()},useSyncExternalStore:function(z,Q,X){return W0="useSyncExternalStore",F1(),E0(),RY(z,Q)},useId:function(){return W0="useId",F1(),E0(),SY()},unstable_isNewReconciler:y0}}var P8=_4.unstable_now,OU=0,hY=-1,$Z=-1,yY=-1,BH=!1,VY=!1;function _U(){return BH}function Sw(){VY=!0}function vw(){BH=!1,VY=!1}function fw(){BH=VY,VY=!1}function LU(){return OU}function RU(){OU=P8()}function UH(z){if($Z=P8(),z.actualStartTime<0)z.actualStartTime=P8()}function NU(z){$Z=-1}function DY(z,Q){if($Z>=0){var X=P8()-$Z;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;$Z=-1}}function L6(z){if(hY>=0){var Q=P8()-hY;hY=-1;var X=z.return;while(X!==null){switch(X.tag){case b:var Z=X.stateNode;Z.effectDuration+=Q;return;case V:var J=X.stateNode;J.effectDuration+=Q;return}X=X.return}}}function WH(z){if(yY>=0){var Q=P8()-yY;yY=-1;var X=z.return;while(X!==null){switch(X.tag){case b:var Z=X.stateNode;if(Z!==null)Z.passiveEffectDuration+=Q;return;case V:var J=X.stateNode;if(J!==null)J.passiveEffectDuration+=Q;return}X=X.return}}}function R6(){hY=P8()}function KH(){yY=P8()}function OH(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function r5(z,Q){if(z&&z.defaultProps){var X=y1({},Q),Z=z.defaultProps;for(var J in Z)if(X[J]===void 0)X[J]=Z[J];return X}return Q}var _H={},LH,RH,NH,MH,wH,MU,mY,FH,PH,bH,HZ;{LH=new Set,RH=new Set,NH=new Set,MH=new Set,FH=new Set,wH=new Set,PH=new Set,bH=new Set,HZ=new Set;var wU=new Set;mY=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!wU.has(X))wU.add(X),q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},MU=function(z,Q){if(Q===void 0){var X=n1(z)||"Component";if(!wH.has(X))wH.add(X),q("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty(_H,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(_H)}function AH(z,Q,X,Z){var J=z.memoizedState,$=X(Z,J);{if(z.mode&i4){w7(!0);try{$=X(Z,J)}finally{w7(!1)}}MU(Q,$)}var H=$===null||$===void 0?J:y1({},J,$);if(z.memoizedState=H,z.lanes===M0){var B=z.updateQueue;B.baseState=H}}var IH={isMounted:b_,enqueueSetState:function(z,Q,X){var Z=uz(z),J=e7(),$=T8(Z),H=j6(J,$);if(H.payload=Q,X!==void 0&&X!==null)mY(X,"setState"),H.callback=X;var B=N8(Z,H,$);if(B!==null)K7(B,Z,$,J),qY(B,Z,$);Q$(Z,$)},enqueueReplaceState:function(z,Q,X){var Z=uz(z),J=e7(),$=T8(Z),H=j6(J,$);if(H.tag=EB,H.payload=Q,X!==void 0&&X!==null)mY(X,"replaceState"),H.callback=X;var B=N8(Z,H,$);if(B!==null)K7(B,Z,$,J),qY(B,Z,$);Q$(Z,$)},enqueueForceUpdate:function(z,Q){var X=uz(z),Z=e7(),J=T8(X),$=j6(Z,J);if($.tag=$Y,Q!==void 0&&Q!==null)mY(Q,"forceUpdate"),$.callback=Q;var H=N8(X,$,J);if(H!==null)K7(H,X,J,Z),qY(H,X,J);zL(X,J)}};function FU(z,Q,X,Z,J,$,H){var B=z.stateNode;if(typeof B.shouldComponentUpdate==="function"){var W=B.shouldComponentUpdate(Z,$,H);{if(z.mode&i4){w7(!0);try{W=B.shouldComponentUpdate(Z,$,H)}finally{w7(!1)}}if(W===void 0)q("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",n1(Q)||"Component")}return W}if(Q.prototype&&Q.prototype.isPureReactComponent)return!SX(X,Z)||!SX(J,$);return!0}function hw(z,Q,X){var Z=z.stateNode;{var J=n1(Q)||"Component",$=Z.render;if(!$)if(Q.prototype&&typeof Q.prototype.render==="function")q("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",J);else q("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",J);if(Z.getInitialState&&!Z.getInitialState.isReactClassApproved&&!Z.state)q("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",J);if(Z.getDefaultProps&&!Z.getDefaultProps.isReactClassApproved)q("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",J);if(Z.propTypes)q("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",J);if(Z.contextType)q("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",J);{if(Q.childContextTypes&&!HZ.has(Q)&&(z.mode&i4)===K1)HZ.add(Q),q(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
85
85
|
|
|
86
86
|
.Learn more about this warning here: https://reactjs.org/link/legacy-context`,J);if(Q.contextTypes&&!HZ.has(Q)&&(z.mode&i4)===K1)HZ.add(Q),q(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
|
|
87
87
|
|
|
@@ -93,13 +93,13 @@ The above lifecycles should be removed. Learn more about this warning here:
|
|
|
93
93
|
https://reactjs.org/link/unsafe-component-lifecycles`,u0,G1,Z0!==null?`
|
|
94
94
|
`+Z0:"",J0!==null?`
|
|
95
95
|
`+J0:"",Y0!==null?`
|
|
96
|
-
`+Y0:"")}}}if(Z)WB(z,J,$);return I}function yw(z,Q){var X=Q.state;if(typeof Q.componentWillMount==="function")Q.componentWillMount();if(typeof Q.UNSAFE_componentWillMount==="function")Q.UNSAFE_componentWillMount();if(X!==Q.state)q("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",S1(z)||"Component"),IH.enqueueReplaceState(Q,Q.state,null)}function AU(z,Q,X,Z){var J=Q.state;if(typeof Q.componentWillReceiveProps==="function")Q.componentWillReceiveProps(X,Z);if(typeof Q.UNSAFE_componentWillReceiveProps==="function")Q.UNSAFE_componentWillReceiveProps(X,Z);if(Q.state!==J){{var $=S1(z)||"Component";if(!LH.has($))LH.add($),q("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",$)}IH.enqueueReplaceState(Q,Q.state,null)}}function TH(z,Q,X,Z){hw(z,Q,X);var J=z.stateNode;J.props=X,J.state=z.memoizedState,J.refs={},V9(z);var $=Q.contextType;if(typeof $==="object"&&$!==null)J.context=X7($);else{var H=QQ(z,Q,!0);J.context=XQ(z,H)}{if(J.state===X){var B=n1(Q)||"Component";if(!FH.has(B))FH.add(B),q("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",B)}if(z.mode&i4)
|
|
96
|
+
`+Y0:"")}}}if(Z)WB(z,J,$);return I}function yw(z,Q){var X=Q.state;if(typeof Q.componentWillMount==="function")Q.componentWillMount();if(typeof Q.UNSAFE_componentWillMount==="function")Q.UNSAFE_componentWillMount();if(X!==Q.state)q("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",S1(z)||"Component"),IH.enqueueReplaceState(Q,Q.state,null)}function AU(z,Q,X,Z){var J=Q.state;if(typeof Q.componentWillReceiveProps==="function")Q.componentWillReceiveProps(X,Z);if(typeof Q.UNSAFE_componentWillReceiveProps==="function")Q.UNSAFE_componentWillReceiveProps(X,Z);if(Q.state!==J){{var $=S1(z)||"Component";if(!LH.has($))LH.add($),q("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",$)}IH.enqueueReplaceState(Q,Q.state,null)}}function TH(z,Q,X,Z){hw(z,Q,X);var J=z.stateNode;J.props=X,J.state=z.memoizedState,J.refs={},V9(z);var $=Q.contextType;if(typeof $==="object"&&$!==null)J.context=X7($);else{var H=QQ(z,Q,!0);J.context=XQ(z,H)}{if(J.state===X){var B=n1(Q)||"Component";if(!FH.has(B))FH.add(B),q("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",B)}if(z.mode&i4)o5.recordLegacyContextWarning(z,J);o5.recordUnsafeLifecycleWarnings(z,J)}J.state=z.memoizedState;var W=Q.getDerivedStateFromProps;if(typeof W==="function")AH(z,Q,W,X),J.state=z.memoizedState;if(typeof Q.getDerivedStateFromProps!=="function"&&typeof J.getSnapshotBeforeUpdate!=="function"&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function"))yw(z,J),BY(z,X,J,Z),J.state=z.memoizedState;if(typeof J.componentDidMount==="function"){var F=a1;if(F|=c8,(z.mode&q6)!==K1)F|=f6;z.flags|=F}}function Vw(z,Q,X,Z){var{stateNode:J,memoizedProps:$}=z;J.props=$;var H=J.context,B=Q.contextType,W=F5;if(typeof B==="object"&&B!==null)W=X7(B);else{var F=QQ(z,Q,!0);W=XQ(z,F)}var I=Q.getDerivedStateFromProps,d=typeof I==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!d&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if($!==X||H!==W)AU(z,J,X,W)}gB();var c=z.memoizedState,Z0=J.state=c;if(BY(z,X,J,Z),Z0=z.memoizedState,$===X&&c===Z0&&!lJ()&&!UY()){if(typeof J.componentDidMount==="function"){var J0=a1;if(J0|=c8,(z.mode&q6)!==K1)J0|=f6;z.flags|=J0}return!1}if(typeof I==="function")AH(z,Q,I,X),Z0=z.memoizedState;var Y0=UY()||FU(z,Q,$,X,c,Z0,W);if(Y0){if(!d&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function")){if(typeof J.componentWillMount==="function")J.componentWillMount();if(typeof J.UNSAFE_componentWillMount==="function")J.UNSAFE_componentWillMount()}if(typeof J.componentDidMount==="function"){var u0=a1;if(u0|=c8,(z.mode&q6)!==K1)u0|=f6;z.flags|=u0}}else{if(typeof J.componentDidMount==="function"){var G1=a1;if(G1|=c8,(z.mode&q6)!==K1)G1|=f6;z.flags|=G1}z.memoizedProps=X,z.memoizedState=Z0}return J.props=X,J.state=Z0,J.context=W,Y0}function Dw(z,Q,X,Z,J){var $=Q.stateNode;uB(z,Q);var H=Q.memoizedProps,B=Q.type===Q.elementType?H:r5(Q.type,H);$.props=B;var W=Q.pendingProps,F=$.context,I=X.contextType,d=F5;if(typeof I==="object"&&I!==null)d=X7(I);else{var c=QQ(Q,X,!0);d=XQ(Q,c)}var Z0=X.getDerivedStateFromProps,J0=typeof Z0==="function"||typeof $.getSnapshotBeforeUpdate==="function";if(!J0&&(typeof $.UNSAFE_componentWillReceiveProps==="function"||typeof $.componentWillReceiveProps==="function")){if(H!==W||F!==d)AU(Q,$,Z,d)}gB();var Y0=Q.memoizedState,u0=$.state=Y0;if(BY(Q,Z,$,J),u0=Q.memoizedState,H===W&&Y0===u0&&!lJ()&&!UY()&&!I0){if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=a1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=j8}return!1}if(typeof Z0==="function")AH(Q,X,Z0,Z),u0=Q.memoizedState;var G1=UY()||FU(Q,X,B,Z,Y0,u0,d)||I0;if(G1){if(!J0&&(typeof $.UNSAFE_componentWillUpdate==="function"||typeof $.componentWillUpdate==="function")){if(typeof $.componentWillUpdate==="function")$.componentWillUpdate(Z,u0,d);if(typeof $.UNSAFE_componentWillUpdate==="function")$.UNSAFE_componentWillUpdate(Z,u0,d)}if(typeof $.componentDidUpdate==="function")Q.flags|=a1;if(typeof $.getSnapshotBeforeUpdate==="function")Q.flags|=j8}else{if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=a1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=j8}Q.memoizedProps=Z,Q.memoizedState=u0}return $.props=Z,$.state=u0,$.context=d,G1}function Gz(z,Q){return{value:z,source:Q,stack:nQ(Q),digest:null}}function kH(z,Q,X){return{value:z,source:null,stack:X!=null?X:null,digest:Q!=null?Q:null}}function mw(z,Q){return!0}function CH(z,Q){try{var X=mw(z,Q);if(X===!1)return;var{value:Z,source:J,stack:$}=Q,H=$!==null?$:"";if(Z!=null&&Z._suppressLogging){if(z.tag===_)return;console.error(Z)}var B=J?S1(J):null,W=B?"The above error occurred in the <"+B+"> component:":"The above error occurred in one of your React components:",F;if(z.tag===b)F=`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
97
97
|
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var I=S1(z)||"Anonymous";F="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+I+".")}var d=W+`
|
|
98
98
|
`+H+`
|
|
99
99
|
|
|
100
|
-
`+(""+F);console.error(d)}catch(c){setTimeout(function(){throw c})}}var Ew=typeof WeakMap==="function"?WeakMap:Map;function IU(z,Q,X){var Z=j6(f4,X);Z.tag=h9,Z.payload={element:null};var J=Q.value;return Z.callback=function(){VP(J),CH(z,Q)},Z}function SH(z,Q,X){var Z=j6(f4,X);Z.tag=h9;var J=z.type.getDerivedStateFromError;if(typeof J==="function"){var $=Q.value;Z.payload=function(){return J($)},Z.callback=function(){EW(z),CH(z,Q)}}var H=z.stateNode;if(H!==null&&typeof H.componentDidCatch==="function")Z.callback=function(){if(EW(z),CH(z,Q),typeof J!=="function")hP(this);var{value:W,stack:F}=Q;if(this.componentDidCatch(W,{componentStack:F!==null?F:""}),typeof J!=="function"){if(!R5(z.lanes,w1))q("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",S1(z)||"Unknown")}};return Z}function TU(z,Q,X){var Z=z.pingCache,J;if(Z===null)Z=z.pingCache=new Ew,J=new Set,Z.set(Q,J);else if(J=Z.get(Q),J===void 0)J=new Set,Z.set(Q,J);if(!J.has(X)){J.add(X);var $=DP.bind(null,z,Q,X);if(p5)AZ(z,X);Q.then($,$)}}function uw(z,Q,X,Z){var J=z.updateQueue;if(J===null){var $=new Set;$.add(X),z.updateQueue=$}else J.add(X)}function gw(z,Q){var X=z.tag;if((z.mode&c1)===K1&&(X===K||X===C||X===j)){var Z=z.alternate;if(Z)z.updateQueue=Z.updateQueue,z.memoizedState=Z.memoizedState,z.lanes=Z.lanes;else z.updateQueue=null,z.memoizedState=null}}function kU(z){var Q=z;do{if(Q.tag===k&&ww(Q))return Q;Q=Q.return}while(Q!==null);return null}function CU(z,Q,X,Z,J){if((z.mode&c1)===K1){if(z===Q)z.flags|=r7;else{if(z.flags|=Q4,X.flags|=a3,X.flags&=~(M_|$X),X.tag===_){var $=X.alternate;if($===null)X.tag=p;else{var H=j6(f4,w1);H.tag=$Y,N8(X,H,w1)}}X.lanes=v1(X.lanes,w1)}return z}return z.flags|=r7,z.lanes=J,z}function xw(z,Q,X,Z,J){if(X.flags|=$X,p5)AZ(z,J);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var $=Z;if(gw(X),k7()&&X.mode&c1)MB();var H=kU(Q);if(H!==null){if(H.flags&=~S6,CU(H,Q,X,z,J),H.mode&c1)TU(z,$,J);uw(H,z,$);return}else{if(!qL(J)){TU(z,$,J),qG();return}var B=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");Z=B}}else if(k7()&&X.mode&c1){MB();var W=kU(Q);if(W!==null){if((W.flags&r7)===_1)W.flags|=S6;CU(W,Q,X,z,J),w9(Gz(Z,X));return}}Z=Gz(Z,X),AP(Z);var F=Q;do{switch(F.tag){case b:{var I=Z;F.flags|=r7;var d=OX(J);F.lanes=v1(F.lanes,d);var c=IU(F,I,d);D9(F,c);return}case _:var Z0=Z,J0=F.type,Y0=F.stateNode;if((F.flags&Q4)===_1&&(typeof J0.getDerivedStateFromError==="function"||Y0!==null&&typeof Y0.componentDidCatch==="function"&&!CW(Y0))){F.flags|=r7;var u0=OX(J);F.lanes=v1(F.lanes,u0);var G1=SH(F,Z0,u0);D9(F,G1);return}break}F=F.return}while(F!==null)}function jw(){return null}var GZ=Y.ReactCurrentOwner,r5=!1,vH,qZ,fH,hH,yH,qz,VH,EY,BZ;vH={},qZ={},fH={},hH={},yH={},qz=!1,VH={},EY={},BZ={};function t7(z,Q,X,Z){if(z===null)Q.child=fB(Q,null,X,Z);else Q.child=$Q(Q,z.child,X,Z)}function pw(z,Q,X,Z){Q.child=$Q(Q,z.child,null,Z),Q.child=$Q(Q,null,X,Z)}function SU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)d5($,Z,"prop",n1(X))}var H=X.render,B=Q.ref,W,F;GQ(Q,J),GX(Q);{if(GZ.current=Q,_5(!0),W=OQ(z,Q,H,Z,B,J),F=_Q(),Q.mode&i4){w7(!0);try{W=OQ(z,Q,H,Z,B,J),F=_Q()}finally{w7(!1)}}_5(!1)}if(jz(),z!==null&&!r5)return lB(z,Q,J),p6(z,Q,J);if(k7()&&F)O9(Q);return Q.flags|=gz,t7(z,Q,W,J),Q.child}function vU(z,Q,X,Z,J){if(z===null){var $=X.type;if(sP($)&&X.compare===null&&X.defaultProps===void 0){var H=$;return H=bQ($),Q.tag=j,Q.type=H,EH(Q,$),fU(z,Q,H,Z,J)}{var B=$.propTypes;if(B)d5(B,Z,"prop",n1($));if(X.defaultProps!==void 0){var W=n1($)||"Unknown";if(!BZ[W])q("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",W),BZ[W]=!0}}var F=wG(X.type,null,Z,Q,Q.mode,J);return F.ref=Q.ref,F.return=Q,Q.child=F,F}{var I=X.type,d=I.propTypes;if(d)d5(d,Z,"prop",n1(I))}var c=z.child,Z0=cH(z,J);if(!Z0){var J0=c.memoizedProps,Y0=X.compare;if(Y0=Y0!==null?Y0:SX,Y0(J0,Z)&&z.ref===Q.ref)return p6(z,Q,J)}Q.flags|=gz;var u0=Oz(c,Z);return u0.ref=Q.ref,u0.return=Q,Q.child=u0,u0}function fU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=Q.elementType;if($.$$typeof===e0){var H=$,B=H._payload,W=H._init;try{$=W(B)}catch(d){$=null}var F=$&&$.propTypes;if(F)d5(F,Z,"prop",n1($))}}if(z!==null){var I=z.memoizedProps;if(SX(I,Z)&&z.ref===Q.ref&&Q.type===z.type){if(r5=!1,Q.pendingProps=Z=I,!cH(z,J))return Q.lanes=z.lanes,p6(z,Q,J);else if((z.flags&a3)!==_1)r5=!0}}return DH(z,Q,X,Z,J)}function hU(z,Q,X){var Z=Q.pendingProps,J=Z.children,$=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||i)if((Q.mode&c1)===K1){var H={baseLanes:M0,cachePool:null,transitions:null};Q.memoizedState=H,rY(Q,X)}else if(!R5(X,L5)){var B=null,W;if($!==null){var F=$.baseLanes;W=v1(F,X)}else W=X;Q.lanes=Q.childLanes=LJ(L5);var I={baseLanes:W,cachePool:B,transitions:null};return Q.memoizedState=I,Q.updateQueue=null,rY(Q,W),null}else{var d={baseLanes:M0,cachePool:null,transitions:null};Q.memoizedState=d;var c=$!==null?$.baseLanes:X;rY(Q,c)}else{var Z0;if($!==null)Z0=v1($.baseLanes,X),Q.memoizedState=null;else Z0=X;rY(Q,Z0)}return t7(z,Q,J,X),Q.child}function cw(z,Q,X){var Z=Q.pendingProps;return t7(z,Q,Z,X),Q.child}function dw(z,Q,X){var Z=Q.pendingProps.children;return t7(z,Q,Z,X),Q.child}function lw(z,Q,X){{Q.flags|=a1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var J=Q.pendingProps,$=J.children;return t7(z,Q,$,X),Q.child}function yU(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=$8,Q.flags|=n3}function DH(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)d5($,Z,"prop",n1(X))}var H;{var B=QQ(Q,X,!0);H=XQ(Q,B)}var W,F;GQ(Q,J),GX(Q);{if(GZ.current=Q,_5(!0),W=OQ(z,Q,X,Z,H,J),F=_Q(),Q.mode&i4){w7(!0);try{W=OQ(z,Q,X,Z,H,J),F=_Q()}finally{w7(!1)}}_5(!1)}if(jz(),z!==null&&!r5)return lB(z,Q,J),p6(z,Q,J);if(k7()&&F)O9(Q);return Q.flags|=gz,t7(z,Q,W,J),Q.child}function VU(z,Q,X,Z,J){{switch(Kb(Q)){case!1:{var{stateNode:$,type:H}=Q,B=new H(Q.memoizedProps,$.context),W=B.state;$.updater.enqueueSetState($,W,null);break}case!0:{Q.flags|=Q4,Q.flags|=r7;var F=Error("Simulated error coming from DevTools"),I=OX(J);Q.lanes=v1(Q.lanes,I);var d=SH(Q,Gz(F,Q),I);D9(Q,d);break}}if(Q.type!==Q.elementType){var c=X.propTypes;if(c)d5(c,Z,"prop",n1(X))}}var Z0;if(W6(X))Z0=!0,oJ(Q);else Z0=!1;GQ(Q,J);var J0=Q.stateNode,Y0;if(J0===null)gY(z,Q),bU(Q,X,Z),TH(Q,X,Z,J),Y0=!0;else if(z===null)Y0=Vw(Q,X,Z,J);else Y0=Dw(z,Q,X,Z,J);var u0=mH(z,Q,X,Y0,Z0,J);{var G1=Q.stateNode;if(Y0&&G1.props!==Z){if(!qz)q("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",S1(Q)||"a component");qz=!0}}return u0}function mH(z,Q,X,Z,J,$){yU(z,Q);var H=(Q.flags&Q4)!==_1;if(!Z&&!H){if(J)_B(Q,X,!1);return p6(z,Q,$)}var B=Q.stateNode;GZ.current=Q;var W;if(H&&typeof X.getDerivedStateFromError!=="function")W=null,NU();else{GX(Q);{if(_5(!0),W=B.render(),Q.mode&i4){w7(!0);try{B.render()}finally{w7(!1)}}_5(!1)}jz()}if(Q.flags|=gz,z!==null&&H)pw(z,Q,W,$);else t7(z,Q,W,$);if(Q.memoizedState=B.state,J)_B(Q,X,!0);return Q.child}function DU(z){var Q=z.stateNode;if(Q.pendingContext)KB(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)KB(z,Q.context,!1);m9(z,Q.containerInfo)}function iw(z,Q,X){if(DU(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:J}=Q,$=J.element;uB(z,Q),BY(Q,Z,null,X);var{memoizedState:H,stateNode:B}=Q,W=H.element;if(J.isDehydrated){var F={element:W,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},I=Q.updateQueue;if(I.baseState=F,Q.memoizedState=F,Q.flags&S6){var d=Gz(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),Q);return mU(z,Q,W,X,d)}else if(W!==$){var c=Gz(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return mU(z,Q,W,X,c)}else{rM(Q);var Z0=fB(Q,null,W,X);Q.child=Z0;var J0=Z0;while(J0)J0.flags=J0.flags&~Q7|v6,J0=J0.sibling}}else{if(YQ(),W===$)return p6(z,Q,X);t7(z,Q,W,X)}return Q.child}function mU(z,Q,X,Z,J){return YQ(),w9(J),Q.flags|=S6,t7(z,Q,X,Z),Q.child}function ow(z,Q,X){if(pB(Q),z===null)M9(Q);var{type:Z,pendingProps:J}=Q,$=z!==null?z.memoizedProps:null,H=J.children,B=Q9(Z,J);if(B)H=null;else if($!==null&&Q9(Z,$))Q.flags|=YX;return yU(z,Q),t7(z,Q,H,X),Q.child}function aw(z,Q){if(z===null)M9(Q);return null}function nw(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$=X,H=$._payload,B=$._init,W=B(H);Q.type=W;var F=Q.tag=eP(W),I=n5(W,J),d;switch(F){case K:return EH(Q,W),Q.type=W=bQ(W),d=DH(null,Q,W,I,Z),d;case _:return Q.type=W=OG(W),d=VU(null,Q,W,I,Z),d;case C:return Q.type=W=_G(W),d=SU(null,Q,W,I,Z),d;case x:{if(Q.type!==Q.elementType){var c=W.propTypes;if(c)d5(c,I,"prop",n1(W))}return d=vU(null,Q,W,n5(W.type,I),Z),d}}var Z0="";if(W!==null&&typeof W==="object"&&W.$$typeof===e0)Z0=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+W+". "+("Lazy element type must resolve to a class or function."+Z0))}function rw(z,Q,X,Z,J){gY(z,Q),Q.tag=_;var $;if(W6(X))$=!0,oJ(Q);else $=!1;return GQ(Q,J),bU(Q,X,Z),TH(Q,X,Z,J),mH(null,Q,X,!0,$,J)}function tw(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$;{var H=QQ(Q,X,!1);$=XQ(Q,H)}GQ(Q,Z);var B,W;GX(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var F=n1(X)||"Unknown";if(!vH[F])q("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",F,F),vH[F]=!0}if(Q.mode&i4)i5.recordLegacyContextWarning(Q,null);_5(!0),GZ.current=Q,B=OQ(null,Q,X,J,$,Z),W=_Q(),_5(!1)}if(jz(),Q.flags|=gz,typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){var I=n1(X)||"Unknown";if(!qZ[I])q("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",I,I,I),qZ[I]=!0}if(typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){{var d=n1(X)||"Unknown";if(!qZ[d])q("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",d,d,d),qZ[d]=!0}Q.tag=_,Q.memoizedState=null,Q.updateQueue=null;var c=!1;if(W6(X))c=!0,oJ(Q);else c=!1;return Q.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,V9(Q),PU(Q,B),TH(Q,X,J,Z),mH(null,Q,X,!0,c,Z)}else{if(Q.tag=K,Q.mode&i4){w7(!0);try{B=OQ(null,Q,X,J,$,Z),W=_Q()}finally{w7(!1)}}if(k7()&&W)O9(Q);return t7(null,Q,B,Z),EH(Q,X),Q.child}}function EH(z,Q){{if(Q){if(Q.childContextTypes)q("%s(...): childContextTypes cannot be defined on a function component.",Q.displayName||Q.name||"Component")}if(z.ref!==null){var X="",Z=Z8();if(Z)X+=`
|
|
100
|
+
`+(""+F);console.error(d)}catch(c){setTimeout(function(){throw c})}}var Ew=typeof WeakMap==="function"?WeakMap:Map;function IU(z,Q,X){var Z=j6(f4,X);Z.tag=h9,Z.payload={element:null};var J=Q.value;return Z.callback=function(){VP(J),CH(z,Q)},Z}function SH(z,Q,X){var Z=j6(f4,X);Z.tag=h9;var J=z.type.getDerivedStateFromError;if(typeof J==="function"){var $=Q.value;Z.payload=function(){return J($)},Z.callback=function(){EW(z),CH(z,Q)}}var H=z.stateNode;if(H!==null&&typeof H.componentDidCatch==="function")Z.callback=function(){if(EW(z),CH(z,Q),typeof J!=="function")hP(this);var{value:W,stack:F}=Q;if(this.componentDidCatch(W,{componentStack:F!==null?F:""}),typeof J!=="function"){if(!R5(z.lanes,w1))q("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",S1(z)||"Unknown")}};return Z}function TU(z,Q,X){var Z=z.pingCache,J;if(Z===null)Z=z.pingCache=new Ew,J=new Set,Z.set(Q,J);else if(J=Z.get(Q),J===void 0)J=new Set,Z.set(Q,J);if(!J.has(X)){J.add(X);var $=DP.bind(null,z,Q,X);if(c5)AZ(z,X);Q.then($,$)}}function uw(z,Q,X,Z){var J=z.updateQueue;if(J===null){var $=new Set;$.add(X),z.updateQueue=$}else J.add(X)}function gw(z,Q){var X=z.tag;if((z.mode&c1)===K1&&(X===K||X===C||X===j)){var Z=z.alternate;if(Z)z.updateQueue=Z.updateQueue,z.memoizedState=Z.memoizedState,z.lanes=Z.lanes;else z.updateQueue=null,z.memoizedState=null}}function kU(z){var Q=z;do{if(Q.tag===k&&ww(Q))return Q;Q=Q.return}while(Q!==null);return null}function CU(z,Q,X,Z,J){if((z.mode&c1)===K1){if(z===Q)z.flags|=r7;else{if(z.flags|=Q4,X.flags|=a3,X.flags&=~(M_|$X),X.tag===_){var $=X.alternate;if($===null)X.tag=p;else{var H=j6(f4,w1);H.tag=$Y,N8(X,H,w1)}}X.lanes=v1(X.lanes,w1)}return z}return z.flags|=r7,z.lanes=J,z}function xw(z,Q,X,Z,J){if(X.flags|=$X,c5)AZ(z,J);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var $=Z;if(gw(X),k7()&&X.mode&c1)MB();var H=kU(Q);if(H!==null){if(H.flags&=~S6,CU(H,Q,X,z,J),H.mode&c1)TU(z,$,J);uw(H,z,$);return}else{if(!qL(J)){TU(z,$,J),qG();return}var B=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");Z=B}}else if(k7()&&X.mode&c1){MB();var W=kU(Q);if(W!==null){if((W.flags&r7)===_1)W.flags|=S6;CU(W,Q,X,z,J),w9(Gz(Z,X));return}}Z=Gz(Z,X),AP(Z);var F=Q;do{switch(F.tag){case b:{var I=Z;F.flags|=r7;var d=OX(J);F.lanes=v1(F.lanes,d);var c=IU(F,I,d);D9(F,c);return}case _:var Z0=Z,J0=F.type,Y0=F.stateNode;if((F.flags&Q4)===_1&&(typeof J0.getDerivedStateFromError==="function"||Y0!==null&&typeof Y0.componentDidCatch==="function"&&!CW(Y0))){F.flags|=r7;var u0=OX(J);F.lanes=v1(F.lanes,u0);var G1=SH(F,Z0,u0);D9(F,G1);return}break}F=F.return}while(F!==null)}function jw(){return null}var GZ=Y.ReactCurrentOwner,t5=!1,vH,qZ,fH,hH,yH,qz,VH,EY,BZ;vH={},qZ={},fH={},hH={},yH={},qz=!1,VH={},EY={},BZ={};function t7(z,Q,X,Z){if(z===null)Q.child=fB(Q,null,X,Z);else Q.child=$Q(Q,z.child,X,Z)}function pw(z,Q,X,Z){Q.child=$Q(Q,z.child,null,Z),Q.child=$Q(Q,null,X,Z)}function SU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)l5($,Z,"prop",n1(X))}var H=X.render,B=Q.ref,W,F;GQ(Q,J),GX(Q);{if(GZ.current=Q,_5(!0),W=OQ(z,Q,H,Z,B,J),F=_Q(),Q.mode&i4){w7(!0);try{W=OQ(z,Q,H,Z,B,J),F=_Q()}finally{w7(!1)}}_5(!1)}if(jz(),z!==null&&!t5)return lB(z,Q,J),p6(z,Q,J);if(k7()&&F)O9(Q);return Q.flags|=gz,t7(z,Q,W,J),Q.child}function vU(z,Q,X,Z,J){if(z===null){var $=X.type;if(sP($)&&X.compare===null&&X.defaultProps===void 0){var H=$;return H=bQ($),Q.tag=j,Q.type=H,EH(Q,$),fU(z,Q,H,Z,J)}{var B=$.propTypes;if(B)l5(B,Z,"prop",n1($));if(X.defaultProps!==void 0){var W=n1($)||"Unknown";if(!BZ[W])q("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",W),BZ[W]=!0}}var F=wG(X.type,null,Z,Q,Q.mode,J);return F.ref=Q.ref,F.return=Q,Q.child=F,F}{var I=X.type,d=I.propTypes;if(d)l5(d,Z,"prop",n1(I))}var c=z.child,Z0=cH(z,J);if(!Z0){var J0=c.memoizedProps,Y0=X.compare;if(Y0=Y0!==null?Y0:SX,Y0(J0,Z)&&z.ref===Q.ref)return p6(z,Q,J)}Q.flags|=gz;var u0=Oz(c,Z);return u0.ref=Q.ref,u0.return=Q,Q.child=u0,u0}function fU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=Q.elementType;if($.$$typeof===e0){var H=$,B=H._payload,W=H._init;try{$=W(B)}catch(d){$=null}var F=$&&$.propTypes;if(F)l5(F,Z,"prop",n1($))}}if(z!==null){var I=z.memoizedProps;if(SX(I,Z)&&z.ref===Q.ref&&Q.type===z.type){if(t5=!1,Q.pendingProps=Z=I,!cH(z,J))return Q.lanes=z.lanes,p6(z,Q,J);else if((z.flags&a3)!==_1)t5=!0}}return DH(z,Q,X,Z,J)}function hU(z,Q,X){var Z=Q.pendingProps,J=Z.children,$=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||i)if((Q.mode&c1)===K1){var H={baseLanes:M0,cachePool:null,transitions:null};Q.memoizedState=H,rY(Q,X)}else if(!R5(X,L5)){var B=null,W;if($!==null){var F=$.baseLanes;W=v1(F,X)}else W=X;Q.lanes=Q.childLanes=LJ(L5);var I={baseLanes:W,cachePool:B,transitions:null};return Q.memoizedState=I,Q.updateQueue=null,rY(Q,W),null}else{var d={baseLanes:M0,cachePool:null,transitions:null};Q.memoizedState=d;var c=$!==null?$.baseLanes:X;rY(Q,c)}else{var Z0;if($!==null)Z0=v1($.baseLanes,X),Q.memoizedState=null;else Z0=X;rY(Q,Z0)}return t7(z,Q,J,X),Q.child}function cw(z,Q,X){var Z=Q.pendingProps;return t7(z,Q,Z,X),Q.child}function dw(z,Q,X){var Z=Q.pendingProps.children;return t7(z,Q,Z,X),Q.child}function lw(z,Q,X){{Q.flags|=a1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var J=Q.pendingProps,$=J.children;return t7(z,Q,$,X),Q.child}function yU(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=$8,Q.flags|=n3}function DH(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)l5($,Z,"prop",n1(X))}var H;{var B=QQ(Q,X,!0);H=XQ(Q,B)}var W,F;GQ(Q,J),GX(Q);{if(GZ.current=Q,_5(!0),W=OQ(z,Q,X,Z,H,J),F=_Q(),Q.mode&i4){w7(!0);try{W=OQ(z,Q,X,Z,H,J),F=_Q()}finally{w7(!1)}}_5(!1)}if(jz(),z!==null&&!t5)return lB(z,Q,J),p6(z,Q,J);if(k7()&&F)O9(Q);return Q.flags|=gz,t7(z,Q,W,J),Q.child}function VU(z,Q,X,Z,J){{switch(Kb(Q)){case!1:{var{stateNode:$,type:H}=Q,B=new H(Q.memoizedProps,$.context),W=B.state;$.updater.enqueueSetState($,W,null);break}case!0:{Q.flags|=Q4,Q.flags|=r7;var F=Error("Simulated error coming from DevTools"),I=OX(J);Q.lanes=v1(Q.lanes,I);var d=SH(Q,Gz(F,Q),I);D9(Q,d);break}}if(Q.type!==Q.elementType){var c=X.propTypes;if(c)l5(c,Z,"prop",n1(X))}}var Z0;if(W6(X))Z0=!0,oJ(Q);else Z0=!1;GQ(Q,J);var J0=Q.stateNode,Y0;if(J0===null)gY(z,Q),bU(Q,X,Z),TH(Q,X,Z,J),Y0=!0;else if(z===null)Y0=Vw(Q,X,Z,J);else Y0=Dw(z,Q,X,Z,J);var u0=mH(z,Q,X,Y0,Z0,J);{var G1=Q.stateNode;if(Y0&&G1.props!==Z){if(!qz)q("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",S1(Q)||"a component");qz=!0}}return u0}function mH(z,Q,X,Z,J,$){yU(z,Q);var H=(Q.flags&Q4)!==_1;if(!Z&&!H){if(J)_B(Q,X,!1);return p6(z,Q,$)}var B=Q.stateNode;GZ.current=Q;var W;if(H&&typeof X.getDerivedStateFromError!=="function")W=null,NU();else{GX(Q);{if(_5(!0),W=B.render(),Q.mode&i4){w7(!0);try{B.render()}finally{w7(!1)}}_5(!1)}jz()}if(Q.flags|=gz,z!==null&&H)pw(z,Q,W,$);else t7(z,Q,W,$);if(Q.memoizedState=B.state,J)_B(Q,X,!0);return Q.child}function DU(z){var Q=z.stateNode;if(Q.pendingContext)KB(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)KB(z,Q.context,!1);m9(z,Q.containerInfo)}function iw(z,Q,X){if(DU(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:J}=Q,$=J.element;uB(z,Q),BY(Q,Z,null,X);var{memoizedState:H,stateNode:B}=Q,W=H.element;if(J.isDehydrated){var F={element:W,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},I=Q.updateQueue;if(I.baseState=F,Q.memoizedState=F,Q.flags&S6){var d=Gz(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),Q);return mU(z,Q,W,X,d)}else if(W!==$){var c=Gz(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return mU(z,Q,W,X,c)}else{rM(Q);var Z0=fB(Q,null,W,X);Q.child=Z0;var J0=Z0;while(J0)J0.flags=J0.flags&~Q7|v6,J0=J0.sibling}}else{if(YQ(),W===$)return p6(z,Q,X);t7(z,Q,W,X)}return Q.child}function mU(z,Q,X,Z,J){return YQ(),w9(J),Q.flags|=S6,t7(z,Q,X,Z),Q.child}function ow(z,Q,X){if(pB(Q),z===null)M9(Q);var{type:Z,pendingProps:J}=Q,$=z!==null?z.memoizedProps:null,H=J.children,B=Q9(Z,J);if(B)H=null;else if($!==null&&Q9(Z,$))Q.flags|=YX;return yU(z,Q),t7(z,Q,H,X),Q.child}function aw(z,Q){if(z===null)M9(Q);return null}function nw(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$=X,H=$._payload,B=$._init,W=B(H);Q.type=W;var F=Q.tag=eP(W),I=r5(W,J),d;switch(F){case K:return EH(Q,W),Q.type=W=bQ(W),d=DH(null,Q,W,I,Z),d;case _:return Q.type=W=OG(W),d=VU(null,Q,W,I,Z),d;case C:return Q.type=W=_G(W),d=SU(null,Q,W,I,Z),d;case x:{if(Q.type!==Q.elementType){var c=W.propTypes;if(c)l5(c,I,"prop",n1(W))}return d=vU(null,Q,W,r5(W.type,I),Z),d}}var Z0="";if(W!==null&&typeof W==="object"&&W.$$typeof===e0)Z0=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+W+". "+("Lazy element type must resolve to a class or function."+Z0))}function rw(z,Q,X,Z,J){gY(z,Q),Q.tag=_;var $;if(W6(X))$=!0,oJ(Q);else $=!1;return GQ(Q,J),bU(Q,X,Z),TH(Q,X,Z,J),mH(null,Q,X,!0,$,J)}function tw(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$;{var H=QQ(Q,X,!1);$=XQ(Q,H)}GQ(Q,Z);var B,W;GX(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var F=n1(X)||"Unknown";if(!vH[F])q("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",F,F),vH[F]=!0}if(Q.mode&i4)o5.recordLegacyContextWarning(Q,null);_5(!0),GZ.current=Q,B=OQ(null,Q,X,J,$,Z),W=_Q(),_5(!1)}if(jz(),Q.flags|=gz,typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){var I=n1(X)||"Unknown";if(!qZ[I])q("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",I,I,I),qZ[I]=!0}if(typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){{var d=n1(X)||"Unknown";if(!qZ[d])q("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",d,d,d),qZ[d]=!0}Q.tag=_,Q.memoizedState=null,Q.updateQueue=null;var c=!1;if(W6(X))c=!0,oJ(Q);else c=!1;return Q.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,V9(Q),PU(Q,B),TH(Q,X,J,Z),mH(null,Q,X,!0,c,Z)}else{if(Q.tag=K,Q.mode&i4){w7(!0);try{B=OQ(null,Q,X,J,$,Z),W=_Q()}finally{w7(!1)}}if(k7()&&W)O9(Q);return t7(null,Q,B,Z),EH(Q,X),Q.child}}function EH(z,Q){{if(Q){if(Q.childContextTypes)q("%s(...): childContextTypes cannot be defined on a function component.",Q.displayName||Q.name||"Component")}if(z.ref!==null){var X="",Z=Z8();if(Z)X+=`
|
|
101
101
|
|
|
102
|
-
Check the render method of \``+Z+"`.";var J=Z||"",$=z._debugSource;if($)J=$.fileName+":"+$.lineNumber;if(!yH[J])yH[J]=!0,q("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",X)}if(Q.defaultProps!==void 0){var H=n1(Q)||"Unknown";if(!BZ[H])q("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",H),BZ[H]=!0}if(typeof Q.getDerivedStateFromProps==="function"){var B=n1(Q)||"Unknown";if(!hH[B])q("%s: Function components do not support getDerivedStateFromProps.",B),hH[B]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var W=n1(Q)||"Unknown";if(!fH[W])q("%s: Function components do not support contextType.",W),fH[W]=!0}}}var uH={dehydrated:null,treeContext:null,retryLane:F7};function gH(z){return{baseLanes:z,cachePool:jw(),transitions:null}}function sw(z,Q){var X=null;return{baseLanes:v1(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function ew(z,Q,X,Z){if(Q!==null){var J=Q.memoizedState;if(J===null)return!1}return g9(z,eX)}function zF(z,Q){return _J(z.childLanes,Q)}function EU(z,Q,X){var Z=Q.pendingProps;if(Ob(Q))Q.flags|=Q4;var J=o5.current,$=!1,H=(Q.flags&Q4)!==_1;if(H||ew(J,z))$=!0,Q.flags&=~Q4;else if(z===null||z.memoizedState!==null)J=Mw(J,dB);if(J=BQ(J),w8(Q,J),z===null){M9(Q);var B=Q.memoizedState;if(B!==null){var W=B.dehydrated;if(W!==null)return YF(Q,W)}var{children:F,fallback:I}=Z;if($){var d=QF(Q,F,I,X),c=Q.child;return c.memoizedState=gH(X),Q.memoizedState=uH,d}else return xH(Q,F)}else{var Z0=z.memoizedState;if(Z0!==null){var J0=Z0.dehydrated;if(J0!==null)return $F(z,Q,H,Z,J0,Z0,X)}if($){var{fallback:Y0,children:u0}=Z,G1=ZF(z,Q,u0,Y0,X),z1=Q.child,u1=z.child.memoizedState;return z1.memoizedState=u1===null?gH(X):sw(u1,X),z1.childLanes=zF(z,X),Q.memoizedState=uH,G1}else{var g1=Z.children,r=XF(z,Q,g1,X);return Q.memoizedState=null,r}}}function xH(z,Q,X){var Z=z.mode,J={mode:"visible",children:Q},$=jH(J,Z);return $.return=z,z.child=$,$}function QF(z,Q,X,Z){var{mode:J,child:$}=z,H={mode:"hidden",children:Q},B,W;if((J&c1)===K1&&$!==null){if(B=$,B.childLanes=M0,B.pendingProps=H,z.mode&W4)B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=0,B.treeBaseDuration=0;W=C8(X,J,Z,null)}else B=jH(H,J),W=C8(X,J,Z,null);return B.return=z,W.return=z,B.sibling=W,z.child=B,W}function jH(z,Q,X){return gW(z,Q,M0,null)}function uU(z,Q){return Oz(z,Q)}function XF(z,Q,X,Z){var J=z.child,$=J.sibling,H=uU(J,{mode:"visible",children:X});if((Q.mode&c1)===K1)H.lanes=Z;if(H.return=Q,H.sibling=null,$!==null){var B=Q.deletions;if(B===null)Q.deletions=[$],Q.flags|=x8;else B.push($)}return Q.child=H,H}function ZF(z,Q,X,Z,J){var $=Q.mode,H=z.child,B=H.sibling,W={mode:"hidden",children:X},F;if(($&c1)===K1&&Q.child!==H){var I=Q.child;if(F=I,F.childLanes=M0,F.pendingProps=W,Q.mode&W4)F.actualDuration=0,F.actualStartTime=-1,F.selfBaseDuration=H.selfBaseDuration,F.treeBaseDuration=H.treeBaseDuration;Q.deletions=null}else F=uU(H,W),F.subtreeFlags=H.subtreeFlags&h6;var d;if(B!==null)d=Oz(B,Z);else d=C8(Z,$,J,null),d.flags|=Q7;return d.return=Q,F.return=Q,F.sibling=d,Q.child=F,d}function uY(z,Q,X,Z){if(Z!==null)w9(Z);$Q(Q,z.child,null,X);var J=Q.pendingProps,$=J.children,H=xH(Q,$);return H.flags|=Q7,Q.memoizedState=null,H}function JF(z,Q,X,Z,J){var $=Q.mode,H={mode:"visible",children:X},B=jH(H,$),W=C8(Z,$,J,null);if(W.flags|=Q7,B.return=Q,W.return=Q,B.sibling=W,Q.child=B,(Q.mode&c1)!==K1)$Q(Q,z.child,null,J);return W}function YF(z,Q,X){if((z.mode&c1)===K1)q("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),z.lanes=LJ(w1);else if(Y9(Q))z.lanes=LJ(o8);else z.lanes=LJ(L5);return null}function $F(z,Q,X,Z,J,$,H){if(!X){if(aM(),(Q.mode&c1)===K1)return uY(z,Q,H,null);if(Y9(J)){var B,W,F;{var I=UM(J);B=I.digest,W=I.message,F=I.stack}var d;if(W)d=Error(W);else d=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var c=kH(d,B,F);return uY(z,Q,H,c)}var Z0=R5(H,z.childLanes);if(r5||Z0){var J0=nY();if(J0!==null){var Y0=RL(J0,H);if(Y0!==F7&&Y0!==$.retryLane){$.retryLane=Y0;var u0=f4;G5(z,Y0),K7(J0,z,Y0,u0)}}qG();var G1=kH(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return uY(z,Q,H,G1)}else if($B(J)){Q.flags|=Q4,Q.child=z.child;var z1=mP.bind(null,z);return WM(J,z1),null}else{tM(Q,J,$.treeContext);var u1=Z.children,g1=xH(Q,u1);return g1.flags|=v6,g1}}else if(Q.flags&S6){Q.flags&=~S6;var r=kH(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return uY(z,Q,H,r)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=Q4,null;else{var{children:G0,fallback:t}=Z,P0=JF(z,Q,G0,t,H),p0=Q.child;return p0.memoizedState=gH(H),Q.memoizedState=uH,P0}}function gU(z,Q,X){z.lanes=v1(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=v1(Z.lanes,Q);v9(z.return,Q,X)}function HF(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===k){var J=Z.memoizedState;if(J!==null)gU(Z,X,z)}else if(Z.tag===a)gU(Z,X,z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}}function GF(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&OY(Z)===null)X=Q;Q=Q.sibling}return X}function qF(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!VH[z])if(VH[z]=!0,typeof z==="string")switch(z.toLowerCase()){case"together":case"forwards":case"backwards":{q('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',z,z.toLowerCase());break}case"forward":case"backward":{q('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',z,z.toLowerCase());break}default:q('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z);break}else q('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z)}function BF(z,Q){if(z!==void 0&&!EY[z]){if(z!=="collapsed"&&z!=="hidden")EY[z]=!0,q('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',z);else if(Q!=="forwards"&&Q!=="backwards")EY[z]=!0,q('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function xU(z,Q){{var X=z4(z),Z=!X&&typeof v4(z)==="function";if(X||Z){var J=X?"array":"iterable";return q("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",J,Q,J),!1}}return!0}function UF(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(z4(z)){for(var X=0;X<z.length;X++)if(!xU(z[X],X))return}else{var Z=v4(z);if(typeof Z==="function"){var J=Z.call(z);if(J){var $=J.next(),H=0;for(;!$.done;$=J.next()){if(!xU($.value,H))return;H++}}}else q('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Q)}}function pH(z,Q,X,Z,J){var $=z.memoizedState;if($===null)z.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Z,tail:X,tailMode:J};else $.isBackwards=Q,$.rendering=null,$.renderingStartTime=0,$.last=Z,$.tail=X,$.tailMode=J}function jU(z,Q,X){var Z=Q.pendingProps,J=Z.revealOrder,$=Z.tail,H=Z.children;qF(J),BF($,J),UF(H,J),t7(z,Q,H,X);var B=o5.current,W=g9(B,eX);if(W)B=x9(B,eX),Q.flags|=Q4;else{var F=z!==null&&(z.flags&Q4)!==_1;if(F)HF(Q,Q.child,X);B=BQ(B)}if(w8(Q,B),(Q.mode&c1)===K1)Q.memoizedState=null;else switch(J){case"forwards":{var I=GF(Q.child),d;if(I===null)d=Q.child,Q.child=null;else d=I.sibling,I.sibling=null;pH(Q,!1,d,I,$);break}case"backwards":{var c=null,Z0=Q.child;Q.child=null;while(Z0!==null){var J0=Z0.alternate;if(J0!==null&&OY(J0)===null){Q.child=Z0;break}var Y0=Z0.sibling;Z0.sibling=c,c=Z0,Z0=Y0}pH(Q,!0,c,null,$);break}case"together":{pH(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function WF(z,Q,X){m9(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=$Q(Q,null,Z,X);else t7(z,Q,Z,X);return Q.child}var pU=!1;function KF(z,Q,X){var Z=Q.type,J=Z._context,$=Q.pendingProps,H=Q.memoizedProps,B=$.value;{if(!("value"in $)){if(!pU)pU=!0,q("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var W=Q.type.propTypes;if(W)d5(W,$,"prop","Context.Provider")}if(VB(Q,J,B),H!==null){var F=H.value;if(w5(F,B)){if(H.children===$.children&&!lJ())return p6(z,Q,X)}else Bw(Q,J,X)}var I=$.children;return t7(z,Q,I,X),Q.child}var cU=!1;function OF(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!cU)cU=!0,q("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else Z=Z._context;var J=Q.pendingProps,$=J.children;if(typeof $!=="function")q("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");GQ(Q,X);var H=X7(Z);GX(Q);var B;return GZ.current=Q,_5(!0),B=$(H),_5(!1),jz(),Q.flags|=gz,t7(z,Q,B,X),Q.child}function UZ(){r5=!0}function gY(z,Q){if((Q.mode&c1)===K1){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=Q7}}function p6(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(NU(),bZ(Q.lanes),!R5(X,Q.childLanes))return null;return Gw(z,Q),Q.child}function _F(z,Q,X){{var Z=Q.return;if(Z===null)throw Error("Cannot swap the root fiber.");if(z.alternate=null,Q.alternate=null,X.index=Q.index,X.sibling=Q.sibling,X.return=Q.return,X.ref=Q.ref,Q===Z.child)Z.child=X;else{var J=Z.child;if(J===null)throw Error("Expected parent to have a child.");while(J.sibling!==Q)if(J=J.sibling,J===null)throw Error("Expected to find the previous sibling.");J.sibling=X}var $=Z.deletions;if($===null)Z.deletions=[z],Z.flags|=x8;else $.push(z);return X.flags|=Q7,X}}function cH(z,Q){var X=z.lanes;if(R5(X,Q))return!0;return!1}function LF(z,Q,X){switch(Q.tag){case b:DU(Q);var Z=Q.stateNode;YQ();break;case M:pB(Q);break;case _:{var J=Q.type;if(W6(J))oJ(Q);break}case P:m9(Q,Q.stateNode.containerInfo);break;case g:{var $=Q.memoizedProps.value,H=Q.type._context;VB(Q,H,$);break}case V:{var B=R5(X,Q.childLanes);if(B)Q.flags|=a1;{var W=Q.stateNode;W.effectDuration=0,W.passiveEffectDuration=0}}break;case k:{var F=Q.memoizedState;if(F!==null){if(F.dehydrated!==null)return w8(Q,BQ(o5.current)),Q.flags|=Q4,null;var I=Q.child,d=I.childLanes;if(R5(X,d))return EU(z,Q,X);else{w8(Q,BQ(o5.current));var c=p6(z,Q,X);if(c!==null)return c.sibling;else return null}}else w8(Q,BQ(o5.current));break}case a:{var Z0=(z.flags&Q4)!==_1,J0=R5(X,Q.childLanes);if(Z0){if(J0)return jU(z,Q,X);Q.flags|=Q4}var Y0=Q.memoizedState;if(Y0!==null)Y0.rendering=null,Y0.tail=null,Y0.lastEffect=null;if(w8(Q,o5.current),J0)break;else return null}case z0:case Q0:return Q.lanes=M0,hU(z,Q,X)}return p6(z,Q,X)}function dU(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return _F(z,Q,wG(Q.type,Q.key,Q.pendingProps,Q._debugOwner||null,Q.mode,Q.lanes));if(z!==null){var Z=z.memoizedProps,J=Q.pendingProps;if(Z!==J||lJ()||Q.type!==z.type)r5=!0;else{var $=cH(z,X);if(!$&&(Q.flags&Q4)===_1)return r5=!1,LF(z,Q,X);if((z.flags&a3)!==_1)r5=!0;else r5=!1}}else if(r5=!1,k7()&&pM(Q)){var H=Q.index,B=cM();NB(Q,B,H)}switch(Q.lanes=M0,Q.tag){case A:return tw(z,Q,Q.type,X);case u:{var W=Q.elementType;return nw(z,Q,W,X)}case K:{var{type:F,pendingProps:I}=Q,d=Q.elementType===F?I:n5(F,I);return DH(z,Q,F,d,X)}case _:{var{type:c,pendingProps:Z0}=Q,J0=Q.elementType===c?Z0:n5(c,Z0);return VU(z,Q,c,J0,X)}case b:return iw(z,Q,X);case M:return ow(z,Q,X);case w:return aw(z,Q);case k:return EU(z,Q,X);case P:return WF(z,Q,X);case C:{var{type:Y0,pendingProps:u0}=Q,G1=Q.elementType===Y0?u0:n5(Y0,u0);return SU(z,Q,Y0,G1,X)}case f:return cw(z,Q,X);case v:return dw(z,Q,X);case V:return lw(z,Q,X);case g:return KF(z,Q,X);case m:return OF(z,Q,X);case x:{var{type:z1,pendingProps:u1}=Q,g1=n5(z1,u1);if(Q.type!==Q.elementType){var r=z1.propTypes;if(r)d5(r,g1,"prop",n1(z1))}return g1=n5(z1.type,g1),vU(z,Q,z1,g1,X)}case j:return fU(z,Q,Q.type,Q.pendingProps,X);case p:{var{type:G0,pendingProps:t}=Q,P0=Q.elementType===G0?t:n5(G0,t);return rw(z,Q,G0,P0,X)}case a:return jU(z,Q,X);case D:break;case z0:return hU(z,Q,X)}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function LQ(z){z.flags|=a1}function lU(z){z.flags|=$8,z.flags|=n3}var iU,dH,oU,aU;iU=function(z,Q,X,Z){var J=Q.child;while(J!==null){if(J.tag===M||J.tag===w)gN(z,J.stateNode);else if(J.tag===P);else if(J.child!==null){J.child.return=J,J=J.child;continue}if(J===Q)return;while(J.sibling===null){if(J.return===null||J.return===Q)return;J=J.return}J.sibling.return=J.return,J=J.sibling}},dH=function(z,Q){},oU=function(z,Q,X,Z,J){var $=z.memoizedProps;if($===Z)return;var H=Q.stateNode,B=E9(),W=jN(H,X,$,Z,J,B);if(Q.updateQueue=W,W)LQ(Q)},aU=function(z,Q,X,Z){if(X!==Z)LQ(Q)};function WZ(z,Q){if(k7())return;switch(z.tailMode){case"hidden":{var X=z.tail,Z=null;while(X!==null){if(X.alternate!==null)Z=X;X=X.sibling}if(Z===null)z.tail=null;else Z.sibling=null;break}case"collapsed":{var J=z.tail,$=null;while(J!==null){if(J.alternate!==null)$=J;J=J.sibling}if($===null)if(!Q&&z.tail!==null)z.tail.sibling=null;else z.tail=null;else $.sibling=null;break}}}function S7(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=M0,Z=_1;if(!Q){if((z.mode&W4)!==K1){var{actualDuration:J,selfBaseDuration:$,child:H}=z;while(H!==null)X=v1(X,v1(H.lanes,H.childLanes)),Z|=H.subtreeFlags,Z|=H.flags,J+=H.actualDuration,$+=H.treeBaseDuration,H=H.sibling;z.actualDuration=J,z.treeBaseDuration=$}else{var B=z.child;while(B!==null)X=v1(X,v1(B.lanes,B.childLanes)),Z|=B.subtreeFlags,Z|=B.flags,B.return=z,B=B.sibling}z.subtreeFlags|=Z}else{if((z.mode&W4)!==K1){var{selfBaseDuration:W,child:F}=z;while(F!==null)X=v1(X,v1(F.lanes,F.childLanes)),Z|=F.subtreeFlags&h6,Z|=F.flags&h6,W+=F.treeBaseDuration,F=F.sibling;z.treeBaseDuration=W}else{var I=z.child;while(I!==null)X=v1(X,v1(I.lanes,I.childLanes)),Z|=I.subtreeFlags&h6,Z|=I.flags&h6,I.return=z,I=I.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function RF(z,Q,X){if(Xw()&&(Q.mode&c1)!==K1&&(Q.flags&Q4)===_1)return IB(Q),YQ(),Q.flags|=S6|$X|r7,!1;var Z=sJ(Q);if(X!==null&&X.dehydrated!==null)if(z===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(zw(Q),S7(Q),(Q.mode&W4)!==K1){var J=X!==null;if(J){var $=Q.child;if($!==null)Q.treeBaseDuration-=$.treeBaseDuration}}return!1}else{if(YQ(),(Q.flags&Q4)===_1)Q.memoizedState=null;if(Q.flags|=a1,S7(Q),(Q.mode&W4)!==K1){var H=X!==null;if(H){var B=Q.child;if(B!==null)Q.treeBaseDuration-=B.treeBaseDuration}}return!1}else return TB(),!0}function nU(z,Q,X){var Z=Q.pendingProps;switch(_9(Q),Q.tag){case A:case u:case j:case K:case C:case f:case v:case V:case m:case x:return S7(Q),null;case _:{var J=Q.type;if(W6(J))iJ(Q);return S7(Q),null}case b:{var $=Q.stateNode;if(qQ(Q),U9(Q),p9(),$.pendingContext)$.context=$.pendingContext,$.pendingContext=null;if(z===null||z.child===null){var H=sJ(Q);if(H)LQ(Q);else if(z!==null){var B=z.memoizedState;if(!B.isDehydrated||(Q.flags&S6)!==_1)Q.flags|=j8,TB()}}return dH(z,Q),S7(Q),null}case M:{u9(Q);var W=jB(),F=Q.type;if(z!==null&&Q.stateNode!=null){if(oU(z,Q,F,Z,W),z.ref!==Q.ref)lU(Q)}else{if(!Z){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return S7(Q),null}var I=E9(),d=sJ(Q);if(d){if(sM(Q,W,I))LQ(Q)}else{var c=uN(F,Z,W,I,Q);if(iU(c,Q,!1,!1),Q.stateNode=c,xN(c,F,Z,W))LQ(Q)}if(Q.ref!==null)lU(Q)}return S7(Q),null}case w:{var Z0=Z;if(z&&Q.stateNode!=null){var J0=z.memoizedProps;aU(z,Q,J0,Z0)}else{if(typeof Z0!=="string"){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.")}var Y0=jB(),u0=E9(),G1=sJ(Q);if(G1){if(eM(Q))LQ(Q)}else Q.stateNode=pN(Z0,Y0,u0,Q)}return S7(Q),null}case k:{UQ(Q);var z1=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var u1=RF(z,Q,z1);if(!u1)if(Q.flags&r7)return Q;else return null}if((Q.flags&Q4)!==_1){if(Q.lanes=X,(Q.mode&W4)!==K1)OH(Q);return Q}var g1=z1!==null,r=z!==null&&z.memoizedState!==null;if(g1!==r){if(g1){var G0=Q.child;if(G0.flags|=p8,(Q.mode&c1)!==K1){var t=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!R0);if(t||g9(o5.current,dB))bP();else qG()}}}var P0=Q.updateQueue;if(P0!==null)Q.flags|=a1;if(S7(Q),(Q.mode&W4)!==K1){if(g1){var p0=Q.child;if(p0!==null)Q.treeBaseDuration-=p0.treeBaseDuration}}return null}case P:if(qQ(Q),dH(z,Q),z===null)DM(Q.stateNode.containerInfo);return S7(Q),null;case g:var g0=Q.type._context;return S9(g0,Q),S7(Q),null;case p:{var R1=Q.type;if(W6(R1))iJ(Q);return S7(Q),null}case a:{UQ(Q);var A1=Q.memoizedState;if(A1===null)return S7(Q),null;var O4=(Q.flags&Q4)!==_1,s1=A1.rendering;if(s1===null)if(!O4){var s4=IP()&&(z===null||(z.flags&Q4)===_1);if(!s4){var e1=Q.child;while(e1!==null){var o4=OY(e1);if(o4!==null){O4=!0,Q.flags|=Q4,WZ(A1,!1);var c7=o4.updateQueue;if(c7!==null)Q.updateQueue=c7,Q.flags|=a1;return Q.subtreeFlags=_1,qw(Q,X),w8(Q,x9(o5.current,eX)),Q.child}e1=e1.sibling}}if(A1.tail!==null&&M7()>RW())Q.flags|=Q4,O4=!0,WZ(A1,!1),Q.lanes=o2}else WZ(A1,!1);else{if(!O4){var V7=OY(s1);if(V7!==null){Q.flags|=Q4,O4=!0;var b5=V7.updateQueue;if(b5!==null)Q.updateQueue=b5,Q.flags|=a1;if(WZ(A1,!0),A1.tail===null&&A1.tailMode==="hidden"&&!s1.alternate&&!k7())return S7(Q),null}else if(M7()*2-A1.renderingStartTime>RW()&&X!==L5)Q.flags|=Q4,O4=!0,WZ(A1,!1),Q.lanes=o2}if(A1.isBackwards)s1.sibling=Q.child,Q.child=s1;else{var z5=A1.last;if(z5!==null)z5.sibling=s1;else Q.child=s1;A1.last=s1}}if(A1.tail!==null){var Q5=A1.tail;A1.rendering=Q5,A1.tail=Q5.sibling,A1.renderingStartTime=M7(),Q5.sibling=null;var d7=o5.current;if(O4)d7=x9(d7,eX);else d7=BQ(d7);return w8(Q,d7),Q5}return S7(Q),null}case D:break;case z0:case Q0:{GG(Q);var o6=Q.memoizedState,AQ=o6!==null;if(z!==null){var CZ=z.memoizedState,w6=CZ!==null;if(w6!==AQ&&!i)Q.flags|=p8}if(!AQ||(Q.mode&c1)===K1)S7(Q);else if(R5(M6,L5)){if(S7(Q),Q.subtreeFlags&(Q7|a1))Q.flags|=p8}return null}case U0:return null;case b0:return null}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function NF(z,Q,X){switch(_9(Q),Q.tag){case _:{var Z=Q.type;if(W6(Z))iJ(Q);var J=Q.flags;if(J&r7){if(Q.flags=J&~r7|Q4,(Q.mode&W4)!==K1)OH(Q);return Q}return null}case b:{var $=Q.stateNode;qQ(Q),U9(Q),p9();var H=Q.flags;if((H&r7)!==_1&&(H&Q4)===_1)return Q.flags=H&~r7|Q4,Q;return null}case M:return u9(Q),null;case k:{UQ(Q);var B=Q.memoizedState;if(B!==null&&B.dehydrated!==null){if(Q.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");YQ()}var W=Q.flags;if(W&r7){if(Q.flags=W&~r7|Q4,(Q.mode&W4)!==K1)OH(Q);return Q}return null}case a:return UQ(Q),null;case P:return qQ(Q),null;case g:var F=Q.type._context;return S9(F,Q),null;case z0:case Q0:return GG(Q),null;case U0:return null;default:return null}}function rU(z,Q,X){switch(_9(Q),Q.tag){case _:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)iJ(Q);break}case b:{var J=Q.stateNode;qQ(Q),U9(Q),p9();break}case M:{u9(Q);break}case P:qQ(Q);break;case k:UQ(Q);break;case a:UQ(Q);break;case g:var $=Q.type._context;S9($,Q);break;case z0:case Q0:GG(Q);break}}var tU=null;tU=new Set;var xY=!1,v7=!1,MF=typeof WeakSet==="function"?WeakSet:Set,a0=null,RQ=null,NQ=null;function wF(z){l3(null,function(){throw z}),i3()}var FF=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&W4)try{R6(),Q.componentWillUnmount()}finally{L6(z)}else Q.componentWillUnmount()};function sU(z,Q){try{b8(H7,z)}catch(X){A4(z,Q,X)}}function lH(z,Q,X){try{FF(z,X)}catch(Z){A4(z,Q,Z)}}function PF(z,Q,X){try{X.componentDidMount()}catch(Z){A4(z,Q,Z)}}function eU(z,Q){try{XW(z)}catch(X){A4(z,Q,X)}}function MQ(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(v0&&X1&&z.mode&W4)try{R6(),Z=X(null)}finally{L6(z)}else Z=X(null)}catch(J){A4(z,Q,J)}if(typeof Z==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",S1(z))}else X.current=null}function jY(z,Q,X){try{X()}catch(Z){A4(z,Q,Z)}}var zW=null,QW=!1;function bF(z,Q){zW=mN(z.containerInfo),a0=Q,AF();var X=QW;return QW=!1,zW=null,X}function AF(){while(a0!==null){var z=a0,Q=z.child;if((z.subtreeFlags&t3)!==_1&&Q!==null)Q.return=z,a0=Q;else IF()}}function IF(){while(a0!==null){var z=a0;j4(z);try{TF(z)}catch(X){A4(z,z.return,X)}N7();var Q=z.sibling;if(Q!==null){Q.return=z.return,a0=Q;return}a0=z.return}}function TF(z){var{alternate:Q,flags:X}=z;if((X&j8)!==_1){switch(j4(z),z.tag){case K:case C:case j:break;case _:{if(Q!==null){var{memoizedProps:Z,memoizedState:J}=Q,$=z.stateNode;if(z.type===z.elementType&&!qz){if($.props!==z.memoizedProps)q("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(z)||"instance");if($.state!==z.memoizedState)q("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(z)||"instance")}var H=$.getSnapshotBeforeUpdate(z.elementType===z.type?Z:n5(z.type,Z),J);{var B=tU;if(H===void 0&&!B.has(z.type))B.add(z.type),q("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",S1(z))}$.__reactInternalSnapshotBeforeUpdate=H}break}case b:{{var W=z.stateNode;HM(W.containerInfo)}break}case M:case w:case P:case p:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}N7()}}function t5(z,Q,X){var Z=Q.updateQueue,J=Z!==null?Z.lastEffect:null;if(J!==null){var $=J.next,H=$;do{if((H.tag&z)===z){var B=H.destroy;if(H.destroy=void 0,B!==void 0){if((z&C7)!==q5)p_(Q);else if((z&H7)!==q5)p2(Q);if((z&K6)!==q5)IZ(!0);if(jY(Q,X,B),(z&K6)!==q5)IZ(!1);if((z&C7)!==q5)c_();else if((z&H7)!==q5)c2()}}H=H.next}while(H!==$)}}function b8(z,Q){var X=Q.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,$=J;do{if(($.tag&z)===z){if((z&C7)!==q5)x_(Q);else if((z&H7)!==q5)d_(Q);var H=$.create;if((z&K6)!==q5)IZ(!0);if($.destroy=H(),(z&K6)!==q5)IZ(!1);if((z&C7)!==q5)j_();else if((z&H7)!==q5)l_();{var B=$.destroy;if(B!==void 0&&typeof B!=="function"){var W=void 0;if(($.tag&H7)!==_1)W="useLayoutEffect";else if(($.tag&K6)!==_1)W="useInsertionEffect";else W="useEffect";var F=void 0;if(B===null)F=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof B.then==="function")F=`
|
|
102
|
+
Check the render method of \``+Z+"`.";var J=Z||"",$=z._debugSource;if($)J=$.fileName+":"+$.lineNumber;if(!yH[J])yH[J]=!0,q("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",X)}if(Q.defaultProps!==void 0){var H=n1(Q)||"Unknown";if(!BZ[H])q("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",H),BZ[H]=!0}if(typeof Q.getDerivedStateFromProps==="function"){var B=n1(Q)||"Unknown";if(!hH[B])q("%s: Function components do not support getDerivedStateFromProps.",B),hH[B]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var W=n1(Q)||"Unknown";if(!fH[W])q("%s: Function components do not support contextType.",W),fH[W]=!0}}}var uH={dehydrated:null,treeContext:null,retryLane:F7};function gH(z){return{baseLanes:z,cachePool:jw(),transitions:null}}function sw(z,Q){var X=null;return{baseLanes:v1(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function ew(z,Q,X,Z){if(Q!==null){var J=Q.memoizedState;if(J===null)return!1}return g9(z,eX)}function zF(z,Q){return _J(z.childLanes,Q)}function EU(z,Q,X){var Z=Q.pendingProps;if(Ob(Q))Q.flags|=Q4;var J=a5.current,$=!1,H=(Q.flags&Q4)!==_1;if(H||ew(J,z))$=!0,Q.flags&=~Q4;else if(z===null||z.memoizedState!==null)J=Mw(J,dB);if(J=BQ(J),w8(Q,J),z===null){M9(Q);var B=Q.memoizedState;if(B!==null){var W=B.dehydrated;if(W!==null)return YF(Q,W)}var{children:F,fallback:I}=Z;if($){var d=QF(Q,F,I,X),c=Q.child;return c.memoizedState=gH(X),Q.memoizedState=uH,d}else return xH(Q,F)}else{var Z0=z.memoizedState;if(Z0!==null){var J0=Z0.dehydrated;if(J0!==null)return $F(z,Q,H,Z,J0,Z0,X)}if($){var{fallback:Y0,children:u0}=Z,G1=ZF(z,Q,u0,Y0,X),z1=Q.child,u1=z.child.memoizedState;return z1.memoizedState=u1===null?gH(X):sw(u1,X),z1.childLanes=zF(z,X),Q.memoizedState=uH,G1}else{var g1=Z.children,r=XF(z,Q,g1,X);return Q.memoizedState=null,r}}}function xH(z,Q,X){var Z=z.mode,J={mode:"visible",children:Q},$=jH(J,Z);return $.return=z,z.child=$,$}function QF(z,Q,X,Z){var{mode:J,child:$}=z,H={mode:"hidden",children:Q},B,W;if((J&c1)===K1&&$!==null){if(B=$,B.childLanes=M0,B.pendingProps=H,z.mode&W4)B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=0,B.treeBaseDuration=0;W=C8(X,J,Z,null)}else B=jH(H,J),W=C8(X,J,Z,null);return B.return=z,W.return=z,B.sibling=W,z.child=B,W}function jH(z,Q,X){return gW(z,Q,M0,null)}function uU(z,Q){return Oz(z,Q)}function XF(z,Q,X,Z){var J=z.child,$=J.sibling,H=uU(J,{mode:"visible",children:X});if((Q.mode&c1)===K1)H.lanes=Z;if(H.return=Q,H.sibling=null,$!==null){var B=Q.deletions;if(B===null)Q.deletions=[$],Q.flags|=x8;else B.push($)}return Q.child=H,H}function ZF(z,Q,X,Z,J){var $=Q.mode,H=z.child,B=H.sibling,W={mode:"hidden",children:X},F;if(($&c1)===K1&&Q.child!==H){var I=Q.child;if(F=I,F.childLanes=M0,F.pendingProps=W,Q.mode&W4)F.actualDuration=0,F.actualStartTime=-1,F.selfBaseDuration=H.selfBaseDuration,F.treeBaseDuration=H.treeBaseDuration;Q.deletions=null}else F=uU(H,W),F.subtreeFlags=H.subtreeFlags&h6;var d;if(B!==null)d=Oz(B,Z);else d=C8(Z,$,J,null),d.flags|=Q7;return d.return=Q,F.return=Q,F.sibling=d,Q.child=F,d}function uY(z,Q,X,Z){if(Z!==null)w9(Z);$Q(Q,z.child,null,X);var J=Q.pendingProps,$=J.children,H=xH(Q,$);return H.flags|=Q7,Q.memoizedState=null,H}function JF(z,Q,X,Z,J){var $=Q.mode,H={mode:"visible",children:X},B=jH(H,$),W=C8(Z,$,J,null);if(W.flags|=Q7,B.return=Q,W.return=Q,B.sibling=W,Q.child=B,(Q.mode&c1)!==K1)$Q(Q,z.child,null,J);return W}function YF(z,Q,X){if((z.mode&c1)===K1)q("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),z.lanes=LJ(w1);else if(Y9(Q))z.lanes=LJ(o8);else z.lanes=LJ(L5);return null}function $F(z,Q,X,Z,J,$,H){if(!X){if(aM(),(Q.mode&c1)===K1)return uY(z,Q,H,null);if(Y9(J)){var B,W,F;{var I=UM(J);B=I.digest,W=I.message,F=I.stack}var d;if(W)d=Error(W);else d=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var c=kH(d,B,F);return uY(z,Q,H,c)}var Z0=R5(H,z.childLanes);if(t5||Z0){var J0=nY();if(J0!==null){var Y0=RL(J0,H);if(Y0!==F7&&Y0!==$.retryLane){$.retryLane=Y0;var u0=f4;G5(z,Y0),K7(J0,z,Y0,u0)}}qG();var G1=kH(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return uY(z,Q,H,G1)}else if($B(J)){Q.flags|=Q4,Q.child=z.child;var z1=mP.bind(null,z);return WM(J,z1),null}else{tM(Q,J,$.treeContext);var u1=Z.children,g1=xH(Q,u1);return g1.flags|=v6,g1}}else if(Q.flags&S6){Q.flags&=~S6;var r=kH(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return uY(z,Q,H,r)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=Q4,null;else{var{children:G0,fallback:t}=Z,P0=JF(z,Q,G0,t,H),p0=Q.child;return p0.memoizedState=gH(H),Q.memoizedState=uH,P0}}function gU(z,Q,X){z.lanes=v1(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=v1(Z.lanes,Q);v9(z.return,Q,X)}function HF(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===k){var J=Z.memoizedState;if(J!==null)gU(Z,X,z)}else if(Z.tag===a)gU(Z,X,z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}}function GF(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&OY(Z)===null)X=Q;Q=Q.sibling}return X}function qF(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!VH[z])if(VH[z]=!0,typeof z==="string")switch(z.toLowerCase()){case"together":case"forwards":case"backwards":{q('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',z,z.toLowerCase());break}case"forward":case"backward":{q('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',z,z.toLowerCase());break}default:q('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z);break}else q('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z)}function BF(z,Q){if(z!==void 0&&!EY[z]){if(z!=="collapsed"&&z!=="hidden")EY[z]=!0,q('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',z);else if(Q!=="forwards"&&Q!=="backwards")EY[z]=!0,q('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function xU(z,Q){{var X=z4(z),Z=!X&&typeof v4(z)==="function";if(X||Z){var J=X?"array":"iterable";return q("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",J,Q,J),!1}}return!0}function UF(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(z4(z)){for(var X=0;X<z.length;X++)if(!xU(z[X],X))return}else{var Z=v4(z);if(typeof Z==="function"){var J=Z.call(z);if(J){var $=J.next(),H=0;for(;!$.done;$=J.next()){if(!xU($.value,H))return;H++}}}else q('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Q)}}function pH(z,Q,X,Z,J){var $=z.memoizedState;if($===null)z.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Z,tail:X,tailMode:J};else $.isBackwards=Q,$.rendering=null,$.renderingStartTime=0,$.last=Z,$.tail=X,$.tailMode=J}function jU(z,Q,X){var Z=Q.pendingProps,J=Z.revealOrder,$=Z.tail,H=Z.children;qF(J),BF($,J),UF(H,J),t7(z,Q,H,X);var B=a5.current,W=g9(B,eX);if(W)B=x9(B,eX),Q.flags|=Q4;else{var F=z!==null&&(z.flags&Q4)!==_1;if(F)HF(Q,Q.child,X);B=BQ(B)}if(w8(Q,B),(Q.mode&c1)===K1)Q.memoizedState=null;else switch(J){case"forwards":{var I=GF(Q.child),d;if(I===null)d=Q.child,Q.child=null;else d=I.sibling,I.sibling=null;pH(Q,!1,d,I,$);break}case"backwards":{var c=null,Z0=Q.child;Q.child=null;while(Z0!==null){var J0=Z0.alternate;if(J0!==null&&OY(J0)===null){Q.child=Z0;break}var Y0=Z0.sibling;Z0.sibling=c,c=Z0,Z0=Y0}pH(Q,!0,c,null,$);break}case"together":{pH(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function WF(z,Q,X){m9(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=$Q(Q,null,Z,X);else t7(z,Q,Z,X);return Q.child}var pU=!1;function KF(z,Q,X){var Z=Q.type,J=Z._context,$=Q.pendingProps,H=Q.memoizedProps,B=$.value;{if(!("value"in $)){if(!pU)pU=!0,q("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var W=Q.type.propTypes;if(W)l5(W,$,"prop","Context.Provider")}if(VB(Q,J,B),H!==null){var F=H.value;if(w5(F,B)){if(H.children===$.children&&!lJ())return p6(z,Q,X)}else Bw(Q,J,X)}var I=$.children;return t7(z,Q,I,X),Q.child}var cU=!1;function OF(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!cU)cU=!0,q("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else Z=Z._context;var J=Q.pendingProps,$=J.children;if(typeof $!=="function")q("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");GQ(Q,X);var H=X7(Z);GX(Q);var B;return GZ.current=Q,_5(!0),B=$(H),_5(!1),jz(),Q.flags|=gz,t7(z,Q,B,X),Q.child}function UZ(){t5=!0}function gY(z,Q){if((Q.mode&c1)===K1){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=Q7}}function p6(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(NU(),bZ(Q.lanes),!R5(X,Q.childLanes))return null;return Gw(z,Q),Q.child}function _F(z,Q,X){{var Z=Q.return;if(Z===null)throw Error("Cannot swap the root fiber.");if(z.alternate=null,Q.alternate=null,X.index=Q.index,X.sibling=Q.sibling,X.return=Q.return,X.ref=Q.ref,Q===Z.child)Z.child=X;else{var J=Z.child;if(J===null)throw Error("Expected parent to have a child.");while(J.sibling!==Q)if(J=J.sibling,J===null)throw Error("Expected to find the previous sibling.");J.sibling=X}var $=Z.deletions;if($===null)Z.deletions=[z],Z.flags|=x8;else $.push(z);return X.flags|=Q7,X}}function cH(z,Q){var X=z.lanes;if(R5(X,Q))return!0;return!1}function LF(z,Q,X){switch(Q.tag){case b:DU(Q);var Z=Q.stateNode;YQ();break;case M:pB(Q);break;case _:{var J=Q.type;if(W6(J))oJ(Q);break}case P:m9(Q,Q.stateNode.containerInfo);break;case g:{var $=Q.memoizedProps.value,H=Q.type._context;VB(Q,H,$);break}case V:{var B=R5(X,Q.childLanes);if(B)Q.flags|=a1;{var W=Q.stateNode;W.effectDuration=0,W.passiveEffectDuration=0}}break;case k:{var F=Q.memoizedState;if(F!==null){if(F.dehydrated!==null)return w8(Q,BQ(a5.current)),Q.flags|=Q4,null;var I=Q.child,d=I.childLanes;if(R5(X,d))return EU(z,Q,X);else{w8(Q,BQ(a5.current));var c=p6(z,Q,X);if(c!==null)return c.sibling;else return null}}else w8(Q,BQ(a5.current));break}case a:{var Z0=(z.flags&Q4)!==_1,J0=R5(X,Q.childLanes);if(Z0){if(J0)return jU(z,Q,X);Q.flags|=Q4}var Y0=Q.memoizedState;if(Y0!==null)Y0.rendering=null,Y0.tail=null,Y0.lastEffect=null;if(w8(Q,a5.current),J0)break;else return null}case z0:case Q0:return Q.lanes=M0,hU(z,Q,X)}return p6(z,Q,X)}function dU(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return _F(z,Q,wG(Q.type,Q.key,Q.pendingProps,Q._debugOwner||null,Q.mode,Q.lanes));if(z!==null){var Z=z.memoizedProps,J=Q.pendingProps;if(Z!==J||lJ()||Q.type!==z.type)t5=!0;else{var $=cH(z,X);if(!$&&(Q.flags&Q4)===_1)return t5=!1,LF(z,Q,X);if((z.flags&a3)!==_1)t5=!0;else t5=!1}}else if(t5=!1,k7()&&pM(Q)){var H=Q.index,B=cM();NB(Q,B,H)}switch(Q.lanes=M0,Q.tag){case A:return tw(z,Q,Q.type,X);case u:{var W=Q.elementType;return nw(z,Q,W,X)}case K:{var{type:F,pendingProps:I}=Q,d=Q.elementType===F?I:r5(F,I);return DH(z,Q,F,d,X)}case _:{var{type:c,pendingProps:Z0}=Q,J0=Q.elementType===c?Z0:r5(c,Z0);return VU(z,Q,c,J0,X)}case b:return iw(z,Q,X);case M:return ow(z,Q,X);case w:return aw(z,Q);case k:return EU(z,Q,X);case P:return WF(z,Q,X);case C:{var{type:Y0,pendingProps:u0}=Q,G1=Q.elementType===Y0?u0:r5(Y0,u0);return SU(z,Q,Y0,G1,X)}case f:return cw(z,Q,X);case v:return dw(z,Q,X);case V:return lw(z,Q,X);case g:return KF(z,Q,X);case m:return OF(z,Q,X);case x:{var{type:z1,pendingProps:u1}=Q,g1=r5(z1,u1);if(Q.type!==Q.elementType){var r=z1.propTypes;if(r)l5(r,g1,"prop",n1(z1))}return g1=r5(z1.type,g1),vU(z,Q,z1,g1,X)}case j:return fU(z,Q,Q.type,Q.pendingProps,X);case p:{var{type:G0,pendingProps:t}=Q,P0=Q.elementType===G0?t:r5(G0,t);return rw(z,Q,G0,P0,X)}case a:return jU(z,Q,X);case D:break;case z0:return hU(z,Q,X)}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function LQ(z){z.flags|=a1}function lU(z){z.flags|=$8,z.flags|=n3}var iU,dH,oU,aU;iU=function(z,Q,X,Z){var J=Q.child;while(J!==null){if(J.tag===M||J.tag===w)gN(z,J.stateNode);else if(J.tag===P);else if(J.child!==null){J.child.return=J,J=J.child;continue}if(J===Q)return;while(J.sibling===null){if(J.return===null||J.return===Q)return;J=J.return}J.sibling.return=J.return,J=J.sibling}},dH=function(z,Q){},oU=function(z,Q,X,Z,J){var $=z.memoizedProps;if($===Z)return;var H=Q.stateNode,B=E9(),W=jN(H,X,$,Z,J,B);if(Q.updateQueue=W,W)LQ(Q)},aU=function(z,Q,X,Z){if(X!==Z)LQ(Q)};function WZ(z,Q){if(k7())return;switch(z.tailMode){case"hidden":{var X=z.tail,Z=null;while(X!==null){if(X.alternate!==null)Z=X;X=X.sibling}if(Z===null)z.tail=null;else Z.sibling=null;break}case"collapsed":{var J=z.tail,$=null;while(J!==null){if(J.alternate!==null)$=J;J=J.sibling}if($===null)if(!Q&&z.tail!==null)z.tail.sibling=null;else z.tail=null;else $.sibling=null;break}}}function S7(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=M0,Z=_1;if(!Q){if((z.mode&W4)!==K1){var{actualDuration:J,selfBaseDuration:$,child:H}=z;while(H!==null)X=v1(X,v1(H.lanes,H.childLanes)),Z|=H.subtreeFlags,Z|=H.flags,J+=H.actualDuration,$+=H.treeBaseDuration,H=H.sibling;z.actualDuration=J,z.treeBaseDuration=$}else{var B=z.child;while(B!==null)X=v1(X,v1(B.lanes,B.childLanes)),Z|=B.subtreeFlags,Z|=B.flags,B.return=z,B=B.sibling}z.subtreeFlags|=Z}else{if((z.mode&W4)!==K1){var{selfBaseDuration:W,child:F}=z;while(F!==null)X=v1(X,v1(F.lanes,F.childLanes)),Z|=F.subtreeFlags&h6,Z|=F.flags&h6,W+=F.treeBaseDuration,F=F.sibling;z.treeBaseDuration=W}else{var I=z.child;while(I!==null)X=v1(X,v1(I.lanes,I.childLanes)),Z|=I.subtreeFlags&h6,Z|=I.flags&h6,I.return=z,I=I.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function RF(z,Q,X){if(Xw()&&(Q.mode&c1)!==K1&&(Q.flags&Q4)===_1)return IB(Q),YQ(),Q.flags|=S6|$X|r7,!1;var Z=sJ(Q);if(X!==null&&X.dehydrated!==null)if(z===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(zw(Q),S7(Q),(Q.mode&W4)!==K1){var J=X!==null;if(J){var $=Q.child;if($!==null)Q.treeBaseDuration-=$.treeBaseDuration}}return!1}else{if(YQ(),(Q.flags&Q4)===_1)Q.memoizedState=null;if(Q.flags|=a1,S7(Q),(Q.mode&W4)!==K1){var H=X!==null;if(H){var B=Q.child;if(B!==null)Q.treeBaseDuration-=B.treeBaseDuration}}return!1}else return TB(),!0}function nU(z,Q,X){var Z=Q.pendingProps;switch(_9(Q),Q.tag){case A:case u:case j:case K:case C:case f:case v:case V:case m:case x:return S7(Q),null;case _:{var J=Q.type;if(W6(J))iJ(Q);return S7(Q),null}case b:{var $=Q.stateNode;if(qQ(Q),U9(Q),p9(),$.pendingContext)$.context=$.pendingContext,$.pendingContext=null;if(z===null||z.child===null){var H=sJ(Q);if(H)LQ(Q);else if(z!==null){var B=z.memoizedState;if(!B.isDehydrated||(Q.flags&S6)!==_1)Q.flags|=j8,TB()}}return dH(z,Q),S7(Q),null}case M:{u9(Q);var W=jB(),F=Q.type;if(z!==null&&Q.stateNode!=null){if(oU(z,Q,F,Z,W),z.ref!==Q.ref)lU(Q)}else{if(!Z){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return S7(Q),null}var I=E9(),d=sJ(Q);if(d){if(sM(Q,W,I))LQ(Q)}else{var c=uN(F,Z,W,I,Q);if(iU(c,Q,!1,!1),Q.stateNode=c,xN(c,F,Z,W))LQ(Q)}if(Q.ref!==null)lU(Q)}return S7(Q),null}case w:{var Z0=Z;if(z&&Q.stateNode!=null){var J0=z.memoizedProps;aU(z,Q,J0,Z0)}else{if(typeof Z0!=="string"){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.")}var Y0=jB(),u0=E9(),G1=sJ(Q);if(G1){if(eM(Q))LQ(Q)}else Q.stateNode=pN(Z0,Y0,u0,Q)}return S7(Q),null}case k:{UQ(Q);var z1=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var u1=RF(z,Q,z1);if(!u1)if(Q.flags&r7)return Q;else return null}if((Q.flags&Q4)!==_1){if(Q.lanes=X,(Q.mode&W4)!==K1)OH(Q);return Q}var g1=z1!==null,r=z!==null&&z.memoizedState!==null;if(g1!==r){if(g1){var G0=Q.child;if(G0.flags|=p8,(Q.mode&c1)!==K1){var t=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!R0);if(t||g9(a5.current,dB))bP();else qG()}}}var P0=Q.updateQueue;if(P0!==null)Q.flags|=a1;if(S7(Q),(Q.mode&W4)!==K1){if(g1){var p0=Q.child;if(p0!==null)Q.treeBaseDuration-=p0.treeBaseDuration}}return null}case P:if(qQ(Q),dH(z,Q),z===null)DM(Q.stateNode.containerInfo);return S7(Q),null;case g:var g0=Q.type._context;return S9(g0,Q),S7(Q),null;case p:{var R1=Q.type;if(W6(R1))iJ(Q);return S7(Q),null}case a:{UQ(Q);var A1=Q.memoizedState;if(A1===null)return S7(Q),null;var O4=(Q.flags&Q4)!==_1,s1=A1.rendering;if(s1===null)if(!O4){var s4=IP()&&(z===null||(z.flags&Q4)===_1);if(!s4){var e1=Q.child;while(e1!==null){var o4=OY(e1);if(o4!==null){O4=!0,Q.flags|=Q4,WZ(A1,!1);var c7=o4.updateQueue;if(c7!==null)Q.updateQueue=c7,Q.flags|=a1;return Q.subtreeFlags=_1,qw(Q,X),w8(Q,x9(a5.current,eX)),Q.child}e1=e1.sibling}}if(A1.tail!==null&&M7()>RW())Q.flags|=Q4,O4=!0,WZ(A1,!1),Q.lanes=o2}else WZ(A1,!1);else{if(!O4){var V7=OY(s1);if(V7!==null){Q.flags|=Q4,O4=!0;var b5=V7.updateQueue;if(b5!==null)Q.updateQueue=b5,Q.flags|=a1;if(WZ(A1,!0),A1.tail===null&&A1.tailMode==="hidden"&&!s1.alternate&&!k7())return S7(Q),null}else if(M7()*2-A1.renderingStartTime>RW()&&X!==L5)Q.flags|=Q4,O4=!0,WZ(A1,!1),Q.lanes=o2}if(A1.isBackwards)s1.sibling=Q.child,Q.child=s1;else{var z5=A1.last;if(z5!==null)z5.sibling=s1;else Q.child=s1;A1.last=s1}}if(A1.tail!==null){var Q5=A1.tail;A1.rendering=Q5,A1.tail=Q5.sibling,A1.renderingStartTime=M7(),Q5.sibling=null;var d7=a5.current;if(O4)d7=x9(d7,eX);else d7=BQ(d7);return w8(Q,d7),Q5}return S7(Q),null}case D:break;case z0:case Q0:{GG(Q);var o6=Q.memoizedState,AQ=o6!==null;if(z!==null){var CZ=z.memoizedState,w6=CZ!==null;if(w6!==AQ&&!i)Q.flags|=p8}if(!AQ||(Q.mode&c1)===K1)S7(Q);else if(R5(M6,L5)){if(S7(Q),Q.subtreeFlags&(Q7|a1))Q.flags|=p8}return null}case U0:return null;case b0:return null}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function NF(z,Q,X){switch(_9(Q),Q.tag){case _:{var Z=Q.type;if(W6(Z))iJ(Q);var J=Q.flags;if(J&r7){if(Q.flags=J&~r7|Q4,(Q.mode&W4)!==K1)OH(Q);return Q}return null}case b:{var $=Q.stateNode;qQ(Q),U9(Q),p9();var H=Q.flags;if((H&r7)!==_1&&(H&Q4)===_1)return Q.flags=H&~r7|Q4,Q;return null}case M:return u9(Q),null;case k:{UQ(Q);var B=Q.memoizedState;if(B!==null&&B.dehydrated!==null){if(Q.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");YQ()}var W=Q.flags;if(W&r7){if(Q.flags=W&~r7|Q4,(Q.mode&W4)!==K1)OH(Q);return Q}return null}case a:return UQ(Q),null;case P:return qQ(Q),null;case g:var F=Q.type._context;return S9(F,Q),null;case z0:case Q0:return GG(Q),null;case U0:return null;default:return null}}function rU(z,Q,X){switch(_9(Q),Q.tag){case _:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)iJ(Q);break}case b:{var J=Q.stateNode;qQ(Q),U9(Q),p9();break}case M:{u9(Q);break}case P:qQ(Q);break;case k:UQ(Q);break;case a:UQ(Q);break;case g:var $=Q.type._context;S9($,Q);break;case z0:case Q0:GG(Q);break}}var tU=null;tU=new Set;var xY=!1,v7=!1,MF=typeof WeakSet==="function"?WeakSet:Set,a0=null,RQ=null,NQ=null;function wF(z){l3(null,function(){throw z}),i3()}var FF=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&W4)try{R6(),Q.componentWillUnmount()}finally{L6(z)}else Q.componentWillUnmount()};function sU(z,Q){try{b8(H7,z)}catch(X){A4(z,Q,X)}}function lH(z,Q,X){try{FF(z,X)}catch(Z){A4(z,Q,Z)}}function PF(z,Q,X){try{X.componentDidMount()}catch(Z){A4(z,Q,Z)}}function eU(z,Q){try{XW(z)}catch(X){A4(z,Q,X)}}function MQ(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(v0&&X1&&z.mode&W4)try{R6(),Z=X(null)}finally{L6(z)}else Z=X(null)}catch(J){A4(z,Q,J)}if(typeof Z==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",S1(z))}else X.current=null}function jY(z,Q,X){try{X()}catch(Z){A4(z,Q,Z)}}var zW=null,QW=!1;function bF(z,Q){zW=mN(z.containerInfo),a0=Q,AF();var X=QW;return QW=!1,zW=null,X}function AF(){while(a0!==null){var z=a0,Q=z.child;if((z.subtreeFlags&t3)!==_1&&Q!==null)Q.return=z,a0=Q;else IF()}}function IF(){while(a0!==null){var z=a0;j4(z);try{TF(z)}catch(X){A4(z,z.return,X)}N7();var Q=z.sibling;if(Q!==null){Q.return=z.return,a0=Q;return}a0=z.return}}function TF(z){var{alternate:Q,flags:X}=z;if((X&j8)!==_1){switch(j4(z),z.tag){case K:case C:case j:break;case _:{if(Q!==null){var{memoizedProps:Z,memoizedState:J}=Q,$=z.stateNode;if(z.type===z.elementType&&!qz){if($.props!==z.memoizedProps)q("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(z)||"instance");if($.state!==z.memoizedState)q("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(z)||"instance")}var H=$.getSnapshotBeforeUpdate(z.elementType===z.type?Z:r5(z.type,Z),J);{var B=tU;if(H===void 0&&!B.has(z.type))B.add(z.type),q("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",S1(z))}$.__reactInternalSnapshotBeforeUpdate=H}break}case b:{{var W=z.stateNode;HM(W.containerInfo)}break}case M:case w:case P:case p:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}N7()}}function s5(z,Q,X){var Z=Q.updateQueue,J=Z!==null?Z.lastEffect:null;if(J!==null){var $=J.next,H=$;do{if((H.tag&z)===z){var B=H.destroy;if(H.destroy=void 0,B!==void 0){if((z&C7)!==q5)p_(Q);else if((z&H7)!==q5)p2(Q);if((z&K6)!==q5)IZ(!0);if(jY(Q,X,B),(z&K6)!==q5)IZ(!1);if((z&C7)!==q5)c_();else if((z&H7)!==q5)c2()}}H=H.next}while(H!==$)}}function b8(z,Q){var X=Q.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,$=J;do{if(($.tag&z)===z){if((z&C7)!==q5)x_(Q);else if((z&H7)!==q5)d_(Q);var H=$.create;if((z&K6)!==q5)IZ(!0);if($.destroy=H(),(z&K6)!==q5)IZ(!1);if((z&C7)!==q5)j_();else if((z&H7)!==q5)l_();{var B=$.destroy;if(B!==void 0&&typeof B!=="function"){var W=void 0;if(($.tag&H7)!==_1)W="useLayoutEffect";else if(($.tag&K6)!==_1)W="useInsertionEffect";else W="useEffect";var F=void 0;if(B===null)F=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof B.then==="function")F=`
|
|
103
103
|
|
|
104
104
|
It looks like you wrote `+W+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
105
105
|
|
|
@@ -112,11 +112,11 @@ It looks like you wrote `+W+`(async () => ...) or returned a Promise. Instead, w
|
|
|
112
112
|
fetchData();
|
|
113
113
|
}, [someId]); // Or [] if effect doesn't need props or state
|
|
114
114
|
|
|
115
|
-
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else F=" You returned: "+B;q("%s must not return anything besides a function, which is used for clean-up.%s",W,F)}}}$=$.next}while($!==J)}}function kF(z,Q){if((Q.flags&a1)!==_1)switch(Q.tag){case V:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,J=Z.id,$=Z.onPostCommit,H=LU(),B=Q.alternate===null?"mount":"update";if(_U())B="nested-update";if(typeof $==="function")$(J,B,X,H);var W=Q.return;z:while(W!==null){switch(W.tag){case b:var F=W.stateNode;F.passiveEffectDuration+=X;break z;case V:var I=W.stateNode;I.passiveEffectDuration+=X;break z}W=W.return}break}}}function CF(z,Q,X,Z){if((X.flags&HX)!==_1)switch(X.tag){case K:case C:case j:{if(!v7)if(X.mode&W4)try{R6(),b8(H7|$7,X)}finally{L6(X)}else b8(H7|$7,X);break}case _:{var J=X.stateNode;if(X.flags&a1){if(!v7)if(Q===null){if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}if(X.mode&W4)try{R6(),J.componentDidMount()}finally{L6(X)}else J.componentDidMount()}else{var $=X.elementType===X.type?Q.memoizedProps:n5(X.type,Q.memoizedProps),H=Q.memoizedState;if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}if(X.mode&W4)try{R6(),J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}finally{L6(X)}else J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}}var B=X.updateQueue;if(B!==null){if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}xB(X,B,J)}break}case b:{var W=X.updateQueue;if(W!==null){var F=null;if(X.child!==null)switch(X.child.tag){case M:F=z9(X.child.stateNode);break;case _:F=X.child.stateNode;break}xB(X,W,F)}break}case M:{var I=X.stateNode;if(Q===null&&X.flags&a1){var{type:d,memoizedProps:c}=X;oN(I,d,c)}break}case w:break;case P:break;case V:{{var Z0=X.memoizedProps,J0=Z0.onCommit,Y0=Z0.onRender,u0=X.stateNode.effectDuration,G1=LU(),z1=Q===null?"mount":"update";if(_U())z1="nested-update";if(typeof Y0==="function")Y0(X.memoizedProps.id,z1,X.actualDuration,X.treeBaseDuration,X.actualStartTime,G1);{if(typeof J0==="function")J0(X.memoizedProps.id,z1,u0,G1);vP(X);var u1=X.return;z:while(u1!==null){switch(u1.tag){case b:var g1=u1.stateNode;g1.effectDuration+=u0;break z;case V:var r=u1.stateNode;r.effectDuration+=u0;break z}u1=u1.return}}}break}case k:{mF(z,X);break}case a:case p:case D:case z0:case Q0:case b0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(!v7){if(X.flags&$8)XW(X)}}function SF(z){switch(z.tag){case K:case C:case j:{if(z.mode&W4)try{R6(),sU(z,z.return)}finally{L6(z)}else sU(z,z.return);break}case _:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")PF(z,z.return,Q);eU(z,z.return);break}case M:{eU(z,z.return);break}}}function vF(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===M){if(X===null){X=Z;try{var J=Z.stateNode;if(Q)ZM(J);else YM(Z.stateNode,Z.memoizedProps)}catch(H){A4(z,z.return,H)}}}else if(Z.tag===w){if(X===null)try{var $=Z.stateNode;if(Q)JM($);else $M($,Z.memoizedProps)}catch(H){A4(z,z.return,H)}}else if((Z.tag===z0||Z.tag===Q0)&&Z.memoizedState!==null&&Z!==z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;if(X===Z)X=null;Z=Z.return}if(X===Z)X=null;Z.sibling.return=Z.return,Z=Z.sibling}}}function XW(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case M:Z=z9(X);break;default:Z=X}if(typeof Q==="function"){var J;if(z.mode&W4)try{R6(),J=Q(Z)}finally{L6(z)}else J=Q(Z);if(typeof J==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",S1(z))}else{if(!Q.hasOwnProperty("current"))q("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",S1(z));Q.current=Z}}}function fF(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function ZW(z){var Q=z.alternate;if(Q!==null)z.alternate=null,ZW(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===M){var X=z.stateNode;if(X!==null)uM(X)}z.stateNode=null,z._debugOwner=null,z.return=null,z.dependencies=null,z.memoizedProps=null,z.memoizedState=null,z.pendingProps=null,z.stateNode=null,z.updateQueue=null}}function hF(z){var Q=z.return;while(Q!==null){if(JW(Q))return Q;Q=Q.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function JW(z){return z.tag===M||z.tag===b||z.tag===P}function YW(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||JW(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==M&&Q.tag!==w&&Q.tag!==s){if(Q.flags&Q7)continue z;if(Q.child===null||Q.tag===P)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&Q7))return Q.stateNode}}function yF(z){var Q=hF(z);switch(Q.tag){case M:{var X=Q.stateNode;if(Q.flags&YX)YB(X),Q.flags&=~YX;var Z=YW(z);oH(z,Z,X);break}case b:case P:{var J=Q.stateNode.containerInfo,$=YW(z);iH(z,$,J);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function iH(z,Q,X){var Z=z.tag,J=Z===M||Z===w;if(J){var $=z.stateNode;if(Q)eN(X,$,Q);else tN(X,$)}else if(Z===P);else{var H=z.child;if(H!==null){iH(H,Q,X);var B=H.sibling;while(B!==null)iH(B,Q,X),B=B.sibling}}}function oH(z,Q,X){var Z=z.tag,J=Z===M||Z===w;if(J){var $=z.stateNode;if(Q)sN(X,$,Q);else rN(X,$)}else if(Z===P);else{var H=z.child;if(H!==null){oH(H,Q,X);var B=H.sibling;while(B!==null)oH(B,Q,X),B=B.sibling}}}var f7=null,s5=!1;function VF(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case M:{f7=Z.stateNode,s5=!1;break z}case b:{f7=Z.stateNode.containerInfo,s5=!0;break z}case P:{f7=Z.stateNode.containerInfo,s5=!0;break z}}Z=Z.return}if(f7===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");$W(z,Q,X),f7=null,s5=!1}fF(X)}function A8(z,Q,X){var Z=X.child;while(Z!==null)$W(z,Q,Z),Z=Z.sibling}function $W(z,Q,X){switch(m_(X),X.tag){case M:if(!v7)MQ(X,Q);case w:{{var Z=f7,J=s5;if(f7=null,A8(z,Q,X),f7=Z,s5=J,f7!==null)if(s5)QM(f7,X.stateNode);else zM(f7,X.stateNode)}return}case s:{if(f7!==null)if(s5)XM(f7,X.stateNode);else J9(f7,X.stateNode);return}case P:{{var $=f7,H=s5;f7=X.stateNode.containerInfo,s5=!0,A8(z,Q,X),f7=$,s5=H}return}case K:case C:case x:case j:{if(!v7){var B=X.updateQueue;if(B!==null){var W=B.lastEffect;if(W!==null){var F=W.next,I=F;do{var d=I,c=d.destroy,Z0=d.tag;if(c!==void 0){if((Z0&K6)!==q5)jY(X,Q,c);else if((Z0&H7)!==q5){if(p2(X),X.mode&W4)R6(),jY(X,Q,c),L6(X);else jY(X,Q,c);c2()}}I=I.next}while(I!==F)}}}A8(z,Q,X);return}case _:{if(!v7){MQ(X,Q);var J0=X.stateNode;if(typeof J0.componentWillUnmount==="function")lH(X,Q,J0)}A8(z,Q,X);return}case D:{A8(z,Q,X);return}case z0:{if(X.mode&c1){var Y0=v7;v7=Y0||X.memoizedState!==null,A8(z,Q,X),v7=Y0}else A8(z,Q,X);break}default:{A8(z,Q,X);return}}}function DF(z){var Q=z.memoizedState}function mF(z,Q){var X=Q.memoizedState;if(X===null){var Z=Q.alternate;if(Z!==null){var J=Z.memoizedState;if(J!==null){var $=J.dehydrated;if($!==null)FM($)}}}}function HW(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new MF;Q.forEach(function(Z){var J=EP.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),p5)if(RQ!==null&&NQ!==null)AZ(NQ,RQ);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(J,J)}})}}function EF(z,Q,X){RQ=X,NQ=z,j4(Q),GW(Q,z),j4(Q),RQ=null,NQ=null}function e5(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J];try{VF(z,Q,$)}catch(W){A4($,Q,W)}}var H=aZ();if(Q.subtreeFlags&s3){var B=Q.child;while(B!==null)j4(B),GW(B,z),B=B.sibling}j4(H)}function GW(z,Q,X){var{alternate:Z,flags:J}=z;switch(z.tag){case K:case C:case x:case j:{if(e5(Q,z),N6(z),J&a1){try{t5(K6|$7,z,z.return),b8(K6|$7,z)}catch(R1){A4(z,z.return,R1)}if(z.mode&W4){try{R6(),t5(H7|$7,z,z.return)}catch(R1){A4(z,z.return,R1)}L6(z)}else try{t5(H7|$7,z,z.return)}catch(R1){A4(z,z.return,R1)}}return}case _:{if(e5(Q,z),N6(z),J&$8){if(Z!==null)MQ(Z,Z.return)}return}case M:{if(e5(Q,z),N6(z),J&$8){if(Z!==null)MQ(Z,Z.return)}{if(z.flags&YX){var $=z.stateNode;try{YB($)}catch(R1){A4(z,z.return,R1)}}if(J&a1){var H=z.stateNode;if(H!=null){var B=z.memoizedProps,W=Z!==null?Z.memoizedProps:B,F=z.type,I=z.updateQueue;if(z.updateQueue=null,I!==null)try{aN(H,I,F,W,B,z)}catch(R1){A4(z,z.return,R1)}}}}return}case w:{if(e5(Q,z),N6(z),J&a1){if(z.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var{stateNode:d,memoizedProps:c}=z,Z0=Z!==null?Z.memoizedProps:c;try{nN(d,Z0,c)}catch(R1){A4(z,z.return,R1)}}return}case b:{if(e5(Q,z),N6(z),J&a1){if(Z!==null){var J0=Z.memoizedState;if(J0.isDehydrated)try{wM(Q.containerInfo)}catch(R1){A4(z,z.return,R1)}}}return}case P:{e5(Q,z),N6(z);return}case k:{e5(Q,z),N6(z);var Y0=z.child;if(Y0.flags&p8){var{stateNode:u0,memoizedState:G1}=Y0,z1=G1!==null;if(u0.isHidden=z1,z1){var u1=Y0.alternate!==null&&Y0.alternate.memoizedState!==null;if(!u1)PP()}}if(J&a1){try{DF(z)}catch(R1){A4(z,z.return,R1)}HW(z)}return}case z0:{var g1=Z!==null&&Z.memoizedState!==null;if(z.mode&c1){var r=v7;v7=r||g1,e5(Q,z),v7=r}else e5(Q,z);if(N6(z),J&p8){var{stateNode:G0,memoizedState:t}=z,P0=t!==null,p0=z;if(G0.isHidden=P0,P0){if(!g1){if((p0.mode&c1)!==K1){a0=p0;var g0=p0.child;while(g0!==null)a0=g0,gF(g0),g0=g0.sibling}}}vF(p0,P0)}return}case a:{if(e5(Q,z),N6(z),J&a1)HW(z);return}case D:return;default:{e5(Q,z),N6(z);return}}}function N6(z){var Q=z.flags;if(Q&Q7){try{yF(z)}catch(X){A4(z,z.return,X)}z.flags&=~Q7}if(Q&v6)z.flags&=~v6}function uF(z,Q,X){RQ=X,NQ=Q,a0=z,qW(z,Q,X),RQ=null,NQ=null}function qW(z,Q,X){var Z=(z.mode&c1)!==K1;while(a0!==null){var J=a0,$=J.child;if(J.tag===z0&&Z){var H=J.memoizedState!==null,B=H||xY;if(B){aH(z,Q,X);continue}else{var W=J.alternate,F=W!==null&&W.memoizedState!==null,I=F||v7,d=xY,c=v7;if(xY=B,v7=I,v7&&!c)a0=J,xF(J);var Z0=$;while(Z0!==null)a0=Z0,qW(Z0,Q,X),Z0=Z0.sibling;a0=J,xY=d,v7=c,aH(z,Q,X);continue}}if((J.subtreeFlags&HX)!==_1&&$!==null)$.return=J,a0=$;else aH(z,Q,X)}}function aH(z,Q,X){while(a0!==null){var Z=a0;if((Z.flags&HX)!==_1){var J=Z.alternate;j4(Z);try{CF(Q,J,Z,X)}catch(H){A4(Z,Z.return,H)}N7()}if(Z===z){a0=null;return}var $=Z.sibling;if($!==null){$.return=Z.return,a0=$;return}a0=Z.return}}function gF(z){while(a0!==null){var Q=a0,X=Q.child;switch(Q.tag){case K:case C:case x:case j:{if(Q.mode&W4)try{R6(),t5(H7,Q,Q.return)}finally{L6(Q)}else t5(H7,Q,Q.return);break}case _:{MQ(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")lH(Q,Q.return,Z);break}case M:{MQ(Q,Q.return);break}case z0:{var J=Q.memoizedState!==null;if(J){BW(z);continue}break}}if(X!==null)X.return=Q,a0=X;else BW(z)}}function BW(z){while(a0!==null){var Q=a0;if(Q===z){a0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,a0=X;return}a0=Q.return}}function xF(z){while(a0!==null){var Q=a0,X=Q.child;if(Q.tag===z0){var Z=Q.memoizedState!==null;if(Z){UW(z);continue}}if(X!==null)X.return=Q,a0=X;else UW(z)}}function UW(z){while(a0!==null){var Q=a0;j4(Q);try{SF(Q)}catch(Z){A4(Q,Q.return,Z)}if(N7(),Q===z){a0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,a0=X;return}a0=Q.return}}function jF(z,Q,X,Z){a0=Q,pF(Q,z,X,Z)}function pF(z,Q,X,Z){while(a0!==null){var J=a0,$=J.child;if((J.subtreeFlags&xz)!==_1&&$!==null)$.return=J,a0=$;else cF(z,Q,X,Z)}}function cF(z,Q,X,Z){while(a0!==null){var J=a0;if((J.flags&j5)!==_1){j4(J);try{dF(Q,J,X,Z)}catch(H){A4(J,J.return,H)}N7()}if(J===z){a0=null;return}var $=J.sibling;if($!==null){$.return=J.return,a0=$;return}a0=J.return}}function dF(z,Q,X,Z){switch(Q.tag){case K:case C:case j:{if(Q.mode&W4){KH();try{b8(C7|$7,Q)}finally{WH(Q)}}else b8(C7|$7,Q);break}}}function lF(z){a0=z,iF()}function iF(){while(a0!==null){var z=a0,Q=z.child;if((a0.flags&x8)!==_1){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var J=X[Z];a0=J,nF(J,z)}{var $=z.alternate;if($!==null){var H=$.child;if(H!==null){$.child=null;do{var B=H.sibling;H.sibling=null,H=B}while(H!==null)}}}a0=z}}if((z.subtreeFlags&xz)!==_1&&Q!==null)Q.return=z,a0=Q;else oF()}}function oF(){while(a0!==null){var z=a0;if((z.flags&j5)!==_1)j4(z),aF(z),N7();var Q=z.sibling;if(Q!==null){Q.return=z.return,a0=Q;return}a0=z.return}}function aF(z){switch(z.tag){case K:case C:case j:{if(z.mode&W4)KH(),t5(C7|$7,z,z.return),WH(z);else t5(C7|$7,z,z.return);break}}}function nF(z,Q){while(a0!==null){var X=a0;j4(X),tF(X,Q),N7();var Z=X.child;if(Z!==null)Z.return=X,a0=Z;else rF(z)}}function rF(z){while(a0!==null){var Q=a0,X=Q.sibling,Z=Q.return;if(ZW(Q),Q===z){a0=null;return}if(X!==null){X.return=Z,a0=X;return}a0=Z}}function tF(z,Q){switch(z.tag){case K:case C:case j:{if(z.mode&W4)KH(),t5(C7,z,Q),WH(z);else t5(C7,z,Q);break}}}function sF(z){switch(z.tag){case K:case C:case j:{try{b8(H7|$7,z)}catch(X){A4(z,z.return,X)}break}case _:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){A4(z,z.return,X)}break}}}function eF(z){switch(z.tag){case K:case C:case j:{try{b8(C7|$7,z)}catch(Q){A4(z,z.return,Q)}break}}}function zP(z){switch(z.tag){case K:case C:case j:{try{t5(H7|$7,z,z.return)}catch(X){A4(z,z.return,X)}break}case _:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")lH(z,z.return,Q);break}}}function QP(z){switch(z.tag){case K:case C:case j:try{t5(C7|$7,z,z.return)}catch(Q){A4(z,z.return,Q)}}}var XP=0,ZP=1,JP=2,YP=3,$P=4;if(typeof Symbol==="function"&&Symbol.for){var KZ=Symbol.for;XP=KZ("selector.component"),ZP=KZ("selector.has_pseudo_class"),JP=KZ("selector.role"),YP=KZ("selector.test_id"),$P=KZ("selector.text")}var HP=[];function GP(){HP.forEach(function(z){return z()})}var qP=Y.ReactCurrentActQueue;function BP(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function WW(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&qP.current!==null)q("The current testing environment is not configured to support act(...)");return z}}var UP=Math.ceil,nH=Y.ReactCurrentDispatcher,rH=Y.ReactCurrentOwner,h7=Y.ReactCurrentBatchConfig,z6=Y.ReactCurrentActQueue,B7=0,KW=1,y7=2,h5=4,c6=0,OZ=1,Bz=2,pY=3,_Z=4,OW=5,tH=6,d1=B7,s7=null,p4=null,U7=M0,M6=M0,sH=O8(M0),W7=c6,LZ=null,eH=M0,cY=M0,RZ=M0,dY=M0,NZ=null,B5=null,zG=0,_W=500,LW=1/0,WP=500,d6=null;function MZ(){LW=M7()+WP}function RW(){return LW}var lY=!1,QG=null,wQ=null,Uz=!1,I8=null,wZ=M0,XG=[],ZG=null,KP=50,FZ=0,JG=null,YG=!1,iY=!1,OP=50,FQ=0,oY=null,PZ=f4,aY=M0,NW=!1;function nY(){return s7}function e7(){if((d1&(y7|h5))!==B7)return M7();if(PZ!==f4)return PZ;return PZ=M7(),PZ}function T8(z){var Q=z.mode;if((Q&c1)===K1)return w1;else if((d1&y7)!==B7&&U7!==M0)return OX(U7);var X=Yw()!==Jw;if(X){if(h7.transition!==null){var Z=h7.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(aY===F7)aY=t2();return aY}var J=c5();if(J!==F7)return J;var $=cN();return $}function _P(z){var Q=z.mode;if((Q&c1)===K1)return w1;return KL()}function K7(z,Q,X,Z){if(gP(),NW)q("useInsertionEffect must not schedule updates.");if(YG)iY=!0;if(_X(z,X,Z),(d1&y7)!==M0&&z===s7)pP(Q);else{if(p5)zq(z,Q,X);if(cP(Q),z===s7){if((d1&y7)===B7)RZ=v1(RZ,X);if(W7===_Z)k8(z,U7)}if(U5(z,Z),X===w1&&d1===B7&&(Q.mode&c1)===K1&&!z6.isBatchingLegacy)MZ(),RB()}}function LP(z,Q,X){var Z=z.current;Z.lanes=Q,_X(z,Q,X),U5(z,X)}function RP(z){return(d1&y7)!==B7}function U5(z,Q){var X=z.callbackNode;HL(z,Q);var Z=KJ(z,z===s7?U7:M0);if(Z===M0){if(X!==null)VW(X);z.callbackNode=null,z.callbackPriority=F7;return}var J=n8(Z),$=z.callbackPriority;if($===J&&!(z6.current!==null&&X!==WG)){if(X==null&&$!==w1)q("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)VW(X);var H;if(J===w1){if(z.tag===_8){if(z6.isBatchingLegacy!==null)z6.didScheduleLegacyUpdate=!0;jM(FW.bind(null,z))}else LB(FW.bind(null,z));if(z6.current!==null)z6.current.push(L8);else lN(function(){if((d1&(y7|h5))===B7)L8()});H=null}else{var B;switch(Zq(Z)){case N5:B=qJ;break;case V6:B=e3;break;case D6:B=l8;break;case RJ:B=z$;break;default:B=l8;break}H=KG(B,MW.bind(null,z))}z.callbackPriority=J,z.callbackNode=H}function MW(z,Q){if(vw(),PZ=f4,aY=M0,(d1&(y7|h5))!==B7)throw Error("Should not already be working.");var X=z.callbackNode,Z=i6();if(Z){if(z.callbackNode!==X)return null}var J=KJ(z,z===s7?U7:M0);if(J===M0)return null;var $=!OJ(z,J)&&!WL(z,J)&&!Q,H=$?kP(z,J):tY(z,J);if(H!==c6){if(H===Bz){var B=P$(z);if(B!==M0)J=B,H=$G(z,B)}if(H===OZ){var W=LZ;throw Wz(z,M0),k8(z,J),U5(z,M7()),W}if(H===tH)k8(z,J);else{var F=!OJ(z,J),I=z.current.alternate;if(F&&!MP(I)){if(H=tY(z,J),H===Bz){var d=P$(z);if(d!==M0)J=d,H=$G(z,d)}if(H===OZ){var c=LZ;throw Wz(z,M0),k8(z,J),U5(z,M7()),c}}z.finishedWork=I,z.finishedLanes=J,NP(z,H,J)}}if(U5(z,M7()),z.callbackNode===X)return MW.bind(null,z);return null}function $G(z,Q){var X=NZ;if(NJ(z)){var Z=Wz(z,Q);Z.flags|=S6,VM(z.containerInfo)}var J=tY(z,Q);if(J!==Bz){var $=B5;if(B5=X,$!==null)wW($)}return J}function wW(z){if(B5===null)B5=z;else B5.push.apply(B5,z)}function NP(z,Q,X){switch(Q){case c6:case OZ:throw Error("Root did not complete. This is a bug in React.");case Bz:{Kz(z,B5,d6);break}case pY:{if(k8(z,X),n2(X)&&!DW()){var Z=zG+_W-M7();if(Z>10){var J=KJ(z,M0);if(J!==M0)break;var $=z.suspendedLanes;if(!lz($,X)){var H=e7();e2(z,$);break}z.timeoutHandle=X9(Kz.bind(null,z,B5,d6),Z);break}}Kz(z,B5,d6);break}case _Z:{if(k8(z,X),UL(X))break;if(!DW()){var B=YL(z,X),W=B,F=M7()-W,I=uP(F)-F;if(I>10){z.timeoutHandle=X9(Kz.bind(null,z,B5,d6),I);break}}Kz(z,B5,d6);break}case OW:{Kz(z,B5,d6);break}default:throw Error("Unknown root exit status.")}}function MP(z){var Q=z;while(!0){if(Q.flags&HJ){var X=Q.updateQueue;if(X!==null){var Z=X.stores;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.getSnapshot,B=$.value;try{if(!w5(H(),B))return!1}catch(F){return!1}}}}var W=Q.child;if(Q.subtreeFlags&HJ&&W!==null){W.return=Q,Q=W;continue}if(Q===z)return!0;while(Q.sibling===null){if(Q.return===null||Q.return===z)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return!0}function k8(z,Q){Q=_J(Q,dY),Q=_J(Q,RZ),_L(z,Q)}function FW(z){if(fw(),(d1&(y7|h5))!==B7)throw Error("Should not already be working.");i6();var Q=KJ(z,M0);if(!R5(Q,w1))return U5(z,M7()),null;var X=tY(z,Q);if(z.tag!==_8&&X===Bz){var Z=P$(z);if(Z!==M0)Q=Z,X=$G(z,Z)}if(X===OZ){var J=LZ;throw Wz(z,M0),k8(z,Q),U5(z,M7()),J}if(X===tH)throw Error("Root did not complete. This is a bug in React.");var $=z.current.alternate;return z.finishedWork=$,z.finishedLanes=Q,Kz(z,B5,d6),U5(z,M7()),null}function wP(z,Q){if(Q!==M0){if(T$(z,v1(Q,w1)),U5(z,M7()),(d1&(y7|h5))===B7)MZ(),L8()}}function HG(z,Q){var X=d1;d1|=KW;try{return z(Q)}finally{if(d1=X,d1===B7&&!z6.isBatchingLegacy)MZ(),RB()}}function FP(z,Q,X,Z,J){var $=c5(),H=h7.transition;try{return h7.transition=null,P7(N5),z(Q,X,Z,J)}finally{if(P7($),h7.transition=H,d1===B7)MZ()}}function l6(z){if(I8!==null&&I8.tag===_8&&(d1&(y7|h5))===B7)i6();var Q=d1;d1|=KW;var X=h7.transition,Z=c5();try{if(h7.transition=null,P7(N5),z)return z();else return}finally{if(P7(Z),h7.transition=X,d1=Q,(d1&(y7|h5))===B7)L8()}}function PW(){return(d1&(y7|h5))!==B7}function rY(z,Q){j7(sH,M6,z),M6=v1(M6,Q),eH=v1(eH,Q)}function GG(z){M6=sH.current,x7(sH,z)}function Wz(z,Q){z.finishedWork=null,z.finishedLanes=M0;var X=z.timeoutHandle;if(X!==Z9)z.timeoutHandle=Z9,dN(X);if(p4!==null){var Z=p4.return;while(Z!==null){var J=Z.alternate;rU(J,Z),Z=Z.return}}s7=z;var $=Oz(z.current,null);return p4=$,U7=M6=eH=Q,W7=c6,LZ=null,cY=M0,RZ=M0,dY=M0,NZ=null,B5=null,Ww(),i5.discardPendingWarnings(),$}function bW(z,Q){do{var X=p4;try{if(JY(),iB(),N7(),rH.current=null,X===null||X.return===null){W7=OZ,LZ=Q,p4=null;return}if(v0&&X.mode&W4)DY(X,!0);if(T0)if(jz(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;o_(X,Z,U7)}else i_(X,Q,U7);xw(z,X.return,X,Q,U7),kW(X)}catch(J){if(Q=J,p4===X&&X!==null)X=X.return,p4=X;else X=p4;continue}return}while(!0)}function AW(){var z=nH.current;if(nH.current=vY,z===null)return vY;else return z}function IW(z){nH.current=z}function PP(){zG=M7()}function bZ(z){cY=v1(z,cY)}function bP(){if(W7===c6)W7=pY}function qG(){if(W7===c6||W7===pY||W7===Bz)W7=_Z;if(s7!==null&&(b$(cY)||b$(RZ)))k8(s7,U7)}function AP(z){if(W7!==_Z)W7=Bz;if(NZ===null)NZ=[z];else NZ.push(z)}function IP(){return W7===c6}function tY(z,Q){var X=d1;d1|=y7;var Z=AW();if(s7!==z||U7!==Q){if(p5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,U7),J.clear();Qq(z,Q)}d6=Xq(),Wz(z,Q)}d2(Q);do try{TP();break}catch($){bW(z,$)}while(!0);if(JY(),d1=X,IW(Z),p4!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return l2(),s7=null,U7=M0,W7}function TP(){while(p4!==null)TW(p4)}function kP(z,Q){var X=d1;d1|=y7;var Z=AW();if(s7!==z||U7!==Q){if(p5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,U7),J.clear();Qq(z,Q)}d6=Xq(),MZ(),Wz(z,Q)}d2(Q);do try{CP();break}catch($){bW(z,$)}while(!0);if(JY(),IW(Z),d1=X,p4!==null)return s_(),c6;else return l2(),s7=null,U7=M0,W7}function CP(){while(p4!==null&&!T_())TW(p4)}function TW(z){var Q=z.alternate;j4(z);var X;if((z.mode&W4)!==K1)UH(z),X=BG(Q,z,M6),DY(z,!0);else X=BG(Q,z,M6);if(N7(),z.memoizedProps=z.pendingProps,X===null)kW(z);else p4=X;rH.current=null}function kW(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&$X)===_1){j4(Q);var J=void 0;if((Q.mode&W4)===K1)J=nU(X,Q,M6);else UH(Q),J=nU(X,Q,M6),DY(Q,!1);if(N7(),J!==null){p4=J;return}}else{var $=NF(X,Q);if($!==null){$.flags&=w_,p4=$;return}if((Q.mode&W4)!==K1){DY(Q,!1);var{actualDuration:H,child:B}=Q;while(B!==null)H+=B.actualDuration,B=B.sibling;Q.actualDuration=H}if(Z!==null)Z.flags|=$X,Z.subtreeFlags=_1,Z.deletions=null;else{W7=tH,p4=null;return}}var W=Q.sibling;if(W!==null){p4=W;return}Q=Z,p4=Q}while(Q!==null);if(W7===c6)W7=OW}function Kz(z,Q,X){var Z=c5(),J=h7.transition;try{h7.transition=null,P7(N5),SP(z,Q,X,Z)}finally{h7.transition=J,P7(Z)}return null}function SP(z,Q,X,Z){do i6();while(I8!==null);if(xP(),(d1&(y7|h5))!==B7)throw Error("Should not already be working.");var{finishedWork:J,finishedLanes:$}=z;if(g_($),J===null)return j2(),null;else if($===M0)q("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=M0,J===z.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");z.callbackNode=null,z.callbackPriority=F7;var H=v1(J.lanes,J.childLanes);if(LL(z,H),z===s7)s7=null,p4=null,U7=M0;if((J.subtreeFlags&xz)!==_1||(J.flags&xz)!==_1){if(!Uz)Uz=!0,ZG=X,KG(l8,function(){return i6(),null})}var B=(J.subtreeFlags&(t3|s3|HX|xz))!==_1,W=(J.flags&(t3|s3|HX|xz))!==_1;if(B||W){var F=h7.transition;h7.transition=null;var I=c5();P7(N5);var d=d1;d1|=h5,rH.current=null;var c=bF(z,J);RU(),EF(z,J,$),EN(z.containerInfo),z.current=J,a_($),uF(J,z,$),n_(),k_(),d1=d,P7(I),h7.transition=F}else z.current=J,RU();var Z0=Uz;if(Uz)Uz=!1,I8=z,wZ=$;else FQ=0,oY=null;if(H=z.pendingLanes,H===M0)wQ=null;if(!Z0)fW(z.current,!1);if(V_(J.stateNode,Z),p5)z.memoizedUpdaters.clear();if(GP(),U5(z,M7()),Q!==null){var J0=z.onRecoverableError;for(var Y0=0;Y0<Q.length;Y0++){var u0=Q[Y0],G1=u0.stack,z1=u0.digest;J0(u0.value,{componentStack:G1,digest:z1})}}if(lY){lY=!1;var u1=QG;throw QG=null,u1}if(R5(wZ,w1)&&z.tag!==_8)i6();if(H=z.pendingLanes,R5(H,w1))if(Sw(),z===JG)FZ++;else FZ=0,JG=z;else FZ=0;return L8(),j2(),null}function i6(){if(I8!==null){var z=Zq(wZ),Q=wL(D6,z),X=h7.transition,Z=c5();try{return h7.transition=null,P7(Q),fP()}finally{P7(Z),h7.transition=X}}return!1}function vP(z){if(XG.push(z),!Uz)Uz=!0,KG(l8,function(){return i6(),null})}function fP(){if(I8===null)return!1;var z=ZG;ZG=null;var Q=I8,X=wZ;if(I8=null,wZ=M0,(d1&(y7|h5))!==B7)throw Error("Cannot flush passive effects while already rendering.");YG=!0,iY=!1,r_(X);var Z=d1;d1|=h5,lF(Q.current),jF(Q,Q.current,X,z);{var J=XG;XG=[];for(var $=0;$<J.length;$++){var H=J[$];kF(Q,H)}}t_(),fW(Q.current,!0),d1=Z,L8();{if(iY)if(Q===oY)FQ++;else FQ=0,oY=Q;else FQ=0;YG=!1,iY=!1}D_(Q);{var B=Q.current.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}return!0}function CW(z){return wQ!==null&&wQ.has(z)}function hP(z){if(wQ===null)wQ=new Set([z]);else wQ.add(z)}function yP(z){if(!lY)lY=!0,QG=z}var VP=yP;function SW(z,Q,X){var Z=Gz(X,Q),J=IU(z,Z,w1),$=N8(z,J,w1),H=e7();if($!==null)_X($,w1,H),U5($,H)}function A4(z,Q,X){if(wF(X),IZ(!1),z.tag===b){SW(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===b){SW(Z,z,X);return}else if(Z.tag===_){var{type:J,stateNode:$}=Z;if(typeof J.getDerivedStateFromError==="function"||typeof $.componentDidCatch==="function"&&!CW($)){var H=Gz(X,z),B=SH(Z,H,w1),W=N8(Z,B,w1),F=e7();if(W!==null)_X(W,w1,F),U5(W,F);return}}Z=Z.return}q(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
115
|
+
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else F=" You returned: "+B;q("%s must not return anything besides a function, which is used for clean-up.%s",W,F)}}}$=$.next}while($!==J)}}function kF(z,Q){if((Q.flags&a1)!==_1)switch(Q.tag){case V:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,J=Z.id,$=Z.onPostCommit,H=LU(),B=Q.alternate===null?"mount":"update";if(_U())B="nested-update";if(typeof $==="function")$(J,B,X,H);var W=Q.return;z:while(W!==null){switch(W.tag){case b:var F=W.stateNode;F.passiveEffectDuration+=X;break z;case V:var I=W.stateNode;I.passiveEffectDuration+=X;break z}W=W.return}break}}}function CF(z,Q,X,Z){if((X.flags&HX)!==_1)switch(X.tag){case K:case C:case j:{if(!v7)if(X.mode&W4)try{R6(),b8(H7|$7,X)}finally{L6(X)}else b8(H7|$7,X);break}case _:{var J=X.stateNode;if(X.flags&a1){if(!v7)if(Q===null){if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}if(X.mode&W4)try{R6(),J.componentDidMount()}finally{L6(X)}else J.componentDidMount()}else{var $=X.elementType===X.type?Q.memoizedProps:r5(X.type,Q.memoizedProps),H=Q.memoizedState;if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}if(X.mode&W4)try{R6(),J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}finally{L6(X)}else J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}}var B=X.updateQueue;if(B!==null){if(X.type===X.elementType&&!qz){if(J.props!==X.memoizedProps)q("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",S1(X)||"instance");if(J.state!==X.memoizedState)q("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",S1(X)||"instance")}xB(X,B,J)}break}case b:{var W=X.updateQueue;if(W!==null){var F=null;if(X.child!==null)switch(X.child.tag){case M:F=z9(X.child.stateNode);break;case _:F=X.child.stateNode;break}xB(X,W,F)}break}case M:{var I=X.stateNode;if(Q===null&&X.flags&a1){var{type:d,memoizedProps:c}=X;oN(I,d,c)}break}case w:break;case P:break;case V:{{var Z0=X.memoizedProps,J0=Z0.onCommit,Y0=Z0.onRender,u0=X.stateNode.effectDuration,G1=LU(),z1=Q===null?"mount":"update";if(_U())z1="nested-update";if(typeof Y0==="function")Y0(X.memoizedProps.id,z1,X.actualDuration,X.treeBaseDuration,X.actualStartTime,G1);{if(typeof J0==="function")J0(X.memoizedProps.id,z1,u0,G1);vP(X);var u1=X.return;z:while(u1!==null){switch(u1.tag){case b:var g1=u1.stateNode;g1.effectDuration+=u0;break z;case V:var r=u1.stateNode;r.effectDuration+=u0;break z}u1=u1.return}}}break}case k:{mF(z,X);break}case a:case p:case D:case z0:case Q0:case b0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(!v7){if(X.flags&$8)XW(X)}}function SF(z){switch(z.tag){case K:case C:case j:{if(z.mode&W4)try{R6(),sU(z,z.return)}finally{L6(z)}else sU(z,z.return);break}case _:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")PF(z,z.return,Q);eU(z,z.return);break}case M:{eU(z,z.return);break}}}function vF(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===M){if(X===null){X=Z;try{var J=Z.stateNode;if(Q)ZM(J);else YM(Z.stateNode,Z.memoizedProps)}catch(H){A4(z,z.return,H)}}}else if(Z.tag===w){if(X===null)try{var $=Z.stateNode;if(Q)JM($);else $M($,Z.memoizedProps)}catch(H){A4(z,z.return,H)}}else if((Z.tag===z0||Z.tag===Q0)&&Z.memoizedState!==null&&Z!==z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;if(X===Z)X=null;Z=Z.return}if(X===Z)X=null;Z.sibling.return=Z.return,Z=Z.sibling}}}function XW(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case M:Z=z9(X);break;default:Z=X}if(typeof Q==="function"){var J;if(z.mode&W4)try{R6(),J=Q(Z)}finally{L6(z)}else J=Q(Z);if(typeof J==="function")q("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",S1(z))}else{if(!Q.hasOwnProperty("current"))q("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",S1(z));Q.current=Z}}}function fF(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function ZW(z){var Q=z.alternate;if(Q!==null)z.alternate=null,ZW(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===M){var X=z.stateNode;if(X!==null)uM(X)}z.stateNode=null,z._debugOwner=null,z.return=null,z.dependencies=null,z.memoizedProps=null,z.memoizedState=null,z.pendingProps=null,z.stateNode=null,z.updateQueue=null}}function hF(z){var Q=z.return;while(Q!==null){if(JW(Q))return Q;Q=Q.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function JW(z){return z.tag===M||z.tag===b||z.tag===P}function YW(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||JW(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==M&&Q.tag!==w&&Q.tag!==s){if(Q.flags&Q7)continue z;if(Q.child===null||Q.tag===P)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&Q7))return Q.stateNode}}function yF(z){var Q=hF(z);switch(Q.tag){case M:{var X=Q.stateNode;if(Q.flags&YX)YB(X),Q.flags&=~YX;var Z=YW(z);oH(z,Z,X);break}case b:case P:{var J=Q.stateNode.containerInfo,$=YW(z);iH(z,$,J);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function iH(z,Q,X){var Z=z.tag,J=Z===M||Z===w;if(J){var $=z.stateNode;if(Q)eN(X,$,Q);else tN(X,$)}else if(Z===P);else{var H=z.child;if(H!==null){iH(H,Q,X);var B=H.sibling;while(B!==null)iH(B,Q,X),B=B.sibling}}}function oH(z,Q,X){var Z=z.tag,J=Z===M||Z===w;if(J){var $=z.stateNode;if(Q)sN(X,$,Q);else rN(X,$)}else if(Z===P);else{var H=z.child;if(H!==null){oH(H,Q,X);var B=H.sibling;while(B!==null)oH(B,Q,X),B=B.sibling}}}var f7=null,e5=!1;function VF(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case M:{f7=Z.stateNode,e5=!1;break z}case b:{f7=Z.stateNode.containerInfo,e5=!0;break z}case P:{f7=Z.stateNode.containerInfo,e5=!0;break z}}Z=Z.return}if(f7===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");$W(z,Q,X),f7=null,e5=!1}fF(X)}function A8(z,Q,X){var Z=X.child;while(Z!==null)$W(z,Q,Z),Z=Z.sibling}function $W(z,Q,X){switch(m_(X),X.tag){case M:if(!v7)MQ(X,Q);case w:{{var Z=f7,J=e5;if(f7=null,A8(z,Q,X),f7=Z,e5=J,f7!==null)if(e5)QM(f7,X.stateNode);else zM(f7,X.stateNode)}return}case s:{if(f7!==null)if(e5)XM(f7,X.stateNode);else J9(f7,X.stateNode);return}case P:{{var $=f7,H=e5;f7=X.stateNode.containerInfo,e5=!0,A8(z,Q,X),f7=$,e5=H}return}case K:case C:case x:case j:{if(!v7){var B=X.updateQueue;if(B!==null){var W=B.lastEffect;if(W!==null){var F=W.next,I=F;do{var d=I,c=d.destroy,Z0=d.tag;if(c!==void 0){if((Z0&K6)!==q5)jY(X,Q,c);else if((Z0&H7)!==q5){if(p2(X),X.mode&W4)R6(),jY(X,Q,c),L6(X);else jY(X,Q,c);c2()}}I=I.next}while(I!==F)}}}A8(z,Q,X);return}case _:{if(!v7){MQ(X,Q);var J0=X.stateNode;if(typeof J0.componentWillUnmount==="function")lH(X,Q,J0)}A8(z,Q,X);return}case D:{A8(z,Q,X);return}case z0:{if(X.mode&c1){var Y0=v7;v7=Y0||X.memoizedState!==null,A8(z,Q,X),v7=Y0}else A8(z,Q,X);break}default:{A8(z,Q,X);return}}}function DF(z){var Q=z.memoizedState}function mF(z,Q){var X=Q.memoizedState;if(X===null){var Z=Q.alternate;if(Z!==null){var J=Z.memoizedState;if(J!==null){var $=J.dehydrated;if($!==null)FM($)}}}}function HW(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new MF;Q.forEach(function(Z){var J=EP.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),c5)if(RQ!==null&&NQ!==null)AZ(NQ,RQ);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(J,J)}})}}function EF(z,Q,X){RQ=X,NQ=z,j4(Q),GW(Q,z),j4(Q),RQ=null,NQ=null}function z6(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J];try{VF(z,Q,$)}catch(W){A4($,Q,W)}}var H=aZ();if(Q.subtreeFlags&s3){var B=Q.child;while(B!==null)j4(B),GW(B,z),B=B.sibling}j4(H)}function GW(z,Q,X){var{alternate:Z,flags:J}=z;switch(z.tag){case K:case C:case x:case j:{if(z6(Q,z),N6(z),J&a1){try{s5(K6|$7,z,z.return),b8(K6|$7,z)}catch(R1){A4(z,z.return,R1)}if(z.mode&W4){try{R6(),s5(H7|$7,z,z.return)}catch(R1){A4(z,z.return,R1)}L6(z)}else try{s5(H7|$7,z,z.return)}catch(R1){A4(z,z.return,R1)}}return}case _:{if(z6(Q,z),N6(z),J&$8){if(Z!==null)MQ(Z,Z.return)}return}case M:{if(z6(Q,z),N6(z),J&$8){if(Z!==null)MQ(Z,Z.return)}{if(z.flags&YX){var $=z.stateNode;try{YB($)}catch(R1){A4(z,z.return,R1)}}if(J&a1){var H=z.stateNode;if(H!=null){var B=z.memoizedProps,W=Z!==null?Z.memoizedProps:B,F=z.type,I=z.updateQueue;if(z.updateQueue=null,I!==null)try{aN(H,I,F,W,B,z)}catch(R1){A4(z,z.return,R1)}}}}return}case w:{if(z6(Q,z),N6(z),J&a1){if(z.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var{stateNode:d,memoizedProps:c}=z,Z0=Z!==null?Z.memoizedProps:c;try{nN(d,Z0,c)}catch(R1){A4(z,z.return,R1)}}return}case b:{if(z6(Q,z),N6(z),J&a1){if(Z!==null){var J0=Z.memoizedState;if(J0.isDehydrated)try{wM(Q.containerInfo)}catch(R1){A4(z,z.return,R1)}}}return}case P:{z6(Q,z),N6(z);return}case k:{z6(Q,z),N6(z);var Y0=z.child;if(Y0.flags&p8){var{stateNode:u0,memoizedState:G1}=Y0,z1=G1!==null;if(u0.isHidden=z1,z1){var u1=Y0.alternate!==null&&Y0.alternate.memoizedState!==null;if(!u1)PP()}}if(J&a1){try{DF(z)}catch(R1){A4(z,z.return,R1)}HW(z)}return}case z0:{var g1=Z!==null&&Z.memoizedState!==null;if(z.mode&c1){var r=v7;v7=r||g1,z6(Q,z),v7=r}else z6(Q,z);if(N6(z),J&p8){var{stateNode:G0,memoizedState:t}=z,P0=t!==null,p0=z;if(G0.isHidden=P0,P0){if(!g1){if((p0.mode&c1)!==K1){a0=p0;var g0=p0.child;while(g0!==null)a0=g0,gF(g0),g0=g0.sibling}}}vF(p0,P0)}return}case a:{if(z6(Q,z),N6(z),J&a1)HW(z);return}case D:return;default:{z6(Q,z),N6(z);return}}}function N6(z){var Q=z.flags;if(Q&Q7){try{yF(z)}catch(X){A4(z,z.return,X)}z.flags&=~Q7}if(Q&v6)z.flags&=~v6}function uF(z,Q,X){RQ=X,NQ=Q,a0=z,qW(z,Q,X),RQ=null,NQ=null}function qW(z,Q,X){var Z=(z.mode&c1)!==K1;while(a0!==null){var J=a0,$=J.child;if(J.tag===z0&&Z){var H=J.memoizedState!==null,B=H||xY;if(B){aH(z,Q,X);continue}else{var W=J.alternate,F=W!==null&&W.memoizedState!==null,I=F||v7,d=xY,c=v7;if(xY=B,v7=I,v7&&!c)a0=J,xF(J);var Z0=$;while(Z0!==null)a0=Z0,qW(Z0,Q,X),Z0=Z0.sibling;a0=J,xY=d,v7=c,aH(z,Q,X);continue}}if((J.subtreeFlags&HX)!==_1&&$!==null)$.return=J,a0=$;else aH(z,Q,X)}}function aH(z,Q,X){while(a0!==null){var Z=a0;if((Z.flags&HX)!==_1){var J=Z.alternate;j4(Z);try{CF(Q,J,Z,X)}catch(H){A4(Z,Z.return,H)}N7()}if(Z===z){a0=null;return}var $=Z.sibling;if($!==null){$.return=Z.return,a0=$;return}a0=Z.return}}function gF(z){while(a0!==null){var Q=a0,X=Q.child;switch(Q.tag){case K:case C:case x:case j:{if(Q.mode&W4)try{R6(),s5(H7,Q,Q.return)}finally{L6(Q)}else s5(H7,Q,Q.return);break}case _:{MQ(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")lH(Q,Q.return,Z);break}case M:{MQ(Q,Q.return);break}case z0:{var J=Q.memoizedState!==null;if(J){BW(z);continue}break}}if(X!==null)X.return=Q,a0=X;else BW(z)}}function BW(z){while(a0!==null){var Q=a0;if(Q===z){a0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,a0=X;return}a0=Q.return}}function xF(z){while(a0!==null){var Q=a0,X=Q.child;if(Q.tag===z0){var Z=Q.memoizedState!==null;if(Z){UW(z);continue}}if(X!==null)X.return=Q,a0=X;else UW(z)}}function UW(z){while(a0!==null){var Q=a0;j4(Q);try{SF(Q)}catch(Z){A4(Q,Q.return,Z)}if(N7(),Q===z){a0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,a0=X;return}a0=Q.return}}function jF(z,Q,X,Z){a0=Q,pF(Q,z,X,Z)}function pF(z,Q,X,Z){while(a0!==null){var J=a0,$=J.child;if((J.subtreeFlags&xz)!==_1&&$!==null)$.return=J,a0=$;else cF(z,Q,X,Z)}}function cF(z,Q,X,Z){while(a0!==null){var J=a0;if((J.flags&p5)!==_1){j4(J);try{dF(Q,J,X,Z)}catch(H){A4(J,J.return,H)}N7()}if(J===z){a0=null;return}var $=J.sibling;if($!==null){$.return=J.return,a0=$;return}a0=J.return}}function dF(z,Q,X,Z){switch(Q.tag){case K:case C:case j:{if(Q.mode&W4){KH();try{b8(C7|$7,Q)}finally{WH(Q)}}else b8(C7|$7,Q);break}}}function lF(z){a0=z,iF()}function iF(){while(a0!==null){var z=a0,Q=z.child;if((a0.flags&x8)!==_1){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var J=X[Z];a0=J,nF(J,z)}{var $=z.alternate;if($!==null){var H=$.child;if(H!==null){$.child=null;do{var B=H.sibling;H.sibling=null,H=B}while(H!==null)}}}a0=z}}if((z.subtreeFlags&xz)!==_1&&Q!==null)Q.return=z,a0=Q;else oF()}}function oF(){while(a0!==null){var z=a0;if((z.flags&p5)!==_1)j4(z),aF(z),N7();var Q=z.sibling;if(Q!==null){Q.return=z.return,a0=Q;return}a0=z.return}}function aF(z){switch(z.tag){case K:case C:case j:{if(z.mode&W4)KH(),s5(C7|$7,z,z.return),WH(z);else s5(C7|$7,z,z.return);break}}}function nF(z,Q){while(a0!==null){var X=a0;j4(X),tF(X,Q),N7();var Z=X.child;if(Z!==null)Z.return=X,a0=Z;else rF(z)}}function rF(z){while(a0!==null){var Q=a0,X=Q.sibling,Z=Q.return;if(ZW(Q),Q===z){a0=null;return}if(X!==null){X.return=Z,a0=X;return}a0=Z}}function tF(z,Q){switch(z.tag){case K:case C:case j:{if(z.mode&W4)KH(),s5(C7,z,Q),WH(z);else s5(C7,z,Q);break}}}function sF(z){switch(z.tag){case K:case C:case j:{try{b8(H7|$7,z)}catch(X){A4(z,z.return,X)}break}case _:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){A4(z,z.return,X)}break}}}function eF(z){switch(z.tag){case K:case C:case j:{try{b8(C7|$7,z)}catch(Q){A4(z,z.return,Q)}break}}}function zP(z){switch(z.tag){case K:case C:case j:{try{s5(H7|$7,z,z.return)}catch(X){A4(z,z.return,X)}break}case _:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")lH(z,z.return,Q);break}}}function QP(z){switch(z.tag){case K:case C:case j:try{s5(C7|$7,z,z.return)}catch(Q){A4(z,z.return,Q)}}}var XP=0,ZP=1,JP=2,YP=3,$P=4;if(typeof Symbol==="function"&&Symbol.for){var KZ=Symbol.for;XP=KZ("selector.component"),ZP=KZ("selector.has_pseudo_class"),JP=KZ("selector.role"),YP=KZ("selector.test_id"),$P=KZ("selector.text")}var HP=[];function GP(){HP.forEach(function(z){return z()})}var qP=Y.ReactCurrentActQueue;function BP(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function WW(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&qP.current!==null)q("The current testing environment is not configured to support act(...)");return z}}var UP=Math.ceil,nH=Y.ReactCurrentDispatcher,rH=Y.ReactCurrentOwner,h7=Y.ReactCurrentBatchConfig,Q6=Y.ReactCurrentActQueue,B7=0,KW=1,y7=2,y5=4,c6=0,OZ=1,Bz=2,pY=3,_Z=4,OW=5,tH=6,d1=B7,s7=null,p4=null,U7=M0,M6=M0,sH=O8(M0),W7=c6,LZ=null,eH=M0,cY=M0,RZ=M0,dY=M0,NZ=null,B5=null,zG=0,_W=500,LW=1/0,WP=500,d6=null;function MZ(){LW=M7()+WP}function RW(){return LW}var lY=!1,QG=null,wQ=null,Uz=!1,I8=null,wZ=M0,XG=[],ZG=null,KP=50,FZ=0,JG=null,YG=!1,iY=!1,OP=50,FQ=0,oY=null,PZ=f4,aY=M0,NW=!1;function nY(){return s7}function e7(){if((d1&(y7|y5))!==B7)return M7();if(PZ!==f4)return PZ;return PZ=M7(),PZ}function T8(z){var Q=z.mode;if((Q&c1)===K1)return w1;else if((d1&y7)!==B7&&U7!==M0)return OX(U7);var X=Yw()!==Jw;if(X){if(h7.transition!==null){var Z=h7.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(aY===F7)aY=t2();return aY}var J=d5();if(J!==F7)return J;var $=cN();return $}function _P(z){var Q=z.mode;if((Q&c1)===K1)return w1;return KL()}function K7(z,Q,X,Z){if(gP(),NW)q("useInsertionEffect must not schedule updates.");if(YG)iY=!0;if(_X(z,X,Z),(d1&y7)!==M0&&z===s7)pP(Q);else{if(c5)zq(z,Q,X);if(cP(Q),z===s7){if((d1&y7)===B7)RZ=v1(RZ,X);if(W7===_Z)k8(z,U7)}if(U5(z,Z),X===w1&&d1===B7&&(Q.mode&c1)===K1&&!Q6.isBatchingLegacy)MZ(),RB()}}function LP(z,Q,X){var Z=z.current;Z.lanes=Q,_X(z,Q,X),U5(z,X)}function RP(z){return(d1&y7)!==B7}function U5(z,Q){var X=z.callbackNode;HL(z,Q);var Z=KJ(z,z===s7?U7:M0);if(Z===M0){if(X!==null)VW(X);z.callbackNode=null,z.callbackPriority=F7;return}var J=n8(Z),$=z.callbackPriority;if($===J&&!(Q6.current!==null&&X!==WG)){if(X==null&&$!==w1)q("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)VW(X);var H;if(J===w1){if(z.tag===_8){if(Q6.isBatchingLegacy!==null)Q6.didScheduleLegacyUpdate=!0;jM(FW.bind(null,z))}else LB(FW.bind(null,z));if(Q6.current!==null)Q6.current.push(L8);else lN(function(){if((d1&(y7|y5))===B7)L8()});H=null}else{var B;switch(Zq(Z)){case N5:B=qJ;break;case V6:B=e3;break;case D6:B=l8;break;case RJ:B=z$;break;default:B=l8;break}H=KG(B,MW.bind(null,z))}z.callbackPriority=J,z.callbackNode=H}function MW(z,Q){if(vw(),PZ=f4,aY=M0,(d1&(y7|y5))!==B7)throw Error("Should not already be working.");var X=z.callbackNode,Z=i6();if(Z){if(z.callbackNode!==X)return null}var J=KJ(z,z===s7?U7:M0);if(J===M0)return null;var $=!OJ(z,J)&&!WL(z,J)&&!Q,H=$?kP(z,J):tY(z,J);if(H!==c6){if(H===Bz){var B=P$(z);if(B!==M0)J=B,H=$G(z,B)}if(H===OZ){var W=LZ;throw Wz(z,M0),k8(z,J),U5(z,M7()),W}if(H===tH)k8(z,J);else{var F=!OJ(z,J),I=z.current.alternate;if(F&&!MP(I)){if(H=tY(z,J),H===Bz){var d=P$(z);if(d!==M0)J=d,H=$G(z,d)}if(H===OZ){var c=LZ;throw Wz(z,M0),k8(z,J),U5(z,M7()),c}}z.finishedWork=I,z.finishedLanes=J,NP(z,H,J)}}if(U5(z,M7()),z.callbackNode===X)return MW.bind(null,z);return null}function $G(z,Q){var X=NZ;if(NJ(z)){var Z=Wz(z,Q);Z.flags|=S6,VM(z.containerInfo)}var J=tY(z,Q);if(J!==Bz){var $=B5;if(B5=X,$!==null)wW($)}return J}function wW(z){if(B5===null)B5=z;else B5.push.apply(B5,z)}function NP(z,Q,X){switch(Q){case c6:case OZ:throw Error("Root did not complete. This is a bug in React.");case Bz:{Kz(z,B5,d6);break}case pY:{if(k8(z,X),n2(X)&&!DW()){var Z=zG+_W-M7();if(Z>10){var J=KJ(z,M0);if(J!==M0)break;var $=z.suspendedLanes;if(!lz($,X)){var H=e7();e2(z,$);break}z.timeoutHandle=X9(Kz.bind(null,z,B5,d6),Z);break}}Kz(z,B5,d6);break}case _Z:{if(k8(z,X),UL(X))break;if(!DW()){var B=YL(z,X),W=B,F=M7()-W,I=uP(F)-F;if(I>10){z.timeoutHandle=X9(Kz.bind(null,z,B5,d6),I);break}}Kz(z,B5,d6);break}case OW:{Kz(z,B5,d6);break}default:throw Error("Unknown root exit status.")}}function MP(z){var Q=z;while(!0){if(Q.flags&HJ){var X=Q.updateQueue;if(X!==null){var Z=X.stores;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J],H=$.getSnapshot,B=$.value;try{if(!w5(H(),B))return!1}catch(F){return!1}}}}var W=Q.child;if(Q.subtreeFlags&HJ&&W!==null){W.return=Q,Q=W;continue}if(Q===z)return!0;while(Q.sibling===null){if(Q.return===null||Q.return===z)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return!0}function k8(z,Q){Q=_J(Q,dY),Q=_J(Q,RZ),_L(z,Q)}function FW(z){if(fw(),(d1&(y7|y5))!==B7)throw Error("Should not already be working.");i6();var Q=KJ(z,M0);if(!R5(Q,w1))return U5(z,M7()),null;var X=tY(z,Q);if(z.tag!==_8&&X===Bz){var Z=P$(z);if(Z!==M0)Q=Z,X=$G(z,Z)}if(X===OZ){var J=LZ;throw Wz(z,M0),k8(z,Q),U5(z,M7()),J}if(X===tH)throw Error("Root did not complete. This is a bug in React.");var $=z.current.alternate;return z.finishedWork=$,z.finishedLanes=Q,Kz(z,B5,d6),U5(z,M7()),null}function wP(z,Q){if(Q!==M0){if(T$(z,v1(Q,w1)),U5(z,M7()),(d1&(y7|y5))===B7)MZ(),L8()}}function HG(z,Q){var X=d1;d1|=KW;try{return z(Q)}finally{if(d1=X,d1===B7&&!Q6.isBatchingLegacy)MZ(),RB()}}function FP(z,Q,X,Z,J){var $=d5(),H=h7.transition;try{return h7.transition=null,P7(N5),z(Q,X,Z,J)}finally{if(P7($),h7.transition=H,d1===B7)MZ()}}function l6(z){if(I8!==null&&I8.tag===_8&&(d1&(y7|y5))===B7)i6();var Q=d1;d1|=KW;var X=h7.transition,Z=d5();try{if(h7.transition=null,P7(N5),z)return z();else return}finally{if(P7(Z),h7.transition=X,d1=Q,(d1&(y7|y5))===B7)L8()}}function PW(){return(d1&(y7|y5))!==B7}function rY(z,Q){j7(sH,M6,z),M6=v1(M6,Q),eH=v1(eH,Q)}function GG(z){M6=sH.current,x7(sH,z)}function Wz(z,Q){z.finishedWork=null,z.finishedLanes=M0;var X=z.timeoutHandle;if(X!==Z9)z.timeoutHandle=Z9,dN(X);if(p4!==null){var Z=p4.return;while(Z!==null){var J=Z.alternate;rU(J,Z),Z=Z.return}}s7=z;var $=Oz(z.current,null);return p4=$,U7=M6=eH=Q,W7=c6,LZ=null,cY=M0,RZ=M0,dY=M0,NZ=null,B5=null,Ww(),o5.discardPendingWarnings(),$}function bW(z,Q){do{var X=p4;try{if(JY(),iB(),N7(),rH.current=null,X===null||X.return===null){W7=OZ,LZ=Q,p4=null;return}if(v0&&X.mode&W4)DY(X,!0);if(T0)if(jz(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;o_(X,Z,U7)}else i_(X,Q,U7);xw(z,X.return,X,Q,U7),kW(X)}catch(J){if(Q=J,p4===X&&X!==null)X=X.return,p4=X;else X=p4;continue}return}while(!0)}function AW(){var z=nH.current;if(nH.current=vY,z===null)return vY;else return z}function IW(z){nH.current=z}function PP(){zG=M7()}function bZ(z){cY=v1(z,cY)}function bP(){if(W7===c6)W7=pY}function qG(){if(W7===c6||W7===pY||W7===Bz)W7=_Z;if(s7!==null&&(b$(cY)||b$(RZ)))k8(s7,U7)}function AP(z){if(W7!==_Z)W7=Bz;if(NZ===null)NZ=[z];else NZ.push(z)}function IP(){return W7===c6}function tY(z,Q){var X=d1;d1|=y7;var Z=AW();if(s7!==z||U7!==Q){if(c5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,U7),J.clear();Qq(z,Q)}d6=Xq(),Wz(z,Q)}d2(Q);do try{TP();break}catch($){bW(z,$)}while(!0);if(JY(),d1=X,IW(Z),p4!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return l2(),s7=null,U7=M0,W7}function TP(){while(p4!==null)TW(p4)}function kP(z,Q){var X=d1;d1|=y7;var Z=AW();if(s7!==z||U7!==Q){if(c5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,U7),J.clear();Qq(z,Q)}d6=Xq(),MZ(),Wz(z,Q)}d2(Q);do try{CP();break}catch($){bW(z,$)}while(!0);if(JY(),IW(Z),d1=X,p4!==null)return s_(),c6;else return l2(),s7=null,U7=M0,W7}function CP(){while(p4!==null&&!T_())TW(p4)}function TW(z){var Q=z.alternate;j4(z);var X;if((z.mode&W4)!==K1)UH(z),X=BG(Q,z,M6),DY(z,!0);else X=BG(Q,z,M6);if(N7(),z.memoizedProps=z.pendingProps,X===null)kW(z);else p4=X;rH.current=null}function kW(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&$X)===_1){j4(Q);var J=void 0;if((Q.mode&W4)===K1)J=nU(X,Q,M6);else UH(Q),J=nU(X,Q,M6),DY(Q,!1);if(N7(),J!==null){p4=J;return}}else{var $=NF(X,Q);if($!==null){$.flags&=w_,p4=$;return}if((Q.mode&W4)!==K1){DY(Q,!1);var{actualDuration:H,child:B}=Q;while(B!==null)H+=B.actualDuration,B=B.sibling;Q.actualDuration=H}if(Z!==null)Z.flags|=$X,Z.subtreeFlags=_1,Z.deletions=null;else{W7=tH,p4=null;return}}var W=Q.sibling;if(W!==null){p4=W;return}Q=Z,p4=Q}while(Q!==null);if(W7===c6)W7=OW}function Kz(z,Q,X){var Z=d5(),J=h7.transition;try{h7.transition=null,P7(N5),SP(z,Q,X,Z)}finally{h7.transition=J,P7(Z)}return null}function SP(z,Q,X,Z){do i6();while(I8!==null);if(xP(),(d1&(y7|y5))!==B7)throw Error("Should not already be working.");var{finishedWork:J,finishedLanes:$}=z;if(g_($),J===null)return j2(),null;else if($===M0)q("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=M0,J===z.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");z.callbackNode=null,z.callbackPriority=F7;var H=v1(J.lanes,J.childLanes);if(LL(z,H),z===s7)s7=null,p4=null,U7=M0;if((J.subtreeFlags&xz)!==_1||(J.flags&xz)!==_1){if(!Uz)Uz=!0,ZG=X,KG(l8,function(){return i6(),null})}var B=(J.subtreeFlags&(t3|s3|HX|xz))!==_1,W=(J.flags&(t3|s3|HX|xz))!==_1;if(B||W){var F=h7.transition;h7.transition=null;var I=d5();P7(N5);var d=d1;d1|=y5,rH.current=null;var c=bF(z,J);RU(),EF(z,J,$),EN(z.containerInfo),z.current=J,a_($),uF(J,z,$),n_(),k_(),d1=d,P7(I),h7.transition=F}else z.current=J,RU();var Z0=Uz;if(Uz)Uz=!1,I8=z,wZ=$;else FQ=0,oY=null;if(H=z.pendingLanes,H===M0)wQ=null;if(!Z0)fW(z.current,!1);if(V_(J.stateNode,Z),c5)z.memoizedUpdaters.clear();if(GP(),U5(z,M7()),Q!==null){var J0=z.onRecoverableError;for(var Y0=0;Y0<Q.length;Y0++){var u0=Q[Y0],G1=u0.stack,z1=u0.digest;J0(u0.value,{componentStack:G1,digest:z1})}}if(lY){lY=!1;var u1=QG;throw QG=null,u1}if(R5(wZ,w1)&&z.tag!==_8)i6();if(H=z.pendingLanes,R5(H,w1))if(Sw(),z===JG)FZ++;else FZ=0,JG=z;else FZ=0;return L8(),j2(),null}function i6(){if(I8!==null){var z=Zq(wZ),Q=wL(D6,z),X=h7.transition,Z=d5();try{return h7.transition=null,P7(Q),fP()}finally{P7(Z),h7.transition=X}}return!1}function vP(z){if(XG.push(z),!Uz)Uz=!0,KG(l8,function(){return i6(),null})}function fP(){if(I8===null)return!1;var z=ZG;ZG=null;var Q=I8,X=wZ;if(I8=null,wZ=M0,(d1&(y7|y5))!==B7)throw Error("Cannot flush passive effects while already rendering.");YG=!0,iY=!1,r_(X);var Z=d1;d1|=y5,lF(Q.current),jF(Q,Q.current,X,z);{var J=XG;XG=[];for(var $=0;$<J.length;$++){var H=J[$];kF(Q,H)}}t_(),fW(Q.current,!0),d1=Z,L8();{if(iY)if(Q===oY)FQ++;else FQ=0,oY=Q;else FQ=0;YG=!1,iY=!1}D_(Q);{var B=Q.current.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}return!0}function CW(z){return wQ!==null&&wQ.has(z)}function hP(z){if(wQ===null)wQ=new Set([z]);else wQ.add(z)}function yP(z){if(!lY)lY=!0,QG=z}var VP=yP;function SW(z,Q,X){var Z=Gz(X,Q),J=IU(z,Z,w1),$=N8(z,J,w1),H=e7();if($!==null)_X($,w1,H),U5($,H)}function A4(z,Q,X){if(wF(X),IZ(!1),z.tag===b){SW(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===b){SW(Z,z,X);return}else if(Z.tag===_){var{type:J,stateNode:$}=Z;if(typeof J.getDerivedStateFromError==="function"||typeof $.componentDidCatch==="function"&&!CW($)){var H=Gz(X,z),B=SH(Z,H,w1),W=N8(Z,B,w1),F=e7();if(W!==null)_X(W,w1,F),U5(W,F);return}}Z=Z.return}q(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
116
116
|
|
|
117
117
|
Error message:
|
|
118
118
|
|
|
119
|
-
%s`,X)}function DP(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var J=e7();if(e2(z,X),dP(z),s7===z&&lz(U7,X))if(W7===_Z||W7===pY&&n2(U7)&&M7()-zG<_W)Wz(z,M0);else dY=v1(dY,X);U5(z,J)}function vW(z,Q){if(Q===F7)Q=_P(z);var X=e7(),Z=G5(z,Q);if(Z!==null)_X(Z,Q,X),U5(Z,X)}function mP(z){var Q=z.memoizedState,X=F7;if(Q!==null)X=Q.retryLane;vW(z,X)}function EP(z,Q){var X=F7,Z;switch(z.tag){case k:Z=z.stateNode;var J=z.memoizedState;if(J!==null)X=J.retryLane;break;case a:Z=z.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(Z!==null)Z.delete(Q);vW(z,X)}function uP(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:UP(z/1960)*1960}function gP(){if(FZ>KP)throw FZ=0,JG=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");if(FQ>OP)FQ=0,oY=null,q("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")}function xP(){
|
|
119
|
+
%s`,X)}function DP(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var J=e7();if(e2(z,X),dP(z),s7===z&&lz(U7,X))if(W7===_Z||W7===pY&&n2(U7)&&M7()-zG<_W)Wz(z,M0);else dY=v1(dY,X);U5(z,J)}function vW(z,Q){if(Q===F7)Q=_P(z);var X=e7(),Z=G5(z,Q);if(Z!==null)_X(Z,Q,X),U5(Z,X)}function mP(z){var Q=z.memoizedState,X=F7;if(Q!==null)X=Q.retryLane;vW(z,X)}function EP(z,Q){var X=F7,Z;switch(z.tag){case k:Z=z.stateNode;var J=z.memoizedState;if(J!==null)X=J.retryLane;break;case a:Z=z.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(Z!==null)Z.delete(Q);vW(z,X)}function uP(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:UP(z/1960)*1960}function gP(){if(FZ>KP)throw FZ=0,JG=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");if(FQ>OP)FQ=0,oY=null,q("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")}function xP(){o5.flushLegacyContextWarning(),o5.flushPendingUnsafeLifecycleWarnings()}function fW(z,Q){{if(j4(z),sY(z,f6,zP),Q)sY(z,GJ,QP);if(sY(z,f6,sF),Q)sY(z,GJ,eF);N7()}}function sY(z,Q,X){{var Z=z,J=null;while(Z!==null){var $=Z.subtreeFlags&Q;if(Z!==J&&Z.child!==null&&$!==_1)Z=Z.child;else{if((Z.flags&Q)!==_1)X(Z);if(Z.sibling!==null)Z=Z.sibling;else Z=J=Z.return}}}}var eY=null;function hW(z){{if((d1&y7)!==B7)return;if(!(z.mode&c1))return;var Q=z.tag;if(Q!==A&&Q!==b&&Q!==_&&Q!==K&&Q!==C&&Q!==x&&Q!==j)return;var X=S1(z)||"ReactComponent";if(eY!==null){if(eY.has(X))return;eY.add(X)}else eY=new Set([X]);var Z=g7;try{j4(z),q("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{if(Z)j4(z);else N7()}}}var BG;{var jP=null;BG=function(z,Q,X){var Z=xW(jP,Q);try{return dU(z,Q,X)}catch($){if(nM()||$!==null&&typeof $==="object"&&typeof $.then==="function")throw $;if(JY(),iB(),rU(z,Q),xW(Q,Z),Q.mode&W4)UH(Q);if(l3(null,dU,null,z,Q,X),L_()){var J=i3();if(typeof J==="object"&&J!==null&&J._suppressLogging&&typeof $==="object"&&$!==null&&!$._suppressLogging)$._suppressLogging=!0}throw $}}}var yW=!1,UG;UG=new Set;function pP(z){if(m8&&!Tw())switch(z.tag){case K:case C:case j:{var Q=p4&&S1(p4)||"Unknown",X=Q;if(!UG.has(X)){UG.add(X);var Z=S1(z)||"Unknown";q("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",Z,Q,Q)}break}case _:{if(!yW)q("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),yW=!0;break}}}function AZ(z,Q){if(c5){var X=z.memoizedUpdaters;X.forEach(function(Z){zq(z,Z,Q)})}}var WG={};function KG(z,Q){{var X=Q6.current;if(X!==null)return X.push(Q),WG;else return x2(z,Q)}}function VW(z){if(z===WG)return;return I_(z)}function DW(){return Q6.current!==null}function cP(z){{if(z.mode&c1){if(!WW())return}else{if(!BP())return;if(d1!==B7)return;if(z.tag!==K&&z.tag!==C&&z.tag!==j)return}if(Q6.current===null){var Q=g7;try{j4(z),q(`An update to %s inside a test was not wrapped in act(...).
|
|
120
120
|
|
|
121
121
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
122
122
|
|
|
@@ -125,7 +125,7 @@ act(() => {
|
|
|
125
125
|
});
|
|
126
126
|
/* assert on the output */
|
|
127
127
|
|
|
128
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,S1(z))}finally{if(Q)j4(z);else N7()}}}}function dP(z){if(z.tag!==_8&&WW()&&
|
|
128
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,S1(z))}finally{if(Q)j4(z);else N7()}}}}function dP(z){if(z.tag!==_8&&WW()&&Q6.current===null)q(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
129
129
|
|
|
130
130
|
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
131
131
|
|
|
@@ -134,45 +134,45 @@ act(() => {
|
|
|
134
134
|
});
|
|
135
135
|
/* assert on the output */
|
|
136
136
|
|
|
137
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function IZ(z){NW=z}var
|
|
137
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function IZ(z){NW=z}var V5=null,PQ=null,lP=function(z){V5=z};function bQ(z){{if(V5===null)return z;var Q=V5(z);if(Q===void 0)return z;return Q.current}}function OG(z){return bQ(z)}function _G(z){{if(V5===null)return z;var Q=V5(z);if(Q===void 0){if(z!==null&&z!==void 0&&typeof z.render==="function"){var X=bQ(z.render);if(z.render!==X){var Z={$$typeof:l,render:X};if(z.displayName!==void 0)Z.displayName=z.displayName;return Z}}return z}return Q.current}}function mW(z,Q){{if(V5===null)return!1;var X=z.elementType,Z=Q.type,J=!1,$=typeof Z==="object"&&Z!==null?Z.$$typeof:null;switch(z.tag){case _:{if(typeof Z==="function")J=!0;break}case K:{if(typeof Z==="function")J=!0;else if($===e0)J=!0;break}case C:{if($===l)J=!0;else if($===e0)J=!0;break}case x:case j:{if($===m0)J=!0;else if($===e0)J=!0;break}default:return!1}if(J){var H=V5(X);if(H!==void 0&&H===V5(Z))return!0}return!1}}function EW(z){{if(V5===null)return;if(typeof WeakSet!=="function")return;if(PQ===null)PQ=new WeakSet;PQ.add(z)}}var iP=function(z,Q){{if(V5===null)return;var{staleFamilies:X,updatedFamilies:Z}=Q;i6(),l6(function(){LG(z.current,Z,X)})}},oP=function(z,Q){{if(z.context!==F5)return;i6(),l6(function(){TZ(Q,z,null,null)})}};function LG(z,Q,X){{var{alternate:Z,child:J,sibling:$,tag:H,type:B}=z,W=null;switch(H){case K:case j:case _:W=B;break;case C:W=B.render;break}if(V5===null)throw Error("Expected resolveFamily to be set during hot reload.");var F=!1,I=!1;if(W!==null){var d=V5(W);if(d!==void 0){if(X.has(d))I=!0;else if(Q.has(d))if(H===_)I=!0;else F=!0}}if(PQ!==null){if(PQ.has(z)||Z!==null&&PQ.has(Z))I=!0}if(I)z._debugNeedsRemount=!0;if(I||F){var c=G5(z,w1);if(c!==null)K7(c,z,w1,f4)}if(J!==null&&!I)LG(J,Q,X);if($!==null)LG($,Q,X)}}var aP=function(z,Q){{var X=new Set,Z=new Set(Q.map(function(J){return J.current}));return RG(z.current,Z,X),X}};function RG(z,Q,X){{var{child:Z,sibling:J,tag:$,type:H}=z,B=null;switch($){case K:case j:case _:B=H;break;case C:B=H.render;break}var W=!1;if(B!==null){if(Q.has(B))W=!0}if(W)nP(z,X);else if(Z!==null)RG(Z,Q,X);if(J!==null)RG(J,Q,X)}}function nP(z,Q){{var X=rP(z,Q);if(X)return;var Z=z;while(!0){switch(Z.tag){case M:Q.add(Z.stateNode);return;case P:Q.add(Z.stateNode.containerInfo);return;case b:Q.add(Z.stateNode.containerInfo);return}if(Z.return===null)throw Error("Expected to reach root first.");Z=Z.return}}}function rP(z,Q){{var X=z,Z=!1;while(!0){if(X.tag===M)Z=!0,Q.add(X.stateNode);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===z)return Z;while(X.sibling===null){if(X.return===null||X.return===z)return Z;X=X.return}X.sibling.return=X.return,X=X.sibling}}return!1}var NG;{NG=!1;try{var uW=Object.preventExtensions({})}catch(z){NG=!0}}function tP(z,Q,X,Z){if(this.tag=z,this.key=X,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=Q,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=Z,this.flags=_1,this.subtreeFlags=_1,this.deletions=null,this.lanes=M0,this.childLanes=M0,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!NG&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var P5=function(z,Q,X,Z){return new tP(z,Q,X,Z)};function MG(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function sP(z){return typeof z==="function"&&!MG(z)&&z.defaultProps===void 0}function eP(z){if(typeof z==="function")return MG(z)?_:K;else if(z!==void 0&&z!==null){var Q=z.$$typeof;if(Q===l)return C;if(Q===m0)return x}return A}function Oz(z,Q){var X=z.alternate;if(X===null)X=P5(z.tag,Q,z.key,z.mode),X.elementType=z.elementType,X.type=z.type,X.stateNode=z.stateNode,X._debugSource=z._debugSource,X._debugOwner=z._debugOwner,X._debugHookTypes=z._debugHookTypes,X.alternate=z,z.alternate=X;else X.pendingProps=Q,X.type=z.type,X.flags=_1,X.subtreeFlags=_1,X.deletions=null,X.actualDuration=0,X.actualStartTime=-1;X.flags=z.flags&h6,X.childLanes=z.childLanes,X.lanes=z.lanes,X.child=z.child,X.memoizedProps=z.memoizedProps,X.memoizedState=z.memoizedState,X.updateQueue=z.updateQueue;var Z=z.dependencies;switch(X.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},X.sibling=z.sibling,X.index=z.index,X.ref=z.ref,X.selfBaseDuration=z.selfBaseDuration,X.treeBaseDuration=z.treeBaseDuration,X._debugNeedsRemount=z._debugNeedsRemount,X.tag){case A:case K:case j:X.type=bQ(z.type);break;case _:X.type=OG(z.type);break;case C:X.type=_G(z.type);break}return X}function zb(z,Q){z.flags&=h6|Q7;var X=z.alternate;if(X===null)z.childLanes=M0,z.lanes=Q,z.child=null,z.subtreeFlags=_1,z.memoizedProps=null,z.memoizedState=null,z.updateQueue=null,z.dependencies=null,z.stateNode=null,z.selfBaseDuration=0,z.treeBaseDuration=0;else{z.childLanes=X.childLanes,z.lanes=X.lanes,z.child=X.child,z.subtreeFlags=_1,z.deletions=null,z.memoizedProps=X.memoizedProps,z.memoizedState=X.memoizedState,z.updateQueue=X.updateQueue,z.type=X.type;var Z=X.dependencies;z.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},z.selfBaseDuration=X.selfBaseDuration,z.treeBaseDuration=X.treeBaseDuration}return z}function Qb(z,Q,X){var Z;if(z===aJ){if(Z=c1,Q===!0)Z|=i4,Z|=q6}else Z=K1;if(c5)Z|=W4;return P5(b,null,null,Z)}function wG(z,Q,X,Z,J,$){var H=A,B=z;if(typeof z==="function")if(MG(z))H=_,B=OG(B);else B=bQ(B);else if(typeof z==="string")H=M;else z:switch(z){case t1:return C8(X.children,J,$,Q);case y:if(H=v,J|=i4,(J&c1)!==K1)J|=q6;break;case H0:return Xb(X,J,$,Q);case K0:return Zb(X,J,$,Q);case k0:return Jb(X,J,$,Q);case h0:return gW(X,J,$,Q);case Z1:case d0:case j1:case q4:case _0:default:{if(typeof z==="object"&&z!==null)switch(z.$$typeof){case N0:H=g;break z;case T:H=m;break z;case l:H=C,B=_G(B);break z;case m0:H=x;break z;case e0:H=u,B=null;break z}var W="";{if(z===void 0||typeof z==="object"&&z!==null&&Object.keys(z).length===0)W+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var F=Z?S1(Z):null;if(F)W+=`
|
|
138
138
|
|
|
139
139
|
Check the render method of \``+F+"`."}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(z==null?z:typeof z)+"."+W))}}var I=P5(H,X,Q,J);return I.elementType=z,I.type=B,I.lanes=$,I._debugOwner=Z,I}function FG(z,Q,X){var Z=null;Z=z._owner;var{type:J,key:$,props:H}=z,B=wG(J,$,H,Z,Q,X);return B._debugSource=z._source,B._debugOwner=z._owner,B}function C8(z,Q,X,Z){var J=P5(f,z,Z,Q);return J.lanes=X,J}function Xb(z,Q,X,Z){if(typeof z.id!=="string")q('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof z.id);var J=P5(V,z,Z,Q|W4);return J.elementType=H0,J.lanes=X,J.stateNode={effectDuration:0,passiveEffectDuration:0},J}function Zb(z,Q,X,Z){var J=P5(k,z,Z,Q);return J.elementType=K0,J.lanes=X,J}function Jb(z,Q,X,Z){var J=P5(a,z,Z,Q);return J.elementType=k0,J.lanes=X,J}function gW(z,Q,X,Z){var J=P5(z0,z,Z,Q);J.elementType=h0,J.lanes=X;var $={isHidden:!1};return J.stateNode=$,J}function PG(z,Q,X){var Z=P5(w,z,null,Q);return Z.lanes=X,Z}function Yb(){var z=P5(M,null,null,K1);return z.elementType="DELETED",z}function $b(z){var Q=P5(s,null,null,K1);return Q.stateNode=z,Q}function bG(z,Q,X){var Z=z.children!==null?z.children:[],J=P5(P,Z,z.key,Q);return J.lanes=X,J.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},J}function xW(z,Q){if(z===null)z=P5(A,null,null,K1);return z.tag=Q.tag,z.key=Q.key,z.elementType=Q.elementType,z.type=Q.type,z.stateNode=Q.stateNode,z.return=Q.return,z.child=Q.child,z.sibling=Q.sibling,z.index=Q.index,z.ref=Q.ref,z.pendingProps=Q.pendingProps,z.memoizedProps=Q.memoizedProps,z.updateQueue=Q.updateQueue,z.memoizedState=Q.memoizedState,z.dependencies=Q.dependencies,z.mode=Q.mode,z.flags=Q.flags,z.subtreeFlags=Q.subtreeFlags,z.deletions=Q.deletions,z.lanes=Q.lanes,z.childLanes=Q.childLanes,z.alternate=Q.alternate,z.actualDuration=Q.actualDuration,z.actualStartTime=Q.actualStartTime,z.selfBaseDuration=Q.selfBaseDuration,z.treeBaseDuration=Q.treeBaseDuration,z._debugSource=Q._debugSource,z._debugOwner=Q._debugOwner,z._debugNeedsRemount=Q._debugNeedsRemount,z._debugHookTypes=Q._debugHookTypes,z}function Hb(z,Q,X,Z,J){this.tag=Q,this.containerInfo=z,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Z9,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=F7,this.eventTimes=I$(M0),this.expirationTimes=I$(f4),this.pendingLanes=M0,this.suspendedLanes=M0,this.pingedLanes=M0,this.expiredLanes=M0,this.mutableReadLanes=M0,this.finishedLanes=M0,this.entangledLanes=M0,this.entanglements=I$(M0),this.identifierPrefix=Z,this.onRecoverableError=J,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var $=this.pendingUpdatersLaneMap=[];for(var H=0;H<X$;H++)$.push(new Set)}switch(Q){case aJ:this._debugRootType=X?"hydrateRoot()":"createRoot()";break;case _8:this._debugRootType=X?"hydrate()":"render()";break}}function jW(z,Q,X,Z,J,$,H,B,W,F){var I=new Hb(z,Q,X,B,W),d=Qb(Q,$);I.current=d,d.stateNode=I;{var c={element:Z,isDehydrated:X,cache:null,transitions:null,pendingSuspenseBoundaries:null};d.memoizedState=c}return V9(d),I}var AG="18.3.1";function Gb(z,Q,X){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Q1(Z),{$$typeof:N4,key:Z==null?null:""+Z,children:z,containerInfo:Q,implementation:X}}var IG,TG;IG=!1,TG={};function pW(z){if(!z)return F5;var Q=uz(z),X=xM(Q);if(Q.tag===_){var Z=Q.type;if(W6(Z))return OB(Q,Z,X)}return X}function qb(z,Q){{var X=uz(z);if(X===void 0)if(typeof z.render==="function")throw Error("Unable to find node on an unmounted component.");else{var Z=Object.keys(z).join(",");throw Error("Argument appears to not be a ReactComponent. Keys: "+Z)}var J=E2(X);if(J===null)return null;if(J.mode&i4){var $=S1(X)||"Component";if(!TG[$]){TG[$]=!0;var H=g7;try{if(j4(J),X.mode&i4)q("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,$);else q("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,$)}finally{if(H)j4(H);else N7()}}}return J.stateNode}}function cW(z,Q,X,Z,J,$,H,B){var W=!1,F=null;return jW(z,Q,W,F,X,Z,J,$,H)}function dW(z,Q,X,Z,J,$,H,B,W,F){var I=!0,d=jW(X,Z,I,z,J,$,H,B,W);d.context=pW(null);var c=d.current,Z0=e7(),J0=T8(c),Y0=j6(Z0,J0);return Y0.callback=Q!==void 0&&Q!==null?Q:null,N8(c,Y0,J0),LP(d,J0,Z0),d}function TZ(z,Q,X,Z){y_(Q,z);var J=Q.current,$=e7(),H=T8(J);e_(H);var B=pW(X);if(Q.context===null)Q.context=B;else Q.pendingContext=B;if(m8&&g7!==null&&!IG)IG=!0,q(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
140
140
|
|
|
141
141
|
Check the render method of %s.`,S1(g7)||"Unknown");var W=j6($,H);if(W.payload={element:z},Z=Z===void 0?null:Z,Z!==null){if(typeof Z!=="function")q("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Z);W.callback=Z}var F=N8(J,W,H);if(F!==null)K7(F,J,H,$),qY(F,J,H);return H}function z3(z){var Q=z.current;if(!Q.child)return null;switch(Q.child.tag){case M:return z9(Q.child.stateNode);default:return Q.child.stateNode}}function Bb(z){switch(z.tag){case b:{var Q=z.stateNode;if(NJ(Q)){var X=GL(Q);wP(Q,X)}break}case k:{l6(function(){var J=G5(z,w1);if(J!==null){var $=e7();K7(J,z,w1,$)}});var Z=w1;kG(z,Z);break}}}function lW(z,Q){var X=z.memoizedState;if(X!==null&&X.dehydrated!==null)X.retryLane=OL(X.retryLane,Q)}function kG(z,Q){lW(z,Q);var X=z.alternate;if(X)lW(X,Q)}function Ub(z){if(z.tag!==k)return;var Q=UX,X=G5(z,Q);if(X!==null){var Z=e7();K7(X,z,Q,Z)}kG(z,Q)}function Wb(z){if(z.tag!==k)return;var Q=T8(z),X=G5(z,Q);if(X!==null){var Z=e7();K7(X,z,Q,Z)}kG(z,Q)}function iW(z){var Q=A_(z);if(Q===null)return null;return Q.stateNode}var oW=function(z){return null};function Kb(z){return oW(z)}var aW=function(z){return!1};function Ob(z){return aW(z)}var nW=null,rW=null,tW=null,sW=null,eW=null,zK=null,QK=null,XK=null,ZK=null;{var JK=function(z,Q,X){var Z=Q[X],J=z4(z)?z.slice():y1({},z);if(X+1===Q.length){if(z4(J))J.splice(Z,1);else delete J[Z];return J}return J[Z]=JK(z[Z],Q,X+1),J},YK=function(z,Q){return JK(z,Q,0)},$K=function(z,Q,X,Z){var J=Q[Z],$=z4(z)?z.slice():y1({},z);if(Z+1===Q.length){var H=X[Z];if($[H]=$[J],z4($))$.splice(J,1);else delete $[J]}else $[J]=$K(z[J],Q,X,Z+1);return $},HK=function(z,Q,X){if(Q.length!==X.length){O("copyWithRename() expects paths of the same length");return}else for(var Z=0;Z<X.length-1;Z++)if(Q[Z]!==X[Z]){O("copyWithRename() expects paths to be the same except for the deepest key");return}return $K(z,Q,X,0)},GK=function(z,Q,X,Z){if(X>=Q.length)return Z;var J=Q[X],$=z4(z)?z.slice():y1({},z);return $[J]=GK(z[J],Q,X+1,Z),$},qK=function(z,Q,X){return GK(z,Q,0,X)},CG=function(z,Q){var X=z.memoizedState;while(X!==null&&Q>0)X=X.next,Q--;return X};nW=function(z,Q,X,Z){var J=CG(z,Q);if(J!==null){var $=qK(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=y1({},z.memoizedProps);var H=G5(z,w1);if(H!==null)K7(H,z,w1,f4)}},rW=function(z,Q,X){var Z=CG(z,Q);if(Z!==null){var J=YK(Z.memoizedState,X);Z.memoizedState=J,Z.baseState=J,z.memoizedProps=y1({},z.memoizedProps);var $=G5(z,w1);if($!==null)K7($,z,w1,f4)}},tW=function(z,Q,X,Z){var J=CG(z,Q);if(J!==null){var $=HK(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=y1({},z.memoizedProps);var H=G5(z,w1);if(H!==null)K7(H,z,w1,f4)}},sW=function(z,Q,X){if(z.pendingProps=qK(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=G5(z,w1);if(Z!==null)K7(Z,z,w1,f4)},eW=function(z,Q){if(z.pendingProps=YK(z.memoizedProps,Q),z.alternate)z.alternate.pendingProps=z.pendingProps;var X=G5(z,w1);if(X!==null)K7(X,z,w1,f4)},zK=function(z,Q,X){if(z.pendingProps=HK(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=G5(z,w1);if(Z!==null)K7(Z,z,w1,f4)},QK=function(z){var Q=G5(z,w1);if(Q!==null)K7(Q,z,w1,f4)},XK=function(z){oW=z},ZK=function(z){aW=z}}function _b(z){var Q=E2(z);if(Q===null)return null;return Q.stateNode}function Lb(z){return null}function Rb(){return g7}function Nb(z){var Q=z.findFiberByHostInstance,X=Y.ReactCurrentDispatcher;return h_({bundleType:z.bundleType,version:z.version,rendererPackageName:z.rendererPackageName,rendererConfig:z.rendererConfig,overrideHookState:nW,overrideHookStateDeletePath:rW,overrideHookStateRenamePath:tW,overrideProps:sW,overridePropsDeletePath:eW,overridePropsRenamePath:zK,setErrorHandler:XK,setSuspenseHandler:ZK,scheduleUpdate:QK,currentDispatcherRef:X,findHostInstanceByFiber:_b,findFiberByHostInstance:Q||Lb,findHostInstancesForRefresh:aP,scheduleRefresh:iP,scheduleRoot:oP,setRefreshHandler:lP,getCurrentFiber:Rb,reconcilerVersion:AG})}var BK=typeof reportError==="function"?reportError:function(z){console.error(z)};function SG(z){this._internalRoot=z}Q3.prototype.render=SG.prototype.render=function(z){var Q=this._internalRoot;if(Q===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")q("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");else if(X3(arguments[1]))q("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.");else if(typeof arguments[1]<"u")q("You passed a second argument to root.render(...) but it only accepts one argument.");var X=Q.containerInfo;if(X.nodeType!==z7){var Z=iW(Q.current);if(Z){if(Z.parentNode!==X)q("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}}TZ(z,Q,null,null)},Q3.prototype.unmount=SG.prototype.unmount=function(){if(typeof arguments[0]==="function")q("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var z=this._internalRoot;if(z!==null){this._internalRoot=null;var Q=z.containerInfo;if(PW())q("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.");l6(function(){TZ(null,z,null,null)}),GB(Q)}};function Mb(z,Q){if(!X3(z))throw Error("createRoot(...): Target container is not a DOM element.");UK(z);var X=!1,Z=!1,J="",$=BK,H=null;if(Q!==null&&Q!==void 0){if(Q.hydrate)O("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");else if(typeof Q==="object"&&Q!==null&&Q.$$typeof===G4)q(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
142
142
|
|
|
143
143
|
let root = createRoot(domContainer);
|
|
144
|
-
root.render(<App />);`);if(Q.unstable_strictMode===!0)X=!0;if(Q.identifierPrefix!==void 0)J=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)$=Q.onRecoverableError;if(Q.transitionCallbacks!==void 0)H=Q.transitionCallbacks}var B=cW(z,aJ,null,X,Z,J,$);jJ(B.current,z);var W=z.nodeType===z7?z.parentNode:z;return hX(W),new SG(B)}function Q3(z){this._internalRoot=z}function wb(z){if(z)fL(z)}Q3.prototype.unstable_scheduleHydration=wb;function Fb(z,Q,X){if(!X3(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(UK(z),Q===void 0)q("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var Z=X!=null?X:null,J=X!=null&&X.hydratedSources||null,$=!1,H=!1,B="",W=BK;if(X!==null&&X!==void 0){if(X.unstable_strictMode===!0)$=!0;if(X.identifierPrefix!==void 0)B=X.identifierPrefix;if(X.onRecoverableError!==void 0)W=X.onRecoverableError}var F=dW(Q,null,z,aJ,Z,$,H,B,W);if(jJ(F.current,z),hX(z),J)for(var I=0;I<J.length;I++){var d=J[I];Fw(F,d)}return new Q3(F)}function X3(z){return!!(z&&(z.nodeType===$5||z.nodeType===C6||z.nodeType===V3||!O0))}function kZ(z){return!!(z&&(z.nodeType===$5||z.nodeType===C6||z.nodeType===V3||z.nodeType===z7&&z.nodeValue===" react-mount-point-unstable "))}function UK(z){{if(z.nodeType===$5&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");if(cX(z))if(z._reactRootContainer)q("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else q("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.")}}var Pb=Y.ReactCurrentOwner,WK;WK=function(z){if(z._reactRootContainer&&z.nodeType!==z7){var Q=iW(z._reactRootContainer.current);if(Q){if(Q.parentNode!==z)q("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}}var X=!!z._reactRootContainer,Z=vG(z),J=!!(Z&&K8(Z));if(J&&!X)q("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");if(z.nodeType===$5&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function vG(z){if(!z)return null;if(z.nodeType===C6)return z.documentElement;else return z.firstChild}function KK(){}function bb(z,Q,X,Z,J){if(J){if(typeof Z==="function"){var $=Z;Z=function(){var c=z3(H);$.call(c)}}var H=dW(Q,Z,z,_8,null,!1,!1,"",KK);z._reactRootContainer=H,jJ(H.current,z);var B=z.nodeType===z7?z.parentNode:z;return hX(B),l6(),H}else{var W;while(W=z.lastChild)z.removeChild(W);if(typeof Z==="function"){var F=Z;Z=function(){var c=z3(I);F.call(c)}}var I=cW(z,_8,null,!1,!1,"",KK);z._reactRootContainer=I,jJ(I.current,z);var d=z.nodeType===z7?z.parentNode:z;return hX(d),l6(function(){TZ(Q,I,X,Z)}),I}}function Ab(z,Q){if(z!==null&&typeof z!=="function")q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)}function Z3(z,Q,X,Z,J){WK(X),Ab(J===void 0?null:J,"render");var $=X._reactRootContainer,H;if(!$)H=bb(X,Q,z,J,Z);else{if(H=$,typeof J==="function"){var B=J;J=function(){var W=z3(H);B.call(W)}}TZ(Q,H,z,J)}return z3(H)}var OK=!1;function Ib(z){{if(!OK)OK=!0,q("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");var Q=Pb.current;if(Q!==null&&Q.stateNode!==null){var X=Q.stateNode._warnedAboutRefsInRender;if(!X)q("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",n1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===$5)return z;return qb(z,"findDOMNode")}function Tb(z,Q,X){if(q("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Z3(null,z,Q,!0,X)}function kb(z,Q,X){if(q("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Z3(null,z,Q,!1,X)}function Cb(z,Q,X,Z){if(q("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(X))throw Error("Target container is not a DOM element.");if(z==null||!R_(z))throw Error("parentComponent must be a valid React Component");return Z3(z,Q,X,!1,Z)}var _K=!1;function Sb(z){if(!_K)_K=!0,q("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");if(!kZ(z))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var Q=cX(z)&&z._reactRootContainer===void 0;if(Q)q("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(z._reactRootContainer){{var X=vG(z),Z=X&&!K8(X);if(Z)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return l6(function(){Z3(null,null,z,!1,function(){z._reactRootContainer=null,GB(z)})}),!0}else{{var J=vG(z),$=!!(J&&K8(J)),H=z.nodeType===$5&&kZ(z.parentNode)&&!!z.parentNode._reactRootContainer;if($)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",H?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}if(FL(Bb),bL(Ub),AL(Wb),IL(
|
|
144
|
+
root.render(<App />);`);if(Q.unstable_strictMode===!0)X=!0;if(Q.identifierPrefix!==void 0)J=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)$=Q.onRecoverableError;if(Q.transitionCallbacks!==void 0)H=Q.transitionCallbacks}var B=cW(z,aJ,null,X,Z,J,$);jJ(B.current,z);var W=z.nodeType===z7?z.parentNode:z;return hX(W),new SG(B)}function Q3(z){this._internalRoot=z}function wb(z){if(z)fL(z)}Q3.prototype.unstable_scheduleHydration=wb;function Fb(z,Q,X){if(!X3(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(UK(z),Q===void 0)q("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var Z=X!=null?X:null,J=X!=null&&X.hydratedSources||null,$=!1,H=!1,B="",W=BK;if(X!==null&&X!==void 0){if(X.unstable_strictMode===!0)$=!0;if(X.identifierPrefix!==void 0)B=X.identifierPrefix;if(X.onRecoverableError!==void 0)W=X.onRecoverableError}var F=dW(Q,null,z,aJ,Z,$,H,B,W);if(jJ(F.current,z),hX(z),J)for(var I=0;I<J.length;I++){var d=J[I];Fw(F,d)}return new Q3(F)}function X3(z){return!!(z&&(z.nodeType===$5||z.nodeType===C6||z.nodeType===V3||!O0))}function kZ(z){return!!(z&&(z.nodeType===$5||z.nodeType===C6||z.nodeType===V3||z.nodeType===z7&&z.nodeValue===" react-mount-point-unstable "))}function UK(z){{if(z.nodeType===$5&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");if(cX(z))if(z._reactRootContainer)q("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else q("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.")}}var Pb=Y.ReactCurrentOwner,WK;WK=function(z){if(z._reactRootContainer&&z.nodeType!==z7){var Q=iW(z._reactRootContainer.current);if(Q){if(Q.parentNode!==z)q("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}}var X=!!z._reactRootContainer,Z=vG(z),J=!!(Z&&K8(Z));if(J&&!X)q("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");if(z.nodeType===$5&&z.tagName&&z.tagName.toUpperCase()==="BODY")q("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function vG(z){if(!z)return null;if(z.nodeType===C6)return z.documentElement;else return z.firstChild}function KK(){}function bb(z,Q,X,Z,J){if(J){if(typeof Z==="function"){var $=Z;Z=function(){var c=z3(H);$.call(c)}}var H=dW(Q,Z,z,_8,null,!1,!1,"",KK);z._reactRootContainer=H,jJ(H.current,z);var B=z.nodeType===z7?z.parentNode:z;return hX(B),l6(),H}else{var W;while(W=z.lastChild)z.removeChild(W);if(typeof Z==="function"){var F=Z;Z=function(){var c=z3(I);F.call(c)}}var I=cW(z,_8,null,!1,!1,"",KK);z._reactRootContainer=I,jJ(I.current,z);var d=z.nodeType===z7?z.parentNode:z;return hX(d),l6(function(){TZ(Q,I,X,Z)}),I}}function Ab(z,Q){if(z!==null&&typeof z!=="function")q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)}function Z3(z,Q,X,Z,J){WK(X),Ab(J===void 0?null:J,"render");var $=X._reactRootContainer,H;if(!$)H=bb(X,Q,z,J,Z);else{if(H=$,typeof J==="function"){var B=J;J=function(){var W=z3(H);B.call(W)}}TZ(Q,H,z,J)}return z3(H)}var OK=!1;function Ib(z){{if(!OK)OK=!0,q("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");var Q=Pb.current;if(Q!==null&&Q.stateNode!==null){var X=Q.stateNode._warnedAboutRefsInRender;if(!X)q("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",n1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===$5)return z;return qb(z,"findDOMNode")}function Tb(z,Q,X){if(q("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Z3(null,z,Q,!0,X)}function kb(z,Q,X){if(q("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(Q))throw Error("Target container is not a DOM element.");{var Z=cX(Q)&&Q._reactRootContainer===void 0;if(Z)q("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Z3(null,z,Q,!1,X)}function Cb(z,Q,X,Z){if(q("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!kZ(X))throw Error("Target container is not a DOM element.");if(z==null||!R_(z))throw Error("parentComponent must be a valid React Component");return Z3(z,Q,X,!1,Z)}var _K=!1;function Sb(z){if(!_K)_K=!0,q("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");if(!kZ(z))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var Q=cX(z)&&z._reactRootContainer===void 0;if(Q)q("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(z._reactRootContainer){{var X=vG(z),Z=X&&!K8(X);if(Z)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return l6(function(){Z3(null,null,z,!1,function(){z._reactRootContainer=null,GB(z)})}),!0}else{{var J=vG(z),$=!!(J&&K8(J)),H=z.nodeType===$5&&kZ(z.parentNode)&&!!z.parentNode._reactRootContainer;if($)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",H?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}if(FL(Bb),bL(Ub),AL(Wb),IL(d5),TL(NL),typeof Map!=="function"||Map.prototype==null||typeof Map.prototype.forEach!=="function"||typeof Set!=="function"||Set.prototype==null||typeof Set.prototype.clear!=="function"||typeof Set.prototype.forEach!=="function")q("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");$_(kN),q_(HG,FP,l6);function vb(z,Q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!X3(Q))throw Error("Target container is not a DOM element.");return Gb(z,Q,null,X)}function fb(z,Q,X,Z){return Cb(z,Q,X,Z)}var fG={usingClientEntryPoint:!1,Events:[K8,zQ,pJ,I2,T2,HG]};function hb(z,Q){if(!fG.usingClientEntryPoint)q('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return Mb(z,Q)}function yb(z,Q,X){if(!fG.usingClientEntryPoint)q('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return Fb(z,Q,X)}function Vb(z){if(PW())q("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");return l6(z)}var Db=Nb({findFiberByHostInstance:e8,bundleType:1,version:AG,rendererPackageName:"react-dom"});if(!Db&&Y1&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var LK=window.location.protocol;if(/^(https?|file):$/.test(LK))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(LK==="file:"?`
|
|
145
145
|
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}}if(db.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fG,db.createPortal=vb,db.createRoot=hb,db.findDOMNode=Ib,db.flushSync=Vb,db.hydrate=Tb,db.hydrateRoot=yb,db.render=kb,db.unmountComponentAtNode=Sb,db.unstable_batchedUpdates=HG,db.unstable_renderSubtreeIntoContainer=fb,db.version=AG,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var FK=_z((Vk,wK)=>{var lb=B0(MK());wK.exports=lb});var PK=_z((ib)=>{var TQ=B0(FK());IQ=TQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ib.createRoot=function(Y,G){IQ.usingClientEntryPoint=!0;try{return TQ.createRoot(Y,G)}finally{IQ.usingClientEntryPoint=!1}},ib.hydrateRoot=function(Y,G,U){IQ.usingClientEntryPoint=!0;try{return TQ.hydrateRoot(Y,G,U)}finally{IQ.usingClientEntryPoint=!1}};var IQ});var U1=_z((ob)=>{var yG=B0(f1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),K=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),f=Symbol.iterator,v="@@iterator";function m(y){if(y===null||typeof y!=="object")return null;var H0=f&&y[f]||y[v];if(typeof H0==="function")return H0;return null}var g=yG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(y){{for(var H0=arguments.length,N0=Array(H0>1?H0-1:0),T=1;T<H0;T++)N0[T-1]=arguments[T];V("error",y,N0)}}function V(y,H0,N0){{var T=g.ReactDebugCurrentFrame,l=T.getStackAddendum();if(l!=="")H0+="%s",N0=N0.concat([l]);var K0=N0.map(function(k0){return String(k0)});K0.unshift("Warning: "+H0),Function.prototype.apply.call(console[y],console,K0)}}var k=!1,x=!1,j=!1,u=!1,p=!1,s;s=Symbol.for("react.module.reference");function a(y){if(typeof y==="string"||typeof y==="function")return!0;if(y===U||y===q||p||y===O||y===A||y===b||u||y===w||k||x||j)return!0;if(typeof y==="object"&&y!==null){if(y.$$typeof===M||y.$$typeof===P||y.$$typeof===R||y.$$typeof===K||y.$$typeof===_||y.$$typeof===s||y.getModuleId!==void 0)return!0}return!1}function D(y,H0,N0){var T=y.displayName;if(T)return T;var l=H0.displayName||H0.name||"";return l!==""?N0+"("+l+")":N0}function z0(y){return y.displayName||"Context"}function Q0(y){if(y==null)return null;if(typeof y.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof y==="function")return y.displayName||y.name||null;if(typeof y==="string")return y;switch(y){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case A:return"Suspense";case b:return"SuspenseList"}if(typeof y==="object")switch(y.$$typeof){case K:var H0=y;return z0(H0)+".Consumer";case R:var N0=y;return z0(N0._context)+".Provider";case _:return D(y,y.render,"ForwardRef");case P:var T=y.displayName||null;if(T!==null)return T;return Q0(y.type)||"Memo";case M:{var l=y,K0=l._payload,k0=l._init;try{return Q0(k0(K0))}catch(m0){return null}}}return null}var U0=Object.assign,b0=0,e,y0,I0,i,R0,O0,q0;function o(){}o.__reactDisabledLog=!0;function T0(){{if(b0===0){e=console.log,y0=console.info,I0=console.warn,i=console.error,R0=console.group,O0=console.groupCollapsed,q0=console.groupEnd;var y={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}b0++}}function v0(){{if(b0--,b0===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U0({},y,{value:e}),info:U0({},y,{value:y0}),warn:U0({},y,{value:I0}),error:U0({},y,{value:i}),group:U0({},y,{value:R0}),groupCollapsed:U0({},y,{value:O0}),groupEnd:U0({},y,{value:q0})})}if(b0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X1=g.ReactCurrentDispatcher,r0;function f0(y,H0,N0){{if(r0===void 0)try{throw Error()}catch(l){var T=l.stack.trim().match(/\n( *(at )?)/);r0=T&&T[1]||""}return`
|
|
146
146
|
`+r0+y}}var o0=!1,J1;{var A0=typeof WeakMap==="function"?WeakMap:Map;J1=new A0}function Y1(y,H0){if(!y||o0)return"";{var N0=J1.get(y);if(N0!==void 0)return N0}var T;o0=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var K0;K0=X1.current,X1.current=null,T0();try{if(H0){var k0=function(){throw Error()};if(Object.defineProperty(k0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(k0,[])}catch(q4){T=q4}Reflect.construct(y,[],k0)}else{try{k0.call()}catch(q4){T=q4}y.call(k0.prototype)}}else{try{throw Error()}catch(q4){T=q4}y()}}catch(q4){if(q4&&T&&typeof q4.stack==="string"){var m0=q4.stack.split(`
|
|
147
147
|
`),e0=T.stack.split(`
|
|
148
148
|
`),d0=m0.length-1,_0=e0.length-1;while(d0>=1&&_0>=0&&m0[d0]!==e0[_0])_0--;for(;d0>=1&&_0>=0;d0--,_0--)if(m0[d0]!==e0[_0]){if(d0!==1||_0!==1)do if(d0--,_0--,_0<0||m0[d0]!==e0[_0]){var h0=`
|
|
149
|
-
`+m0[d0].replace(" at new "," at ");if(y.displayName&&h0.includes("<anonymous>"))h0=h0.replace("<anonymous>",y.displayName);if(typeof y==="function")J1.set(y,h0);return h0}while(d0>=1&&_0>=0);break}}}finally{o0=!1,X1.current=K0,v0(),Error.prepareStackTrace=l}var Z1=y?y.displayName||y.name:"",j1=Z1?f0(Z1):"";if(typeof y==="function")J1.set(y,j1);return j1}function h1(y,H0,N0){return Y1(y,!1)}function l1(y){var H0=y.prototype;return!!(H0&&H0.isReactComponent)}function r1(y,H0,N0){if(y==null)return"";if(typeof y==="function")return Y1(y,l1(y));if(typeof y==="string")return f0(y);switch(y){case A:return f0("Suspense");case b:return f0("SuspenseList")}if(typeof y==="object")switch(y.$$typeof){case _:return h1(y.render);case P:return r1(y.type,H0,N0);case M:{var T=y,l=T._payload,K0=T._init;try{return r1(K0(l),H0,N0)}catch(k0){}}}return""}var O1=Object.prototype.hasOwnProperty,w0={},Q1=g.ReactDebugCurrentFrame;function I1(y){if(y){var H0=y._owner,N0=r1(y.type,y._source,H0?H0.type:null);Q1.setExtraStackFrame(N0)}else Q1.setExtraStackFrame(null)}function i1(y,H0,N0,T,l){{var K0=Function.call.bind(O1);for(var k0 in y)if(K0(y,k0)){var m0=void 0;try{if(typeof y[k0]!=="function"){var e0=Error((T||"React class")+": "+N0+" type `"+k0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[k0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw e0.name="Invariant Violation",e0}m0=y[k0](H0,k0,T,N0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d0){m0=d0}if(m0&&!(m0 instanceof Error))I1(l),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",N0,k0,typeof m0),I1(null);if(m0 instanceof Error&&!(m0.message in w0))w0[m0.message]=!0,I1(l),C("Failed %s type: %s",N0,m0.message),I1(null)}}}var C4=Array.isArray;function $4(y){return C4(y)}function b7(y){{var H0=typeof Symbol==="function"&&Symbol.toStringTag,N0=H0&&y[Symbol.toStringTag]||y.constructor.name||"Object";return N0}}function F4(y){try{return A7(y),!1}catch(H0){return!0}}function A7(y){return""+y}function S4(y){if(F4(y))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",b7(y)),A7(y)}var
|
|
149
|
+
`+m0[d0].replace(" at new "," at ");if(y.displayName&&h0.includes("<anonymous>"))h0=h0.replace("<anonymous>",y.displayName);if(typeof y==="function")J1.set(y,h0);return h0}while(d0>=1&&_0>=0);break}}}finally{o0=!1,X1.current=K0,v0(),Error.prepareStackTrace=l}var Z1=y?y.displayName||y.name:"",j1=Z1?f0(Z1):"";if(typeof y==="function")J1.set(y,j1);return j1}function h1(y,H0,N0){return Y1(y,!1)}function l1(y){var H0=y.prototype;return!!(H0&&H0.isReactComponent)}function r1(y,H0,N0){if(y==null)return"";if(typeof y==="function")return Y1(y,l1(y));if(typeof y==="string")return f0(y);switch(y){case A:return f0("Suspense");case b:return f0("SuspenseList")}if(typeof y==="object")switch(y.$$typeof){case _:return h1(y.render);case P:return r1(y.type,H0,N0);case M:{var T=y,l=T._payload,K0=T._init;try{return r1(K0(l),H0,N0)}catch(k0){}}}return""}var O1=Object.prototype.hasOwnProperty,w0={},Q1=g.ReactDebugCurrentFrame;function I1(y){if(y){var H0=y._owner,N0=r1(y.type,y._source,H0?H0.type:null);Q1.setExtraStackFrame(N0)}else Q1.setExtraStackFrame(null)}function i1(y,H0,N0,T,l){{var K0=Function.call.bind(O1);for(var k0 in y)if(K0(y,k0)){var m0=void 0;try{if(typeof y[k0]!=="function"){var e0=Error((T||"React class")+": "+N0+" type `"+k0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[k0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw e0.name="Invariant Violation",e0}m0=y[k0](H0,k0,T,N0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d0){m0=d0}if(m0&&!(m0 instanceof Error))I1(l),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",N0,k0,typeof m0),I1(null);if(m0 instanceof Error&&!(m0.message in w0))w0[m0.message]=!0,I1(l),C("Failed %s type: %s",N0,m0.message),I1(null)}}}var C4=Array.isArray;function $4(y){return C4(y)}function b7(y){{var H0=typeof Symbol==="function"&&Symbol.toStringTag,N0=H0&&y[Symbol.toStringTag]||y.constructor.name||"Object";return N0}}function F4(y){try{return A7(y),!1}catch(H0){return!0}}function A7(y){return""+y}function S4(y){if(F4(y))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",b7(y)),A7(y)}var y4=g.ReactCurrentOwner,L7={key:!0,ref:!0,__self:!0,__source:!0},E7,d4,e4;e4={};function V0(y){if(O1.call(y,"ref")){var H0=Object.getOwnPropertyDescriptor(y,"ref").get;if(H0&&H0.isReactWarning)return!1}return y.ref!==void 0}function $1(y){if(O1.call(y,"key")){var H0=Object.getOwnPropertyDescriptor(y,"key").get;if(H0&&H0.isReactWarning)return!1}return y.key!==void 0}function W1(y,H0){if(typeof y.ref==="string"&&y4.current&&H0&&y4.current.stateNode!==H0){var N0=Q0(y4.current.type);if(!e4[N0])C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Q0(y4.current.type),y.ref),e4[N0]=!0}}function o1(y,H0){{var N0=function(){if(!E7)E7=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H0)};N0.isReactWarning=!0,Object.defineProperty(y,"key",{get:N0,configurable:!0})}}function H4(y,H0){{var N0=function(){if(!d4)d4=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H0)};N0.isReactWarning=!0,Object.defineProperty(y,"ref",{get:N0,configurable:!0})}}var u4=function(y,H0,N0,T,l,K0,k0){var m0={$$typeof:Y,type:y,key:H0,ref:N0,props:k0,_owner:K0};if(m0._store={},Object.defineProperty(m0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(m0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze)Object.freeze(m0.props),Object.freeze(m0);return m0};function L4(y,H0,N0,T,l){{var K0,k0={},m0=null,e0=null;if(N0!==void 0)S4(N0),m0=""+N0;if($1(H0))S4(H0.key),m0=""+H0.key;if(V0(H0))e0=H0.ref,W1(H0,l);for(K0 in H0)if(O1.call(H0,K0)&&!L7.hasOwnProperty(K0))k0[K0]=H0[K0];if(y&&y.defaultProps){var d0=y.defaultProps;for(K0 in d0)if(k0[K0]===void 0)k0[K0]=d0[K0]}if(m0||e0){var _0=typeof y==="function"?y.displayName||y.name||"Unknown":y;if(m0)o1(k0,_0);if(e0)H4(k0,_0)}return u4(y,m0,e0,l,T,y4.current,k0)}}var{ReactCurrentOwner:t4,ReactDebugCurrentFrame:C1}=g;function b1(y){if(y){var H0=y._owner,N0=r1(y.type,y._source,H0?H0.type:null);C1.setExtraStackFrame(N0)}else C1.setExtraStackFrame(null)}var i7=!1;function R7(y){return typeof y==="object"&&y!==null&&y.$$typeof===Y}function o7(){{if(t4.current){var y=Q0(t4.current.type);if(y)return`
|
|
150
150
|
|
|
151
151
|
Check the render method of \``+y+"`."}return""}}function J6(y){{if(y!==void 0){var H0=y.fileName.replace(/^.*[\\\/]/,""),N0=y.lineNumber;return`
|
|
152
152
|
|
|
153
|
-
Check your code at `+H0+":"+N0+"."}return""}}var
|
|
153
|
+
Check your code at `+H0+":"+N0+"."}return""}}var x5={};function Y6(y){{var H0=o7();if(!H0){var N0=typeof y==="string"?y:y.displayName||y.name;if(N0)H0=`
|
|
154
154
|
|
|
155
|
-
Check the top-level render call using <`+N0+">."}return H0}}function
|
|
155
|
+
Check the top-level render call using <`+N0+">."}return H0}}function T5(y,H0){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var N0=Y6(H0);if(x5[N0])return;x5[N0]=!0;var T="";if(y&&y._owner&&y._owner!==t4.current)T=" It was passed a child from "+Q0(y._owner.type)+".";b1(y),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',N0,T),b1(null)}}function u7(y,H0){{if(typeof y!=="object")return;if($4(y))for(var N0=0;N0<y.length;N0++){var T=y[N0];if(R7(T))T5(T,H0)}else if(R7(y)){if(y._store)y._store.validated=!0}else if(y){var l=m(y);if(typeof l==="function"){if(l!==y.entries){var K0=l.call(y),k0;while(!(k0=K0.next()).done)if(R7(k0.value))T5(k0.value,H0)}}}}}function j5(y){{var H0=y.type;if(H0===null||H0===void 0||typeof H0==="string")return;var N0;if(typeof H0==="function")N0=H0.propTypes;else if(typeof H0==="object"&&(H0.$$typeof===_||H0.$$typeof===P))N0=H0.propTypes;else return;if(N0){var T=Q0(H0);i1(N0,y.props,"prop",T,y)}else if(H0.PropTypes!==void 0&&!i7){i7=!0;var l=Q0(H0);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}if(typeof H0.getDefaultProps==="function"&&!H0.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function x1(y){{var H0=Object.keys(y.props);for(var N0=0;N0<H0.length;N0++){var T=H0[N0];if(T!=="children"&&T!=="key"){b1(y),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),b1(null);break}}if(y.ref!==null)b1(y),C("Invalid attribute `ref` supplied to `React.Fragment`."),b1(null)}}var G4={};function N4(y,H0,N0,T,l,K0){{var k0=a(y);if(!k0){var m0="";if(y===void 0||typeof y==="object"&&y!==null&&Object.keys(y).length===0)m0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var e0=J6(l);if(e0)m0+=e0;else m0+=o7();var d0;if(y===null)d0="null";else if($4(y))d0="array";else if(y!==void 0&&y.$$typeof===Y)d0="<"+(Q0(y.type)||"Unknown")+" />",m0=" Did you accidentally export a JSX literal instead of a component?";else d0=typeof y;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d0,m0)}var _0=L4(y,H0,N0,l,K0);if(_0==null)return _0;if(k0){var h0=H0.children;if(h0!==void 0)if(T)if($4(h0)){for(var Z1=0;Z1<h0.length;Z1++)u7(h0[Z1],y);if(Object.freeze)Object.freeze(h0)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u7(h0,y)}if(O1.call(H0,"key")){var j1=Q0(y),q4=Object.keys(H0).filter(function(v4){return v4!=="key"}),a7=q4.length>0?"{key: someKey, "+q4.join(": ..., ")+": ...}":"{key: someKey}";if(!G4[j1+a7]){var O5=q4.length>0?"{"+q4.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
156
156
|
let props = %s;
|
|
157
157
|
<%s {...props} />
|
|
158
158
|
React keys must be passed directly to JSX without using spread:
|
|
159
159
|
let props = %s;
|
|
160
|
-
<%s key={someKey} {...props} />`,a7,j1,O5,j1),G4[j1+a7]=!0}}if(y===U)x1(_0);else
|
|
160
|
+
<%s key={someKey} {...props} />`,a7,j1,O5,j1),G4[j1+a7]=!0}}if(y===U)x1(_0);else j5(_0);return _0}}var t1=N4;ob.Fragment=U,ob.jsxDEV=t1})()});var I4=_z((SA)=>{var lG=B0(f1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),K=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),f=Symbol.iterator,v="@@iterator";function m(T){if(T===null||typeof T!=="object")return null;var l=f&&T[f]||T[v];if(typeof l==="function")return l;return null}var g=lG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(T){{for(var l=arguments.length,K0=Array(l>1?l-1:0),k0=1;k0<l;k0++)K0[k0-1]=arguments[k0];V("error",T,K0)}}function V(T,l,K0){{var k0=g.ReactDebugCurrentFrame,m0=k0.getStackAddendum();if(m0!=="")l+="%s",K0=K0.concat([m0]);var e0=K0.map(function(d0){return String(d0)});e0.unshift("Warning: "+l),Function.prototype.apply.call(console[T],console,e0)}}var k=!1,x=!1,j=!1,u=!1,p=!1,s;s=Symbol.for("react.module.reference");function a(T){if(typeof T==="string"||typeof T==="function")return!0;if(T===U||T===q||p||T===O||T===A||T===b||u||T===w||k||x||j)return!0;if(typeof T==="object"&&T!==null){if(T.$$typeof===M||T.$$typeof===P||T.$$typeof===R||T.$$typeof===K||T.$$typeof===_||T.$$typeof===s||T.getModuleId!==void 0)return!0}return!1}function D(T,l,K0){var k0=T.displayName;if(k0)return k0;var m0=l.displayName||l.name||"";return m0!==""?K0+"("+m0+")":K0}function z0(T){return T.displayName||"Context"}function Q0(T){if(T==null)return null;if(typeof T.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof T==="function")return T.displayName||T.name||null;if(typeof T==="string")return T;switch(T){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case A:return"Suspense";case b:return"SuspenseList"}if(typeof T==="object")switch(T.$$typeof){case K:var l=T;return z0(l)+".Consumer";case R:var K0=T;return z0(K0._context)+".Provider";case _:return D(T,T.render,"ForwardRef");case P:var k0=T.displayName||null;if(k0!==null)return k0;return Q0(T.type)||"Memo";case M:{var m0=T,e0=m0._payload,d0=m0._init;try{return Q0(d0(e0))}catch(_0){return null}}}return null}var U0=Object.assign,b0=0,e,y0,I0,i,R0,O0,q0;function o(){}o.__reactDisabledLog=!0;function T0(){{if(b0===0){e=console.log,y0=console.info,I0=console.warn,i=console.error,R0=console.group,O0=console.groupCollapsed,q0=console.groupEnd;var T={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}b0++}}function v0(){{if(b0--,b0===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U0({},T,{value:e}),info:U0({},T,{value:y0}),warn:U0({},T,{value:I0}),error:U0({},T,{value:i}),group:U0({},T,{value:R0}),groupCollapsed:U0({},T,{value:O0}),groupEnd:U0({},T,{value:q0})})}if(b0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X1=g.ReactCurrentDispatcher,r0;function f0(T,l,K0){{if(r0===void 0)try{throw Error()}catch(m0){var k0=m0.stack.trim().match(/\n( *(at )?)/);r0=k0&&k0[1]||""}return`
|
|
161
161
|
`+r0+T}}var o0=!1,J1;{var A0=typeof WeakMap==="function"?WeakMap:Map;J1=new A0}function Y1(T,l){if(!T||o0)return"";{var K0=J1.get(T);if(K0!==void 0)return K0}var k0;o0=!0;var m0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var e0;e0=X1.current,X1.current=null,T0();try{if(l){var d0=function(){throw Error()};if(Object.defineProperty(d0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(d0,[])}catch(v4){k0=v4}Reflect.construct(T,[],d0)}else{try{d0.call()}catch(v4){k0=v4}T.call(d0.prototype)}}else{try{throw Error()}catch(v4){k0=v4}T()}}catch(v4){if(v4&&k0&&typeof v4.stack==="string"){var _0=v4.stack.split(`
|
|
162
162
|
`),h0=k0.stack.split(`
|
|
163
163
|
`),Z1=_0.length-1,j1=h0.length-1;while(Z1>=1&&j1>=0&&_0[Z1]!==h0[j1])j1--;for(;Z1>=1&&j1>=0;Z1--,j1--)if(_0[Z1]!==h0[j1]){if(Z1!==1||j1!==1)do if(Z1--,j1--,j1<0||_0[Z1]!==h0[j1]){var q4=`
|
|
164
|
-
`+_0[Z1].replace(" at new "," at ");if(T.displayName&&q4.includes("<anonymous>"))q4=q4.replace("<anonymous>",T.displayName);if(typeof T==="function")J1.set(T,q4);return q4}while(Z1>=1&&j1>=0);break}}}finally{o0=!1,X1.current=e0,v0(),Error.prepareStackTrace=m0}var a7=T?T.displayName||T.name:"",O5=a7?f0(a7):"";if(typeof T==="function")J1.set(T,O5);return O5}function h1(T,l,K0){return Y1(T,!1)}function l1(T){var l=T.prototype;return!!(l&&l.isReactComponent)}function r1(T,l,K0){if(T==null)return"";if(typeof T==="function")return Y1(T,l1(T));if(typeof T==="string")return f0(T);switch(T){case A:return f0("Suspense");case b:return f0("SuspenseList")}if(typeof T==="object")switch(T.$$typeof){case _:return h1(T.render);case P:return r1(T.type,l,K0);case M:{var k0=T,m0=k0._payload,e0=k0._init;try{return r1(e0(m0),l,K0)}catch(d0){}}}return""}var O1=Object.prototype.hasOwnProperty,w0={},Q1=g.ReactDebugCurrentFrame;function I1(T){if(T){var l=T._owner,K0=r1(T.type,T._source,l?l.type:null);Q1.setExtraStackFrame(K0)}else Q1.setExtraStackFrame(null)}function i1(T,l,K0,k0,m0){{var e0=Function.call.bind(O1);for(var d0 in T)if(e0(T,d0)){var _0=void 0;try{if(typeof T[d0]!=="function"){var h0=Error((k0||"React class")+": "+K0+" type `"+d0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[d0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h0.name="Invariant Violation",h0}_0=T[d0](l,d0,k0,K0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z1){_0=Z1}if(_0&&!(_0 instanceof Error))I1(m0),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",k0||"React class",K0,d0,typeof _0),I1(null);if(_0 instanceof Error&&!(_0.message in w0))w0[_0.message]=!0,I1(m0),C("Failed %s type: %s",K0,_0.message),I1(null)}}}var C4=Array.isArray;function $4(T){return C4(T)}function b7(T){{var l=typeof Symbol==="function"&&Symbol.toStringTag,K0=l&&T[Symbol.toStringTag]||T.constructor.name||"Object";return K0}}function F4(T){try{return A7(T),!1}catch(l){return!0}}function A7(T){return""+T}function S4(T){if(F4(T))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",b7(T)),A7(T)}var
|
|
164
|
+
`+_0[Z1].replace(" at new "," at ");if(T.displayName&&q4.includes("<anonymous>"))q4=q4.replace("<anonymous>",T.displayName);if(typeof T==="function")J1.set(T,q4);return q4}while(Z1>=1&&j1>=0);break}}}finally{o0=!1,X1.current=e0,v0(),Error.prepareStackTrace=m0}var a7=T?T.displayName||T.name:"",O5=a7?f0(a7):"";if(typeof T==="function")J1.set(T,O5);return O5}function h1(T,l,K0){return Y1(T,!1)}function l1(T){var l=T.prototype;return!!(l&&l.isReactComponent)}function r1(T,l,K0){if(T==null)return"";if(typeof T==="function")return Y1(T,l1(T));if(typeof T==="string")return f0(T);switch(T){case A:return f0("Suspense");case b:return f0("SuspenseList")}if(typeof T==="object")switch(T.$$typeof){case _:return h1(T.render);case P:return r1(T.type,l,K0);case M:{var k0=T,m0=k0._payload,e0=k0._init;try{return r1(e0(m0),l,K0)}catch(d0){}}}return""}var O1=Object.prototype.hasOwnProperty,w0={},Q1=g.ReactDebugCurrentFrame;function I1(T){if(T){var l=T._owner,K0=r1(T.type,T._source,l?l.type:null);Q1.setExtraStackFrame(K0)}else Q1.setExtraStackFrame(null)}function i1(T,l,K0,k0,m0){{var e0=Function.call.bind(O1);for(var d0 in T)if(e0(T,d0)){var _0=void 0;try{if(typeof T[d0]!=="function"){var h0=Error((k0||"React class")+": "+K0+" type `"+d0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[d0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h0.name="Invariant Violation",h0}_0=T[d0](l,d0,k0,K0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z1){_0=Z1}if(_0&&!(_0 instanceof Error))I1(m0),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",k0||"React class",K0,d0,typeof _0),I1(null);if(_0 instanceof Error&&!(_0.message in w0))w0[_0.message]=!0,I1(m0),C("Failed %s type: %s",K0,_0.message),I1(null)}}}var C4=Array.isArray;function $4(T){return C4(T)}function b7(T){{var l=typeof Symbol==="function"&&Symbol.toStringTag,K0=l&&T[Symbol.toStringTag]||T.constructor.name||"Object";return K0}}function F4(T){try{return A7(T),!1}catch(l){return!0}}function A7(T){return""+T}function S4(T){if(F4(T))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",b7(T)),A7(T)}var y4=g.ReactCurrentOwner,L7={key:!0,ref:!0,__self:!0,__source:!0},E7,d4,e4;e4={};function V0(T){if(O1.call(T,"ref")){var l=Object.getOwnPropertyDescriptor(T,"ref").get;if(l&&l.isReactWarning)return!1}return T.ref!==void 0}function $1(T){if(O1.call(T,"key")){var l=Object.getOwnPropertyDescriptor(T,"key").get;if(l&&l.isReactWarning)return!1}return T.key!==void 0}function W1(T,l){if(typeof T.ref==="string"&&y4.current&&l&&y4.current.stateNode!==l){var K0=Q0(y4.current.type);if(!e4[K0])C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Q0(y4.current.type),T.ref),e4[K0]=!0}}function o1(T,l){{var K0=function(){if(!E7)E7=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l)};K0.isReactWarning=!0,Object.defineProperty(T,"key",{get:K0,configurable:!0})}}function H4(T,l){{var K0=function(){if(!d4)d4=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l)};K0.isReactWarning=!0,Object.defineProperty(T,"ref",{get:K0,configurable:!0})}}var u4=function(T,l,K0,k0,m0,e0,d0){var _0={$$typeof:Y,type:T,key:l,ref:K0,props:d0,_owner:e0};if(_0._store={},Object.defineProperty(_0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k0}),Object.defineProperty(_0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m0}),Object.freeze)Object.freeze(_0.props),Object.freeze(_0);return _0};function L4(T,l,K0,k0,m0){{var e0,d0={},_0=null,h0=null;if(K0!==void 0)S4(K0),_0=""+K0;if($1(l))S4(l.key),_0=""+l.key;if(V0(l))h0=l.ref,W1(l,m0);for(e0 in l)if(O1.call(l,e0)&&!L7.hasOwnProperty(e0))d0[e0]=l[e0];if(T&&T.defaultProps){var Z1=T.defaultProps;for(e0 in Z1)if(d0[e0]===void 0)d0[e0]=Z1[e0]}if(_0||h0){var j1=typeof T==="function"?T.displayName||T.name||"Unknown":T;if(_0)o1(d0,j1);if(h0)H4(d0,j1)}return u4(T,_0,h0,m0,k0,y4.current,d0)}}var{ReactCurrentOwner:t4,ReactDebugCurrentFrame:C1}=g;function b1(T){if(T){var l=T._owner,K0=r1(T.type,T._source,l?l.type:null);C1.setExtraStackFrame(K0)}else C1.setExtraStackFrame(null)}var i7=!1;function R7(T){return typeof T==="object"&&T!==null&&T.$$typeof===Y}function o7(){{if(t4.current){var T=Q0(t4.current.type);if(T)return`
|
|
165
165
|
|
|
166
166
|
Check the render method of \``+T+"`."}return""}}function J6(T){{if(T!==void 0){var l=T.fileName.replace(/^.*[\\\/]/,""),K0=T.lineNumber;return`
|
|
167
167
|
|
|
168
|
-
Check your code at `+l+":"+K0+"."}return""}}var
|
|
168
|
+
Check your code at `+l+":"+K0+"."}return""}}var x5={};function Y6(T){{var l=o7();if(!l){var K0=typeof T==="string"?T:T.displayName||T.name;if(K0)l=`
|
|
169
169
|
|
|
170
|
-
Check the top-level render call using <`+K0+">."}return l}}function
|
|
170
|
+
Check the top-level render call using <`+K0+">."}return l}}function T5(T,l){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var K0=Y6(l);if(x5[K0])return;x5[K0]=!0;var k0="";if(T&&T._owner&&T._owner!==t4.current)k0=" It was passed a child from "+Q0(T._owner.type)+".";b1(T),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K0,k0),b1(null)}}function u7(T,l){{if(typeof T!=="object")return;if($4(T))for(var K0=0;K0<T.length;K0++){var k0=T[K0];if(R7(k0))T5(k0,l)}else if(R7(T)){if(T._store)T._store.validated=!0}else if(T){var m0=m(T);if(typeof m0==="function"){if(m0!==T.entries){var e0=m0.call(T),d0;while(!(d0=e0.next()).done)if(R7(d0.value))T5(d0.value,l)}}}}}function j5(T){{var l=T.type;if(l===null||l===void 0||typeof l==="string")return;var K0;if(typeof l==="function")K0=l.propTypes;else if(typeof l==="object"&&(l.$$typeof===_||l.$$typeof===P))K0=l.propTypes;else return;if(K0){var k0=Q0(l);i1(K0,T.props,"prop",k0,T)}else if(l.PropTypes!==void 0&&!i7){i7=!0;var m0=Q0(l);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m0||"Unknown")}if(typeof l.getDefaultProps==="function"&&!l.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function x1(T){{var l=Object.keys(T.props);for(var K0=0;K0<l.length;K0++){var k0=l[K0];if(k0!=="children"&&k0!=="key"){b1(T),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k0),b1(null);break}}if(T.ref!==null)b1(T),C("Invalid attribute `ref` supplied to `React.Fragment`."),b1(null)}}var G4={};function N4(T,l,K0,k0,m0,e0){{var d0=a(T);if(!d0){var _0="";if(T===void 0||typeof T==="object"&&T!==null&&Object.keys(T).length===0)_0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var h0=J6(m0);if(h0)_0+=h0;else _0+=o7();var Z1;if(T===null)Z1="null";else if($4(T))Z1="array";else if(T!==void 0&&T.$$typeof===Y)Z1="<"+(Q0(T.type)||"Unknown")+" />",_0=" Did you accidentally export a JSX literal instead of a component?";else Z1=typeof T;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Z1,_0)}var j1=L4(T,l,K0,m0,e0);if(j1==null)return j1;if(d0){var q4=l.children;if(q4!==void 0)if(k0)if($4(q4)){for(var a7=0;a7<q4.length;a7++)u7(q4[a7],T);if(Object.freeze)Object.freeze(q4)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u7(q4,T)}if(O1.call(l,"key")){var O5=Q0(T),v4=Object.keys(l).filter(function($6){return $6!=="key"}),y1=v4.length>0?"{key: someKey, "+v4.join(": ..., ")+": ...}":"{key: someKey}";if(!G4[O5+y1]){var b6=v4.length>0?"{"+v4.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
171
171
|
let props = %s;
|
|
172
172
|
<%s {...props} />
|
|
173
173
|
React keys must be passed directly to JSX without using spread:
|
|
174
174
|
let props = %s;
|
|
175
|
-
<%s key={someKey} {...props} />`,y1,O5,b6,O5),G4[O5+y1]=!0}}if(T===U)x1(j1);else x5(j1);return j1}}function t1(T,l,K0){return N4(T,l,K0,!0)}function y(T,l,K0){return N4(T,l,K0,!1)}var H0=y,N0=t1;SA.Fragment=U,SA.jsx=H0,SA.jsxs=N0})()});var u5=B0(f1(),1),RO=B0(PK(),1);var hG={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1,builtinTools:{webSearch:!1,webFetch:!1}};function Rz(Y,G){let U=Y.agents;if(typeof U==="boolean")return{enabled:U,mode:"worker",group:G||void 0};return{...U,group:U.group||G||void 0}}var a4=B0(f1(),1),IK=B0(U1(),1),bK=a4.createContext(null),ab=200;function VG({children:Y}){let[G,U]=a4.useState(!1),[O,q]=a4.useState([]),[R,K]=a4.useState({}),[_,A]=a4.useState({}),[b,P]=a4.useState(0),M=a4.useRef(null),w=a4.useRef(null);a4.useEffect(()=>{let m=setInterval(()=>{let g=Date.now();A((C)=>{let V={};for(let[k,x]of Object.entries(C))if(x.expiresAt>g)V[k]=x;return V})},500);return()=>clearInterval(m)},[]);let f=a4.useCallback(()=>{if(M.current)M.current.close(),M.current=null;try{let m=new EventSource("/api/telemetry/stream");M.current=m,m.onopen=()=>{U(!0)},m.onmessage=(g)=>{if(!g.data||g.data.trim()==="")return;try{let C=JSON.parse(g.data);if(C.connected){U(!0);return}if(Array.isArray(C)){if(q((V)=>{return[...C,...V].slice(0,ab)}),K((V)=>{let k={...V};for(let x of C){let j=k[x.agent_id];if(!j||new Date(x.timestamp)>new Date(j.timestamp))k[x.agent_id]={timestamp:x.timestamp,category:x.category,type:x.type}}return k}),A((V)=>{let k={...V},x=Date.now()+3000;for(let j of C)k[j.agent_id]={type:j.type,expiresAt:x};return k}),C.some((V)=>V.category==="system"&&(V.type==="agent_started"||V.type==="agent_stopped")))P((V)=>V+1)}}catch{}},m.onerror=()=>{if(U(!1),m.close(),M.current=null,w.current)clearTimeout(w.current);w.current=setTimeout(f,2000)}}catch{if(U(!1),w.current)clearTimeout(w.current);w.current=setTimeout(f,2000)}},[]);a4.useEffect(()=>{return f(),()=>{if(M.current)M.current.close();if(w.current)clearTimeout(w.current)}},[f]);let v=a4.useCallback(()=>{q([])},[]);return IK.jsxDEV(bK.Provider,{value:{connected:G,events:O,lastActivityByAgent:R,activeAgents:_,statusChangeCounter:b,clearEvents:v},children:Y},void 0,!1,void 0,this)}function F6(){let Y=a4.useContext(bK);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function DG(Y){let{connected:G,events:U,lastActivityByAgent:O}=F6(),q=a4.default.useMemo(()=>{let _=U;if(Y?.agent_id)_=_.filter((A)=>A.agent_id===Y.agent_id);if(Y?.category)_=_.filter((A)=>A.category===Y.category);if(Y?.limit)_=_.slice(0,Y.limit);return _},[U,Y?.agent_id,Y?.category,Y?.limit]),R=Y?.agent_id?O[Y.agent_id]:void 0,K=a4.default.useMemo(()=>{if(!R)return!1;let _=new Date(R.timestamp).getTime();return Date.now()-_<1e4},[R]);return{connected:G,events:q,lastActivity:R,isActive:K}}function vZ(Y){let{activeAgents:G}=F6(),U=G[Y];return{isActive:!!U,type:U?.type}}function AK(){let{statusChangeCounter:Y}=F6();return Y}var D4=B0(f1(),1),kK=B0(U1(),1),TK=D4.createContext(null);function T1(){let Y=D4.useContext(TK);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function mG({children:Y}){let[G,U]=D4.useState(null),[O,q]=D4.useState(null),[R,K]=D4.useState(!0),[_,A]=D4.useState(null),[b,P]=D4.useState(!1),M=D4.useRef(null),w=D4.useRef(!1),f=D4.useRef(!1),v=D4.useCallback((u)=>{M.current=u,q(u)},[]),m=D4.useCallback(async()=>{if(w.current)return!1;w.current=!0;try{let u=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!u.ok)return!1;let p=await u.json();v(p.accessToken);let s=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${p.accessToken}`}});if(s.ok){let a=await s.json();return U(a.user),!0}return!1}catch(u){return console.error("Token refresh failed:",u),!1}finally{w.current=!1}},[v]),g=D4.useCallback(async()=>{try{let u=M.current,s=await(await fetch("/api/auth/check",{headers:u?{Authorization:`Bearer ${u}`}:{}})).json();if(A(s.hasUsers),P(s.isDev??!1),s.authenticated&&s.user)U(s.user);else if(U(null),s.hasUsers){if(!await m())v(null)}}catch(u){console.error("Auth check failed:",u),U(null),v(null)}finally{K(!1)}},[m,v]),C=D4.useCallback(async(u,p)=>{try{let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:u,password:p})}),a=await s.json();if(!s.ok)return{success:!1,error:a.error||"Login failed"};return v(a.accessToken),U(a.user),A(!0),{success:!0}}catch(s){return console.error("Login failed:",s),{success:!1,error:"Login failed"}}},[v]),V=D4.useCallback(async()=>{try{let u=M.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:u?{Authorization:`Bearer ${u}`}:{}})}catch(u){console.error("Logout failed:",u)}finally{U(null),v(null)}},[v]),k=D4.useCallback(async(u,p={})=>{let s=new Headers(p.headers),a=M.current;if(a)s.set("Authorization",`Bearer ${a}`);return fetch(u,{...p,headers:s})},[]),x=D4.useCallback(async()=>{return m()},[m]);D4.useEffect(()=>{if(f.current)return;f.current=!0,g()},[g]),D4.useEffect(()=>{if(!O)return;let u=setInterval(()=>{m()},840000);return()=>clearInterval(u)},[O,m]);let j={user:G,isAuthenticated:!!G,isLoading:R,hasUsers:_,isDev:b,accessToken:O,login:C,logout:V,refreshToken:x,checkAuth:g,authFetch:k};return kK.jsxDEV(TK.Provider,{value:j,children:Y},void 0,!1,void 0,this)}var Z7=B0(f1(),1);var SK=B0(U1(),1),CK=Z7.createContext(null);function u4(){let Y=Z7.useContext(CK);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var EG="apteva_current_project";function uG({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=T1(),[q,R]=Z7.useState([]),[K,_]=Z7.useState(()=>{if(typeof window<"u")return localStorage.getItem(EG);return null}),[A,b]=Z7.useState(!0),[P,M]=Z7.useState(null),[w,f]=Z7.useState(0),[v,m]=Z7.useState(!1);Z7.useEffect(()=>{fetch("/api/features").then((p)=>p.json()).then((p)=>{m(p.projects===!0)}).catch(()=>{m(!1)})},[]);let g=Z7.useCallback((p)=>{if(_(p),typeof window<"u")if(p===null)localStorage.removeItem(EG);else localStorage.setItem(EG,p)},[]),C=q.find((p)=>p.id===K)||null,V=Z7.useCallback(async()=>{if(!v){R([]),b(!1);return}if(!U&&!O){R([]),b(!1);return}try{M(null);let p=await G("/api/projects");if(!p.ok)throw Error("Failed to fetch projects");let s=await p.json();if(R(s.projects||[]),f(s.unassignedCount||0),K&&K!=="unassigned"&&!s.projects.find((a)=>a.id===K))g(null)}catch(p){console.error("Failed to fetch projects:",p),M("Failed to load projects")}finally{b(!1)}},[G,U,O,K,g,v]),k=Z7.useCallback(async(p)=>{try{let s=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(!s.ok){let D=await s.json();throw Error(D.error||"Failed to create project")}let a=await s.json();return await V(),a.project}catch(s){return console.error("Failed to create project:",s),null}},[G,V]),x=Z7.useCallback(async(p,s)=>{try{let a=await G(`/api/projects/${p}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){let z0=await a.json();throw Error(z0.error||"Failed to update project")}let D=await a.json();return await V(),D.project}catch(a){return console.error("Failed to update project:",a),null}},[G,V]),j=Z7.useCallback(async(p)=>{try{let s=await G(`/api/projects/${p}`,{method:"DELETE"});if(!s.ok){let a=await s.json();throw Error(a.error||"Failed to delete project")}if(K===p)g(null);return await V(),!0}catch(s){return console.error("Failed to delete project:",s),!1}},[G,K,g,V]);Z7.useEffect(()=>{if(!O&&v)V()},[O,v,V]);let u={projects:q,currentProjectId:K,currentProject:C,isLoading:A,error:P,unassignedCount:w,projectsEnabled:v,setCurrentProjectId:g,createProject:k,updateProject:x,deleteProject:j,refreshProjects:V};return SK.jsxDEV(CK.Provider,{value:u,children:Y},void 0,!1,void 0,this)}var a6=B0(f1(),1);function gG(Y){let{accessToken:G}=T1(),[U,O]=a6.useState([]),[q,R]=a6.useState(!0),K=a6.useCallback(()=>{let v={"Content-Type":"application/json"};if(G)v.Authorization=`Bearer ${G}`;return v},[G]),_=a6.useCallback(async()=>{let m=await(await fetch("/api/agents",{headers:K()})).json();O(m.agents||[]),R(!1)},[K]),A=AK();a6.useEffect(()=>{if(Y&&A>0)_()},[Y,A,_]),a6.useEffect(()=>{if(Y)_()},[Y,_]);let b=async(v)=>{await fetch("/api/agents",{method:"POST",headers:K(),body:JSON.stringify(v)}),await _()},P=async(v)=>{await fetch(`/api/agents/${v}`,{method:"DELETE",headers:K()}),await _()},M=async(v,m)=>{let g=await fetch(`/api/agents/${v}`,{method:"PUT",headers:K(),body:JSON.stringify(m)}),C=await g.json();if(await _(),!g.ok&&C.error)return{error:C.error};return{}},w=async(v)=>{let m=v.status==="running"?"stop":"start",g=await fetch(`/api/agents/${v.id}/${m}`,{method:"POST",headers:K()}),C=await g.json();if(await _(),!g.ok&&C.error)return{error:C.error};return{}},f=U.filter((v)=>v.status==="running").length;return{agents:U,loading:q,runningCount:f,fetchAgents:_,createAgent:b,updateAgent:M,deleteAgent:P,toggleAgent:w}}var Nz=B0(f1(),1);function xG(Y){let{accessToken:G}=T1(),[U,O]=Nz.useState([]),q=Nz.useCallback(()=>{let b={"Content-Type":"application/json"};if(G)b.Authorization=`Bearer ${G}`;return b},[G]),R=Nz.useCallback(async()=>{let P=await(await fetch("/api/providers",{headers:q()})).json();O(P.providers||[])},[q]);Nz.useEffect(()=>{if(Y)R()},[Y,R]);let K=U.filter((b)=>b.hasKey);return{providers:U,configuredProviders:K,fetchProviders:R,saveKey:async(b,P)=>{let w=await(await fetch(`/api/keys/${b}/test`,{method:"POST",headers:q(),body:JSON.stringify({key:P})})).json();if(!w.valid)return{success:!1,error:w.error||"API key is invalid"};let f=await fetch(`/api/keys/${b}`,{method:"POST",headers:q(),body:JSON.stringify({key:P})});if(!f.ok)return{success:!1,error:(await f.json()).error||"Failed to save key"};return await R(),{success:!0}},deleteKey:async(b)=>{await fetch(`/api/keys/${b}`,{method:"DELETE",headers:q()}),await R()}}}var Mz=B0(f1(),1);function jG(){let{accessToken:Y,isAuthenticated:G}=T1(),[U,O]=Mz.useState(null),q=Mz.useCallback(()=>{let K={};if(Y)K.Authorization=`Bearer ${Y}`;return K},[Y]);Mz.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:q()}).then((K)=>K.json()).then((K)=>{O(K.completed||K.has_any_keys)}).catch(()=>O(!0))},[G,q]);let R=Mz.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:q()}),O(!0)},[q]);return{isComplete:U,setIsComplete:O,complete:R}}var S8=B0(U1(),1);function wz({message:Y="Loading...",fullScreen:G=!1}){let U=S8.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[S8.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[S8.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),S8.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S8.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return S8.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:U},void 0,!1,void 0,this);return S8.jsxDEV("div",{className:"flex items-center justify-center py-20",children:U},void 0,!1,void 0,this)}var n6=B0(f1(),1),O7=B0(U1(),1);function kQ({children:Y,onClose:G}){return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl lg:max-w-2xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function nb({title:Y,message:G,confirmText:U="Confirm",cancelText:O="Cancel",confirmVariant:q="danger",onConfirm:R,onCancel:K}){return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[Y&&O7.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),O7.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),O7.jsxDEV("div",{className:"flex gap-2",children:[O7.jsxDEV("button",{onClick:K,className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:O},void 0,!1,void 0,this),O7.jsxDEV("button",{onClick:R,className:`flex-1 text-sm text-white px-4 py-2 rounded transition ${q==="danger"?"bg-red-500 hover:bg-red-600":"bg-[#f97316] hover:bg-[#ea580c]"}`,children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function rb({title:Y,message:G,buttonText:U="OK",variant:O="info",onClose:q}){let R={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},K={error:"✕",success:"✓",info:"ℹ"};return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[O7.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${R[O]}`,children:O7.jsxDEV("span",{className:"text-xl",children:K[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&O7.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),O7.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),O7.jsxDEV("button",{onClick:q,className:"w-full text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function A5(){let[Y,G]=n6.useState(null),U=n6.useCallback((K,_={})=>{return new Promise((A)=>{G({message:K,options:_,resolve:A})})},[]),O=n6.useCallback(()=>{Y?.resolve(!0),G(null)},[Y]),q=n6.useCallback(()=>{Y?.resolve(!1),G(null)},[Y]),R=Y?O7.jsxDEV(nb,{title:Y.options.title,message:Y.message,confirmText:Y.options.confirmText,cancelText:Y.options.cancelText,confirmVariant:Y.options.confirmVariant,onConfirm:O,onCancel:q},void 0,!1,void 0,this):null;return{confirm:U,ConfirmDialog:R}}function fZ(){let[Y,G]=n6.useState(null),U=n6.useCallback((R,K={})=>{return new Promise((_)=>{G({message:R,options:K,resolve:_})})},[]),O=n6.useCallback(()=>{Y?.resolve(),G(null)},[Y]),q=Y?O7.jsxDEV(rb,{title:Y.options.title,message:Y.message,buttonText:Y.options.buttonText,variant:Y.options.variant,onClose:O},void 0,!1,void 0,this):null;return{alert:U,AlertDialog:q}}var CQ=B0(f1(),1),D7=B0(U1(),1);function J7({value:Y,options:G,onChange:U,placeholder:O="Select..."}){let[q,R]=CQ.useState(!1),K=CQ.useRef(null),_=G.find((A)=>A.value===Y);return CQ.useEffect(()=>{function A(b){if(K.current&&!K.current.contains(b.target))R(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),D7.jsxDEV("div",{ref:K,className:"relative",children:[D7.jsxDEV("button",{type:"button",onClick:()=>R(!q),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-left flex items-center justify-between focus:outline-none focus:border-[#f97316] text-[#e0e0e0] hover:border-[#333] transition",children:[D7.jsxDEV("span",{className:_?"text-[#e0e0e0]":"text-[#666]",children:_?D7.jsxDEV(D7.Fragment,{children:[_.label,_.recommended&&D7.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):O},void 0,!1,void 0,this),D7.jsxDEV(tb,{isOpen:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&D7.jsxDEV("div",{className:"absolute z-50 w-full min-w-max mt-1 bg-[#111] border border-[#222] rounded shadow-lg max-h-60 overflow-y-auto scrollbar-hide",children:G.map((A)=>D7.jsxDEV("button",{type:"button",onClick:()=>{U(A.value),R(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${A.value===Y?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[D7.jsxDEV("span",{children:[A.label,A.recommended&&D7.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A.value===Y&&D7.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D7.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},A.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function tb({isOpen:Y}){return D7.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D7.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var D1=B0(U1(),1);function X5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function V5({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Y3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function $3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function H3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},void 0,!1,void 0,this),D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Fz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function D5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Pz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this),D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function bz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function m5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function hZ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Az({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function pG({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function vK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function SQ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function vQ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function fK({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function hK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function yK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Q2=B0(f1(),1);var Z6=B0(f1(),1);var Y4=B0(f1(),1),VQ=B0(f1(),1),Tz=B0(f1(),1);function VK(Y){var G,U,O="";if(typeof Y=="string"||typeof Y=="number")O+=Y;else if(typeof Y=="object")if(Array.isArray(Y)){var q=Y.length;for(G=0;G<q;G++)Y[G]&&(U=VK(Y[G]))&&(O&&(O+=" "),O+=U)}else for(U in Y)Y[U]&&(O&&(O+=" "),O+=U);return O}function DK(){for(var Y,G,U=0,O="",q=arguments.length;U<q;U++)(Y=arguments[U])&&(G=VK(Y))&&(O&&(O+=" "),O+=G);return O}var sb=(Y)=>{let G=zA(Y),{conflictingClassGroups:U,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(K)=>{let _=K.split("-");if(_[0]===""&&_.length!==1)_.shift();return uK(_,G)||eb(K)},getConflictingClassGroupIds:(K,_)=>{let A=U[K]||[];if(_&&O[K])return[...A,...O[K]];return A}}},uK=(Y,G)=>{if(Y.length===0)return G.classGroupId;let U=Y[0],O=G.nextPart.get(U),q=O?uK(Y.slice(1),O):void 0;if(q)return q;if(G.validators.length===0)return;let R=Y.join("-");return G.validators.find(({validator:K})=>K(R))?.classGroupId},mK=/^\[(.+)\]$/,eb=(Y)=>{if(mK.test(Y)){let G=mK.exec(Y)[1],U=G?.substring(0,G.indexOf(":"));if(U)return"arbitrary.."+U}},zA=(Y)=>{let{theme:G,prefix:U}=Y,O={nextPart:new Map,validators:[]};return XA(Object.entries(Y.classGroups),U).forEach(([R,K])=>{dG(K,O,R,G)}),O},dG=(Y,G,U,O)=>{Y.forEach((q)=>{if(typeof q==="string"){let R=q===""?G:EK(G,q);R.classGroupId=U;return}if(typeof q==="function"){if(QA(q)){dG(q(O),G,U,O);return}G.validators.push({validator:q,classGroupId:U});return}Object.entries(q).forEach(([R,K])=>{dG(K,EK(G,R),U,O)})})},EK=(Y,G)=>{let U=Y;return G.split("-").forEach((O)=>{if(!U.nextPart.has(O))U.nextPart.set(O,{nextPart:new Map,validators:[]});U=U.nextPart.get(O)}),U},QA=(Y)=>Y.isThemeGetter,XA=(Y,G)=>{if(!G)return Y;return Y.map(([U,O])=>{let q=O.map((R)=>{if(typeof R==="string")return G+R;if(typeof R==="object")return Object.fromEntries(Object.entries(R).map(([K,_])=>[G+K,_]));return R});return[U,q]})},ZA=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,U=new Map,O=new Map,q=(R,K)=>{if(U.set(R,K),G++,G>Y)G=0,O=U,U=new Map};return{get(R){let K=U.get(R);if(K!==void 0)return K;if((K=O.get(R))!==void 0)return q(R,K),K},set(R,K){if(U.has(R))U.set(R,K);else q(R,K)}}};var JA=(Y)=>{let{separator:G,experimentalParseClassName:U}=Y,O=G.length===1,q=G[0],R=G.length,K=(_)=>{let A=[],b=0,P=0,M;for(let g=0;g<_.length;g++){let C=_[g];if(b===0){if(C===q&&(O||_.slice(g,g+R)===G)){A.push(_.slice(P,g)),P=g+R;continue}if(C==="/"){M=g;continue}}if(C==="[")b++;else if(C==="]")b--}let w=A.length===0?_:_.substring(P),f=w.startsWith("!"),v=f?w.substring(1):w,m=M&&M>P?M-P:void 0;return{modifiers:A,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:m}};if(U)return(_)=>U({className:_,parseClassName:K});return K},YA=(Y)=>{if(Y.length<=1)return Y;let G=[],U=[];return Y.forEach((O)=>{if(O[0]==="[")G.push(...U.sort(),O),U=[];else U.push(O)}),G.push(...U.sort()),G},$A=(Y)=>({cache:ZA(Y.cacheSize),parseClassName:JA(Y),...sb(Y)}),HA=/\s+/,GA=(Y,G)=>{let{parseClassName:U,getClassGroupId:O,getConflictingClassGroupIds:q}=G,R=[],K=Y.trim().split(HA),_="";for(let A=K.length-1;A>=0;A-=1){let b=K[A],{modifiers:P,hasImportantModifier:M,baseClassName:w,maybePostfixModifierPosition:f}=U(b),v=Boolean(f),m=O(v?w.substring(0,f):w);if(!m){if(!v){_=b+(_.length>0?" "+_:_);continue}if(m=O(w),!m){_=b+(_.length>0?" "+_:_);continue}v=!1}let g=YA(P).join(":"),C=M?g+"!":g,V=C+m;if(R.includes(V))continue;R.push(V);let k=q(m,v);for(let x=0;x<k.length;++x){let j=k[x];R.push(C+j)}_=b+(_.length>0?" "+_:_)}return _};function qA(){let Y=0,G,U,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(U=gK(G))O&&(O+=" "),O+=U}return O}var gK=(Y)=>{if(typeof Y==="string")return Y;let G,U="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=gK(Y[O]))U&&(U+=" "),U+=G}return U};function BA(Y,...G){let U,O,q,R=K;function K(A){let b=G.reduce((P,M)=>M(P),Y());return U=$A(b),O=U.cache.get,q=U.cache.set,R=_,_(A)}function _(A){let b=O(A);if(b)return b;let P=GA(A,U);return q(A,P),P}return function(){return R(qA.apply(null,arguments))}}var m4=(Y)=>{let G=(U)=>U[Y]||[];return G.isThemeGetter=!0,G},xK=/^\[(?:([a-z-]+):)?(.+)\]$/i,UA=/^\d+\/\d+$/,WA=new Set(["px","full","screen"]),KA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OA=/\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$/,_A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,r6=(Y)=>fQ(Y)||WA.has(Y)||UA.test(Y),v8=(Y)=>hQ(Y,"length",IA),fQ=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),cG=(Y)=>hQ(Y,"number",fQ),yZ=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),NA=(Y)=>Y.endsWith("%")&&fQ(Y.slice(0,-1)),m1=(Y)=>xK.test(Y),f8=(Y)=>KA.test(Y),MA=new Set(["length","size","percentage"]),wA=(Y)=>hQ(Y,MA,jK),FA=(Y)=>hQ(Y,"position",jK),PA=new Set(["image","url"]),bA=(Y)=>hQ(Y,PA,kA),AA=(Y)=>hQ(Y,"",TA),VZ=()=>!0,hQ=(Y,G,U)=>{let O=xK.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return U(O[2])}return!1},IA=(Y)=>OA.test(Y)&&!_A.test(Y),jK=()=>!1,TA=(Y)=>LA.test(Y),kA=(Y)=>RA.test(Y);var CA=()=>{let Y=m4("colors"),G=m4("spacing"),U=m4("blur"),O=m4("brightness"),q=m4("borderColor"),R=m4("borderRadius"),K=m4("borderSpacing"),_=m4("borderWidth"),A=m4("contrast"),b=m4("grayscale"),P=m4("hueRotate"),M=m4("invert"),w=m4("gap"),f=m4("gradientColorStops"),v=m4("gradientColorStopPositions"),m=m4("inset"),g=m4("margin"),C=m4("opacity"),V=m4("padding"),k=m4("saturate"),x=m4("scale"),j=m4("sepia"),u=m4("skew"),p=m4("space"),s=m4("translate"),a=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],z0=()=>["auto",m1,G],Q0=()=>[m1,G],U0=()=>["",r6,v8],b0=()=>["auto",fQ,m1],e=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],y0=()=>["solid","dashed","dotted","double","none"],I0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],i=()=>["start","end","center","between","around","evenly","stretch"],R0=()=>["","0",m1],O0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q0=()=>[fQ,m1];return{cacheSize:500,separator:":",theme:{colors:[VZ],spacing:[r6,v8],blur:["none","",f8,m1],brightness:q0(),borderColor:[Y],borderRadius:["none","","full",f8,m1],borderSpacing:Q0(),borderWidth:U0(),contrast:q0(),grayscale:R0(),hueRotate:q0(),invert:R0(),gap:Q0(),gradientColorStops:[Y],gradientColorStopPositions:[NA,v8],inset:z0(),margin:z0(),opacity:q0(),padding:Q0(),saturate:q0(),scale:q0(),sepia:R0(),skew:q0(),space:Q0(),translate:Q0()},classGroups:{aspect:[{aspect:["auto","square","video",m1]}],container:["container"],columns:[{columns:[f8]}],"break-after":[{"break-after":O0()}],"break-before":[{"break-before":O0()}],"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:[...e(),m1]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:a()}],"overscroll-x":[{"overscroll-x":a()}],"overscroll-y":[{"overscroll-y":a()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yZ,m1]}],basis:[{basis:z0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m1]}],grow:[{grow:R0()}],shrink:[{shrink:R0()}],order:[{order:["first","last","none",yZ,m1]}],"grid-cols":[{"grid-cols":[VZ]}],"col-start-end":[{col:["auto",{span:["full",yZ,m1]},m1]}],"col-start":[{"col-start":b0()}],"col-end":[{"col-end":b0()}],"grid-rows":[{"grid-rows":[VZ]}],"row-start-end":[{row:["auto",{span:[yZ,m1]},m1]}],"row-start":[{"row-start":b0()}],"row-end":[{"row-end":b0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m1]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...i()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...i(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...i(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[V]}],px:[{px:[V]}],py:[{py:[V]}],ps:[{ps:[V]}],pe:[{pe:[V]}],pt:[{pt:[V]}],pr:[{pr:[V]}],pb:[{pb:[V]}],pl:[{pl:[V]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[p]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[p]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m1,G]}],"min-w":[{"min-w":[m1,G,"min","max","fit"]}],"max-w":[{"max-w":[m1,G,"none","full","min","max","fit","prose",{screen:[f8]},f8]}],h:[{h:[m1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",f8,v8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",cG]}],"font-family":[{font:[VZ]}],"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",m1]}],"line-clamp":[{"line-clamp":["none",fQ,cG]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",r6,m1]}],"list-image":[{"list-image":["none",m1]}],"list-style-type":[{list:["none","disc","decimal",m1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Y]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Y]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...y0(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",r6,v8]}],"underline-offset":[{"underline-offset":["auto",r6,m1]}],"text-decoration-color":[{decoration:[Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m1]}],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",m1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...e(),FA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bA]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[R]}],"rounded-s":[{"rounded-s":[R]}],"rounded-e":[{"rounded-e":[R]}],"rounded-t":[{"rounded-t":[R]}],"rounded-r":[{"rounded-r":[R]}],"rounded-b":[{"rounded-b":[R]}],"rounded-l":[{"rounded-l":[R]}],"rounded-ss":[{"rounded-ss":[R]}],"rounded-se":[{"rounded-se":[R]}],"rounded-ee":[{"rounded-ee":[R]}],"rounded-es":[{"rounded-es":[R]}],"rounded-tl":[{"rounded-tl":[R]}],"rounded-tr":[{"rounded-tr":[R]}],"rounded-br":[{"rounded-br":[R]}],"rounded-bl":[{"rounded-bl":[R]}],"border-w":[{border:[_]}],"border-w-x":[{"border-x":[_]}],"border-w-y":[{"border-y":[_]}],"border-w-s":[{"border-s":[_]}],"border-w-e":[{"border-e":[_]}],"border-w-t":[{"border-t":[_]}],"border-w-r":[{"border-r":[_]}],"border-w-b":[{"border-b":[_]}],"border-w-l":[{"border-l":[_]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...y0(),"hidden"]}],"divide-x":[{"divide-x":[_]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[_]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:y0()}],"border-color":[{border:[q]}],"border-color-x":[{"border-x":[q]}],"border-color-y":[{"border-y":[q]}],"border-color-s":[{"border-s":[q]}],"border-color-e":[{"border-e":[q]}],"border-color-t":[{"border-t":[q]}],"border-color-r":[{"border-r":[q]}],"border-color-b":[{"border-b":[q]}],"border-color-l":[{"border-l":[q]}],"divide-color":[{divide:[q]}],"outline-style":[{outline:["",...y0()]}],"outline-offset":[{"outline-offset":[r6,m1]}],"outline-w":[{outline:[r6,v8]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:U0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[r6,v8]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",f8,AA]}],"shadow-color":[{shadow:[VZ]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...I0(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I0()}],filter:[{filter:["","none"]}],blur:[{blur:[U]}],brightness:[{brightness:[O]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",f8,m1]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[M]}],saturate:[{saturate:[k]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[U]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[M]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[K]}],"border-spacing-x":[{"border-spacing-x":[K]}],"border-spacing-y":[{"border-spacing-y":[K]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m1]}],duration:[{duration:q0()}],ease:[{ease:["linear","in","out","in-out",m1]}],delay:[{delay:q0()}],animate:[{animate:["none","spin","ping","pulse","bounce",m1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[yZ,m1]}],"translate-x":[{"translate-x":[s]}],"translate-y":[{"translate-y":[s]}],"skew-x":[{"skew-x":[u]}],"skew-y":[{"skew-y":[u]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m1]}],accent:[{accent:["auto",Y]}],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",m1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q0()}],"scroll-mx":[{"scroll-mx":Q0()}],"scroll-my":[{"scroll-my":Q0()}],"scroll-ms":[{"scroll-ms":Q0()}],"scroll-me":[{"scroll-me":Q0()}],"scroll-mt":[{"scroll-mt":Q0()}],"scroll-mr":[{"scroll-mr":Q0()}],"scroll-mb":[{"scroll-mb":Q0()}],"scroll-ml":[{"scroll-ml":Q0()}],"scroll-p":[{"scroll-p":Q0()}],"scroll-px":[{"scroll-px":Q0()}],"scroll-py":[{"scroll-py":Q0()}],"scroll-ps":[{"scroll-ps":Q0()}],"scroll-pe":[{"scroll-pe":Q0()}],"scroll-pt":[{"scroll-pt":Q0()}],"scroll-pr":[{"scroll-pr":Q0()}],"scroll-pb":[{"scroll-pb":Q0()}],"scroll-pl":[{"scroll-pl":Q0()}],"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",m1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[r6,v8,cG]}],stroke:[{stroke:[Y,"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"]}}};var pK=BA(CA);var rK=B0(f1(),1),X6=B0(I4(),1),DQ=B0(f1(),1),m7=B0(I4(),1),tK=B0(I4(),1),rG=B0(I4(),1),mQ=B0(f1(),1),n4=B0(I4(),1),sK=B0(f1(),1),_7=B0(I4(),1),mZ=B0(I4(),1),D0=B0(I4(),1),W5=B0(I4(),1),sG=B0(I4(),1),H1=B0(I4(),1),g4=B0(I4(),1),X4=B0(I4(),1),c0=B0(I4(),1),P1=B0(I4(),1),DZ=B0(I4(),1),P6=B0(f1(),1),N1=B0(I4(),1),s6=B0(f1(),1),s0=B0(I4(),1),Z5=B0(I4(),1),RI=B0(f1(),1),eK=B0(I4(),1),eG=B0(f1(),1),z2=B0(I4(),1),NI=B0(f1(),1),zO=B0(I4(),1),QO=B0(f1(),1),XO=B0(I4(),1),MI=B0(f1(),1),ZO=B0(I4(),1),JO=B0(I4(),1),YO=B0(I4(),1),vA=Object.defineProperty,fA=(Y,G,U)=>(G in Y)?vA(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:U}):Y[G]=U,hA=(Y,G,U)=>fA(Y,typeof G!=="symbol"?G+"":G,U);function M4(...Y){return pK(DK(Y))}var yC=[{id:"msg-1",role:"assistant",content:"Hello! I'm your AI assistant. How can I help you today?",timestamp:new Date(Date.now()-3600000)},{id:"msg-2",role:"user",content:"I want to plan a trip to Europe",timestamp:new Date(Date.now()-3500000)},{id:"msg-3",role:"assistant",content:"Great choice! Europe has amazing destinations. What's your budget and how many days do you have?",timestamp:new Date(Date.now()-3400000)},{id:"msg-4",role:"user",content:"Around $2000 for 5 days",timestamp:new Date(Date.now()-3300000)},{id:"msg-5",role:"assistant",content:"Perfect! I found some great destinations that fit your budget:",widgets:[{type:"list",id:"destinations-1",props:{items:[{id:"paris",title:"Paris, France",subtitle:"5 days • $1,850",description:"The City of Light with iconic landmarks",metadata:{city:"Paris",country:"France",lat:48.8566,lng:2.3522,price:1850,days:5}},{id:"rome",title:"Rome, Italy",subtitle:"5 days • $1,650",description:"Ancient history meets modern culture",metadata:{city:"Rome",country:"Italy",lat:41.9028,lng:12.4964,price:1650,days:5}},{id:"barcelona",title:"Barcelona, Spain",subtitle:"5 days • $1,450",description:"Beautiful beaches and Gaudí architecture",metadata:{city:"Barcelona",country:"Spain",lat:41.3851,lng:2.1734,price:1450,days:5}}]},actions:[{type:"select_destination",label:"Select",handler:"client",payload:{}},{type:"view_details",label:"Details",handler:"server",payload:{}}]}],timestamp:new Date(Date.now()-3200000)}],VC=[{id:"thread-1",title:"Trip to Europe",preview:"Planning a 5-day trip...",createdAt:new Date(Date.now()-86400000),updatedAt:new Date(Date.now()-3600000),messageCount:12},{id:"thread-2",title:"Restaurant Recommendations",preview:"Looking for good places...",createdAt:new Date(Date.now()-172800000),updatedAt:new Date(Date.now()-86400000),messageCount:8},{id:"thread-3",title:"Budget Planning",preview:"Help with monthly budget",createdAt:new Date(Date.now()-259200000),updatedAt:new Date(Date.now()-172800000),messageCount:15}];function yA(Y=1000){return new Promise((G)=>{setTimeout(()=>{G({id:`msg-${Date.now()}`,role:"assistant",content:"This is a mock response. In production, this would come from your AI agent API.",timestamp:new Date})},Y)})}function VA(Y){let G=Y.toLowerCase();if(G.includes("analyze")||G.includes("analysis"))return`Analysis complete for "${Y}". Found 247 records with an average value of $1,234. The data shows a 23% increase compared to last quarter. Key insights: Revenue is up, customer satisfaction improved by 15%, and operational costs decreased by 8%.`;if(G.includes("sales")||G.includes("revenue"))return"Sales data processed: Q4 2024 revenue reached $2.4M, representing 18% growth year-over-year. Top performing products: Enterprise Plan (+45%), Pro Plan (+32%), Basic Plan (+12%). Regional breakdown: North America (52%), Europe (31%), APAC (17%).";if(G.includes("report")||G.includes("summary"))return"Report generated successfully. Executive Summary: Overall performance exceeded targets by 12%. Marketing ROI improved to 3.2x, customer acquisition cost reduced by 18%, and lifetime value increased by 24%. Detailed breakdown available in attached widgets.";if(G.includes("data")||G.includes("metrics"))return"Data metrics retrieved: 1,847 active users, 12,394 sessions this month, 94.2% uptime, average response time 127ms. Performance is within acceptable parameters. No critical issues detected.";if(G.includes("customer")||G.includes("user"))return"Customer analysis complete: 523 new customers this month, 89% retention rate, average satisfaction score 4.6/5. Top feedback themes: excellent support (87%), easy to use (72%), good value (68%). 3 support tickets pending review.";return"This is a mock response showing how your agent would process and respond to commands. The actual response would be generated by your AI agent based on real data and context."}function DA(Y){let G=VA(Y),U=Y.toLowerCase(),O=[],q;if(U.includes("sales")||U.includes("revenue")||U.includes("analyze"))O.push({type:"card",id:`widget-${Date.now()}-1`,props:{title:"Q4 2024 Performance",description:"Revenue: $2.4M (+18% YoY)",footer:"Updated: "+new Date().toLocaleDateString()},actions:[{type:"view_details",label:"View Details",handler:"client",payload:{reportId:"q4-2024"}}]});if(U.includes("customer")||U.includes("user"))O.push({type:"list",id:`widget-${Date.now()}-2`,props:{items:[{id:"metric-1",title:"Active Users",subtitle:"1,847 users",description:"+12% from last month"},{id:"metric-2",title:"Retention Rate",subtitle:"89%",description:"Above industry average"},{id:"metric-3",title:"Satisfaction Score",subtitle:"4.6/5",description:"Based on 234 reviews"}]}});if(U.includes("task")||U.includes("todo")||U.includes("work")||U.includes("completed"))O.push({type:"list",id:`widget-${Date.now()}-tasks`,props:{items:[{id:"task-1",title:"Implement user authentication",subtitle:"Created just now",description:"Added OAuth 2.0 support with Google and GitHub providers",backgroundColor:"rgba(59, 130, 246, 0.15)",metadata:{status:"created",priority:"high",tags:["backend","security"]}},{id:"task-2",title:"Update API documentation",subtitle:"Modified 2 minutes ago",description:"Changed endpoint descriptions and added new examples",backgroundColor:"rgba(234, 179, 8, 0.15)",metadata:{status:"modified",priority:"medium",tags:["docs"]}},{id:"task-3",title:"Fix login redirect bug",subtitle:"Completed 5 minutes ago",description:"Users now properly redirected after successful login",backgroundColor:"rgba(34, 197, 94, 0.15)",metadata:{status:"completed",priority:"urgent",tags:["bugfix","auth"]}}]},actions:[{type:"view_task",label:"View",handler:"client",payload:{}},{type:"undo",label:"Undo",handler:"server",payload:{}}]}),q={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(U.includes("analyze")||U.includes("analysis"))q={type:"send_notification",payload:{recipient:"team@company.com",subject:"Analysis Complete",message:"Your requested analysis has been completed and is ready for review."}};return{message:G,widgets:O,action:q}}function mA(Y,G,U,O,q=30){let{message:R,widgets:K}=DA(Y),_=R.split(" "),A=0,b=setInterval(()=>{try{if(A<_.length)G({type:"token",content:_[A]+" "}),A++;else{clearInterval(b),K.forEach((M)=>{G({type:"widget",widget:M})});let P=`mock_thread_${Date.now()}`;G({type:"complete"}),U(P)}}catch(P){clearInterval(b),O(P instanceof Error?P:Error("Mock streaming error"))}},q)}function EA(Y){return new Promise((G,U)=>{let O=new FileReader;O.onload=()=>{let R=O.result.split(",")[1];G(R)},O.onerror=()=>U(Error("Failed to read file")),O.readAsDataURL(Y)})}function uA(Y){if(Y.startsWith("image/"))return"image";return"document"}function gA(Y){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(Y.type)}async function xA(Y){let G=await EA(Y);return{type:uA(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function jA(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>xA(O)))}async function cK(Y,G){if(!G||G.length===0)return Y;let U=[];if(Y.trim())U.push({type:"text",text:Y.trim()});let O=await jA(G);return U.push(...O),U}function q3(Y){if(Y<1024)return`${Y} B`;if(Y<1048576)return`${(Y/1024).toFixed(1)} KB`;return`${(Y/1048576).toFixed(1)} MB`}var dK=10485760;function oK(Y){if(!gA(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>dK)return{valid:!1,error:`File too large: ${q3(Y.size)} (max ${q3(dK)})`};return{valid:!0}}var pA=["list","table"];function cA(Y){let G=[],U=!1,O=Y.match(/"items"\s*:\s*\[/);if(!O)return{items:G,isStreaming:!1};let q=Y.indexOf("[",O.index);if(q===-1)return{items:G,isStreaming:!0};let R=0,K=!1,_=!1,A=-1;for(let M=q+1;M<Y.length;M++){let w=Y[M];if(_){_=!1;continue}if(w==="\\"&&K){_=!0;continue}if(w==='"'){K=!K;continue}if(K)continue;if(w==="{"){if(R===0)A=M;R++}else if(w==="}"){if(R--,R===0&&A!==-1){let f=Y.slice(A,M+1);try{let v=JSON.parse(f);if(!v.id)v.id=`item-${G.length}-${aG(f)}`;G.push(v)}catch(v){}A=-1}}else if(w==="]"&&R===0){U=!1;break}}if(R>0||A!==-1)U=!0;let b=Y.slice(q);if(nG(b,0)===-1)U=!0;return{items:G,isStreaming:U}}function aG(Y){let G=0;for(let U=0;U<Y.length;U++){let O=Y.charCodeAt(U);G=(G<<5)-G+O,G=G&G}return Math.abs(G).toString(36)}function nG(Y,G){let U=0,O=!1,q=!1;for(let R=G;R<Y.length;R++){let K=Y[R];if(q){q=!1;continue}if(K==="\\"&&O){q=!0;continue}if(K==='"'){O=!O;continue}if(O)continue;if(K==="["||K==="{")U++;else if(K==="]"||K==="}"){if(U--,U===0)return R}}return-1}function G3(Y){let G=[],U=!1,O=!1,q=0,R=null,K=Y,_=Y.lastIndexOf("@ui:");if(_!==-1){let P=Y.slice(_),M=P.match(/^@ui:(\w+)/);if(M){let w=M[1],f=P.indexOf("[");if(f===-1)K=Y.slice(0,_),R=w,O=!0;else{let v=_+f;if(nG(Y,v)===-1)if(pA.includes(w)){let g=Y.slice(v+1),{items:C,isStreaming:V}=cA(g);if(C.length>0){K=Y.slice(0,_);let k=`widget-${w}-streaming-${aG(g)}`,x=K.replace(/[\s:;\-–—\.]+$/g,"").trim();if(x)G.push({type:"text",content:x});G.push({type:"widget",widget:{type:w,id:k,props:w==="table"?{rows:C,columns:[]}:{items:C},isStreaming:V}}),U=!0,O=!1,K=""}else K=Y.slice(0,_),R=w,O=!0}else K=Y.slice(0,_),R=w,O=!0}}}if(O)K=K.replace(/[\s:;\-–—\.]+$/g,"");let A=/@ui:(\w+)\[/g,b;while((b=A.exec(K))!==null){let P=b[1],M=b.index+b[0].length-1,w=nG(K,M);if(w===-1)continue;let f=K.slice(M+1,w);if(b.index>q){let v=K.slice(q,b.index).trim();if(v)G.push({type:"text",content:v})}try{let v=f.trim(),m=JSON.parse(v),g=`widget-${P}-${aG(v)}`,{metadata:C,actions:V,...k}=m;G.push({type:"widget",widget:{type:P,id:g,props:k,...V&&{actions:V},...C&&{metadata:C}}}),U=!0}catch(v){}q=w+1,A.lastIndex=q}if(q<K.length){let P=K.slice(q).trim();if(P)G.push({type:"text",content:P})}if(G.length===0&&K.trim())G.push({type:"text",content:K.trim()});if(R)G.push({type:"widget_pending",pendingType:R});return{segments:G,hasWidgets:U,hasPendingWidget:O}}var aK={card:{schema:"title, description?, image?, footer?, actions?: [{type, label}]",example:'@ui:card[{"title": "Summary", "description": "Details here"}]'},list:{schema:"items: [{id, title, subtitle?, description?, image?, metadata?: {any extra data}}], actions?: [{type, label}] - metadata is sent as action payload when clicked",example:'@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "metadata": {"key": "value"}}]}]'},button_group:{schema:"buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",example:'@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'},form:{schema:"title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",example:'@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'},table:{schema:"columns: [{key, label}], rows: [...], striped?, compact?",example:'@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'},image:{schema:"src, alt, caption?",example:'@ui:image[{"src": "url", "alt": "desc"}]'},chart:{schema:"chartType: line|bar|pie, data: {labels, datasets}",example:'@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'},flow:{schema:"title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",example:'@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'}},dA=Object.keys(aK),lA=["flow"],nK=dA.filter((Y)=>!lA.includes(Y));function iA(Y){let G=Y||nK,U=`
|
|
175
|
+
<%s key={someKey} {...props} />`,y1,O5,b6,O5),G4[O5+y1]=!0}}if(T===U)x1(j1);else j5(j1);return j1}}function t1(T,l,K0){return N4(T,l,K0,!0)}function y(T,l,K0){return N4(T,l,K0,!1)}var H0=y,N0=t1;SA.Fragment=U,SA.jsx=H0,SA.jsxs=N0})()});var g5=B0(f1(),1),RO=B0(PK(),1);var hG={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1,builtinTools:{webSearch:!1,webFetch:!1}};function Rz(Y,G){let U=Y.agents;if(typeof U==="boolean")return{enabled:U,mode:"worker",group:G||void 0};return{...U,group:U.group||G||void 0}}var a4=B0(f1(),1),IK=B0(U1(),1),bK=a4.createContext(null),ab=200;function VG({children:Y}){let[G,U]=a4.useState(!1),[O,q]=a4.useState([]),[R,K]=a4.useState({}),[_,A]=a4.useState({}),[b,P]=a4.useState(0),M=a4.useRef(null),w=a4.useRef(null);a4.useEffect(()=>{let m=setInterval(()=>{let g=Date.now();A((C)=>{let V={};for(let[k,x]of Object.entries(C))if(x.expiresAt>g)V[k]=x;return V})},500);return()=>clearInterval(m)},[]);let f=a4.useCallback(()=>{if(M.current)M.current.close(),M.current=null;try{let m=new EventSource("/api/telemetry/stream");M.current=m,m.onopen=()=>{U(!0)},m.onmessage=(g)=>{if(!g.data||g.data.trim()==="")return;try{let C=JSON.parse(g.data);if(C.connected){U(!0);return}if(Array.isArray(C)){if(q((V)=>{return[...C,...V].slice(0,ab)}),K((V)=>{let k={...V};for(let x of C){let j=k[x.agent_id];if(!j||new Date(x.timestamp)>new Date(j.timestamp))k[x.agent_id]={timestamp:x.timestamp,category:x.category,type:x.type}}return k}),A((V)=>{let k={...V},x=Date.now()+3000;for(let j of C)k[j.agent_id]={type:j.type,expiresAt:x};return k}),C.some((V)=>V.category==="system"&&(V.type==="agent_started"||V.type==="agent_stopped")))P((V)=>V+1)}}catch{}},m.onerror=()=>{if(U(!1),m.close(),M.current=null,w.current)clearTimeout(w.current);w.current=setTimeout(f,2000)}}catch{if(U(!1),w.current)clearTimeout(w.current);w.current=setTimeout(f,2000)}},[]);a4.useEffect(()=>{return f(),()=>{if(M.current)M.current.close();if(w.current)clearTimeout(w.current)}},[f]);let v=a4.useCallback(()=>{q([])},[]);return IK.jsxDEV(bK.Provider,{value:{connected:G,events:O,lastActivityByAgent:R,activeAgents:_,statusChangeCounter:b,clearEvents:v},children:Y},void 0,!1,void 0,this)}function F6(){let Y=a4.useContext(bK);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function DG(Y){let{connected:G,events:U,lastActivityByAgent:O}=F6(),q=a4.default.useMemo(()=>{let _=U;if(Y?.agent_id)_=_.filter((A)=>A.agent_id===Y.agent_id);if(Y?.category)_=_.filter((A)=>A.category===Y.category);if(Y?.limit)_=_.slice(0,Y.limit);return _},[U,Y?.agent_id,Y?.category,Y?.limit]),R=Y?.agent_id?O[Y.agent_id]:void 0,K=a4.default.useMemo(()=>{if(!R)return!1;let _=new Date(R.timestamp).getTime();return Date.now()-_<1e4},[R]);return{connected:G,events:q,lastActivity:R,isActive:K}}function vZ(Y){let{activeAgents:G}=F6(),U=G[Y];return{isActive:!!U,type:U?.type}}function AK(){let{statusChangeCounter:Y}=F6();return Y}var m4=B0(f1(),1),kK=B0(U1(),1),TK=m4.createContext(null);function T1(){let Y=m4.useContext(TK);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function mG({children:Y}){let[G,U]=m4.useState(null),[O,q]=m4.useState(null),[R,K]=m4.useState(!0),[_,A]=m4.useState(null),[b,P]=m4.useState(!1),M=m4.useRef(null),w=m4.useRef(!1),f=m4.useRef(!1),v=m4.useCallback((u)=>{M.current=u,q(u)},[]),m=m4.useCallback(async()=>{if(w.current)return!1;w.current=!0;try{let u=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!u.ok)return!1;let p=await u.json();v(p.accessToken);let s=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${p.accessToken}`}});if(s.ok){let a=await s.json();return U(a.user),!0}return!1}catch(u){return console.error("Token refresh failed:",u),!1}finally{w.current=!1}},[v]),g=m4.useCallback(async()=>{try{let u=M.current,s=await(await fetch("/api/auth/check",{headers:u?{Authorization:`Bearer ${u}`}:{}})).json();if(A(s.hasUsers),P(s.isDev??!1),s.authenticated&&s.user)U(s.user);else if(U(null),s.hasUsers){if(!await m())v(null)}}catch(u){console.error("Auth check failed:",u),U(null),v(null)}finally{K(!1)}},[m,v]),C=m4.useCallback(async(u,p)=>{try{let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:u,password:p})}),a=await s.json();if(!s.ok)return{success:!1,error:a.error||"Login failed"};return v(a.accessToken),U(a.user),A(!0),{success:!0}}catch(s){return console.error("Login failed:",s),{success:!1,error:"Login failed"}}},[v]),V=m4.useCallback(async()=>{try{let u=M.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:u?{Authorization:`Bearer ${u}`}:{}})}catch(u){console.error("Logout failed:",u)}finally{U(null),v(null)}},[v]),k=m4.useCallback(async(u,p={})=>{let s=new Headers(p.headers),a=M.current;if(a)s.set("Authorization",`Bearer ${a}`);return fetch(u,{...p,headers:s})},[]),x=m4.useCallback(async()=>{return m()},[m]);m4.useEffect(()=>{if(f.current)return;f.current=!0,g()},[g]),m4.useEffect(()=>{if(!O)return;let u=setInterval(()=>{m()},840000);return()=>clearInterval(u)},[O,m]);let j={user:G,isAuthenticated:!!G,isLoading:R,hasUsers:_,isDev:b,accessToken:O,login:C,logout:V,refreshToken:x,checkAuth:g,authFetch:k};return kK.jsxDEV(TK.Provider,{value:j,children:Y},void 0,!1,void 0,this)}var Z7=B0(f1(),1);var SK=B0(U1(),1),CK=Z7.createContext(null);function h4(){let Y=Z7.useContext(CK);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var EG="apteva_current_project";function uG({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=T1(),[q,R]=Z7.useState([]),[K,_]=Z7.useState(()=>{if(typeof window<"u")return localStorage.getItem(EG);return null}),[A,b]=Z7.useState(!0),[P,M]=Z7.useState(null),[w,f]=Z7.useState(0),[v,m]=Z7.useState(!1);Z7.useEffect(()=>{fetch("/api/features").then((p)=>p.json()).then((p)=>{m(p.projects===!0)}).catch(()=>{m(!1)})},[]);let g=Z7.useCallback((p)=>{if(_(p),typeof window<"u")if(p===null)localStorage.removeItem(EG);else localStorage.setItem(EG,p)},[]),C=q.find((p)=>p.id===K)||null,V=Z7.useCallback(async()=>{if(!v){R([]),b(!1);return}if(!U&&!O){R([]),b(!1);return}try{M(null);let p=await G("/api/projects");if(!p.ok)throw Error("Failed to fetch projects");let s=await p.json();if(R(s.projects||[]),f(s.unassignedCount||0),K&&K!=="unassigned"&&!s.projects.find((a)=>a.id===K))g(null)}catch(p){console.error("Failed to fetch projects:",p),M("Failed to load projects")}finally{b(!1)}},[G,U,O,K,g,v]),k=Z7.useCallback(async(p)=>{try{let s=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(!s.ok){let D=await s.json();throw Error(D.error||"Failed to create project")}let a=await s.json();return await V(),a.project}catch(s){return console.error("Failed to create project:",s),null}},[G,V]),x=Z7.useCallback(async(p,s)=>{try{let a=await G(`/api/projects/${p}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){let z0=await a.json();throw Error(z0.error||"Failed to update project")}let D=await a.json();return await V(),D.project}catch(a){return console.error("Failed to update project:",a),null}},[G,V]),j=Z7.useCallback(async(p)=>{try{let s=await G(`/api/projects/${p}`,{method:"DELETE"});if(!s.ok){let a=await s.json();throw Error(a.error||"Failed to delete project")}if(K===p)g(null);return await V(),!0}catch(s){return console.error("Failed to delete project:",s),!1}},[G,K,g,V]);Z7.useEffect(()=>{if(!O&&v)V()},[O,v,V]);let u={projects:q,currentProjectId:K,currentProject:C,isLoading:A,error:P,unassignedCount:w,projectsEnabled:v,setCurrentProjectId:g,createProject:k,updateProject:x,deleteProject:j,refreshProjects:V};return SK.jsxDEV(CK.Provider,{value:u,children:Y},void 0,!1,void 0,this)}var a6=B0(f1(),1);function gG(Y){let{accessToken:G}=T1(),[U,O]=a6.useState([]),[q,R]=a6.useState(!0),K=a6.useCallback(()=>{let v={"Content-Type":"application/json"};if(G)v.Authorization=`Bearer ${G}`;return v},[G]),_=a6.useCallback(async()=>{let m=await(await fetch("/api/agents",{headers:K()})).json();O(m.agents||[]),R(!1)},[K]),A=AK();a6.useEffect(()=>{if(Y&&A>0)_()},[Y,A,_]),a6.useEffect(()=>{if(Y)_()},[Y,_]);let b=async(v)=>{await fetch("/api/agents",{method:"POST",headers:K(),body:JSON.stringify(v)}),await _()},P=async(v)=>{await fetch(`/api/agents/${v}`,{method:"DELETE",headers:K()}),await _()},M=async(v,m)=>{let g=await fetch(`/api/agents/${v}`,{method:"PUT",headers:K(),body:JSON.stringify(m)}),C=await g.json();if(await _(),!g.ok&&C.error)return{error:C.error};return{}},w=async(v)=>{let m=v.status==="running"?"stop":"start",g=await fetch(`/api/agents/${v.id}/${m}`,{method:"POST",headers:K()}),C=await g.json();if(await _(),!g.ok&&C.error)return{error:C.error};return{}},f=U.filter((v)=>v.status==="running").length;return{agents:U,loading:q,runningCount:f,fetchAgents:_,createAgent:b,updateAgent:M,deleteAgent:P,toggleAgent:w}}var Nz=B0(f1(),1);function xG(Y){let{accessToken:G}=T1(),[U,O]=Nz.useState([]),q=Nz.useCallback(()=>{let b={"Content-Type":"application/json"};if(G)b.Authorization=`Bearer ${G}`;return b},[G]),R=Nz.useCallback(async()=>{let P=await(await fetch("/api/providers",{headers:q()})).json();O(P.providers||[])},[q]);Nz.useEffect(()=>{if(Y)R()},[Y,R]);let K=U.filter((b)=>b.hasKey);return{providers:U,configuredProviders:K,fetchProviders:R,saveKey:async(b,P)=>{let w=await(await fetch(`/api/keys/${b}/test`,{method:"POST",headers:q(),body:JSON.stringify({key:P})})).json();if(!w.valid)return{success:!1,error:w.error||"API key is invalid"};let f=await fetch(`/api/keys/${b}`,{method:"POST",headers:q(),body:JSON.stringify({key:P})});if(!f.ok)return{success:!1,error:(await f.json()).error||"Failed to save key"};return await R(),{success:!0}},deleteKey:async(b)=>{await fetch(`/api/keys/${b}`,{method:"DELETE",headers:q()}),await R()}}}var Mz=B0(f1(),1);function jG(){let{accessToken:Y,isAuthenticated:G}=T1(),[U,O]=Mz.useState(null),q=Mz.useCallback(()=>{let K={};if(Y)K.Authorization=`Bearer ${Y}`;return K},[Y]);Mz.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:q()}).then((K)=>K.json()).then((K)=>{O(K.completed||K.has_any_keys)}).catch(()=>O(!0))},[G,q]);let R=Mz.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:q()}),O(!0)},[q]);return{isComplete:U,setIsComplete:O,complete:R}}var S8=B0(U1(),1);function wz({message:Y="Loading...",fullScreen:G=!1}){let U=S8.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[S8.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[S8.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),S8.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S8.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return S8.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:U},void 0,!1,void 0,this);return S8.jsxDEV("div",{className:"flex items-center justify-center py-20",children:U},void 0,!1,void 0,this)}var n6=B0(f1(),1),O7=B0(U1(),1);function kQ({children:Y,onClose:G}){return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl lg:max-w-2xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function nb({title:Y,message:G,confirmText:U="Confirm",cancelText:O="Cancel",confirmVariant:q="danger",onConfirm:R,onCancel:K}){return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[Y&&O7.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),O7.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),O7.jsxDEV("div",{className:"flex gap-2",children:[O7.jsxDEV("button",{onClick:K,className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:O},void 0,!1,void 0,this),O7.jsxDEV("button",{onClick:R,className:`flex-1 text-sm text-white px-4 py-2 rounded transition ${q==="danger"?"bg-red-500 hover:bg-red-600":"bg-[#f97316] hover:bg-[#ea580c]"}`,children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function rb({title:Y,message:G,buttonText:U="OK",variant:O="info",onClose:q}){let R={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},K={error:"✕",success:"✓",info:"ℹ"};return O7.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:O7.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[O7.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${R[O]}`,children:O7.jsxDEV("span",{className:"text-xl",children:K[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&O7.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),O7.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),O7.jsxDEV("button",{onClick:q,className:"w-full text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function A5(){let[Y,G]=n6.useState(null),U=n6.useCallback((K,_={})=>{return new Promise((A)=>{G({message:K,options:_,resolve:A})})},[]),O=n6.useCallback(()=>{Y?.resolve(!0),G(null)},[Y]),q=n6.useCallback(()=>{Y?.resolve(!1),G(null)},[Y]),R=Y?O7.jsxDEV(nb,{title:Y.options.title,message:Y.message,confirmText:Y.options.confirmText,cancelText:Y.options.cancelText,confirmVariant:Y.options.confirmVariant,onConfirm:O,onCancel:q},void 0,!1,void 0,this):null;return{confirm:U,ConfirmDialog:R}}function fZ(){let[Y,G]=n6.useState(null),U=n6.useCallback((R,K={})=>{return new Promise((_)=>{G({message:R,options:K,resolve:_})})},[]),O=n6.useCallback(()=>{Y?.resolve(),G(null)},[Y]),q=Y?O7.jsxDEV(rb,{title:Y.options.title,message:Y.message,buttonText:Y.options.buttonText,variant:Y.options.variant,onClose:O},void 0,!1,void 0,this):null;return{alert:U,AlertDialog:q}}var CQ=B0(f1(),1),D7=B0(U1(),1);function J7({value:Y,options:G,onChange:U,placeholder:O="Select..."}){let[q,R]=CQ.useState(!1),K=CQ.useRef(null),_=G.find((A)=>A.value===Y);return CQ.useEffect(()=>{function A(b){if(K.current&&!K.current.contains(b.target))R(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),D7.jsxDEV("div",{ref:K,className:"relative",children:[D7.jsxDEV("button",{type:"button",onClick:()=>R(!q),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-left flex items-center justify-between focus:outline-none focus:border-[#f97316] text-[#e0e0e0] hover:border-[#333] transition",children:[D7.jsxDEV("span",{className:_?"text-[#e0e0e0]":"text-[#666]",children:_?D7.jsxDEV(D7.Fragment,{children:[_.label,_.recommended&&D7.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):O},void 0,!1,void 0,this),D7.jsxDEV(tb,{isOpen:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&D7.jsxDEV("div",{className:"absolute z-50 w-full min-w-max mt-1 bg-[#111] border border-[#222] rounded shadow-lg max-h-60 overflow-y-auto scrollbar-hide",children:G.map((A)=>D7.jsxDEV("button",{type:"button",onClick:()=>{U(A.value),R(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${A.value===Y?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[D7.jsxDEV("span",{children:[A.label,A.recommended&&D7.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A.value===Y&&D7.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D7.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},A.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function tb({isOpen:Y}){return D7.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D7.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var D1=B0(U1(),1);function X5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function D5({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Y3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function $3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function H3({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},void 0,!1,void 0,this),D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Fz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function m5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Pz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this),D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function bz({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function E5({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function hZ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Az({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function pG({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function vK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function SQ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function vQ({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function fK({className:Y="w-5 h-5"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function hK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function yK({className:Y="w-4 h-4"}){return D1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Q2=B0(f1(),1);var I5=B0(f1(),1);var Y4=B0(f1(),1),VQ=B0(f1(),1),Tz=B0(f1(),1);function VK(Y){var G,U,O="";if(typeof Y=="string"||typeof Y=="number")O+=Y;else if(typeof Y=="object")if(Array.isArray(Y)){var q=Y.length;for(G=0;G<q;G++)Y[G]&&(U=VK(Y[G]))&&(O&&(O+=" "),O+=U)}else for(U in Y)Y[U]&&(O&&(O+=" "),O+=U);return O}function DK(){for(var Y,G,U=0,O="",q=arguments.length;U<q;U++)(Y=arguments[U])&&(G=VK(Y))&&(O&&(O+=" "),O+=G);return O}var sb=(Y)=>{let G=zA(Y),{conflictingClassGroups:U,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(K)=>{let _=K.split("-");if(_[0]===""&&_.length!==1)_.shift();return uK(_,G)||eb(K)},getConflictingClassGroupIds:(K,_)=>{let A=U[K]||[];if(_&&O[K])return[...A,...O[K]];return A}}},uK=(Y,G)=>{if(Y.length===0)return G.classGroupId;let U=Y[0],O=G.nextPart.get(U),q=O?uK(Y.slice(1),O):void 0;if(q)return q;if(G.validators.length===0)return;let R=Y.join("-");return G.validators.find(({validator:K})=>K(R))?.classGroupId},mK=/^\[(.+)\]$/,eb=(Y)=>{if(mK.test(Y)){let G=mK.exec(Y)[1],U=G?.substring(0,G.indexOf(":"));if(U)return"arbitrary.."+U}},zA=(Y)=>{let{theme:G,prefix:U}=Y,O={nextPart:new Map,validators:[]};return XA(Object.entries(Y.classGroups),U).forEach(([R,K])=>{dG(K,O,R,G)}),O},dG=(Y,G,U,O)=>{Y.forEach((q)=>{if(typeof q==="string"){let R=q===""?G:EK(G,q);R.classGroupId=U;return}if(typeof q==="function"){if(QA(q)){dG(q(O),G,U,O);return}G.validators.push({validator:q,classGroupId:U});return}Object.entries(q).forEach(([R,K])=>{dG(K,EK(G,R),U,O)})})},EK=(Y,G)=>{let U=Y;return G.split("-").forEach((O)=>{if(!U.nextPart.has(O))U.nextPart.set(O,{nextPart:new Map,validators:[]});U=U.nextPart.get(O)}),U},QA=(Y)=>Y.isThemeGetter,XA=(Y,G)=>{if(!G)return Y;return Y.map(([U,O])=>{let q=O.map((R)=>{if(typeof R==="string")return G+R;if(typeof R==="object")return Object.fromEntries(Object.entries(R).map(([K,_])=>[G+K,_]));return R});return[U,q]})},ZA=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,U=new Map,O=new Map,q=(R,K)=>{if(U.set(R,K),G++,G>Y)G=0,O=U,U=new Map};return{get(R){let K=U.get(R);if(K!==void 0)return K;if((K=O.get(R))!==void 0)return q(R,K),K},set(R,K){if(U.has(R))U.set(R,K);else q(R,K)}}};var JA=(Y)=>{let{separator:G,experimentalParseClassName:U}=Y,O=G.length===1,q=G[0],R=G.length,K=(_)=>{let A=[],b=0,P=0,M;for(let g=0;g<_.length;g++){let C=_[g];if(b===0){if(C===q&&(O||_.slice(g,g+R)===G)){A.push(_.slice(P,g)),P=g+R;continue}if(C==="/"){M=g;continue}}if(C==="[")b++;else if(C==="]")b--}let w=A.length===0?_:_.substring(P),f=w.startsWith("!"),v=f?w.substring(1):w,m=M&&M>P?M-P:void 0;return{modifiers:A,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:m}};if(U)return(_)=>U({className:_,parseClassName:K});return K},YA=(Y)=>{if(Y.length<=1)return Y;let G=[],U=[];return Y.forEach((O)=>{if(O[0]==="[")G.push(...U.sort(),O),U=[];else U.push(O)}),G.push(...U.sort()),G},$A=(Y)=>({cache:ZA(Y.cacheSize),parseClassName:JA(Y),...sb(Y)}),HA=/\s+/,GA=(Y,G)=>{let{parseClassName:U,getClassGroupId:O,getConflictingClassGroupIds:q}=G,R=[],K=Y.trim().split(HA),_="";for(let A=K.length-1;A>=0;A-=1){let b=K[A],{modifiers:P,hasImportantModifier:M,baseClassName:w,maybePostfixModifierPosition:f}=U(b),v=Boolean(f),m=O(v?w.substring(0,f):w);if(!m){if(!v){_=b+(_.length>0?" "+_:_);continue}if(m=O(w),!m){_=b+(_.length>0?" "+_:_);continue}v=!1}let g=YA(P).join(":"),C=M?g+"!":g,V=C+m;if(R.includes(V))continue;R.push(V);let k=q(m,v);for(let x=0;x<k.length;++x){let j=k[x];R.push(C+j)}_=b+(_.length>0?" "+_:_)}return _};function qA(){let Y=0,G,U,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(U=gK(G))O&&(O+=" "),O+=U}return O}var gK=(Y)=>{if(typeof Y==="string")return Y;let G,U="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=gK(Y[O]))U&&(U+=" "),U+=G}return U};function BA(Y,...G){let U,O,q,R=K;function K(A){let b=G.reduce((P,M)=>M(P),Y());return U=$A(b),O=U.cache.get,q=U.cache.set,R=_,_(A)}function _(A){let b=O(A);if(b)return b;let P=GA(A,U);return q(A,P),P}return function(){return R(qA.apply(null,arguments))}}var E4=(Y)=>{let G=(U)=>U[Y]||[];return G.isThemeGetter=!0,G},xK=/^\[(?:([a-z-]+):)?(.+)\]$/i,UA=/^\d+\/\d+$/,WA=new Set(["px","full","screen"]),KA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OA=/\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$/,_A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,r6=(Y)=>fQ(Y)||WA.has(Y)||UA.test(Y),v8=(Y)=>hQ(Y,"length",IA),fQ=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),cG=(Y)=>hQ(Y,"number",fQ),yZ=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),NA=(Y)=>Y.endsWith("%")&&fQ(Y.slice(0,-1)),m1=(Y)=>xK.test(Y),f8=(Y)=>KA.test(Y),MA=new Set(["length","size","percentage"]),wA=(Y)=>hQ(Y,MA,jK),FA=(Y)=>hQ(Y,"position",jK),PA=new Set(["image","url"]),bA=(Y)=>hQ(Y,PA,kA),AA=(Y)=>hQ(Y,"",TA),VZ=()=>!0,hQ=(Y,G,U)=>{let O=xK.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return U(O[2])}return!1},IA=(Y)=>OA.test(Y)&&!_A.test(Y),jK=()=>!1,TA=(Y)=>LA.test(Y),kA=(Y)=>RA.test(Y);var CA=()=>{let Y=E4("colors"),G=E4("spacing"),U=E4("blur"),O=E4("brightness"),q=E4("borderColor"),R=E4("borderRadius"),K=E4("borderSpacing"),_=E4("borderWidth"),A=E4("contrast"),b=E4("grayscale"),P=E4("hueRotate"),M=E4("invert"),w=E4("gap"),f=E4("gradientColorStops"),v=E4("gradientColorStopPositions"),m=E4("inset"),g=E4("margin"),C=E4("opacity"),V=E4("padding"),k=E4("saturate"),x=E4("scale"),j=E4("sepia"),u=E4("skew"),p=E4("space"),s=E4("translate"),a=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],z0=()=>["auto",m1,G],Q0=()=>[m1,G],U0=()=>["",r6,v8],b0=()=>["auto",fQ,m1],e=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],y0=()=>["solid","dashed","dotted","double","none"],I0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],i=()=>["start","end","center","between","around","evenly","stretch"],R0=()=>["","0",m1],O0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q0=()=>[fQ,m1];return{cacheSize:500,separator:":",theme:{colors:[VZ],spacing:[r6,v8],blur:["none","",f8,m1],brightness:q0(),borderColor:[Y],borderRadius:["none","","full",f8,m1],borderSpacing:Q0(),borderWidth:U0(),contrast:q0(),grayscale:R0(),hueRotate:q0(),invert:R0(),gap:Q0(),gradientColorStops:[Y],gradientColorStopPositions:[NA,v8],inset:z0(),margin:z0(),opacity:q0(),padding:Q0(),saturate:q0(),scale:q0(),sepia:R0(),skew:q0(),space:Q0(),translate:Q0()},classGroups:{aspect:[{aspect:["auto","square","video",m1]}],container:["container"],columns:[{columns:[f8]}],"break-after":[{"break-after":O0()}],"break-before":[{"break-before":O0()}],"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:[...e(),m1]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:a()}],"overscroll-x":[{"overscroll-x":a()}],"overscroll-y":[{"overscroll-y":a()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yZ,m1]}],basis:[{basis:z0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m1]}],grow:[{grow:R0()}],shrink:[{shrink:R0()}],order:[{order:["first","last","none",yZ,m1]}],"grid-cols":[{"grid-cols":[VZ]}],"col-start-end":[{col:["auto",{span:["full",yZ,m1]},m1]}],"col-start":[{"col-start":b0()}],"col-end":[{"col-end":b0()}],"grid-rows":[{"grid-rows":[VZ]}],"row-start-end":[{row:["auto",{span:[yZ,m1]},m1]}],"row-start":[{"row-start":b0()}],"row-end":[{"row-end":b0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m1]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...i()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...i(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...i(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[V]}],px:[{px:[V]}],py:[{py:[V]}],ps:[{ps:[V]}],pe:[{pe:[V]}],pt:[{pt:[V]}],pr:[{pr:[V]}],pb:[{pb:[V]}],pl:[{pl:[V]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[p]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[p]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m1,G]}],"min-w":[{"min-w":[m1,G,"min","max","fit"]}],"max-w":[{"max-w":[m1,G,"none","full","min","max","fit","prose",{screen:[f8]},f8]}],h:[{h:[m1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",f8,v8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",cG]}],"font-family":[{font:[VZ]}],"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",m1]}],"line-clamp":[{"line-clamp":["none",fQ,cG]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",r6,m1]}],"list-image":[{"list-image":["none",m1]}],"list-style-type":[{list:["none","disc","decimal",m1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Y]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Y]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...y0(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",r6,v8]}],"underline-offset":[{"underline-offset":["auto",r6,m1]}],"text-decoration-color":[{decoration:[Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m1]}],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",m1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...e(),FA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bA]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[R]}],"rounded-s":[{"rounded-s":[R]}],"rounded-e":[{"rounded-e":[R]}],"rounded-t":[{"rounded-t":[R]}],"rounded-r":[{"rounded-r":[R]}],"rounded-b":[{"rounded-b":[R]}],"rounded-l":[{"rounded-l":[R]}],"rounded-ss":[{"rounded-ss":[R]}],"rounded-se":[{"rounded-se":[R]}],"rounded-ee":[{"rounded-ee":[R]}],"rounded-es":[{"rounded-es":[R]}],"rounded-tl":[{"rounded-tl":[R]}],"rounded-tr":[{"rounded-tr":[R]}],"rounded-br":[{"rounded-br":[R]}],"rounded-bl":[{"rounded-bl":[R]}],"border-w":[{border:[_]}],"border-w-x":[{"border-x":[_]}],"border-w-y":[{"border-y":[_]}],"border-w-s":[{"border-s":[_]}],"border-w-e":[{"border-e":[_]}],"border-w-t":[{"border-t":[_]}],"border-w-r":[{"border-r":[_]}],"border-w-b":[{"border-b":[_]}],"border-w-l":[{"border-l":[_]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...y0(),"hidden"]}],"divide-x":[{"divide-x":[_]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[_]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:y0()}],"border-color":[{border:[q]}],"border-color-x":[{"border-x":[q]}],"border-color-y":[{"border-y":[q]}],"border-color-s":[{"border-s":[q]}],"border-color-e":[{"border-e":[q]}],"border-color-t":[{"border-t":[q]}],"border-color-r":[{"border-r":[q]}],"border-color-b":[{"border-b":[q]}],"border-color-l":[{"border-l":[q]}],"divide-color":[{divide:[q]}],"outline-style":[{outline:["",...y0()]}],"outline-offset":[{"outline-offset":[r6,m1]}],"outline-w":[{outline:[r6,v8]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:U0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[r6,v8]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",f8,AA]}],"shadow-color":[{shadow:[VZ]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...I0(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I0()}],filter:[{filter:["","none"]}],blur:[{blur:[U]}],brightness:[{brightness:[O]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",f8,m1]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[M]}],saturate:[{saturate:[k]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[U]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[M]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[K]}],"border-spacing-x":[{"border-spacing-x":[K]}],"border-spacing-y":[{"border-spacing-y":[K]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m1]}],duration:[{duration:q0()}],ease:[{ease:["linear","in","out","in-out",m1]}],delay:[{delay:q0()}],animate:[{animate:["none","spin","ping","pulse","bounce",m1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[yZ,m1]}],"translate-x":[{"translate-x":[s]}],"translate-y":[{"translate-y":[s]}],"skew-x":[{"skew-x":[u]}],"skew-y":[{"skew-y":[u]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m1]}],accent:[{accent:["auto",Y]}],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",m1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q0()}],"scroll-mx":[{"scroll-mx":Q0()}],"scroll-my":[{"scroll-my":Q0()}],"scroll-ms":[{"scroll-ms":Q0()}],"scroll-me":[{"scroll-me":Q0()}],"scroll-mt":[{"scroll-mt":Q0()}],"scroll-mr":[{"scroll-mr":Q0()}],"scroll-mb":[{"scroll-mb":Q0()}],"scroll-ml":[{"scroll-ml":Q0()}],"scroll-p":[{"scroll-p":Q0()}],"scroll-px":[{"scroll-px":Q0()}],"scroll-py":[{"scroll-py":Q0()}],"scroll-ps":[{"scroll-ps":Q0()}],"scroll-pe":[{"scroll-pe":Q0()}],"scroll-pt":[{"scroll-pt":Q0()}],"scroll-pr":[{"scroll-pr":Q0()}],"scroll-pb":[{"scroll-pb":Q0()}],"scroll-pl":[{"scroll-pl":Q0()}],"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",m1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[r6,v8,cG]}],stroke:[{stroke:[Y,"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"]}}};var pK=BA(CA);var rK=B0(f1(),1),Z6=B0(I4(),1),DQ=B0(f1(),1),m7=B0(I4(),1),tK=B0(I4(),1),rG=B0(I4(),1),mQ=B0(f1(),1),n4=B0(I4(),1),sK=B0(f1(),1),_7=B0(I4(),1),mZ=B0(I4(),1),D0=B0(I4(),1),W5=B0(I4(),1),sG=B0(I4(),1),H1=B0(I4(),1),g4=B0(I4(),1),X4=B0(I4(),1),c0=B0(I4(),1),P1=B0(I4(),1),DZ=B0(I4(),1),P6=B0(f1(),1),N1=B0(I4(),1),s6=B0(f1(),1),s0=B0(I4(),1),Z5=B0(I4(),1),RI=B0(f1(),1),eK=B0(I4(),1),eG=B0(f1(),1),z2=B0(I4(),1),NI=B0(f1(),1),zO=B0(I4(),1),QO=B0(f1(),1),XO=B0(I4(),1),MI=B0(f1(),1),ZO=B0(I4(),1),JO=B0(I4(),1),YO=B0(I4(),1),vA=Object.defineProperty,fA=(Y,G,U)=>(G in Y)?vA(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:U}):Y[G]=U,hA=(Y,G,U)=>fA(Y,typeof G!=="symbol"?G+"":G,U);function M4(...Y){return pK(DK(Y))}var yC=[{id:"msg-1",role:"assistant",content:"Hello! I'm your AI assistant. How can I help you today?",timestamp:new Date(Date.now()-3600000)},{id:"msg-2",role:"user",content:"I want to plan a trip to Europe",timestamp:new Date(Date.now()-3500000)},{id:"msg-3",role:"assistant",content:"Great choice! Europe has amazing destinations. What's your budget and how many days do you have?",timestamp:new Date(Date.now()-3400000)},{id:"msg-4",role:"user",content:"Around $2000 for 5 days",timestamp:new Date(Date.now()-3300000)},{id:"msg-5",role:"assistant",content:"Perfect! I found some great destinations that fit your budget:",widgets:[{type:"list",id:"destinations-1",props:{items:[{id:"paris",title:"Paris, France",subtitle:"5 days • $1,850",description:"The City of Light with iconic landmarks",metadata:{city:"Paris",country:"France",lat:48.8566,lng:2.3522,price:1850,days:5}},{id:"rome",title:"Rome, Italy",subtitle:"5 days • $1,650",description:"Ancient history meets modern culture",metadata:{city:"Rome",country:"Italy",lat:41.9028,lng:12.4964,price:1650,days:5}},{id:"barcelona",title:"Barcelona, Spain",subtitle:"5 days • $1,450",description:"Beautiful beaches and Gaudí architecture",metadata:{city:"Barcelona",country:"Spain",lat:41.3851,lng:2.1734,price:1450,days:5}}]},actions:[{type:"select_destination",label:"Select",handler:"client",payload:{}},{type:"view_details",label:"Details",handler:"server",payload:{}}]}],timestamp:new Date(Date.now()-3200000)}],VC=[{id:"thread-1",title:"Trip to Europe",preview:"Planning a 5-day trip...",createdAt:new Date(Date.now()-86400000),updatedAt:new Date(Date.now()-3600000),messageCount:12},{id:"thread-2",title:"Restaurant Recommendations",preview:"Looking for good places...",createdAt:new Date(Date.now()-172800000),updatedAt:new Date(Date.now()-86400000),messageCount:8},{id:"thread-3",title:"Budget Planning",preview:"Help with monthly budget",createdAt:new Date(Date.now()-259200000),updatedAt:new Date(Date.now()-172800000),messageCount:15}];function yA(Y=1000){return new Promise((G)=>{setTimeout(()=>{G({id:`msg-${Date.now()}`,role:"assistant",content:"This is a mock response. In production, this would come from your AI agent API.",timestamp:new Date})},Y)})}function VA(Y){let G=Y.toLowerCase();if(G.includes("analyze")||G.includes("analysis"))return`Analysis complete for "${Y}". Found 247 records with an average value of $1,234. The data shows a 23% increase compared to last quarter. Key insights: Revenue is up, customer satisfaction improved by 15%, and operational costs decreased by 8%.`;if(G.includes("sales")||G.includes("revenue"))return"Sales data processed: Q4 2024 revenue reached $2.4M, representing 18% growth year-over-year. Top performing products: Enterprise Plan (+45%), Pro Plan (+32%), Basic Plan (+12%). Regional breakdown: North America (52%), Europe (31%), APAC (17%).";if(G.includes("report")||G.includes("summary"))return"Report generated successfully. Executive Summary: Overall performance exceeded targets by 12%. Marketing ROI improved to 3.2x, customer acquisition cost reduced by 18%, and lifetime value increased by 24%. Detailed breakdown available in attached widgets.";if(G.includes("data")||G.includes("metrics"))return"Data metrics retrieved: 1,847 active users, 12,394 sessions this month, 94.2% uptime, average response time 127ms. Performance is within acceptable parameters. No critical issues detected.";if(G.includes("customer")||G.includes("user"))return"Customer analysis complete: 523 new customers this month, 89% retention rate, average satisfaction score 4.6/5. Top feedback themes: excellent support (87%), easy to use (72%), good value (68%). 3 support tickets pending review.";return"This is a mock response showing how your agent would process and respond to commands. The actual response would be generated by your AI agent based on real data and context."}function DA(Y){let G=VA(Y),U=Y.toLowerCase(),O=[],q;if(U.includes("sales")||U.includes("revenue")||U.includes("analyze"))O.push({type:"card",id:`widget-${Date.now()}-1`,props:{title:"Q4 2024 Performance",description:"Revenue: $2.4M (+18% YoY)",footer:"Updated: "+new Date().toLocaleDateString()},actions:[{type:"view_details",label:"View Details",handler:"client",payload:{reportId:"q4-2024"}}]});if(U.includes("customer")||U.includes("user"))O.push({type:"list",id:`widget-${Date.now()}-2`,props:{items:[{id:"metric-1",title:"Active Users",subtitle:"1,847 users",description:"+12% from last month"},{id:"metric-2",title:"Retention Rate",subtitle:"89%",description:"Above industry average"},{id:"metric-3",title:"Satisfaction Score",subtitle:"4.6/5",description:"Based on 234 reviews"}]}});if(U.includes("task")||U.includes("todo")||U.includes("work")||U.includes("completed"))O.push({type:"list",id:`widget-${Date.now()}-tasks`,props:{items:[{id:"task-1",title:"Implement user authentication",subtitle:"Created just now",description:"Added OAuth 2.0 support with Google and GitHub providers",backgroundColor:"rgba(59, 130, 246, 0.15)",metadata:{status:"created",priority:"high",tags:["backend","security"]}},{id:"task-2",title:"Update API documentation",subtitle:"Modified 2 minutes ago",description:"Changed endpoint descriptions and added new examples",backgroundColor:"rgba(234, 179, 8, 0.15)",metadata:{status:"modified",priority:"medium",tags:["docs"]}},{id:"task-3",title:"Fix login redirect bug",subtitle:"Completed 5 minutes ago",description:"Users now properly redirected after successful login",backgroundColor:"rgba(34, 197, 94, 0.15)",metadata:{status:"completed",priority:"urgent",tags:["bugfix","auth"]}}]},actions:[{type:"view_task",label:"View",handler:"client",payload:{}},{type:"undo",label:"Undo",handler:"server",payload:{}}]}),q={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(U.includes("analyze")||U.includes("analysis"))q={type:"send_notification",payload:{recipient:"team@company.com",subject:"Analysis Complete",message:"Your requested analysis has been completed and is ready for review."}};return{message:G,widgets:O,action:q}}function mA(Y,G,U,O,q=30){let{message:R,widgets:K}=DA(Y),_=R.split(" "),A=0,b=setInterval(()=>{try{if(A<_.length)G({type:"token",content:_[A]+" "}),A++;else{clearInterval(b),K.forEach((M)=>{G({type:"widget",widget:M})});let P=`mock_thread_${Date.now()}`;G({type:"complete"}),U(P)}}catch(P){clearInterval(b),O(P instanceof Error?P:Error("Mock streaming error"))}},q)}function EA(Y){return new Promise((G,U)=>{let O=new FileReader;O.onload=()=>{let R=O.result.split(",")[1];G(R)},O.onerror=()=>U(Error("Failed to read file")),O.readAsDataURL(Y)})}function uA(Y){if(Y.startsWith("image/"))return"image";return"document"}function gA(Y){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(Y.type)}async function xA(Y){let G=await EA(Y);return{type:uA(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function jA(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>xA(O)))}async function cK(Y,G){if(!G||G.length===0)return Y;let U=[];if(Y.trim())U.push({type:"text",text:Y.trim()});let O=await jA(G);return U.push(...O),U}function q3(Y){if(Y<1024)return`${Y} B`;if(Y<1048576)return`${(Y/1024).toFixed(1)} KB`;return`${(Y/1048576).toFixed(1)} MB`}var dK=10485760;function oK(Y){if(!gA(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>dK)return{valid:!1,error:`File too large: ${q3(Y.size)} (max ${q3(dK)})`};return{valid:!0}}var pA=["list","table"];function cA(Y){let G=[],U=!1,O=Y.match(/"items"\s*:\s*\[/);if(!O)return{items:G,isStreaming:!1};let q=Y.indexOf("[",O.index);if(q===-1)return{items:G,isStreaming:!0};let R=0,K=!1,_=!1,A=-1;for(let M=q+1;M<Y.length;M++){let w=Y[M];if(_){_=!1;continue}if(w==="\\"&&K){_=!0;continue}if(w==='"'){K=!K;continue}if(K)continue;if(w==="{"){if(R===0)A=M;R++}else if(w==="}"){if(R--,R===0&&A!==-1){let f=Y.slice(A,M+1);try{let v=JSON.parse(f);if(!v.id)v.id=`item-${G.length}-${aG(f)}`;G.push(v)}catch(v){}A=-1}}else if(w==="]"&&R===0){U=!1;break}}if(R>0||A!==-1)U=!0;let b=Y.slice(q);if(nG(b,0)===-1)U=!0;return{items:G,isStreaming:U}}function aG(Y){let G=0;for(let U=0;U<Y.length;U++){let O=Y.charCodeAt(U);G=(G<<5)-G+O,G=G&G}return Math.abs(G).toString(36)}function nG(Y,G){let U=0,O=!1,q=!1;for(let R=G;R<Y.length;R++){let K=Y[R];if(q){q=!1;continue}if(K==="\\"&&O){q=!0;continue}if(K==='"'){O=!O;continue}if(O)continue;if(K==="["||K==="{")U++;else if(K==="]"||K==="}"){if(U--,U===0)return R}}return-1}function G3(Y){let G=[],U=!1,O=!1,q=0,R=null,K=Y,_=Y.lastIndexOf("@ui:");if(_!==-1){let P=Y.slice(_),M=P.match(/^@ui:(\w+)/);if(M){let w=M[1],f=P.indexOf("[");if(f===-1)K=Y.slice(0,_),R=w,O=!0;else{let v=_+f;if(nG(Y,v)===-1)if(pA.includes(w)){let g=Y.slice(v+1),{items:C,isStreaming:V}=cA(g);if(C.length>0){K=Y.slice(0,_);let k=`widget-${w}-streaming-${aG(g)}`,x=K.replace(/[\s:;\-–—\.]+$/g,"").trim();if(x)G.push({type:"text",content:x});G.push({type:"widget",widget:{type:w,id:k,props:w==="table"?{rows:C,columns:[]}:{items:C},isStreaming:V}}),U=!0,O=!1,K=""}else K=Y.slice(0,_),R=w,O=!0}else K=Y.slice(0,_),R=w,O=!0}}}if(O)K=K.replace(/[\s:;\-–—\.]+$/g,"");let A=/@ui:(\w+)\[/g,b;while((b=A.exec(K))!==null){let P=b[1],M=b.index+b[0].length-1,w=nG(K,M);if(w===-1)continue;let f=K.slice(M+1,w);if(b.index>q){let v=K.slice(q,b.index).trim();if(v)G.push({type:"text",content:v})}try{let v=f.trim(),m=JSON.parse(v),g=`widget-${P}-${aG(v)}`,{metadata:C,actions:V,...k}=m;G.push({type:"widget",widget:{type:P,id:g,props:k,...V&&{actions:V},...C&&{metadata:C}}}),U=!0}catch(v){}q=w+1,A.lastIndex=q}if(q<K.length){let P=K.slice(q).trim();if(P)G.push({type:"text",content:P})}if(G.length===0&&K.trim())G.push({type:"text",content:K.trim()});if(R)G.push({type:"widget_pending",pendingType:R});return{segments:G,hasWidgets:U,hasPendingWidget:O}}var aK={card:{schema:"title, description?, image?, footer?, actions?: [{type, label}]",example:'@ui:card[{"title": "Summary", "description": "Details here"}]'},list:{schema:"items: [{id, title, subtitle?, description?, image?, metadata?: {any extra data}}], actions?: [{type, label}] - metadata is sent as action payload when clicked",example:'@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "metadata": {"key": "value"}}]}]'},button_group:{schema:"buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",example:'@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'},form:{schema:"title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",example:'@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'},table:{schema:"columns: [{key, label}], rows: [...], striped?, compact?",example:'@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'},image:{schema:"src, alt, caption?",example:'@ui:image[{"src": "url", "alt": "desc"}]'},chart:{schema:"chartType: line|bar|pie, data: {labels, datasets}",example:'@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'},flow:{schema:"title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",example:'@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'}},dA=Object.keys(aK),lA=["flow"],nK=dA.filter((Y)=>!lA.includes(Y));function iA(Y){let G=Y||nK,U=`
|
|
176
176
|
## UI Widgets
|
|
177
177
|
SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
|
|
178
178
|
CORRECT: @ui:list[{"items": [...]}]
|
|
@@ -183,21 +183,21 @@ WRONG: @ui:list{"items": [...]} (missing square brackets)
|
|
|
183
183
|
Per-item "metadata" is sent as payload on action click.
|
|
184
184
|
`,U}function oA(Y){return`
|
|
185
185
|
Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(Y||nK).join(", ")}. Per-item "metadata" is sent as action payload.
|
|
186
|
-
`}function aA({widget:Y,onAction:G}){let{title:U,description:O,image:q,footer:R}=Y.props;return X6.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[q&&X6.jsx("img",{src:q,alt:U,className:"w-full h-48 object-cover"}),X6.jsxs("div",{className:"p-4",children:[X6.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:U}),O&&X6.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(R||Y.actions&&Y.actions.length>0)&&X6.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[R&&X6.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:R}),Y.actions&&Y.actions.length>0&&X6.jsx("div",{className:"flex gap-2",children:Y.actions.map((K,_)=>X6.jsx("button",{onClick:()=>G?.({type:K.type,payload:K.payload,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:K.label},_))})]})]})}function nA({widget:Y,onAction:G}){let{items:U}=Y.props,O=Y.isStreaming??!1,q=DQ.useRef(new Set),[R,K]=DQ.useState(new Set);return DQ.useEffect(()=>{let _=new Set(U.map((b)=>b.id)),A=new Set;if(U.forEach((b)=>{if(!q.current.has(b.id))A.add(b.id)}),U.forEach((b)=>q.current.add(b.id)),A.size>0){K(A);let b=setTimeout(()=>{K(new Set)},500);return()=>clearTimeout(b)}},[U]),m7.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[U.map((_,A)=>{let b=R.has(_.id),P=A===U.length-1;return m7.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!P||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!_.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${b?"apteva-list-item-new":""}`,style:_.backgroundColor?{backgroundColor:_.backgroundColor}:void 0,children:[_.image&&m7.jsx("img",{src:_.image,alt:_.title,className:"w-16 h-16 rounded object-cover"}),m7.jsxs("div",{className:`flex-1 ${_.image?"ml-4":""}`,children:[m7.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:_.title}),_.subtitle&&m7.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:_.subtitle}),_.description&&m7.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:_.description})]}),Y.actions&&Y.actions.length>0&&m7.jsx("div",{className:"flex gap-2",children:Y.actions.map((M,w)=>m7.jsx("button",{onClick:()=>G?.({type:M.type,payload:_.metadata||_,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:M.label},w))})]},_.id)}),O&&m7.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[m7.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),m7.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function rA({widget:Y,onAction:G}){let{label:U,variant:O="primary",disabled:q=!1}=Y.props;return tK.jsx("button",{onClick:()=>Y.actions?.[0]&&G?.({type:Y.actions[0].type,payload:Y.actions[0].payload,widgetId:Y.id,timestamp:new Date}),disabled:q,className:M4("px-4 py-2 rounded-lg font-medium transition-colors",{primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-500 !text-white hover:bg-neutral-600",outline:"border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",ghost:"!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"}[O],{"opacity-50 cursor-not-allowed":q}),children:U})}function tA({widget:Y,onAction:G}){let{layout:U="horizontal",buttons:O}=Y.props,q={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},R=(K)=>{return Y.actions?.find((_)=>_.payload?.buttonId===K)||Y.actions?.[0]};return rG.jsx("div",{className:M4("flex gap-2",U==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((K)=>{let _=R(K.id);return rG.jsx("button",{onClick:()=>{if(_)G?.({type:_.type,payload:{..._.payload,buttonId:K.id},widgetId:Y.id,timestamp:new Date})},className:M4("px-4 py-2 rounded-lg font-medium transition-colors text-sm",q[K.variant||"secondary"]),children:K.label},K.id)})})}function sA({widget:Y,onAction:G}){let{columns:U,rows:O,caption:q,compact:R=!1,striped:K=!1}=Y.props,_=Y.isStreaming??!1,A=mQ.useRef(new Set),[b,P]=mQ.useState(new Set);mQ.useEffect(()=>{let w=new Set;if(O.forEach((f,v)=>{let m=f.id||`row-${v}`;if(!A.current.has(m))w.add(m)}),O.forEach((f,v)=>{let m=f.id||`row-${v}`;A.current.add(m)}),w.size>0){P(w);let f=setTimeout(()=>{P(new Set)},500);return()=>clearTimeout(f)}},[O]);let M=(w)=>{switch(w){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return n4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:n4.jsx("div",{className:"overflow-x-auto",children:n4.jsxs("table",{className:"w-full",children:[q&&n4.jsx("caption",{className:"px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:q}),n4.jsx("thead",{children:n4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:U.map((w)=>n4.jsx("th",{className:M4("font-semibold text-neutral-900 dark:text-white",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",M(w.align)),style:w.width?{width:w.width}:void 0,children:w.label},w.key))})}),n4.jsxs("tbody",{children:[O.map((w,f)=>{let v=w.id||`row-${f}`,m=b.has(v);return n4.jsx("tr",{className:M4("apteva-table-row border-b border-neutral-200 dark:border-neutral-700 last:border-b-0","transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",K&&f%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",m&&"apteva-table-row-new"),onClick:()=>{if(Y.actions&&Y.actions.length>0)G?.({type:Y.actions[0].type,payload:w,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:U.map((g)=>n4.jsx("td",{className:M4("text-neutral-700 dark:text-neutral-300",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",M(g.align)),children:w[g.key]??"—"},g.key))},v)}),O.length===0&&!_&&n4.jsx("tr",{children:n4.jsx("td",{colSpan:U.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),_&&n4.jsx("tr",{className:"apteva-table-streaming",children:n4.jsx("td",{colSpan:U.length||1,className:"px-4 py-3 text-center",children:n4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[n4.jsxs("div",{className:"flex gap-1",children:[n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),n4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function eA({widget:Y,onAction:G}){let{title:U,fields:O}=Y.props,[q,R]=sK.useState(()=>{let P={};return O.forEach((M)=>{P[M.name]=M.defaultValue??(M.type==="checkbox"?!1:"")}),P}),K=(P,M)=>{R((w)=>({...w,[P]:M}))},_=(P)=>{if(P.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:q},widgetId:Y.id,timestamp:new Date})},A=(P)=>{switch(P.type){case"text":case"password":case"number":case"date":return _7.jsx("input",{type:P.type,name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,P.type==="number"?Number(w.target.value):w.target.value),placeholder:P.placeholder,required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return _7.jsx("textarea",{name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,w.target.value),placeholder:P.placeholder,required:P.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return _7.jsxs("select",{name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,w.target.value),required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[_7.jsx("option",{value:"",children:P.placeholder||"Select..."}),P.options?.map((w)=>_7.jsx("option",{value:w.value,children:w.label},w.value))]});case"checkbox":return _7.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[_7.jsx("input",{type:"checkbox",name:P.name,checked:q[P.name]||!1,onChange:(w)=>K(P.name,w.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),_7.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:P.label})]});default:return null}},b=Y.actions?.find((P)=>P.type==="submit")||Y.actions?.[0];return _7.jsxs("form",{onSubmit:_,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[_7.jsxs("div",{className:"p-4",children:[U&&_7.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:U}),_7.jsx("div",{className:"space-y-3",children:O.map((P)=>_7.jsxs("div",{className:P.type==="checkbox"?"":"space-y-1",children:[P.type!=="checkbox"&&_7.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[P.label,P.required&&_7.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),A(P)]},P.name))})]}),b&&_7.jsx("div",{className:"px-4 pb-4",children:_7.jsx("button",{type:"submit",className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:b.label||"Submit"})})]})}function zI({widget:Y}){let{src:G,alt:U,caption:O}=Y.props;return mZ.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[mZ.jsx("img",{src:G,alt:U,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&mZ.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function QI({type:Y,status:G}){if(G==="completed")return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return D0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let U="w-4 h-4";if(Y==="time"||Y==="schedule"||Y==="clock")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if(Y==="recurring"||Y==="repeat")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})});if(Y==="agent"||Y?.startsWith("@"))return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})});if(Y==="email"||Y==="mail")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})});if(Y==="slack"||Y==="message"||Y==="chat")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})});if(Y==="webhook"||Y==="api")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});if(Y==="build"||Y==="compile"||Y==="package")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})});if(Y==="test"||Y==="check"||Y==="verify")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})});if(Y==="generate"||Y==="create"||Y==="document"||Y==="file")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})});if(Y==="review"||Y==="inspect"||Y==="eye")return D0.jsxs("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]});if(Y==="analyze"||Y==="research"||Y==="chart")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})});if(Y==="scrape"||Y==="crawl"||Y==="spider")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})});if(Y==="data"||Y==="database"||Y==="storage")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})});if(Y==="notification"||Y==="bell"||Y==="alert")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})});if(Y==="transform"||Y==="process"||Y==="convert")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return D0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function XI({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})});if(Y==="recurring"||Y==="repeat"||Y==="sync")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})});if(Y==="analyze"||Y==="analysis"||Y==="chart")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})})});if(Y==="data"||Y==="pipeline"||Y==="etl")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})});return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})})}function ZI(){return D0.jsx("svg",{className:"w-4 h-4 text-neutral-400 dark:text-neutral-500 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var Q6={blue:"bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-300 dark:border-blue-500",purple:"bg-purple-100 dark:bg-purple-900/40 !text-purple-700 dark:!text-purple-300 border-purple-300 dark:border-purple-500",cyan:"bg-cyan-100 dark:bg-cyan-900/40 !text-cyan-700 dark:!text-cyan-300 border-cyan-300 dark:border-cyan-500",amber:"bg-amber-100 dark:bg-amber-900/40 !text-amber-700 dark:!text-amber-300 border-amber-300 dark:border-amber-500",emerald:"bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-300 dark:border-emerald-500",rose:"bg-rose-100 dark:bg-rose-900/40 !text-rose-700 dark:!text-rose-300 border-rose-300 dark:border-rose-500",indigo:"bg-indigo-100 dark:bg-indigo-900/40 !text-indigo-700 dark:!text-indigo-300 border-indigo-300 dark:border-indigo-500",orange:"bg-orange-100 dark:bg-orange-900/40 !text-orange-700 dark:!text-orange-300 border-orange-300 dark:border-orange-500",neutral:"bg-neutral-100 dark:bg-neutral-800 !text-neutral-600 dark:!text-neutral-300 border-neutral-300 dark:border-neutral-600"};function JI(Y,G){if(Y.color&&Q6[Y.color])return Q6[Y.color];if(G==="time"||G==="schedule"||G==="clock")return Q6.blue;if(G==="agent"||G?.startsWith("@"))return Q6.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return Q6.cyan;if(G==="generate"||G==="document"||G==="create")return Q6.amber;if(G==="deploy"||G==="rocket"||G==="launch")return Q6.rose;if(G==="build"||G==="compile"||G==="package")return Q6.indigo;if(G==="test"||G==="check"||G==="verify")return Q6.emerald;if(G==="data"||G==="database"||G==="storage")return Q6.orange;return Q6.blue}function YI({widget:Y}){let{title:G,subtitle:U,icon:O,steps:q}=Y.props;return D0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[D0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[D0.jsx(XI,{icon:O}),D0.jsxs("div",{className:"flex-1 min-w-0",children:[D0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),U&&D0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:U})]})]}),D0.jsx("div",{className:"px-4 pb-4",children:D0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:q.map((R,K)=>{let _=K===q.length-1,A=R.status==="active",b=R.status==="completed",P=R.status==="error",M=R.status==="skipped",w=R.label,f=R.type;if(!f)if(w.startsWith("@"))f="agent";else if(/^\d+[ap]m$/i.test(w)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(w))f="time";else{let g=w.toLowerCase();f={test:"test",build:"build",push:"push",deploy:"deploy",email:"email",slack:"slack",generate:"generate",review:"review",analyze:"analyze",scrape:"scrape",transform:"transform",notify:"notification",alert:"notification",webhook:"webhook",api:"api",data:"data",process:"process"}[g]}let v,m="";if(A)v="bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-400 dark:border-blue-400 ring-2 ring-blue-400";else if(b)v="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(P)v="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(M)v="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",m="line-through";else v=JI(R,f);return D0.jsxs("div",{className:"flex items-center gap-2",children:[D0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${v} ${m}`,children:[D0.jsx(QI,{type:f,status:R.status}),w]}),!_&&D0.jsx(ZI,{})]},R.id)})})})]})}function tG({widget:Y,onAction:G}){return W5.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return W5.jsx(aA,{widget:Y,onAction:G});case"list":return W5.jsx(nA,{widget:Y,onAction:G});case"button":return W5.jsx(rA,{widget:Y,onAction:G});case"button_group":return W5.jsx(tA,{widget:Y,onAction:G});case"table":return W5.jsx(sA,{widget:Y,onAction:G});case"form":return W5.jsx(eA,{widget:Y,onAction:G});case"image":return W5.jsx(zI,{widget:Y});case"flow":return W5.jsx(YI,{widget:Y});default:return W5.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[W5.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),W5.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function iG({widgets:Y,onAction:G,onWidgetMount:U,layout:O="stack",spacing:q="normal",columns:R=3,className:K}){rK.useEffect(()=>{Y.forEach((b)=>{U?.(b.id)})},[Y,U]);let _={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${R}`,masonry:"columns-1 md:columns-2 lg:columns-3"},A={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return sG.jsx("div",{className:M4(_[O],A[q],K),children:Y.map((b)=>sG.jsx(tG,{widget:b,onAction:G},b.id))})}function lK({type:Y,className:G}){switch(Y){case"card":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:H1.jsxs("div",{className:"p-4 space-y-3",children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((U)=>H1.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[H1.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),H1.jsxs("div",{className:"flex-1 space-y-2",children:[H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),H1.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},U))});case"button_group":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),H1.jsxs("div",{className:"space-y-3",children:[H1.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),H1.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),H1.jsxs("div",{className:"flex items-end gap-2 h-32",children:[H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse",G),children:H1.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((U)=>H1.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},U))});case"map":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse",G),children:H1.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:H1.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[H1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),H1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})})});case"table":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[H1.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((U)=>H1.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},U))]});default:return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function $I(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function Iz(Y,G=""){let U=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,q=0,R,K=0;while((R=O.exec(Y))!==null){if(R.index>q)U.push(Y.slice(q,R.index));if(R[1]!==void 0||R[2]!==void 0){let _=R[1]||"",A=R[2];U.push(g4.jsx("img",{src:A,alt:_,className:"apteva-md-img"},`${G}img${K++}`))}else if(R[3]!==void 0||R[4]!==void 0){let _=R[3],A=R[4];if($I(A))U.push(g4.jsx("img",{src:A,alt:_,className:"apteva-md-img"},`${G}img${K++}`));else U.push(g4.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:_},`${G}a${K++}`))}else if(R[5]!==void 0)U.push(g4.jsx("strong",{children:R[6]},`${G}b${K++}`));else if(R[7]!==void 0)U.push(g4.jsx("code",{className:"apteva-md-inline-code",children:R[7]},`${G}code${K++}`));q=R.index+R[0].length}if(q<Y.length)U.push(Y.slice(q));return U.length>0?U:[Y]}function HI(Y){let G=Y.split(`
|
|
186
|
+
`}function aA({widget:Y,onAction:G}){let{title:U,description:O,image:q,footer:R}=Y.props;return Z6.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[q&&Z6.jsx("img",{src:q,alt:U,className:"w-full h-48 object-cover"}),Z6.jsxs("div",{className:"p-4",children:[Z6.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:U}),O&&Z6.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(R||Y.actions&&Y.actions.length>0)&&Z6.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[R&&Z6.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:R}),Y.actions&&Y.actions.length>0&&Z6.jsx("div",{className:"flex gap-2",children:Y.actions.map((K,_)=>Z6.jsx("button",{onClick:()=>G?.({type:K.type,payload:K.payload,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:K.label},_))})]})]})}function nA({widget:Y,onAction:G}){let{items:U}=Y.props,O=Y.isStreaming??!1,q=DQ.useRef(new Set),[R,K]=DQ.useState(new Set);return DQ.useEffect(()=>{let _=new Set(U.map((b)=>b.id)),A=new Set;if(U.forEach((b)=>{if(!q.current.has(b.id))A.add(b.id)}),U.forEach((b)=>q.current.add(b.id)),A.size>0){K(A);let b=setTimeout(()=>{K(new Set)},500);return()=>clearTimeout(b)}},[U]),m7.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[U.map((_,A)=>{let b=R.has(_.id),P=A===U.length-1;return m7.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!P||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!_.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${b?"apteva-list-item-new":""}`,style:_.backgroundColor?{backgroundColor:_.backgroundColor}:void 0,children:[_.image&&m7.jsx("img",{src:_.image,alt:_.title,className:"w-16 h-16 rounded object-cover"}),m7.jsxs("div",{className:`flex-1 ${_.image?"ml-4":""}`,children:[m7.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:_.title}),_.subtitle&&m7.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:_.subtitle}),_.description&&m7.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:_.description})]}),Y.actions&&Y.actions.length>0&&m7.jsx("div",{className:"flex gap-2",children:Y.actions.map((M,w)=>m7.jsx("button",{onClick:()=>G?.({type:M.type,payload:_.metadata||_,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:M.label},w))})]},_.id)}),O&&m7.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[m7.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),m7.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),m7.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function rA({widget:Y,onAction:G}){let{label:U,variant:O="primary",disabled:q=!1}=Y.props;return tK.jsx("button",{onClick:()=>Y.actions?.[0]&&G?.({type:Y.actions[0].type,payload:Y.actions[0].payload,widgetId:Y.id,timestamp:new Date}),disabled:q,className:M4("px-4 py-2 rounded-lg font-medium transition-colors",{primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-500 !text-white hover:bg-neutral-600",outline:"border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",ghost:"!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"}[O],{"opacity-50 cursor-not-allowed":q}),children:U})}function tA({widget:Y,onAction:G}){let{layout:U="horizontal",buttons:O}=Y.props,q={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},R=(K)=>{return Y.actions?.find((_)=>_.payload?.buttonId===K)||Y.actions?.[0]};return rG.jsx("div",{className:M4("flex gap-2",U==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((K)=>{let _=R(K.id);return rG.jsx("button",{onClick:()=>{if(_)G?.({type:_.type,payload:{..._.payload,buttonId:K.id},widgetId:Y.id,timestamp:new Date})},className:M4("px-4 py-2 rounded-lg font-medium transition-colors text-sm",q[K.variant||"secondary"]),children:K.label},K.id)})})}function sA({widget:Y,onAction:G}){let{columns:U,rows:O,caption:q,compact:R=!1,striped:K=!1}=Y.props,_=Y.isStreaming??!1,A=mQ.useRef(new Set),[b,P]=mQ.useState(new Set);mQ.useEffect(()=>{let w=new Set;if(O.forEach((f,v)=>{let m=f.id||`row-${v}`;if(!A.current.has(m))w.add(m)}),O.forEach((f,v)=>{let m=f.id||`row-${v}`;A.current.add(m)}),w.size>0){P(w);let f=setTimeout(()=>{P(new Set)},500);return()=>clearTimeout(f)}},[O]);let M=(w)=>{switch(w){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return n4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:n4.jsx("div",{className:"overflow-x-auto",children:n4.jsxs("table",{className:"w-full",children:[q&&n4.jsx("caption",{className:"px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:q}),n4.jsx("thead",{children:n4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:U.map((w)=>n4.jsx("th",{className:M4("font-semibold text-neutral-900 dark:text-white",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",M(w.align)),style:w.width?{width:w.width}:void 0,children:w.label},w.key))})}),n4.jsxs("tbody",{children:[O.map((w,f)=>{let v=w.id||`row-${f}`,m=b.has(v);return n4.jsx("tr",{className:M4("apteva-table-row border-b border-neutral-200 dark:border-neutral-700 last:border-b-0","transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",K&&f%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",m&&"apteva-table-row-new"),onClick:()=>{if(Y.actions&&Y.actions.length>0)G?.({type:Y.actions[0].type,payload:w,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:U.map((g)=>n4.jsx("td",{className:M4("text-neutral-700 dark:text-neutral-300",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",M(g.align)),children:w[g.key]??"—"},g.key))},v)}),O.length===0&&!_&&n4.jsx("tr",{children:n4.jsx("td",{colSpan:U.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),_&&n4.jsx("tr",{className:"apteva-table-streaming",children:n4.jsx("td",{colSpan:U.length||1,className:"px-4 py-3 text-center",children:n4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[n4.jsxs("div",{className:"flex gap-1",children:[n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),n4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),n4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function eA({widget:Y,onAction:G}){let{title:U,fields:O}=Y.props,[q,R]=sK.useState(()=>{let P={};return O.forEach((M)=>{P[M.name]=M.defaultValue??(M.type==="checkbox"?!1:"")}),P}),K=(P,M)=>{R((w)=>({...w,[P]:M}))},_=(P)=>{if(P.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:q},widgetId:Y.id,timestamp:new Date})},A=(P)=>{switch(P.type){case"text":case"password":case"number":case"date":return _7.jsx("input",{type:P.type,name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,P.type==="number"?Number(w.target.value):w.target.value),placeholder:P.placeholder,required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return _7.jsx("textarea",{name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,w.target.value),placeholder:P.placeholder,required:P.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return _7.jsxs("select",{name:P.name,value:q[P.name]||"",onChange:(w)=>K(P.name,w.target.value),required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[_7.jsx("option",{value:"",children:P.placeholder||"Select..."}),P.options?.map((w)=>_7.jsx("option",{value:w.value,children:w.label},w.value))]});case"checkbox":return _7.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[_7.jsx("input",{type:"checkbox",name:P.name,checked:q[P.name]||!1,onChange:(w)=>K(P.name,w.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),_7.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:P.label})]});default:return null}},b=Y.actions?.find((P)=>P.type==="submit")||Y.actions?.[0];return _7.jsxs("form",{onSubmit:_,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[_7.jsxs("div",{className:"p-4",children:[U&&_7.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:U}),_7.jsx("div",{className:"space-y-3",children:O.map((P)=>_7.jsxs("div",{className:P.type==="checkbox"?"":"space-y-1",children:[P.type!=="checkbox"&&_7.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[P.label,P.required&&_7.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),A(P)]},P.name))})]}),b&&_7.jsx("div",{className:"px-4 pb-4",children:_7.jsx("button",{type:"submit",className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:b.label||"Submit"})})]})}function zI({widget:Y}){let{src:G,alt:U,caption:O}=Y.props;return mZ.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[mZ.jsx("img",{src:G,alt:U,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&mZ.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function QI({type:Y,status:G}){if(G==="completed")return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return D0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let U="w-4 h-4";if(Y==="time"||Y==="schedule"||Y==="clock")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if(Y==="recurring"||Y==="repeat")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})});if(Y==="agent"||Y?.startsWith("@"))return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})});if(Y==="email"||Y==="mail")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})});if(Y==="slack"||Y==="message"||Y==="chat")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})});if(Y==="webhook"||Y==="api")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});if(Y==="build"||Y==="compile"||Y==="package")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})});if(Y==="test"||Y==="check"||Y==="verify")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})});if(Y==="generate"||Y==="create"||Y==="document"||Y==="file")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})});if(Y==="review"||Y==="inspect"||Y==="eye")return D0.jsxs("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]});if(Y==="analyze"||Y==="research"||Y==="chart")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})});if(Y==="scrape"||Y==="crawl"||Y==="spider")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})});if(Y==="data"||Y==="database"||Y==="storage")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})});if(Y==="notification"||Y==="bell"||Y==="alert")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})});if(Y==="transform"||Y==="process"||Y==="convert")return D0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return D0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function XI({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})});if(Y==="recurring"||Y==="repeat"||Y==="sync")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})});if(Y==="analyze"||Y==="analysis"||Y==="chart")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})})});if(Y==="data"||Y==="pipeline"||Y==="etl")return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})});return D0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:D0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})})}function ZI(){return D0.jsx("svg",{className:"w-4 h-4 text-neutral-400 dark:text-neutral-500 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var X6={blue:"bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-300 dark:border-blue-500",purple:"bg-purple-100 dark:bg-purple-900/40 !text-purple-700 dark:!text-purple-300 border-purple-300 dark:border-purple-500",cyan:"bg-cyan-100 dark:bg-cyan-900/40 !text-cyan-700 dark:!text-cyan-300 border-cyan-300 dark:border-cyan-500",amber:"bg-amber-100 dark:bg-amber-900/40 !text-amber-700 dark:!text-amber-300 border-amber-300 dark:border-amber-500",emerald:"bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-300 dark:border-emerald-500",rose:"bg-rose-100 dark:bg-rose-900/40 !text-rose-700 dark:!text-rose-300 border-rose-300 dark:border-rose-500",indigo:"bg-indigo-100 dark:bg-indigo-900/40 !text-indigo-700 dark:!text-indigo-300 border-indigo-300 dark:border-indigo-500",orange:"bg-orange-100 dark:bg-orange-900/40 !text-orange-700 dark:!text-orange-300 border-orange-300 dark:border-orange-500",neutral:"bg-neutral-100 dark:bg-neutral-800 !text-neutral-600 dark:!text-neutral-300 border-neutral-300 dark:border-neutral-600"};function JI(Y,G){if(Y.color&&X6[Y.color])return X6[Y.color];if(G==="time"||G==="schedule"||G==="clock")return X6.blue;if(G==="agent"||G?.startsWith("@"))return X6.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return X6.cyan;if(G==="generate"||G==="document"||G==="create")return X6.amber;if(G==="deploy"||G==="rocket"||G==="launch")return X6.rose;if(G==="build"||G==="compile"||G==="package")return X6.indigo;if(G==="test"||G==="check"||G==="verify")return X6.emerald;if(G==="data"||G==="database"||G==="storage")return X6.orange;return X6.blue}function YI({widget:Y}){let{title:G,subtitle:U,icon:O,steps:q}=Y.props;return D0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[D0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[D0.jsx(XI,{icon:O}),D0.jsxs("div",{className:"flex-1 min-w-0",children:[D0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),U&&D0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:U})]})]}),D0.jsx("div",{className:"px-4 pb-4",children:D0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:q.map((R,K)=>{let _=K===q.length-1,A=R.status==="active",b=R.status==="completed",P=R.status==="error",M=R.status==="skipped",w=R.label,f=R.type;if(!f)if(w.startsWith("@"))f="agent";else if(/^\d+[ap]m$/i.test(w)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(w))f="time";else{let g=w.toLowerCase();f={test:"test",build:"build",push:"push",deploy:"deploy",email:"email",slack:"slack",generate:"generate",review:"review",analyze:"analyze",scrape:"scrape",transform:"transform",notify:"notification",alert:"notification",webhook:"webhook",api:"api",data:"data",process:"process"}[g]}let v,m="";if(A)v="bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-400 dark:border-blue-400 ring-2 ring-blue-400";else if(b)v="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(P)v="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(M)v="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",m="line-through";else v=JI(R,f);return D0.jsxs("div",{className:"flex items-center gap-2",children:[D0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${v} ${m}`,children:[D0.jsx(QI,{type:f,status:R.status}),w]}),!_&&D0.jsx(ZI,{})]},R.id)})})})]})}function tG({widget:Y,onAction:G}){return W5.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return W5.jsx(aA,{widget:Y,onAction:G});case"list":return W5.jsx(nA,{widget:Y,onAction:G});case"button":return W5.jsx(rA,{widget:Y,onAction:G});case"button_group":return W5.jsx(tA,{widget:Y,onAction:G});case"table":return W5.jsx(sA,{widget:Y,onAction:G});case"form":return W5.jsx(eA,{widget:Y,onAction:G});case"image":return W5.jsx(zI,{widget:Y});case"flow":return W5.jsx(YI,{widget:Y});default:return W5.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[W5.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),W5.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function iG({widgets:Y,onAction:G,onWidgetMount:U,layout:O="stack",spacing:q="normal",columns:R=3,className:K}){rK.useEffect(()=>{Y.forEach((b)=>{U?.(b.id)})},[Y,U]);let _={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${R}`,masonry:"columns-1 md:columns-2 lg:columns-3"},A={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return sG.jsx("div",{className:M4(_[O],A[q],K),children:Y.map((b)=>sG.jsx(tG,{widget:b,onAction:G},b.id))})}function lK({type:Y,className:G}){switch(Y){case"card":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:H1.jsxs("div",{className:"p-4 space-y-3",children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((U)=>H1.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[H1.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),H1.jsxs("div",{className:"flex-1 space-y-2",children:[H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),H1.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},U))});case"button_group":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),H1.jsxs("div",{className:"space-y-3",children:[H1.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),H1.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),H1.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),H1.jsxs("div",{className:"flex items-end gap-2 h-32",children:[H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),H1.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse",G),children:H1.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((U)=>H1.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},U))});case"map":return H1.jsx("div",{className:M4("apteva-widget-skeleton animate-pulse",G),children:H1.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:H1.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[H1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),H1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})})});case"table":return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[H1.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((U)=>H1.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),H1.jsx("div",{className:"flex-1 px-4 py-3",children:H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},U))]});default:return H1.jsxs("div",{className:M4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[H1.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),H1.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function $I(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function Iz(Y,G=""){let U=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,q=0,R,K=0;while((R=O.exec(Y))!==null){if(R.index>q)U.push(Y.slice(q,R.index));if(R[1]!==void 0||R[2]!==void 0){let _=R[1]||"",A=R[2];U.push(g4.jsx("img",{src:A,alt:_,className:"apteva-md-img"},`${G}img${K++}`))}else if(R[3]!==void 0||R[4]!==void 0){let _=R[3],A=R[4];if($I(A))U.push(g4.jsx("img",{src:A,alt:_,className:"apteva-md-img"},`${G}img${K++}`));else U.push(g4.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:_},`${G}a${K++}`))}else if(R[5]!==void 0)U.push(g4.jsx("strong",{children:R[6]},`${G}b${K++}`));else if(R[7]!==void 0)U.push(g4.jsx("code",{className:"apteva-md-inline-code",children:R[7]},`${G}code${K++}`));q=R.index+R[0].length}if(q<Y.length)U.push(Y.slice(q));return U.length>0?U:[Y]}function HI(Y){let G=Y.split(`
|
|
187
187
|
`),U=[],O=0,q=0;while(q<G.length){let R=G[q],K=R.match(/^##\s+(.*)$/);if(K){U.push(g4.jsx("h2",{className:"apteva-md-h2",children:Iz(K[1],`${O}`)},`h2${O++}`)),q++;continue}let _=R.match(/^###\s+(.*)$/);if(_){U.push(g4.jsx("h3",{className:"apteva-md-h3",children:Iz(_[1],`${O}`)},`h3${O++}`)),q++;continue}let A=R.match(/^(\s*)([-*+])\s+(.*)$/);if(A){let M=[],w=A[1].length;while(q<G.length){let f=G[q].match(/^(\s*)([-*+])\s+(.*)$/);if(f&&f[1].length===w)M.push(g4.jsx("li",{className:"apteva-md-li",children:Iz(f[3],`${O}`)},`li${O++}`)),q++;else break}U.push(g4.jsx("ul",{className:"apteva-md-ul",children:M},`ul${O++}`));continue}let b=R.match(/^(\s*)(\d+)\.\s+(.*)$/);if(b){let M=[],w=b[1].length;while(q<G.length){let f=G[q].match(/^(\s*)(\d+)\.\s+(.*)$/);if(f&&f[1].length===w)M.push(g4.jsx("li",{className:"apteva-md-li",children:Iz(f[3],`${O}`)},`li${O++}`)),q++;else break}U.push(g4.jsx("ol",{className:"apteva-md-ol",children:M},`ol${O++}`));continue}if(R.match(/^\|(.+)\|$/)&&q+1<G.length){if(G[q+1].match(/^\|([\s:-]+\|)+$/)){let f=R.split("|").filter((m)=>m.trim()!=="").map((m)=>m.trim());q+=2;let v=[];while(q<G.length)if(G[q].match(/^\|(.+)\|$/)){let g=G[q].split("|").filter((C)=>C.trim()!=="").map((C)=>C.trim());v.push(g),q++}else break;U.push(g4.jsx("div",{className:"apteva-md-table-wrapper",children:g4.jsxs("table",{className:"apteva-md-table",children:[g4.jsx("thead",{children:g4.jsx("tr",{children:f.map((m,g)=>g4.jsx("th",{className:"apteva-md-th",children:Iz(m,`th${O}${g}`)},`th${g}`))})}),g4.jsx("tbody",{children:v.map((m,g)=>g4.jsx("tr",{children:m.map((C,V)=>g4.jsx("td",{className:"apteva-md-td",children:Iz(C,`td${O}${g}${V}`)},`td${V}`))},`tr${g}`))})]})},`table-wrapper${O++}`));continue}}if(R==="")U.push(g4.jsx("br",{},`br${O++}`));else U.push(g4.jsxs("span",{children:[Iz(R,`${O}`),q<G.length-1?`
|
|
188
188
|
`:""]},`p${O++}`));q++}return U}function t6({content:Y,className:G=""}){return g4.jsx("div",{className:`apteva-md ${G}`,children:HI(Y)})}function GI({name:Y,status:G,isReceiving:U=!1,inputLength:O=0,streamOutput:q}){if(G==="preparing")return X4.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[X4.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[X4.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),X4.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),X4.jsxs("span",{className:"apteva-tool-label",children:[X4.jsx("strong",{children:Y}),X4.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(G==="running")return X4.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[X4.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[X4.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),X4.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),X4.jsxs("span",{className:"apteva-tool-label",children:[X4.jsx("strong",{children:Y}),q?X4.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,q?X4.jsx("span",{className:"apteva-tool-stream-output",children:q}):X4.jsxs(X4.Fragment,{children:[X4.jsx("span",{className:"apteva-tool-status-text",children:" running"}),X4.jsxs("span",{className:"apteva-tool-dots",children:[X4.jsx("span",{children:"."}),X4.jsx("span",{children:"."}),X4.jsx("span",{children:"."})]})]})]})]});if(G==="completed")return X4.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[X4.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X4.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),X4.jsx("span",{className:"apteva-tool-label",children:Y})]});return X4.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[X4.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X4.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),X4.jsxs("span",{className:"apteva-tool-label",children:[Y," failed"]})]})}function qI({message:Y,onAction:G,enableWidgets:U,onWidgetRender:O}){let q=Y.role==="user",R=Y.metadata?.content_segments,K=Y.metadata?.isStreaming===!0,_=Y.content||R&&R.length>0,A=Tz.useRef(new Set),b=Tz.useMemo(()=>{if(!U||q||!Y.content)return[];return G3(Y.content).segments.filter((x)=>x.type==="widget"&&!!x.widget).map((x)=>x.widget)},[U,q,Y.content]);Tz.useEffect(()=>{if(O&&Y.widgets){for(let k of Y.widgets)if(!A.current.has(k.id))A.current.add(k.id),O(k)}},[Y.widgets,O]),Tz.useEffect(()=>{if(O&&b.length>0){for(let k of b)if(!A.current.has(k.id))A.current.add(k.id),O(k)}},[b,O]);let P=(k)=>{if(!U||q)return c0.jsx(t6,{content:k});let j=G3(k).segments.filter((u)=>u.type==="text"&&u.content).map((u)=>u.content).join("");if(!j.trim())return null;return c0.jsx(t6,{content:j})},M=()=>{if(!U||q||!Y.content)return null;let k=G3(Y.content),x=[],j="";if(k.segments.forEach((u,p)=>{if(u.type==="text"&&u.content)j+=u.content;else if(u.type==="widget"&&u.widget){if(j.trim())x.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:j})})},`text-${p}`)),j="";x.push(c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(tG,{widget:u.widget,onAction:G})},`widget-${p}`))}else if(u.type==="widget_pending"&&u.pendingType){if(j.trim())x.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:j})})},`text-${p}`)),j="";x.push(c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(lK,{type:u.pendingType})},`pending-${p}`))}}),j.trim())x.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:j})})},"text-final"));return x.length>0?x:null},w=Y.metadata?.attachments||[],f=w.length>0,v=()=>{if(!f)return null;return c0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:w.map((k,x)=>{let j=k.type.startsWith("image/"),u=k.type==="application/pdf";if(j&&k.preview)return c0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:c0.jsx("img",{src:k.preview,alt:k.name,className:"max-w-[150px] max-h-[150px] object-cover"})},x);return c0.jsxs("div",{className:"apteva-attachment-doc flex items-center gap-3 px-4 py-3 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-xl shadow-sm",children:[c0.jsx("div",{className:"w-10 h-10 flex items-center justify-center bg-red-100 dark:bg-red-900/30 rounded-lg text-red-600 dark:text-red-400",children:u?c0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):c0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),c0.jsxs("div",{className:"flex flex-col min-w-0",children:[c0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:k.name}),c0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[u?"PDF":"Document"," · ",q3(k.size)]})]})]},x)})})},m=()=>{if(q)return c0.jsx("div",{className:"apteva-message-text",children:Y.content});if(K&&!_)return c0.jsxs("div",{className:"apteva-typing-indicator",children:[c0.jsx("span",{}),c0.jsx("span",{}),c0.jsx("span",{})]});if(R&&R.length>0)return null;return P(Y.content)},g=(k,x)=>{if(!U)return c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:k})})},x);let j=G3(k),u=[],p="";if(j.segments.forEach((s,a)=>{if(s.type==="text"&&s.content)p+=s.content;else if(s.type==="widget"&&s.widget){if(p.trim())u.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:p})})},`${x}-text-${a}`)),p="";u.push(c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(tG,{widget:s.widget,onAction:G})},`${x}-widget-${a}`))}else if(s.type==="widget_pending"&&s.pendingType){if(p.trim())u.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:p})})},`${x}-text-${a}`)),p="";u.push(c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(lK,{type:s.pendingType})},`${x}-pending-${a}`))}}),p.trim())u.push(c0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:c0.jsx("div",{className:"apteva-message-content-assistant",children:c0.jsx(t6,{content:p})})},`${x}-text-final`));return u},C=()=>{if(!R||R.length===0)return null;let k=[];return R.forEach((x,j)=>{if(x.type==="text"&&x.content){let u=g(x.content,`seg-${j}`);if(Array.isArray(u))k.push(...u);else k.push(u)}else if(x.type==="tool")k.push(c0.jsx("div",{className:"apteva-tool-call-standalone",children:c0.jsx(GI,{name:x.name,status:x.status||(x.result!==void 0?"completed":"running"),isReceiving:x.isReceiving,inputLength:x.inputLength,streamOutput:x.streamOutput})},x.id))}),k};if(!q&&(R&&R.length>0))return c0.jsxs("div",{className:"apteva-message-segmented",children:[C(),Y.widgets&&Y.widgets.length>0&&c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(iG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),c0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let V=M();if(!q&&U&&V)return c0.jsxs("div",{className:"apteva-message-segmented",children:[V,Y.widgets&&Y.widgets.length>0&&c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(iG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),c0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(q&&f)return c0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[v(),Y.content&&c0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:c0.jsx("div",{className:"apteva-message-content-user",children:c0.jsx("div",{className:"apteva-message-text",children:Y.content})})}),c0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return c0.jsxs("div",{className:M4("apteva-message-bubble",q?"apteva-message-user":"apteva-message-assistant"),children:[c0.jsx("div",{className:q?"apteva-message-content-user":"apteva-message-content-assistant",children:m()}),Y.widgets&&Y.widgets.length>0&&c0.jsx("div",{className:"apteva-widget-standalone",children:c0.jsx(iG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),c0.jsx("div",{className:M4("apteva-message-timestamp",q?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var iK=()=>P1.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),oG=()=>P1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function BI({title:Y,subtitle:G,icon:U,prompts:O,variant:q="centered",chatVariant:R="default",onPromptClick:K}){let _=(O||[]).map((P)=>typeof P==="string"?{text:P}:P),A=_.length>0,b=Y||G||U;if(!b&&!A)return P1.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:P1.jsxs("div",{className:"text-center space-y-2",children:[P1.jsx("div",{className:"flex justify-center",children:P1.jsx(iK,{})}),P1.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(q==="minimal")return P1.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[b&&P1.jsxs("div",{className:"mb-4",children:[Y&&P1.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:Y}),G&&P1.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:G})]}),A&&P1.jsx("div",{className:"flex-1 space-y-2",children:_.map((P,M)=>P1.jsx("button",{onClick:()=>K(P.text),className:M4("w-full text-left px-4 py-3 rounded-xl","bg-neutral-50 dark:bg-neutral-800/50","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-100 dark:hover:bg-neutral-800","hover:border-neutral-300 dark:hover:border-neutral-600","transition-all duration-200","group"),children:P1.jsxs("div",{className:"flex items-center gap-3",children:[P1.jsx("div",{className:"flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||P1.jsx(oG,{})}),P1.jsxs("div",{className:"flex-1 min-w-0",children:[P1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:P.text}),P.description&&P1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:P.description})]})]})},M))})]});return P1.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[P1.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[P1.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:U||P1.jsx(iK,{})}),Y&&P1.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:Y}),G&&P1.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:G})]}),A&&P1.jsxs("div",{className:"w-full max-w-2xl",children:[P1.jsx("div",{className:"sm:hidden space-y-2",children:_.map((P,M)=>P1.jsx("button",{onClick:()=>K(P.text),className:M4("w-full text-left px-4 py-3 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","active:scale-[0.98]","transition-all duration-200","shadow-sm hover:shadow","group"),children:P1.jsxs("div",{className:"flex items-center gap-3",children:[P1.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||P1.jsx(oG,{})}),P1.jsxs("div",{className:"flex-1 min-w-0",children:[P1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:P.text}),P.description&&P1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:P.description})]}),P1.jsx("svg",{className:"w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:P1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},M))}),P1.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:_.map((P,M)=>P1.jsx("button",{onClick:()=>K(P.text),className:M4("text-left p-4 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","hover:shadow-md","active:scale-[0.98]","transition-all duration-200","group"),children:P1.jsxs("div",{className:"flex items-start gap-3",children:[P1.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||P1.jsx(oG,{})}),P1.jsxs("div",{className:"flex-1 min-w-0",children:[P1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:P.text}),P.description&&P1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:P.description})]})]})},M))})]})]})}function UI({messages:Y,onAction:G,welcomeTitle:U,welcomeSubtitle:O,welcomeIcon:q,suggestedPrompts:R,welcomeVariant:K,chatVariant:_,onPromptClick:A,enableWidgets:b,onWidgetRender:P}){let M=VQ.useRef(null),w=VQ.useRef(!0),f=VQ.useRef(0),v=()=>{if(M.current){let{scrollTop:m,scrollHeight:g,clientHeight:C}=M.current;w.current=g-m-C<100}};return VQ.useEffect(()=>{if(M.current&&w.current){let m=M.current.scrollHeight;if(m!==f.current)M.current.scrollTop=m,f.current=m}},[Y]),DZ.jsx("div",{ref:M,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:v,children:Y.length===0?DZ.jsx(BI,{title:U,subtitle:O,icon:q,prompts:R,variant:K,chatVariant:_,onPromptClick:A||(()=>{})}):Y.map((m)=>DZ.jsx("div",{className:m.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:DZ.jsx(qI,{message:m,onAction:G,enableWidgets:b,onWidgetRender:P})},m.id))})}function WI({onSendMessage:Y,placeholder:G="Type a message...",disabled:U=!1,isLoading:O=!1,onStop:q,onFileUpload:R,onSwitchMode:K}){let[_,A]=P6.useState(""),[b,P]=P6.useState(!1),[M,w]=P6.useState([]),[f,v]=P6.useState(null),[m,g]=P6.useState(!1),C=P6.useRef(null),V=P6.useRef(null),k=P6.useRef(null),x=(D)=>{if(D.key==="Enter"&&!D.shiftKey)D.preventDefault(),j()},j=()=>{let D=_.trim(),z0=M.length>0;if((D||z0)&&!U){let Q0=M.map((U0)=>U0.file);if(Y(_.trim(),Q0.length>0?Q0:void 0),A(""),w([]),v(null),g(!1),C.current)C.current.style.height="auto"}},u=(D)=>{A(D.target.value),D.target.style.height="auto";let z0=D.target.scrollHeight;D.target.style.height=`${z0}px`;let Q0=D.target.value.includes(`
|
|
189
189
|
`),b0=z0>36;if(!m&&(Q0||b0))g(!0);else if(m&&!Q0&&!b0&&D.target.value.length<20)g(!1)},p=(D)=>{if(D.target.files&&D.target.files.length>0){let z0=Array.from(D.target.files),Q0=[],U0=[];if(z0.forEach((b0)=>{let e=oK(b0);if(e.valid){let y0={file:b0};if(b0.type.startsWith("image/"))y0.preview=URL.createObjectURL(b0);Q0.push(y0)}else U0.push(e.error||"Invalid file")}),Q0.length>0)w((b0)=>[...b0,...Q0]);if(U0.length>0)v(U0.join(", ")),setTimeout(()=>v(null),5000);R?.(D.target.files),P(!1),D.target.value=""}},s=(D)=>{w((z0)=>{let Q0=z0[D];if(Q0.preview)URL.revokeObjectURL(Q0.preview);return z0.filter((U0,b0)=>b0!==D)})},a=(D)=>{if(D.startsWith("image/"))return N1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(D==="application/pdf")return N1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return N1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};return N1.jsxs("div",{className:"px-4 py-3 relative",children:[f&&N1.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-20",children:N1.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[N1.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),N1.jsx("span",{children:f})]})}),M.length>0&&N1.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:M.map((D,z0)=>N1.jsxs("div",{className:"relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",children:[D.preview?N1.jsx("img",{src:D.preview,alt:D.file.name,className:"w-8 h-8 object-cover rounded"}):N1.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400",children:a(D.file.type)}),N1.jsxs("div",{className:"flex flex-col min-w-0",children:[N1.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:D.file.name}),N1.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:q3(D.file.size)})]}),N1.jsx("button",{onClick:()=>s(z0),className:"absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove file",children:N1.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},z0))}),N1.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:m?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[N1.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[N1.jsx("button",{ref:k,onClick:()=>P(!b),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:N1.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N1.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),b&&N1.jsxs(N1.Fragment,{children:[N1.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>P(!1)}),N1.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:k.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(k.current?.getBoundingClientRect().top??0)+8},children:[N1.jsxs("button",{onClick:()=>{V.current?.click(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[N1.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N1.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),N1.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),K&&N1.jsxs("button",{onClick:()=>{K(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[N1.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),N1.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),N1.jsx("textarea",{ref:C,value:_,onChange:u,onKeyDown:x,placeholder:G,disabled:U,className:"apteva-composer-textarea resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed overflow-y-auto max-h-[200px]",style:{gridArea:"textarea"},rows:1}),N1.jsx("div",{className:"self-end",style:{gridArea:"send"},children:O&&q?N1.jsx("button",{onClick:q,className:"apteva-composer-stop-btn",title:"Stop generation",children:N1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N1.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):N1.jsx("button",{onClick:j,disabled:!_.trim()&&M.length===0||U,className:"apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",title:"Send message",children:N1.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N1.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),N1.jsx("input",{ref:V,type:"file",multiple:!0,onChange:p,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function KI({onExecute:Y,state:G,response:U,error:O,plan:q,streamedContent:R,toolName:K,onApprove:_,onReject:A,onReset:b,onStop:P,onExpand:M,placeholder:w="Enter your command...",disabled:f=!1}){let[v,m]=s6.useState(""),[g,C]=s6.useState([]),[V,k]=s6.useState(null),[x,j]=s6.useState(!1),u=s6.useRef(null),p=s6.useRef(null),s=s6.useRef(null),a=()=>{let O0=v.trim(),q0=g.length>0;if((O0||q0)&&!f&&G==="idle"){let o=g.map((T0)=>T0.file);Y(v.trim(),o.length>0?o:void 0),m(""),C([])}},D=(O0)=>{if(O0.key==="Enter"&&!O0.shiftKey)O0.preventDefault(),a()},z0=()=>{b?.(),u.current?.focus()},Q0=(O0)=>{if(m(O0),u.current)u.current.style.height="auto",u.current.style.height=`${Math.min(u.current.scrollHeight,120)}px`},U0=(O0)=>{if(O0.target.files&&O0.target.files.length>0){let q0=Array.from(O0.target.files),o=[],T0=[];if(q0.forEach((v0)=>{let X1=oK(v0);if(X1.valid){let r0={file:v0};if(v0.type.startsWith("image/"))r0.preview=URL.createObjectURL(v0);o.push(r0)}else T0.push(X1.error||"Invalid file")}),o.length>0)C((v0)=>[...v0,...o]);if(T0.length>0)k(T0.join(", ")),setTimeout(()=>k(null),5000);j(!1),O0.target.value=""}},b0=(O0)=>{C((q0)=>{let o=q0[O0];if(o.preview)URL.revokeObjectURL(o.preview);return q0.filter((T0,v0)=>v0!==O0)})},e=(O0)=>{if(O0.startsWith("image/"))return s0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(O0==="application/pdf")return s0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return s0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})},y0=()=>{if(G==="loading"){if(K)return{text:K,isToolCall:!0};if(R)return{text:R,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(G==="success"&&U)return{text:U,isToolCall:!1};if(G==="error"&&O)return{text:O,isToolCall:!1};if(G==="plan-pending"&&q)return{text:q,isToolCall:!1};return{text:"",isToolCall:!1}},I0=G!=="idle",{text:i,isToolCall:R0}=y0();return s0.jsxs("div",{className:"w-full relative",children:[V&&s0.jsx("div",{className:"absolute -top-12 left-0 right-0 mx-3 p-2 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-30",children:s0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-xs",children:[s0.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s0.jsx("span",{children:V})]})}),s0.jsxs("div",{className:M4("apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",G==="idle"&&"border-neutral-200 dark:border-neutral-700",G==="loading"&&"border-blue-400 dark:border-blue-500",G==="plan-pending"&&"border-amber-400 dark:border-amber-500",G==="success"&&"border-green-400 dark:border-green-500",G==="error"&&"border-red-400 dark:border-red-500"),children:[s0.jsxs("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:[G==="idle"&&s0.jsxs("div",{className:"relative",children:[s0.jsx("button",{ref:s,onClick:()=>j(!x),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:s0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),x&&s0.jsxs(s0.Fragment,{children:[s0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>j(!1)}),s0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:s.current?.getBoundingClientRect().left??0,top:(s.current?.getBoundingClientRect().bottom??0)+8},children:[s0.jsxs("button",{onClick:()=>{p.current?.click(),j(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[s0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),s0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),M&&s0.jsxs("button",{onClick:()=>{M(),j(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[s0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),s0.jsx("span",{className:"!text-sm font-medium",children:"Expand to chat"})]})]})]})]}),G==="loading"&&!K&&s0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),G==="loading"&&K&&s0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),g.length>0&&G==="idle"&&s0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:g.map((O0,q0)=>s0.jsxs("div",{className:"relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",title:O0.file.name,children:[O0.preview?s0.jsx("img",{src:O0.preview,alt:O0.file.name,className:"w-6 h-6 object-cover"}):s0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:e(O0.file.type)}),s0.jsx("button",{onClick:()=>b0(q0),className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",title:"Remove",children:s0.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},q0))}),G==="idle"?s0.jsx("textarea",{ref:u,value:v,onChange:(O0)=>Q0(O0.target.value),onKeyDown:D,placeholder:g.length>0?"Add a message...":w,disabled:f,rows:1,className:M4("flex-1 resize-none bg-transparent border-none focus:outline-none","!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500","text-sm leading-relaxed py-1","disabled:opacity-50"),style:{minHeight:"24px",maxHeight:"120px"}}):s0.jsx("div",{className:M4("flex-1 text-sm py-1 truncate flex items-center gap-2",G==="loading"&&!R0&&"!text-neutral-600 dark:!text-neutral-400",G==="loading"&&R0&&"!text-blue-600 dark:!text-blue-400",G==="success"&&"!text-neutral-900 dark:!text-neutral-100",G==="error"&&"!text-red-600 dark:!text-red-400",G==="plan-pending"&&"!text-amber-700 dark:!text-amber-300"),children:R0?s0.jsxs(s0.Fragment,{children:[s0.jsx("span",{className:"font-mono",children:i}),s0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):i}),s0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:G==="plan-pending"?s0.jsxs("div",{className:"flex items-center gap-1",children:[s0.jsx("button",{onClick:_,className:"px-2 py-1 bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors text-xs font-medium",children:"Approve"}),s0.jsx("button",{onClick:A,className:"px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",children:"Modify"})]}):s0.jsxs(s0.Fragment,{children:[G==="loading"&&P&&s0.jsx("button",{onClick:P,className:"apteva-composer-stop-btn",title:"Stop generation",children:s0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}),(G==="success"||G==="error")&&s0.jsx("button",{onClick:z0,className:"w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",title:"New command",children:s0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),G==="idle"&&s0.jsx("button",{onClick:a,disabled:!v.trim()&&g.length===0||f,className:M4("apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all","border border-neutral-200 dark:border-neutral-700","disabled:opacity-30 disabled:cursor-not-allowed",v.trim()||g.length>0?"bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white":"bg-white dark:bg-neutral-800 !text-neutral-400"),title:"Execute command",children:s0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M12 5l7 7-7 7"})})})]})})]}),s0.jsx("input",{ref:p,type:"file",multiple:!0,onChange:U0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var OI="http://91.99.200.48:3000/agents",_I="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",LI=class{constructor(){hA(this,"config"),this.config={apiUrl:OI,apiKey:_I}}configure(Y){if(Y.apiUrl)this.config.apiUrl=Y.apiUrl;if(Y.apiKey)this.config.apiKey=Y.apiKey}getConfig(){return{...this.config}}async chat(Y){try{console.log("[AptevaClient] Chat request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let G=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify(Y)});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}let U=await G.json();return{message:U.response||U.message||"",thread_id:U.thread_id,widgets:U.widgets}}catch(G){throw console.error("Chat API error:",G),G}}async chatStream(Y,G,U,O){try{console.log("[AptevaClient] Chat stream request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let q=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey,Accept:"text/event-stream"},body:JSON.stringify({...Y,stream:!0})});if(!q.ok){let b=await q.json().catch(()=>({error:"Request failed"}));throw Error(b.error||`Request failed with status ${q.status}`)}let R=q.body?.getReader();if(!R)throw Error("Response body is not readable");let K=new TextDecoder,_="",A="";while(!0){let{done:b,value:P}=await R.read();if(b)break;_+=K.decode(P,{stream:!0});let M=_.split(`
|
|
190
|
-
`);_=M.pop()||"";for(let w of M){if(!w.trim()||w.startsWith(":"))continue;if(w.startsWith("data: ")){let f=w.slice(6);if(f==="[DONE]"){U?.(A);return}try{let v=JSON.parse(f);if(v.thread_id)A=v.thread_id;G(v)}catch(v){console.warn("[AptevaClient] Failed to parse SSE data:",f)}}}}U?.(A)}catch(q){let R=q instanceof Error?q:Error("Unknown error");throw O?.(R),R}}async createThread(Y,G){let U=await fetch(`${this.config.apiUrl}/agents/${Y}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:G})});if(!U.ok){let q=await U.json().catch(()=>({error:"Request failed"}));throw Error(q.error||`Request failed with status ${U.status}`)}return(await U.json()).thread_id}async getThreadMessages(Y){let G=await fetch(`${this.config.apiUrl}/threads/${Y}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}return(await G.json()).messages}async cancelRequest(Y,G){try{let U=await fetch(`${this.config.apiUrl}/agents/${Y}/requests/${G}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!U.ok){let O=await U.json().catch(()=>({error:"Cancel request failed"}));throw Error(O.error||`Cancel request failed with status ${U.status}`)}}catch(U){throw console.error("[AptevaClient] Cancel request error:",U),U}}},yQ=new LI,B3=Y4.forwardRef(function({agentId:G,threadId:U,initialMessages:O=[],context:q,apiUrl:R,apiKey:K,useMock:_=!1,initialMode:A="chat",showModeToggle:b=!1,onModeChange:P,commandVariant:M="default",planMode:w=!1,onPlanModeChange:f,enableStreaming:v=!0,showProgress:m=!0,loadingText:g="Processing...",welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:k,suggestedPrompts:x,welcomeVariant:j,onThreadChange:u,onMessageSent:p,onAction:s,onFileUpload:a,onComplete:D,onError:z0,onToolCall:Q0,onToolResult:U0,variant:b0="default",placeholder:e,showHeader:y0=!0,headerTitle:I0="Chat",enableWidgets:i=!1,availableWidgets:R0,compactWidgetContext:O0=!1,onWidgetRender:q0,className:o},T0){let[v0,X1]=Y4.useState(O),[r0,f0]=Y4.useState(!1),[o0,J1]=Y4.useState(U||null),[A0,Y1]=Y4.useState(A),[h1,l1]=Y4.useState(null),[r1,O1]=Y4.useState("idle"),[w0,Q1]=Y4.useState(null),[I1,i1]=Y4.useState(null),[C4,$4]=Y4.useState(0),[b7,F4]=Y4.useState(""),[A7,S4]=Y4.useState(""),[
|
|
191
|
-
${x1}`:x1},[q,i,R0,O0]);Y4.useEffect(()=>{if(R||K)yQ.configure({...R&&{apiUrl:R},...K&&{apiKey:K}})},[R,K]),Y4.useEffect(()=>{if(U)u?.(U)},[U,u]),Y4.useEffect(()=>{H4(w)},[w]),Y4.useEffect(()=>{let x1=(G4)=>{let N4=G4.target;if(
|
|
190
|
+
`);_=M.pop()||"";for(let w of M){if(!w.trim()||w.startsWith(":"))continue;if(w.startsWith("data: ")){let f=w.slice(6);if(f==="[DONE]"){U?.(A);return}try{let v=JSON.parse(f);if(v.thread_id)A=v.thread_id;G(v)}catch(v){console.warn("[AptevaClient] Failed to parse SSE data:",f)}}}}U?.(A)}catch(q){let R=q instanceof Error?q:Error("Unknown error");throw O?.(R),R}}async createThread(Y,G){let U=await fetch(`${this.config.apiUrl}/agents/${Y}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:G})});if(!U.ok){let q=await U.json().catch(()=>({error:"Request failed"}));throw Error(q.error||`Request failed with status ${U.status}`)}return(await U.json()).thread_id}async getThreadMessages(Y){let G=await fetch(`${this.config.apiUrl}/threads/${Y}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}return(await G.json()).messages}async cancelRequest(Y,G){try{let U=await fetch(`${this.config.apiUrl}/agents/${Y}/requests/${G}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!U.ok){let O=await U.json().catch(()=>({error:"Cancel request failed"}));throw Error(O.error||`Cancel request failed with status ${U.status}`)}}catch(U){throw console.error("[AptevaClient] Cancel request error:",U),U}}},yQ=new LI,B3=Y4.forwardRef(function({agentId:G,threadId:U,initialMessages:O=[],context:q,apiUrl:R,apiKey:K,useMock:_=!1,initialMode:A="chat",showModeToggle:b=!1,onModeChange:P,commandVariant:M="default",planMode:w=!1,onPlanModeChange:f,enableStreaming:v=!0,showProgress:m=!0,loadingText:g="Processing...",welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:k,suggestedPrompts:x,welcomeVariant:j,onThreadChange:u,onMessageSent:p,onAction:s,onFileUpload:a,onComplete:D,onError:z0,onToolCall:Q0,onToolResult:U0,variant:b0="default",placeholder:e,showHeader:y0=!0,headerTitle:I0="Chat",enableWidgets:i=!1,availableWidgets:R0,compactWidgetContext:O0=!1,onWidgetRender:q0,className:o},T0){let[v0,X1]=Y4.useState(O),[r0,f0]=Y4.useState(!1),[o0,J1]=Y4.useState(U||null),[A0,Y1]=Y4.useState(A),[h1,l1]=Y4.useState(null),[r1,O1]=Y4.useState("idle"),[w0,Q1]=Y4.useState(null),[I1,i1]=Y4.useState(null),[C4,$4]=Y4.useState(0),[b7,F4]=Y4.useState(""),[A7,S4]=Y4.useState(""),[y4,L7]=Y4.useState(null),[E7,d4]=Y4.useState(null),[e4,V0]=Y4.useState(""),[$1,W1]=Y4.useState(""),[o1,H4]=Y4.useState(w),[u4,L4]=Y4.useState(!1),t4=Y4.useRef(null),C1=Y4.useRef(null);Y4.useImperativeHandle(T0,()=>({sendMessage:async(x1)=>{if(C1.current)await C1.current(x1)},sendSystemMessage:async(x1)=>{if(C1.current)await C1.current(x1,void 0,!0)},getMessages:()=>v0,clearMessages:()=>X1([])}),[v0]);let b1=Y4.useMemo(()=>{if(!i)return q;let x1=O0?oA(R0):iA(R0);return q?`${q}
|
|
191
|
+
${x1}`:x1},[q,i,R0,O0]);Y4.useEffect(()=>{if(R||K)yQ.configure({...R&&{apiUrl:R},...K&&{apiKey:K}})},[R,K]),Y4.useEffect(()=>{if(U)u?.(U)},[U,u]),Y4.useEffect(()=>{H4(w)},[w]),Y4.useEffect(()=>{let x1=(G4)=>{let N4=G4.target;if(u4&&!N4.closest(".settings-menu-container"))L4(!1)};return document.addEventListener("mousedown",x1),()=>document.removeEventListener("mousedown",x1)},[u4]);let i7=(x1)=>{if(Y1(x1),P?.(x1),x1==="command")O1("idle"),Q1(null),i1(null)},R7=A0==="chat"?"Type a message...":"Enter your command...",o7=async(x1,G4,N4)=>{let t1=G4&&G4.length>0,y=t1?G4.map((H0)=>({name:H0.name,type:H0.type,size:H0.size,preview:H0.type.startsWith("image/")?URL.createObjectURL(H0):void 0})):[];if(!N4){let H0={id:`msg-${Date.now()}`,role:"user",content:x1,timestamp:new Date,metadata:t1?{attachments:y}:void 0};X1((N0)=>[...N0,H0]),p?.(H0)}f0(!0);try{let H0=await cK(x1,G4);if(_){let N0=await yA(1000);X1((T)=>[...T,N0])}else{let N0=[],T="",l=[],K0=o0,k0={},m0={},e0=`msg-${Date.now()}`,d0=()=>{let _0=[...N0];if(T){let h0=_0[_0.length-1];if(h0&&h0.type==="text")h0.content=T;else _0.push({type:"text",content:T})}X1((h0)=>{let Z1=h0[h0.length-1];if(Z1&&Z1.role==="assistant")return[...h0.slice(0,-1),{...Z1,content:T,widgets:l.length>0?l:void 0,metadata:{...Z1.metadata,content_segments:_0,isStreaming:!0}}];else return[...h0,{id:e0,role:"assistant",content:T,widgets:l.length>0?l:void 0,timestamp:new Date,metadata:{content_segments:_0,isStreaming:!0}}]})};await yQ.chatStream({agent_id:G,message:H0,stream:!0,...o0&&{thread_id:o0},...b1&&{system:b1}},(_0)=>{switch(_0.type){case"thread_id":if(_0.thread_id){if(K0=_0.thread_id,!o0)J1(_0.thread_id),u?.(_0.thread_id)}break;case"request_id":if(_0.request_id)d4(_0.request_id);break;case"content":case"token":if(_0.content)T+=_0.content,d0();break;case"tool_call":if(_0.tool_id&&_0.tool_name){let h0=_0.tool_display_name||_0.tool_name;if(T)N0.push({type:"text",content:T}),T="";N0.push({type:"tool",id:_0.tool_id,name:h0,status:"preparing"}),k0[_0.tool_id]="",l1(h0),Q0?.(_0.tool_name,_0.tool_id),d0()}break;case"tool_input_delta":if(_0.tool_id&&_0.content){let h0=_0.tool_id;if(k0[h0]===void 0)k0[h0]="";k0[h0]+=_0.content;let Z1=N0.find((j1)=>j1.type==="tool"&&j1.id===h0);if(Z1){if(Z1.isReceiving=!0,Z1.inputLength=k0[h0].length,d0(),m0[h0])clearTimeout(m0[h0]);m0[h0]=setTimeout(()=>{if(Z1.status==="preparing")Z1.isReceiving=!1,d0()},150)}}break;case"tool_use":if(_0.tool_id){let h0=N0.find((Z1)=>Z1.type==="tool"&&Z1.id===_0.tool_id);if(h0&&h0.status==="preparing")h0.status="running",h0.isReceiving=!1,d0()}break;case"tool_stream":if(_0.tool_id){let h0=N0.find((Z1)=>Z1.type==="tool"&&Z1.id===_0.tool_id);if(h0){if(_0.event==="chunk"&&_0.content){if(h0.pendingReset)h0.streamOutput="",h0.pendingReset=!1;h0.streamOutput=(h0.streamOutput||"")+_0.content,d0()}else if(_0.event==="log"||_0.event==="progress")h0.pendingReset=!0}}break;case"tool_result":if(_0.tool_id){let h0=N0.find((Z1)=>Z1.type==="tool"&&Z1.id===_0.tool_id);if(h0)h0.result=_0.content,h0.status="completed",h0.isReceiving=!1,U0?.(h0.name,_0.content);l1(null),d0()}break;case"widget":if(_0.widget)l.push(_0.widget),d0();break;case"error":throw Error(_0.message||"Stream error")}},(_0)=>{if(T){let h0=N0[N0.length-1];if(h0&&h0.type==="text")h0.content=T;else N0.push({type:"text",content:T})}if(X1((h0)=>{let Z1=h0[h0.length-1];if(Z1&&Z1.role==="assistant")return[...h0.slice(0,-1),{...Z1,content:T||"Response received",widgets:l.length>0?l:void 0,metadata:{thread_id:_0,content_segments:N0,isStreaming:!1}}];return h0}),_0&&_0!==o0)J1(_0),u?.(_0);f0(!1),d4(null),l1(null)},(_0)=>{let h0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${_0.message}`,timestamp:new Date,metadata:{error:!0}};X1((Z1)=>{let j1=Z1[Z1.length-1];if(j1&&j1.id.includes("streaming"))return[...Z1.slice(0,-1),h0];return[...Z1,h0]}),f0(!1),d4(null),l1(null),z0?.(_0)})}}catch(H0){let N0={id:`msg-${Date.now()}-error`,role:"assistant",content:H0 instanceof Error?`Error: ${H0.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};X1((T)=>[...T,N0]),z0?.(H0 instanceof Error?H0:Error("Unknown error"))}finally{f0(!1)}};C1.current=o7;let J6=async(x1,G4)=>{let N4=x1||b7;if(!N4.trim()&&(!G4||G4.length===0)){i1(Error("Please enter a command")),O1("error");return}if(o1&&r1!=="plan-pending"){if(O1("loading"),i1(null),F4(""),_)setTimeout(()=>{let t1=`1. Analyze the request: "${N4}"
|
|
192
192
|
2. Process the data
|
|
193
193
|
3. Generate response
|
|
194
194
|
4. Return results`;V0(t1),W1(N4),O1("plan-pending")},800);else try{let y=b1?`${b1}
|
|
195
195
|
|
|
196
196
|
CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.`:"CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.",H0=await yQ.chat({agent_id:G,message:N4,stream:!1,system:y});V0(H0.message),W1(N4),O1("plan-pending")}catch(t1){let y=t1 instanceof Error?t1:Error("Failed to generate plan");i1(y),O1("error"),z0?.(y)}return}O1("loading"),i1(null),$4(0),S4(""),F4("");try{if(_)if(v){let t1="";mA(N4,(y)=>{if(y.type==="token"&&y.content){t1+=y.content,S4(t1);let H0=Math.min(Math.round(t1.length/10),90);$4(H0)}},(y)=>{let H0={success:!0,data:{summary:t1,thread_id:y},message:t1||"Command executed successfully"};Q1(H0),O1("success"),$4(100),D?.(H0)},(y)=>{i1(y),O1("error"),z0?.(y)})}else{await new Promise((y)=>setTimeout(y,1500));let t1={success:!0,data:{summary:`Executed: ${N4}`},message:"Command executed successfully"};Q1(t1),O1("success"),$4(100),D?.(t1)}else{let y=b1?`${b1}
|
|
197
197
|
|
|
198
|
-
CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`:`CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`,H0=G4&&G4.length>0?await cK(N4,G4):N4;if(v){let N0="",T="";await yQ.chatStream({agent_id:G,message:H0,stream:!0,...o0&&{thread_id:o0},system:y},(l)=>{if((l.type==="token"||l.type==="content")&&l.content){N0+=l.content,S4(N0),L7(null);let K0=Math.min(Math.round(N0.length/10),90);$4(K0)}else if(l.type==="tool_call"&&l.tool_name){let K0=l.tool_display_name||l.tool_name;T=l.tool_name,L7(K0),Q0?.(l.tool_name,l.tool_id||""),N0="",S4("")}else if(l.type==="tool_result")U0?.(T,l.content),L7(null);else if(l.type==="thread_id"&&l.thread_id){if(!o0)J1(l.thread_id),u?.(l.thread_id)}else if(l.type==="request_id"&&l.request_id)d4(l.request_id)},(l)=>{let K0={success:!0,data:{summary:N0,thread_id:l},message:N0||"Command executed successfully"};Q1(K0),O1("success"),$4(100),d4(null),D?.(K0)},(l)=>{i1(l),O1("error"),d4(null),z0?.(l)})}else{let N0=await yQ.chat({agent_id:G,message:H0,stream:!1,...o0&&{thread_id:o0},system:y}),T={success:!0,data:{summary:N0.message,thread_id:N0.thread_id},widgets:N0.widgets,message:N0.message};Q1(T),O1("success"),$4(100),D?.(T)}}}catch(t1){let y=t1 instanceof Error?t1:Error("Unknown error");i1(y),O1("error"),z0?.(y)}},
|
|
198
|
+
CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`:`CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`,H0=G4&&G4.length>0?await cK(N4,G4):N4;if(v){let N0="",T="";await yQ.chatStream({agent_id:G,message:H0,stream:!0,...o0&&{thread_id:o0},system:y},(l)=>{if((l.type==="token"||l.type==="content")&&l.content){N0+=l.content,S4(N0),L7(null);let K0=Math.min(Math.round(N0.length/10),90);$4(K0)}else if(l.type==="tool_call"&&l.tool_name){let K0=l.tool_display_name||l.tool_name;T=l.tool_name,L7(K0),Q0?.(l.tool_name,l.tool_id||""),N0="",S4("")}else if(l.type==="tool_result")U0?.(T,l.content),L7(null);else if(l.type==="thread_id"&&l.thread_id){if(!o0)J1(l.thread_id),u?.(l.thread_id)}else if(l.type==="request_id"&&l.request_id)d4(l.request_id)},(l)=>{let K0={success:!0,data:{summary:N0,thread_id:l},message:N0||"Command executed successfully"};Q1(K0),O1("success"),$4(100),d4(null),D?.(K0)},(l)=>{i1(l),O1("error"),d4(null),z0?.(l)})}else{let N0=await yQ.chat({agent_id:G,message:H0,stream:!1,...o0&&{thread_id:o0},system:y}),T={success:!0,data:{summary:N0.message,thread_id:N0.thread_id},widgets:N0.widgets,message:N0.message};Q1(T),O1("success"),$4(100),D?.(T)}}}catch(t1){let y=t1 instanceof Error?t1:Error("Unknown error");i1(y),O1("error"),z0?.(y)}},x5=()=>{O1("idle"),Q1(null),i1(null),$4(0),F4(""),V0(""),W1(""),S4(""),L7(null)},Y6=()=>{let x1=e4;V0(""),W1("");let G4=`Execute this plan now:
|
|
199
199
|
|
|
200
|
-
${x1}`;J6(G4)},
|
|
200
|
+
${x1}`;J6(G4)},T5=()=>{F4($1),V0(""),W1(""),O1("idle")},u7=async()=>{if(E7&&G)try{await yQ.cancelRequest(G,E7)}catch(x1){console.error("Failed to cancel request:",x1)}if(f0(!1),r1==="loading")O1("idle"),S4(""),L7(null),$4(0);d4(null)},j5=M==="compact";return Z5.jsxs("div",{className:M4("apteva-chat flex flex-col h-full",b0!=="default"&&`apteva-chat-${b0}`,o),children:[y0&&A0==="chat"&&Z5.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:Z5.jsxs("div",{children:[Z5.jsx("div",{className:"apteva-chat-title",children:I0}),Z5.jsx("div",{className:M4("apteva-chat-status",r0?h1?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:r0?h1?`Using ${h1}...`:"Thinking...":"Ready"})]})}),A0==="chat"&&Z5.jsxs(Z5.Fragment,{children:[Z5.jsx(UI,{messages:v0,onAction:s,welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:k,suggestedPrompts:x,welcomeVariant:j,chatVariant:b0,onPromptClick:(x1)=>o7(x1),enableWidgets:i,onWidgetRender:q0}),Z5.jsx(WI,{onSendMessage:o7,placeholder:e||R7,disabled:r0,isLoading:r0,onStop:u7,onFileUpload:a,onSwitchMode:b?()=>i7("command"):void 0})]}),A0==="command"&&Z5.jsx("div",{className:"w-full",children:Z5.jsx(KI,{onExecute:(x1,G4)=>{F4(x1),J6(x1,G4)},state:r1,response:w0?.data?.summary||w0?.message,error:I1?.message,plan:e4,streamedContent:A7,toolName:y4,onApprove:Y6,onReject:T5,onReset:x5,onStop:u7,onExpand:b?()=>i7("chat"):void 0,placeholder:e||"Enter your command..."})}),Z5.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
201
201
|
@keyframes pulse-border {
|
|
202
202
|
0%, 100% { border-color: rgb(59, 130, 246); }
|
|
203
203
|
50% { border-color: rgb(147, 197, 253); }
|
|
@@ -208,11 +208,12 @@ ${x1}`;J6(G4)},I5=()=>{F4($1),V0(""),W1(""),O1("idle")},u7=async()=>{if(E7&&G)tr
|
|
|
208
208
|
.apteva-composer {
|
|
209
209
|
border-radius: var(--apteva-border-radius, 1rem) !important;
|
|
210
210
|
}
|
|
211
|
-
`}})]})});var R4=B0(U1(),1),$O=
|
|
211
|
+
`}})]})});var R4=B0(U1(),1),$O=I5.createContext(null);function HO(){return I5.useContext($O)}function GO({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=T1(),[q,R]=I5.useState(null),[K,_]=I5.useState(!1),[A,b]=I5.useState(!1),[P,M]=I5.useState(null),w=async()=>{try{let k=await(await G("/api/meta-agent/status")).json();R(k)}catch(V){console.error("[MetaAgent] Failed to fetch status:",V)}};I5.useEffect(()=>{if(!O&&U)w()},[G,U,O]);let f=async()=>{b(!0),M(null);try{let V=await G("/api/meta-agent/start",{method:"POST"}),k=await V.json();if(!V.ok)M(k.error||"Failed to start assistant");else await w()}catch(V){M("Failed to start assistant")}b(!1)},v=!!(q?.enabled&&q?.available),m=q?.agent,g=!!(m?.status==="running"&&m?.port),C={status:q,isOpen:K,isStarting:A,error:P,isAvailable:v,isRunning:g,agent:m,toggle:()=>_(!K),close:()=>_(!1),startAgent:f};return R4.jsxDEV($O.Provider,{value:C,children:Y},void 0,!1,void 0,this)}function qO(){let Y=HO();if(!Y?.isAvailable)return null;return R4.jsxDEV("button",{onClick:Y.toggle,className:`hidden md:flex items-center gap-2 px-3 py-2 rounded transition ${Y.isOpen?"bg-[#f97316] text-white":"bg-[#151515] hover:bg-[#1a1a1a] text-[#888] hover:text-white"}`,title:"Apteva Assistant",children:[R4.jsxDEV(UO,{className:"w-5 h-5"},void 0,!1,void 0,this),R4.jsxDEV("span",{className:"text-sm",children:"Assistant"},void 0,!1,void 0,this),Y.isRunning&&R4.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-400"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function BO(){let Y=HO(),{currentProjectId:G,currentProject:U}=h4();if(!Y?.isAvailable||!Y.isOpen)return null;let{agent:O,isRunning:q,error:R,isStarting:K,startAgent:_,close:A}=Y,b=I5.useMemo(()=>{let P=[];if(U)P.push(`Current project: "${U.name}" (id: ${U.id})`);else if(G==="unassigned")P.push("Viewing: unassigned agents (no project)");else P.push("Viewing: All Projects");return P.join(`
|
|
212
|
+
`)},[G,U]);return R4.jsxDEV(R4.Fragment,{children:[R4.jsxDEV("div",{className:"hidden md:block fixed inset-0 bg-black/20 z-40",onClick:A},void 0,!1,void 0,this),R4.jsxDEV("div",{className:"hidden md:flex fixed top-0 right-0 h-full w-[480px] lg:w-[540px] bg-[#0a0a0a] border-l border-[#1a1a1a] shadow-2xl z-50 flex-col",children:[R4.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#1a1a1a] bg-[#111]",children:[R4.jsxDEV("div",{className:"flex items-center gap-2",children:[R4.jsxDEV("div",{className:`w-2 h-2 rounded-full ${q?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),R4.jsxDEV("span",{className:"font-medium text-sm",children:"Apteva Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R4.jsxDEV("button",{onClick:A,className:"text-[#666] hover:text-[#888] transition",children:R4.jsxDEV(wI,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R4.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col",children:q?R4.jsxDEV(B3,{agentId:"default",apiUrl:`/api/agents/${O.id}`,placeholder:"Ask me anything about Apteva...",variant:"terminal",showHeader:!1,context:b},void 0,!1,void 0,this):R4.jsxDEV("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:[R4.jsxDEV(UO,{className:"w-12 h-12 text-[#333] mb-4"},void 0,!1,void 0,this),R4.jsxDEV("h3",{className:"font-medium mb-2",children:"Apteva Assistant"},void 0,!1,void 0,this),R4.jsxDEV("p",{className:"text-sm text-[#666] mb-6",children:"I can help you navigate Apteva, create agents, set up MCP servers, and more."},void 0,!1,void 0,this),R&&R4.jsxDEV("p",{className:"text-sm text-red-400 mb-4",children:R},void 0,!1,void 0,this),R4.jsxDEV("button",{onClick:_,disabled:K,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-white px-6 py-2 rounded font-medium transition",children:K?"Starting...":"Start Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function UO({className:Y="w-6 h-6"}){return R4.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function wI(){return R4.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var E1=B0(U1(),1);function U3({onMenuClick:Y}){let{connected:G}=F6(),{user:U,logout:O}=T1(),{projects:q,currentProjectId:R,currentProject:K,setCurrentProjectId:_,unassignedCount:A,projectsEnabled:b}=h4(),[P,M]=Q2.useState(!1),[w,f]=Q2.useState(!1),v=async()=>{await O(),M(!1)},m=(V)=>{_(V),f(!1)},g=()=>{if(R===null)return"All Projects";if(R==="unassigned")return"Unassigned";return K?.name||"Select Project"},C=()=>{if(R===null)return"#666";if(R==="unassigned")return"#888";return K?.color||"#6366f1"};return E1.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:E1.jsxDEV("div",{className:"flex items-center justify-between",children:[E1.jsxDEV("div",{className:"flex items-center gap-3",children:[E1.jsxDEV("button",{onClick:Y,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:E1.jsxDEV(fK,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),E1.jsxDEV("div",{className:"flex items-center gap-2",children:[E1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&q.length>0&&E1.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[E1.jsxDEV("button",{onClick:()=>f(!w),className:"flex items-center gap-2 px-3 py-1.5 rounded border border-[#222] bg-[#111] hover:bg-[#1a1a1a] transition text-sm",children:[E1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:C()}},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:g()},void 0,!1,void 0,this),E1.jsxDEV(hK,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&E1.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:E1.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[E1.jsxDEV("button",{onClick:()=>m(null),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[E1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#666]"},void 0,!1,void 0,this),"All Projects"]},void 0,!0,void 0,this),q.map((V)=>E1.jsxDEV("button",{onClick:()=>m(V.id),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===V.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[E1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:V.color}},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"truncate",children:V.name},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:V.agentCount},void 0,!1,void 0,this)]},V.id,!0,void 0,this)),A>0&&E1.jsxDEV("button",{onClick:()=>m("unassigned"),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[E1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:A},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[E1.jsxDEV("div",{className:"flex items-center gap-2",children:[E1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${G?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"text-xs text-[#666] hidden sm:inline",children:G?"Live":"Offline"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV(qO,{},void 0,!1,void 0,this),U&&E1.jsxDEV("div",{className:"relative",children:[E1.jsxDEV("button",{onClick:()=>M(!P),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[E1.jsxDEV("div",{className:"w-8 h-8 rounded-full bg-[#f97316] flex items-center justify-center text-black font-medium text-sm",children:U.username.charAt(0).toUpperCase()},void 0,!1,void 0,this),E1.jsxDEV("span",{className:"text-sm text-[#888] hidden sm:block",children:U.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&E1.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[E1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[E1.jsxDEV("p",{className:"text-sm font-medium",children:U.username},void 0,!1,void 0,this),E1.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:U.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("button",{onClick:v,className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-[#1a1a1a] transition",children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var B4=B0(U1(),1);function W3({route:Y,agentCount:G,taskCount:U,onNavigate:O,isOpen:q,onClose:R}){let K=(_)=>{O(_),R?.()};return B4.jsxDEV(B4.Fragment,{children:[q&&B4.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:R},void 0,!1,void 0,this),B4.jsxDEV("aside",{className:`
|
|
212
213
|
fixed inset-y-0 left-0 z-50 w-64 bg-[#0a0a0a] border-r border-[#1a1a1a] p-4 transform transition-transform duration-200 ease-in-out
|
|
213
214
|
md:relative md:w-56 md:translate-x-0 md:z-auto
|
|
214
215
|
${q?"translate-x-0":"-translate-x-full"}
|
|
215
|
-
`,children:[B4.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[B4.jsxDEV("div",{className:"flex items-center gap-2",children:[B4.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),B4.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B4.jsxDEV("button",{onClick:R,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:B4.jsxDEV(V5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B4.jsxDEV("nav",{className:"space-y-1",children:[B4.jsxDEV(h8,{icon:B4.jsxDEV(Y3,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>K("dashboard")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV($3,{},void 0,!1,void 0,this),label:"Agents",active:Y==="agents",onClick:()=>K("agents"),badge:G>0?String(G):void 0},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(D5,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>K("tasks"),badge:U&&U>0?String(U):void 0},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(m5,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>K("mcp")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(hZ,{},void 0,!1,void 0,this),label:"Skills",active:Y==="skills",onClick:()=>K("skills")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(pG,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>K("telemetry")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(vK,{},void 0,!1,void 0,this),label:"API",active:Y==="api",onClick:()=>K("api")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(H3,{},void 0,!1,void 0,this),label:"Settings",active:Y==="settings",onClick:()=>K("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function h8({icon:Y,label:G,active:U,onClick:O,badge:q}){return B4.jsxDEV("button",{onClick:O,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${U?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[Y,G,q&&B4.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var EZ=B0(U1(),1);function K3({message:Y,onDismiss:G}){return EZ.jsxDEV("div",{className:"bg-red-500/10 border-b border-red-500/30 px-6 py-3 text-red-400 text-sm flex items-center justify-between",children:[EZ.jsxDEV("span",{children:Y},void 0,!1,void 0,this),EZ.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:EZ.jsxDEV(V5,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var uZ=B0(f1(),1);var Y7=B0(U1(),1);function O3(){let{login:Y}=T1(),[G,U]=uZ.useState(""),[O,q]=uZ.useState(""),[R,K]=uZ.useState(null),[_,A]=uZ.useState(!1);return Y7.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:Y7.jsxDEV("div",{className:"w-full max-w-md",children:[Y7.jsxDEV("div",{className:"text-center mb-8",children:[Y7.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[Y7.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),Y7.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[Y7.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),Y7.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),Y7.jsxDEV("form",{onSubmit:async(P)=>{P.preventDefault(),K(null),A(!0);let M=await Y(G,O);if(!M.success)K(M.error||"Login failed");A(!1)},className:"space-y-4",children:[Y7.jsxDEV("div",{children:[Y7.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),Y7.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(P)=>U(P.target.value),placeholder:"Enter your username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("div",{children:[Y7.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),Y7.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(P)=>q(P.target.value),placeholder:"Enter your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R&&Y7.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:R},void 0,!1,void 0,this),Y7.jsxDEV("button",{type:"submit",disabled:_||!G||!O,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:_?"Signing in...":"Sign In"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var y8=B0(f1(),1),T4=B0(U1(),1);function _3({onComplete:Y}){let[G,U]=y8.useState(""),[O,q]=y8.useState(""),[R,K]=y8.useState(""),[_,A]=y8.useState(""),[b,P]=y8.useState(!1),[M,w]=y8.useState(null),[f,v]=y8.useState(!1);return T4.jsxDEV(T4.Fragment,{children:[T4.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),T4.jsxDEV("form",{onSubmit:async(g)=>{if(g.preventDefault(),w(null),O!==R){w("Passwords do not match");return}v(!0);try{let C=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:G,password:O,..._&&{email:_}})}),V=await C.json();if(!C.ok){w(V.error||"Failed to create account"),v(!1);return}let k=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!k.ok){w("Account created but login failed. Please try logging in."),v(!1);return}let x=await k.json();if(x.accessToken)sessionStorage.setItem("accessToken",x.accessToken);Y({username:G})}catch(C){w("Failed to create account"),v(!1)}},className:"space-y-4",children:[T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(g)=>U(g.target.value),placeholder:"Choose a username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"3-20 characters, letters, numbers, underscore"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(g)=>q(g.target.value),placeholder:"Enter a password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Min 8 characters, uppercase, lowercase, number"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"confirmPassword",type:"password",value:R,onChange:(g)=>K(g.target.value),placeholder:"Confirm your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!b?T4.jsxDEV("button",{type:"button",onClick:()=>P(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",T4.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("input",{id:"email",type:"email",value:_,onChange:(g)=>A(g.target.value),placeholder:"For password recovery only",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Only used for password recovery, never shared"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&T4.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:M},void 0,!1,void 0,this),T4.jsxDEV("button",{type:"submit",disabled:f||!G||!O||!R,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:f?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-4 text-center",children:"This will be your admin account with full access to apteva."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var E5=B0(f1(),1);var n0=B0(U1(),1);function gZ({onComplete:Y,needsAccount:G=!1}){let[U,O]=E5.useState(G?0:1),[q,R]=E5.useState([]),[K,_]=E5.useState(null),[A,b]=E5.useState(""),[P,M]=E5.useState(!1),[w,f]=E5.useState(!1),[v,m]=E5.useState(null),[g,C]=E5.useState(null),[V,k]=E5.useState(!1),x=()=>{let z0=sessionStorage.getItem("accessToken");return z0?{Authorization:`Bearer ${z0}`}:{}};E5.useEffect(()=>{if(G&&!V&&U===0)return;fetch("/api/providers",{headers:x()}).then((z0)=>z0.json()).then((z0)=>{let Q0=(z0.providers||[]).filter((U0)=>U0.type==="llm");R(Q0)})},[V,U,G]);let j=q.filter((z0)=>z0.hasKey),u=async()=>{if(!K||!A)return;M(!0),m(null),C(null);try{f(!0);let Q0=await(await fetch(`/api/keys/${K}/test`,{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({key:A})})).json();if(f(!1),!Q0.valid){m(Q0.error||"API key is invalid"),M(!1);return}let U0=await fetch(`/api/keys/${K}`,{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({key:A})}),b0=await U0.json();if(!U0.ok)m(b0.error||"Failed to save key");else{C("API key saved successfully!"),b("");let y0=await(await fetch("/api/providers",{headers:x()})).json();R(y0.providers||[]),_(null)}}catch(z0){m("Failed to save key")}M(!1)},p=async()=>{try{let z0=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(z0.ok){let Q0=await z0.json();if(Q0.project?.id)localStorage.setItem("apteva_current_project",Q0.project.id)}}catch(z0){console.error("Failed to create default project:",z0)}await fetch("/api/onboarding/complete",{method:"POST",headers:x()}),Y()},s=()=>{k(!0),O(1)},a=G?3:2,D=G?U:U-1;return n0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:n0.jsxDEV("div",{className:"w-full max-w-2xl",children:[n0.jsxDEV("div",{className:"text-center mb-8",children:[n0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[n0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),n0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[U===0&&G&&n0.jsxDEV(_3,{onComplete:s},void 0,!1,void 0,this),U===1&&n0.jsxDEV(FI,{providers:q,configuredProviders:j,selectedProvider:K,apiKey:A,saving:P,testing:w,error:v,success:g,onSelectProvider:_,onApiKeyChange:b,onSaveKey:u,onContinue:()=>O(2)},void 0,!1,void 0,this),U===2&&n0.jsxDEV(bI,{configuredProviders:j,onAddMore:()=>O(1),onComplete:p},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function FI({providers:Y,configuredProviders:G,selectedProvider:U,apiKey:O,saving:q,testing:R,error:K,success:_,onSelectProvider:A,onApiKeyChange:b,onSaveKey:P,onContinue:M}){let w=Y.find((f)=>f.id===U);if(U&&w)return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",w.name," Key"]},void 0,!0,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:"Enter your API key below. It will be encrypted and stored locally."},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"mb-6",children:[n0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:n0.jsxDEV("div",{className:"flex items-center justify-between",children:[n0.jsxDEV("div",{children:[n0.jsxDEV("p",{className:"font-medium",children:w.name},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-sm text-[#666]",children:[w.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("a",{href:w.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"space-y-3",children:[n0.jsxDEV("input",{type:"password",value:O,onChange:(f)=>b(f.target.value),placeholder:"Enter your API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316] text-lg"},void 0,!1,void 0,this),K&&n0.jsxDEV("p",{className:"text-red-400 text-sm",children:K},void 0,!1,void 0,this),_&&n0.jsxDEV("p",{className:"text-green-400 text-sm",children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"flex gap-3",children:[n0.jsxDEV("button",{onClick:()=>{A(null),b("")},className:"flex-1 border border-[#333] hover:border-[#666] px-4 py-3 rounded font-medium transition",children:"Back"},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:P,disabled:!O||q,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:R?"Testing...":q?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:"To get started, you'll need to add at least one AI provider API key. Your keys are encrypted and stored locally."},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((f)=>n0.jsxDEV(PI,{provider:f,selected:!1,onSelect:()=>!f.hasKey&&A(f.id)},f.id,!1,void 0,this))},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:M,disabled:G.length===0,className:"w-full bg-[#222] hover:bg-[#333] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition",children:G.length===0?"Add at least one API key to continue":`Continue with ${G.length} provider${G.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function PI({provider:Y,selected:G,onSelect:U}){return n0.jsxDEV("div",{onClick:U,className:`p-4 rounded border transition cursor-pointer ${Y.hasKey?"border-green-500/30 bg-green-500/5":G?"border-[#f97316] bg-[#f97316]/5":"border-[#222] hover:border-[#333]"}`,children:n0.jsxDEV("div",{className:"flex items-center justify-between",children:[n0.jsxDEV("div",{children:[n0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?n0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[n0.jsxDEV(X5,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):n0.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(O)=>O.stopPropagation(),className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function bI({configuredProviders:Y,onAddMore:G,onComplete:U}){return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:["You've configured ",Y.length," provider",Y.length>1?"s":"",". You can add more providers later in Settings."]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>n0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[n0.jsxDEV(X5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),n0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),n0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",O.keyHint,")"]},void 0,!0,void 0,this)]},O.id,!0,void 0,this))},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"flex gap-3",children:[n0.jsxDEV("button",{onClick:G,className:"flex-1 border border-[#333] hover:border-[#f97316] px-4 py-3 rounded font-medium transition",children:"Add More"},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:U,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-3 rounded font-medium transition",children:"Start Using apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var V1=B0(f1(),1);var S=B0(U1(),1);function L3(){let{projectsEnabled:Y}=u4(),[G,U]=V1.useState("providers"),O=[{key:"providers",label:"Providers"},...Y?[{key:"projects",label:"Projects"}]:[],{key:"account",label:"Account"},{key:"updates",label:"Updates"},{key:"data",label:"Data"}];return S.jsxDEV("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden",children:[S.jsxDEV("div",{className:"md:hidden border-b border-[#1a1a1a] bg-[#0a0a0a]",children:S.jsxDEV("div",{className:"flex overflow-x-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:O.map((q)=>S.jsxDEV("button",{onClick:()=>U(q.key),className:`flex-shrink-0 px-4 py-3 text-sm font-medium border-b-2 transition ${G===q.key?"border-[#f97316] text-[#f97316]":"border-transparent text-[#666] hover:text-[#888]"}`,children:q.label},q.key,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("div",{className:"hidden md:block w-48 border-r border-[#1a1a1a] p-4 flex-shrink-0",children:[S.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),S.jsxDEV("nav",{className:"space-y-1",children:O.map((q)=>S.jsxDEV(AI,{label:q.label,active:G===q.key,onClick:()=>U(q.key)},q.key,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex-1 overflow-auto p-4 md:p-6",children:[G==="providers"&&S.jsxDEV(II,{},void 0,!1,void 0,this),G==="projects"&&Y&&S.jsxDEV(TI,{},void 0,!1,void 0,this),G==="account"&&S.jsxDEV(fI,{},void 0,!1,void 0,this),G==="updates"&&S.jsxDEV(CI,{},void 0,!1,void 0,this),G==="data"&&S.jsxDEV(hI,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function AI({label:Y,active:G,onClick:U}){return S.jsxDEV("button",{onClick:U,className:`w-full text-left px-3 py-2 rounded text-sm transition ${G?"bg-[#1a1a1a] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:Y},void 0,!1,void 0,this)}function II(){let{authFetch:Y}=T1(),{projects:G,projectsEnabled:U}=u4(),[O,q]=V1.useState([]),[R,K]=V1.useState(null),[_,A]=V1.useState(""),[b,P]=V1.useState(!1),[M,w]=V1.useState(!1),[f,v]=V1.useState(null),[m,g]=V1.useState(null),{confirm:C,ConfirmDialog:V}=A5(),k=async()=>{let z0=await(await Y("/api/providers")).json();q(z0.providers||[])};V1.useEffect(()=>{k()},[]);let x=async()=>{if(!R||!_)return;P(!0),v(null),g(null);try{w(!0);let z0=await(await Y(`/api/keys/${R}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:_})})).json();if(w(!1),!z0.valid){v(z0.error||"API key is invalid"),P(!1);return}let Q0=await Y(`/api/keys/${R}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:_})}),U0=await Q0.json();if(!Q0.ok)v(U0.error||"Failed to save key");else{let b0="API key saved!";if(U0.restartedAgents&&U0.restartedAgents.length>0){let e=U0.restartedAgents.filter((I0)=>I0.success).length;if(U0.restartedAgents.length-e===0)b0+=` Restarted ${e} agent${e>1?"s":""} with new key.`;else b0+=` Restarted ${e}/${U0.restartedAgents.length} agents.`}g(b0),A(""),K(null),k()}}catch(D){v("Failed to save key")}P(!1)},j=async(D)=>{if(!await C("Are you sure you want to remove this API key?",{confirmText:"Remove",title:"Remove API Key"}))return;await Y(`/api/keys/${D}`,{method:"DELETE"}),k()},u=O.filter((D)=>D.type==="llm"),p=O.filter((D)=>D.type==="integration"),s=u.filter((D)=>D.hasKey).length,a=p.filter((D)=>D.hasKey).length;return V1.useEffect(()=>{if(m&&!R){let D=setTimeout(()=>g(null),5000);return()=>clearTimeout(D)}},[m,R]),S.jsxDEV(S.Fragment,{children:[V,S.jsxDEV("div",{className:"space-y-10",children:[m&&!R&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center justify-between",children:[S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400",children:[S.jsxDEV(X5,{className:"w-5 h-5"},void 0,!1,void 0,this),S.jsxDEV("span",{children:m},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>g(null),className:"text-green-400 hover:text-green-300",children:S.jsxDEV(V5,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",s," of ",u.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:u.map((D)=>S.jsxDEV(SI,{provider:D,isEditing:R===D.id,apiKey:_,saving:b,testing:M,error:R===D.id?f:null,success:R===D.id?m:null,onStartEdit:()=>{K(D.id),v(null),g(null)},onCancelEdit:()=>{K(null),A(""),v(null)},onApiKeyChange:A,onSave:x,onDelete:()=>j(D.id)},D.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",a," of ",p.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p.map((D)=>S.jsxDEV(vI,{provider:D,isEditing:R===D.id,apiKey:_,saving:b,testing:M,error:R===D.id?f:null,success:R===D.id?m:null,onStartEdit:()=>{K(D.id),v(null),g(null)},onCancelEdit:()=>{K(null),A(""),v(null)},onApiKeyChange:A,onSave:x,onDelete:()=>j(D.id),projectsEnabled:U,projects:G,onRefresh:k},D.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var X2=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function TI(){let{projects:Y,createProject:G,updateProject:U,deleteProject:O}=u4(),[q,R]=V1.useState(!1),[K,_]=V1.useState(null),{confirm:A,ConfirmDialog:b}=A5(),P=async(v)=>{if(!await A("Are you sure you want to delete this project? Agents in this project will become unassigned.",{confirmText:"Delete",title:"Delete Project"}))return;await O(v)},M=()=>{_(null),R(!0)},w=(v)=>{_(v),R(!0)},f=()=>{R(!1),_(null)};return S.jsxDEV(S.Fragment,{children:[b,S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Organize agents into projects for better management."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:M,className:"flex items-center gap-2 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition flex-shrink-0",children:[S.jsxDEV(yK,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Project"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.length===0?S.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[S.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm",children:"Create a project to organize your agents."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"space-y-3",children:Y.map((v)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[S.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:v.color}},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("h3",{className:"font-medium",children:v.name},void 0,!1,void 0,this),v.description&&S.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:v.description},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[v.agentCount," agent",v.agentCount!==1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("button",{onClick:()=>w(v),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>P(v.id),className:"text-sm text-red-400 hover:text-red-300 px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},v.id,!0,void 0,this))},void 0,!1,void 0,this),q&&S.jsxDEV(kI,{project:K,onSave:async(v)=>{if(K){let m=await U(K.id,v);if(m)f();return!!m}else{let m=await G(v);if(m)f();return!!m}},onClose:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kI({project:Y,onSave:G,onClose:U}){let[O,q]=V1.useState(Y?.name||""),[R,K]=V1.useState(Y?.description||""),[_,A]=V1.useState(Y?.color||X2[Math.floor(Math.random()*X2.length)]),[b,P]=V1.useState(!1),[M,w]=V1.useState(null),f=async()=>{if(!O.trim()){w("Name is required");return}P(!0),w(null);let v=await G({name:O,description:R||void 0,color:_});if(P(!1),!v)w(Y?"Failed to update project":"Failed to create project")};return S.jsxDEV(kQ,{onClose:U,children:[S.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"text",value:O,onChange:(v)=>q(v.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"My Project",autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"text",value:R,onChange:(v)=>K(v.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"A short description"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:X2.map((v)=>S.jsxDEV("button",{type:"button",onClick:()=>A(v),className:`w-10 h-10 rounded-full transition ${_===v?"ring-2 ring-white ring-offset-2 ring-offset-[#111]":"hover:scale-110"}`,style:{backgroundColor:v}},v,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:M},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex gap-3 mt-6",children:[S.jsxDEV("button",{onClick:U,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:f,disabled:b||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:b?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function CI(){let{authFetch:Y}=T1(),[G,U]=V1.useState(null),[O,q]=V1.useState(!1),[R,K]=V1.useState(!1),[_,A]=V1.useState(null),[b,P]=V1.useState(null),[M,w]=V1.useState(null),f=async()=>{q(!0),A(null);try{let C=await Y("/api/version");if(!C.ok)throw Error("Failed to check for updates");let V=await C.json();U(V)}catch(C){A("Failed to check for updates")}q(!1)},v=async()=>{K(!0),A(null),P(null);try{let V=await(await Y("/api/version/update",{method:"POST"})).json();if(!V.success)A(V.error||"Update failed");else{let k=V.restarted?.length||0,x=k>0?` ${k} running agent${k>1?"s":""} restarted.`:"";P(`Agent binary updated to v${V.version}.${x}`),await f()}}catch(C){A("Failed to update agent")}K(!1)};V1.useEffect(()=>{f()},[]);let m=(C,V)=>{navigator.clipboard.writeText(C),w(V),setTimeout(()=>w(null),2000)},g=G?.apteva.updateAvailable||G?.agent.updateAvailable;return S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Check for new versions of apteva and the agent binary."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O&&!G?S.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):_&&!G?S.jsxDEV("div",{className:"text-red-400",children:_},void 0,!1,void 0,this):G?.isDocker?S.jsxDEV("div",{className:"space-y-6",children:[S.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[S.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[S.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:S.jsxDEV("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.186.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.186.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.186.186 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.186.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.185-.186H5.136a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#888]",children:"Updates are automatic when you pull a new image version."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:["A newer version (v",G.apteva.latest,") is available. To update:"]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"space-y-2",children:[S.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker pull apteva/apteva:latest"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker compose up -d"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),w("docker"),setTimeout(()=>w(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:M==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#555]",children:"Your data is stored in a Docker volume and persists across updates."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):G?S.jsxDEV("div",{className:"space-y-6",children:[b&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:b},void 0,!1,void 0,this),_&&S.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:_},void 0,!1,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"The app you're running"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:[S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&S.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.apteva.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.apteva.updateAvailable?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("code",{className:"flex-1 bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"npx apteva@latest"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>m("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:M==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"The Go binary that runs agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:[S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&S.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.agent.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.agent.updateAvailable?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"A new version is available. Stop all agents before updating."},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:S.jsxDEV("button",{onClick:v,disabled:R,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:R?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!g&&!b&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center gap-2 text-green-400",children:[S.jsxDEV(X5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:f,disabled:O,className:"text-sm text-[#666] hover:text-[#888] disabled:opacity-50",children:O?"Checking...":"Check for updates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function SI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:K,onStartEdit:_,onCancelEdit:A,onApiKeyChange:b,onSave:P,onDelete:M}){let w=Y.id==="ollama",[f,v]=V1.default.useState(null);return V1.default.useEffect(()=>{if(w&&Y.hasKey)fetch("/api/providers/ollama/status").then((m)=>m.json()).then((m)=>v({connected:m.connected,modelCount:m.modelCount})).catch(()=>v({connected:!1}))},[w,Y.hasKey]),S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[S.jsxDEV("div",{className:"min-w-0",children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":w?"Run models locally":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?S.jsxDEV("span",{className:`text-xs flex items-center gap-1 px-2 py-1 rounded whitespace-nowrap flex-shrink-0 ${w&&f?f.connected?"text-green-400 bg-green-500/10":"text-yellow-400 bg-yellow-500/10":"text-green-400 bg-green-500/10"}`,children:w&&f?f.connected?S.jsxDEV(S.Fragment,{children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),f.modelCount," models"]},void 0,!0,void 0,this):S.jsxDEV(S.Fragment,{children:"Not running"},void 0,!1,void 0,this):S.jsxDEV(S.Fragment,{children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:w?"text":"password",value:U,onChange:(m)=>b(m.target.value),placeholder:w?"http://localhost:11434":Y.hasKey?"Enter new API key...":"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),w&&S.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your Ollama server URL. Default is http://localhost:11434"},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:A,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":w?"Connect":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"View docs"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-3",children:[S.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:w?"Change URL":"Update key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:M,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:w?"Configure":"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function vI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:K,onStartEdit:_,onCancelEdit:A,onApiKeyChange:b,onSave:P,onDelete:M,projectsEnabled:w,projects:f,onRefresh:v}){let{authFetch:m}=T1(),[g,C]=V1.useState([]),[V,k]=V1.useState(""),[x,j]=V1.useState(!1),{confirm:u,ConfirmDialog:p}=A5(),s=async()=>{try{let y0=await(await m(`/api/keys/${Y.id}`)).json();C(y0.keys||[])}catch(e){console.error("Failed to fetch keys:",e)}};V1.useEffect(()=>{if(w)s()},[Y.id,w]);let a=async()=>{if(!U)return;try{if((await m(`/api/keys/${Y.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:U,project_id:V||null})})).ok)b(""),k(""),A(),s(),v()}catch(e){console.error("Failed to save key:",e)}},D=async(e,y0)=>{if(!await u(`Are you sure you want to remove this API key${y0?` (${y0})`:""}?`,{confirmText:"Remove",title:"Remove API Key"}))return;try{await m(`/api/keys/by-id/${e}`,{method:"DELETE"}),s(),v()}catch(i){console.error("Failed to delete key:",i)}},z0=g.find((e)=>!e.project_id),Q0=g.filter((e)=>e.project_id),U0=(e)=>f.find((y0)=>y0.id===e)?.name||"Unknown",b0=(e)=>f.find((y0)=>y0.id===e)?.color||"#666";if(!w)return S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?S.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:"password",value:U,onChange:(e)=>b(e.target.value),placeholder:Y.hasKey?"Enter new API key...":"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:A,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-3",children:[S.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:"Update key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:M,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return S.jsxDEV(S.Fragment,{children:[p,S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${g.length>0?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.length>0?S.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),g.length," key",g.length!==1?"s":""]},void 0,!0,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.length>0&&S.jsxDEV("div",{className:"mt-3 space-y-2",children:[z0&&S.jsxDEV("div",{className:"flex items-center justify-between text-sm bg-[#0a0a0a] rounded px-3 py-2",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:"text-[#888]",children:"Global"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#555]",children:"·"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#666] font-mono text-xs",children:z0.key_hint},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>D(z0.id,"Global"),className:"text-red-400 hover:text-red-300 text-xs",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0.slice(0,x?void 0:2).map((e)=>S.jsxDEV("div",{className:"flex items-center justify-between text-sm bg-[#0a0a0a] rounded px-3 py-2",children:[S.jsxDEV("div",{className:"flex items-center gap-2 min-w-0",children:[S.jsxDEV("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:b0(e.project_id)}},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#888] truncate",children:e.name||U0(e.project_id)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#555]",children:"·"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#666] font-mono text-xs",children:e.key_hint},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>D(e.id,e.name||U0(e.project_id)),className:"text-red-400 hover:text-red-300 text-xs flex-shrink-0 ml-2",children:"Remove"},void 0,!1,void 0,this)]},e.id,!0,void 0,this)),Q0.length>2&&!x&&S.jsxDEV("button",{onClick:()=>j(!0),className:"text-xs text-[#666] hover:text-[#888] w-full text-center py-1",children:["Show ",Q0.length-2," more..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:"password",value:U,onChange:(e)=>b(e.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),S.jsxDEV(J7,{value:V,onChange:k,placeholder:"Global (all projects)",options:[{value:"",label:"Global (all projects)"},...f.map((e)=>({value:e.id,label:e.name}))]},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:()=>{A(),k("")},className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:a,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:g.length>0?"View docs":"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fI(){let{authFetch:Y,user:G}=T1(),[U,O]=V1.useState(""),[q,R]=V1.useState(""),[K,_]=V1.useState(""),[A,b]=V1.useState(!1),[P,M]=V1.useState(null),w=async()=>{if(!U||!q||!K){M({type:"error",text:"All fields are required"});return}if(q!==K){M({type:"error",text:"New passwords do not match"});return}if(q.length<8){M({type:"error",text:"Password must be at least 8 characters"});return}b(!0),M(null);try{let f=await Y("/api/auth/password",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:U,newPassword:q})}),v=await f.json();if(f.ok)M({type:"success",text:"Password updated successfully"}),O(""),R(""),_("");else M({type:"error",text:v.error||"Failed to update password"})}catch{M({type:"error",text:"Failed to update password"})}b(!1)};return S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Account Settings"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Manage your account and security."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G&&S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 mb-6",children:[S.jsxDEV("h3",{className:"font-medium mb-3",children:"Profile"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-2 text-sm",children:[S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Username"},void 0,!1,void 0,this),S.jsxDEV("span",{children:G.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.email&&S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Email"},void 0,!1,void 0,this),S.jsxDEV("span",{children:G.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Role"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"capitalize",children:G.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[S.jsxDEV("h3",{className:"font-medium mb-4",children:"Change Password"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-4 max-w-md",children:[S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Current Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:U,onChange:(f)=>O(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"New Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:q,onChange:(f)=>R(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Confirm New Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:K,onChange:(f)=>_(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&S.jsxDEV("div",{className:`p-3 rounded text-sm ${P.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:P.text},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:w,disabled:A||!U||!q||!K,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black rounded text-sm font-medium transition",children:A?"Updating...":"Update Password"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function hI(){let{authFetch:Y}=T1(),[G,U]=V1.useState(!1),[O,q]=V1.useState(null),[R,K]=V1.useState(null),{confirm:_,ConfirmDialog:A}=A5(),b=async()=>{try{let w=await(await Y("/api/telemetry/stats")).json();K(w.stats?.total_events||0)}catch{K(null)}};V1.useEffect(()=>{b()},[]);let P=async()=>{if(!await _("Are you sure you want to delete all telemetry data? This cannot be undone.",{confirmText:"Clear All",title:"Clear Telemetry Data"}))return;U(!0),q(null);try{let w=await Y("/api/telemetry/clear",{method:"POST"}),f=await w.json();if(w.ok)q({type:"success",text:`Cleared ${f.deleted||0} telemetry events.`}),K(0);else q({type:"error",text:f.error||"Failed to clear telemetry"})}catch{q({type:"error",text:"Failed to clear telemetry"})}U(!1)};return S.jsxDEV(S.Fragment,{children:[A,S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[S.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:R!==null?`${R.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&S.jsxDEV("div",{className:`mb-4 p-3 rounded text-sm ${O.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:O.text},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:G||R===0,className:"px-4 py-2 bg-red-500/20 text-red-400 hover:bg-red-500/30 disabled:opacity-50 disabled:cursor-not-allowed rounded text-sm font-medium transition",children:G?"Clearing...":"Clear All Telemetry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var c4=B0(U1(),1),yI=[{key:"memory",icon:Fz,label:"Memory"},{key:"tasks",icon:D5,label:"Tasks"},{key:"files",icon:SQ,label:"Files"},{key:"vision",icon:Pz,label:"Vision"},{key:"operator",icon:bz,label:"Operator"},{key:"mcp",icon:m5,label:"MCP"},{key:"realtime",icon:Az,label:"Realtime"},{key:"agents",icon:vQ,label:"Multi-Agent"}];function R3({agent:Y,selected:G,onSelect:U,onToggle:O,showProject:q}){let R=yI.filter((w)=>Y.features?.[w.key]),K=Y.mcpServerDetails||[],_=Y.skillDetails||[],{isActive:A,type:b}=vZ(Y.id),{projects:P}=u4(),M=Y.projectId?P.find((w)=>w.id===Y.projectId):null;return c4.jsxDEV("div",{onClick:U,className:`bg-[#111] rounded p-5 border transition cursor-pointer flex flex-col h-full ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[c4.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[c4.jsxDEV("div",{children:[c4.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),c4.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&c4.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q&&M&&c4.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[c4.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:M.color}},void 0,!1,void 0,this),M.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c4.jsxDEV(VI,{status:Y.status,isActive:A&&Y.status==="running",activityType:b},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:R.map(({key:w,icon:f,label:v})=>c4.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:v,children:[c4.jsxDEV(f,{className:"w-3 h-3"},void 0,!1,void 0,this),v]},w,!0,void 0,this))},void 0,!1,void 0,this),K.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:K.map((w)=>{let f=w.type==="http"&&w.url||w.status==="running";return c4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${f?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${w.name} (${f?"available":w.status})`,children:[c4.jsxDEV(m5,{className:"w-3 h-3"},void 0,!1,void 0,this),w.name]},w.id,!0,void 0,this)})},void 0,!1,void 0,this),_.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:_.map((w)=>c4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${w.enabled?"bg-purple-500/10 text-purple-400":"bg-[#222] text-[#666]"}`,title:`Skill: ${w.name} v${w.version}`,children:[c4.jsxDEV(hZ,{className:"w-3 h-3"},void 0,!1,void 0,this),w.name]},w.id,!0,void 0,this))},void 0,!1,void 0,this),c4.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4 flex-1",children:Y.systemPrompt},void 0,!1,void 0,this),c4.jsxDEV("button",{onClick:O,className:`w-full px-3 py-1.5 rounded text-sm font-medium transition mt-auto ${Y.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:Y.status==="running"?"Stop":"Start"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function VI({status:Y,isActive:G,activityType:U}){if(Y==="running"&&G&&U)return c4.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:U},void 0,!1,void 0,this);return c4.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${Y==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:Y},void 0,!1,void 0,this)}var xZ=B0(f1(),1);var q1=B0(U1(),1),DI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:Fz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:D5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Pz},{key:"operator",label:"Operator",description:"Browser automation",icon:bz},{key:"mcp",label:"MCP",description:"External tools/services",icon:m5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Az},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:vQ}];function N3({form:Y,providers:G,configuredProviders:U,onFormChange:O,onProviderChange:q,onCreate:R,onClose:K,onGoToSettings:_}){let{projects:A,currentProjectId:b}=u4(),P=G.find((u)=>u.id===Y.provider),[M,w]=xZ.default.useState([]),[f,v]=xZ.default.useState(!1);xZ.default.useEffect(()=>{if(Y.provider==="ollama")v(!0),fetch("/api/providers/ollama/models").then((u)=>u.json()).then((u)=>{if(u.models&&u.models.length>0){if(w(u.models.map((p)=>({value:p.value,label:p.label||p.value}))),!Y.model&&u.models.length>0)O({...Y,model:u.models[0].value})}}).catch(()=>w([])).finally(()=>v(!1))},[Y.provider]);let m=U.filter((u)=>u.type==="llm").map((u)=>({value:u.id,label:u.name})),g=Y.provider==="ollama"&&M.length>0?M:P?.models.map((u)=>({value:u.value,label:u.label,recommended:u.recommended}))||[],C=A.map((u)=>({value:u.id,label:u.name}));xZ.default.useEffect(()=>{if(Y.projectId===void 0&&b&&b!=="unassigned")O({...Y,projectId:b})},[b]);let V=(u)=>{if(u==="agents")if(typeof Y.features.agents==="boolean"?Y.features.agents:Y.features.agents?.enabled??!1)O({...Y,features:{...Y.features,agents:!1}});else O({...Y,features:{...Y.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}});else O({...Y,features:{...Y.features,[u]:!Y.features[u]}})},k=()=>{let u=Y.features.agents;if(typeof u==="boolean")return u;return u?.enabled??!1},x=()=>{return Rz(Y.features,Y.projectId).mode||"worker"},j=(u)=>{let p=Rz(Y.features,Y.projectId);O({...Y,features:{...Y.features,agents:{...p,enabled:!0,mode:u}}})};return q1.jsxDEV(kQ,{children:[q1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),m.length===0?q1.jsxDEV(mI,{onGoToSettings:_},void 0,!1,void 0,this):q1.jsxDEV(q1.Fragment,{children:[q1.jsxDEV("div",{className:"space-y-4",children:[q1.jsxDEV(V8,{label:"Name",children:q1.jsxDEV("input",{type:"text",value:Y.name,onChange:(u)=>O({...Y,name:u.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]",placeholder:"My Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A.length>0&&q1.jsxDEV(V8,{label:"Project",children:q1.jsxDEV(J7,{value:Y.projectId||"",options:C,onChange:(u)=>O({...Y,projectId:u||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Provider",children:q1.jsxDEV(J7,{value:Y.provider,options:m,onChange:q,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Model",children:f?q1.jsxDEV("div",{className:"text-sm text-[#666] py-2",children:"Loading Ollama models..."},void 0,!1,void 0,this):Y.provider==="ollama"&&g.length===0?q1.jsxDEV("div",{className:"text-sm text-yellow-400/80 py-2",children:["No models found. Run ",q1.jsxDEV("code",{className:"bg-[#1a1a1a] px-1 rounded",children:"ollama pull llama3.3"},void 0,!1,void 0,this)," to download a model."]},void 0,!0,void 0,this):q1.jsxDEV(J7,{value:Y.model,options:g,onChange:(u)=>O({...Y,model:u}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"System Prompt",children:q1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(u)=>O({...Y,systemPrompt:u.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Features",children:q1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:DI.map(({key:u,label:p,description:s,icon:a})=>{let D=u==="agents"?k():!!Y.features[u];return q1.jsxDEV("button",{type:"button",onClick:()=>V(u),className:`flex items-center gap-3 p-3 rounded border text-left transition ${D?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV(a,{className:`w-5 h-5 flex-shrink-0 ${D?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"flex-1 min-w-0",children:[q1.jsxDEV("div",{className:`text-sm font-medium ${D?"text-[#f97316]":""}`,children:p},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},u,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),k()&&q1.jsxDEV(V8,{label:"Multi-Agent Mode",children:[q1.jsxDEV("div",{className:"flex gap-2",children:[q1.jsxDEV("button",{type:"button",onClick:()=>j("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${x()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV("div",{className:`text-sm font-medium ${x()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("button",{type:"button",onClick:()=>j("worker"),className:`flex-1 p-3 rounded border text-left transition ${x()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV("div",{className:`text-sm font-medium ${x()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives delegated tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&q1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.provider==="anthropic"&&q1.jsxDEV(V8,{label:"Agent Built-in Tools",children:[q1.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[q1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webSearch:!Y.features.builtinTools?.webSearch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[q1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webFetch:!Y.features.builtinTools?.webFetch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[q1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[q1.jsxDEV("button",{onClick:K,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),q1.jsxDEV("button",{onClick:R,disabled:!Y.name,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function V8({label:Y,children:G}){return q1.jsxDEV("div",{children:[q1.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}function mI({onGoToSettings:Y}){return q1.jsxDEV("div",{className:"text-center py-6",children:[q1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),q1.jsxDEV("button",{onClick:Y,className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Go to Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var k1=B0(f1(),1);var h=B0(U1(),1),EI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:Fz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:D5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Pz},{key:"operator",label:"Operator",description:"Browser automation",icon:bz},{key:"mcp",label:"MCP",description:"External tools/services",icon:m5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Az},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:vQ}];function M3({agent:Y,providers:G,onClose:U,onStartAgent:O,onUpdateAgent:q,onDeleteAgent:R}){let[K,_]=k1.useState("chat");return h.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[h.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[h.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:h.jsxDEV("div",{className:"flex gap-1",children:[h.jsxDEV(EQ,{active:K==="chat",onClick:()=>_("chat"),children:"Chat"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="threads",onClick:()=>_("threads"),children:"Threads"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="tasks",onClick:()=>_("tasks"),children:"Tasks"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="memory",onClick:()=>_("memory"),children:"Memory"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="files",onClick:()=>_("files"),children:"Files"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="settings",onClick:()=>_("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:h.jsxDEV(V5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[K==="chat"&&h.jsxDEV(uI,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),K==="threads"&&h.jsxDEV(gI,{agent:Y},void 0,!1,void 0,this),K==="tasks"&&h.jsxDEV(xI,{agent:Y},void 0,!1,void 0,this),K==="memory"&&h.jsxDEV(jI,{agent:Y},void 0,!1,void 0,this),K==="files"&&h.jsxDEV(pI,{agent:Y},void 0,!1,void 0,this),K==="settings"&&h.jsxDEV(cI,{agent:Y,providers:G,onUpdateAgent:q,onDeleteAgent:R},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function EQ({active:Y,onClick:G,children:U}){return h.jsxDEV("button",{onClick:G,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${Y?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:U},void 0,!1,void 0,this)}function uI({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return h.jsxDEV(B3,{agentId:"default",apiUrl:`/api/agents/${Y.id}`,placeholder:"Message this agent...",context:Y.systemPrompt,variant:"terminal",headerTitle:Y.name},void 0,!1,void 0,this);return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:G,className:"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition",children:"Start Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function gI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(null),[b,P]=k1.useState([]),[M,w]=k1.useState(!1),{confirm:f,ConfirmDialog:v}=A5();k1.useEffect(()=>{U([]),A(null),P([]),K(null),q(!0)},[Y.id]),k1.useEffect(()=>{if(Y.status!=="running"){q(!1);return}(async()=>{try{let V=await fetch(`/api/agents/${Y.id}/threads`);if(!V.ok)throw Error("Failed to fetch threads");let k=await V.json();U(k.threads||[]),K(null)}catch(V){K(V instanceof Error?V.message:"Failed to load threads")}finally{q(!1)}})()},[Y.id,Y.status]);let m=async(C)=>{A(C),w(!0);try{let V=await fetch(`/api/agents/${Y.id}/threads/${C}/messages`);if(!V.ok)throw Error("Failed to fetch messages");let k=await V.json();P(k.messages||[])}catch{P([])}finally{w(!1)}},g=async(C,V)=>{if(V.stopPropagation(),!await f("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${C}`,{method:"DELETE"}),U((x)=>x.filter((j)=>j.id!==C)),_===C)A(null),P([])}catch{}};if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(_){let C=G.find((V)=>V.id===_);return h.jsxDEV(h.Fragment,{children:[v,h.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[h.jsxDEV("button",{onClick:()=>{A(null),P([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1",children:[h.jsxDEV("p",{className:"text-sm font-medium",children:C?.title||`Thread ${_.slice(0,8)}`},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666]",children:C&&new Date(C.updated_at||C.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:(V)=>g(_,V),className:"text-[#666] hover:text-red-400 text-sm px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:M?h.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):b.length===0?h.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-4",children:b.map((V,k)=>h.jsxDEV("div",{className:`${V.role==="user"?"text-right":""}`,children:h.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${V.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[h.jsxDEV("div",{className:"text-sm whitespace-pre-wrap",children:typeof V.content==="string"?V.content:Array.isArray(V.content)?V.content.map((x,j)=>h.jsxDEV("div",{children:[x.type==="text"&&x.text,x.type==="tool_use"&&h.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDD27 Tool: ",x.name]},void 0,!0,void 0,this),x.type==="tool_result"&&h.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDCCB Result: ",typeof x.content==="string"?x.content.slice(0,200):"..."]},void 0,!0,void 0,this)]},j,!0,void 0,this)):JSON.stringify(V.content)},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:new Date(V.created_at).toLocaleTimeString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},k,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}return h.jsxDEV(h.Fragment,{children:[v,h.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?h.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:h.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):h.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((C)=>h.jsxDEV("div",{onClick:()=>m(C.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm font-medium truncate",children:C.title||`Thread ${C.id.slice(0,8)}`},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(C.updated_at||C.created_at).toLocaleString(),C.message_count!==void 0&&` • ${C.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:(V)=>g(C.id,V),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},C.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function xI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState("all");k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let b=async()=>{if(Y.status!=="running"){q(!1);return}try{let M=await fetch(`/api/agents/${Y.id}/tasks?status=${_}`);if(!M.ok)throw Error("Failed to fetch tasks");let w=await M.json();U(w.tasks||[]),K(null)}catch(M){K(M instanceof Error?M.message:"Failed to load tasks")}finally{q(!1)}};k1.useEffect(()=>{q(!0),b()},[Y.id,Y.status,_]),k1.useEffect(()=>{if(Y.status!=="running")return;let M=setInterval(b,5000);return()=>clearInterval(M)},[Y.id,Y.status,_]);let P=(M)=>{switch(M){case"pending":return"bg-yellow-500/20 text-yellow-400";case"running":return"bg-blue-500/20 text-blue-400";case"completed":return"bg-green-500/20 text-green-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-[#222] text-[#666]"}};if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view tasks"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!Y.features?.tasks)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to schedule tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[h.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((M)=>h.jsxDEV("button",{onClick:()=>A(M),className:`px-3 py-1 text-xs rounded transition ${_===M?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:M.charAt(0).toUpperCase()+M.slice(1)},M,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:h.jsxDEV("p",{children:["No ",_==="all"?"":_+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-3",children:G.map((M)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[h.jsxDEV("div",{className:"flex items-start justify-between",children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:M.name},void 0,!1,void 0,this),M.description&&h.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:M.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${P(M.status)}`,children:M.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[h.jsxDEV("span",{children:["Created: ",new Date(M.created_at).toLocaleString()]},void 0,!0,void 0,this),M.scheduled_at&&h.jsxDEV("span",{children:["Scheduled: ",new Date(M.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M.status==="completed"&&M.result&&h.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[h.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"whitespace-pre-wrap",children:M.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.status==="failed"&&M.error&&h.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[h.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"whitespace-pre-wrap",children:M.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},M.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(!1),{confirm:b,ConfirmDialog:P}=A5();k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let M=async()=>{if(Y.status!=="running"){q(!1);return}try{let v=await fetch(`/api/agents/${Y.id}/memories`);if(!v.ok)throw Error("Failed to fetch memories");let m=await v.json();U(m.memories||[]),A(m.enabled??!1),K(null)}catch(v){K(v instanceof Error?v.message:"Failed to load memories")}finally{q(!1)}};k1.useEffect(()=>{M()},[Y.id,Y.status]);let w=async(v)=>{try{await fetch(`/api/agents/${Y.id}/memories/${v}`,{method:"DELETE"}),U((m)=>m.filter((g)=>g.id!==v))}catch{}},f=async()=>{if(!await b("Clear all memories?",{confirmText:"Clear",title:"Clear Memories"}))return;try{await fetch(`/api/agents/${Y.id}/memories`,{method:"DELETE"}),U([])}catch{}};if(!Y.features?.memory)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to persist knowledge"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!_)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Check OPENAI_API_KEY for embeddings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV(h.Fragment,{children:[P,h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&h.jsxDEV("button",{onClick:f,className:"text-xs text-red-400 hover:text-red-300",children:"Clear All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[h.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm mt-1",children:"The agent will remember important information from conversations"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"space-y-3",children:G.map((v)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[h.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[h.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:v.content},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>w(v.id),className:"text-[#666] hover:text-red-400 text-sm flex-shrink-0",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[h.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${v.type==="preference"?"bg-purple-500/20 text-purple-400":v.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:v.type},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(v.created_at).toLocaleString()},void 0,!1,void 0,this),v.importance&&h.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",v.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},v.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function pI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(!1),[b,P]=k1.useState(null),[M,w]=k1.useState(!1),f=k1.default.useRef(null),{confirm:v,ConfirmDialog:m}=A5();k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let g=async()=>{if(Y.status!=="running"){q(!1);return}try{let D=await fetch(`/api/agents/${Y.id}/files`);if(!D.ok)throw Error("Failed to fetch files");let z0=await D.json();U(z0.files||[]),K(null)}catch(D){K(D instanceof Error?D.message:"Failed to load files")}finally{q(!1)}};k1.useEffect(()=>{g()},[Y.id,Y.status]);let C=async(D)=>{if(!await v("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${Y.id}/files/${D}`,{method:"DELETE"}),U((Q0)=>Q0.filter((U0)=>U0.id!==D))}catch{}},V=(D,z0)=>{let Q0=document.createElement("a");Q0.href=`/api/agents/${Y.id}/files/${D}/download`,Q0.download=z0,Q0.click()},k=(D)=>{if(D<1024)return`${D} B`;if(D<1048576)return`${(D/1024).toFixed(1)} KB`;return`${(D/1048576).toFixed(1)} MB`},x=async(D)=>{A(!0),P(null);try{let z0=new FormData;z0.append("file",D);let Q0=await fetch(`/api/agents/${Y.id}/files`,{method:"POST",body:z0});if(!Q0.ok){let U0=await Q0.json();throw Error(U0.error||"Upload failed")}await g()}catch(z0){P(z0 instanceof Error?z0.message:"Upload failed")}finally{A(!1)}},j=(D)=>{let z0=D.target.files?.[0];if(z0)x(z0);D.target.value=""},u=(D)=>{D.preventDefault(),w(!1);let z0=D.dataTransfer.files?.[0];if(z0)x(z0)},p=(D)=>{D.preventDefault(),w(!0)},s=(D)=>{D.preventDefault(),w(!1)},a=(D)=>{if(D.startsWith("image/"))return"\uD83D\uDDBC";if(D.includes("pdf"))return"\uD83D\uDCD5";if(D.includes("json"))return"{}";if(D.includes("javascript")||D.includes("typescript"))return"⚡";if(D.startsWith("text/"))return"\uD83D\uDCC4";if(D.startsWith("audio/"))return"\uD83C\uDFB5";if(D.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to manage files"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV(h.Fragment,{children:[m,h.jsxDEV("div",{className:`flex-1 overflow-auto p-4 transition ${M?"bg-[#f97316]/5":""}`,onDrop:u,onDragOver:p,onDragLeave:s,children:[h.jsxDEV("input",{ref:f,type:"file",className:"hidden",onChange:j},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>f.current?.click(),disabled:_,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded font-medium transition",children:_?"Uploading...":"Upload"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:g,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&h.jsxDEV("div",{className:"mb-4 text-sm bg-red-500/10 text-red-400 px-3 py-2 rounded",children:b},void 0,!1,void 0,this),M&&h.jsxDEV("div",{className:"mb-4 border-2 border-dashed border-[#f97316] rounded-lg p-8 text-center",children:h.jsxDEV("p",{className:"text-[#f97316]",children:"Drop file to upload"},void 0,!1,void 0,this)},void 0,!1,void 0,this),G.length===0&&!M&&h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[h.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm mt-1",children:"Drop files here, click Upload, or attach files in Chat"},void 0,!1,void 0,this),Y.features?.memory&&h.jsxDEV("p",{className:"text-xs mt-2 text-[#555]",children:"Files will be auto-ingested into memory"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length>0&&h.jsxDEV("div",{className:"space-y-2",children:G.map((D)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[h.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:a(D.mime_type)},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:D.filename},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666]",children:[k(D.size_bytes)," • ",new Date(D.created_at).toLocaleString(),D.source&&D.source!=="upload"&&` • ${D.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>V(D.id,D.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>C(D.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},D.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function cI({agent:Y,providers:G,onUpdateAgent:U,onDeleteAgent:O}){let{authFetch:q,isDev:R}=T1(),[K,_]=k1.useState({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),[A,b]=k1.useState(!1),[P,M]=k1.useState(!1),[w,f]=k1.useState(null),[v,m]=k1.useState([]),[g,C]=k1.useState([]),[V,k]=k1.useState(null),[x,j]=k1.useState(!1);k1.useEffect(()=>{(async()=>{try{let O0=await(await q("/api/mcp/servers")).json();m(O0.servers||[])}catch(R0){console.error("Failed to fetch MCP servers:",R0)}})()},[q]),k1.useEffect(()=>{if(!R)return;(async()=>{try{let R0=await q(`/api/agents/${Y.id}/api-key`);if(R0.ok){let O0=await R0.json();k(O0.apiKey)}}catch(R0){}})()},[Y.id,R,q]),k1.useEffect(()=>{(async()=>{try{let O0=await(await q("/api/skills")).json();C(O0.skills||[])}catch(R0){console.error("Failed to fetch skills:",R0)}})()},[q]),k1.useEffect(()=>{_({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),f(null)},[Y.id]);let u=G.find((i)=>i.id===K.provider),p=G.filter((i)=>i.hasKey&&i.type==="llm").map((i)=>({value:i.id,label:i.name})),s=u?.models.map((i)=>({value:i.value,label:i.label,recommended:i.recommended}))||[],a=(i)=>{let R0=G.find((q0)=>q0.id===i),O0=R0?.models.find((q0)=>q0.recommended)?.value||R0?.models[0]?.value||"";_((q0)=>({...q0,provider:i,model:O0}))},D=(i)=>{if(i==="agents"){let R0=(O0)=>{return Rz(O0.features,Y.projectId).enabled};_((O0)=>{if(typeof O0.features.agents==="boolean"?O0.features.agents:O0.features.agents?.enabled??!1)return{...O0,features:{...O0.features,agents:!1}};else return{...O0,features:{...O0.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}}})}else _((R0)=>({...R0,features:{...R0.features,[i]:!R0.features[i]}}))},z0=(i)=>{_((R0)=>{let O0=Rz(R0.features,Y.projectId);return{...R0,features:{...R0.features,agents:{...O0,enabled:!0,mode:i}}}})},Q0=()=>{let i=K.features.agents;if(typeof i==="boolean")return i;return i?.enabled??!1},U0=()=>{return Rz(K.features,Y.projectId).mode||"worker"},b0=(i)=>{_((R0)=>({...R0,mcpServers:R0.mcpServers.includes(i)?R0.mcpServers.filter((O0)=>O0!==i):[...R0.mcpServers,i]}))},e=(i)=>{_((R0)=>({...R0,skills:R0.skills.includes(i)?R0.skills.filter((O0)=>O0!==i):[...R0.skills,i]}))},y0=async()=>{b(!0),f(null);let i=await U(K);if(b(!1),i.error)f({type:"error",text:i.error});else f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),2000)},I0=K.name!==Y.name||K.provider!==Y.provider||K.model!==Y.model||K.systemPrompt!==Y.systemPrompt||JSON.stringify(K.features)!==JSON.stringify(Y.features)||JSON.stringify(K.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort())||JSON.stringify(K.skills.sort())!==JSON.stringify((Y.skills||[]).sort());return h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:h.jsxDEV("div",{className:"space-y-4",children:[h.jsxDEV(e6,{label:"Name",children:h.jsxDEV("input",{type:"text",value:K.name,onChange:(i)=>_((R0)=>({...R0,name:i.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Provider",children:h.jsxDEV(J7,{value:K.provider,options:p,onChange:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Model",children:h.jsxDEV(J7,{value:K.model,options:s,onChange:(i)=>_((R0)=>({...R0,model:i}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"System Prompt",children:h.jsxDEV("textarea",{value:K.systemPrompt,onChange:(i)=>_((R0)=>({...R0,systemPrompt:i.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Features",children:h.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:EI.map(({key:i,label:R0,description:O0,icon:q0})=>{let o=i==="agents"?Q0():!!K.features[i];return h.jsxDEV("button",{type:"button",onClick:()=>D(i),className:`flex items-center gap-3 p-3 rounded border text-left transition ${o?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV(q0,{className:`w-5 h-5 flex-shrink-0 ${o?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:`text-sm font-medium ${o?"text-[#f97316]":""}`,children:R0},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:O0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},i,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q0()&&h.jsxDEV(e6,{label:"Multi-Agent Mode",children:[h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{type:"button",onClick:()=>z0("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${U0()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`text-sm font-medium ${U0()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates to other agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{type:"button",onClick:()=>z0("worker"),className:`flex-1 p-3 rounded border text-left transition ${U0()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`text-sm font-medium ${U0()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives tasks from coordinators"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&h.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.provider==="anthropic"&&h.jsxDEV(e6,{label:"Agent Built-in Tools",children:[h.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[h.jsxDEV("button",{type:"button",onClick:()=>_((i)=>({...i,features:{...i.features,builtinTools:{...i.features.builtinTools,webSearch:!i.features.builtinTools?.webSearch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${K.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[h.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{type:"button",onClick:()=>_((i)=>({...i,features:{...i.features,builtinTools:{...i.features.builtinTools,webFetch:!i.features.builtinTools?.webFetch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${K.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[h.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.features.mcp&&h.jsxDEV(e6,{label:"MCP Servers",children:v.length===0?h.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers configured. Add servers in the MCP page first."},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-2",children:[v.filter((i)=>i.project_id===null||i.project_id===Y.projectId).map((i)=>{let R0=i.type==="http"&&i.url,O0=R0||i.status==="running",q0=R0?`${i.source||"remote"} • http`:`${i.type} • ${i.package||i.command||"custom"}${i.status==="running"&&i.port?` • :${i.port}`:""}`;return h.jsxDEV("button",{type:"button",onClick:()=>b0(i.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${K.mcpServers.includes(i.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${O0?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("span",{className:`text-sm font-medium ${K.mcpServers.includes(i.id)?"text-[#f97316]":""}`,children:i.name},void 0,!1,void 0,this),i.project_id===null&&h.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:q0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${O0?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:R0?"remote":i.status},void 0,!1,void 0,this)]},i.id,!0,void 0,this)}),h.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Remote servers are always available. Local servers must be running."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Skills",children:g.length===0?h.jsxDEV("p",{className:"text-sm text-[#666]",children:"No skills configured. Add skills in the Skills page first."},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-2",children:[g.filter((i)=>i.enabled&&(i.project_id===null||i.project_id===Y.projectId)).map((i)=>h.jsxDEV("button",{type:"button",onClick:()=>e(i.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${K.skills.includes(i.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("span",{className:`text-sm font-medium ${K.skills.includes(i.id)?"text-[#f97316]":""}`,children:i.name},void 0,!1,void 0,this),i.project_id===null&&h.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:i.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs px-2 py-0.5 rounded bg-[#222] text-[#666]",children:["v",i.version]},void 0,!0,void 0,this)]},i.id,!0,void 0,this)),h.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Skills provide reusable instructions for the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&h.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${w.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:w.text},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:y0,disabled:!I0||A||!K.name,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:A?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&I0&&h.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),R&&V&&h.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[h.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Developer Info"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-2",children:[h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Agent ID"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.id},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Port"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.port||"N/A"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex flex-col gap-1",children:[h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"API Key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>j(!x),className:"text-xs text-[#f97316] hover:text-[#fb923c]",children:x?"Hide":"Show"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),x&&h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888] break-all",children:V},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.status==="running"&&Y.port&&h.jsxDEV("div",{className:"flex flex-col gap-1 mt-2",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Test with curl"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1.5 rounded text-[#666] break-all",children:['curl -H "X-API-Key: ',x?V:"***",'" http://localhost:',Y.port,"/config"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[h.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),P?h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{onClick:()=>M(!1),className:"flex-1 border border-[#333] hover:border-[#444] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:O,className:"flex-1 bg-red-500/20 text-red-400 hover:bg-red-500/30 px-4 py-2 rounded font-medium transition",children:"Confirm Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("button",{onClick:()=>M(!0),className:"w-full border border-red-500/30 text-red-400/70 hover:border-red-500/50 hover:text-red-400 px-4 py-2 rounded font-medium transition",children:"Delete Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function e6({label:Y,children:G}){return h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}var WO=B0(f1(),1);var k4=B0(U1(),1);function w3({agents:Y,loading:G,selectedAgent:U,providers:O,onSelectAgent:q,onCloseAgent:R,onToggleAgent:K,onDeleteAgent:_,onUpdateAgent:A,onNewAgent:b,canCreateAgent:P=!0}){let{currentProjectId:M,currentProject:w}=u4(),f=WO.useMemo(()=>{if(M===null)return Y;if(M==="unassigned")return Y.filter((m)=>!m.projectId);return Y.filter((m)=>m.projectId===M)},[Y,M]),v=M===null?"Agents":M==="unassigned"?"Unassigned Agents":w?.name||"Agents";return k4.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[k4.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[k4.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[k4.jsxDEV("div",{className:"flex items-center gap-3",children:[w&&k4.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),k4.jsxDEV("h1",{className:"text-xl font-semibold",children:v},void 0,!1,void 0,this),M!==null&&k4.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",f.length," agent",f.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&k4.jsxDEV("button",{onClick:b,disabled:!P,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G?k4.jsxDEV(wz,{message:"Loading agents..."},void 0,!1,void 0,this):f.length===0?k4.jsxDEV(dI,{onNewAgent:b,canCreateAgent:P,hasProjectFilter:M!==null},void 0,!1,void 0,this):k4.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3 auto-rows-fr",children:f.map((m)=>k4.jsxDEV(R3,{agent:m,selected:U?.id===m.id,onSelect:()=>q(m),onToggle:(g)=>K(m,g),showProject:M===null},m.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&k4.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:R},void 0,!1,void 0,this),U&&k4.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:k4.jsxDEV(M3,{agent:U,providers:O,onClose:R,onStartAgent:(m)=>K(U,m),onUpdateAgent:(m)=>A(U.id,m),onDeleteAgent:()=>_(U.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function dI({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:U}){return k4.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[U?k4.jsxDEV(k4.Fragment,{children:[k4.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),k4.jsxDEV("p",{className:"text-sm mt-1",children:"Create an agent or assign existing agents to this project"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):k4.jsxDEV(k4.Fragment,{children:[k4.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),k4.jsxDEV("p",{className:"text-sm mt-1",children:"Create your first agent to get started"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y&&k4.jsxDEV("button",{onClick:Y,disabled:!G,className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var l7=B0(f1(),1);var B1=B0(U1(),1);function P3({agents:Y,loading:G,runningCount:U,configuredProviders:O,onNavigate:q,onSelectAgent:R}){let{authFetch:K}=T1(),{currentProjectId:_}=u4(),{events:A}=F6(),[b,P]=l7.useState(null),[M,w]=l7.useState([]),[f,v]=l7.useState([]),m=l7.useMemo(()=>{if(!_)return Y;if(_==="unassigned")return Y.filter((p)=>!p.projectId);return Y.filter((p)=>p.projectId===_)},[Y,_]),g=l7.useMemo(()=>{return m.filter((p)=>p.status==="running").length},[m]),C=l7.useMemo(()=>{return new Set(m.map((p)=>p.id))},[m]),V=l7.useCallback(async()=>{try{let[p,s,a]=await Promise.all([K("/api/dashboard"),K("/api/tasks?status=all"),K("/api/telemetry/events?type=thread_activity&limit=20")]);if(p.ok){let D=await p.json();P(D)}if(s.ok){let D=await s.json();w((D.tasks||[]).slice(0,5))}if(a.ok){let D=await a.json();v(D.events||[])}}catch(p){console.error("Failed to fetch dashboard data:",p)}},[K]);l7.useEffect(()=>{V();let p=setInterval(V,1e4);return()=>clearInterval(p)},[V]);let k=l7.useMemo(()=>{if(!_)return M;return M.filter((p)=>C.has(p.agentId))},[M,_,C]),x=l7.useMemo(()=>{if(!_)return b?.tasks||{total:0,pending:0,running:0,completed:0};let p=k.length,s=k.filter((z0)=>z0.status==="pending").length,a=k.filter((z0)=>z0.status==="running").length,D=k.filter((z0)=>z0.status==="completed").length;return{total:p,pending:s,running:a,completed:D}},[b,_,k]),j=l7.useMemo(()=>{let p=A.filter((z0)=>z0.type==="thread_activity"),s=new Set(p.map((z0)=>z0.id)),a=[...p];for(let z0 of f)if(!s.has(z0.id))a.push(z0),s.add(z0.id);let D=a;if(_)D=a.filter((z0)=>C.has(z0.agent_id));return D.sort((z0,Q0)=>new Date(Q0.timestamp).getTime()-new Date(z0.timestamp).getTime()),D.slice(0,8)},[A,f,_,C]),u=l7.useMemo(()=>{let p=new Map;for(let s of Y)p.set(s.id,s.name);return p},[Y]);return B1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[B1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[B1.jsxDEV(F3,{label:"Agents",value:m.length,subValue:`${g} running`},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Tasks",value:x.total,subValue:`${x.pending} pending`},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Completed",value:x.completed,color:"text-green-400"},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[B1.jsxDEV(Z2,{title:"Agents",actionLabel:"View All",onAction:()=>q("agents"),children:G?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):m.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:m.slice(0,5).map((p)=>B1.jsxDEV(lI,{agent:p,onSelect:()=>R(p),showProject:!_},p.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),B1.jsxDEV(Z2,{title:"Activity",actionLabel:"Telemetry",onAction:()=>q("telemetry"),children:j.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[B1.jsxDEV("p",{children:"No activity yet"},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Agent activity will appear here in real-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:j.map((p)=>B1.jsxDEV(oI,{activity:p.data?.activity||"Working...",agentName:u.get(p.agent_id)||p.agent_id,timestamp:p.timestamp},p.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),B1.jsxDEV(Z2,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>q("tasks"),children:k.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[B1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:k.map((p)=>B1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[B1.jsxDEV("div",{className:"flex-1 min-w-0",children:[B1.jsxDEV("p",{className:"font-medium truncate",children:p.title},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#666]",children:p.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV(aI,{status:p.status},void 0,!1,void 0,this)]},`${p.agentId}-${p.id}`,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function F3({label:Y,value:G,subValue:U,color:O}){return B1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[B1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),B1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),U&&B1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Z2({title:Y,actionLabel:G,onAction:U,children:O}){return B1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[B1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[B1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),B1.jsxDEV("button",{onClick:U,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O]},void 0,!0,void 0,this)}function lI({agent:Y,onSelect:G,showProject:U}){let{isActive:O}=vZ(Y.id),{projects:q}=u4(),R=Y.projectId?q.find((K)=>K.id===Y.projectId):null;return B1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[B1.jsxDEV("div",{className:"flex-1 min-w-0",children:[B1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),B1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[B1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),U&&R&&B1.jsxDEV(B1.Fragment,{children:[B1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),B1.jsxDEV("span",{className:"flex items-center gap-1",children:[B1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}},void 0,!1,void 0,this),R.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Y.status==="running"?O?"bg-green-400 animate-pulse":"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iI(Y){let G=Math.floor((Date.now()-new Date(Y).getTime())/1000);if(G<5)return"just now";if(G<60)return`${G}s ago`;let U=Math.floor(G/60);if(U<60)return`${U}m ago`;let O=Math.floor(U/60);if(O<24)return`${O}h ago`;return`${Math.floor(O/24)}d ago`}function oI({activity:Y,agentName:G,timestamp:U}){return B1.jsxDEV("div",{className:"px-4 py-3",children:[B1.jsxDEV("p",{className:"text-sm truncate",children:Y},void 0,!1,void 0,this),B1.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#555] mt-1",children:[B1.jsxDEV("span",{className:"text-[#666]",children:G},void 0,!1,void 0,this),B1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),B1.jsxDEV("span",{children:iI(U)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aI({status:Y}){let G={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return B1.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${G[Y]||G.pending}`,children:Y},void 0,!1,void 0,this)}var J5=B0(f1(),1);var L0=B0(U1(),1);function b3({onSelectAgent:Y}){let{authFetch:G}=T1(),[U,O]=J5.useState([]),[q,R]=J5.useState(!0),[K,_]=J5.useState("all"),[A,b]=J5.useState(null),[P,M]=J5.useState(!1),w=J5.useRef(null),{events:f}=DG({category:"TASK"}),v=J5.useCallback(async()=>{try{let k=await(await G(`/api/tasks?status=${K}`)).json();O(k.tasks||[])}catch(V){console.error("Failed to fetch tasks:",V)}finally{R(!1)}},[G,K]);J5.useEffect(()=>{v()},[v]),J5.useEffect(()=>{if(!f.length)return;let V=f[0];if(!V||V.id===w.current)return;let k=V.type;if(k==="task_created"||k==="task_updated"||k==="task_deleted")w.current=V.id,console.log("[TasksPage] Telemetry event:",k),v()},[f,v]);let m=J5.useCallback(async(V)=>{b(V),M(!0);try{let k=await G(`/api/tasks/${V.agentId}/${V.id}`);if(console.log("[TasksPage] Fetch task response status:",k.status),k.ok){let x=await k.json();if(console.log("[TasksPage] Task data:",x),console.log("[TasksPage] Has trajectory:",!!x.task?.trajectory,"Length:",x.task?.trajectory?.length),x.task)b({...x.task,agentId:V.agentId,agentName:V.agentName})}else console.error("[TasksPage] Failed to fetch task:",k.status,await k.text())}catch(k){console.error("Failed to fetch task details:",k)}finally{M(!1)}},[G]),g={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return L0.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[L0.jsxDEV("div",{className:`flex-1 p-4 md:p-6 overflow-auto ${A?"hidden md:block md:w-1/2 lg:w-2/3":""}`,children:L0.jsxDEV("div",{className:"max-w-4xl",children:[L0.jsxDEV("div",{className:"mb-6",children:[L0.jsxDEV("div",{className:"mb-4",children:[L0.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-1",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((V)=>L0.jsxDEV("button",{onClick:()=>_(V.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${K===V.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:V.label},V.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q?L0.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):U.length===0?L0.jsxDEV("div",{className:"text-center py-12",children:[L0.jsxDEV(D5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L0.jsxDEV("div",{className:"space-y-3",children:U.map((V)=>L0.jsxDEV("div",{onClick:()=>m(V),className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${A?.id===V.id&&A?.agentId===V.agentId?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[L0.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[L0.jsxDEV("div",{className:"flex-1",children:[L0.jsxDEV("h3",{className:"font-medium",children:V.title},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#666]",children:[V.agentName,V.execute_at&&L0.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(V.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${g[V.status]||g.pending}`,children:V.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V.description&&L0.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:V.description},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[L0.jsxDEV("span",{children:["Type: ",V.type]},void 0,!0,void 0,this),L0.jsxDEV("span",{children:["Priority: ",V.priority]},void 0,!0,void 0,this),V.recurrence&&L0.jsxDEV("span",{children:["Recurrence: ",V.recurrence]},void 0,!0,void 0,this),L0.jsxDEV("span",{children:["Created: ",new Date(V.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${V.agentId}-${V.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),A&&L0.jsxDEV(nI,{task:A,statusColors:g,onClose:()=>b(null),onSelectAgent:Y,loading:P},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nI({task:Y,statusColors:G,onClose:U,onSelectAgent:O,loading:q}){return L0.jsxDEV("div",{className:"w-full md:w-1/2 lg:w-1/3 border-l border-[#1a1a1a] bg-[#0a0a0a] flex flex-col overflow-hidden",children:[L0.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-[#1a1a1a]",children:[L0.jsxDEV("h2",{className:"font-medium truncate pr-2",children:"Task Details"},void 0,!1,void 0,this),L0.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition",children:L0.jsxDEV(V5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[L0.jsxDEV("div",{children:[L0.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[L0.jsxDEV("h3",{className:"text-lg font-medium",children:Y.title},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium flex-shrink-0 ${G[Y.status]}`,children:Y.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("button",{onClick:()=>O?.(Y.agentId),className:"text-sm text-[#f97316] hover:underline",children:Y.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.description&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-1",children:"Description"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#888] whitespace-pre-wrap",children:Y.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Type"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"capitalize",children:Y.type},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Priority"},void 0,!1,void 0,this),L0.jsxDEV("p",{children:Y.priority},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Source"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"capitalize",children:Y.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.recurrence&&L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Recurrence"},void 0,!1,void 0,this),L0.jsxDEV("p",{children:Y.recurrence},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"space-y-2 text-sm",children:[L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Created"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.execute_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Scheduled"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.execute_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.executed_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Started"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.executed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.completed_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Completed"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.completed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.next_run&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Next Run"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.next_run).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.status==="failed"&&Y.error&&L0.jsxDEV("div",{className:"min-w-0",children:[L0.jsxDEV("h4",{className:"text-xs text-red-400 uppercase tracking-wider mb-1",children:"Error"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/20 rounded p-3 overflow-x-auto",children:L0.jsxDEV("pre",{className:"text-sm text-red-400 whitespace-pre-wrap break-words",children:Y.error},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.status==="completed"&&Y.result&&L0.jsxDEV("div",{className:"min-w-0",children:[L0.jsxDEV("h4",{className:"text-xs text-green-400 uppercase tracking-wider mb-1",children:"Result"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/20 rounded p-3 overflow-x-auto",children:L0.jsxDEV("pre",{className:"text-sm text-green-400 whitespace-pre-wrap break-words",children:typeof Y.result==="string"?Y.result:JSON.stringify(Y.result,null,2)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&!Y.trajectory&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:"Trajectory"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"text-sm text-[#555]",children:"Loading trajectory..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.trajectory&&Y.trajectory.length>0&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:["Trajectory (",Y.trajectory.length," steps)"]},void 0,!0,void 0,this),L0.jsxDEV(rI,{trajectory:Y.trajectory},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function rI({trajectory:Y}){let[G,U]=J5.useState(new Set),O=(K)=>{U((_)=>{let A=new Set(_);if(A.has(K))A.delete(K);else A.add(K);return A})},q={user:{bg:"bg-blue-500/10",text:"text-blue-400",icon:"\uD83D\uDC64",label:"User"},assistant:{bg:"bg-purple-500/10",text:"text-purple-400",icon:"\uD83E\uDD16",label:"Assistant"}},R=(K)=>{let _=K.content;if(typeof _==="string"){let A=_.length>200,b=G.has(K.id);return L0.jsxDEV("div",{children:[L0.jsxDEV("p",{className:`text-sm text-[#ccc] whitespace-pre-wrap break-words ${!b&&A?"line-clamp-4":""}`,children:_},void 0,!1,void 0,this),A&&L0.jsxDEV("button",{onClick:()=>O(K.id),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:b?"Show less":"Show more..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return L0.jsxDEV("div",{className:"space-y-2",children:_.map((A,b)=>{if(A.type==="tool_use"){let P=JSON.stringify(A.input,null,2),M=P.length>150,w=`${K.id}-${b}`,f=G.has(w);return L0.jsxDEV("div",{className:"bg-orange-500/10 border border-orange-500/20 rounded p-2",children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[L0.jsxDEV("span",{className:"text-orange-400",children:"\uD83D\uDD27"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:"text-xs font-medium text-orange-400",children:"Tool Call"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:"text-xs text-[#888]",children:A.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto ${!f&&M?"line-clamp-3":""}`,children:P},void 0,!1,void 0,this),M&&L0.jsxDEV("button",{onClick:()=>O(w),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:f?"Show less":"Show more..."},void 0,!1,void 0,this)]},b,!0,void 0,this)}if(A.type==="tool_result"){let P=A.is_error,M=`${K.id}-${b}`,w=G.has(M),f=A.content.length>150;return L0.jsxDEV("div",{className:`${P?"bg-red-500/10 border-red-500/20":"bg-teal-500/10 border-teal-500/20"} border rounded p-2`,children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[L0.jsxDEV("span",{children:P?"❌":"\uD83D\uDCCB"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`text-xs font-medium ${P?"text-red-400":"text-teal-400"}`,children:"Tool Result"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto whitespace-pre-wrap break-words ${!w&&f?"line-clamp-3":""}`,children:A.content},void 0,!1,void 0,this),f&&L0.jsxDEV("button",{onClick:()=>O(M),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:w?"Show less":"Show more..."},void 0,!1,void 0,this)]},b,!0,void 0,this)}return null})},void 0,!1,void 0,this)};return L0.jsxDEV("div",{className:"space-y-2",children:Y.map((K)=>{let _=q[K.role]||q.assistant;return L0.jsxDEV("div",{className:`${_.bg} border border-[#1a1a1a] rounded overflow-hidden p-3`,children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-2",children:[L0.jsxDEV("span",{children:_.icon},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`text-xs font-medium ${_.text}`,children:_.label},void 0,!1,void 0,this),K.model&&L0.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",K.model]},void 0,!0,void 0,this),L0.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",new Date(K.created_at).toLocaleTimeString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R(K)]},K.id,!0,void 0,this)})},void 0,!1,void 0,this)}var i0=B0(f1(),1);var r4=B0(f1(),1);var F0=B0(U1(),1);function J2(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="API_KEY")}function OO(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="OAUTH2")}function tI(Y){return J2(Y)&&OO(Y)}function Y2({providerId:Y="composio",projectId:G,onConnectionComplete:U}){let{authFetch:O}=T1(),[q,R]=r4.useState([]),[K,_]=r4.useState([]),[A,b]=r4.useState(!0),[P,M]=r4.useState(""),[w,f]=r4.useState(null),[v,m]=r4.useState(null),[g,C]=r4.useState(null),[V,k]=r4.useState(null),[x,j]=r4.useState(null),[u,p]=r4.useState(""),[s,a]=r4.useState(null),[D,z0]=r4.useState(""),[Q0,U0]=r4.useState(!1),[b0,e]=r4.useState(null),[y0,I0]=r4.useState(null),i=r4.useCallback(async()=>{b(!0),C(null);let A0=G&&G!=="unassigned"?`?project_id=${G}`:"";try{let[Y1,h1]=await Promise.all([O(`/api/integrations/${Y}/apps${A0}`),O(`/api/integrations/${Y}/connected${A0}`)]),l1=await Y1.json(),r1=await h1.json();R(l1.apps||[]),_(r1.accounts||[])}catch(Y1){console.error("Failed to fetch integrations:",Y1),C("Failed to load integrations")}b(!1)},[O,Y,G]);r4.useEffect(()=>{i()},[i]),r4.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),i(),U?.()},[i,U]),r4.useEffect(()=>{if(!v?.connectionId)return;let A0=G&&G!=="unassigned"?`?project_id=${G}`:"",Y1=setInterval(async()=>{try{let l1=await(await O(`/api/integrations/${Y}/connection/${v.connectionId}${A0}`)).json();if(l1.connection?.status==="active")m(null),f(null),i(),U?.();else if(l1.connection?.status==="failed")m(null),f(null),C(`Connection to ${v.appSlug} failed`)}catch(h1){}},2000);return()=>clearInterval(Y1)},[v,O,Y,G,i,U]);let R0=async(A0,Y1,h1)=>{if(tI(A0)&&!Y1&&!h1){k({app:A0});return}if(J2(A0)&&!Y1&&!h1){j({app:A0}),p("");return}f(A0.slug),C(null);try{let l1={appSlug:A0.slug};if(Y1)l1.credentials={authScheme:"API_KEY",apiKey:Y1};let r1=G&&G!=="unassigned"?`?project_id=${G}`:"",O1=await O(`/api/integrations/${Y}/connect${r1}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l1)}),w0=await O1.json();if(!O1.ok){C(w0.error||"Failed to initiate connection"),f(null),j(null);return}if(w0.status==="active"||!w0.redirectUrl){f(null),j(null),i(),U?.();return}if(w0.redirectUrl){m({appSlug:A0.slug,connectionId:w0.connectionId});let Q1=window.open(w0.redirectUrl,`connect-${A0.slug}`,"width=600,height=700,left=200,top=100");if(!Q1||Q1.closed)window.location.href=w0.redirectUrl}}catch(l1){C(`Failed to connect: ${l1}`),f(null),j(null)}},O0=(A0)=>{if(A0.preventDefault(),!x||!u.trim())return;R0(x.app,u.trim())},q0=async(A0)=>{let Y1=G&&G!=="unassigned"?`?project_id=${G}`:"";try{let h1=await O(`/api/integrations/${Y}/connection/${A0.id}${Y1}`,{method:"DELETE"});if(h1.ok)i();else{let l1=await h1.json();C(l1.error||"Failed to disconnect")}}catch(h1){C(`Failed to disconnect: ${h1}`)}},o=(A0)=>{a({app:A0}),z0(`${A0.name} MCP`),e(null)},T0=async()=>{if(!s||!D.trim())return;U0(!0),C(null);try{let A0=G&&G!=="unassigned"?`?project_id=${G}`:"",Y1=await O(`/api/integrations/${Y}/configs${A0}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:s.app.slug})}),h1=await Y1.json();if(!Y1.ok){C(h1.error||"Failed to create MCP config"),U0(!1);return}e(D),U?.()}catch(A0){C(`Failed to create MCP config: ${A0}`)}finally{U0(!1)}},v0=(A0)=>{I0({message:`Disconnect ${A0.appName}?`,onConfirm:()=>{q0(A0),I0(null)}})},X1=(A0)=>{return K.some((Y1)=>Y1.appId===A0&&Y1.status==="active")},r0=(A0)=>{return K.find((Y1)=>Y1.appId===A0)},f0=q.filter((A0)=>{if(!P)return!0;let Y1=P.toLowerCase();return A0.name.toLowerCase().includes(Y1)||A0.slug.toLowerCase().includes(Y1)||A0.description?.toLowerCase().includes(Y1)||A0.categories.some((h1)=>h1.toLowerCase().includes(Y1))}),o0=f0.filter((A0)=>X1(A0.slug)),J1=f0.filter((A0)=>!X1(A0.slug));if(A)return F0.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading apps..."},void 0,!1,void 0,this);return F0.jsxDEV("div",{className:"space-y-6",children:[V&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[V.app.logo&&F0.jsxDEV("img",{src:V.app.logo,alt:V.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:["Connect ",V.app.name]},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Choose how to authenticate"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"space-y-3",children:[F0.jsxDEV("button",{onClick:()=>{k(null),j({app:V.app}),p("")},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[F0.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Enter your ",V.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>{k(null),R0(V.app,void 0,!0)},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[F0.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Sign in with your ",V.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>k(null),className:"w-full text-sm text-[#666] hover:text-white mt-4 py-2 transition",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),x&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[x.app.logo&&F0.jsxDEV("img",{src:x.app.logo,alt:x.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:["Connect ",x.app.name]},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your API key to connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("form",{onSubmit:O0,children:[F0.jsxDEV("input",{type:"password",value:u,onChange:(A0)=>p(A0.target.value),placeholder:"Enter API Key...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{type:"button",onClick:()=>j(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{type:"submit",disabled:!u.trim()||w===x.app.slug,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:w===x.app.slug?"Connecting...":"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),s&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:b0?F0.jsxDEV(F0.Fragment,{children:[F0.jsxDEV("div",{className:"text-center mb-4",children:[F0.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:F0.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-sm text-[#888] mt-2",children:['"',b0,'" has been created successfully.']},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"You can now add it to your agents from the MCP Configs tab."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>{a(null),e(null)},className:"w-full text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV(F0.Fragment,{children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[s.app.logo&&F0.jsxDEV("img",{src:s.app.logo,alt:s.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:["Create an MCP config for ",s.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("form",{onSubmit:(A0)=>{A0.preventDefault(),T0()},children:[F0.jsxDEV("label",{className:"block text-xs text-[#888] mb-1",children:"Config Name"},void 0,!1,void 0,this),F0.jsxDEV("input",{type:"text",value:D,onChange:(A0)=>z0(A0.target.value),placeholder:"Enter config name...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0,maxLength:30},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{type:"button",onClick:()=>a(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{type:"submit",disabled:!D.trim()||Q0,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:Q0?"Creating...":"Create Config"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),y0&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm mx-4",children:[F0.jsxDEV("p",{className:"text-center mb-4",children:y0.message},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{onClick:()=>I0(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{onClick:y0.onConfirm,className:"flex-1 text-sm bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded transition",children:"Confirm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),g&&F0.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center justify-between",children:[F0.jsxDEV("span",{children:g},void 0,!1,void 0,this),F0.jsxDEV("button",{onClick:()=>C(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v&&F0.jsxDEV("div",{className:"text-yellow-400 text-sm p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg flex items-center gap-2",children:[F0.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),F0.jsxDEV("span",{children:["Waiting for ",v.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{children:F0.jsxDEV("input",{type:"text",value:P,onChange:(A0)=>M(A0.target.value),placeholder:"Search apps...",className:"w-full bg-[#111] border border-[#333] rounded-lg px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),o0.length>0&&F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Connected (",o0.length,")"]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:o0.map((A0)=>F0.jsxDEV(KO,{app:A0,connection:r0(A0.slug),onConnect:()=>R0(A0),onDisconnect:()=>{let Y1=r0(A0.slug);if(Y1)v0(Y1)},onCreateMcpConfig:()=>o(A0),connecting:w===A0.slug},A0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Available Apps (",J1.length,")"]},void 0,!0,void 0,this),J1.length===0?F0.jsxDEV("p",{className:"text-[#666] text-sm",children:P?"No apps match your search":"No apps available"},void 0,!1,void 0,this):F0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J1.slice(0,50).map((A0)=>F0.jsxDEV(KO,{app:A0,onConnect:()=>R0(A0),connecting:w===A0.slug},A0.id,!1,void 0,this))},void 0,!1,void 0,this),J1.length>50&&F0.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 50 of ",J1.length," apps. Use search to find more."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function KO({app:Y,connection:G,onConnect:U,onDisconnect:O,onCreateMcpConfig:q,connecting:R}){let K=G?.status==="active",_=J2(Y),A=OO(Y),b=_&&A;return F0.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition ${K?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[F0.jsxDEV("div",{className:"flex items-start gap-3",children:[F0.jsxDEV("div",{className:"w-10 h-10 rounded bg-[#1a1a1a] flex items-center justify-center flex-shrink-0 overflow-hidden",children:Y.logo?F0.jsxDEV("img",{src:Y.logo,alt:Y.name,className:"w-8 h-8 object-contain",onError:(P)=>{P.target.style.display="none"}},void 0,!1,void 0,this):F0.jsxDEV("span",{className:"text-lg",children:Y.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex-1 min-w-0",children:[F0.jsxDEV("div",{className:"flex items-center gap-2",children:[F0.jsxDEV("h4",{className:"font-medium text-sm truncate",children:Y.name},void 0,!1,void 0,this),K&&F0.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!K&&_&&!A&&F0.jsxDEV("span",{className:"text-[10px] bg-[#222] text-[#888] px-1.5 py-0.5 rounded",title:"Requires API Key",children:"API Key"},void 0,!1,void 0,this),!K&&b&&F0.jsxDEV("span",{className:"text-[10px] bg-[#1a2a1a] text-[#6a6] px-1.5 py-0.5 rounded",title:"Supports API Key or OAuth",children:"API Key / OAuth"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.description&&F0.jsxDEV("p",{className:"text-xs text-[#666] line-clamp-2 mt-0.5",children:Y.description},void 0,!1,void 0,this),Y.categories.length>0&&F0.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:Y.categories.slice(0,2).map((P)=>F0.jsxDEV("span",{className:"text-[10px] bg-[#1a1a1a] text-[#555] px-1.5 py-0.5 rounded",children:P},P,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"mt-3 flex gap-2",children:K?F0.jsxDEV(F0.Fragment,{children:[q&&F0.jsxDEV("button",{onClick:q,className:"flex-1 text-xs bg-[#1a2a1a] hover:bg-[#1a3a1a] border border-green-500/30 hover:border-green-500/50 text-green-400 px-3 py-1.5 rounded transition",children:"Create MCP Config"},void 0,!1,void 0,this),O&&F0.jsxDEV("button",{onClick:O,className:"text-xs text-[#666] hover:text-red-400 transition px-2",title:"Disconnect",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV("button",{onClick:U,disabled:R,className:"w-full text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:R?"Connecting...":_&&!A?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var N=B0(U1(),1);function A3(){let{authFetch:Y}=T1(),{projects:G,currentProjectId:U}=u4(),[O,q]=i0.useState([]),[R,K]=i0.useState(!0),[_,A]=i0.useState(!1),[b,P]=i0.useState(null),[M,w]=i0.useState(null),[f,v]=i0.useState("servers"),{confirm:m,ConfirmDialog:g}=A5(),C=G.length>0,V=async()=>{try{let D=await(await Y("/api/mcp/servers")).json();q(D.servers||[])}catch(a){console.error("Failed to fetch MCP servers:",a)}K(!1)};i0.useEffect(()=>{V()},[Y]);let k=O.filter((a)=>{if(!U)return!0;if(U==="unassigned")return a.project_id===null;return a.project_id===null||a.project_id===U}),x=async(a)=>{try{await Y(`/api/mcp/servers/${a}/start`,{method:"POST"}),V()}catch(D){console.error("Failed to start server:",D)}},j=async(a)=>{try{await Y(`/api/mcp/servers/${a}/stop`,{method:"POST"}),V()}catch(D){console.error("Failed to stop server:",D)}},u=async(a)=>{if(!await m("Delete this MCP server?",{confirmText:"Delete",title:"Delete Server"}))return;try{if(await Y(`/api/mcp/servers/${a}`,{method:"DELETE"}),M?.id===a)w(null);V()}catch(z0){console.error("Failed to delete server:",z0)}},p=async(a,D)=>{try{await Y(`/api/mcp/servers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D})}),V()}catch(z0){console.error("Failed to rename server:",z0)}},s=async(a,D)=>{try{await Y(`/api/mcp/servers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),V()}catch(z0){throw console.error("Failed to update server:",z0),z0}};return N.jsxDEV(N.Fragment,{children:[g,N.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[N.jsxDEV("div",{className:"max-w-6xl",children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[N.jsxDEV("div",{children:[N.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-[#666]",children:"Manage Model Context Protocol servers for tool integrations."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),f==="servers"&&N.jsxDEV("button",{onClick:()=>A(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[N.jsxDEV("button",{onClick:()=>v("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="registry"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),f==="servers"&&N.jsxDEV(N.Fragment,{children:[R&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!R&&k.length===0&&O.length===0&&N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[N.jsxDEV(m5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),N.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"MCP servers extend your agents with tools like file access, web browsing, database connections, and more."},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex gap-3 justify-center",children:[N.jsxDEV("button",{onClick:()=>A(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Add Manually"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("registry"),className:"border border-[#333] hover:border-[#666] px-4 py-2 rounded font-medium transition",children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!R&&k.length===0&&O.length>0&&N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:N.jsxDEV("p",{className:"text-[#666]",children:"No servers match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this),!R&&k.length>0&&N.jsxDEV("div",{className:"flex gap-6",children:[N.jsxDEV("div",{className:`space-y-3 ${M?"w-1/2":"w-full"}`,children:k.map((a)=>{let z0=a.type==="http"&&a.url||a.status==="running",Q0=C&&a.project_id?G.find((U0)=>U0.id===a.project_id):null;return N.jsxDEV(sI,{server:a,project:Q0,selected:M?.id===a.id,onSelect:()=>w(z0?a:null),onStart:()=>x(a.id),onStop:()=>j(a.id),onDelete:()=>u(a.id),onEdit:()=>P(a)},a.id,!1,void 0,this)})},void 0,!1,void 0,this),M&&N.jsxDEV("div",{className:"w-1/2",children:N.jsxDEV(eI,{server:M,onClose:()=>w(null)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),f==="hosted"&&N.jsxDEV(XT,{onServerAdded:V,projectId:U},void 0,!1,void 0,this),f==="registry"&&N.jsxDEV(QT,{onInstall:(a)=>{V(),v("servers")}},void 0,!1,void 0,this),f==="servers"&&N.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[N.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Add an MCP server by providing its npm package name. For example:"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"}].map((a)=>N.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:a.pkg},a.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&N.jsxDEV(YT,{onClose:()=>A(!1),onAdded:()=>{A(!1),V()},projects:C?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),b&&N.jsxDEV($T,{server:b,projects:C?G:void 0,onClose:()=>P(null),onSaved:()=>{P(null),V()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function sI({server:Y,project:G,selected:U,onSelect:O,onStart:q,onStop:R,onDelete:K,onEdit:_}){let A=Y.type==="http"&&Y.url,b=A||Y.status==="running",P=()=>{if(A)return`${Y.source||"remote"} • http`;return`${Y.type} • ${Y.package||Y.command||"custom"}${Y.status==="running"&&Y.port?` • :${Y.port}`:""}`},M=()=>{if(G)return N.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return N.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:b?O:void 0,children:N.jsxDEV("div",{className:"flex items-center justify-between",children:[N.jsxDEV("div",{className:"flex items-center gap-3",children:[N.jsxDEV("div",{className:`w-2 h-2 rounded-full ${b?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),M()]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666]",children:P()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),_()},className:"text-sm text-[#666] hover:text-[#888] px-3 py-1 transition",title:"Edit server settings",children:"Edit"},void 0,!1,void 0,this),A?N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Remove"},void 0,!1,void 0,this):Y.status==="running"?N.jsxDEV(N.Fragment,{children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),O()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),R()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV(N.Fragment,{children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),q()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function eI({server:Y,onClose:G}){let{authFetch:U}=T1(),[O,q]=i0.useState([]),[R,K]=i0.useState(null),[_,A]=i0.useState(!0),[b,P]=i0.useState(null),[M,w]=i0.useState(null);return i0.useEffect(()=>{(async()=>{A(!0),P(null);try{let v=await U(`/api/mcp/servers/${Y.id}/tools`),m=await v.json();if(!v.ok){P(m.error||"Failed to fetch tools");return}q(m.tools||[]),K(m.serverInfo||null)}catch(v){P(`Failed to fetch tools: ${v}`)}finally{A(!1)}})()},[Y.id,U]),N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[N.jsxDEV("div",{children:[N.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),R&&N.jsxDEV("p",{className:"text-xs text-[#666]",children:[R.name," v",R.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("button",{onClick:G,className:"text-[#666] hover:text-[#888] text-xl leading-none",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[_&&N.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),b&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:b},void 0,!1,void 0,this),!_&&!b&&O.length===0&&N.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!_&&!b&&O.length>0&&!M&&N.jsxDEV("div",{className:"space-y-2",children:O.map((f)=>N.jsxDEV("button",{onClick:()=>w(f),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[N.jsxDEV("div",{className:"font-medium text-sm",children:f.name},void 0,!1,void 0,this),f.description&&N.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:f.description},void 0,!1,void 0,this)]},f.name,!0,void 0,this))},void 0,!1,void 0,this),M&&N.jsxDEV(zT,{serverId:Y.id,tool:M,onBack:()=>w(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function zT({serverId:Y,tool:G,onBack:U}){let{authFetch:O}=T1(),[q,R]=i0.useState("{}"),[K,_]=i0.useState(null),[A,b]=i0.useState(null),[P,M]=i0.useState(!1);i0.useEffect(()=>{let f=G.inputSchema;if(f&&typeof f==="object"&&"properties"in f){let v=f.properties,m={};for(let[g,C]of Object.entries(v))if(C.default!==void 0)m[g]=C.default;else if(C.type==="string")m[g]="";else if(C.type==="number"||C.type==="integer")m[g]=0;else if(C.type==="boolean")m[g]=!1;else if(C.type==="array")m[g]=[];else if(C.type==="object")m[g]={};R(JSON.stringify(m,null,2))}},[G]);let w=async()=>{M(!0),b(null),_(null);try{let f=JSON.parse(q),v=await O(`/api/mcp/servers/${Y}/tools/${encodeURIComponent(G.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:f})}),m=await v.json();if(!v.ok){b(m.error||"Failed to call tool");return}_(m.result)}catch(f){b(`Error: ${f}`)}finally{M(!1)}};return N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),N.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&N.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&N.jsxDEV("div",{className:"text-xs",children:N.jsxDEV("details",{className:"cursor-pointer",children:[N.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),N.jsxDEV("pre",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-[#888] overflow-auto max-h-32",children:JSON.stringify(G.inputSchema,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),N.jsxDEV("textarea",{value:q,onChange:(f)=>R(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 h-32 font-mono text-sm focus:outline-none focus:border-[#f97316] resize-none",placeholder:"{}"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("button",{onClick:w,disabled:P,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:P?"Calling...":"Call Tool"},void 0,!1,void 0,this),A&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:A},void 0,!1,void 0,this),K&&N.jsxDEV("div",{className:"space-y-2",children:[N.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",K.isError&&N.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:`p-3 rounded text-sm ${K.isError?"bg-red-500/10":"bg-green-500/10"}`,children:K.content.map((f,v)=>N.jsxDEV("div",{className:"mb-2 last:mb-0",children:[f.type==="text"&&N.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:f.text},void 0,!1,void 0,this),f.type==="image"&&f.data&&N.jsxDEV("img",{src:`data:${f.mimeType||"image/png"};base64,${f.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},v,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function QT({onInstall:Y}){let{authFetch:G}=T1(),[U,O]=i0.useState(""),[q,R]=i0.useState([]),[K,_]=i0.useState(!1),[A,b]=i0.useState(!1),[P,M]=i0.useState(null),[w,f]=i0.useState(null),v=async(C)=>{_(!0),f(null);try{let V=await G(`/api/mcp/registry?search=${encodeURIComponent(C)}&limit=20`),k=await V.json();if(!V.ok)f(k.error||"Failed to search registry"),R([]);else R(k.servers||[])}catch(V){f(`Failed to search: ${V}`),R([])}finally{_(!1),b(!0)}},m=(C)=>{if(C.preventDefault(),U.trim())v(U.trim())};i0.useEffect(()=>{v("")},[]);let g=async(C)=>{if(!C.npmPackage){f("This server does not have an npm package");return}M(C.id),f(null);try{let V=await G("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.name,type:"npm",package:C.npmPackage})});if(!V.ok){let k=await V.json();f(k.error||"Failed to add server");return}Y(C)}catch(V){f(`Failed to add server: ${V}`)}finally{M(null)}};return N.jsxDEV("div",{className:"space-y-6",children:[N.jsxDEV("form",{onSubmit:m,className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:U,onChange:(C)=>O(C.target.value),placeholder:"Search MCP servers (e.g., filesystem, github, slack...)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{type:"submit",disabled:K,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:K?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:w},void 0,!1,void 0,this),!K&&A&&q.length===0&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),q.length>0&&N.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:q.map((C)=>N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:N.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("h3",{className:"font-medium truncate",children:C.name},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:C.description||"No description"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[C.version&&N.jsxDEV("span",{children:["v",C.version]},void 0,!0,void 0,this),N.jsxDEV("span",{className:`px-1.5 py-0.5 rounded ${C.npmPackage?"bg-green-500/10 text-green-400":"bg-blue-500/10 text-blue-400"}`,children:C.npmPackage?"npm":"remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("code",{className:"text-xs text-[#555] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:C.npmPackage||C.fullName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex-shrink-0",children:C.npmPackage?N.jsxDEV("button",{onClick:()=>g(C),disabled:P===C.id,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:P===C.id?"Adding...":"Add"},void 0,!1,void 0,this):C.repository?N.jsxDEV("a",{href:C.repository,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#666] hover:text-[#f97316] transition",children:"View →"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},C.id,!1,void 0,this))},void 0,!1,void 0,this),K&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),N.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:N.jsxDEV("p",{children:["Servers are sourced from the"," ",N.jsxDEV("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"official MCP registry"},void 0,!1,void 0,this),". Not all servers have npm packages - some require manual setup."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function XT({onServerAdded:Y,projectId:G}){let{authFetch:U}=T1(),[O,q]=i0.useState("composio"),[R,K]=i0.useState("configs"),[_,A]=i0.useState(!1),[b,P]=i0.useState(!1),[M,w]=i0.useState(!1),[f,v]=i0.useState([]),[m,g]=i0.useState(new Set),[C,V]=i0.useState(!0),[k,x]=i0.useState(!1),[j,u]=i0.useState(null),{alert:p,AlertDialog:s}=fZ(),a=async()=>{try{let[e,y0]=await Promise.all([U("/api/providers"),U("/api/mcp/servers")]),I0=await e.json(),i=await y0.json(),R0=I0.providers||[],O0=i.servers||[],q0=new Set(O0.filter((o0)=>o0.source==="composio"&&o0.url).map((o0)=>{let J1=o0.url.match(/\/v3\/mcp\/([^/]+)/);return J1?J1[1]:null}).filter(Boolean));g(q0);let o=R0.find((o0)=>o0.id==="composio"),T0=R0.find((o0)=>o0.id==="smithery"),v0=R0.find((o0)=>o0.id==="agentdojo"),X1=o?.hasKey||!1,r0=T0?.hasKey||!1,f0=v0?.hasKey||!1;if(A(X1),P(r0),w(f0),X1)q("composio"),D();else if(r0)q("smithery");else if(f0)q("agentdojo")}catch(e){console.error("Failed to fetch providers:",e)}V(!1)},D=async()=>{x(!0);try{let e=G&&G!=="unassigned"?`?project_id=${G}`:"",I0=await(await U(`/api/integrations/composio/configs${e}`)).json();v(I0.configs||[])}catch(e){console.error("Failed to fetch Composio configs:",e)}x(!1)},z0=async(e)=>{u(e);try{let y0=G&&G!=="unassigned"?`?project_id=${G}`:"",I0=await U(`/api/integrations/composio/configs/${e}/add${y0}`,{method:"POST"});if(I0.ok)g((i)=>new Set([...i,e])),Y?.();else{let i=await I0.json();await p(i.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(y0){console.error("Failed to add config:",y0)}u(null)},Q0=(e)=>{return m.has(e)};if(i0.useEffect(()=>{a()},[U]),C)return N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);let U0=_||b||M,b0=[_,b,M].filter(Boolean).length;if(!U0)return N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[N.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect Composio, Smithery, or AgentDojo in Settings to access cloud-based MCP servers."},void 0,!1,void 0,this),N.jsxDEV("a",{href:"/settings",className:"inline-block bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded text-sm font-medium transition",children:"Go to Settings →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return N.jsxDEV(N.Fragment,{children:[s,N.jsxDEV("div",{className:"space-y-6",children:[b0>1&&N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1 w-fit",children:[_&&N.jsxDEV("button",{onClick:()=>{q("composio"),K("configs")},className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="composio"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-purple-500"},void 0,!1,void 0,this),"Composio"]},void 0,!0,void 0,this),b&&N.jsxDEV("button",{onClick:()=>q("smithery"),className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="smithery"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-blue-500"},void 0,!1,void 0,this),"Smithery"]},void 0,!0,void 0,this),M&&N.jsxDEV("button",{onClick:()=>q("agentdojo"),className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="agentdojo"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-500"},void 0,!1,void 0,this),"AgentDojo"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&(b0===1||O==="composio")&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{className:"flex items-center justify-between",children:[N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1",children:[N.jsxDEV("button",{onClick:()=>K("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${R==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Configs"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("connect"),className:`px-4 py-2 rounded text-sm font-medium transition ${R==="connect"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Connect Apps"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b0===1&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666]",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-purple-500"},void 0,!1,void 0,this),"Composio",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R==="connect"&&N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect your accounts to enable tools in MCP configs"},void 0,!1,void 0,this),N.jsxDEV(Y2,{providerId:"composio",projectId:G,onConnectionComplete:()=>{D()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="configs"&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Your MCP configs from Composio"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-3",children:[N.jsxDEV("button",{onClick:D,disabled:k,className:"text-xs text-[#666] hover:text-[#888] transition",children:k?"Loading...":"Refresh"},void 0,!1,void 0,this),N.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Create Config →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k?N.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):f.length===0?N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:["First ",N.jsxDEV("button",{onClick:()=>K("connect"),className:"text-[#f97316] hover:text-[#fb923c]",children:"connect some apps"},void 0,!1,void 0,this),", then create a config."]},void 0,!0,void 0,this),N.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#f97316] hover:text-[#fb923c] mt-2 inline-block",children:"Create in Composio →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV("div",{className:"space-y-2",children:f.map((e)=>{let y0=Q0(e.id),I0=j===e.id;return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${y0?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("span",{className:"font-medium text-sm",children:e.name},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-xs text-[#555]",children:[e.toolsCount," tools"]},void 0,!0,void 0,this),y0&&N.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.toolkits.length>0&&N.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.toolkits.slice(0,4).map((i)=>N.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:i},i,!1,void 0,this)),e.toolkits.length>4&&N.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",e.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[y0?N.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):N.jsxDEV("button",{onClick:()=>z0(e.id),disabled:I0,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:I0?"Adding...":"Add"},void 0,!1,void 0,this),N.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${e.id}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#888] transition",children:"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},e.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&(b0===1||O==="smithery")&&N.jsxDEV("div",{children:[b0===1&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666] mb-4",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-blue-500"},void 0,!1,void 0,this),"Smithery",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Add MCP servers from the Smithery registry"},void 0,!1,void 0,this),N.jsxDEV("a",{href:"https://smithery.ai/servers",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Browse Smithery →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:["Smithery servers can be added from the ",N.jsxDEV("strong",{children:"Browse Registry"},void 0,!1,void 0,this)," tab."]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Your API key will be used automatically when adding Smithery servers."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M&&(b0===1||O==="agentdojo")&&N.jsxDEV(ZT,{projectId:G,onServerAdded:Y,showProviderBadge:b0===1},void 0,!1,void 0,this),N.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[N.jsxDEV("strong",{className:"text-[#888]",children:"Tip:"},void 0,!1,void 0,this)," Connect apps first, then add MCP configs to make tools available to your agents."," · ",N.jsxDEV("a",{href:"/settings",className:"text-[#f97316] hover:text-[#fb923c]",children:"Add more providers in Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ZT({projectId:Y,onServerAdded:G,showProviderBadge:U}){let{authFetch:O}=T1(),[q,R]=i0.useState("configs"),[K,_]=i0.useState([]),[A,b]=i0.useState(new Set),[P,M]=i0.useState(!1),[w,f]=i0.useState(null),{alert:v,AlertDialog:m}=fZ(),g=async()=>{M(!0);try{let k=Y&&Y!=="unassigned"?`?project_id=${Y}`:"",[x,j]=await Promise.all([O(`/api/integrations/agentdojo/configs${k}`),O("/api/mcp/servers")]),u=await x.json(),p=await j.json();_(u.configs||[]);let s=new Set((p.servers||[]).filter((a)=>a.source==="agentdojo").map((a)=>{let D=a.url?.match(/\/mcp\/([^/?]+)/);return D?D[1]:a.name}));b(s)}catch(k){console.error("Failed to fetch AgentDojo configs:",k)}M(!1)},C=async(k)=>{f(k);try{let x=Y&&Y!=="unassigned"?`?project_id=${Y}`:"",j=await O(`/api/integrations/agentdojo/configs/${k}/add${x}`,{method:"POST"});if(j.ok){let u=K.find((p)=>p.id===k);b((p)=>new Set([...p,u?.slug||k])),G?.()}else{let u=await j.json();await v(u.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(x){console.error("Failed to add config:",x)}f(null)},V=(k)=>{return A.has(k.slug)||A.has(k.id)||A.has(k.name)};return i0.useEffect(()=>{g()},[O,Y]),N.jsxDEV(N.Fragment,{children:[m,N.jsxDEV("div",{children:[U&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666] mb-4",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-500"},void 0,!1,void 0,this),"AgentDojo",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1",children:[N.jsxDEV("button",{onClick:()=>R("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${q==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Servers"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>R("toolkits"),className:`px-4 py-2 rounded text-sm font-medium transition ${q==="toolkits"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Toolkits"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q==="configs"&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Your MCP servers from AgentDojo"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:g,disabled:P,className:"text-xs text-[#666] hover:text-[#888] transition",children:P?"Loading...":"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P?N.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading servers..."},void 0,!1,void 0,this):K.length===0?N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers found"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:[N.jsxDEV("button",{onClick:()=>R("toolkits"),className:"text-[#f97316] hover:text-[#fb923c]",children:"Browse toolkits"},void 0,!1,void 0,this)," ","to create a new MCP server."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV("div",{className:"space-y-2",children:K.map((k)=>{let x=V(k),j=w===k.id;return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${x?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("span",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-xs text-[#555]",children:[k.toolsCount," tools"]},void 0,!0,void 0,this),x&&N.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.mcpUrl&&N.jsxDEV("code",{className:"text-xs text-[#555] mt-1 block truncate",children:k.mcpUrl},void 0,!1,void 0,this),!k.mcpUrl&&k.slug&&N.jsxDEV("code",{className:"text-xs text-[#555] mt-1 block truncate",children:k.slug},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:x?N.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):N.jsxDEV("button",{onClick:()=>C(k.id),disabled:j,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:j?"Adding...":"Add"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},k.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q==="toolkits"&&N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Browse available toolkits and create MCP servers"},void 0,!1,void 0,this),N.jsxDEV(Y2,{providerId:"agentdojo",projectId:Y,onConnectionComplete:()=>{g()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function JT(Y){let G=[],U=Y,O=null,q=Y.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(q){let _=q[2]||q[1];if(_)O=_.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let R=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,K;while((K=R.exec(Y))!==null){let _=K[1],A=K[2],b=_.toUpperCase().replace(/-/g,"_"),P=O?`${O.toUpperCase().replace(/-/g,"_")}_${b}`:b;G.push({key:P,flag:_}),U=U.replace(new RegExp(`(--${_}\\s+)${A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${_} $${P}`)}return{cleanCommand:U,credentials:G,serverName:O}}function YT({onClose:Y,onAdded:G,projects:U,defaultProjectId:O}){let{authFetch:q}=T1(),[R,K]=i0.useState("npm"),[_,A]=i0.useState(""),[b,P]=i0.useState(""),[M,w]=i0.useState(""),[f,v]=i0.useState(""),[m,g]=i0.useState(""),[C,V]=i0.useState(""),[k,x]=i0.useState(""),[j,u]=i0.useState([]),[p,s]=i0.useState(O||null),[a,D]=i0.useState(!1),[z0,Q0]=i0.useState(null),U0=U&&U.length>0,b0=()=>{u([...j,{key:"",value:""}])},e=(q0,o,T0)=>{let v0=[...j];v0[q0][o]=T0,u(v0)},y0=(q0)=>{u(j.filter((o,T0)=>T0!==q0))},I0=(q0)=>{if(v(q0),q0.includes("YOUR_")||q0.includes("<")||q0.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(q0)){let{cleanCommand:o,credentials:T0,serverName:v0}=JT(q0);if(!_&&v0)A(v0);if(T0.length>0){let X1=new Set(j.map((f0)=>f0.key)),r0=T0.filter((f0)=>!X1.has(f0.key)).map((f0)=>({key:f0.key,value:""}));if(r0.length>0)u([...j,...r0]),v(o)}}},i=(q0)=>{if(q0.startsWith("npx ")||q0.includes(" --")||q0.includes("YOUR_")||q0.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(q0))K("command"),I0(q0);else if(P(q0),!_&&q0){let T0=q0.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(T0&&T0!==q0)A(T0)}},R0=async()=>{if(!_){Q0("Name is required");return}if(R==="npm"&&!b){Q0("npm package is required");return}if(R==="pip"&&!b){Q0("pip package is required");return}if(R==="command"&&!f){Q0("Command is required");return}if(R==="http"&&!m){Q0("URL is required");return}D(!0),Q0(null);let q0={};for(let{key:o,value:T0}of j)if(o.trim())q0[o.trim()]=T0;try{let o={name:_};if(R==="npm")o.type="npm",o.package=b;else if(R==="pip"){if(o.type="pip",o.package=b,M)o.pip_module=M}else if(R==="http"){o.type="http",o.url=m;let v0={"Content-Type":"application/json"};if(C&&k){let X1=btoa(`${C}:${k}`);v0.Authorization=`Basic ${X1}`}o.headers=v0}else{let v0=f.trim().split(/\s+/);o.type="custom",o.command=v0[0],o.args=v0.slice(1).join(" ")}if(Object.keys(q0).length>0)o.env=q0;if(p)o.project_id=p;let T0=await q("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!T0.ok){let v0=await T0.json();Q0(v0.error||"Failed to add server"),D(!1);return}G()}catch(o){Q0("Failed to add server"),D(!1)}},O0=(q0,o)=>{K("npm"),A(q0),P(o)};return N.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[N.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem",type:"npm"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch",type:"npm"},{name:"memory",pkg:"@modelcontextprotocol/server-memory",type:"npm"},{name:"github",pkg:"@modelcontextprotocol/server-github",type:"npm"},{name:"time",pkg:"mcp-server-time",module:"mcp_server_time",type:"pip"}].map((q0)=>N.jsxDEV("button",{onClick:()=>{if(K(q0.type),A(q0.name),P(q0.pkg),q0.type==="pip"&&"module"in q0)w(q0.module||"");else w("")},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:q0.name},q0.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[N.jsxDEV("button",{onClick:()=>K("npm"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("pip"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="pip"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"pip"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("command"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Command"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("http"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="http"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"HTTP"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(q0)=>A(q0.target.value),placeholder:"e.g., pushover",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U0&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),N.jsxDEV(J7,{value:p||"",onChange:(q0)=>s(q0||null),options:[{value:"",label:"Global (all projects)"},...U.map((q0)=>({value:q0.id,label:q0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global servers are available to all agents. Project-scoped servers are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="npm"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(q0)=>i(q0.target.value),placeholder:"e.g., @modelcontextprotocol/server-filesystem or paste full command",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Package name or paste a full npx command with credentials"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="pip"&&N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(q0)=>{if(P(q0.target.value),!M&&q0.target.value){let o=q0.target.value.split("[")[0].replace(/-/g,".");w(o)}},placeholder:"e.g., late-sdk[mcp]",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python package with extras, e.g., late-sdk[mcp] or mcp-server-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Module (optional)"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:M,onChange:(q0)=>w(q0.target.value),placeholder:"e.g., late.mcp",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python module to run with -m. Auto-detected from package name if not specified."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R==="command"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:f,onChange:(q0)=>I0(q0.target.value),placeholder:"e.g., npx -y pushover-mcp@latest start --token YOUR_TOKEN",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Paste the full command - credentials like YOUR_TOKEN will be auto-extracted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="http"&&N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"URL"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:m,onChange:(q0)=>g(q0.target.value),placeholder:"e.g., https://example.com/wp-json/mcp/v1/messages",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded",children:[N.jsxDEV("p",{className:"text-xs text-[#666] mb-3",children:"Optional: Basic Auth credentials (will be encoded and stored securely)"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Username"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:C,onChange:(q0)=>V(q0.target.value),placeholder:"username",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Password"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:k,onChange:(q0)=>x(q0.target.value),placeholder:"password or app key",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[N.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:b0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.length===0&&N.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"Add environment variables for API tokens and credentials. These are stored encrypted and passed to the server at startup."},void 0,!1,void 0,this),j.length>0&&N.jsxDEV("div",{className:"space-y-2",children:j.map((q0,o)=>N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:q0.key,onChange:(T0)=>e(o,"key",T0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:q0.value,onChange:(T0)=>e(o,"value",T0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>y0(o),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},o,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&N.jsxDEV("p",{className:"text-red-400 text-sm",children:z0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[N.jsxDEV("button",{onClick:Y,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:R0,disabled:a||!_||(R==="npm"?!b:R==="pip"?!b:R==="http"?!m:!f),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:a?"Adding...":"Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function $T({server:Y,projects:G,onClose:U,onSaved:O}){let{authFetch:q}=T1(),[R,K]=i0.useState(Y.name),[_,A]=i0.useState(Y.package||""),[b,P]=i0.useState(Y.command||""),[M,w]=i0.useState(Y.args||""),[f,v]=i0.useState(Y.url||""),[m,g]=i0.useState(()=>{let I0=Y.headers?.Authorization||"";if(I0.startsWith("Basic "))try{return atob(I0.slice(6)).split(":")[0]||""}catch{return""}return""}),[C,V]=i0.useState(()=>{let I0=Y.headers?.Authorization||"";if(I0.startsWith("Basic "))try{return atob(I0.slice(6)).split(":").slice(1).join(":")||""}catch{return""}return""}),[k,x]=i0.useState(()=>{return Object.entries(Y.env||{}).map(([I0,i])=>({key:I0,value:i}))}),[j,u]=i0.useState(Y.project_id),[p,s]=i0.useState(!1),[a,D]=i0.useState(null),z0=G&&G.length>0,Q0=Y.type==="http",U0=()=>{x([...k,{key:"",value:""}])},b0=(I0,i,R0)=>{let O0=[...k];O0[I0][i]=R0,x(O0)},e=(I0)=>{x(k.filter((i,R0)=>R0!==I0))},y0=async()=>{if(!R.trim()){D("Name is required");return}s(!0),D(null);let I0={};for(let{key:i,value:R0}of k)if(i.trim())I0[i.trim()]=R0;try{let i={name:R.trim(),env:I0};if(Q0){if(f.trim())i.url=f.trim();let O0={"Content-Type":"application/json"};if(m&&C){let q0=btoa(`${m}:${C}`);O0.Authorization=`Basic ${q0}`}i.headers=O0}else{if(Y.type==="npm"&&_.trim())i.package=_.trim();if(Y.type==="pip"&&_.trim())i.package=_.trim();if(Y.type==="custom"){if(b.trim())i.command=b.trim();if(M.trim())i.args=M.trim()}}i.project_id=j;let R0=await q(`/api/mcp/servers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!R0.ok){let O0=await R0.json();D(O0.error||"Failed to save changes"),s(!1);return}if(Y.status==="running"&&!Q0)try{await q(`/api/mcp/servers/${Y.id}/stop`,{method:"POST"}),await q(`/api/mcp/servers/${Y.id}/start`,{method:"POST"})}catch(O0){console.error("Failed to restart server:",O0)}O()}catch(i){D("Failed to save changes"),s(!1)}};return N.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[N.jsxDEV("h2",{className:"text-lg font-semibold",children:"Edit MCP Server"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 space-y-4",children:[N.jsxDEV("div",{className:"text-sm text-[#666] bg-[#0a0a0a] border border-[#222] rounded p-3",children:["Type: ",N.jsxDEV("span",{className:"text-[#888]",children:Y.type},void 0,!1,void 0,this),Y.package&&N.jsxDEV(N.Fragment,{children:[" • Package: ",N.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.package},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.command&&N.jsxDEV(N.Fragment,{children:[" • Command: ",N.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.command},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:R,onChange:(I0)=>K(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),N.jsxDEV(J7,{value:j||"",onChange:(I0)=>u(I0||null),options:[{value:"",label:"Global (all projects)"},...G.map((I0)=>({value:I0.id,label:I0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="npm"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(I0)=>A(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="pip"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(I0)=>A(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Server URL"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:f,onChange:(I0)=>v(I0.target.value),placeholder:"https://example.com/mcp",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Authentication (Basic Auth)"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:m,onChange:(I0)=>g(I0.target.value),placeholder:"Username",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:C,onChange:(I0)=>V(I0.target.value),placeholder:"Password / App Password",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Leave empty if no authentication required"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.type==="custom"&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(I0)=>P(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:M,onChange:(I0)=>w(I0.target.value),placeholder:"e.g., --token $TOKEN --verbose",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!Q0&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[N.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:U0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.length===0&&N.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"No environment variables configured."},void 0,!1,void 0,this),k.length>0&&N.jsxDEV("div",{className:"space-y-2",children:k.map((I0,i)=>N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:I0.key,onChange:(R0)=>b0(i,"key",R0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:I0.value,onChange:(R0)=>b0(i,"value",R0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>e(i),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},i,!0,void 0,this))},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:Y.status==="running"?"Server will be automatically restarted to apply changes.":"Changes will take effect when the server is started."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a&&N.jsxDEV("p",{className:"text-red-400 text-sm",children:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[N.jsxDEV("button",{onClick:U,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:y0,disabled:p||!R.trim(),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:p?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Z4=B0(f1(),1);var n=B0(U1(),1);function $2(){let{authFetch:Y}=T1(),{projects:G,currentProjectId:U}=u4(),[O,q]=Z4.useState([]),[R,K]=Z4.useState(!0),[_,A]=Z4.useState("installed"),[b,P]=Z4.useState(!1),[M,w]=Z4.useState(!1),[f,v]=Z4.useState(null),{confirm:m,ConfirmDialog:g}=A5(),{alert:C,AlertDialog:V}=fZ(),k=G.length>0,[x,j]=Z4.useState(""),[u,p]=Z4.useState([]),[s,a]=Z4.useState(!1),[D,z0]=Z4.useState(null),[Q0,U0]=Z4.useState(""),[b0,e]=Z4.useState([]),[y0,I0]=Z4.useState(!1),[i,R0]=Z4.useState(null),[O0,q0]=Z4.useState(null),[o,T0]=Z4.useState(null),[v0,X1]=Z4.useState(U&&U!=="unassigned"?U:null),r0=O.filter((w0)=>{if(!U)return!0;if(U==="unassigned")return w0.project_id===null;return w0.project_id===null||w0.project_id===U}),f0=async()=>{try{let Q1=await(await Y("/api/skills")).json();q(Q1.skills||[])}catch(w0){console.error("Failed to fetch skills:",w0)}K(!1)},o0=async(w0)=>{a(!0);try{let Q1=w0!==void 0?w0:x,I1=Q1?`/api/skills/marketplace/search?q=${encodeURIComponent(Q1)}`:"/api/skills/marketplace/featured",C4=await(await Y(I1)).json();p(C4.skills||[])}catch(Q1){console.error("Failed to search marketplace:",Q1)}a(!1)};Z4.useEffect(()=>{f0()},[Y]),Z4.useEffect(()=>{if(_==="marketplace"&&u.length===0)o0("")},[_]);let J1=async(w0)=>{try{await Y(`/api/skills/${w0}/toggle`,{method:"POST"}),f0()}catch(Q1){console.error("Failed to toggle skill:",Q1)}},A0=async(w0)=>{if(!await m("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await Y(`/api/skills/${w0}`,{method:"DELETE"}),f?.id===w0)v(null);f0()}catch(I1){console.error("Failed to delete skill:",I1)}},Y1=async(w0)=>{z0(w0.id);try{let Q1=await Y(`/api/skills/marketplace/${w0.id}/install`,{method:"POST"}),I1=await Q1.json();if(Q1.ok)await C(`Installed "${w0.name}" successfully!`,{title:"Skill Installed"}),f0(),A("installed");else await C(I1.error||"Failed to install skill",{title:"Installation Failed"})}catch(Q1){console.error("Failed to install skill:",Q1),await C("Failed to install skill",{title:"Error"})}z0(null)},h1=(w0)=>O.some((Q1)=>Q1.name===w0),l1=async(w0)=>{let Q1=w0||Q0;if(!Q1.trim())return;let I1="",i1="";if(Q1.includes("github.com")){let C4=Q1.match(/github\.com\/([^/]+)\/([^/]+)/);if(C4)I1=C4[1],i1=C4[2].replace(/\.git$/,"")}else if(Q1.includes("/")){let C4=Q1.split("/");I1=C4[0],i1=C4[1]}if(!I1||!i1){R0("Invalid repo format. Use 'owner/repo' or GitHub URL");return}I0(!0),R0(null),e([]),q0(null);try{let C4=await Y(`/api/skills/github/${I1}/${i1}`),$4=await C4.json();if(!C4.ok){R0($4.error||"Failed to fetch repository"),I0(!1);return}e($4.skills||[]),q0($4.repo||null)}catch(C4){R0("Failed to fetch repository")}I0(!1)},r1=async(w0)=>{if(!O0)return;T0(w0.name);try{let Q1=await Y("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:O0.owner,repo:O0.repo,skillName:w0.name,downloadUrl:w0.downloadUrl,projectId:v0})}),I1=await Q1.json();if(Q1.ok)await C(`Installed "${w0.name}" successfully!`,{title:"Skill Installed"}),f0();else await C(I1.error||"Failed to install skill",{title:"Installation Failed",variant:"error"})}catch(Q1){await C("Failed to install skill",{title:"Error",variant:"error"})}T0(null)},O1=async()=>{if(!O0||b0.length===0)return;let w0=b0.filter((i1)=>!h1(i1.name));if(w0.length===0){await C("All skills are already installed",{title:"Info"});return}if(!await m(`Install ${w0.length} skill(s) from ${O0.owner}/${O0.repo}?`,{confirmText:"Install All",title:"Install Skills"}))return;let I1=0;for(let i1 of w0){T0(i1.name);try{if((await Y("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:O0.owner,repo:O0.repo,skillName:i1.name,downloadUrl:i1.downloadUrl,projectId:v0})})).ok)I1++}catch(C4){}}T0(null),f0(),await C(`Installed ${I1} of ${w0.length} skills`,{title:"Installation Complete"})};return n.jsxDEV(n.Fragment,{children:[g,V,n.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:n.jsxDEV("div",{className:"max-w-6xl",children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[n.jsxDEV("div",{children:[n.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-[#666]",children:"Manage agent skills - instructions that teach agents how to perform tasks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:()=>w(!0),className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:"Import"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>P(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[n.jsxDEV("button",{onClick:()=>A("installed"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="installed"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:["Installed (",O.length,")"]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:()=>A("github"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="github"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse GitHub"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>A("marketplace"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="marketplace"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&n.jsxDEV(n.Fragment,{children:R?n.jsxDEV("div",{className:"text-[#666]",children:"Loading skills..."},void 0,!1,void 0,this):O.length===0?n.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[n.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>A("marketplace"),className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Browse Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):r0.length===0?n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:n.jsxDEV("p",{className:"text-[#666]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:r0.map((w0)=>{let Q1=k&&w0.project_id?G.find((I1)=>I1.id===w0.project_id):null;return n.jsxDEV(HT,{skill:w0,project:Q1,onToggle:()=>J1(w0.id),onDelete:()=>A0(w0.id),onView:()=>v(w0)},w0.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),_==="github"&&n.jsxDEV("div",{className:"space-y-6",children:[n.jsxDEV("form",{onSubmit:(w0)=>{w0.preventDefault(),l1()},className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:Q0,onChange:(w0)=>U0(w0.target.value),placeholder:"Enter GitHub repo (e.g., WordPress/agent-skills)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("button",{type:"submit",disabled:y0,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:y0?"...":"Browse"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&b0.length>0&&n.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] border border-[#222] rounded-lg",children:[n.jsxDEV("span",{className:"text-sm text-[#666]",children:"Install to:"},void 0,!1,void 0,this),n.jsxDEV(J7,{value:v0||"",onChange:(w0)=>X1(w0||null),options:[{value:"",label:"Global (all projects)"},...G.map((w0)=>({value:w0.id,label:w0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i&&n.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:i},void 0,!1,void 0,this),O0&&b0.length>0&&n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("a",{href:O0.url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline font-medium",children:[O0.owner,"/",O0.repo]},void 0,!0,void 0,this),n.jsxDEV("span",{className:"text-sm text-[#666]",children:[b0.length," skill",b0.length!==1?"s":""," found"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.some((w0)=>!h1(w0.name))&&n.jsxDEV("button",{onClick:O1,disabled:!!o,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded transition disabled:opacity-50",children:"Install All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y0&&n.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Fetching skills from repository..."},void 0,!1,void 0,this),!y0&&!O0&&!i&&n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[n.jsxDEV("div",{className:"text-4xl mb-4",children:"\uD83D\uDCE6"},void 0,!1,void 0,this),n.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"Browse Skills from GitHub"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"Enter a GitHub repository to browse and install skills. Skills are markdown files with instructions that teach agents how to perform specific tasks."},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex flex-wrap gap-2 justify-center",children:[{label:"WordPress Skills",repo:"WordPress/agent-skills"}].map(({label:w0,repo:Q1})=>n.jsxDEV("button",{onClick:()=>{U0(Q1),l1(Q1)},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:w0},Q1,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!y0&&O0&&b0.length===0&&n.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No skills found in this repository. Skills should be in subdirectories with a SKILL.md file."},void 0,!1,void 0,this),b0.length>0&&n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:b0.map((w0)=>{let Q1=h1(w0.name),I1=o===w0.name;return n.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 transition ${Q1?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:n.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("h3",{className:"font-medium truncate",children:w0.name},void 0,!1,void 0,this),Q1&&n.jsxDEV("span",{className:"text-xs text-green-400",children:"✓ Installed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:w0.description||"No description"},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[n.jsxDEV("span",{children:[(w0.size/1024).toFixed(1),"KB"]},void 0,!0,void 0,this),n.jsxDEV("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400",children:"GitHub"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex-shrink-0",children:Q1?n.jsxDEV("span",{className:"text-xs text-[#555] px-3 py-1.5",children:"Added"},void 0,!1,void 0,this):n.jsxDEV("button",{onClick:()=>r1(w0),disabled:I1,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:I1?"Installing...":"Install"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},w0.name,!1,void 0,this)})},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:n.jsxDEV("p",{children:["Skills are sourced from GitHub repositories. Each skill should be in its own directory with a"," ",n.jsxDEV("code",{className:"text-[#888] bg-[#0a0a0a] px-1 rounded",children:"SKILL.md"},void 0,!1,void 0,this)," file containing instructions."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="marketplace"&&n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"mb-6",children:n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:x,onChange:(w0)=>j(w0.target.value),onKeyDown:(w0)=>w0.key==="Enter"&&o0(),placeholder:"Search skills...",className:"flex-1 bg-[#111] border border-[#1a1a1a] rounded px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>o0(),disabled:s,className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:s?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),s?n.jsxDEV("div",{className:"text-[#666]",children:"Loading..."},void 0,!1,void 0,this):u.length===0?n.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[n.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm mt-1",children:"Try a different search term"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:u.map((w0)=>n.jsxDEV(GT,{skill:w0,installed:h1(w0.name),installing:D===w0.id,onInstall:()=>Y1(w0)},w0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),b&&n.jsxDEV(qT,{authFetch:Y,onClose:()=>P(!1),onCreated:()=>{P(!1),f0()},projects:k?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),M&&n.jsxDEV(BT,{authFetch:Y,onClose:()=>w(!1),onImported:()=>{w(!1),f0()}},void 0,!1,void 0,this),f&&n.jsxDEV(UT,{skill:f,authFetch:Y,onClose:()=>v(null),onUpdated:()=>{v(null),f0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function HT({skill:Y,project:G,onToggle:U,onDelete:O,onView:q}){let R={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[Y.source],K=()=>{if(G)return n.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return n.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return n.jsxDEV("div",{className:`bg-[#111] rounded-lg p-5 border transition cursor-pointer ${Y.enabled?"border-[#1a1a1a]":"border-[#1a1a1a] opacity-60"} hover:border-[#333]`,onClick:q,children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),K()]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#666] flex items-center gap-2 mt-0.5",children:[n.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${Y.source==="skillsmp"?"bg-purple-500/20 text-purple-400":Y.source==="github"?"bg-blue-500/20 text-blue-400":"bg-[#222] text-[#888]"}`,children:R},void 0,!1,void 0,this),Y.metadata?.version&&n.jsxDEV("span",{children:["v",Y.metadata.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),U()},className:`w-10 h-5 rounded-full transition-colors relative ${Y.enabled?"bg-[#f97316]":"bg-[#333]"}`,children:n.jsxDEV("span",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${Y.enabled?"left-5":"left-0.5"}`},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[Y.allowed_tools.slice(0,2).map((_)=>n.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:_},_,!1,void 0,this)),Y.allowed_tools.length>2&&n.jsxDEV("span",{className:"text-xs text-[#666]",children:["+",Y.allowed_tools.length-2]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),O()},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function GT({skill:Y,installed:G,installing:U,onInstall:O}){return n.jsxDEV("div",{className:"bg-[#111] rounded-lg p-5 border border-[#1a1a1a] hover:border-[#333] transition",children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#666] mt-0.5",children:["by ",Y.author," · v",Y.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex items-center gap-1 text-yellow-500 text-sm",children:["★ ",Y.rating.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:Y.tags.slice(0,3).map((q)=>n.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:q},q,!1,void 0,this))},void 0,!1,void 0,this),G?n.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):n.jsxDEV("button",{onClick:O,disabled:U,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded text-sm font-medium transition",children:U?"Installing...":"Install"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"mt-3 text-xs text-[#555]",children:[Y.downloads.toLocaleString()," downloads"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qT({authFetch:Y,onClose:G,onCreated:U,projects:O,defaultProjectId:q}){let[R,K]=Z4.useState(""),[_,A]=Z4.useState(""),[b,P]=Z4.useState(""),[M,w]=Z4.useState(q||null),[f,v]=Z4.useState(!1),[m,g]=Z4.useState(null),C=O&&O.length>0,V=async()=>{if(!R||!_||!b){g("All fields are required");return}v(!0),g(null);try{let k={name:R,description:_,content:b,source:"local"};if(M)k.project_id=M;let x=await Y("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),j=await x.json();if(!x.ok){g(j.error||"Failed to create skill"),v(!1);return}U()}catch(k){g("Failed to create skill"),v(!1)}};return n.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(k)=>k.stopPropagation(),children:[n.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:n.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-6 space-y-4",children:[m&&n.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:m},void 0,!1,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Name"},void 0,!1,void 0,this),n.jsxDEV("input",{type:"text",value:R,onChange:(k)=>K(k.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-skill-name",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Lowercase letters, numbers, and hyphens only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Description"},void 0,!1,void 0,this),n.jsxDEV("input",{type:"text",value:_,onChange:(k)=>A(k.target.value),placeholder:"What this skill does and when to use it...",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Scope"},void 0,!1,void 0,this),n.jsxDEV(J7,{value:M||"",onChange:(k)=>w(k||null),options:[{value:"",label:"Global (all projects)"},...O.map((k)=>({value:k.id,label:k.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global skills are available to all agents. Project-scoped skills are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),n.jsxDEV("textarea",{value:b,onChange:(k)=>P(k.target.value),placeholder:`# Skill Instructions
|
|
216
|
+
`,children:[B4.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[B4.jsxDEV("div",{className:"flex items-center gap-2",children:[B4.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),B4.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B4.jsxDEV("button",{onClick:R,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:B4.jsxDEV(D5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B4.jsxDEV("nav",{className:"space-y-1",children:[B4.jsxDEV(h8,{icon:B4.jsxDEV(Y3,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>K("dashboard")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV($3,{},void 0,!1,void 0,this),label:"Agents",active:Y==="agents",onClick:()=>K("agents"),badge:G>0?String(G):void 0},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(m5,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>K("tasks"),badge:U&&U>0?String(U):void 0},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(E5,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>K("mcp")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(hZ,{},void 0,!1,void 0,this),label:"Skills",active:Y==="skills",onClick:()=>K("skills")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(pG,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>K("telemetry")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(vK,{},void 0,!1,void 0,this),label:"API",active:Y==="api",onClick:()=>K("api")},void 0,!1,void 0,this),B4.jsxDEV(h8,{icon:B4.jsxDEV(H3,{},void 0,!1,void 0,this),label:"Settings",active:Y==="settings",onClick:()=>K("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function h8({icon:Y,label:G,active:U,onClick:O,badge:q}){return B4.jsxDEV("button",{onClick:O,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${U?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[Y,G,q&&B4.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var EZ=B0(U1(),1);function K3({message:Y,onDismiss:G}){return EZ.jsxDEV("div",{className:"bg-red-500/10 border-b border-red-500/30 px-6 py-3 text-red-400 text-sm flex items-center justify-between",children:[EZ.jsxDEV("span",{children:Y},void 0,!1,void 0,this),EZ.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:EZ.jsxDEV(D5,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var uZ=B0(f1(),1);var Y7=B0(U1(),1);function O3(){let{login:Y}=T1(),[G,U]=uZ.useState(""),[O,q]=uZ.useState(""),[R,K]=uZ.useState(null),[_,A]=uZ.useState(!1);return Y7.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:Y7.jsxDEV("div",{className:"w-full max-w-md",children:[Y7.jsxDEV("div",{className:"text-center mb-8",children:[Y7.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[Y7.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),Y7.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[Y7.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),Y7.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),Y7.jsxDEV("form",{onSubmit:async(P)=>{P.preventDefault(),K(null),A(!0);let M=await Y(G,O);if(!M.success)K(M.error||"Login failed");A(!1)},className:"space-y-4",children:[Y7.jsxDEV("div",{children:[Y7.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),Y7.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(P)=>U(P.target.value),placeholder:"Enter your username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y7.jsxDEV("div",{children:[Y7.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),Y7.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(P)=>q(P.target.value),placeholder:"Enter your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R&&Y7.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:R},void 0,!1,void 0,this),Y7.jsxDEV("button",{type:"submit",disabled:_||!G||!O,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:_?"Signing in...":"Sign In"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var y8=B0(f1(),1),T4=B0(U1(),1);function _3({onComplete:Y}){let[G,U]=y8.useState(""),[O,q]=y8.useState(""),[R,K]=y8.useState(""),[_,A]=y8.useState(""),[b,P]=y8.useState(!1),[M,w]=y8.useState(null),[f,v]=y8.useState(!1);return T4.jsxDEV(T4.Fragment,{children:[T4.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),T4.jsxDEV("form",{onSubmit:async(g)=>{if(g.preventDefault(),w(null),O!==R){w("Passwords do not match");return}v(!0);try{let C=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:G,password:O,..._&&{email:_}})}),V=await C.json();if(!C.ok){w(V.error||"Failed to create account"),v(!1);return}let k=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!k.ok){w("Account created but login failed. Please try logging in."),v(!1);return}let x=await k.json();if(x.accessToken)sessionStorage.setItem("accessToken",x.accessToken);Y({username:G})}catch(C){w("Failed to create account"),v(!1)}},className:"space-y-4",children:[T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(g)=>U(g.target.value),placeholder:"Choose a username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"3-20 characters, letters, numbers, underscore"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(g)=>q(g.target.value),placeholder:"Enter a password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Min 8 characters, uppercase, lowercase, number"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),T4.jsxDEV("input",{id:"confirmPassword",type:"password",value:R,onChange:(g)=>K(g.target.value),placeholder:"Confirm your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!b?T4.jsxDEV("button",{type:"button",onClick:()=>P(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):T4.jsxDEV("div",{children:[T4.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",T4.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("input",{id:"email",type:"email",value:_,onChange:(g)=>A(g.target.value),placeholder:"For password recovery only",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Only used for password recovery, never shared"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&T4.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:M},void 0,!1,void 0,this),T4.jsxDEV("button",{type:"submit",disabled:f||!G||!O||!R,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:f?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T4.jsxDEV("p",{className:"text-xs text-[#666] mt-4 text-center",children:"This will be your admin account with full access to apteva."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var u5=B0(f1(),1);var n0=B0(U1(),1);function gZ({onComplete:Y,needsAccount:G=!1}){let[U,O]=u5.useState(G?0:1),[q,R]=u5.useState([]),[K,_]=u5.useState(null),[A,b]=u5.useState(""),[P,M]=u5.useState(!1),[w,f]=u5.useState(!1),[v,m]=u5.useState(null),[g,C]=u5.useState(null),[V,k]=u5.useState(!1),x=()=>{let z0=sessionStorage.getItem("accessToken");return z0?{Authorization:`Bearer ${z0}`}:{}};u5.useEffect(()=>{if(G&&!V&&U===0)return;fetch("/api/providers",{headers:x()}).then((z0)=>z0.json()).then((z0)=>{let Q0=(z0.providers||[]).filter((U0)=>U0.type==="llm");R(Q0)})},[V,U,G]);let j=q.filter((z0)=>z0.hasKey),u=async()=>{if(!K||!A)return;M(!0),m(null),C(null);try{f(!0);let Q0=await(await fetch(`/api/keys/${K}/test`,{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({key:A})})).json();if(f(!1),!Q0.valid){m(Q0.error||"API key is invalid"),M(!1);return}let U0=await fetch(`/api/keys/${K}`,{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({key:A})}),b0=await U0.json();if(!U0.ok)m(b0.error||"Failed to save key");else{C("API key saved successfully!"),b("");let y0=await(await fetch("/api/providers",{headers:x()})).json();R(y0.providers||[]),_(null)}}catch(z0){m("Failed to save key")}M(!1)},p=async()=>{try{let z0=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...x()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(z0.ok){let Q0=await z0.json();if(Q0.project?.id)localStorage.setItem("apteva_current_project",Q0.project.id)}}catch(z0){console.error("Failed to create default project:",z0)}await fetch("/api/onboarding/complete",{method:"POST",headers:x()}),Y()},s=()=>{k(!0),O(1)},a=G?3:2,D=G?U:U-1;return n0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:n0.jsxDEV("div",{className:"w-full max-w-2xl",children:[n0.jsxDEV("div",{className:"text-center mb-8",children:[n0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[n0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),n0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),n0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[U===0&&G&&n0.jsxDEV(_3,{onComplete:s},void 0,!1,void 0,this),U===1&&n0.jsxDEV(FI,{providers:q,configuredProviders:j,selectedProvider:K,apiKey:A,saving:P,testing:w,error:v,success:g,onSelectProvider:_,onApiKeyChange:b,onSaveKey:u,onContinue:()=>O(2)},void 0,!1,void 0,this),U===2&&n0.jsxDEV(bI,{configuredProviders:j,onAddMore:()=>O(1),onComplete:p},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function FI({providers:Y,configuredProviders:G,selectedProvider:U,apiKey:O,saving:q,testing:R,error:K,success:_,onSelectProvider:A,onApiKeyChange:b,onSaveKey:P,onContinue:M}){let w=Y.find((f)=>f.id===U);if(U&&w)return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",w.name," Key"]},void 0,!0,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:"Enter your API key below. It will be encrypted and stored locally."},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"mb-6",children:[n0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:n0.jsxDEV("div",{className:"flex items-center justify-between",children:[n0.jsxDEV("div",{children:[n0.jsxDEV("p",{className:"font-medium",children:w.name},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-sm text-[#666]",children:[w.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("a",{href:w.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"space-y-3",children:[n0.jsxDEV("input",{type:"password",value:O,onChange:(f)=>b(f.target.value),placeholder:"Enter your API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316] text-lg"},void 0,!1,void 0,this),K&&n0.jsxDEV("p",{className:"text-red-400 text-sm",children:K},void 0,!1,void 0,this),_&&n0.jsxDEV("p",{className:"text-green-400 text-sm",children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"flex gap-3",children:[n0.jsxDEV("button",{onClick:()=>{A(null),b("")},className:"flex-1 border border-[#333] hover:border-[#666] px-4 py-3 rounded font-medium transition",children:"Back"},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:P,disabled:!O||q,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:R?"Testing...":q?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:"To get started, you'll need to add at least one AI provider API key. Your keys are encrypted and stored locally."},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((f)=>n0.jsxDEV(PI,{provider:f,selected:!1,onSelect:()=>!f.hasKey&&A(f.id)},f.id,!1,void 0,this))},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:M,disabled:G.length===0,className:"w-full bg-[#222] hover:bg-[#333] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition",children:G.length===0?"Add at least one API key to continue":`Continue with ${G.length} provider${G.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function PI({provider:Y,selected:G,onSelect:U}){return n0.jsxDEV("div",{onClick:U,className:`p-4 rounded border transition cursor-pointer ${Y.hasKey?"border-green-500/30 bg-green-500/5":G?"border-[#f97316] bg-[#f97316]/5":"border-[#222] hover:border-[#333]"}`,children:n0.jsxDEV("div",{className:"flex items-center justify-between",children:[n0.jsxDEV("div",{children:[n0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?n0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[n0.jsxDEV(X5,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):n0.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(O)=>O.stopPropagation(),className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function bI({configuredProviders:Y,onAddMore:G,onComplete:U}){return n0.jsxDEV(n0.Fragment,{children:[n0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),n0.jsxDEV("p",{className:"text-[#666] mb-6",children:["You've configured ",Y.length," provider",Y.length>1?"s":"",". You can add more providers later in Settings."]},void 0,!0,void 0,this),n0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>n0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[n0.jsxDEV(X5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),n0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),n0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",O.keyHint,")"]},void 0,!0,void 0,this)]},O.id,!0,void 0,this))},void 0,!1,void 0,this),n0.jsxDEV("div",{className:"flex gap-3",children:[n0.jsxDEV("button",{onClick:G,className:"flex-1 border border-[#333] hover:border-[#f97316] px-4 py-3 rounded font-medium transition",children:"Add More"},void 0,!1,void 0,this),n0.jsxDEV("button",{onClick:U,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-3 rounded font-medium transition",children:"Start Using apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var V1=B0(f1(),1);var S=B0(U1(),1);function L3(){let{projectsEnabled:Y}=h4(),[G,U]=V1.useState("providers"),O=[{key:"providers",label:"Providers"},...Y?[{key:"projects",label:"Projects"}]:[],{key:"account",label:"Account"},{key:"updates",label:"Updates"},{key:"data",label:"Data"}];return S.jsxDEV("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden",children:[S.jsxDEV("div",{className:"md:hidden border-b border-[#1a1a1a] bg-[#0a0a0a]",children:S.jsxDEV("div",{className:"flex overflow-x-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:O.map((q)=>S.jsxDEV("button",{onClick:()=>U(q.key),className:`flex-shrink-0 px-4 py-3 text-sm font-medium border-b-2 transition ${G===q.key?"border-[#f97316] text-[#f97316]":"border-transparent text-[#666] hover:text-[#888]"}`,children:q.label},q.key,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("div",{className:"hidden md:block w-48 border-r border-[#1a1a1a] p-4 flex-shrink-0",children:[S.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),S.jsxDEV("nav",{className:"space-y-1",children:O.map((q)=>S.jsxDEV(AI,{label:q.label,active:G===q.key,onClick:()=>U(q.key)},q.key,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex-1 overflow-auto p-4 md:p-6",children:[G==="providers"&&S.jsxDEV(II,{},void 0,!1,void 0,this),G==="projects"&&Y&&S.jsxDEV(TI,{},void 0,!1,void 0,this),G==="account"&&S.jsxDEV(fI,{},void 0,!1,void 0,this),G==="updates"&&S.jsxDEV(CI,{},void 0,!1,void 0,this),G==="data"&&S.jsxDEV(hI,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function AI({label:Y,active:G,onClick:U}){return S.jsxDEV("button",{onClick:U,className:`w-full text-left px-3 py-2 rounded text-sm transition ${G?"bg-[#1a1a1a] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:Y},void 0,!1,void 0,this)}function II(){let{authFetch:Y}=T1(),{projects:G,projectsEnabled:U}=h4(),[O,q]=V1.useState([]),[R,K]=V1.useState(null),[_,A]=V1.useState(""),[b,P]=V1.useState(!1),[M,w]=V1.useState(!1),[f,v]=V1.useState(null),[m,g]=V1.useState(null),{confirm:C,ConfirmDialog:V}=A5(),k=async()=>{let z0=await(await Y("/api/providers")).json();q(z0.providers||[])};V1.useEffect(()=>{k()},[]);let x=async()=>{if(!R||!_)return;P(!0),v(null),g(null);try{w(!0);let z0=await(await Y(`/api/keys/${R}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:_})})).json();if(w(!1),!z0.valid){v(z0.error||"API key is invalid"),P(!1);return}let Q0=await Y(`/api/keys/${R}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:_})}),U0=await Q0.json();if(!Q0.ok)v(U0.error||"Failed to save key");else{let b0="API key saved!";if(U0.restartedAgents&&U0.restartedAgents.length>0){let e=U0.restartedAgents.filter((I0)=>I0.success).length;if(U0.restartedAgents.length-e===0)b0+=` Restarted ${e} agent${e>1?"s":""} with new key.`;else b0+=` Restarted ${e}/${U0.restartedAgents.length} agents.`}g(b0),A(""),K(null),k()}}catch(D){v("Failed to save key")}P(!1)},j=async(D)=>{if(!await C("Are you sure you want to remove this API key?",{confirmText:"Remove",title:"Remove API Key"}))return;await Y(`/api/keys/${D}`,{method:"DELETE"}),k()},u=O.filter((D)=>D.type==="llm"),p=O.filter((D)=>D.type==="integration"),s=u.filter((D)=>D.hasKey).length,a=p.filter((D)=>D.hasKey).length;return V1.useEffect(()=>{if(m&&!R){let D=setTimeout(()=>g(null),5000);return()=>clearTimeout(D)}},[m,R]),S.jsxDEV(S.Fragment,{children:[V,S.jsxDEV("div",{className:"space-y-10",children:[m&&!R&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center justify-between",children:[S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400",children:[S.jsxDEV(X5,{className:"w-5 h-5"},void 0,!1,void 0,this),S.jsxDEV("span",{children:m},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>g(null),className:"text-green-400 hover:text-green-300",children:S.jsxDEV(D5,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",s," of ",u.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:u.map((D)=>S.jsxDEV(SI,{provider:D,isEditing:R===D.id,apiKey:_,saving:b,testing:M,error:R===D.id?f:null,success:R===D.id?m:null,onStartEdit:()=>{K(D.id),v(null),g(null)},onCancelEdit:()=>{K(null),A(""),v(null)},onApiKeyChange:A,onSave:x,onDelete:()=>j(D.id)},D.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",a," of ",p.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p.map((D)=>S.jsxDEV(vI,{provider:D,isEditing:R===D.id,apiKey:_,saving:b,testing:M,error:R===D.id?f:null,success:R===D.id?m:null,onStartEdit:()=>{K(D.id),v(null),g(null)},onCancelEdit:()=>{K(null),A(""),v(null)},onApiKeyChange:A,onSave:x,onDelete:()=>j(D.id),projectsEnabled:U,projects:G,onRefresh:k},D.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var X2=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function TI(){let{projects:Y,createProject:G,updateProject:U,deleteProject:O}=h4(),[q,R]=V1.useState(!1),[K,_]=V1.useState(null),{confirm:A,ConfirmDialog:b}=A5(),P=async(v)=>{if(!await A("Are you sure you want to delete this project? Agents in this project will become unassigned.",{confirmText:"Delete",title:"Delete Project"}))return;await O(v)},M=()=>{_(null),R(!0)},w=(v)=>{_(v),R(!0)},f=()=>{R(!1),_(null)};return S.jsxDEV(S.Fragment,{children:[b,S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Organize agents into projects for better management."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:M,className:"flex items-center gap-2 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition flex-shrink-0",children:[S.jsxDEV(yK,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Project"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.length===0?S.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[S.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm",children:"Create a project to organize your agents."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"space-y-3",children:Y.map((v)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[S.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:v.color}},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("h3",{className:"font-medium",children:v.name},void 0,!1,void 0,this),v.description&&S.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:v.description},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[v.agentCount," agent",v.agentCount!==1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("button",{onClick:()=>w(v),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>P(v.id),className:"text-sm text-red-400 hover:text-red-300 px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},v.id,!0,void 0,this))},void 0,!1,void 0,this),q&&S.jsxDEV(kI,{project:K,onSave:async(v)=>{if(K){let m=await U(K.id,v);if(m)f();return!!m}else{let m=await G(v);if(m)f();return!!m}},onClose:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kI({project:Y,onSave:G,onClose:U}){let[O,q]=V1.useState(Y?.name||""),[R,K]=V1.useState(Y?.description||""),[_,A]=V1.useState(Y?.color||X2[Math.floor(Math.random()*X2.length)]),[b,P]=V1.useState(!1),[M,w]=V1.useState(null),f=async()=>{if(!O.trim()){w("Name is required");return}P(!0),w(null);let v=await G({name:O,description:R||void 0,color:_});if(P(!1),!v)w(Y?"Failed to update project":"Failed to create project")};return S.jsxDEV(kQ,{onClose:U,children:[S.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"text",value:O,onChange:(v)=>q(v.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"My Project",autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"text",value:R,onChange:(v)=>K(v.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"A short description"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:X2.map((v)=>S.jsxDEV("button",{type:"button",onClick:()=>A(v),className:`w-10 h-10 rounded-full transition ${_===v?"ring-2 ring-white ring-offset-2 ring-offset-[#111]":"hover:scale-110"}`,style:{backgroundColor:v}},v,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:M},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex gap-3 mt-6",children:[S.jsxDEV("button",{onClick:U,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:f,disabled:b||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:b?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function CI(){let{authFetch:Y}=T1(),[G,U]=V1.useState(null),[O,q]=V1.useState(!1),[R,K]=V1.useState(!1),[_,A]=V1.useState(null),[b,P]=V1.useState(null),[M,w]=V1.useState(null),f=async()=>{q(!0),A(null);try{let C=await Y("/api/version");if(!C.ok)throw Error("Failed to check for updates");let V=await C.json();U(V)}catch(C){A("Failed to check for updates")}q(!1)},v=async()=>{K(!0),A(null),P(null);try{let V=await(await Y("/api/version/update",{method:"POST"})).json();if(!V.success)A(V.error||"Update failed");else{let k=V.restarted?.length||0,x=k>0?` ${k} running agent${k>1?"s":""} restarted.`:"";P(`Agent binary updated to v${V.version}.${x}`),await f()}}catch(C){A("Failed to update agent")}K(!1)};V1.useEffect(()=>{f()},[]);let m=(C,V)=>{navigator.clipboard.writeText(C),w(V),setTimeout(()=>w(null),2000)},g=G?.apteva.updateAvailable||G?.agent.updateAvailable;return S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Check for new versions of apteva and the agent binary."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O&&!G?S.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):_&&!G?S.jsxDEV("div",{className:"text-red-400",children:_},void 0,!1,void 0,this):G?.isDocker?S.jsxDEV("div",{className:"space-y-6",children:[S.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[S.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[S.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:S.jsxDEV("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.186.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.186.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.186.186 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.186.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.185-.186H5.136a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#888]",children:"Updates are automatic when you pull a new image version."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:["A newer version (v",G.apteva.latest,") is available. To update:"]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"space-y-2",children:[S.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker pull apteva/apteva:latest"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker compose up -d"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),w("docker"),setTimeout(()=>w(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:M==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#555]",children:"Your data is stored in a Docker volume and persists across updates."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):G?S.jsxDEV("div",{className:"space-y-6",children:[b&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:b},void 0,!1,void 0,this),_&&S.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:_},void 0,!1,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"The app you're running"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:[S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&S.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.apteva.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.apteva.updateAvailable?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("code",{className:"flex-1 bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"npx apteva@latest"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>m("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:M==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:"The Go binary that runs agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-right",children:[S.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&S.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.agent.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.agent.updateAvailable?S.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[S.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"A new version is available. Stop all agents before updating."},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:S.jsxDEV("button",{onClick:v,disabled:R,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:R?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[S.jsxDEV(X5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!g&&!b&&S.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center gap-2 text-green-400",children:[S.jsxDEV(X5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:f,disabled:O,className:"text-sm text-[#666] hover:text-[#888] disabled:opacity-50",children:O?"Checking...":"Check for updates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function SI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:K,onStartEdit:_,onCancelEdit:A,onApiKeyChange:b,onSave:P,onDelete:M}){let w=Y.id==="ollama",[f,v]=V1.default.useState(null);return V1.default.useEffect(()=>{if(w&&Y.hasKey)fetch("/api/providers/ollama/status").then((m)=>m.json()).then((m)=>v({connected:m.connected,modelCount:m.modelCount})).catch(()=>v({connected:!1}))},[w,Y.hasKey]),S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[S.jsxDEV("div",{className:"min-w-0",children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":w?"Run models locally":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?S.jsxDEV("span",{className:`text-xs flex items-center gap-1 px-2 py-1 rounded whitespace-nowrap flex-shrink-0 ${w&&f?f.connected?"text-green-400 bg-green-500/10":"text-yellow-400 bg-yellow-500/10":"text-green-400 bg-green-500/10"}`,children:w&&f?f.connected?S.jsxDEV(S.Fragment,{children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),f.modelCount," models"]},void 0,!0,void 0,this):S.jsxDEV(S.Fragment,{children:"Not running"},void 0,!1,void 0,this):S.jsxDEV(S.Fragment,{children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:w?"text":"password",value:U,onChange:(m)=>b(m.target.value),placeholder:w?"http://localhost:11434":Y.hasKey?"Enter new API key...":"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),w&&S.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your Ollama server URL. Default is http://localhost:11434"},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:A,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":w?"Connect":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"View docs"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-3",children:[S.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:w?"Change URL":"Update key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:M,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:w?"Download Ollama":"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:w?"Configure":"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function vI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:R,success:K,onStartEdit:_,onCancelEdit:A,onApiKeyChange:b,onSave:P,onDelete:M,projectsEnabled:w,projects:f,onRefresh:v}){let{authFetch:m}=T1(),[g,C]=V1.useState([]),[V,k]=V1.useState(""),[x,j]=V1.useState(!1),{confirm:u,ConfirmDialog:p}=A5(),s=async()=>{try{let y0=await(await m(`/api/keys/${Y.id}`)).json();C(y0.keys||[])}catch(e){console.error("Failed to fetch keys:",e)}};V1.useEffect(()=>{if(w)s()},[Y.id,w]);let a=async()=>{if(!U)return;try{if((await m(`/api/keys/${Y.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:U,project_id:V||null})})).ok)b(""),k(""),A(),s(),v()}catch(e){console.error("Failed to save key:",e)}},D=async(e,y0)=>{if(!await u(`Are you sure you want to remove this API key${y0?` (${y0})`:""}?`,{confirmText:"Remove",title:"Remove API Key"}))return;try{await m(`/api/keys/by-id/${e}`,{method:"DELETE"}),s(),v()}catch(i){console.error("Failed to delete key:",i)}},z0=g.find((e)=>!e.project_id),Q0=g.filter((e)=>e.project_id),U0=(e)=>f.find((y0)=>y0.id===e)?.name||"Unknown",b0=(e)=>f.find((y0)=>y0.id===e)?.color||"#666";if(!w)return S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?S.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:"password",value:U,onChange:(e)=>b(e.target.value),placeholder:Y.hasKey?"Enter new API key...":"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:A,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:q?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-3",children:[S.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:"Update key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:M,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return S.jsxDEV(S.Fragment,{children:[p,S.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${g.length>0?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[S.jsxDEV("div",{children:[S.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.length>0?S.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[S.jsxDEV(X5,{className:"w-3 h-3"},void 0,!1,void 0,this),g.length," key",g.length!==1?"s":""]},void 0,!0,void 0,this):S.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.length>0&&S.jsxDEV("div",{className:"mt-3 space-y-2",children:[z0&&S.jsxDEV("div",{className:"flex items-center justify-between text-sm bg-[#0a0a0a] rounded px-3 py-2",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:"text-[#888]",children:"Global"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#555]",children:"·"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#666] font-mono text-xs",children:z0.key_hint},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>D(z0.id,"Global"),className:"text-red-400 hover:text-red-300 text-xs",children:"Remove"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0.slice(0,x?void 0:2).map((e)=>S.jsxDEV("div",{className:"flex items-center justify-between text-sm bg-[#0a0a0a] rounded px-3 py-2",children:[S.jsxDEV("div",{className:"flex items-center gap-2 min-w-0",children:[S.jsxDEV("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:b0(e.project_id)}},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#888] truncate",children:e.name||U0(e.project_id)},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#555]",children:"·"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"text-[#666] font-mono text-xs",children:e.key_hint},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{onClick:()=>D(e.id,e.name||U0(e.project_id)),className:"text-red-400 hover:text-red-300 text-xs flex-shrink-0 ml-2",children:"Remove"},void 0,!1,void 0,this)]},e.id,!0,void 0,this)),Q0.length>2&&!x&&S.jsxDEV("button",{onClick:()=>j(!0),className:"text-xs text-[#666] hover:text-[#888] w-full text-center py-1",children:["Show ",Q0.length-2," more..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?S.jsxDEV("div",{className:"space-y-3",children:[S.jsxDEV("input",{type:"password",value:U,onChange:(e)=>b(e.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),S.jsxDEV(J7,{value:V,onChange:k,placeholder:"Global (all projects)",options:[{value:"",label:"Global (all projects)"},...f.map((e)=>({value:e.id,label:e.name}))]},void 0,!1,void 0,this),R&&S.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),K&&S.jsxDEV("p",{className:"text-green-400 text-sm",children:K},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:()=>{A(),k("")},className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:a,disabled:!U||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:g.length>0?"View docs":"Get API key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fI(){let{authFetch:Y,user:G}=T1(),[U,O]=V1.useState(""),[q,R]=V1.useState(""),[K,_]=V1.useState(""),[A,b]=V1.useState(!1),[P,M]=V1.useState(null),w=async()=>{if(!U||!q||!K){M({type:"error",text:"All fields are required"});return}if(q!==K){M({type:"error",text:"New passwords do not match"});return}if(q.length<8){M({type:"error",text:"Password must be at least 8 characters"});return}b(!0),M(null);try{let f=await Y("/api/auth/password",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:U,newPassword:q})}),v=await f.json();if(f.ok)M({type:"success",text:"Password updated successfully"}),O(""),R(""),_("");else M({type:"error",text:v.error||"Failed to update password"})}catch{M({type:"error",text:"Failed to update password"})}b(!1)};return S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Account Settings"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Manage your account and security."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G&&S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 mb-6",children:[S.jsxDEV("h3",{className:"font-medium mb-3",children:"Profile"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-2 text-sm",children:[S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Username"},void 0,!1,void 0,this),S.jsxDEV("span",{children:G.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.email&&S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Email"},void 0,!1,void 0,this),S.jsxDEV("span",{children:G.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex justify-between",children:[S.jsxDEV("span",{className:"text-[#666]",children:"Role"},void 0,!1,void 0,this),S.jsxDEV("span",{className:"capitalize",children:G.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[S.jsxDEV("h3",{className:"font-medium mb-4",children:"Change Password"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-4 max-w-md",children:[S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Current Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:U,onChange:(f)=>O(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"New Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:q,onChange:(f)=>R(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{children:[S.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Confirm New Password"},void 0,!1,void 0,this),S.jsxDEV("input",{type:"password",value:K,onChange:(f)=>_(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&S.jsxDEV("div",{className:`p-3 rounded text-sm ${P.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:P.text},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:w,disabled:A||!U||!q||!K,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black rounded text-sm font-medium transition",children:A?"Updating...":"Update Password"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function hI(){let{authFetch:Y}=T1(),[G,U]=V1.useState(!1),[O,q]=V1.useState(null),[R,K]=V1.useState(null),{confirm:_,ConfirmDialog:A}=A5(),b=async()=>{try{let w=await(await Y("/api/telemetry/stats")).json();K(w.stats?.total_events||0)}catch{K(null)}};V1.useEffect(()=>{b()},[]);let P=async()=>{if(!await _("Are you sure you want to delete all telemetry data? This cannot be undone.",{confirmText:"Clear All",title:"Clear Telemetry Data"}))return;U(!0),q(null);try{let w=await Y("/api/telemetry/clear",{method:"POST"}),f=await w.json();if(w.ok)q({type:"success",text:`Cleared ${f.deleted||0} telemetry events.`}),K(0);else q({type:"error",text:f.error||"Failed to clear telemetry"})}catch{q({type:"error",text:"Failed to clear telemetry"})}U(!1)};return S.jsxDEV(S.Fragment,{children:[A,S.jsxDEV("div",{className:"max-w-4xl w-full",children:[S.jsxDEV("div",{className:"mb-6",children:[S.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[S.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:R!==null?`${R.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&S.jsxDEV("div",{className:`mb-4 p-3 rounded text-sm ${O.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:O.text},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:P,disabled:G||R===0,className:"px-4 py-2 bg-red-500/20 text-red-400 hover:bg-red-500/30 disabled:opacity-50 disabled:cursor-not-allowed rounded text-sm font-medium transition",children:G?"Clearing...":"Clear All Telemetry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var c4=B0(U1(),1),yI=[{key:"memory",icon:Fz,label:"Memory"},{key:"tasks",icon:m5,label:"Tasks"},{key:"files",icon:SQ,label:"Files"},{key:"vision",icon:Pz,label:"Vision"},{key:"operator",icon:bz,label:"Operator"},{key:"mcp",icon:E5,label:"MCP"},{key:"realtime",icon:Az,label:"Realtime"},{key:"agents",icon:vQ,label:"Multi-Agent"}];function R3({agent:Y,selected:G,onSelect:U,onToggle:O,showProject:q}){let R=yI.filter((w)=>Y.features?.[w.key]),K=Y.mcpServerDetails||[],_=Y.skillDetails||[],{isActive:A,type:b}=vZ(Y.id),{projects:P}=h4(),M=Y.projectId?P.find((w)=>w.id===Y.projectId):null;return c4.jsxDEV("div",{onClick:U,className:`bg-[#111] rounded p-5 border transition cursor-pointer flex flex-col h-full ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[c4.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[c4.jsxDEV("div",{children:[c4.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),c4.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&c4.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q&&M&&c4.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[c4.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:M.color}},void 0,!1,void 0,this),M.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c4.jsxDEV(VI,{status:Y.status,isActive:A&&Y.status==="running",activityType:b},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:R.map(({key:w,icon:f,label:v})=>c4.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:v,children:[c4.jsxDEV(f,{className:"w-3 h-3"},void 0,!1,void 0,this),v]},w,!0,void 0,this))},void 0,!1,void 0,this),K.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:K.map((w)=>{let f=w.type==="http"&&w.url||w.status==="running";return c4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${f?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${w.name} (${f?"available":w.status})`,children:[c4.jsxDEV(E5,{className:"w-3 h-3"},void 0,!1,void 0,this),w.name]},w.id,!0,void 0,this)})},void 0,!1,void 0,this),_.length>0&&c4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:_.map((w)=>c4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${w.enabled?"bg-purple-500/10 text-purple-400":"bg-[#222] text-[#666]"}`,title:`Skill: ${w.name} v${w.version}`,children:[c4.jsxDEV(hZ,{className:"w-3 h-3"},void 0,!1,void 0,this),w.name]},w.id,!0,void 0,this))},void 0,!1,void 0,this),c4.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4 flex-1",children:Y.systemPrompt},void 0,!1,void 0,this),c4.jsxDEV("button",{onClick:O,className:`w-full px-3 py-1.5 rounded text-sm font-medium transition mt-auto ${Y.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:Y.status==="running"?"Stop":"Start"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function VI({status:Y,isActive:G,activityType:U}){if(Y==="running"&&G&&U)return c4.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:U},void 0,!1,void 0,this);return c4.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${Y==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:Y},void 0,!1,void 0,this)}var xZ=B0(f1(),1);var q1=B0(U1(),1),DI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:Fz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:m5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Pz},{key:"operator",label:"Operator",description:"Browser automation",icon:bz},{key:"mcp",label:"MCP",description:"External tools/services",icon:E5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Az},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:vQ}];function N3({form:Y,providers:G,configuredProviders:U,onFormChange:O,onProviderChange:q,onCreate:R,onClose:K,onGoToSettings:_}){let{projects:A,currentProjectId:b}=h4(),P=G.find((u)=>u.id===Y.provider),[M,w]=xZ.default.useState([]),[f,v]=xZ.default.useState(!1);xZ.default.useEffect(()=>{if(Y.provider==="ollama")v(!0),fetch("/api/providers/ollama/models").then((u)=>u.json()).then((u)=>{if(u.models&&u.models.length>0){if(w(u.models.map((p)=>({value:p.value,label:p.label||p.value}))),!Y.model&&u.models.length>0)O({...Y,model:u.models[0].value})}}).catch(()=>w([])).finally(()=>v(!1))},[Y.provider]);let m=U.filter((u)=>u.type==="llm").map((u)=>({value:u.id,label:u.name})),g=Y.provider==="ollama"&&M.length>0?M:P?.models.map((u)=>({value:u.value,label:u.label,recommended:u.recommended}))||[],C=A.map((u)=>({value:u.id,label:u.name}));xZ.default.useEffect(()=>{if(Y.projectId===void 0&&b&&b!=="unassigned")O({...Y,projectId:b})},[b]);let V=(u)=>{if(u==="agents")if(typeof Y.features.agents==="boolean"?Y.features.agents:Y.features.agents?.enabled??!1)O({...Y,features:{...Y.features,agents:!1}});else O({...Y,features:{...Y.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}});else O({...Y,features:{...Y.features,[u]:!Y.features[u]}})},k=()=>{let u=Y.features.agents;if(typeof u==="boolean")return u;return u?.enabled??!1},x=()=>{return Rz(Y.features,Y.projectId).mode||"worker"},j=(u)=>{let p=Rz(Y.features,Y.projectId);O({...Y,features:{...Y.features,agents:{...p,enabled:!0,mode:u}}})};return q1.jsxDEV(kQ,{children:[q1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),m.length===0?q1.jsxDEV(mI,{onGoToSettings:_},void 0,!1,void 0,this):q1.jsxDEV(q1.Fragment,{children:[q1.jsxDEV("div",{className:"space-y-4",children:[q1.jsxDEV(V8,{label:"Name",children:q1.jsxDEV("input",{type:"text",value:Y.name,onChange:(u)=>O({...Y,name:u.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]",placeholder:"My Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A.length>0&&q1.jsxDEV(V8,{label:"Project",children:q1.jsxDEV(J7,{value:Y.projectId||"",options:C,onChange:(u)=>O({...Y,projectId:u||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Provider",children:q1.jsxDEV(J7,{value:Y.provider,options:m,onChange:q,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Model",children:f?q1.jsxDEV("div",{className:"text-sm text-[#666] py-2",children:"Loading Ollama models..."},void 0,!1,void 0,this):Y.provider==="ollama"&&g.length===0?q1.jsxDEV("div",{className:"text-sm text-yellow-400/80 py-2",children:["No models found. Run ",q1.jsxDEV("code",{className:"bg-[#1a1a1a] px-1 rounded",children:"ollama pull llama3.3"},void 0,!1,void 0,this)," to download a model."]},void 0,!0,void 0,this):q1.jsxDEV(J7,{value:Y.model,options:g,onChange:(u)=>O({...Y,model:u}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"System Prompt",children:q1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(u)=>O({...Y,systemPrompt:u.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV(V8,{label:"Features",children:q1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:DI.map(({key:u,label:p,description:s,icon:a})=>{let D=u==="agents"?k():!!Y.features[u];return q1.jsxDEV("button",{type:"button",onClick:()=>V(u),className:`flex items-center gap-3 p-3 rounded border text-left transition ${D?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV(a,{className:`w-5 h-5 flex-shrink-0 ${D?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"flex-1 min-w-0",children:[q1.jsxDEV("div",{className:`text-sm font-medium ${D?"text-[#f97316]":""}`,children:p},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},u,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),k()&&q1.jsxDEV(V8,{label:"Multi-Agent Mode",children:[q1.jsxDEV("div",{className:"flex gap-2",children:[q1.jsxDEV("button",{type:"button",onClick:()=>j("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${x()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV("div",{className:`text-sm font-medium ${x()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("button",{type:"button",onClick:()=>j("worker"),className:`flex-1 p-3 rounded border text-left transition ${x()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[q1.jsxDEV("div",{className:`text-sm font-medium ${x()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),q1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives delegated tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&q1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.provider==="anthropic"&&q1.jsxDEV(V8,{label:"Agent Built-in Tools",children:[q1.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[q1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webSearch:!Y.features.builtinTools?.webSearch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[q1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("button",{type:"button",onClick:()=>O({...Y,features:{...Y.features,builtinTools:{...Y.features.builtinTools,webFetch:!Y.features.builtinTools?.webFetch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${Y.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[q1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q1.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[q1.jsxDEV("button",{onClick:K,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),q1.jsxDEV("button",{onClick:R,disabled:!Y.name,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function V8({label:Y,children:G}){return q1.jsxDEV("div",{children:[q1.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}function mI({onGoToSettings:Y}){return q1.jsxDEV("div",{className:"text-center py-6",children:[q1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),q1.jsxDEV("button",{onClick:Y,className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Go to Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var k1=B0(f1(),1);var h=B0(U1(),1),EI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:Fz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:m5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Pz},{key:"operator",label:"Operator",description:"Browser automation",icon:bz},{key:"mcp",label:"MCP",description:"External tools/services",icon:E5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Az},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:vQ}];function M3({agent:Y,providers:G,onClose:U,onStartAgent:O,onUpdateAgent:q,onDeleteAgent:R}){let[K,_]=k1.useState("chat");return h.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[h.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[h.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:h.jsxDEV("div",{className:"flex gap-1",children:[h.jsxDEV(EQ,{active:K==="chat",onClick:()=>_("chat"),children:"Chat"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="threads",onClick:()=>_("threads"),children:"Threads"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="tasks",onClick:()=>_("tasks"),children:"Tasks"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="memory",onClick:()=>_("memory"),children:"Memory"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="files",onClick:()=>_("files"),children:"Files"},void 0,!1,void 0,this),h.jsxDEV(EQ,{active:K==="settings",onClick:()=>_("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:h.jsxDEV(D5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[K==="chat"&&h.jsxDEV(uI,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),K==="threads"&&h.jsxDEV(gI,{agent:Y},void 0,!1,void 0,this),K==="tasks"&&h.jsxDEV(xI,{agent:Y},void 0,!1,void 0,this),K==="memory"&&h.jsxDEV(jI,{agent:Y},void 0,!1,void 0,this),K==="files"&&h.jsxDEV(pI,{agent:Y},void 0,!1,void 0,this),K==="settings"&&h.jsxDEV(cI,{agent:Y,providers:G,onUpdateAgent:q,onDeleteAgent:R},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function EQ({active:Y,onClick:G,children:U}){return h.jsxDEV("button",{onClick:G,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${Y?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:U},void 0,!1,void 0,this)}function uI({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return h.jsxDEV(B3,{agentId:"default",apiUrl:`/api/agents/${Y.id}`,placeholder:"Message this agent...",context:Y.systemPrompt,variant:"terminal",headerTitle:Y.name},void 0,!1,void 0,this);return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:G,className:"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition",children:"Start Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function gI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(null),[b,P]=k1.useState([]),[M,w]=k1.useState(!1),{confirm:f,ConfirmDialog:v}=A5();k1.useEffect(()=>{U([]),A(null),P([]),K(null),q(!0)},[Y.id]),k1.useEffect(()=>{if(Y.status!=="running"){q(!1);return}(async()=>{try{let V=await fetch(`/api/agents/${Y.id}/threads`);if(!V.ok)throw Error("Failed to fetch threads");let k=await V.json();U(k.threads||[]),K(null)}catch(V){K(V instanceof Error?V.message:"Failed to load threads")}finally{q(!1)}})()},[Y.id,Y.status]);let m=async(C)=>{A(C),w(!0);try{let V=await fetch(`/api/agents/${Y.id}/threads/${C}/messages`);if(!V.ok)throw Error("Failed to fetch messages");let k=await V.json();P(k.messages||[])}catch{P([])}finally{w(!1)}},g=async(C,V)=>{if(V.stopPropagation(),!await f("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${C}`,{method:"DELETE"}),U((x)=>x.filter((j)=>j.id!==C)),_===C)A(null),P([])}catch{}};if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(_){let C=G.find((V)=>V.id===_);return h.jsxDEV(h.Fragment,{children:[v,h.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[h.jsxDEV("button",{onClick:()=>{A(null),P([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1",children:[h.jsxDEV("p",{className:"text-sm font-medium",children:C?.title||`Thread ${_.slice(0,8)}`},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666]",children:C&&new Date(C.updated_at||C.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:(V)=>g(_,V),className:"text-[#666] hover:text-red-400 text-sm px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:M?h.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):b.length===0?h.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-4",children:b.map((V,k)=>h.jsxDEV("div",{className:`${V.role==="user"?"text-right":""}`,children:h.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${V.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[h.jsxDEV("div",{className:"text-sm whitespace-pre-wrap",children:typeof V.content==="string"?V.content:Array.isArray(V.content)?V.content.map((x,j)=>h.jsxDEV("div",{children:[x.type==="text"&&x.text,x.type==="tool_use"&&h.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDD27 Tool: ",x.name]},void 0,!0,void 0,this),x.type==="tool_result"&&h.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDCCB Result: ",typeof x.content==="string"?x.content.slice(0,200):"..."]},void 0,!0,void 0,this)]},j,!0,void 0,this)):JSON.stringify(V.content)},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:new Date(V.created_at).toLocaleTimeString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},k,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}return h.jsxDEV(h.Fragment,{children:[v,h.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?h.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:h.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):h.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((C)=>h.jsxDEV("div",{onClick:()=>m(C.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm font-medium truncate",children:C.title||`Thread ${C.id.slice(0,8)}`},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(C.updated_at||C.created_at).toLocaleString(),C.message_count!==void 0&&` • ${C.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:(V)=>g(C.id,V),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},C.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function xI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState("all");k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let b=async()=>{if(Y.status!=="running"){q(!1);return}try{let M=await fetch(`/api/agents/${Y.id}/tasks?status=${_}`);if(!M.ok)throw Error("Failed to fetch tasks");let w=await M.json();U(w.tasks||[]),K(null)}catch(M){K(M instanceof Error?M.message:"Failed to load tasks")}finally{q(!1)}};k1.useEffect(()=>{q(!0),b()},[Y.id,Y.status,_]),k1.useEffect(()=>{if(Y.status!=="running")return;let M=setInterval(b,5000);return()=>clearInterval(M)},[Y.id,Y.status,_]);let P=(M)=>{switch(M){case"pending":return"bg-yellow-500/20 text-yellow-400";case"running":return"bg-blue-500/20 text-blue-400";case"completed":return"bg-green-500/20 text-green-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-[#222] text-[#666]"}};if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view tasks"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!Y.features?.tasks)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to schedule tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[h.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((M)=>h.jsxDEV("button",{onClick:()=>A(M),className:`px-3 py-1 text-xs rounded transition ${_===M?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:M.charAt(0).toUpperCase()+M.slice(1)},M,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:h.jsxDEV("p",{children:["No ",_==="all"?"":_+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-3",children:G.map((M)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[h.jsxDEV("div",{className:"flex items-start justify-between",children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:M.name},void 0,!1,void 0,this),M.description&&h.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:M.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${P(M.status)}`,children:M.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[h.jsxDEV("span",{children:["Created: ",new Date(M.created_at).toLocaleString()]},void 0,!0,void 0,this),M.scheduled_at&&h.jsxDEV("span",{children:["Scheduled: ",new Date(M.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M.status==="completed"&&M.result&&h.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[h.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"whitespace-pre-wrap",children:M.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.status==="failed"&&M.error&&h.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[h.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"whitespace-pre-wrap",children:M.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},M.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(!1),{confirm:b,ConfirmDialog:P}=A5();k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let M=async()=>{if(Y.status!=="running"){q(!1);return}try{let v=await fetch(`/api/agents/${Y.id}/memories`);if(!v.ok)throw Error("Failed to fetch memories");let m=await v.json();U(m.memories||[]),A(m.enabled??!1),K(null)}catch(v){K(v instanceof Error?v.message:"Failed to load memories")}finally{q(!1)}};k1.useEffect(()=>{M()},[Y.id,Y.status]);let w=async(v)=>{try{await fetch(`/api/agents/${Y.id}/memories/${v}`,{method:"DELETE"}),U((m)=>m.filter((g)=>g.id!==v))}catch{}},f=async()=>{if(!await b("Clear all memories?",{confirmText:"Clear",title:"Clear Memories"}))return;try{await fetch(`/api/agents/${Y.id}/memories`,{method:"DELETE"}),U([])}catch{}};if(!Y.features?.memory)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to persist knowledge"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!_)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Check OPENAI_API_KEY for embeddings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV(h.Fragment,{children:[P,h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&h.jsxDEV("button",{onClick:f,className:"text-xs text-red-400 hover:text-red-300",children:"Clear All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[h.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm mt-1",children:"The agent will remember important information from conversations"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"space-y-3",children:G.map((v)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[h.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[h.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:v.content},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>w(v.id),className:"text-[#666] hover:text-red-400 text-sm flex-shrink-0",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[h.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${v.type==="preference"?"bg-purple-500/20 text-purple-400":v.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:v.type},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(v.created_at).toLocaleString()},void 0,!1,void 0,this),v.importance&&h.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",v.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},v.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function pI({agent:Y}){let[G,U]=k1.useState([]),[O,q]=k1.useState(!0),[R,K]=k1.useState(null),[_,A]=k1.useState(!1),[b,P]=k1.useState(null),[M,w]=k1.useState(!1),f=k1.default.useRef(null),{confirm:v,ConfirmDialog:m}=A5();k1.useEffect(()=>{U([]),K(null),q(!0)},[Y.id]);let g=async()=>{if(Y.status!=="running"){q(!1);return}try{let D=await fetch(`/api/agents/${Y.id}/files`);if(!D.ok)throw Error("Failed to fetch files");let z0=await D.json();U(z0.files||[]),K(null)}catch(D){K(D instanceof Error?D.message:"Failed to load files")}finally{q(!1)}};k1.useEffect(()=>{g()},[Y.id,Y.status]);let C=async(D)=>{if(!await v("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${Y.id}/files/${D}`,{method:"DELETE"}),U((Q0)=>Q0.filter((U0)=>U0.id!==D))}catch{}},V=(D,z0)=>{let Q0=document.createElement("a");Q0.href=`/api/agents/${Y.id}/files/${D}/download`,Q0.download=z0,Q0.click()},k=(D)=>{if(D<1024)return`${D} B`;if(D<1048576)return`${(D/1024).toFixed(1)} KB`;return`${(D/1048576).toFixed(1)} MB`},x=async(D)=>{A(!0),P(null);try{let z0=new FormData;z0.append("file",D);let Q0=await fetch(`/api/agents/${Y.id}/files`,{method:"POST",body:z0});if(!Q0.ok){let U0=await Q0.json();throw Error(U0.error||"Upload failed")}await g()}catch(z0){P(z0 instanceof Error?z0.message:"Upload failed")}finally{A(!1)}},j=(D)=>{let z0=D.target.files?.[0];if(z0)x(z0);D.target.value=""},u=(D)=>{D.preventDefault(),w(!1);let z0=D.dataTransfer.files?.[0];if(z0)x(z0)},p=(D)=>{D.preventDefault(),w(!0)},s=(D)=>{D.preventDefault(),w(!1)},a=(D)=>{if(D.startsWith("image/"))return"\uD83D\uDDBC";if(D.includes("pdf"))return"\uD83D\uDCD5";if(D.includes("json"))return"{}";if(D.includes("javascript")||D.includes("typescript"))return"⚡";if(D.startsWith("text/"))return"\uD83D\uDCC4";if(D.startsWith("audio/"))return"\uD83C\uDFB5";if(D.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("div",{className:"text-center",children:[h.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to manage files"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:h.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return h.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:h.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return h.jsxDEV(h.Fragment,{children:[m,h.jsxDEV("div",{className:`flex-1 overflow-auto p-4 transition ${M?"bg-[#f97316]/5":""}`,onDrop:u,onDragOver:p,onDragLeave:s,children:[h.jsxDEV("input",{ref:f,type:"file",className:"hidden",onChange:j},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>f.current?.click(),disabled:_,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded font-medium transition",children:_?"Uploading...":"Upload"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:g,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&h.jsxDEV("div",{className:"mb-4 text-sm bg-red-500/10 text-red-400 px-3 py-2 rounded",children:b},void 0,!1,void 0,this),M&&h.jsxDEV("div",{className:"mb-4 border-2 border-dashed border-[#f97316] rounded-lg p-8 text-center",children:h.jsxDEV("p",{className:"text-[#f97316]",children:"Drop file to upload"},void 0,!1,void 0,this)},void 0,!1,void 0,this),G.length===0&&!M&&h.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[h.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm mt-1",children:"Drop files here, click Upload, or attach files in Chat"},void 0,!1,void 0,this),Y.features?.memory&&h.jsxDEV("p",{className:"text-xs mt-2 text-[#555]",children:"Files will be auto-ingested into memory"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length>0&&h.jsxDEV("div",{className:"space-y-2",children:G.map((D)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[h.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:a(D.mime_type)},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:D.filename},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#666]",children:[k(D.size_bytes)," • ",new Date(D.created_at).toLocaleString(),D.source&&D.source!=="upload"&&` • ${D.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>V(D.id,D.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>C(D.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},D.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function cI({agent:Y,providers:G,onUpdateAgent:U,onDeleteAgent:O}){let{authFetch:q,isDev:R}=T1(),[K,_]=k1.useState({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),[A,b]=k1.useState(!1),[P,M]=k1.useState(!1),[w,f]=k1.useState(null),[v,m]=k1.useState([]),[g,C]=k1.useState([]),[V,k]=k1.useState(null),[x,j]=k1.useState(!1);k1.useEffect(()=>{(async()=>{try{let O0=await(await q("/api/mcp/servers")).json();m(O0.servers||[])}catch(R0){console.error("Failed to fetch MCP servers:",R0)}})()},[q]),k1.useEffect(()=>{if(!R)return;(async()=>{try{let R0=await q(`/api/agents/${Y.id}/api-key`);if(R0.ok){let O0=await R0.json();k(O0.apiKey)}}catch(R0){}})()},[Y.id,R,q]),k1.useEffect(()=>{(async()=>{try{let O0=await(await q("/api/skills")).json();C(O0.skills||[])}catch(R0){console.error("Failed to fetch skills:",R0)}})()},[q]),k1.useEffect(()=>{_({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features,builtinTools:Y.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...Y.mcpServers||[]],skills:[...Y.skills||[]]}),f(null)},[Y.id]);let u=G.find((i)=>i.id===K.provider),p=G.filter((i)=>i.hasKey&&i.type==="llm").map((i)=>({value:i.id,label:i.name})),s=u?.models.map((i)=>({value:i.value,label:i.label,recommended:i.recommended}))||[],a=(i)=>{let R0=G.find((q0)=>q0.id===i),O0=R0?.models.find((q0)=>q0.recommended)?.value||R0?.models[0]?.value||"";_((q0)=>({...q0,provider:i,model:O0}))},D=(i)=>{if(i==="agents"){let R0=(O0)=>{return Rz(O0.features,Y.projectId).enabled};_((O0)=>{if(typeof O0.features.agents==="boolean"?O0.features.agents:O0.features.agents?.enabled??!1)return{...O0,features:{...O0.features,agents:!1}};else return{...O0,features:{...O0.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}}})}else _((R0)=>({...R0,features:{...R0.features,[i]:!R0.features[i]}}))},z0=(i)=>{_((R0)=>{let O0=Rz(R0.features,Y.projectId);return{...R0,features:{...R0.features,agents:{...O0,enabled:!0,mode:i}}}})},Q0=()=>{let i=K.features.agents;if(typeof i==="boolean")return i;return i?.enabled??!1},U0=()=>{return Rz(K.features,Y.projectId).mode||"worker"},b0=(i)=>{_((R0)=>({...R0,mcpServers:R0.mcpServers.includes(i)?R0.mcpServers.filter((O0)=>O0!==i):[...R0.mcpServers,i]}))},e=(i)=>{_((R0)=>({...R0,skills:R0.skills.includes(i)?R0.skills.filter((O0)=>O0!==i):[...R0.skills,i]}))},y0=async()=>{b(!0),f(null);let i=await U(K);if(b(!1),i.error)f({type:"error",text:i.error});else f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),2000)},I0=K.name!==Y.name||K.provider!==Y.provider||K.model!==Y.model||K.systemPrompt!==Y.systemPrompt||JSON.stringify(K.features)!==JSON.stringify(Y.features)||JSON.stringify(K.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort())||JSON.stringify(K.skills.sort())!==JSON.stringify((Y.skills||[]).sort());return h.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:h.jsxDEV("div",{className:"space-y-4",children:[h.jsxDEV(e6,{label:"Name",children:h.jsxDEV("input",{type:"text",value:K.name,onChange:(i)=>_((R0)=>({...R0,name:i.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Provider",children:h.jsxDEV(J7,{value:K.provider,options:p,onChange:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Model",children:h.jsxDEV(J7,{value:K.model,options:s,onChange:(i)=>_((R0)=>({...R0,model:i}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"System Prompt",children:h.jsxDEV("textarea",{value:K.systemPrompt,onChange:(i)=>_((R0)=>({...R0,systemPrompt:i.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Features",children:h.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:EI.map(({key:i,label:R0,description:O0,icon:q0})=>{let o=i==="agents"?Q0():!!K.features[i];return h.jsxDEV("button",{type:"button",onClick:()=>D(i),className:`flex items-center gap-3 p-3 rounded border text-left transition ${o?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV(q0,{className:`w-5 h-5 flex-shrink-0 ${o?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:`text-sm font-medium ${o?"text-[#f97316]":""}`,children:R0},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:O0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},i,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q0()&&h.jsxDEV(e6,{label:"Multi-Agent Mode",children:[h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{type:"button",onClick:()=>z0("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${U0()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`text-sm font-medium ${U0()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates to other agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{type:"button",onClick:()=>z0("worker"),className:`flex-1 p-3 rounded border text-left transition ${U0()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`text-sm font-medium ${U0()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives tasks from coordinators"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.projectId&&h.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.provider==="anthropic"&&h.jsxDEV(e6,{label:"Agent Built-in Tools",children:[h.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[h.jsxDEV("button",{type:"button",onClick:()=>_((i)=>({...i,features:{...i.features,builtinTools:{...i.features.builtinTools,webSearch:!i.features.builtinTools?.webSearch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${K.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[h.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{type:"button",onClick:()=>_((i)=>({...i,features:{...i.features,builtinTools:{...i.features.builtinTools,webFetch:!i.features.builtinTools?.webFetch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${K.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[h.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.features.mcp&&h.jsxDEV(e6,{label:"MCP Servers",children:v.length===0?h.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers configured. Add servers in the MCP page first."},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-2",children:[v.filter((i)=>i.project_id===null||i.project_id===Y.projectId).map((i)=>{let R0=i.type==="http"&&i.url,O0=R0||i.status==="running",q0=R0?`${i.source||"remote"} • http`:`${i.type} • ${i.package||i.command||"custom"}${i.status==="running"&&i.port?` • :${i.port}`:""}`;return h.jsxDEV("button",{type:"button",onClick:()=>b0(i.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${K.mcpServers.includes(i.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${O0?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("span",{className:`text-sm font-medium ${K.mcpServers.includes(i.id)?"text-[#f97316]":""}`,children:i.name},void 0,!1,void 0,this),i.project_id===null&&h.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:q0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${O0?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:R0?"remote":i.status},void 0,!1,void 0,this)]},i.id,!0,void 0,this)}),h.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Remote servers are always available. Local servers must be running."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),h.jsxDEV(e6,{label:"Skills",children:g.length===0?h.jsxDEV("p",{className:"text-sm text-[#666]",children:"No skills configured. Add skills in the Skills page first."},void 0,!1,void 0,this):h.jsxDEV("div",{className:"space-y-2",children:[g.filter((i)=>i.enabled&&(i.project_id===null||i.project_id===Y.projectId)).map((i)=>h.jsxDEV("button",{type:"button",onClick:()=>e(i.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${K.skills.includes(i.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("span",{className:`text-sm font-medium ${K.skills.includes(i.id)?"text-[#f97316]":""}`,children:i.name},void 0,!1,void 0,this),i.project_id===null&&h.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs text-[#666]",children:i.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-xs px-2 py-0.5 rounded bg-[#222] text-[#666]",children:["v",i.version]},void 0,!0,void 0,this)]},i.id,!0,void 0,this)),h.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Skills provide reusable instructions for the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),w&&h.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${w.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:w.text},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:y0,disabled:!I0||A||!K.name,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:A?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&I0&&h.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),R&&V&&h.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[h.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Developer Info"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-2",children:[h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Agent ID"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.id},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Port"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:Y.port||"N/A"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex flex-col gap-1",children:[h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"API Key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>j(!x),className:"text-xs text-[#f97316] hover:text-[#fb923c]",children:x?"Hide":"Show"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),x&&h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888] break-all",children:V},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.status==="running"&&Y.port&&h.jsxDEV("div",{className:"flex flex-col gap-1 mt-2",children:[h.jsxDEV("span",{className:"text-xs text-[#666]",children:"Test with curl"},void 0,!1,void 0,this),h.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1.5 rounded text-[#666] break-all",children:['curl -H "X-API-Key: ',x?V:"***",'" http://localhost:',Y.port,"/config"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[h.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),P?h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{onClick:()=>M(!1),className:"flex-1 border border-[#333] hover:border-[#444] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:O,className:"flex-1 bg-red-500/20 text-red-400 hover:bg-red-500/30 px-4 py-2 rounded font-medium transition",children:"Confirm Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("button",{onClick:()=>M(!0),className:"w-full border border-red-500/30 text-red-400/70 hover:border-red-500/50 hover:text-red-400 px-4 py-2 rounded font-medium transition",children:"Delete Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function e6({label:Y,children:G}){return h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}var WO=B0(f1(),1);var k4=B0(U1(),1);function w3({agents:Y,loading:G,selectedAgent:U,providers:O,onSelectAgent:q,onCloseAgent:R,onToggleAgent:K,onDeleteAgent:_,onUpdateAgent:A,onNewAgent:b,canCreateAgent:P=!0}){let{currentProjectId:M,currentProject:w}=h4(),f=WO.useMemo(()=>{if(M===null)return Y;if(M==="unassigned")return Y.filter((m)=>!m.projectId);return Y.filter((m)=>m.projectId===M)},[Y,M]),v=M===null?"Agents":M==="unassigned"?"Unassigned Agents":w?.name||"Agents";return k4.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[k4.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[k4.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[k4.jsxDEV("div",{className:"flex items-center gap-3",children:[w&&k4.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),k4.jsxDEV("h1",{className:"text-xl font-semibold",children:v},void 0,!1,void 0,this),M!==null&&k4.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",f.length," agent",f.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&k4.jsxDEV("button",{onClick:b,disabled:!P,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G?k4.jsxDEV(wz,{message:"Loading agents..."},void 0,!1,void 0,this):f.length===0?k4.jsxDEV(dI,{onNewAgent:b,canCreateAgent:P,hasProjectFilter:M!==null},void 0,!1,void 0,this):k4.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3 auto-rows-fr",children:f.map((m)=>k4.jsxDEV(R3,{agent:m,selected:U?.id===m.id,onSelect:()=>q(m),onToggle:(g)=>K(m,g),showProject:M===null},m.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&k4.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:R},void 0,!1,void 0,this),U&&k4.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:k4.jsxDEV(M3,{agent:U,providers:O,onClose:R,onStartAgent:(m)=>K(U,m),onUpdateAgent:(m)=>A(U.id,m),onDeleteAgent:()=>_(U.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function dI({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:U}){return k4.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[U?k4.jsxDEV(k4.Fragment,{children:[k4.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),k4.jsxDEV("p",{className:"text-sm mt-1",children:"Create an agent or assign existing agents to this project"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):k4.jsxDEV(k4.Fragment,{children:[k4.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),k4.jsxDEV("p",{className:"text-sm mt-1",children:"Create your first agent to get started"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y&&k4.jsxDEV("button",{onClick:Y,disabled:!G,className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var l7=B0(f1(),1);var B1=B0(U1(),1);function P3({agents:Y,loading:G,runningCount:U,configuredProviders:O,onNavigate:q,onSelectAgent:R}){let{authFetch:K}=T1(),{currentProjectId:_}=h4(),{events:A}=F6(),[b,P]=l7.useState(null),[M,w]=l7.useState([]),[f,v]=l7.useState([]),m=l7.useMemo(()=>{if(!_)return Y;if(_==="unassigned")return Y.filter((p)=>!p.projectId);return Y.filter((p)=>p.projectId===_)},[Y,_]),g=l7.useMemo(()=>{return m.filter((p)=>p.status==="running").length},[m]),C=l7.useMemo(()=>{return new Set(m.map((p)=>p.id))},[m]),V=l7.useCallback(async()=>{try{let[p,s,a]=await Promise.all([K("/api/dashboard"),K("/api/tasks?status=all"),K("/api/telemetry/events?type=thread_activity&limit=20")]);if(p.ok){let D=await p.json();P(D)}if(s.ok){let D=await s.json();w((D.tasks||[]).slice(0,5))}if(a.ok){let D=await a.json();v(D.events||[])}}catch(p){console.error("Failed to fetch dashboard data:",p)}},[K]);l7.useEffect(()=>{V();let p=setInterval(V,1e4);return()=>clearInterval(p)},[V]);let k=l7.useMemo(()=>{if(!_)return M;return M.filter((p)=>C.has(p.agentId))},[M,_,C]),x=l7.useMemo(()=>{if(!_)return b?.tasks||{total:0,pending:0,running:0,completed:0};let p=k.length,s=k.filter((z0)=>z0.status==="pending").length,a=k.filter((z0)=>z0.status==="running").length,D=k.filter((z0)=>z0.status==="completed").length;return{total:p,pending:s,running:a,completed:D}},[b,_,k]),j=l7.useMemo(()=>{let p=A.filter((z0)=>z0.type==="thread_activity"),s=new Set(p.map((z0)=>z0.id)),a=[...p];for(let z0 of f)if(!s.has(z0.id))a.push(z0),s.add(z0.id);let D=a;if(_)D=a.filter((z0)=>C.has(z0.agent_id));return D.sort((z0,Q0)=>new Date(Q0.timestamp).getTime()-new Date(z0.timestamp).getTime()),D.slice(0,8)},[A,f,_,C]),u=l7.useMemo(()=>{let p=new Map;for(let s of Y)p.set(s.id,s.name);return p},[Y]);return B1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[B1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[B1.jsxDEV(F3,{label:"Agents",value:m.length,subValue:`${g} running`},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Tasks",value:x.total,subValue:`${x.pending} pending`},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Completed",value:x.completed,color:"text-green-400"},void 0,!1,void 0,this),B1.jsxDEV(F3,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[B1.jsxDEV(Z2,{title:"Agents",actionLabel:"View All",onAction:()=>q("agents"),children:G?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):m.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:m.slice(0,5).map((p)=>B1.jsxDEV(lI,{agent:p,onSelect:()=>R(p),showProject:!_},p.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),B1.jsxDEV(Z2,{title:"Activity",actionLabel:"Telemetry",onAction:()=>q("telemetry"),children:j.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[B1.jsxDEV("p",{children:"No activity yet"},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Agent activity will appear here in real-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:j.map((p)=>B1.jsxDEV(oI,{activity:p.data?.activity||"Working...",agentName:u.get(p.agent_id)||p.agent_id,timestamp:p.timestamp},p.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),B1.jsxDEV(Z2,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>q("tasks"),children:k.length===0?B1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[B1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:k.map((p)=>B1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[B1.jsxDEV("div",{className:"flex-1 min-w-0",children:[B1.jsxDEV("p",{className:"font-medium truncate",children:p.title},void 0,!1,void 0,this),B1.jsxDEV("p",{className:"text-sm text-[#666]",children:p.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV(aI,{status:p.status},void 0,!1,void 0,this)]},`${p.agentId}-${p.id}`,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function F3({label:Y,value:G,subValue:U,color:O}){return B1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[B1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),B1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),U&&B1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Z2({title:Y,actionLabel:G,onAction:U,children:O}){return B1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[B1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[B1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),B1.jsxDEV("button",{onClick:U,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O]},void 0,!0,void 0,this)}function lI({agent:Y,onSelect:G,showProject:U}){let{isActive:O}=vZ(Y.id),{projects:q}=h4(),R=Y.projectId?q.find((K)=>K.id===Y.projectId):null;return B1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[B1.jsxDEV("div",{className:"flex-1 min-w-0",children:[B1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),B1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[B1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),U&&R&&B1.jsxDEV(B1.Fragment,{children:[B1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),B1.jsxDEV("span",{className:"flex items-center gap-1",children:[B1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}},void 0,!1,void 0,this),R.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),B1.jsxDEV("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Y.status==="running"?O?"bg-green-400 animate-pulse":"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iI(Y){let G=Math.floor((Date.now()-new Date(Y).getTime())/1000);if(G<5)return"just now";if(G<60)return`${G}s ago`;let U=Math.floor(G/60);if(U<60)return`${U}m ago`;let O=Math.floor(U/60);if(O<24)return`${O}h ago`;return`${Math.floor(O/24)}d ago`}function oI({activity:Y,agentName:G,timestamp:U}){return B1.jsxDEV("div",{className:"px-4 py-3",children:[B1.jsxDEV("p",{className:"text-sm truncate",children:Y},void 0,!1,void 0,this),B1.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#555] mt-1",children:[B1.jsxDEV("span",{className:"text-[#666]",children:G},void 0,!1,void 0,this),B1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),B1.jsxDEV("span",{children:iI(U)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aI({status:Y}){let G={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return B1.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${G[Y]||G.pending}`,children:Y},void 0,!1,void 0,this)}var J5=B0(f1(),1);var L0=B0(U1(),1);function b3({onSelectAgent:Y}){let{authFetch:G}=T1(),[U,O]=J5.useState([]),[q,R]=J5.useState(!0),[K,_]=J5.useState("all"),[A,b]=J5.useState(null),[P,M]=J5.useState(!1),w=J5.useRef(null),{events:f}=DG({category:"TASK"}),v=J5.useCallback(async()=>{try{let k=await(await G(`/api/tasks?status=${K}`)).json();O(k.tasks||[])}catch(V){console.error("Failed to fetch tasks:",V)}finally{R(!1)}},[G,K]);J5.useEffect(()=>{v()},[v]),J5.useEffect(()=>{if(!f.length)return;let V=f[0];if(!V||V.id===w.current)return;let k=V.type;if(k==="task_created"||k==="task_updated"||k==="task_deleted")w.current=V.id,console.log("[TasksPage] Telemetry event:",k),v()},[f,v]);let m=J5.useCallback(async(V)=>{b(V),M(!0);try{let k=await G(`/api/tasks/${V.agentId}/${V.id}`);if(console.log("[TasksPage] Fetch task response status:",k.status),k.ok){let x=await k.json();if(console.log("[TasksPage] Task data:",x),console.log("[TasksPage] Has trajectory:",!!x.task?.trajectory,"Length:",x.task?.trajectory?.length),x.task)b({...x.task,agentId:V.agentId,agentName:V.agentName})}else console.error("[TasksPage] Failed to fetch task:",k.status,await k.text())}catch(k){console.error("Failed to fetch task details:",k)}finally{M(!1)}},[G]),g={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return L0.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[L0.jsxDEV("div",{className:`flex-1 p-4 md:p-6 overflow-auto ${A?"hidden md:block md:w-1/2 lg:w-2/3":""}`,children:L0.jsxDEV("div",{className:"max-w-4xl",children:[L0.jsxDEV("div",{className:"mb-6",children:[L0.jsxDEV("div",{className:"mb-4",children:[L0.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-1",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((V)=>L0.jsxDEV("button",{onClick:()=>_(V.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${K===V.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:V.label},V.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q?L0.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):U.length===0?L0.jsxDEV("div",{className:"text-center py-12",children:[L0.jsxDEV(m5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L0.jsxDEV("div",{className:"space-y-3",children:U.map((V)=>L0.jsxDEV("div",{onClick:()=>m(V),className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${A?.id===V.id&&A?.agentId===V.agentId?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[L0.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[L0.jsxDEV("div",{className:"flex-1",children:[L0.jsxDEV("h3",{className:"font-medium",children:V.title},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#666]",children:[V.agentName,V.execute_at&&L0.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(V.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${g[V.status]||g.pending}`,children:V.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V.description&&L0.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:V.description},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[L0.jsxDEV("span",{children:["Type: ",V.type]},void 0,!0,void 0,this),L0.jsxDEV("span",{children:["Priority: ",V.priority]},void 0,!0,void 0,this),V.recurrence&&L0.jsxDEV("span",{children:["Recurrence: ",V.recurrence]},void 0,!0,void 0,this),L0.jsxDEV("span",{children:["Created: ",new Date(V.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${V.agentId}-${V.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),A&&L0.jsxDEV(nI,{task:A,statusColors:g,onClose:()=>b(null),onSelectAgent:Y,loading:P},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nI({task:Y,statusColors:G,onClose:U,onSelectAgent:O,loading:q}){return L0.jsxDEV("div",{className:"w-full md:w-1/2 lg:w-1/3 border-l border-[#1a1a1a] bg-[#0a0a0a] flex flex-col overflow-hidden",children:[L0.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-[#1a1a1a]",children:[L0.jsxDEV("h2",{className:"font-medium truncate pr-2",children:"Task Details"},void 0,!1,void 0,this),L0.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition",children:L0.jsxDEV(D5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[L0.jsxDEV("div",{children:[L0.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[L0.jsxDEV("h3",{className:"text-lg font-medium",children:Y.title},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium flex-shrink-0 ${G[Y.status]}`,children:Y.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("button",{onClick:()=>O?.(Y.agentId),className:"text-sm text-[#f97316] hover:underline",children:Y.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.description&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-1",children:"Description"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"text-sm text-[#888] whitespace-pre-wrap",children:Y.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Type"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"capitalize",children:Y.type},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Priority"},void 0,!1,void 0,this),L0.jsxDEV("p",{children:Y.priority},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Source"},void 0,!1,void 0,this),L0.jsxDEV("p",{className:"capitalize",children:Y.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.recurrence&&L0.jsxDEV("div",{children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Recurrence"},void 0,!1,void 0,this),L0.jsxDEV("p",{children:Y.recurrence},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("div",{className:"space-y-2 text-sm",children:[L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Created"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.execute_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Scheduled"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.execute_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.executed_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Started"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.executed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.completed_at&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Completed"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.completed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.next_run&&L0.jsxDEV("div",{className:"flex justify-between",children:[L0.jsxDEV("span",{className:"text-[#666]",children:"Next Run"},void 0,!1,void 0,this),L0.jsxDEV("span",{children:new Date(Y.next_run).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.status==="failed"&&Y.error&&L0.jsxDEV("div",{className:"min-w-0",children:[L0.jsxDEV("h4",{className:"text-xs text-red-400 uppercase tracking-wider mb-1",children:"Error"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/20 rounded p-3 overflow-x-auto",children:L0.jsxDEV("pre",{className:"text-sm text-red-400 whitespace-pre-wrap break-words",children:Y.error},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.status==="completed"&&Y.result&&L0.jsxDEV("div",{className:"min-w-0",children:[L0.jsxDEV("h4",{className:"text-xs text-green-400 uppercase tracking-wider mb-1",children:"Result"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/20 rounded p-3 overflow-x-auto",children:L0.jsxDEV("pre",{className:"text-sm text-green-400 whitespace-pre-wrap break-words",children:typeof Y.result==="string"?Y.result:JSON.stringify(Y.result,null,2)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&!Y.trajectory&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:"Trajectory"},void 0,!1,void 0,this),L0.jsxDEV("div",{className:"text-sm text-[#555]",children:"Loading trajectory..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.trajectory&&Y.trajectory.length>0&&L0.jsxDEV("div",{children:[L0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:["Trajectory (",Y.trajectory.length," steps)"]},void 0,!0,void 0,this),L0.jsxDEV(rI,{trajectory:Y.trajectory},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function rI({trajectory:Y}){let[G,U]=J5.useState(new Set),O=(K)=>{U((_)=>{let A=new Set(_);if(A.has(K))A.delete(K);else A.add(K);return A})},q={user:{bg:"bg-blue-500/10",text:"text-blue-400",icon:"\uD83D\uDC64",label:"User"},assistant:{bg:"bg-purple-500/10",text:"text-purple-400",icon:"\uD83E\uDD16",label:"Assistant"}},R=(K)=>{let _=K.content;if(typeof _==="string"){let A=_.length>200,b=G.has(K.id);return L0.jsxDEV("div",{children:[L0.jsxDEV("p",{className:`text-sm text-[#ccc] whitespace-pre-wrap break-words ${!b&&A?"line-clamp-4":""}`,children:_},void 0,!1,void 0,this),A&&L0.jsxDEV("button",{onClick:()=>O(K.id),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:b?"Show less":"Show more..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return L0.jsxDEV("div",{className:"space-y-2",children:_.map((A,b)=>{if(A.type==="tool_use"){let P=JSON.stringify(A.input,null,2),M=P.length>150,w=`${K.id}-${b}`,f=G.has(w);return L0.jsxDEV("div",{className:"bg-orange-500/10 border border-orange-500/20 rounded p-2",children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[L0.jsxDEV("span",{className:"text-orange-400",children:"\uD83D\uDD27"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:"text-xs font-medium text-orange-400",children:"Tool Call"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:"text-xs text-[#888]",children:A.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto ${!f&&M?"line-clamp-3":""}`,children:P},void 0,!1,void 0,this),M&&L0.jsxDEV("button",{onClick:()=>O(w),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:f?"Show less":"Show more..."},void 0,!1,void 0,this)]},b,!0,void 0,this)}if(A.type==="tool_result"){let P=A.is_error,M=`${K.id}-${b}`,w=G.has(M),f=A.content.length>150;return L0.jsxDEV("div",{className:`${P?"bg-red-500/10 border-red-500/20":"bg-teal-500/10 border-teal-500/20"} border rounded p-2`,children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[L0.jsxDEV("span",{children:P?"❌":"\uD83D\uDCCB"},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`text-xs font-medium ${P?"text-red-400":"text-teal-400"}`,children:"Tool Result"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L0.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto whitespace-pre-wrap break-words ${!w&&f?"line-clamp-3":""}`,children:A.content},void 0,!1,void 0,this),f&&L0.jsxDEV("button",{onClick:()=>O(M),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:w?"Show less":"Show more..."},void 0,!1,void 0,this)]},b,!0,void 0,this)}return null})},void 0,!1,void 0,this)};return L0.jsxDEV("div",{className:"space-y-2",children:Y.map((K)=>{let _=q[K.role]||q.assistant;return L0.jsxDEV("div",{className:`${_.bg} border border-[#1a1a1a] rounded overflow-hidden p-3`,children:[L0.jsxDEV("div",{className:"flex items-center gap-2 mb-2",children:[L0.jsxDEV("span",{children:_.icon},void 0,!1,void 0,this),L0.jsxDEV("span",{className:`text-xs font-medium ${_.text}`,children:_.label},void 0,!1,void 0,this),K.model&&L0.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",K.model]},void 0,!0,void 0,this),L0.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",new Date(K.created_at).toLocaleTimeString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R(K)]},K.id,!0,void 0,this)})},void 0,!1,void 0,this)}var i0=B0(f1(),1);var r4=B0(f1(),1);var F0=B0(U1(),1);function J2(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="API_KEY")}function OO(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="OAUTH2")}function tI(Y){return J2(Y)&&OO(Y)}function Y2({providerId:Y="composio",projectId:G,onConnectionComplete:U}){let{authFetch:O}=T1(),[q,R]=r4.useState([]),[K,_]=r4.useState([]),[A,b]=r4.useState(!0),[P,M]=r4.useState(""),[w,f]=r4.useState(null),[v,m]=r4.useState(null),[g,C]=r4.useState(null),[V,k]=r4.useState(null),[x,j]=r4.useState(null),[u,p]=r4.useState(""),[s,a]=r4.useState(null),[D,z0]=r4.useState(""),[Q0,U0]=r4.useState(!1),[b0,e]=r4.useState(null),[y0,I0]=r4.useState(null),i=r4.useCallback(async()=>{b(!0),C(null);let A0=G&&G!=="unassigned"?`?project_id=${G}`:"";try{let[Y1,h1]=await Promise.all([O(`/api/integrations/${Y}/apps${A0}`),O(`/api/integrations/${Y}/connected${A0}`)]),l1=await Y1.json(),r1=await h1.json();R(l1.apps||[]),_(r1.accounts||[])}catch(Y1){console.error("Failed to fetch integrations:",Y1),C("Failed to load integrations")}b(!1)},[O,Y,G]);r4.useEffect(()=>{i()},[i]),r4.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),i(),U?.()},[i,U]),r4.useEffect(()=>{if(!v?.connectionId)return;let A0=G&&G!=="unassigned"?`?project_id=${G}`:"",Y1=setInterval(async()=>{try{let l1=await(await O(`/api/integrations/${Y}/connection/${v.connectionId}${A0}`)).json();if(l1.connection?.status==="active")m(null),f(null),i(),U?.();else if(l1.connection?.status==="failed")m(null),f(null),C(`Connection to ${v.appSlug} failed`)}catch(h1){}},2000);return()=>clearInterval(Y1)},[v,O,Y,G,i,U]);let R0=async(A0,Y1,h1)=>{if(tI(A0)&&!Y1&&!h1){k({app:A0});return}if(J2(A0)&&!Y1&&!h1){j({app:A0}),p("");return}f(A0.slug),C(null);try{let l1={appSlug:A0.slug};if(Y1)l1.credentials={authScheme:"API_KEY",apiKey:Y1};let r1=G&&G!=="unassigned"?`?project_id=${G}`:"",O1=await O(`/api/integrations/${Y}/connect${r1}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l1)}),w0=await O1.json();if(!O1.ok){C(w0.error||"Failed to initiate connection"),f(null),j(null);return}if(w0.status==="active"||!w0.redirectUrl){f(null),j(null),i(),U?.();return}if(w0.redirectUrl){m({appSlug:A0.slug,connectionId:w0.connectionId});let Q1=window.open(w0.redirectUrl,`connect-${A0.slug}`,"width=600,height=700,left=200,top=100");if(!Q1||Q1.closed)window.location.href=w0.redirectUrl}}catch(l1){C(`Failed to connect: ${l1}`),f(null),j(null)}},O0=(A0)=>{if(A0.preventDefault(),!x||!u.trim())return;R0(x.app,u.trim())},q0=async(A0)=>{let Y1=G&&G!=="unassigned"?`?project_id=${G}`:"";try{let h1=await O(`/api/integrations/${Y}/connection/${A0.id}${Y1}`,{method:"DELETE"});if(h1.ok)i();else{let l1=await h1.json();C(l1.error||"Failed to disconnect")}}catch(h1){C(`Failed to disconnect: ${h1}`)}},o=(A0)=>{a({app:A0}),z0(`${A0.name} MCP`),e(null)},T0=async()=>{if(!s||!D.trim())return;U0(!0),C(null);try{let A0=G&&G!=="unassigned"?`?project_id=${G}`:"",Y1=await O(`/api/integrations/${Y}/configs${A0}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:s.app.slug})}),h1=await Y1.json();if(!Y1.ok){C(h1.error||"Failed to create MCP config"),U0(!1);return}e(D),U?.()}catch(A0){C(`Failed to create MCP config: ${A0}`)}finally{U0(!1)}},v0=(A0)=>{I0({message:`Disconnect ${A0.appName}?`,onConfirm:()=>{q0(A0),I0(null)}})},X1=(A0)=>{return K.some((Y1)=>Y1.appId===A0&&Y1.status==="active")},r0=(A0)=>{return K.find((Y1)=>Y1.appId===A0)},f0=q.filter((A0)=>{if(!P)return!0;let Y1=P.toLowerCase();return A0.name.toLowerCase().includes(Y1)||A0.slug.toLowerCase().includes(Y1)||A0.description?.toLowerCase().includes(Y1)||A0.categories.some((h1)=>h1.toLowerCase().includes(Y1))}),o0=f0.filter((A0)=>X1(A0.slug)),J1=f0.filter((A0)=>!X1(A0.slug));if(A)return F0.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading apps..."},void 0,!1,void 0,this);return F0.jsxDEV("div",{className:"space-y-6",children:[V&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[V.app.logo&&F0.jsxDEV("img",{src:V.app.logo,alt:V.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:["Connect ",V.app.name]},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Choose how to authenticate"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"space-y-3",children:[F0.jsxDEV("button",{onClick:()=>{k(null),j({app:V.app}),p("")},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[F0.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Enter your ",V.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>{k(null),R0(V.app,void 0,!0)},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[F0.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Sign in with your ",V.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>k(null),className:"w-full text-sm text-[#666] hover:text-white mt-4 py-2 transition",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),x&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[x.app.logo&&F0.jsxDEV("img",{src:x.app.logo,alt:x.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:["Connect ",x.app.name]},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your API key to connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("form",{onSubmit:O0,children:[F0.jsxDEV("input",{type:"password",value:u,onChange:(A0)=>p(A0.target.value),placeholder:"Enter API Key...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{type:"button",onClick:()=>j(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{type:"submit",disabled:!u.trim()||w===x.app.slug,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:w===x.app.slug?"Connecting...":"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),s&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:b0?F0.jsxDEV(F0.Fragment,{children:[F0.jsxDEV("div",{className:"text-center mb-4",children:[F0.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:F0.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-sm text-[#888] mt-2",children:['"',b0,'" has been created successfully.']},void 0,!0,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"You can now add it to your agents from the MCP Configs tab."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("button",{onClick:()=>{a(null),e(null)},className:"w-full text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV(F0.Fragment,{children:[F0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[s.app.logo&&F0.jsxDEV("img",{src:s.app.logo,alt:s.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-xs text-[#666]",children:["Create an MCP config for ",s.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("form",{onSubmit:(A0)=>{A0.preventDefault(),T0()},children:[F0.jsxDEV("label",{className:"block text-xs text-[#888] mb-1",children:"Config Name"},void 0,!1,void 0,this),F0.jsxDEV("input",{type:"text",value:D,onChange:(A0)=>z0(A0.target.value),placeholder:"Enter config name...",className:"w-full bg-[#0a0a0a] border border-[#333] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[#f97316]",autoFocus:!0,maxLength:30},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{type:"button",onClick:()=>a(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{type:"submit",disabled:!D.trim()||Q0,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:Q0?"Creating...":"Create Config"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),y0&&F0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:F0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm mx-4",children:[F0.jsxDEV("p",{className:"text-center mb-4",children:y0.message},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex gap-2",children:[F0.jsxDEV("button",{onClick:()=>I0(null),className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),F0.jsxDEV("button",{onClick:y0.onConfirm,className:"flex-1 text-sm bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded transition",children:"Confirm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),g&&F0.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center justify-between",children:[F0.jsxDEV("span",{children:g},void 0,!1,void 0,this),F0.jsxDEV("button",{onClick:()=>C(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v&&F0.jsxDEV("div",{className:"text-yellow-400 text-sm p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg flex items-center gap-2",children:[F0.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),F0.jsxDEV("span",{children:["Waiting for ",v.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{children:F0.jsxDEV("input",{type:"text",value:P,onChange:(A0)=>M(A0.target.value),placeholder:"Search apps...",className:"w-full bg-[#111] border border-[#333] rounded-lg px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),o0.length>0&&F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Connected (",o0.length,")"]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:o0.map((A0)=>F0.jsxDEV(KO,{app:A0,connection:r0(A0.slug),onConnect:()=>R0(A0),onDisconnect:()=>{let Y1=r0(A0.slug);if(Y1)v0(Y1)},onCreateMcpConfig:()=>o(A0),connecting:w===A0.slug},A0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{children:[F0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Available Apps (",J1.length,")"]},void 0,!0,void 0,this),J1.length===0?F0.jsxDEV("p",{className:"text-[#666] text-sm",children:P?"No apps match your search":"No apps available"},void 0,!1,void 0,this):F0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J1.slice(0,50).map((A0)=>F0.jsxDEV(KO,{app:A0,onConnect:()=>R0(A0),connecting:w===A0.slug},A0.id,!1,void 0,this))},void 0,!1,void 0,this),J1.length>50&&F0.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 50 of ",J1.length," apps. Use search to find more."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function KO({app:Y,connection:G,onConnect:U,onDisconnect:O,onCreateMcpConfig:q,connecting:R}){let K=G?.status==="active",_=J2(Y),A=OO(Y),b=_&&A;return F0.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition ${K?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[F0.jsxDEV("div",{className:"flex items-start gap-3",children:[F0.jsxDEV("div",{className:"w-10 h-10 rounded bg-[#1a1a1a] flex items-center justify-center flex-shrink-0 overflow-hidden",children:Y.logo?F0.jsxDEV("img",{src:Y.logo,alt:Y.name,className:"w-8 h-8 object-contain",onError:(P)=>{P.target.style.display="none"}},void 0,!1,void 0,this):F0.jsxDEV("span",{className:"text-lg",children:Y.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex-1 min-w-0",children:[F0.jsxDEV("div",{className:"flex items-center gap-2",children:[F0.jsxDEV("h4",{className:"font-medium text-sm truncate",children:Y.name},void 0,!1,void 0,this),K&&F0.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!K&&_&&!A&&F0.jsxDEV("span",{className:"text-[10px] bg-[#222] text-[#888] px-1.5 py-0.5 rounded",title:"Requires API Key",children:"API Key"},void 0,!1,void 0,this),!K&&b&&F0.jsxDEV("span",{className:"text-[10px] bg-[#1a2a1a] text-[#6a6] px-1.5 py-0.5 rounded",title:"Supports API Key or OAuth",children:"API Key / OAuth"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.description&&F0.jsxDEV("p",{className:"text-xs text-[#666] line-clamp-2 mt-0.5",children:Y.description},void 0,!1,void 0,this),Y.categories.length>0&&F0.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:Y.categories.slice(0,2).map((P)=>F0.jsxDEV("span",{className:"text-[10px] bg-[#1a1a1a] text-[#555] px-1.5 py-0.5 rounded",children:P},P,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"mt-3 flex gap-2",children:K?F0.jsxDEV(F0.Fragment,{children:[q&&F0.jsxDEV("button",{onClick:q,className:"flex-1 text-xs bg-[#1a2a1a] hover:bg-[#1a3a1a] border border-green-500/30 hover:border-green-500/50 text-green-400 px-3 py-1.5 rounded transition",children:"Create MCP Config"},void 0,!1,void 0,this),O&&F0.jsxDEV("button",{onClick:O,className:"text-xs text-[#666] hover:text-red-400 transition px-2",title:"Disconnect",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV("button",{onClick:U,disabled:R,className:"w-full text-xs bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:R?"Connecting...":_&&!A?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var N=B0(U1(),1);function A3(){let{authFetch:Y}=T1(),{projects:G,currentProjectId:U}=h4(),[O,q]=i0.useState([]),[R,K]=i0.useState(!0),[_,A]=i0.useState(!1),[b,P]=i0.useState(null),[M,w]=i0.useState(null),[f,v]=i0.useState("servers"),{confirm:m,ConfirmDialog:g}=A5(),C=G.length>0,V=async()=>{try{let D=await(await Y("/api/mcp/servers")).json();q(D.servers||[])}catch(a){console.error("Failed to fetch MCP servers:",a)}K(!1)};i0.useEffect(()=>{V()},[Y]);let k=O.filter((a)=>{if(!U)return!0;if(U==="unassigned")return a.project_id===null;return a.project_id===null||a.project_id===U}),x=async(a)=>{try{await Y(`/api/mcp/servers/${a}/start`,{method:"POST"}),V()}catch(D){console.error("Failed to start server:",D)}},j=async(a)=>{try{await Y(`/api/mcp/servers/${a}/stop`,{method:"POST"}),V()}catch(D){console.error("Failed to stop server:",D)}},u=async(a)=>{if(!await m("Delete this MCP server?",{confirmText:"Delete",title:"Delete Server"}))return;try{if(await Y(`/api/mcp/servers/${a}`,{method:"DELETE"}),M?.id===a)w(null);V()}catch(z0){console.error("Failed to delete server:",z0)}},p=async(a,D)=>{try{await Y(`/api/mcp/servers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D})}),V()}catch(z0){console.error("Failed to rename server:",z0)}},s=async(a,D)=>{try{await Y(`/api/mcp/servers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),V()}catch(z0){throw console.error("Failed to update server:",z0),z0}};return N.jsxDEV(N.Fragment,{children:[g,N.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[N.jsxDEV("div",{className:"max-w-6xl",children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[N.jsxDEV("div",{children:[N.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-[#666]",children:"Manage Model Context Protocol servers for tool integrations."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),f==="servers"&&N.jsxDEV("button",{onClick:()=>A(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[N.jsxDEV("button",{onClick:()=>v("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${f==="registry"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),f==="servers"&&N.jsxDEV(N.Fragment,{children:[R&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!R&&k.length===0&&O.length===0&&N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[N.jsxDEV(E5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),N.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"MCP servers extend your agents with tools like file access, web browsing, database connections, and more."},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex gap-3 justify-center",children:[N.jsxDEV("button",{onClick:()=>A(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Add Manually"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>v("registry"),className:"border border-[#333] hover:border-[#666] px-4 py-2 rounded font-medium transition",children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!R&&k.length===0&&O.length>0&&N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:N.jsxDEV("p",{className:"text-[#666]",children:"No servers match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this),!R&&k.length>0&&N.jsxDEV("div",{className:"flex gap-6",children:[N.jsxDEV("div",{className:`space-y-3 ${M?"w-1/2":"w-full"}`,children:k.map((a)=>{let z0=a.type==="http"&&a.url||a.status==="running",Q0=C&&a.project_id?G.find((U0)=>U0.id===a.project_id):null;return N.jsxDEV(sI,{server:a,project:Q0,selected:M?.id===a.id,onSelect:()=>w(z0?a:null),onStart:()=>x(a.id),onStop:()=>j(a.id),onDelete:()=>u(a.id),onEdit:()=>P(a)},a.id,!1,void 0,this)})},void 0,!1,void 0,this),M&&N.jsxDEV("div",{className:"w-1/2",children:N.jsxDEV(eI,{server:M,onClose:()=>w(null)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),f==="hosted"&&N.jsxDEV(XT,{onServerAdded:V,projectId:U},void 0,!1,void 0,this),f==="registry"&&N.jsxDEV(QT,{onInstall:(a)=>{V(),v("servers")}},void 0,!1,void 0,this),f==="servers"&&N.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[N.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Add an MCP server by providing its npm package name. For example:"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"}].map((a)=>N.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:a.pkg},a.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&N.jsxDEV(YT,{onClose:()=>A(!1),onAdded:()=>{A(!1),V()},projects:C?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),b&&N.jsxDEV($T,{server:b,projects:C?G:void 0,onClose:()=>P(null),onSaved:()=>{P(null),V()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function sI({server:Y,project:G,selected:U,onSelect:O,onStart:q,onStop:R,onDelete:K,onEdit:_}){let A=Y.type==="http"&&Y.url,b=A||Y.status==="running",P=()=>{if(A)return`${Y.source||"remote"} • http`;return`${Y.type} • ${Y.package||Y.command||"custom"}${Y.status==="running"&&Y.port?` • :${Y.port}`:""}`},M=()=>{if(G)return N.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return N.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:b?O:void 0,children:N.jsxDEV("div",{className:"flex items-center justify-between",children:[N.jsxDEV("div",{className:"flex items-center gap-3",children:[N.jsxDEV("div",{className:`w-2 h-2 rounded-full ${b?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),M()]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666]",children:P()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),_()},className:"text-sm text-[#666] hover:text-[#888] px-3 py-1 transition",title:"Edit server settings",children:"Edit"},void 0,!1,void 0,this),A?N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Remove"},void 0,!1,void 0,this):Y.status==="running"?N.jsxDEV(N.Fragment,{children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),O()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),R()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV(N.Fragment,{children:[N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),q()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:(w)=>{w.stopPropagation(),K()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function eI({server:Y,onClose:G}){let{authFetch:U}=T1(),[O,q]=i0.useState([]),[R,K]=i0.useState(null),[_,A]=i0.useState(!0),[b,P]=i0.useState(null),[M,w]=i0.useState(null);return i0.useEffect(()=>{(async()=>{A(!0),P(null);try{let v=await U(`/api/mcp/servers/${Y.id}/tools`),m=await v.json();if(!v.ok){P(m.error||"Failed to fetch tools");return}q(m.tools||[]),K(m.serverInfo||null)}catch(v){P(`Failed to fetch tools: ${v}`)}finally{A(!1)}})()},[Y.id,U]),N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[N.jsxDEV("div",{children:[N.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),R&&N.jsxDEV("p",{className:"text-xs text-[#666]",children:[R.name," v",R.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("button",{onClick:G,className:"text-[#666] hover:text-[#888] text-xl leading-none",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[_&&N.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),b&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:b},void 0,!1,void 0,this),!_&&!b&&O.length===0&&N.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!_&&!b&&O.length>0&&!M&&N.jsxDEV("div",{className:"space-y-2",children:O.map((f)=>N.jsxDEV("button",{onClick:()=>w(f),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[N.jsxDEV("div",{className:"font-medium text-sm",children:f.name},void 0,!1,void 0,this),f.description&&N.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:f.description},void 0,!1,void 0,this)]},f.name,!0,void 0,this))},void 0,!1,void 0,this),M&&N.jsxDEV(zT,{serverId:Y.id,tool:M,onBack:()=>w(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function zT({serverId:Y,tool:G,onBack:U}){let{authFetch:O}=T1(),[q,R]=i0.useState("{}"),[K,_]=i0.useState(null),[A,b]=i0.useState(null),[P,M]=i0.useState(!1);i0.useEffect(()=>{let f=G.inputSchema;if(f&&typeof f==="object"&&"properties"in f){let v=f.properties,m={};for(let[g,C]of Object.entries(v))if(C.default!==void 0)m[g]=C.default;else if(C.type==="string")m[g]="";else if(C.type==="number"||C.type==="integer")m[g]=0;else if(C.type==="boolean")m[g]=!1;else if(C.type==="array")m[g]=[];else if(C.type==="object")m[g]={};R(JSON.stringify(m,null,2))}},[G]);let w=async()=>{M(!0),b(null),_(null);try{let f=JSON.parse(q),v=await O(`/api/mcp/servers/${Y}/tools/${encodeURIComponent(G.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:f})}),m=await v.json();if(!v.ok){b(m.error||"Failed to call tool");return}_(m.result)}catch(f){b(`Error: ${f}`)}finally{M(!1)}};return N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),N.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&N.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&N.jsxDEV("div",{className:"text-xs",children:N.jsxDEV("details",{className:"cursor-pointer",children:[N.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),N.jsxDEV("pre",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-[#888] overflow-auto max-h-32",children:JSON.stringify(G.inputSchema,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),N.jsxDEV("textarea",{value:q,onChange:(f)=>R(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 h-32 font-mono text-sm focus:outline-none focus:border-[#f97316] resize-none",placeholder:"{}"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("button",{onClick:w,disabled:P,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:P?"Calling...":"Call Tool"},void 0,!1,void 0,this),A&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:A},void 0,!1,void 0,this),K&&N.jsxDEV("div",{className:"space-y-2",children:[N.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",K.isError&&N.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:`p-3 rounded text-sm ${K.isError?"bg-red-500/10":"bg-green-500/10"}`,children:K.content.map((f,v)=>N.jsxDEV("div",{className:"mb-2 last:mb-0",children:[f.type==="text"&&N.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:f.text},void 0,!1,void 0,this),f.type==="image"&&f.data&&N.jsxDEV("img",{src:`data:${f.mimeType||"image/png"};base64,${f.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},v,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function QT({onInstall:Y}){let{authFetch:G}=T1(),[U,O]=i0.useState(""),[q,R]=i0.useState([]),[K,_]=i0.useState(!1),[A,b]=i0.useState(!1),[P,M]=i0.useState(null),[w,f]=i0.useState(null),v=async(C)=>{_(!0),f(null);try{let V=await G(`/api/mcp/registry?search=${encodeURIComponent(C)}&limit=20`),k=await V.json();if(!V.ok)f(k.error||"Failed to search registry"),R([]);else R(k.servers||[])}catch(V){f(`Failed to search: ${V}`),R([])}finally{_(!1),b(!0)}},m=(C)=>{if(C.preventDefault(),U.trim())v(U.trim())};i0.useEffect(()=>{v("")},[]);let g=async(C)=>{if(!C.npmPackage){f("This server does not have an npm package");return}M(C.id),f(null);try{let V=await G("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.name,type:"npm",package:C.npmPackage})});if(!V.ok){let k=await V.json();f(k.error||"Failed to add server");return}Y(C)}catch(V){f(`Failed to add server: ${V}`)}finally{M(null)}};return N.jsxDEV("div",{className:"space-y-6",children:[N.jsxDEV("form",{onSubmit:m,className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:U,onChange:(C)=>O(C.target.value),placeholder:"Search MCP servers (e.g., filesystem, github, slack...)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{type:"submit",disabled:K,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:K?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&N.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:w},void 0,!1,void 0,this),!K&&A&&q.length===0&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),q.length>0&&N.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:q.map((C)=>N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:N.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("h3",{className:"font-medium truncate",children:C.name},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:C.description||"No description"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[C.version&&N.jsxDEV("span",{children:["v",C.version]},void 0,!0,void 0,this),N.jsxDEV("span",{className:`px-1.5 py-0.5 rounded ${C.npmPackage?"bg-green-500/10 text-green-400":"bg-blue-500/10 text-blue-400"}`,children:C.npmPackage?"npm":"remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("code",{className:"text-xs text-[#555] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:C.npmPackage||C.fullName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex-shrink-0",children:C.npmPackage?N.jsxDEV("button",{onClick:()=>g(C),disabled:P===C.id,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:P===C.id?"Adding...":"Add"},void 0,!1,void 0,this):C.repository?N.jsxDEV("a",{href:C.repository,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#666] hover:text-[#f97316] transition",children:"View →"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},C.id,!1,void 0,this))},void 0,!1,void 0,this),K&&N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),N.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:N.jsxDEV("p",{children:["Servers are sourced from the"," ",N.jsxDEV("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"official MCP registry"},void 0,!1,void 0,this),". Not all servers have npm packages - some require manual setup."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function XT({onServerAdded:Y,projectId:G}){let{authFetch:U}=T1(),[O,q]=i0.useState("composio"),[R,K]=i0.useState("configs"),[_,A]=i0.useState(!1),[b,P]=i0.useState(!1),[M,w]=i0.useState(!1),[f,v]=i0.useState([]),[m,g]=i0.useState(new Set),[C,V]=i0.useState(!0),[k,x]=i0.useState(!1),[j,u]=i0.useState(null),{alert:p,AlertDialog:s}=fZ(),a=async()=>{try{let[e,y0]=await Promise.all([U("/api/providers"),U("/api/mcp/servers")]),I0=await e.json(),i=await y0.json(),R0=I0.providers||[],O0=i.servers||[],q0=new Set(O0.filter((o0)=>o0.source==="composio"&&o0.url).map((o0)=>{let J1=o0.url.match(/\/v3\/mcp\/([^/]+)/);return J1?J1[1]:null}).filter(Boolean));g(q0);let o=R0.find((o0)=>o0.id==="composio"),T0=R0.find((o0)=>o0.id==="smithery"),v0=R0.find((o0)=>o0.id==="agentdojo"),X1=o?.hasKey||!1,r0=T0?.hasKey||!1,f0=v0?.hasKey||!1;if(A(X1),P(r0),w(f0),X1)q("composio"),D();else if(r0)q("smithery");else if(f0)q("agentdojo")}catch(e){console.error("Failed to fetch providers:",e)}V(!1)},D=async()=>{x(!0);try{let e=G&&G!=="unassigned"?`?project_id=${G}`:"",I0=await(await U(`/api/integrations/composio/configs${e}`)).json();v(I0.configs||[])}catch(e){console.error("Failed to fetch Composio configs:",e)}x(!1)},z0=async(e)=>{u(e);try{let y0=G&&G!=="unassigned"?`?project_id=${G}`:"",I0=await U(`/api/integrations/composio/configs/${e}/add${y0}`,{method:"POST"});if(I0.ok)g((i)=>new Set([...i,e])),Y?.();else{let i=await I0.json();await p(i.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(y0){console.error("Failed to add config:",y0)}u(null)},Q0=(e)=>{return m.has(e)};if(i0.useEffect(()=>{a()},[U]),C)return N.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);let U0=_||b||M,b0=[_,b,M].filter(Boolean).length;if(!U0)return N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[N.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect Composio, Smithery, or AgentDojo in Settings to access cloud-based MCP servers."},void 0,!1,void 0,this),N.jsxDEV("a",{href:"/settings",className:"inline-block bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded text-sm font-medium transition",children:"Go to Settings →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return N.jsxDEV(N.Fragment,{children:[s,N.jsxDEV("div",{className:"space-y-6",children:[b0>1&&N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1 w-fit",children:[_&&N.jsxDEV("button",{onClick:()=>{q("composio"),K("configs")},className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="composio"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-purple-500"},void 0,!1,void 0,this),"Composio"]},void 0,!0,void 0,this),b&&N.jsxDEV("button",{onClick:()=>q("smithery"),className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="smithery"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-blue-500"},void 0,!1,void 0,this),"Smithery"]},void 0,!0,void 0,this),M&&N.jsxDEV("button",{onClick:()=>q("agentdojo"),className:`px-4 py-2 rounded text-sm font-medium transition flex items-center gap-2 ${O==="agentdojo"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-500"},void 0,!1,void 0,this),"AgentDojo"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&(b0===1||O==="composio")&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{className:"flex items-center justify-between",children:[N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1",children:[N.jsxDEV("button",{onClick:()=>K("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${R==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Configs"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("connect"),className:`px-4 py-2 rounded text-sm font-medium transition ${R==="connect"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Connect Apps"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b0===1&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666]",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-purple-500"},void 0,!1,void 0,this),"Composio",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R==="connect"&&N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect your accounts to enable tools in MCP configs"},void 0,!1,void 0,this),N.jsxDEV(Y2,{providerId:"composio",projectId:G,onConnectionComplete:()=>{D()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="configs"&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Your MCP configs from Composio"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-3",children:[N.jsxDEV("button",{onClick:D,disabled:k,className:"text-xs text-[#666] hover:text-[#888] transition",children:k?"Loading...":"Refresh"},void 0,!1,void 0,this),N.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Create Config →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k?N.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):f.length===0?N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:["First ",N.jsxDEV("button",{onClick:()=>K("connect"),className:"text-[#f97316] hover:text-[#fb923c]",children:"connect some apps"},void 0,!1,void 0,this),", then create a config."]},void 0,!0,void 0,this),N.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#f97316] hover:text-[#fb923c] mt-2 inline-block",children:"Create in Composio →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV("div",{className:"space-y-2",children:f.map((e)=>{let y0=Q0(e.id),I0=j===e.id;return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${y0?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("span",{className:"font-medium text-sm",children:e.name},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-xs text-[#555]",children:[e.toolsCount," tools"]},void 0,!0,void 0,this),y0&&N.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.toolkits.length>0&&N.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.toolkits.slice(0,4).map((i)=>N.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:i},i,!1,void 0,this)),e.toolkits.length>4&&N.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",e.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[y0?N.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):N.jsxDEV("button",{onClick:()=>z0(e.id),disabled:I0,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:I0?"Adding...":"Add"},void 0,!1,void 0,this),N.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${e.id}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#888] transition",children:"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},e.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b&&(b0===1||O==="smithery")&&N.jsxDEV("div",{children:[b0===1&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666] mb-4",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-blue-500"},void 0,!1,void 0,this),"Smithery",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Add MCP servers from the Smithery registry"},void 0,!1,void 0,this),N.jsxDEV("a",{href:"https://smithery.ai/servers",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Browse Smithery →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:["Smithery servers can be added from the ",N.jsxDEV("strong",{children:"Browse Registry"},void 0,!1,void 0,this)," tab."]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Your API key will be used automatically when adding Smithery servers."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M&&(b0===1||O==="agentdojo")&&N.jsxDEV(ZT,{projectId:G,onServerAdded:Y,showProviderBadge:b0===1},void 0,!1,void 0,this),N.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[N.jsxDEV("strong",{className:"text-[#888]",children:"Tip:"},void 0,!1,void 0,this)," Connect apps first, then add MCP configs to make tools available to your agents."," · ",N.jsxDEV("a",{href:"/settings",className:"text-[#f97316] hover:text-[#fb923c]",children:"Add more providers in Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function ZT({projectId:Y,onServerAdded:G,showProviderBadge:U}){let{authFetch:O}=T1(),[q,R]=i0.useState("configs"),[K,_]=i0.useState([]),[A,b]=i0.useState(new Set),[P,M]=i0.useState(!1),[w,f]=i0.useState(null),{alert:v,AlertDialog:m}=fZ(),g=async()=>{M(!0);try{let k=Y&&Y!=="unassigned"?`?project_id=${Y}`:"",[x,j]=await Promise.all([O(`/api/integrations/agentdojo/configs${k}`),O("/api/mcp/servers")]),u=await x.json(),p=await j.json();_(u.configs||[]);let s=new Set((p.servers||[]).filter((a)=>a.source==="agentdojo").map((a)=>{let D=a.url?.match(/\/mcp\/([^/?]+)/);return D?D[1]:a.name}));b(s)}catch(k){console.error("Failed to fetch AgentDojo configs:",k)}M(!1)},C=async(k)=>{f(k);try{let x=Y&&Y!=="unassigned"?`?project_id=${Y}`:"",j=await O(`/api/integrations/agentdojo/configs/${k}/add${x}`,{method:"POST"});if(j.ok){let u=K.find((p)=>p.id===k);b((p)=>new Set([...p,u?.slug||k])),G?.()}else{let u=await j.json();await v(u.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(x){console.error("Failed to add config:",x)}f(null)},V=(k)=>{return A.has(k.slug)||A.has(k.id)||A.has(k.name)};return i0.useEffect(()=>{g()},[O,Y]),N.jsxDEV(N.Fragment,{children:[m,N.jsxDEV("div",{children:[U&&N.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#666] mb-4",children:[N.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-500"},void 0,!1,void 0,this),"AgentDojo",N.jsxDEV("span",{className:"text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1",children:[N.jsxDEV("button",{onClick:()=>R("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${q==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Servers"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>R("toolkits"),className:`px-4 py-2 rounded text-sm font-medium transition ${q==="toolkits"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Toolkits"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q==="configs"&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"Your MCP servers from AgentDojo"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:g,disabled:P,className:"text-xs text-[#666] hover:text-[#888] transition",children:P?"Loading...":"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P?N.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading servers..."},void 0,!1,void 0,this):K.length===0?N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[N.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers found"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:[N.jsxDEV("button",{onClick:()=>R("toolkits"),className:"text-[#f97316] hover:text-[#fb923c]",children:"Browse toolkits"},void 0,!1,void 0,this)," ","to create a new MCP server."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):N.jsxDEV("div",{className:"space-y-2",children:K.map((k)=>{let x=V(k),j=w===k.id;return N.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${x?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[N.jsxDEV("div",{className:"flex-1 min-w-0",children:[N.jsxDEV("div",{className:"flex items-center gap-2",children:[N.jsxDEV("span",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),N.jsxDEV("span",{className:"text-xs text-[#555]",children:[k.toolsCount," tools"]},void 0,!0,void 0,this),x&&N.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.mcpUrl&&N.jsxDEV("code",{className:"text-xs text-[#555] mt-1 block truncate",children:k.mcpUrl},void 0,!1,void 0,this),!k.mcpUrl&&k.slug&&N.jsxDEV("code",{className:"text-xs text-[#555] mt-1 block truncate",children:k.slug},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:x?N.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):N.jsxDEV("button",{onClick:()=>C(k.id),disabled:j,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:j?"Adding...":"Add"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},k.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q==="toolkits"&&N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Browse available toolkits and create MCP servers"},void 0,!1,void 0,this),N.jsxDEV(Y2,{providerId:"agentdojo",projectId:Y,onConnectionComplete:()=>{g()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function JT(Y){let G=[],U=Y,O=null,q=Y.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(q){let _=q[2]||q[1];if(_)O=_.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let R=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,K;while((K=R.exec(Y))!==null){let _=K[1],A=K[2],b=_.toUpperCase().replace(/-/g,"_"),P=O?`${O.toUpperCase().replace(/-/g,"_")}_${b}`:b;G.push({key:P,flag:_}),U=U.replace(new RegExp(`(--${_}\\s+)${A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${_} $${P}`)}return{cleanCommand:U,credentials:G,serverName:O}}function YT({onClose:Y,onAdded:G,projects:U,defaultProjectId:O}){let{authFetch:q}=T1(),[R,K]=i0.useState("npm"),[_,A]=i0.useState(""),[b,P]=i0.useState(""),[M,w]=i0.useState(""),[f,v]=i0.useState(""),[m,g]=i0.useState(""),[C,V]=i0.useState(""),[k,x]=i0.useState(""),[j,u]=i0.useState([]),[p,s]=i0.useState(O||null),[a,D]=i0.useState(!1),[z0,Q0]=i0.useState(null),U0=U&&U.length>0,b0=()=>{u([...j,{key:"",value:""}])},e=(q0,o,T0)=>{let v0=[...j];v0[q0][o]=T0,u(v0)},y0=(q0)=>{u(j.filter((o,T0)=>T0!==q0))},I0=(q0)=>{if(v(q0),q0.includes("YOUR_")||q0.includes("<")||q0.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(q0)){let{cleanCommand:o,credentials:T0,serverName:v0}=JT(q0);if(!_&&v0)A(v0);if(T0.length>0){let X1=new Set(j.map((f0)=>f0.key)),r0=T0.filter((f0)=>!X1.has(f0.key)).map((f0)=>({key:f0.key,value:""}));if(r0.length>0)u([...j,...r0]),v(o)}}},i=(q0)=>{if(q0.startsWith("npx ")||q0.includes(" --")||q0.includes("YOUR_")||q0.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(q0))K("command"),I0(q0);else if(P(q0),!_&&q0){let T0=q0.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(T0&&T0!==q0)A(T0)}},R0=async()=>{if(!_){Q0("Name is required");return}if(R==="npm"&&!b){Q0("npm package is required");return}if(R==="pip"&&!b){Q0("pip package is required");return}if(R==="command"&&!f){Q0("Command is required");return}if(R==="http"&&!m){Q0("URL is required");return}D(!0),Q0(null);let q0={};for(let{key:o,value:T0}of j)if(o.trim())q0[o.trim()]=T0;try{let o={name:_};if(R==="npm")o.type="npm",o.package=b;else if(R==="pip"){if(o.type="pip",o.package=b,M)o.pip_module=M}else if(R==="http"){o.type="http",o.url=m;let v0={"Content-Type":"application/json"};if(C&&k){let X1=btoa(`${C}:${k}`);v0.Authorization=`Basic ${X1}`}o.headers=v0}else{let v0=f.trim().split(/\s+/);o.type="custom",o.command=v0[0],o.args=v0.slice(1).join(" ")}if(Object.keys(q0).length>0)o.env=q0;if(p)o.project_id=p;let T0=await q("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!T0.ok){let v0=await T0.json();Q0(v0.error||"Failed to add server"),D(!1);return}G()}catch(o){Q0("Failed to add server"),D(!1)}},O0=(q0,o)=>{K("npm"),A(q0),P(o)};return N.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[N.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem",type:"npm"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch",type:"npm"},{name:"memory",pkg:"@modelcontextprotocol/server-memory",type:"npm"},{name:"github",pkg:"@modelcontextprotocol/server-github",type:"npm"},{name:"time",pkg:"mcp-server-time",module:"mcp_server_time",type:"pip"}].map((q0)=>N.jsxDEV("button",{onClick:()=>{if(K(q0.type),A(q0.name),P(q0.pkg),q0.type==="pip"&&"module"in q0)w(q0.module||"");else w("")},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:q0.name},q0.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[N.jsxDEV("button",{onClick:()=>K("npm"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("pip"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="pip"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"pip"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("command"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Command"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>K("http"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${R==="http"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"HTTP"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(q0)=>A(q0.target.value),placeholder:"e.g., pushover",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U0&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),N.jsxDEV(J7,{value:p||"",onChange:(q0)=>s(q0||null),options:[{value:"",label:"Global (all projects)"},...U.map((q0)=>({value:q0.id,label:q0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global servers are available to all agents. Project-scoped servers are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="npm"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(q0)=>i(q0.target.value),placeholder:"e.g., @modelcontextprotocol/server-filesystem or paste full command",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Package name or paste a full npx command with credentials"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="pip"&&N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(q0)=>{if(P(q0.target.value),!M&&q0.target.value){let o=q0.target.value.split("[")[0].replace(/-/g,".");w(o)}},placeholder:"e.g., late-sdk[mcp]",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python package with extras, e.g., late-sdk[mcp] or mcp-server-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Module (optional)"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:M,onChange:(q0)=>w(q0.target.value),placeholder:"e.g., late.mcp",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Python module to run with -m. Auto-detected from package name if not specified."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R==="command"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:f,onChange:(q0)=>I0(q0.target.value),placeholder:"e.g., npx -y pushover-mcp@latest start --token YOUR_TOKEN",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Paste the full command - credentials like YOUR_TOKEN will be auto-extracted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R==="http"&&N.jsxDEV("div",{className:"space-y-4",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"URL"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:m,onChange:(q0)=>g(q0.target.value),placeholder:"e.g., https://example.com/wp-json/mcp/v1/messages",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded",children:[N.jsxDEV("p",{className:"text-xs text-[#666] mb-3",children:"Optional: Basic Auth credentials (will be encoded and stored securely)"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Username"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:C,onChange:(q0)=>V(q0.target.value),placeholder:"username",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Password"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:k,onChange:(q0)=>x(q0.target.value),placeholder:"password or app key",className:"w-full bg-[#111] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[N.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:b0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j.length===0&&N.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"Add environment variables for API tokens and credentials. These are stored encrypted and passed to the server at startup."},void 0,!1,void 0,this),j.length>0&&N.jsxDEV("div",{className:"space-y-2",children:j.map((q0,o)=>N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:q0.key,onChange:(T0)=>e(o,"key",T0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:q0.value,onChange:(T0)=>e(o,"value",T0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>y0(o),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},o,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&N.jsxDEV("p",{className:"text-red-400 text-sm",children:z0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[N.jsxDEV("button",{onClick:Y,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:R0,disabled:a||!_||(R==="npm"?!b:R==="pip"?!b:R==="http"?!m:!f),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:a?"Adding...":"Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function $T({server:Y,projects:G,onClose:U,onSaved:O}){let{authFetch:q}=T1(),[R,K]=i0.useState(Y.name),[_,A]=i0.useState(Y.package||""),[b,P]=i0.useState(Y.command||""),[M,w]=i0.useState(Y.args||""),[f,v]=i0.useState(Y.url||""),[m,g]=i0.useState(()=>{let I0=Y.headers?.Authorization||"";if(I0.startsWith("Basic "))try{return atob(I0.slice(6)).split(":")[0]||""}catch{return""}return""}),[C,V]=i0.useState(()=>{let I0=Y.headers?.Authorization||"";if(I0.startsWith("Basic "))try{return atob(I0.slice(6)).split(":").slice(1).join(":")||""}catch{return""}return""}),[k,x]=i0.useState(()=>{return Object.entries(Y.env||{}).map(([I0,i])=>({key:I0,value:i}))}),[j,u]=i0.useState(Y.project_id),[p,s]=i0.useState(!1),[a,D]=i0.useState(null),z0=G&&G.length>0,Q0=Y.type==="http",U0=()=>{x([...k,{key:"",value:""}])},b0=(I0,i,R0)=>{let O0=[...k];O0[I0][i]=R0,x(O0)},e=(I0)=>{x(k.filter((i,R0)=>R0!==I0))},y0=async()=>{if(!R.trim()){D("Name is required");return}s(!0),D(null);let I0={};for(let{key:i,value:R0}of k)if(i.trim())I0[i.trim()]=R0;try{let i={name:R.trim(),env:I0};if(Q0){if(f.trim())i.url=f.trim();let O0={"Content-Type":"application/json"};if(m&&C){let q0=btoa(`${m}:${C}`);O0.Authorization=`Basic ${q0}`}i.headers=O0}else{if(Y.type==="npm"&&_.trim())i.package=_.trim();if(Y.type==="pip"&&_.trim())i.package=_.trim();if(Y.type==="custom"){if(b.trim())i.command=b.trim();if(M.trim())i.args=M.trim()}}i.project_id=j;let R0=await q(`/api/mcp/servers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!R0.ok){let O0=await R0.json();D(O0.error||"Failed to save changes"),s(!1);return}if(Y.status==="running"&&!Q0)try{await q(`/api/mcp/servers/${Y.id}/stop`,{method:"POST"}),await q(`/api/mcp/servers/${Y.id}/start`,{method:"POST"})}catch(O0){console.error("Failed to restart server:",O0)}O()}catch(i){D("Failed to save changes"),s(!1)}};return N.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:N.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[N.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[N.jsxDEV("h2",{className:"text-lg font-semibold",children:"Edit MCP Server"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 space-y-4",children:[N.jsxDEV("div",{className:"text-sm text-[#666] bg-[#0a0a0a] border border-[#222] rounded p-3",children:["Type: ",N.jsxDEV("span",{className:"text-[#888]",children:Y.type},void 0,!1,void 0,this),Y.package&&N.jsxDEV(N.Fragment,{children:[" • Package: ",N.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.package},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.command&&N.jsxDEV(N.Fragment,{children:[" • Command: ",N.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.command},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:R,onChange:(I0)=>K(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),N.jsxDEV(J7,{value:j||"",onChange:(I0)=>u(I0||null),options:[{value:"",label:"Global (all projects)"},...G.map((I0)=>({value:I0.id,label:I0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="npm"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(I0)=>A(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="pip"&&N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:_,onChange:(I0)=>A(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Server URL"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:f,onChange:(I0)=>v(I0.target.value),placeholder:"https://example.com/mcp",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Authentication (Basic Auth)"},void 0,!1,void 0,this),N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:m,onChange:(I0)=>g(I0.target.value),placeholder:"Username",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:C,onChange:(I0)=>V(I0.target.value),placeholder:"Password / App Password",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Leave empty if no authentication required"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.type==="custom"&&N.jsxDEV(N.Fragment,{children:[N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:b,onChange:(I0)=>P(I0.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{children:[N.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"text",value:M,onChange:(I0)=>w(I0.target.value),placeholder:"e.g., --token $TOKEN --verbose",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!Q0&&N.jsxDEV("div",{children:[N.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[N.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:U0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.length===0&&N.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"No environment variables configured."},void 0,!1,void 0,this),k.length>0&&N.jsxDEV("div",{className:"space-y-2",children:k.map((I0,i)=>N.jsxDEV("div",{className:"flex gap-2",children:[N.jsxDEV("input",{type:"text",value:I0.key,onChange:(R0)=>b0(i,"key",R0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("input",{type:"password",value:I0.value,onChange:(R0)=>b0(i,"value",R0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:()=>e(i),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},i,!0,void 0,this))},void 0,!1,void 0,this),N.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:Y.status==="running"?"Server will be automatically restarted to apply changes.":"Changes will take effect when the server is started."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a&&N.jsxDEV("p",{className:"text-red-400 text-sm",children:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[N.jsxDEV("button",{onClick:U,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),N.jsxDEV("button",{onClick:y0,disabled:p||!R.trim(),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:p?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Z4=B0(f1(),1);var n=B0(U1(),1);function $2(){let{authFetch:Y}=T1(),{projects:G,currentProjectId:U}=h4(),[O,q]=Z4.useState([]),[R,K]=Z4.useState(!0),[_,A]=Z4.useState("installed"),[b,P]=Z4.useState(!1),[M,w]=Z4.useState(!1),[f,v]=Z4.useState(null),{confirm:m,ConfirmDialog:g}=A5(),{alert:C,AlertDialog:V}=fZ(),k=G.length>0,[x,j]=Z4.useState(""),[u,p]=Z4.useState([]),[s,a]=Z4.useState(!1),[D,z0]=Z4.useState(null),[Q0,U0]=Z4.useState(""),[b0,e]=Z4.useState([]),[y0,I0]=Z4.useState(!1),[i,R0]=Z4.useState(null),[O0,q0]=Z4.useState(null),[o,T0]=Z4.useState(null),[v0,X1]=Z4.useState(U&&U!=="unassigned"?U:null),r0=O.filter((w0)=>{if(!U)return!0;if(U==="unassigned")return w0.project_id===null;return w0.project_id===null||w0.project_id===U}),f0=async()=>{try{let Q1=await(await Y("/api/skills")).json();q(Q1.skills||[])}catch(w0){console.error("Failed to fetch skills:",w0)}K(!1)},o0=async(w0)=>{a(!0);try{let Q1=w0!==void 0?w0:x,I1=Q1?`/api/skills/marketplace/search?q=${encodeURIComponent(Q1)}`:"/api/skills/marketplace/featured",C4=await(await Y(I1)).json();p(C4.skills||[])}catch(Q1){console.error("Failed to search marketplace:",Q1)}a(!1)};Z4.useEffect(()=>{f0()},[Y]),Z4.useEffect(()=>{if(_==="marketplace"&&u.length===0)o0("")},[_]);let J1=async(w0)=>{try{await Y(`/api/skills/${w0}/toggle`,{method:"POST"}),f0()}catch(Q1){console.error("Failed to toggle skill:",Q1)}},A0=async(w0)=>{if(!await m("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await Y(`/api/skills/${w0}`,{method:"DELETE"}),f?.id===w0)v(null);f0()}catch(I1){console.error("Failed to delete skill:",I1)}},Y1=async(w0)=>{z0(w0.id);try{let Q1=await Y(`/api/skills/marketplace/${w0.id}/install`,{method:"POST"}),I1=await Q1.json();if(Q1.ok)await C(`Installed "${w0.name}" successfully!`,{title:"Skill Installed"}),f0(),A("installed");else await C(I1.error||"Failed to install skill",{title:"Installation Failed"})}catch(Q1){console.error("Failed to install skill:",Q1),await C("Failed to install skill",{title:"Error"})}z0(null)},h1=(w0)=>O.some((Q1)=>Q1.name===w0),l1=async(w0)=>{let Q1=w0||Q0;if(!Q1.trim())return;let I1="",i1="";if(Q1.includes("github.com")){let C4=Q1.match(/github\.com\/([^/]+)\/([^/]+)/);if(C4)I1=C4[1],i1=C4[2].replace(/\.git$/,"")}else if(Q1.includes("/")){let C4=Q1.split("/");I1=C4[0],i1=C4[1]}if(!I1||!i1){R0("Invalid repo format. Use 'owner/repo' or GitHub URL");return}I0(!0),R0(null),e([]),q0(null);try{let C4=await Y(`/api/skills/github/${I1}/${i1}`),$4=await C4.json();if(!C4.ok){R0($4.error||"Failed to fetch repository"),I0(!1);return}e($4.skills||[]),q0($4.repo||null)}catch(C4){R0("Failed to fetch repository")}I0(!1)},r1=async(w0)=>{if(!O0)return;T0(w0.name);try{let Q1=await Y("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:O0.owner,repo:O0.repo,skillName:w0.name,downloadUrl:w0.downloadUrl,projectId:v0})}),I1=await Q1.json();if(Q1.ok)await C(`Installed "${w0.name}" successfully!`,{title:"Skill Installed"}),f0();else await C(I1.error||"Failed to install skill",{title:"Installation Failed",variant:"error"})}catch(Q1){await C("Failed to install skill",{title:"Error",variant:"error"})}T0(null)},O1=async()=>{if(!O0||b0.length===0)return;let w0=b0.filter((i1)=>!h1(i1.name));if(w0.length===0){await C("All skills are already installed",{title:"Info"});return}if(!await m(`Install ${w0.length} skill(s) from ${O0.owner}/${O0.repo}?`,{confirmText:"Install All",title:"Install Skills"}))return;let I1=0;for(let i1 of w0){T0(i1.name);try{if((await Y("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:O0.owner,repo:O0.repo,skillName:i1.name,downloadUrl:i1.downloadUrl,projectId:v0})})).ok)I1++}catch(C4){}}T0(null),f0(),await C(`Installed ${I1} of ${w0.length} skills`,{title:"Installation Complete"})};return n.jsxDEV(n.Fragment,{children:[g,V,n.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:n.jsxDEV("div",{className:"max-w-6xl",children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[n.jsxDEV("div",{children:[n.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-[#666]",children:"Manage agent skills - instructions that teach agents how to perform tasks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:()=>w(!0),className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:"Import"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>P(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[n.jsxDEV("button",{onClick:()=>A("installed"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="installed"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:["Installed (",O.length,")"]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:()=>A("github"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="github"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse GitHub"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>A("marketplace"),className:`px-4 py-2 rounded text-sm font-medium transition ${_==="marketplace"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="installed"&&n.jsxDEV(n.Fragment,{children:R?n.jsxDEV("div",{className:"text-[#666]",children:"Loading skills..."},void 0,!1,void 0,this):O.length===0?n.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[n.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>A("marketplace"),className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Browse Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):r0.length===0?n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:n.jsxDEV("p",{className:"text-[#666]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:r0.map((w0)=>{let Q1=k&&w0.project_id?G.find((I1)=>I1.id===w0.project_id):null;return n.jsxDEV(HT,{skill:w0,project:Q1,onToggle:()=>J1(w0.id),onDelete:()=>A0(w0.id),onView:()=>v(w0)},w0.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),_==="github"&&n.jsxDEV("div",{className:"space-y-6",children:[n.jsxDEV("form",{onSubmit:(w0)=>{w0.preventDefault(),l1()},className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:Q0,onChange:(w0)=>U0(w0.target.value),placeholder:"Enter GitHub repo (e.g., WordPress/agent-skills)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("button",{type:"submit",disabled:y0,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:y0?"...":"Browse"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&b0.length>0&&n.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] border border-[#222] rounded-lg",children:[n.jsxDEV("span",{className:"text-sm text-[#666]",children:"Install to:"},void 0,!1,void 0,this),n.jsxDEV(J7,{value:v0||"",onChange:(w0)=>X1(w0||null),options:[{value:"",label:"Global (all projects)"},...G.map((w0)=>({value:w0.id,label:w0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i&&n.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:i},void 0,!1,void 0,this),O0&&b0.length>0&&n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("a",{href:O0.url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline font-medium",children:[O0.owner,"/",O0.repo]},void 0,!0,void 0,this),n.jsxDEV("span",{className:"text-sm text-[#666]",children:[b0.length," skill",b0.length!==1?"s":""," found"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.some((w0)=>!h1(w0.name))&&n.jsxDEV("button",{onClick:O1,disabled:!!o,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded transition disabled:opacity-50",children:"Install All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y0&&n.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Fetching skills from repository..."},void 0,!1,void 0,this),!y0&&!O0&&!i&&n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[n.jsxDEV("div",{className:"text-4xl mb-4",children:"\uD83D\uDCE6"},void 0,!1,void 0,this),n.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"Browse Skills from GitHub"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"Enter a GitHub repository to browse and install skills. Skills are markdown files with instructions that teach agents how to perform specific tasks."},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex flex-wrap gap-2 justify-center",children:[{label:"WordPress Skills",repo:"WordPress/agent-skills"}].map(({label:w0,repo:Q1})=>n.jsxDEV("button",{onClick:()=>{U0(Q1),l1(Q1)},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:w0},Q1,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!y0&&O0&&b0.length===0&&n.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No skills found in this repository. Skills should be in subdirectories with a SKILL.md file."},void 0,!1,void 0,this),b0.length>0&&n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:b0.map((w0)=>{let Q1=h1(w0.name),I1=o===w0.name;return n.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 transition ${Q1?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:n.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("h3",{className:"font-medium truncate",children:w0.name},void 0,!1,void 0,this),Q1&&n.jsxDEV("span",{className:"text-xs text-green-400",children:"✓ Installed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:w0.description||"No description"},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[n.jsxDEV("span",{children:[(w0.size/1024).toFixed(1),"KB"]},void 0,!0,void 0,this),n.jsxDEV("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400",children:"GitHub"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex-shrink-0",children:Q1?n.jsxDEV("span",{className:"text-xs text-[#555] px-3 py-1.5",children:"Added"},void 0,!1,void 0,this):n.jsxDEV("button",{onClick:()=>r1(w0),disabled:I1,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:I1?"Installing...":"Install"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},w0.name,!1,void 0,this)})},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:n.jsxDEV("p",{children:["Skills are sourced from GitHub repositories. Each skill should be in its own directory with a"," ",n.jsxDEV("code",{className:"text-[#888] bg-[#0a0a0a] px-1 rounded",children:"SKILL.md"},void 0,!1,void 0,this)," file containing instructions."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_==="marketplace"&&n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"mb-6",children:n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:x,onChange:(w0)=>j(w0.target.value),onKeyDown:(w0)=>w0.key==="Enter"&&o0(),placeholder:"Search skills...",className:"flex-1 bg-[#111] border border-[#1a1a1a] rounded px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>o0(),disabled:s,className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:s?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),s?n.jsxDEV("div",{className:"text-[#666]",children:"Loading..."},void 0,!1,void 0,this):u.length===0?n.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[n.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm mt-1",children:"Try a different search term"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):n.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:u.map((w0)=>n.jsxDEV(GT,{skill:w0,installed:h1(w0.name),installing:D===w0.id,onInstall:()=>Y1(w0)},w0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),b&&n.jsxDEV(qT,{authFetch:Y,onClose:()=>P(!1),onCreated:()=>{P(!1),f0()},projects:k?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),M&&n.jsxDEV(BT,{authFetch:Y,onClose:()=>w(!1),onImported:()=>{w(!1),f0()}},void 0,!1,void 0,this),f&&n.jsxDEV(UT,{skill:f,authFetch:Y,onClose:()=>v(null),onUpdated:()=>{v(null),f0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function HT({skill:Y,project:G,onToggle:U,onDelete:O,onView:q}){let R={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[Y.source],K=()=>{if(G)return n.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${G.color}20`,color:G.color},children:G.name},void 0,!1,void 0,this);if(Y.project_id===null)return n.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return n.jsxDEV("div",{className:`bg-[#111] rounded-lg p-5 border transition cursor-pointer ${Y.enabled?"border-[#1a1a1a]":"border-[#1a1a1a] opacity-60"} hover:border-[#333]`,onClick:q,children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),K()]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#666] flex items-center gap-2 mt-0.5",children:[n.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${Y.source==="skillsmp"?"bg-purple-500/20 text-purple-400":Y.source==="github"?"bg-blue-500/20 text-blue-400":"bg-[#222] text-[#888]"}`,children:R},void 0,!1,void 0,this),Y.metadata?.version&&n.jsxDEV("span",{children:["v",Y.metadata.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),U()},className:`w-10 h-5 rounded-full transition-colors relative ${Y.enabled?"bg-[#f97316]":"bg-[#333]"}`,children:n.jsxDEV("span",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${Y.enabled?"left-5":"left-0.5"}`},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[Y.allowed_tools.slice(0,2).map((_)=>n.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:_},_,!1,void 0,this)),Y.allowed_tools.length>2&&n.jsxDEV("span",{className:"text-xs text-[#666]",children:["+",Y.allowed_tools.length-2]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),O()},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function GT({skill:Y,installed:G,installing:U,onInstall:O}){return n.jsxDEV("div",{className:"bg-[#111] rounded-lg p-5 border border-[#1a1a1a] hover:border-[#333] transition",children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#666] mt-0.5",children:["by ",Y.author," · v",Y.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex items-center gap-1 text-yellow-500 text-sm",children:["★ ",Y.rating.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:Y.tags.slice(0,3).map((q)=>n.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:q},q,!1,void 0,this))},void 0,!1,void 0,this),G?n.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):n.jsxDEV("button",{onClick:O,disabled:U,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded text-sm font-medium transition",children:U?"Installing...":"Install"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"mt-3 text-xs text-[#555]",children:[Y.downloads.toLocaleString()," downloads"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qT({authFetch:Y,onClose:G,onCreated:U,projects:O,defaultProjectId:q}){let[R,K]=Z4.useState(""),[_,A]=Z4.useState(""),[b,P]=Z4.useState(""),[M,w]=Z4.useState(q||null),[f,v]=Z4.useState(!1),[m,g]=Z4.useState(null),C=O&&O.length>0,V=async()=>{if(!R||!_||!b){g("All fields are required");return}v(!0),g(null);try{let k={name:R,description:_,content:b,source:"local"};if(M)k.project_id=M;let x=await Y("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),j=await x.json();if(!x.ok){g(j.error||"Failed to create skill"),v(!1);return}U()}catch(k){g("Failed to create skill"),v(!1)}};return n.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(k)=>k.stopPropagation(),children:[n.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:n.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-6 space-y-4",children:[m&&n.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:m},void 0,!1,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Name"},void 0,!1,void 0,this),n.jsxDEV("input",{type:"text",value:R,onChange:(k)=>K(k.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-skill-name",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Lowercase letters, numbers, and hyphens only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Description"},void 0,!1,void 0,this),n.jsxDEV("input",{type:"text",value:_,onChange:(k)=>A(k.target.value),placeholder:"What this skill does and when to use it...",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Scope"},void 0,!1,void 0,this),n.jsxDEV(J7,{value:M||"",onChange:(k)=>w(k||null),options:[{value:"",label:"Global (all projects)"},...O.map((k)=>({value:k.id,label:k.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global skills are available to all agents. Project-scoped skills are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),n.jsxDEV("textarea",{value:b,onChange:(k)=>P(k.target.value),placeholder:`# Skill Instructions
|
|
216
217
|
|
|
217
218
|
Write detailed instructions here...`,rows:12,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[n.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:V,disabled:f,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:f?"Creating...":"Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function BT({authFetch:Y,onClose:G,onImported:U}){let[O,q]=Z4.useState(""),[R,K]=Z4.useState(!1),[_,A]=Z4.useState(null);return n.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(P)=>P.stopPropagation(),children:[n.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:[n.jsxDEV("h2",{className:"text-xl font-semibold",children:"Import Skill"},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Paste the contents of a SKILL.md file"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6 space-y-4",children:[_&&n.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:_},void 0,!1,void 0,this),n.jsxDEV("textarea",{value:O,onChange:(P)=>q(P.target.value),placeholder:`---
|
|
218
219
|
name: skill-name
|
|
@@ -221,7 +222,7 @@ description: What this skill does...
|
|
|
221
222
|
|
|
222
223
|
# Instructions
|
|
223
224
|
|
|
224
|
-
Your skill instructions here...`,rows:16,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[n.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:async()=>{if(!O.trim()){A("Paste SKILL.md content");return}K(!0),A(null);try{let P=await Y("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:O})}),M=await P.json();if(!P.ok){A(M.error||"Failed to import skill"),K(!1);return}U()}catch(P){A("Failed to import skill"),K(!1)}},disabled:R,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:R?"Importing...":"Import Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function UT({skill:Y,authFetch:G,onClose:U,onUpdated:O}){let[q,R]=Z4.useState(!1),[K,_]=Z4.useState(Y.content),[A,b]=Z4.useState(!1),P=async()=>{b(!0);try{await G(`/api/skills/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:K})}),O()}catch(w){console.error("Failed to save:",w)}b(!1)},M=async()=>{try{let f=await(await G(`/api/skills/${Y.id}/export`)).text(),v=new Blob([f],{type:"text/markdown"}),m=URL.createObjectURL(v),g=document.createElement("a");g.href=m,g.download=`${Y.name}-SKILL.md`,g.click(),URL.revokeObjectURL(m)}catch(w){console.error("Failed to export:",w)}};return n.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:U,children:n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(w)=>w.stopPropagation(),children:[n.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a] flex items-center justify-between",children:[n.jsxDEV("div",{children:[n.jsxDEV("h2",{className:"text-xl font-semibold",children:Y.name},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#666] mt-0.5",children:Y.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:M,className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:"Export"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>R(!q),className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:q?"View":"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6",children:q?n.jsxDEV("textarea",{value:K,onChange:(w)=>_(w.target.value),rows:20,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this):n.jsxDEV("pre",{className:"bg-[#0a0a0a] border border-[#222] rounded p-4 font-mono text-sm overflow-auto max-h-[60vh] whitespace-pre-wrap",children:Y.content},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-between",children:[n.jsxDEV("div",{className:"text-xs text-[#555]",children:Y.source!=="local"&&Y.source_url&&n.jsxDEV("a",{href:Y.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"View source →"},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex gap-3",children:[n.jsxDEV("button",{onClick:U,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),q&&n.jsxDEV("button",{onClick:P,disabled:A,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:A?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var x4=B0(f1(),1);var l0=B0(U1(),1);function _O(Y){let G=Y.category==="LLM",U=Y.category==="TOOL",O=Y.level==="error",q=Y.data?.input_tokens||0,R=Y.data?.output_tokens||0;return{llm_calls:G?1:0,tool_calls:U?1:0,errors:O?1:0,input_tokens:q,output_tokens:R}}function H2(){let{events:Y}=F6(),{currentProjectId:G,currentProject:U}=u4(),{authFetch:O}=T1(),[q,R]=x4.useState(null),[K,_]=x4.useState([]),[A,b]=x4.useState([]),[P,M]=x4.useState(!0),[w,f]=x4.useState({level:"",agent_id:""}),[v,m]=x4.useState(new Set(["DATABASE"])),[g,C]=x4.useState([]),[V,k]=x4.useState(null),x=x4.useRef(new Set),[j,u]=x4.useState(new Set),p=x4.useRef(new Set);x4.useEffect(()=>{(async()=>{try{let v0=await(await O("/api/agents")).json();C(v0.agents||[])}catch(T0){console.error("Failed to fetch agents:",T0)}})()},[O]);let s=x4.useMemo(()=>{if(G===null)return g;if(G==="unassigned")return g.filter((o)=>!o.projectId);return g.filter((o)=>o.projectId===G)},[g,G]),a=x4.useMemo(()=>new Set(s.map((o)=>o.id)),[s]),D=async()=>{M(!0);try{let o=G==="unassigned"?"null":G||"",T0=new URLSearchParams;if(o)T0.set("project_id",o);let X1=await(await O(`/api/telemetry/stats${T0.toString()?`?${T0}`:""}`)).json();R(X1.stats);let r0=new URLSearchParams;if(w.level)r0.set("level",w.level);if(w.agent_id)r0.set("agent_id",w.agent_id);if(o)r0.set("project_id",o);r0.set("limit","100");let J1=(await(await O(`/api/telemetry/events?${r0}`)).json()).events||[];_(J1),x.current=new Set(J1.map((l1)=>l1.id));let A0=new URLSearchParams;if(A0.set("group_by","agent"),o)A0.set("project_id",o);let h1=await(await O(`/api/telemetry/usage?${A0}`)).json();b(h1.usage||[])}catch(o){console.error("Failed to fetch telemetry:",o)}M(!1)};x4.useEffect(()=>{D();let o=setInterval(D,60000);return()=>clearInterval(o)},[w,G,O]);let z0=x4.useMemo(()=>{if(!q)return null;let o=0,T0=0,v0=0,X1=0,r0=0,f0=0;for(let o0 of Y)if(!x.current.has(o0.id)){o++;let J1=_O(o0);T0+=J1.llm_calls,v0+=J1.tool_calls,X1+=J1.errors,r0+=J1.input_tokens,f0+=J1.output_tokens}return{total_events:q.total_events+o,total_llm_calls:q.total_llm_calls+T0,total_tool_calls:q.total_tool_calls+v0,total_errors:q.total_errors+X1,total_input_tokens:q.total_input_tokens+r0,total_output_tokens:q.total_output_tokens+f0}},[q,Y]),Q0=x4.useMemo(()=>{let o=new Map;for(let T0 of A)o.set(T0.agent_id,{...T0});for(let T0 of Y)if(!x.current.has(T0.id)){let v0=_O(T0),X1=o.get(T0.agent_id);if(X1)X1.llm_calls+=v0.llm_calls,X1.tool_calls+=v0.tool_calls,X1.errors+=v0.errors,X1.input_tokens+=v0.input_tokens,X1.output_tokens+=v0.output_tokens;else o.set(T0.agent_id,{agent_id:T0.agent_id,llm_calls:v0.llm_calls,tool_calls:v0.tool_calls,errors:v0.errors,input_tokens:v0.input_tokens,output_tokens:v0.output_tokens})}return Array.from(o.values())},[A,Y]),U0=x4.default.useMemo(()=>{let o=Y;if(G!==null)o=o.filter((r0)=>a.has(r0.agent_id));if(w.agent_id)o=o.filter((r0)=>r0.agent_id===w.agent_id);if(v.size>0)o=o.filter((r0)=>!v.has(r0.category));if(w.level)o=o.filter((r0)=>r0.level===w.level);let T0=K;if(v.size>0)T0=T0.filter((r0)=>!v.has(r0.category));let v0=new Set(o.map((r0)=>r0.id)),X1=[...o];for(let r0 of T0)if(!v0.has(r0.id))X1.push(r0),v0.add(r0.id);return X1.sort((r0,f0)=>new Date(f0.timestamp).getTime()-new Date(r0.timestamp).getTime()),X1.slice(0,100)},[Y,K,w,v,G,a]);x4.useEffect(()=>{let o=[];for(let T0 of Y)if(!p.current.has(T0.id))p.current.add(T0.id),o.push(T0.id);if(o.length>0)u((T0)=>{let v0=new Set(T0);return o.forEach((X1)=>v0.add(X1)),v0}),setTimeout(()=>{u((T0)=>{let v0=new Set(T0);return o.forEach((X1)=>v0.delete(X1)),v0})},5000)},[Y]);let b0=(o)=>{return g.find((v0)=>v0.id===o)?.name||o},e=(o)=>{if(o>=1e6)return(o/1e6).toFixed(1)+"M";if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()},y0={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},I0={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},i=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],R0=(o)=>{m((T0)=>{let v0=new Set(T0);if(v0.has(o))v0.delete(o);else v0.add(o);return v0})},O0=[{value:"",label:"All Agents"},...s.map((o)=>({value:o.id,label:o.name}))],q0=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return l0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:l0.jsxDEV("div",{children:[l0.jsxDEV("div",{className:"mb-6",children:[l0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[U&&l0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}},void 0,!1,void 0,this),l0.jsxDEV("h1",{className:"text-2xl font-semibold",children:G===null?"Telemetry":G==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${U?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&l0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[l0.jsxDEV(uQ,{label:"Events",value:e(z0.total_events)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"LLM Calls",value:e(z0.total_llm_calls)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Tool Calls",value:e(z0.total_tool_calls)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Errors",value:e(z0.total_errors),color:"red"},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Input Tokens",value:e(z0.total_input_tokens)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Output Tokens",value:e(z0.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0.length>0&&l0.jsxDEV("div",{className:"mb-6",children:[l0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:l0.jsxDEV("table",{className:"w-full text-sm",children:[l0.jsxDEV("thead",{children:l0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[l0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("tbody",{children:Q0.map((o)=>l0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[l0.jsxDEV("td",{className:"p-3 font-medium",children:b0(o.agent_id)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.llm_calls)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.tool_calls)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.input_tokens)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.output_tokens)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right",children:o.errors>0?l0.jsxDEV("span",{className:"text-red-400",children:o.errors},void 0,!1,void 0,this):l0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},o.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[l0.jsxDEV("div",{className:"w-44",children:l0.jsxDEV(J7,{value:w.agent_id,options:O0,onChange:(o)=>f({...w,agent_id:o}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:i.map((o)=>{let T0=v.has(o),v0=I0[o]||"bg-[#222] text-[#888] border-[#333]";return l0.jsxDEV("button",{onClick:()=>R0(o),className:`px-2 py-0.5 rounded text-xs border transition-all ${T0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":v0}`,children:o},o,!1,void 0,this)})},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex items-center gap-2",children:[l0.jsxDEV("div",{className:"w-36",children:l0.jsxDEV(J7,{value:w.level,options:q0,onChange:(o)=>f({...w,level:o}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("button",{onClick:D,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[l0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[l0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&l0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P&&U0.length===0?l0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):U0.length===0?l0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):l0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:U0.map((o)=>{let T0=j.has(o.id);return l0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${T0?"bg-green-500/5":""}`,style:{animation:T0?"slideIn 0.3s ease-out":void 0},onClick:()=>k(V===o.id?null:o.id),children:l0.jsxDEV("div",{className:"flex items-start gap-3",children:[l0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${I0[o.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:o.category},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex-1 min-w-0",children:[l0.jsxDEV("div",{className:"flex items-center gap-2",children:[l0.jsxDEV("span",{className:"font-medium text-sm",children:o.type},void 0,!1,void 0,this),l0.jsxDEV("span",{className:`text-xs ${y0[o.level]||"text-[#666]"}`,children:o.level},void 0,!1,void 0,this),o.duration_ms&&l0.jsxDEV("span",{className:"text-xs text-[#555]",children:[o.duration_ms,"ms"]},void 0,!0,void 0,this),l0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${T0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[b0(o.agent_id)," · ",new Date(o.timestamp).toLocaleString()]},void 0,!0,void 0,this),o.error&&l0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:o.error},void 0,!1,void 0,this),V===o.id&&o.data&&Object.keys(o.data).length>0&&l0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(o.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},o.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function uQ({label:Y,value:G,color:U}){return l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[l0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),l0.jsxDEV("div",{className:`text-2xl font-semibold ${U==="red"?"text-red-400":""}`,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var K5=B0(f1(),1);var C0=B0(U1(),1),WT={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function KT({method:Y,path:G,parameters:U,requestBody:O,authFetch:q}){let[R,K]=K5.useState({}),[_,A]=K5.useState(""),[b,P]=K5.useState(null),[M,w]=K5.useState(!1),[f,v]=K5.useState(null);K5.useEffect(()=>{if(O?.content?.["application/json"]?.schema){let k=O.content["application/json"].schema;if(k.example)A(JSON.stringify(k.example,null,2));else if(k.properties){let x={};for(let[j,u]of Object.entries(k.properties))if(u.example!==void 0)x[j]=u.example;else if(u.type==="string")x[j]="";else if(u.type==="number"||u.type==="integer")x[j]=0;else if(u.type==="boolean")x[j]=!1;else if(u.type==="array")x[j]=[];else if(u.type==="object")x[j]={};A(JSON.stringify(x,null,2))}}},[O]);let m=async()=>{w(!0),v(null),P(null);try{let k=G,x=[];for(let a of U||[]){let D=R[a.name]||"";if(a.in==="path")k=k.replace(`{${a.name}}`,encodeURIComponent(D));else if(a.in==="query"&&D)x.push(`${a.name}=${encodeURIComponent(D)}`)}if(x.length>0)k+=`?${x.join("&")}`;let j={method:Y.toUpperCase()};if(_&&["post","put","patch"].includes(Y))j.headers={"Content-Type":"application/json"},j.body=_;let u=await q(`/api${k}`,j),p;if(u.headers.get("content-type")?.includes("application/json"))p=await u.json();else p=await u.text();P({status:u.status,data:p})}catch(k){v(k.message||"Request failed")}finally{w(!1)}},g=U?.filter((k)=>k.in==="path")||[],C=U?.filter((k)=>k.in==="query")||[],V=["post","put","patch"].includes(Y)&&O;return C0.jsxDEV("div",{style:{marginTop:16,padding:16,background:"#0a0a14",borderRadius:6,border:"1px solid #222"},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#f97316",marginBottom:12,fontWeight:600},children:"Try it out"},void 0,!1,void 0,this),g.length>0&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Path Parameters"},void 0,!1,void 0,this),g.map((k)=>C0.jsxDEV("div",{style:{marginBottom:8},children:[C0.jsxDEV("label",{style:{fontSize:12,color:"#888",display:"block",marginBottom:4},children:[k.name," ",k.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("input",{type:"text",value:R[k.name]||"",onChange:(x)=>K({...R,[k.name]:x.target.value}),placeholder:k.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},k.name,!0,void 0,this))]},void 0,!0,void 0,this),C.length>0&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Query Parameters"},void 0,!1,void 0,this),C.map((k)=>C0.jsxDEV("div",{style:{marginBottom:8},children:[C0.jsxDEV("label",{style:{fontSize:12,color:"#888",display:"block",marginBottom:4},children:[k.name," ",k.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("input",{type:"text",value:R[k.name]||"",onChange:(x)=>K({...R,[k.name]:x.target.value}),placeholder:k.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},k.name,!0,void 0,this))]},void 0,!0,void 0,this),V&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Request Body (JSON)"},void 0,!1,void 0,this),C0.jsxDEV("textarea",{value:_,onChange:(k)=>A(k.target.value),rows:6,style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:12,fontFamily:"monospace",resize:"vertical"}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("button",{onClick:m,disabled:M,style:{padding:"10px 20px",background:M?"#333":"#f97316",color:M?"#666":"#000",border:"none",borderRadius:4,cursor:M?"not-allowed":"pointer",fontSize:13,fontWeight:600},children:M?"Executing...":"Execute"},void 0,!1,void 0,this),f&&C0.jsxDEV("div",{style:{marginTop:12,padding:12,background:"#2a1515",borderRadius:4,color:"#f66",fontSize:12},children:f},void 0,!1,void 0,this),b&&C0.jsxDEV("div",{style:{marginTop:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:["Response"," ",C0.jsxDEV("span",{style:{color:b.status>=200&&b.status<300?"#49cc90":"#f66"},children:b.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("pre",{style:{padding:12,background:"#111",borderRadius:4,color:"#888",fontSize:11,fontFamily:"monospace",overflow:"auto",maxHeight:300,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:typeof b.data==="string"?b.data:JSON.stringify(b.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function LO(){let{authFetch:Y}=T1(),[G,U]=K5.useState(null),[O,q]=K5.useState(!0),[R,K]=K5.useState(new Set),[_,A]=K5.useState(null),[b,P]=K5.useState(!1);K5.useEffect(()=>{f()},[]);async function M(){if(!G)return;try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),P(!0),setTimeout(()=>P(!1),2000)}catch(j){console.error("Failed to copy:",j)}}function w(){if(!G)return;let j=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),u=URL.createObjectURL(j),p=document.createElement("a");p.href=u,p.download="apteva-openapi.json",p.click(),URL.revokeObjectURL(u)}async function f(){try{let j=await Y("/api/openapi");if(j.ok){let u=await j.json();U(u)}}catch(j){console.error("Failed to load OpenAPI spec:",j)}finally{q(!1)}}function v(j){K((u)=>{let p=new Set(u);if(p.has(j))p.delete(j);else p.add(j);return p})}function m(j,u=0){if(!j)return"{}";if(u>2)return"...";if(j.$ref)return j.$ref.split("/").pop()||"Object";if(j.type==="array")return`${m(j.items,u+1)}[]`;if(j.type==="object"&&j.properties){let p=Object.entries(j.properties).slice(0,3).map(([a,D])=>`${a}: ${D.type||"any"}`).join(", "),s=Object.keys(j.properties).length>3?", ...":"";return`{ ${p}${s} }`}return j.type||"any"}if(O)return C0.jsxDEV("div",{style:{padding:24},children:C0.jsxDEV("p",{style:{color:"#888"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!G)return C0.jsxDEV("div",{style:{padding:24},children:C0.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let g=G.tags||[],C=Object.entries(G.paths);function V(j){let u=new Set;function p(s){if(!s)return;if(typeof s==="object"){if(s.$ref){let a=s.$ref.split("/").pop();if(a)u.add(a)}for(let a of Object.values(s))p(a)}}return p(j.requestBody),p(j.responses),u}function k(){if(!_||!G.components?.schemas)return Object.keys(G.components?.schemas||{});let j=new Set;for(let[u,p]of x)for(let[s,a]of Object.entries(p)){if(!["get","post","put","delete","patch"].includes(s))continue;if(a.tags?.includes(_))V(a).forEach((z0)=>j.add(z0))}return Array.from(j)}let x=_?C.filter(([j,u])=>Object.values(u).some((p)=>p.tags?.includes(_))):C;return C0.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[C0.jsxDEV("div",{style:{marginBottom:24},children:[C0.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[C0.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:G.info.title},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{display:"flex",gap:8},children:[C0.jsxDEV("button",{onClick:M,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:b?"#49cc90":"#1a1a2e",color:b?"#000":"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:b?"Copied!":"Copy JSON"},void 0,!1,void 0,this),C0.jsxDEV("button",{onClick:w,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:"#1a1a2e",color:"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:"Download"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("p",{style:{color:"#888",marginBottom:8},children:G.info.description.split(`
|
|
225
|
-
`)[0]},void 0,!1,void 0,this),C0.jsxDEV("p",{style:{color:"#666",fontSize:12},children:["Version: ",G.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[C0.jsxDEV("span",{style:{color:"#888"},children:"Base URL: "},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[C0.jsxDEV("button",{onClick:()=>A(null),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===null?"#333":"transparent",color:_===null?"#fff":"#888",cursor:"pointer",fontSize:12},children:"All"},void 0,!1,void 0,this),g.map((j)=>C0.jsxDEV("button",{onClick:()=>A(j.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===j.name?"#333":"transparent",color:_===j.name?"#fff":"#888",cursor:"pointer",fontSize:12},title:j.description,children:j.name},j.name,!1,void 0,this))]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:x.map(([j,u])=>Object.entries(u).filter(([p])=>["get","post","put","delete","patch"].includes(p)).map(([p,s])=>{let a=`${p}:${j}`,D=R.has(a),z0=p.toUpperCase(),Q0=WT[p]||"#888";return C0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,overflow:"hidden"},children:[C0.jsxDEV("div",{onClick:()=>v(a),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:D?"#1a1a2e":"transparent",cursor:"pointer"},children:[C0.jsxDEV("span",{style:{background:Q0,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:z0},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{fontFamily:"monospace",color:"#fff"},children:j},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888",flex:1,fontSize:13},children:s.summary},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#666",fontSize:12},children:D?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D&&C0.jsxDEV("div",{style:{padding:16,background:"#0d0d1a",borderTop:"1px solid #333"},children:[s.description&&C0.jsxDEV("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:s.description},void 0,!1,void 0,this),s.parameters&&s.parameters.length>0&&C0.jsxDEV("div",{style:{marginBottom:16},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:s.parameters.map((U0)=>C0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[C0.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[U0.name,U0.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("span",{style:{color:"#666"},children:["(",U0.in,")"]},void 0,!0,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:U0.schema?.type||"string"},void 0,!1,void 0,this),U0.description&&C0.jsxDEV("span",{style:{color:"#666"},children:["- ",U0.description]},void 0,!0,void 0,this)]},U0.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),s.requestBody&&C0.jsxDEV("div",{style:{marginBottom:16},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:["Request Body",s.requestBody.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(s.requestBody.content||{}).map(([U0,b0])=>C0.jsxDEV("div",{children:[C0.jsxDEV("span",{style:{color:"#666"},children:[U0,": "]},void 0,!0,void 0,this),m(b0.schema)]},U0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),s.responses&&C0.jsxDEV("div",{children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:Object.entries(s.responses).map(([U0,b0])=>{let e=b0.content?.["application/json"]?.schema,y0=e?.$ref?.split("/").pop(),I0=e?.type,i=e?.items?.$ref?.split("/").pop();return C0.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[C0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[C0.jsxDEV("span",{style:{color:U0.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:U0},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:b0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e&&C0.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"#0d0d1a",borderRadius:4,fontFamily:"monospace"},children:y0?C0.jsxDEV("span",{style:{color:"#61affe"},children:y0},void 0,!1,void 0,this):I0==="array"&&i?C0.jsxDEV("span",{style:{color:"#61affe"},children:[i,"[]"]},void 0,!0,void 0,this):I0==="array"?C0.jsxDEV("span",{style:{color:"#888"},children:"array"},void 0,!1,void 0,this):C0.jsxDEV("span",{style:{color:"#888"},children:m(e)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},U0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV(KT,{method:p,path:j,parameters:s.parameters,requestBody:s.requestBody,authFetch:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},a,!0,void 0,this)}))},void 0,!1,void 0,this),G.components?.schemas&&k().length>0&&C0.jsxDEV("div",{style:{marginTop:32},children:[C0.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",_&&C0.jsxDEV("span",{style:{color:"#666",fontSize:14},children:["(",_,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:k().map((j)=>{let u=G.components.schemas[j];if(!u)return null;return C0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,padding:12},children:[C0.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:j},void 0,!1,void 0,this),u.properties&&C0.jsxDEV("div",{style:{fontSize:12},children:Object.entries(u.properties).map(([p,s])=>C0.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[C0.jsxDEV("span",{style:{color:"#fff",minWidth:120},children:p},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:[s.type||(s.$ref?s.$ref.split("/").pop():"any"),s.nullable&&" | null"]},void 0,!0,void 0,this),s.enum&&C0.jsxDEV("span",{style:{color:"#666"},children:["[",s.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},p,!0,void 0,this))},void 0,!1,void 0,this)]},j,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var w4=B0(U1(),1);function OT(){let{isAuthenticated:Y,isLoading:G,hasUsers:U,accessToken:O,checkAuth:q}=T1(),{refreshProjects:R}=u4(),{isComplete:K,setIsComplete:_}=jG(),A=()=>{return O?{Authorization:`Bearer ${O}`}:{}},b=Y&&K===!0,{agents:P,loading:M,runningCount:w,fetchAgents:f,createAgent:v,updateAgent:m,deleteAgent:g,toggleAgent:C}=gG(b),{providers:V,configuredProviders:k,fetchProviders:x}=xG(b),j=k.filter((f0)=>f0.type==="llm"),[u,p]=u5.useState(!1),[s,a]=u5.useState(null),[D,z0]=u5.useState("dashboard"),[Q0,U0]=u5.useState(null),[b0,e]=u5.useState(0),[y0,I0]=u5.useState(!1);u5.useEffect(()=>{if(!b)return;let f0=async()=>{try{let J1=await fetch("/api/tasks?status=pending",{headers:A()});if(J1.ok){let A0=await J1.json();e(A0.count||0)}}catch{}};f0();let o0=setInterval(f0,15000);return()=>clearInterval(o0)},[b,O]);let[i,R0]=u5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]});u5.useEffect(()=>{if(j.length>0&&!i.provider){let f0=j[0],o0=f0.models.find((J1)=>J1.recommended)?.value||f0.models[0]?.value||"";R0((J1)=>({...J1,provider:f0.id,model:o0}))}},[j,i.provider]),u5.useEffect(()=>{if(s){let f0=P.find((o0)=>o0.id===s.id);if(f0)a(f0);else a(null)}},[P,s]);let O0=(f0)=>{let o0=V.find((A0)=>A0.id===f0),J1=o0?.models.find((A0)=>A0.recommended)?.value||o0?.models[0]?.value||"";R0((A0)=>({...A0,provider:f0,model:J1}))},q0=async()=>{if(!i.name)return;await v(i),await R();let f0=j[0],o0=f0?.models.find((J1)=>J1.recommended)?.value||f0?.models[0]?.value||"";R0({name:"",model:o0,provider:f0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]}),p(!1)},o=async(f0,o0)=>{o0?.stopPropagation(),U0(null);let J1=await C(f0);if(J1.error)U0(J1.error)},T0=async(f0,o0)=>{if(o0?.stopPropagation(),s?.id===f0)a(null);await g(f0),await R()},v0=(f0)=>{a(f0),U0(null),z0("agents")},X1=(f0)=>{z0(f0),a(null)},r0=()=>{_(!0),x(),q()};if(G||U===null)return w4.jsxDEV(wz,{fullScreen:!0},void 0,!1,void 0,this);if(!U)return w4.jsxDEV(gZ,{onComplete:r0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return w4.jsxDEV(O3,{},void 0,!1,void 0,this);if(K===null)return w4.jsxDEV(wz,{fullScreen:!0},void 0,!1,void 0,this);if(!K)return w4.jsxDEV(gZ,{onComplete:r0,needsAccount:!1},void 0,!1,void 0,this);return w4.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[w4.jsxDEV(U3,{onMenuClick:()=>I0(!0)},void 0,!1,void 0,this),Q0&&w4.jsxDEV(K3,{message:Q0,onDismiss:()=>U0(null)},void 0,!1,void 0,this),w4.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[w4.jsxDEV(W3,{route:D,agentCount:P.length,taskCount:b0,onNavigate:X1,isOpen:y0,onClose:()=>I0(!1)},void 0,!1,void 0,this),w4.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[D==="settings"&&w4.jsxDEV(L3,{},void 0,!1,void 0,this),D==="agents"&&w4.jsxDEV(w3,{agents:P,loading:M,selectedAgent:s,providers:V,onSelectAgent:v0,onCloseAgent:()=>a(null),onToggleAgent:o,onDeleteAgent:T0,onUpdateAgent:m,onNewAgent:()=>p(!0),canCreateAgent:j.length>0},void 0,!1,void 0,this),D==="dashboard"&&w4.jsxDEV(P3,{agents:P,loading:M,runningCount:w,configuredProviders:k,onNavigate:X1,onSelectAgent:v0},void 0,!1,void 0,this),D==="tasks"&&w4.jsxDEV(b3,{},void 0,!1,void 0,this),D==="mcp"&&w4.jsxDEV(A3,{},void 0,!1,void 0,this),D==="skills"&&w4.jsxDEV($2,{},void 0,!1,void 0,this),D==="telemetry"&&w4.jsxDEV(H2,{},void 0,!1,void 0,this),D==="api"&&w4.jsxDEV(LO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u&&w4.jsxDEV(N3,{form:i,providers:V,configuredProviders:k,onFormChange:R0,onProviderChange:O0,onCreate:q0,onClose:()=>p(!1),onGoToSettings:()=>{p(!1),z0("settings")}},void 0,!1,void 0,this),w4.jsxDEV(BO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _T(){return w4.jsxDEV(mG,{children:w4.jsxDEV(uG,{children:w4.jsxDEV(GO,{children:w4.jsxDEV(VG,{children:w4.jsxDEV(OT,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var LT=RO.createRoot(document.getElementById("root"));LT.render(w4.jsxDEV(_T,{},void 0,!1,void 0,this));
|
|
225
|
+
Your skill instructions here...`,rows:16,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[n.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:async()=>{if(!O.trim()){A("Paste SKILL.md content");return}K(!0),A(null);try{let P=await Y("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:O})}),M=await P.json();if(!P.ok){A(M.error||"Failed to import skill"),K(!1);return}U()}catch(P){A("Failed to import skill"),K(!1)}},disabled:R,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:R?"Importing...":"Import Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function UT({skill:Y,authFetch:G,onClose:U,onUpdated:O}){let[q,R]=Z4.useState(!1),[K,_]=Z4.useState(Y.content),[A,b]=Z4.useState(!1),P=async()=>{b(!0);try{await G(`/api/skills/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:K})}),O()}catch(w){console.error("Failed to save:",w)}b(!1)},M=async()=>{try{let f=await(await G(`/api/skills/${Y.id}/export`)).text(),v=new Blob([f],{type:"text/markdown"}),m=URL.createObjectURL(v),g=document.createElement("a");g.href=m,g.download=`${Y.name}-SKILL.md`,g.click(),URL.revokeObjectURL(m)}catch(w){console.error("Failed to export:",w)}};return n.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:U,children:n.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(w)=>w.stopPropagation(),children:[n.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a] flex items-center justify-between",children:[n.jsxDEV("div",{children:[n.jsxDEV("h2",{className:"text-xl font-semibold",children:Y.name},void 0,!1,void 0,this),n.jsxDEV("p",{className:"text-sm text-[#666] mt-0.5",children:Y.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:M,className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:"Export"},void 0,!1,void 0,this),n.jsxDEV("button",{onClick:()=>R(!q),className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:q?"View":"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),n.jsxDEV("div",{className:"p-6",children:q?n.jsxDEV("textarea",{value:K,onChange:(w)=>_(w.target.value),rows:20,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this):n.jsxDEV("pre",{className:"bg-[#0a0a0a] border border-[#222] rounded p-4 font-mono text-sm overflow-auto max-h-[60vh] whitespace-pre-wrap",children:Y.content},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-between",children:[n.jsxDEV("div",{className:"text-xs text-[#555]",children:Y.source!=="local"&&Y.source_url&&n.jsxDEV("a",{href:Y.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"View source →"},void 0,!1,void 0,this)},void 0,!1,void 0,this),n.jsxDEV("div",{className:"flex gap-3",children:[n.jsxDEV("button",{onClick:U,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),q&&n.jsxDEV("button",{onClick:P,disabled:A,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:A?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var x4=B0(f1(),1);var l0=B0(U1(),1);function _O(Y){let G=Y.category==="LLM",U=Y.category==="TOOL",O=Y.level==="error",q=Y.data?.input_tokens||0,R=Y.data?.output_tokens||0;return{llm_calls:G?1:0,tool_calls:U?1:0,errors:O?1:0,input_tokens:q,output_tokens:R}}function H2(){let{events:Y}=F6(),{currentProjectId:G,currentProject:U}=h4(),{authFetch:O}=T1(),[q,R]=x4.useState(null),[K,_]=x4.useState([]),[A,b]=x4.useState([]),[P,M]=x4.useState(!0),[w,f]=x4.useState({level:"",agent_id:""}),[v,m]=x4.useState(new Set(["DATABASE"])),[g,C]=x4.useState([]),[V,k]=x4.useState(null),x=x4.useRef(new Set),[j,u]=x4.useState(new Set),p=x4.useRef(new Set);x4.useEffect(()=>{(async()=>{try{let v0=await(await O("/api/agents")).json();C(v0.agents||[])}catch(T0){console.error("Failed to fetch agents:",T0)}})()},[O]);let s=x4.useMemo(()=>{if(G===null)return g;if(G==="unassigned")return g.filter((o)=>!o.projectId);return g.filter((o)=>o.projectId===G)},[g,G]),a=x4.useMemo(()=>new Set(s.map((o)=>o.id)),[s]),D=async()=>{M(!0);try{let o=G==="unassigned"?"null":G||"",T0=new URLSearchParams;if(o)T0.set("project_id",o);let X1=await(await O(`/api/telemetry/stats${T0.toString()?`?${T0}`:""}`)).json();R(X1.stats);let r0=new URLSearchParams;if(w.level)r0.set("level",w.level);if(w.agent_id)r0.set("agent_id",w.agent_id);if(o)r0.set("project_id",o);r0.set("limit","100");let J1=(await(await O(`/api/telemetry/events?${r0}`)).json()).events||[];_(J1),x.current=new Set(J1.map((l1)=>l1.id));let A0=new URLSearchParams;if(A0.set("group_by","agent"),o)A0.set("project_id",o);let h1=await(await O(`/api/telemetry/usage?${A0}`)).json();b(h1.usage||[])}catch(o){console.error("Failed to fetch telemetry:",o)}M(!1)};x4.useEffect(()=>{D();let o=setInterval(D,60000);return()=>clearInterval(o)},[w,G,O]);let z0=x4.useMemo(()=>{if(!q)return null;let o=0,T0=0,v0=0,X1=0,r0=0,f0=0;for(let o0 of Y)if(!x.current.has(o0.id)){o++;let J1=_O(o0);T0+=J1.llm_calls,v0+=J1.tool_calls,X1+=J1.errors,r0+=J1.input_tokens,f0+=J1.output_tokens}return{total_events:q.total_events+o,total_llm_calls:q.total_llm_calls+T0,total_tool_calls:q.total_tool_calls+v0,total_errors:q.total_errors+X1,total_input_tokens:q.total_input_tokens+r0,total_output_tokens:q.total_output_tokens+f0}},[q,Y]),Q0=x4.useMemo(()=>{let o=new Map;for(let T0 of A)o.set(T0.agent_id,{...T0});for(let T0 of Y)if(!x.current.has(T0.id)){let v0=_O(T0),X1=o.get(T0.agent_id);if(X1)X1.llm_calls+=v0.llm_calls,X1.tool_calls+=v0.tool_calls,X1.errors+=v0.errors,X1.input_tokens+=v0.input_tokens,X1.output_tokens+=v0.output_tokens;else o.set(T0.agent_id,{agent_id:T0.agent_id,llm_calls:v0.llm_calls,tool_calls:v0.tool_calls,errors:v0.errors,input_tokens:v0.input_tokens,output_tokens:v0.output_tokens})}return Array.from(o.values())},[A,Y]),U0=x4.default.useMemo(()=>{let o=Y;if(G!==null)o=o.filter((r0)=>a.has(r0.agent_id));if(w.agent_id)o=o.filter((r0)=>r0.agent_id===w.agent_id);if(v.size>0)o=o.filter((r0)=>!v.has(r0.category));if(w.level)o=o.filter((r0)=>r0.level===w.level);let T0=K;if(v.size>0)T0=T0.filter((r0)=>!v.has(r0.category));let v0=new Set(o.map((r0)=>r0.id)),X1=[...o];for(let r0 of T0)if(!v0.has(r0.id))X1.push(r0),v0.add(r0.id);return X1.sort((r0,f0)=>new Date(f0.timestamp).getTime()-new Date(r0.timestamp).getTime()),X1.slice(0,100)},[Y,K,w,v,G,a]);x4.useEffect(()=>{let o=[];for(let T0 of Y)if(!p.current.has(T0.id))p.current.add(T0.id),o.push(T0.id);if(o.length>0)u((T0)=>{let v0=new Set(T0);return o.forEach((X1)=>v0.add(X1)),v0}),setTimeout(()=>{u((T0)=>{let v0=new Set(T0);return o.forEach((X1)=>v0.delete(X1)),v0})},5000)},[Y]);let b0=(o)=>{return g.find((v0)=>v0.id===o)?.name||o},e=(o)=>{if(o>=1e6)return(o/1e6).toFixed(1)+"M";if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()},y0={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},I0={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},i=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],R0=(o)=>{m((T0)=>{let v0=new Set(T0);if(v0.has(o))v0.delete(o);else v0.add(o);return v0})},O0=[{value:"",label:"All Agents"},...s.map((o)=>({value:o.id,label:o.name}))],q0=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return l0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:l0.jsxDEV("div",{children:[l0.jsxDEV("div",{className:"mb-6",children:[l0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[U&&l0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}},void 0,!1,void 0,this),l0.jsxDEV("h1",{className:"text-2xl font-semibold",children:G===null?"Telemetry":G==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${U?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z0&&l0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[l0.jsxDEV(uQ,{label:"Events",value:e(z0.total_events)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"LLM Calls",value:e(z0.total_llm_calls)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Tool Calls",value:e(z0.total_tool_calls)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Errors",value:e(z0.total_errors),color:"red"},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Input Tokens",value:e(z0.total_input_tokens)},void 0,!1,void 0,this),l0.jsxDEV(uQ,{label:"Output Tokens",value:e(z0.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q0.length>0&&l0.jsxDEV("div",{className:"mb-6",children:[l0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:l0.jsxDEV("table",{className:"w-full text-sm",children:[l0.jsxDEV("thead",{children:l0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[l0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),l0.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("tbody",{children:Q0.map((o)=>l0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[l0.jsxDEV("td",{className:"p-3 font-medium",children:b0(o.agent_id)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.llm_calls)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.tool_calls)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.input_tokens)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:e(o.output_tokens)},void 0,!1,void 0,this),l0.jsxDEV("td",{className:"p-3 text-right",children:o.errors>0?l0.jsxDEV("span",{className:"text-red-400",children:o.errors},void 0,!1,void 0,this):l0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},o.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[l0.jsxDEV("div",{className:"w-44",children:l0.jsxDEV(J7,{value:w.agent_id,options:O0,onChange:(o)=>f({...w,agent_id:o}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:i.map((o)=>{let T0=v.has(o),v0=I0[o]||"bg-[#222] text-[#888] border-[#333]";return l0.jsxDEV("button",{onClick:()=>R0(o),className:`px-2 py-0.5 rounded text-xs border transition-all ${T0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":v0}`,children:o},o,!1,void 0,this)})},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex items-center gap-2",children:[l0.jsxDEV("div",{className:"w-36",children:l0.jsxDEV(J7,{value:w.level,options:q0,onChange:(o)=>f({...w,level:o}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),l0.jsxDEV("button",{onClick:D,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[l0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[l0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&l0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P&&U0.length===0?l0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):U0.length===0?l0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):l0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:U0.map((o)=>{let T0=j.has(o.id);return l0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${T0?"bg-green-500/5":""}`,style:{animation:T0?"slideIn 0.3s ease-out":void 0},onClick:()=>k(V===o.id?null:o.id),children:l0.jsxDEV("div",{className:"flex items-start gap-3",children:[l0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${I0[o.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:o.category},void 0,!1,void 0,this),l0.jsxDEV("div",{className:"flex-1 min-w-0",children:[l0.jsxDEV("div",{className:"flex items-center gap-2",children:[l0.jsxDEV("span",{className:"font-medium text-sm",children:o.type},void 0,!1,void 0,this),l0.jsxDEV("span",{className:`text-xs ${y0[o.level]||"text-[#666]"}`,children:o.level},void 0,!1,void 0,this),o.duration_ms&&l0.jsxDEV("span",{className:"text-xs text-[#555]",children:[o.duration_ms,"ms"]},void 0,!0,void 0,this),l0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${T0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[b0(o.agent_id)," · ",new Date(o.timestamp).toLocaleString()]},void 0,!0,void 0,this),o.error&&l0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:o.error},void 0,!1,void 0,this),V===o.id&&o.data&&Object.keys(o.data).length>0&&l0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(o.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},o.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function uQ({label:Y,value:G,color:U}){return l0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[l0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),l0.jsxDEV("div",{className:`text-2xl font-semibold ${U==="red"?"text-red-400":""}`,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var K5=B0(f1(),1);var C0=B0(U1(),1),WT={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function KT({method:Y,path:G,parameters:U,requestBody:O,authFetch:q}){let[R,K]=K5.useState({}),[_,A]=K5.useState(""),[b,P]=K5.useState(null),[M,w]=K5.useState(!1),[f,v]=K5.useState(null);K5.useEffect(()=>{if(O?.content?.["application/json"]?.schema){let k=O.content["application/json"].schema;if(k.example)A(JSON.stringify(k.example,null,2));else if(k.properties){let x={};for(let[j,u]of Object.entries(k.properties))if(u.example!==void 0)x[j]=u.example;else if(u.type==="string")x[j]="";else if(u.type==="number"||u.type==="integer")x[j]=0;else if(u.type==="boolean")x[j]=!1;else if(u.type==="array")x[j]=[];else if(u.type==="object")x[j]={};A(JSON.stringify(x,null,2))}}},[O]);let m=async()=>{w(!0),v(null),P(null);try{let k=G,x=[];for(let a of U||[]){let D=R[a.name]||"";if(a.in==="path")k=k.replace(`{${a.name}}`,encodeURIComponent(D));else if(a.in==="query"&&D)x.push(`${a.name}=${encodeURIComponent(D)}`)}if(x.length>0)k+=`?${x.join("&")}`;let j={method:Y.toUpperCase()};if(_&&["post","put","patch"].includes(Y))j.headers={"Content-Type":"application/json"},j.body=_;let u=await q(`/api${k}`,j),p;if(u.headers.get("content-type")?.includes("application/json"))p=await u.json();else p=await u.text();P({status:u.status,data:p})}catch(k){v(k.message||"Request failed")}finally{w(!1)}},g=U?.filter((k)=>k.in==="path")||[],C=U?.filter((k)=>k.in==="query")||[],V=["post","put","patch"].includes(Y)&&O;return C0.jsxDEV("div",{style:{marginTop:16,padding:16,background:"#0a0a14",borderRadius:6,border:"1px solid #222"},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#f97316",marginBottom:12,fontWeight:600},children:"Try it out"},void 0,!1,void 0,this),g.length>0&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Path Parameters"},void 0,!1,void 0,this),g.map((k)=>C0.jsxDEV("div",{style:{marginBottom:8},children:[C0.jsxDEV("label",{style:{fontSize:12,color:"#888",display:"block",marginBottom:4},children:[k.name," ",k.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("input",{type:"text",value:R[k.name]||"",onChange:(x)=>K({...R,[k.name]:x.target.value}),placeholder:k.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},k.name,!0,void 0,this))]},void 0,!0,void 0,this),C.length>0&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Query Parameters"},void 0,!1,void 0,this),C.map((k)=>C0.jsxDEV("div",{style:{marginBottom:8},children:[C0.jsxDEV("label",{style:{fontSize:12,color:"#888",display:"block",marginBottom:4},children:[k.name," ",k.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("input",{type:"text",value:R[k.name]||"",onChange:(x)=>K({...R,[k.name]:x.target.value}),placeholder:k.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},k.name,!0,void 0,this))]},void 0,!0,void 0,this),V&&C0.jsxDEV("div",{style:{marginBottom:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:"Request Body (JSON)"},void 0,!1,void 0,this),C0.jsxDEV("textarea",{value:_,onChange:(k)=>A(k.target.value),rows:6,style:{width:"100%",padding:"8px 12px",background:"#111",border:"1px solid #333",borderRadius:4,color:"#fff",fontSize:12,fontFamily:"monospace",resize:"vertical"}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("button",{onClick:m,disabled:M,style:{padding:"10px 20px",background:M?"#333":"#f97316",color:M?"#666":"#000",border:"none",borderRadius:4,cursor:M?"not-allowed":"pointer",fontSize:13,fontWeight:600},children:M?"Executing...":"Execute"},void 0,!1,void 0,this),f&&C0.jsxDEV("div",{style:{marginTop:12,padding:12,background:"#2a1515",borderRadius:4,color:"#f66",fontSize:12},children:f},void 0,!1,void 0,this),b&&C0.jsxDEV("div",{style:{marginTop:12},children:[C0.jsxDEV("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:["Response"," ",C0.jsxDEV("span",{style:{color:b.status>=200&&b.status<300?"#49cc90":"#f66"},children:b.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("pre",{style:{padding:12,background:"#111",borderRadius:4,color:"#888",fontSize:11,fontFamily:"monospace",overflow:"auto",maxHeight:300,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:typeof b.data==="string"?b.data:JSON.stringify(b.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function LO(){let{authFetch:Y}=T1(),[G,U]=K5.useState(null),[O,q]=K5.useState(!0),[R,K]=K5.useState(new Set),[_,A]=K5.useState(null),[b,P]=K5.useState(!1);K5.useEffect(()=>{f()},[]);async function M(){if(!G)return;try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),P(!0),setTimeout(()=>P(!1),2000)}catch(j){console.error("Failed to copy:",j)}}function w(){if(!G)return;let j=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),u=URL.createObjectURL(j),p=document.createElement("a");p.href=u,p.download="apteva-openapi.json",p.click(),URL.revokeObjectURL(u)}async function f(){try{let j=await Y("/api/openapi");if(j.ok){let u=await j.json();U(u)}}catch(j){console.error("Failed to load OpenAPI spec:",j)}finally{q(!1)}}function v(j){K((u)=>{let p=new Set(u);if(p.has(j))p.delete(j);else p.add(j);return p})}function m(j,u=0){if(!j)return"{}";if(u>2)return"...";if(j.$ref)return j.$ref.split("/").pop()||"Object";if(j.type==="array")return`${m(j.items,u+1)}[]`;if(j.type==="object"&&j.properties){let p=Object.entries(j.properties).slice(0,3).map(([a,D])=>`${a}: ${D.type||"any"}`).join(", "),s=Object.keys(j.properties).length>3?", ...":"";return`{ ${p}${s} }`}return j.type||"any"}if(O)return C0.jsxDEV("div",{style:{padding:24},children:C0.jsxDEV("p",{style:{color:"#888"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!G)return C0.jsxDEV("div",{style:{padding:24},children:C0.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let g=G.tags||[],C=Object.entries(G.paths);function V(j){let u=new Set;function p(s){if(!s)return;if(typeof s==="object"){if(s.$ref){let a=s.$ref.split("/").pop();if(a)u.add(a)}for(let a of Object.values(s))p(a)}}return p(j.requestBody),p(j.responses),u}function k(){if(!_||!G.components?.schemas)return Object.keys(G.components?.schemas||{});let j=new Set;for(let[u,p]of x)for(let[s,a]of Object.entries(p)){if(!["get","post","put","delete","patch"].includes(s))continue;if(a.tags?.includes(_))V(a).forEach((z0)=>j.add(z0))}return Array.from(j)}let x=_?C.filter(([j,u])=>Object.values(u).some((p)=>p.tags?.includes(_))):C;return C0.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[C0.jsxDEV("div",{style:{marginBottom:24},children:[C0.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[C0.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:G.info.title},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{display:"flex",gap:8},children:[C0.jsxDEV("button",{onClick:M,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:b?"#49cc90":"#1a1a2e",color:b?"#000":"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:b?"Copied!":"Copy JSON"},void 0,!1,void 0,this),C0.jsxDEV("button",{onClick:w,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:"#1a1a2e",color:"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:"Download"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("p",{style:{color:"#888",marginBottom:8},children:G.info.description.split(`
|
|
226
|
+
`)[0]},void 0,!1,void 0,this),C0.jsxDEV("p",{style:{color:"#666",fontSize:12},children:["Version: ",G.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[C0.jsxDEV("span",{style:{color:"#888"},children:"Base URL: "},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[C0.jsxDEV("button",{onClick:()=>A(null),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===null?"#333":"transparent",color:_===null?"#fff":"#888",cursor:"pointer",fontSize:12},children:"All"},void 0,!1,void 0,this),g.map((j)=>C0.jsxDEV("button",{onClick:()=>A(j.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===j.name?"#333":"transparent",color:_===j.name?"#fff":"#888",cursor:"pointer",fontSize:12},title:j.description,children:j.name},j.name,!1,void 0,this))]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:x.map(([j,u])=>Object.entries(u).filter(([p])=>["get","post","put","delete","patch"].includes(p)).map(([p,s])=>{let a=`${p}:${j}`,D=R.has(a),z0=p.toUpperCase(),Q0=WT[p]||"#888";return C0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,overflow:"hidden"},children:[C0.jsxDEV("div",{onClick:()=>v(a),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:D?"#1a1a2e":"transparent",cursor:"pointer"},children:[C0.jsxDEV("span",{style:{background:Q0,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:z0},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{fontFamily:"monospace",color:"#fff"},children:j},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888",flex:1,fontSize:13},children:s.summary},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#666",fontSize:12},children:D?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D&&C0.jsxDEV("div",{style:{padding:16,background:"#0d0d1a",borderTop:"1px solid #333"},children:[s.description&&C0.jsxDEV("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:s.description},void 0,!1,void 0,this),s.parameters&&s.parameters.length>0&&C0.jsxDEV("div",{style:{marginBottom:16},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:s.parameters.map((U0)=>C0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[C0.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[U0.name,U0.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("span",{style:{color:"#666"},children:["(",U0.in,")"]},void 0,!0,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:U0.schema?.type||"string"},void 0,!1,void 0,this),U0.description&&C0.jsxDEV("span",{style:{color:"#666"},children:["- ",U0.description]},void 0,!0,void 0,this)]},U0.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),s.requestBody&&C0.jsxDEV("div",{style:{marginBottom:16},children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:["Request Body",s.requestBody.required&&C0.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(s.requestBody.content||{}).map(([U0,b0])=>C0.jsxDEV("div",{children:[C0.jsxDEV("span",{style:{color:"#666"},children:[U0,": "]},void 0,!0,void 0,this),m(b0.schema)]},U0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),s.responses&&C0.jsxDEV("div",{children:[C0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),C0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:Object.entries(s.responses).map(([U0,b0])=>{let e=b0.content?.["application/json"]?.schema,y0=e?.$ref?.split("/").pop(),I0=e?.type,i=e?.items?.$ref?.split("/").pop();return C0.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[C0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[C0.jsxDEV("span",{style:{color:U0.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:U0},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:b0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e&&C0.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"#0d0d1a",borderRadius:4,fontFamily:"monospace"},children:y0?C0.jsxDEV("span",{style:{color:"#61affe"},children:y0},void 0,!1,void 0,this):I0==="array"&&i?C0.jsxDEV("span",{style:{color:"#61affe"},children:[i,"[]"]},void 0,!0,void 0,this):I0==="array"?C0.jsxDEV("span",{style:{color:"#888"},children:"array"},void 0,!1,void 0,this):C0.jsxDEV("span",{style:{color:"#888"},children:m(e)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},U0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV(KT,{method:p,path:j,parameters:s.parameters,requestBody:s.requestBody,authFetch:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},a,!0,void 0,this)}))},void 0,!1,void 0,this),G.components?.schemas&&k().length>0&&C0.jsxDEV("div",{style:{marginTop:32},children:[C0.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",_&&C0.jsxDEV("span",{style:{color:"#666",fontSize:14},children:["(",_,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:k().map((j)=>{let u=G.components.schemas[j];if(!u)return null;return C0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,padding:12},children:[C0.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:j},void 0,!1,void 0,this),u.properties&&C0.jsxDEV("div",{style:{fontSize:12},children:Object.entries(u.properties).map(([p,s])=>C0.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[C0.jsxDEV("span",{style:{color:"#fff",minWidth:120},children:p},void 0,!1,void 0,this),C0.jsxDEV("span",{style:{color:"#888"},children:[s.type||(s.$ref?s.$ref.split("/").pop():"any"),s.nullable&&" | null"]},void 0,!0,void 0,this),s.enum&&C0.jsxDEV("span",{style:{color:"#666"},children:["[",s.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},p,!0,void 0,this))},void 0,!1,void 0,this)]},j,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var w4=B0(U1(),1);function OT(){let{isAuthenticated:Y,isLoading:G,hasUsers:U,accessToken:O,checkAuth:q}=T1(),{refreshProjects:R}=h4(),{isComplete:K,setIsComplete:_}=jG(),A=()=>{return O?{Authorization:`Bearer ${O}`}:{}},b=Y&&K===!0,{agents:P,loading:M,runningCount:w,fetchAgents:f,createAgent:v,updateAgent:m,deleteAgent:g,toggleAgent:C}=gG(b),{providers:V,configuredProviders:k,fetchProviders:x}=xG(b),j=k.filter((f0)=>f0.type==="llm"),[u,p]=g5.useState(!1),[s,a]=g5.useState(null),[D,z0]=g5.useState("dashboard"),[Q0,U0]=g5.useState(null),[b0,e]=g5.useState(0),[y0,I0]=g5.useState(!1);g5.useEffect(()=>{if(!b)return;let f0=async()=>{try{let J1=await fetch("/api/tasks?status=pending",{headers:A()});if(J1.ok){let A0=await J1.json();e(A0.count||0)}}catch{}};f0();let o0=setInterval(f0,15000);return()=>clearInterval(o0)},[b,O]);let[i,R0]=g5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]});g5.useEffect(()=>{if(j.length>0&&!i.provider){let f0=j[0],o0=f0.models.find((J1)=>J1.recommended)?.value||f0.models[0]?.value||"";R0((J1)=>({...J1,provider:f0.id,model:o0}))}},[j,i.provider]),g5.useEffect(()=>{if(s){let f0=P.find((o0)=>o0.id===s.id);if(f0)a(f0);else a(null)}},[P,s]);let O0=(f0)=>{let o0=V.find((A0)=>A0.id===f0),J1=o0?.models.find((A0)=>A0.recommended)?.value||o0?.models[0]?.value||"";R0((A0)=>({...A0,provider:f0,model:J1}))},q0=async()=>{if(!i.name)return;await v(i),await R();let f0=j[0],o0=f0?.models.find((J1)=>J1.recommended)?.value||f0?.models[0]?.value||"";R0({name:"",model:o0,provider:f0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]}),p(!1)},o=async(f0,o0)=>{o0?.stopPropagation(),U0(null);let J1=await C(f0);if(J1.error)U0(J1.error)},T0=async(f0,o0)=>{if(o0?.stopPropagation(),s?.id===f0)a(null);await g(f0),await R()},v0=(f0)=>{a(f0),U0(null),z0("agents")},X1=(f0)=>{z0(f0),a(null)},r0=()=>{_(!0),x(),q()};if(G||U===null)return w4.jsxDEV(wz,{fullScreen:!0},void 0,!1,void 0,this);if(!U)return w4.jsxDEV(gZ,{onComplete:r0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return w4.jsxDEV(O3,{},void 0,!1,void 0,this);if(K===null)return w4.jsxDEV(wz,{fullScreen:!0},void 0,!1,void 0,this);if(!K)return w4.jsxDEV(gZ,{onComplete:r0,needsAccount:!1},void 0,!1,void 0,this);return w4.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[w4.jsxDEV(U3,{onMenuClick:()=>I0(!0)},void 0,!1,void 0,this),Q0&&w4.jsxDEV(K3,{message:Q0,onDismiss:()=>U0(null)},void 0,!1,void 0,this),w4.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[w4.jsxDEV(W3,{route:D,agentCount:P.length,taskCount:b0,onNavigate:X1,isOpen:y0,onClose:()=>I0(!1)},void 0,!1,void 0,this),w4.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[D==="settings"&&w4.jsxDEV(L3,{},void 0,!1,void 0,this),D==="agents"&&w4.jsxDEV(w3,{agents:P,loading:M,selectedAgent:s,providers:V,onSelectAgent:v0,onCloseAgent:()=>a(null),onToggleAgent:o,onDeleteAgent:T0,onUpdateAgent:m,onNewAgent:()=>p(!0),canCreateAgent:j.length>0},void 0,!1,void 0,this),D==="dashboard"&&w4.jsxDEV(P3,{agents:P,loading:M,runningCount:w,configuredProviders:k,onNavigate:X1,onSelectAgent:v0},void 0,!1,void 0,this),D==="tasks"&&w4.jsxDEV(b3,{},void 0,!1,void 0,this),D==="mcp"&&w4.jsxDEV(A3,{},void 0,!1,void 0,this),D==="skills"&&w4.jsxDEV($2,{},void 0,!1,void 0,this),D==="telemetry"&&w4.jsxDEV(H2,{},void 0,!1,void 0,this),D==="api"&&w4.jsxDEV(LO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),u&&w4.jsxDEV(N3,{form:i,providers:V,configuredProviders:k,onFormChange:R0,onProviderChange:O0,onCreate:q0,onClose:()=>p(!1),onGoToSettings:()=>{p(!1),z0("settings")}},void 0,!1,void 0,this),w4.jsxDEV(BO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _T(){return w4.jsxDEV(mG,{children:w4.jsxDEV(uG,{children:w4.jsxDEV(GO,{children:w4.jsxDEV(VG,{children:w4.jsxDEV(OT,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var LT=RO.createRoot(document.getElementById("root"));LT.render(w4.jsxDEV(_T,{},void 0,!1,void 0,this));
|
|
226
227
|
|
|
227
|
-
//# debugId=
|
|
228
|
+
//# debugId=123C7C4D9C8A146764756E2164756E21
|