apteva 0.4.2 → 0.4.4
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.
- package/dist/App.mbp9atpm.js +227 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/routes/api.ts +3 -0
- package/src/web/components/mcp/McpPage.tsx +93 -3
- package/dist/App.hzycvt6c.js +0 -227
package/dist/App.hzycvt6c.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
var mP=Object.create;var{getPrototypeOf:uP,defineProperty:OW,getOwnPropertyNames:gP}=Object;var EP=Object.prototype.hasOwnProperty;var q0=(Y,G,U)=>{U=Y!=null?mP(uP(Y)):{};let O=G||!Y||!Y.__esModule?OW(U,"default",{value:Y,enumerable:!0}):U;for(let q of gP(Y))if(!EP.call(O,q))OW(O,q,{get:()=>Y[q],enumerable:!0});return O};var Oz=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var k1=Oz((xP,Z3)=>{(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"),N=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),_=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function D(W){if(W===null||typeof W!=="object")return null;var y=v&&W[v]||W[m];if(typeof y==="function")return y;return null}var C={current:null},V={transition:null},u={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},a={current:null},c={},g=null;function Q0(W){g=W}c.setExtraStackFrame=function(W){g=W},c.getCurrentStack=null,c.getStackAddendum=function(){var W="";if(g)W+=g;var y=c.getCurrentStack;if(y)W+=y()||"";return W};var o=!1,t=!1,l=!1,p=!1,i=!1,Z0={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:V,ReactCurrentOwner:a};Z0.ReactDebugCurrentFrame=c,Z0.ReactCurrentActQueue=u;function T0(W){{for(var y=arguments.length,s=Array(y>1?y-1:0),$0=1;$0<y;$0++)s[$0-1]=arguments[$0];X1("warn",W,s)}}function F0(W){{for(var y=arguments.length,s=Array(y>1?y-1:0),$0=1;$0<y;$0++)s[$0-1]=arguments[$0];X1("error",W,s)}}function X1(W,y,s){{var $0=Z0.ReactDebugCurrentFrame,I0=$0.getStackAddendum();if(I0!=="")y+="%s",s=s.concat([I0]);var B1=s.map(function(l0){return String(l0)});B1.unshift("Warning: "+y),Function.prototype.apply.call(console[W],console,B1)}}var O1={};function X0(W,y){{var s=W.constructor,$0=s&&(s.displayName||s.name)||"ReactClass",I0=$0+"."+y;if(O1[I0])return;F0("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.",y,$0),O1[I0]=!0}}var U0={isMounted:function(W){return!1},enqueueForceUpdate:function(W,y,s){X0(W,"forceUpdate")},enqueueReplaceState:function(W,y,s,$0){X0(W,"replaceState")},enqueueSetState:function(W,y,s,$0){X0(W,"setState")}},_0=Object.assign,J0={};Object.freeze(J0);function d(W,y,s){this.props=W,this.context=y,this.refs=J0,this.updater=s||U0}d.prototype.isReactComponent={},d.prototype.setState=function(W,y){if(typeof W!=="object"&&typeof W!=="function"&&W!=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,W,y,"setState")},d.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};{var A0={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)."]},S0=function(W,y){Object.defineProperty(d.prototype,W,{get:function(){T0("%s(...) is deprecated in plain JavaScript React classes. %s",y[0],y[1]);return}})};for(var Z1 in A0)if(A0.hasOwnProperty(Z1))S0(Z1,A0[Z1])}function t0(){}t0.prototype=d.prototype;function D0(W,y,s){this.props=W,this.context=y,this.refs=J0,this.updater=s||U0}var G1=D0.prototype=new t0;G1.constructor=D0,_0(G1,d.prototype),G1.isPureReactComponent=!0;function L0(){var W={current:null};return Object.seal(W),W}var n0=Array.isArray;function h1(W){return n0(W)}function B4(W){{var y=typeof Symbol==="function"&&Symbol.toStringTag,s=y&&W[Symbol.toStringTag]||W.constructor.name||"Object";return s}}function h4(W){try{return j1(W),!1}catch(y){return!0}}function j1(W){return""+W}function W1(W){if(h4(W))return F0("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",B4(W)),j1(W)}function r4(W,y,s){var $0=W.displayName;if($0)return $0;var I0=y.displayName||y.name||"";return I0!==""?s+"("+I0+")":s}function o4(W){return W.displayName||"Context"}function T4(W){if(W==null)return null;if(typeof W.tag==="number")F0("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof W==="function")return W.displayName||W.name||null;if(typeof W==="string")return W;switch(W){case O:return"Fragment";case U:return"Portal";case N:return"Profiler";case q:return"StrictMode";case T:return"Suspense";case F:return"SuspenseList"}if(typeof W==="object")switch(W.$$typeof){case _:var y=W;return o4(y)+".Consumer";case L:var s=W;return o4(s._context)+".Provider";case k:return r4(W,W.render,"ForwardRef");case w:var $0=W.displayName||null;if($0!==null)return $0;return T4(W.type)||"Memo";case b:{var I0=W,B1=I0._payload,l0=I0._init;try{return T4(l0(B1))}catch(L1){return null}}}return null}var y4=Object.prototype.hasOwnProperty,m5={key:!0,ref:!0,__self:!0,__source:!0},O4,F6,L4;L4={};function M6(W){if(y4.call(W,"ref")){var y=Object.getOwnPropertyDescriptor(W,"ref").get;if(y&&y.isReactWarning)return!1}return W.ref!==void 0}function M4(W){if(y4.call(W,"key")){var y=Object.getOwnPropertyDescriptor(W,"key").get;if(y&&y.isReactWarning)return!1}return W.key!==void 0}function k4(W,y){var s=function(){if(!O4)O4=!0,F0("%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)",y)};s.isReactWarning=!0,Object.defineProperty(W,"key",{get:s,configurable:!0})}function O6(W,y){var s=function(){if(!F6)F6=!0,F0("%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)",y)};s.isReactWarning=!0,Object.defineProperty(W,"ref",{get:s,configurable:!0})}function m6(W){if(typeof W.ref==="string"&&a.current&&W.__self&&a.current.stateNode!==W.__self){var y=T4(a.current.type);if(!L4[y])F0('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',y,W.ref),L4[y]=!0}}var j4=function(W,y,s,$0,I0,B1,l0){var L1={$$typeof:G,type:W,key:y,ref:s,props:l0,_owner:B1};if(L1._store={},Object.defineProperty(L1._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(L1,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$0}),Object.defineProperty(L1,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I0}),Object.freeze)Object.freeze(L1.props),Object.freeze(L1);return L1};function t4(W,y,s){var $0,I0={},B1=null,l0=null,L1=null,g1=null;if(y!=null){if(M6(y))l0=y.ref,m6(y);if(M4(y))W1(y.key),B1=""+y.key;L1=y.__self===void 0?null:y.__self,g1=y.__source===void 0?null:y.__source;for($0 in y)if(y4.call(y,$0)&&!m5.hasOwnProperty($0))I0[$0]=y[$0]}var Z4=arguments.length-2;if(Z4===1)I0.children=s;else if(Z4>1){var _4=Array(Z4);for(var N4=0;N4<Z4;N4++)_4[N4]=arguments[N4+2];if(Object.freeze)Object.freeze(_4);I0.children=_4}if(W&&W.defaultProps){var v4=W.defaultProps;for($0 in v4)if(I0[$0]===void 0)I0[$0]=v4[$0]}if(B1||l0){var p4=typeof W==="function"?W.displayName||W.name||"Unknown":W;if(B1)k4(I0,p4);if(l0)O6(I0,p4)}return j4(W,B1,l0,L1,g1,a.current,I0)}function v0(W,y){var s=j4(W.type,y,W.ref,W._self,W._source,W._owner,W.props);return s}function s0(W,y,s){if(W===null||W===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+W+".");var $0,I0=_0({},W.props),B1=W.key,l0=W.ref,L1=W._self,g1=W._source,Z4=W._owner;if(y!=null){if(M6(y))l0=y.ref,Z4=a.current;if(M4(y))W1(y.key),B1=""+y.key;var _4;if(W.type&&W.type.defaultProps)_4=W.type.defaultProps;for($0 in y)if(y4.call(y,$0)&&!m5.hasOwnProperty($0))if(y[$0]===void 0&&_4!==void 0)I0[$0]=_4[$0];else I0[$0]=y[$0]}var N4=arguments.length-2;if(N4===1)I0.children=s;else if(N4>1){var v4=Array(N4);for(var p4=0;p4<N4;p4++)v4[p4]=arguments[p4+2];I0.children=v4}return j4(W.type,B1,l0,L1,g1,Z4,I0)}function $1(W){return typeof W==="object"&&W!==null&&W.$$typeof===G}var p1=".",e1=":";function V4(W){var y=/[=:]/g,s={"=":"=0",":":"=2"},$0=W.replace(y,function(I0){return s[I0]});return"$"+$0}var G4=!1,a4=/\/+/g;function M1(W){return W.replace(a4,"$&/")}function b1(W,y){if(typeof W==="object"&&W!==null&&W.key!=null)return W1(W.key),V4(""+W.key);return y.toString(36)}function d6(W,y,s,$0,I0){var B1=typeof W;if(B1==="undefined"||B1==="boolean")W=null;var l0=!1;if(W===null)l0=!0;else switch(B1){case"string":case"number":l0=!0;break;case"object":switch(W.$$typeof){case G:case U:l0=!0}}if(l0){var L1=W,g1=I0(L1),Z4=$0===""?p1+b1(L1,0):$0;if(h1(g1)){var _4="";if(Z4!=null)_4=M1(Z4)+"/";d6(g1,y,_4,"",function(C3){return C3})}else if(g1!=null){if($1(g1)){if(g1.key&&(!L1||L1.key!==g1.key))W1(g1.key);g1=v0(g1,s+(g1.key&&(!L1||L1.key!==g1.key)?M1(""+g1.key)+"/":"")+Z4)}y.push(g1)}return 1}var N4,v4,p4=0,a1=$0===""?p1:$0+e1;if(h1(W))for(var u8=0;u8<W.length;u8++)N4=W[u8],v4=a1+b1(N4,u8),p4+=d6(N4,y,s,v4,I0);else{var fz=D(W);if(typeof fz==="function"){var tQ=W;if(fz===tQ.entries){if(!G4)T0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");G4=!0}var v3=fz.call(tQ),P7,sQ=0;while(!(P7=v3.next()).done)N4=P7.value,v4=a1+b1(N4,sQ++),p4+=d6(N4,y,s,v4,I0)}else if(B1==="object"){var eQ=String(W);throw Error("Objects are not valid as a React child (found: "+(eQ==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":eQ)+"). If you meant to render a collection of children, use an array instead.")}}return p4}function L6(W,y,s){if(W==null)return W;var $0=[],I0=0;return d6(W,$0,"","",function(B1){return y.call(s,B1,I0++)}),$0}function l6(W){var y=0;return L6(W,function(){y++}),y}function X7(W,y,s){L6(W,function(){y.apply(this,arguments)},s)}function u5(W){return L6(W,function(y){return y})||[]}function Z7(W){if(!$1(W))throw Error("React.Children.only expected to receive a single React element child.");return W}function F5(W){var y={$$typeof:_,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};y.Provider={$$typeof:L,_context:y};var s=!1,$0=!1,I0=!1;{var B1={$$typeof:_,_context:y};Object.defineProperties(B1,{Provider:{get:function(){if(!$0)$0=!0,F0("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 y.Provider},set:function(l0){y.Provider=l0}},_currentValue:{get:function(){return y._currentValue},set:function(l0){y._currentValue=l0}},_currentValue2:{get:function(){return y._currentValue2},set:function(l0){y._currentValue2=l0}},_threadCount:{get:function(){return y._threadCount},set:function(l0){y._threadCount=l0}},Consumer:{get:function(){if(!s)s=!0,F0("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 y.Consumer}},displayName:{get:function(){return y.displayName},set:function(l0){if(!I0)T0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",l0),I0=!0}}}),y.Consumer=B1}return y._currentRenderer=null,y._currentRenderer2=null,y}var u6=-1,g5=0,D1=1,z4=2;function U4(W){if(W._status===u6){var y=W._result,s=y();if(s.then(function(B1){if(W._status===g5||W._status===u6){var l0=W;l0._status=D1,l0._result=B1}},function(B1){if(W._status===g5||W._status===u6){var l0=W;l0._status=z4,l0._result=B1}}),W._status===u6){var $0=W;$0._status=g5,$0._result=s}}if(W._status===D1){var I0=W._result;if(I0===void 0)F0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
-
|
|
3
|
-
Your code should look like:
|
|
4
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
-
|
|
6
|
-
Did you accidentally put curly braces around the import?`,I0);if(!("default"in I0))F0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
-
|
|
8
|
-
Your code should look like:
|
|
9
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,I0);return I0.default}else throw W._result}function l1(W){var y={_status:u6,_result:W},s={$$typeof:b,_payload:y,_init:U4};{var $0,I0;Object.defineProperties(s,{defaultProps:{configurable:!0,get:function(){return $0},set:function(B1){F0("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),$0=B1,Object.defineProperty(s,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return I0},set:function(B1){F0("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),I0=B1,Object.defineProperty(s,"propTypes",{enumerable:!0})}}})}return s}function f(W){{if(W!=null&&W.$$typeof===w)F0("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");else if(typeof W!=="function")F0("forwardRef requires a render function but was given %s.",W===null?"null":typeof W);else if(W.length!==0&&W.length!==2)F0("forwardRef render functions accept exactly two parameters: props and ref. %s",W.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined.");if(W!=null){if(W.defaultProps!=null||W.propTypes!=null)F0("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")}}var y={$$typeof:k,render:W};{var s;Object.defineProperty(y,"displayName",{enumerable:!1,configurable:!0,get:function(){return s},set:function($0){if(s=$0,!W.name&&!W.displayName)W.displayName=$0}})}return y}var H0=Symbol.for("react.module.reference");function N0(W){if(typeof W==="string"||typeof W==="function")return!0;if(W===O||W===N||i||W===q||W===T||W===F||p||W===M||o||t||l)return!0;if(typeof W==="object"&&W!==null){if(W.$$typeof===b||W.$$typeof===w||W.$$typeof===L||W.$$typeof===_||W.$$typeof===k||W.$$typeof===H0||W.getModuleId!==void 0)return!0}return!1}function I(W,y){if(!N0(W))F0("memo: The first argument must be a component. Instead received: %s",W===null?"null":typeof W);var s={$$typeof:w,type:W,compare:y===void 0?null:y};{var $0;Object.defineProperty(s,"displayName",{enumerable:!1,configurable:!0,get:function(){return $0},set:function(I0){if($0=I0,!W.name&&!W.displayName)W.displayName=I0}})}return s}function j(){var W=C.current;if(W===null)F0(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
-
2. You might be breaking the Rules of Hooks
|
|
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 W}function W0(W){var y=j();if(W._context!==void 0){var s=W._context;if(s.Consumer===W)F0("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(s.Provider===W)F0("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return y.useContext(W)}function P0(W){var y=j();return y.useState(W)}function f0(W,y,s){var $0=j();return $0.useReducer(W,y,s)}function o0(W){var y=j();return y.useRef(W)}function x0(W,y){var s=j();return s.useEffect(W,y)}function O0(W,y){var s=j();return s.useInsertionEffect(W,y)}function k0(W,y){var s=j();return s.useLayoutEffect(W,y)}function r0(W,y){var s=j();return s.useCallback(W,y)}function m1(W,y){var s=j();return s.useMemo(W,y)}function Q4(W,y,s){var $0=j();return $0.useImperativeHandle(W,y,s)}function i6(W,y){{var s=j();return s.useDebugValue(W,y)}}function B5(){var W=j();return W.useTransition()}function P4(W){var y=j();return y.useDeferredValue(W)}function v1(){var W=j();return W.useId()}function F7(W,y,s){var $0=j();return $0.useSyncExternalStore(W,y,s)}var J7=0,EQ,xQ,jQ,pQ,cQ,dQ,lQ;function xZ(){}xZ.__reactDisabledLog=!0;function I3(){{if(J7===0){EQ=console.log,xQ=console.info,jQ=console.warn,pQ=console.error,cQ=console.group,dQ=console.groupCollapsed,lQ=console.groupEnd;var W={configurable:!0,enumerable:!0,value:xZ,writable:!0};Object.defineProperties(console,{info:W,log:W,warn:W,error:W,group:W,groupCollapsed:W,groupEnd:W})}J7++}}function iQ(){{if(J7--,J7===0){var W={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_0({},W,{value:EQ}),info:_0({},W,{value:xQ}),warn:_0({},W,{value:jQ}),error:_0({},W,{value:pQ}),group:_0({},W,{value:cQ}),groupCollapsed:_0({},W,{value:dQ}),groupEnd:_0({},W,{value:lQ})})}if(J7<0)F0("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V8=Z0.ReactCurrentDispatcher,M5;function t7(W,y,s){{if(M5===void 0)try{throw Error()}catch(I0){var $0=I0.stack.trim().match(/\n( *(at )?)/);M5=$0&&$0[1]||""}return`
|
|
14
|
-
`+M5+W}}var s7=!1,Tz;{var oQ=typeof WeakMap==="function"?WeakMap:Map;Tz=new oQ}function jZ(W,y){if(!W||s7)return"";{var s=Tz.get(W);if(s!==void 0)return s}var $0;s7=!0;var I0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var B1;B1=V8.current,V8.current=null,I3();try{if(y){var l0=function(){throw Error()};if(Object.defineProperty(l0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(l0,[])}catch(a1){$0=a1}Reflect.construct(W,[],l0)}else{try{l0.call()}catch(a1){$0=a1}W.call(l0.prototype)}}else{try{throw Error()}catch(a1){$0=a1}W()}}catch(a1){if(a1&&$0&&typeof a1.stack==="string"){var L1=a1.stack.split(`
|
|
15
|
-
`),g1=$0.stack.split(`
|
|
16
|
-
`),Z4=L1.length-1,_4=g1.length-1;while(Z4>=1&&_4>=0&&L1[Z4]!==g1[_4])_4--;for(;Z4>=1&&_4>=0;Z4--,_4--)if(L1[Z4]!==g1[_4]){if(Z4!==1||_4!==1)do if(Z4--,_4--,_4<0||L1[Z4]!==g1[_4]){var N4=`
|
|
17
|
-
`+L1[Z4].replace(" at new "," at ");if(W.displayName&&N4.includes("<anonymous>"))N4=N4.replace("<anonymous>",W.displayName);if(typeof W==="function")Tz.set(W,N4);return N4}while(Z4>=1&&_4>=0);break}}}finally{s7=!1,V8.current=B1,iQ(),Error.prepareStackTrace=I0}var v4=W?W.displayName||W.name:"",p4=v4?t7(v4):"";if(typeof W==="function")Tz.set(W,p4);return p4}function aQ(W,y,s){return jZ(W,!1)}function T3(W){var y=W.prototype;return!!(y&&y.isReactComponent)}function e7(W,y,s){if(W==null)return"";if(typeof W==="function")return jZ(W,T3(W));if(typeof W==="string")return t7(W);switch(W){case T:return t7("Suspense");case F:return t7("SuspenseList")}if(typeof W==="object")switch(W.$$typeof){case k:return aQ(W.render);case w:return e7(W.type,y,s);case b:{var $0=W,I0=$0._payload,B1=$0._init;try{return e7(B1(I0),y,s)}catch(l0){}}}return""}var pZ={},nQ=Z0.ReactDebugCurrentFrame;function kz(W){if(W){var y=W._owner,s=e7(W.type,W._source,y?y.type:null);nQ.setExtraStackFrame(s)}else nQ.setExtraStackFrame(null)}function cZ(W,y,s,$0,I0){{var B1=Function.call.bind(y4);for(var l0 in W)if(B1(W,l0)){var L1=void 0;try{if(typeof W[l0]!=="function"){var g1=Error(($0||"React class")+": "+s+" type `"+l0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof W[l0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g1.name="Invariant Violation",g1}L1=W[l0](y,l0,$0,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z4){L1=Z4}if(L1&&!(L1 instanceof Error))kz(I0),F0("%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",s,l0,typeof L1),kz(null);if(L1 instanceof Error&&!(L1.message in pZ))pZ[L1.message]=!0,kz(I0),F0("Failed %s type: %s",s,L1.message),kz(null)}}}function d1(W){if(W){var y=W._owner,s=e7(W.type,W._source,y?y.type:null);Q0(s)}else Q0(null)}var dZ=!1;function rQ(){if(a.current){var W=T4(a.current.type);if(W)return`
|
|
18
|
-
|
|
19
|
-
Check the render method of \``+W+"`."}return""}function P1(W){if(W!==void 0){var y=W.fileName.replace(/^.*[\\\/]/,""),s=W.lineNumber;return`
|
|
20
|
-
|
|
21
|
-
Check your code at `+y+":"+s+"."}return""}function lZ(W){if(W!==null&&W!==void 0)return P1(W.__source);return""}var g6={};function D8(W){var y=rQ();if(!y){var s=typeof W==="string"?W:W.displayName||W.name;if(s)y=`
|
|
22
|
-
|
|
23
|
-
Check the top-level render call using <`+s+">."}return y}function z8(W,y){if(!W._store||W._store.validated||W.key!=null)return;W._store.validated=!0;var s=D8(y);if(g6[s])return;g6[s]=!0;var $0="";if(W&&W._owner&&W._owner!==a.current)$0=" It was passed a child from "+T4(W._owner.type)+".";d1(W),F0('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,$0),d1(null)}function iZ(W,y){if(typeof W!=="object")return;if(h1(W))for(var s=0;s<W.length;s++){var $0=W[s];if($1($0))z8($0,y)}else if($1(W)){if(W._store)W._store.validated=!0}else if(W){var I0=D(W);if(typeof I0==="function"){if(I0!==W.entries){var B1=I0.call(W),l0;while(!(l0=B1.next()).done)if($1(l0.value))z8(l0.value,y)}}}}function _6(W){{var y=W.type;if(y===null||y===void 0||typeof y==="string")return;var s;if(typeof y==="function")s=y.propTypes;else if(typeof y==="object"&&(y.$$typeof===k||y.$$typeof===w))s=y.propTypes;else return;if(s){var $0=T4(y);cZ(s,W.props,"prop",$0,W)}else if(y.PropTypes!==void 0&&!dZ){dZ=!0;var I0=T4(y);F0("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I0||"Unknown")}if(typeof y.getDefaultProps==="function"&&!y.getDefaultProps.isReactClassApproved)F0("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function u4(W){{var y=Object.keys(W.props);for(var s=0;s<y.length;s++){var $0=y[s];if($0!=="children"&&$0!=="key"){d1(W),F0("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$0),d1(null);break}}if(W.ref!==null)d1(W),F0("Invalid attribute `ref` supplied to `React.Fragment`."),d1(null)}}function oZ(W,y,s){var $0=N0(W);if(!$0){var I0="";if(W===void 0||typeof W==="object"&&W!==null&&Object.keys(W).length===0)I0+=" 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 B1=lZ(y);if(B1)I0+=B1;else I0+=rQ();var l0;if(W===null)l0="null";else if(h1(W))l0="array";else if(W!==void 0&&W.$$typeof===G)l0="<"+(T4(W.type)||"Unknown")+" />",I0=" Did you accidentally export a JSX literal instead of a component?";else l0=typeof W;F0("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l0,I0)}var L1=t4.apply(this,arguments);if(L1==null)return L1;if($0)for(var g1=2;g1<arguments.length;g1++)iZ(arguments[g1],W);if(W===O)u4(L1);else _6(L1);return L1}var U5=!1;function Q5(W){var y=oZ.bind(null,W);y.type=W;{if(!U5)U5=!0,T0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(y,"type",{enumerable:!1,get:function(){return T0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:W}),W}})}return y}function Y7(W,y,s){var $0=s0.apply(this,arguments);for(var I0=2;I0<arguments.length;I0++)iZ(arguments[I0],$0.type);return _6($0),$0}function k3(W,y){var s=V.transition;V.transition={};var $0=V.transition;V.transition._updatedFibers=new Set;try{W()}finally{if(V.transition=s,s===null&&$0._updatedFibers){var I0=$0._updatedFibers.size;if(I0>10)T0("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 vz=!1,m8=null;function aZ(W){if(m8===null)try{var y=("require"+Math.random()).slice(0,7),s=Z3&&Z3[y];m8=s.call(Z3,"timers").setImmediate}catch($0){m8=function(I0){if(vz===!1){if(vz=!0,typeof MessageChannel>"u")F0("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 B1=new MessageChannel;B1.port1.onmessage=I0,B1.port2.postMessage(void 0)}}return m8(W)}var Q8=0,nZ=!1;function rZ(W){{var y=Q8;if(Q8++,u.current===null)u.current=[];var s=u.isBatchingLegacy,$0;try{if(u.isBatchingLegacy=!0,$0=W(),!s&&u.didScheduleLegacyUpdate){var I0=u.current;if(I0!==null)u.didScheduleLegacyUpdate=!1,Sz(I0)}}catch(v4){throw M7(y),v4}finally{u.isBatchingLegacy=s}if($0!==null&&typeof $0==="object"&&typeof $0.then==="function"){var B1=$0,l0=!1,L1={then:function(v4,p4){l0=!0,B1.then(function(a1){if(M7(y),Q8===0)Cz(a1,v4,p4);else v4(a1)},function(a1){M7(y),p4(a1)})}};if(!nZ&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!l0)nZ=!0,F0("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 L1}else{var g1=$0;if(M7(y),Q8===0){var Z4=u.current;if(Z4!==null)Sz(Z4),u.current=null;var _4={then:function(v4,p4){if(u.current===null)u.current=[],Cz(g1,v4,p4);else v4(g1)}};return _4}else{var N4={then:function(v4,p4){v4(g1)}};return N4}}}}function M7(W){{if(W!==Q8-1)F0("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");Q8=W}}function Cz(W,y,s){{var $0=u.current;if($0!==null)try{Sz($0),aZ(function(){if($0.length===0)u.current=null,y(W);else Cz(W,y,s)})}catch(I0){s(I0)}else y(W)}}var X8=!1;function Sz(W){if(!X8){X8=!0;var y=0;try{for(;y<W.length;y++){var s=W[y];do s=s(!0);while(s!==null)}W.length=0}catch($0){throw W=W.slice(y+1),$0}finally{X8=!1}}}var tZ=oZ,sZ=Y7,eZ=Q5,zJ={map:L6,forEach:X7,count:l6,toArray:u5,only:Z7};if(xP.Children=zJ,xP.Component=d,xP.Fragment=O,xP.Profiler=N,xP.PureComponent=D0,xP.StrictMode=q,xP.Suspense=T,xP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z0,xP.act=rZ,xP.cloneElement=sZ,xP.createContext=F5,xP.createElement=tZ,xP.createFactory=eZ,xP.createRef=L0,xP.forwardRef=f,xP.isValidElement=$1,xP.lazy=l1,xP.memo=I,xP.startTransition=k3,xP.unstable_act=rZ,xP.useCallback=r0,xP.useContext=W0,xP.useDebugValue=i6,xP.useDeferredValue=P4,xP.useEffect=x0,xP.useId=v1,xP.useImperativeHandle=Q4,xP.useInsertionEffect=O0,xP.useLayoutEffect=k0,xP.useMemo=m1,xP.useReducer=f0,xP.useRef=o0,xP.useState=P0,xP.useSyncExternalStore=F7,xP.useTransition=B5,xP.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var LW=Oz((jP)=>{(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,s0){var $1=v0.length;v0.push(s0),L(v0,s0,$1)}function q(v0){return v0.length===0?null:v0[0]}function N(v0){if(v0.length===0)return null;var s0=v0[0],$1=v0.pop();if($1!==s0)v0[0]=$1,_(v0,$1,0);return s0}function L(v0,s0,$1){var p1=$1;while(p1>0){var e1=p1-1>>>1,V4=v0[e1];if(k(V4,s0)>0)v0[e1]=s0,v0[p1]=V4,p1=e1;else return}}function _(v0,s0,$1){var p1=$1,e1=v0.length,V4=e1>>>1;while(p1<V4){var G4=(p1+1)*2-1,a4=v0[G4],M1=G4+1,b1=v0[M1];if(k(a4,s0)<0)if(M1<e1&&k(b1,a4)<0)v0[p1]=b1,v0[M1]=s0,p1=M1;else v0[p1]=a4,v0[G4]=s0,p1=G4;else if(M1<e1&&k(b1,s0)<0)v0[p1]=b1,v0[M1]=s0,p1=M1;else return}}function k(v0,s0){var $1=v0.sortIndex-s0.sortIndex;return $1!==0?$1:v0.id-s0.id}var T=1,F=2,w=3,b=4,M=5;function v(v0,s0){}var m=typeof performance==="object"&&typeof performance.now==="function";if(m){var D=performance;jP.unstable_now=function(){return D.now()}}else{var C=Date,V=C.now();jP.unstable_now=function(){return C.now()-V}}var u=1073741823,a=-1,c=250,g=5000,Q0=1e4,o=u,t=[],l=[],p=1,i=null,Z0=w,T0=!1,F0=!1,X1=!1,O1=typeof setTimeout==="function"?setTimeout:null,X0=typeof clearTimeout==="function"?clearTimeout:null,U0=typeof setImmediate<"u"?setImmediate:null,_0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function J0(v0){var s0=q(l);while(s0!==null){if(s0.callback===null)N(l);else if(s0.startTime<=v0)N(l),s0.sortIndex=s0.expirationTime,O(t,s0);else return;s0=q(l)}}function d(v0){if(X1=!1,J0(v0),!F0)if(q(t)!==null)F0=!0,k4(A0);else{var s0=q(l);if(s0!==null)O6(d,s0.startTime-v0)}}function A0(v0,s0){if(F0=!1,X1)X1=!1,m6();T0=!0;var $1=Z0;try{if(G)try{return S0(v0,s0)}catch(e1){if(i!==null){var p1=jP.unstable_now();v(i,p1),i.isQueued=!1}throw e1}else return S0(v0,s0)}finally{i=null,Z0=$1,T0=!1}}function S0(v0,s0){var $1=s0;J0($1),i=q(t);while(i!==null&&!Y){if(i.expirationTime>$1&&(!v0||y4()))break;var p1=i.callback;if(typeof p1==="function"){i.callback=null,Z0=i.priorityLevel;var e1=i.expirationTime<=$1,V4=p1(e1);if($1=jP.unstable_now(),typeof V4==="function")i.callback=V4;else if(i===q(t))N(t);J0($1)}else N(t);i=q(t)}if(i!==null)return!0;else{var G4=q(l);if(G4!==null)O6(d,G4.startTime-$1);return!1}}function Z1(v0,s0){switch(v0){case T:case F:case w:case b:case M:break;default:v0=w}var $1=Z0;Z0=v0;try{return s0()}finally{Z0=$1}}function t0(v0){var s0;switch(Z0){case T:case F:case w:s0=w;break;default:s0=Z0;break}var $1=Z0;Z0=s0;try{return v0()}finally{Z0=$1}}function D0(v0){var s0=Z0;return function(){var $1=Z0;Z0=s0;try{return v0.apply(this,arguments)}finally{Z0=$1}}}function G1(v0,s0,$1){var p1=jP.unstable_now(),e1;if(typeof $1==="object"&&$1!==null){var V4=$1.delay;if(typeof V4==="number"&&V4>0)e1=p1+V4;else e1=p1}else e1=p1;var G4;switch(v0){case T:G4=a;break;case F:G4=c;break;case M:G4=o;break;case b:G4=Q0;break;case w:default:G4=g;break}var a4=e1+G4,M1={id:p++,callback:s0,priorityLevel:v0,startTime:e1,expirationTime:a4,sortIndex:-1};if(e1>p1){if(M1.sortIndex=e1,O(l,M1),q(t)===null&&M1===q(l)){if(X1)m6();else X1=!0;O6(d,e1-p1)}}else if(M1.sortIndex=a4,O(t,M1),!F0&&!T0)F0=!0,k4(A0);return M1}function L0(){}function n0(){if(!F0&&!T0)F0=!0,k4(A0)}function h1(){return q(t)}function B4(v0){v0.callback=null}function h4(){return Z0}var j1=!1,W1=null,r4=-1,o4=U,T4=-1;function y4(){var v0=jP.unstable_now()-T4;if(v0<o4)return!1;return!0}function m5(){}function O4(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)o4=Math.floor(1000/v0);else o4=U}var F6=function(){if(W1!==null){var v0=jP.unstable_now();T4=v0;var s0=!0,$1=!0;try{$1=W1(s0,v0)}finally{if($1)L4();else j1=!1,W1=null}}else j1=!1},L4;if(typeof U0==="function")L4=function(){U0(F6)};else if(typeof MessageChannel<"u"){var M6=new MessageChannel,M4=M6.port2;M6.port1.onmessage=F6,L4=function(){M4.postMessage(null)}}else L4=function(){O1(F6,0)};function k4(v0){if(W1=v0,!j1)j1=!0,L4()}function O6(v0,s0){r4=O1(function(){v0(jP.unstable_now())},s0)}function m6(){X0(r4),r4=-1}var j4=m5,t4=null;if(jP.unstable_IdlePriority=M,jP.unstable_ImmediatePriority=T,jP.unstable_LowPriority=b,jP.unstable_NormalPriority=w,jP.unstable_Profiling=t4,jP.unstable_UserBlockingPriority=F,jP.unstable_cancelCallback=B4,jP.unstable_continueExecution=n0,jP.unstable_forceFrameRate=O4,jP.unstable_getCurrentPriorityLevel=h4,jP.unstable_getFirstCallbackNode=h1,jP.unstable_next=t0,jP.unstable_pauseExecution=L0,jP.unstable_requestPaint=j4,jP.unstable_runWithPriority=Z1,jP.unstable_scheduleCallback=G1,jP.unstable_shouldYield=y4,jP.unstable_wrapCallback=D0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var _W=Oz((pP)=>{var CZ=q0(k1()),H4=q0(LW());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=CZ.__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];N("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];N("error",z,X)}}function N(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 L=0,_=1,k=2,T=3,F=4,w=5,b=6,M=7,v=8,m=9,D=10,C=11,V=12,u=13,a=14,c=15,g=16,Q0=17,o=18,t=19,l=21,p=22,i=23,Z0=24,T0=25,F0=!0,X1=!1,O1=!1,X0=!1,U0=!1,_0=!0,J0=!1,d=!0,A0=!0,S0=!0,Z1=!0,t0=new Set,D0={},G1={};function L0(z,Q){n0(z,Q),n0(z+"Capture",Q)}function n0(z,Q){if(D0[z])q("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);D0[z]=Q;{var X=z.toLowerCase();if(G1[X]=z,z==="onDoubleClick")G1.ondblclick=z}for(var Z=0;Z<Q.length;Z++)t0.add(Q[Z])}var h1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",B4=Object.prototype.hasOwnProperty;function h4(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function j1(z){try{return W1(z),!1}catch(Q){return!0}}function W1(z){return""+z}function r4(z,Q){if(j1(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,h4(z)),W1(z)}function o4(z){if(j1(z))return q("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",h4(z)),W1(z)}function T4(z,Q){if(j1(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,h4(z)),W1(z)}function y4(z,Q){if(j1(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,h4(z)),W1(z)}function m5(z){if(j1(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.",h4(z)),W1(z)}function O4(z){if(j1(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.",h4(z)),W1(z)}var F6=0,L4=1,M6=2,M4=3,k4=4,O6=5,m6=6,j4=":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",t4=j4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v0=new RegExp("^["+j4+"]["+t4+"]*$"),s0={},$1={};function p1(z){if(B4.call($1,z))return!0;if(B4.call(s0,z))return!1;if(v0.test(z))return $1[z]=!0,!0;return s0[z]=!0,q("Invalid attribute name: `%s`",z),!1}function e1(z,Q,X){if(Q!==null)return Q.type===F6;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 V4(z,Q,X,Z){if(X!==null&&X.type===F6)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 G4(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(V4(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case M4:return!Q;case k4:return Q===!1;case O6:return isNaN(Q);case m6:return isNaN(Q)||Q<1}return!1}function a4(z){return b1.hasOwnProperty(z)?b1[z]:null}function M1(z,Q,X,Z,J,$,H){this.acceptsBooleans=Q===M6||Q===M4||Q===k4,this.attributeName=Z,this.attributeNamespace=J,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=$,this.removeEmptyString=H}var b1={},d6=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];d6.forEach(function(z){b1[z]=new M1(z,F6,!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 M1(Q,L4,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){b1[z]=new M1(z,M6,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){b1[z]=new M1(z,M6,!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 M1(z,M4,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){b1[z]=new M1(z,M4,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){b1[z]=new M1(z,k4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){b1[z]=new M1(z,m6,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){b1[z]=new M1(z,O6,!1,z.toLowerCase(),null,!1,!1)});var L6=/[\-\:]([a-z])/g,l6=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(L6,l6);b1[Q]=new M1(Q,L4,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(L6,l6);b1[Q]=new M1(Q,L4,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(L6,l6);b1[Q]=new M1(Q,L4,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){b1[z]=new M1(z,L4,!1,z.toLowerCase(),null,!1,!1)});var X7="xlinkHref";b1[X7]=new M1("xlinkHref",L4,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){b1[z]=new M1(z,L4,!1,z.toLowerCase(),null,!0,!0)});var u5=/^[\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,Z7=!1;function F5(z){if(!Z7&&u5.test(z))Z7=!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 u6(z,Q,X,Z){if(Z.mustUseProperty){var J=Z.propertyName;return z[J]}else{if(r4(X,Q),Z.sanitizeURL)F5(""+X);var $=Z.attributeName,H=null;if(Z.type===k4){if(z.hasAttribute($)){var B=z.getAttribute($);if(B==="")return!0;if(G4(Q,X,Z,!1))return B;if(B===""+X)return X;return B}}else if(z.hasAttribute($)){if(G4(Q,X,Z,!1))return z.getAttribute($);if(Z.type===M4)return X;H=z.getAttribute($)}if(G4(Q,X,Z,!1))return H===null?X:H;else if(H===""+X)return X;else return H}}function g5(z,Q,X,Z){{if(!p1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var J=z.getAttribute(Q);if(r4(X,Q),J===""+X)return X;return J}}function D1(z,Q,X,Z){var J=a4(Q);if(e1(Q,J,Z))return;if(G4(Q,X,J,Z))X=null;if(Z||J===null){if(p1(Q)){var $=Q;if(X===null)z.removeAttribute($);else r4(X,Q),z.setAttribute($,""+X)}return}var H=J.mustUseProperty;if(H){var B=J.propertyName;if(X===null){var K=J.type;z[B]=K===M4?!1:""}else z[B]=X;return}var{attributeName:R,attributeNamespace:A}=J;if(X===null)z.removeAttribute(R);else{var x=J.type,E;if(x===M4||x===k4&&X===!0)E="";else if(r4(X,R),E=""+X,J.sanitizeURL)F5(E.toString());if(A)z.setAttributeNS(A,R,E);else z.setAttribute(R,E)}}var z4=Symbol.for("react.element"),U4=Symbol.for("react.portal"),l1=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),H0=Symbol.for("react.profiler"),N0=Symbol.for("react.provider"),I=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),W0=Symbol.for("react.suspense"),P0=Symbol.for("react.suspense_list"),f0=Symbol.for("react.memo"),o0=Symbol.for("react.lazy"),x0=Symbol.for("react.scope"),O0=Symbol.for("react.debug_trace_mode"),k0=Symbol.for("react.offscreen"),r0=Symbol.for("react.legacy_hidden"),m1=Symbol.for("react.cache"),Q4=Symbol.for("react.tracing_marker"),i6=Symbol.iterator,B5="@@iterator";function P4(z){if(z===null||typeof z!=="object")return null;var Q=i6&&z[i6]||z[B5];if(typeof Q==="function")return Q;return null}var v1=Object.assign,F7=0,J7,EQ,xQ,jQ,pQ,cQ,dQ;function lQ(){}lQ.__reactDisabledLog=!0;function xZ(){{if(F7===0){J7=console.log,EQ=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})}F7++}}function I3(){{if(F7--,F7===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:v1({},z,{value:J7}),info:v1({},z,{value:EQ}),warn:v1({},z,{value:xQ}),error:v1({},z,{value:jQ}),group:v1({},z,{value:pQ}),groupCollapsed:v1({},z,{value:cQ}),groupEnd:v1({},z,{value:dQ})})}if(F7<0)q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var iQ=Y.ReactCurrentDispatcher,V8;function M5(z,Q,X){{if(V8===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);V8=Z&&Z[1]||""}return`
|
|
24
|
-
`+V8+z}}var t7=!1,s7;{var Tz=typeof WeakMap==="function"?WeakMap:Map;s7=new Tz}function oQ(z,Q){if(!z||t7)return"";{var X=s7.get(z);if(X!==void 0)return X}var Z;t7=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=iQ.current,iQ.current=null,xZ();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(z0){Z=z0}Reflect.construct(z,[],H)}else{try{H.call()}catch(z0){Z=z0}z.call(H.prototype)}}else{try{throw Error()}catch(z0){Z=z0}z()}}catch(z0){if(z0&&Z&&typeof z0.stack==="string"){var B=z0.stack.split(`
|
|
25
|
-
`),K=Z.stack.split(`
|
|
26
|
-
`),R=B.length-1,A=K.length-1;while(R>=1&&A>=0&&B[R]!==K[A])A--;for(;R>=1&&A>=0;R--,A--)if(B[R]!==K[A]){if(R!==1||A!==1)do if(R--,A--,A<0||B[R]!==K[A]){var x=`
|
|
27
|
-
`+B[R].replace(" at new "," at ");if(z.displayName&&x.includes("<anonymous>"))x=x.replace("<anonymous>",z.displayName);if(typeof z==="function")s7.set(z,x);return x}while(R>=1&&A>=0);break}}}finally{t7=!1,iQ.current=$,I3(),Error.prepareStackTrace=J}var E=z?z.displayName||z.name:"",e=E?M5(E):"";if(typeof z==="function")s7.set(z,e);return e}function jZ(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 e7(z,Q,X){if(z==null)return"";if(typeof z==="function")return oQ(z,T3(z));if(typeof z==="string")return M5(z);switch(z){case W0:return M5("Suspense");case P0:return M5("SuspenseList")}if(typeof z==="object")switch(z.$$typeof){case j:return aQ(z.render);case f0:return e7(z.type,Q,X);case o0:{var Z=z,J=Z._payload,$=Z._init;try{return e7($(J),Q,X)}catch(H){}}}return""}function pZ(z){var Q=z._debugOwner?z._debugOwner.type:null,X=z._debugSource;switch(z.tag){case w:return M5(z.type);case g:return M5("Lazy");case u:return M5("Suspense");case t:return M5("SuspenseList");case L:case k:case c:return aQ(z.type);case C:return aQ(z.type.render);case _:return jZ(z.type);default:return""}}function nQ(z){try{var Q="",X=z;do Q+=pZ(X),X=X.return;while(X);return Q}catch(Z){return`
|
|
28
|
-
Error generating stack: `+Z.message+`
|
|
29
|
-
`+Z.stack}}function kz(z,Q,X){var Z=z.displayName;if(Z)return Z;var J=Q.displayName||Q.name||"";return J!==""?X+"("+J+")":X}function cZ(z){return z.displayName||"Context"}function d1(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 l1:return"Fragment";case U4:return"Portal";case H0:return"Profiler";case f:return"StrictMode";case W0:return"Suspense";case P0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case I:var Q=z;return cZ(Q)+".Consumer";case N0:var X=z;return cZ(X._context)+".Provider";case j:return kz(z,z.render,"ForwardRef");case f0:var Z=z.displayName||null;if(Z!==null)return Z;return d1(z.type)||"Memo";case o0:{var J=z,$=J._payload,H=J._init;try{return d1(H($))}catch(B){return null}}}return null}function dZ(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function rQ(z){return z.displayName||"Context"}function P1(z){var{tag:Q,type:X}=z;switch(Q){case Z0:return"Cache";case m:var Z=X;return rQ(Z)+".Consumer";case D:var J=X;return rQ(J._context)+".Provider";case o:return"DehydratedFragment";case C:return dZ(X,X.render,"ForwardRef");case M:return"Fragment";case w:return X;case F:return"Portal";case T:return"Root";case b:return"Text";case g:return d1(X);case v:if(X===f)return"StrictMode";return"Mode";case p:return"Offscreen";case V:return"Profiler";case l:return"Scope";case u:return"Suspense";case t:return"SuspenseList";case T0:return"TracingMarker";case _:case L:case Q0:case k:case a:case c:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var lZ=Y.ReactDebugCurrentFrame,g6=null,D8=!1;function z8(){{if(g6===null)return null;var z=g6._debugOwner;if(z!==null&&typeof z<"u")return P1(z)}return null}function iZ(){{if(g6===null)return"";return nQ(g6)}}function _6(){lZ.getCurrentStack=null,g6=null,D8=!1}function u4(z){lZ.getCurrentStack=z===null?null:iZ,g6=z,D8=!1}function oZ(){return g6}function U5(z){D8=z}function Q5(z){return""+z}function Y7(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return O4(z),z;default:return""}}var k3={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function vz(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 m8(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function aZ(z){return z._valueTracker}function Q8(z){z._valueTracker=null}function nZ(z){var Q="";if(!z)return Q;if(m8(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function rZ(z){var Q=m8(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);O4(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){O4(B),Z=""+B,$.call(this,B)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var H={getValue:function(){return Z},setValue:function(B){O4(B),Z=""+B},stopTracking:function(){Q8(z),delete z[Q]}};return H}function M7(z){if(aZ(z))return;z._valueTracker=rZ(z)}function Cz(z){if(!z)return!1;var Q=aZ(z);if(!Q)return!0;var X=Q.getValue(),Z=nZ(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function X8(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 Sz=!1,tZ=!1,sZ=!1,eZ=!1;function zJ(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function W(z,Q){var X=z,Z=Q.checked,J=v1({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return J}function y(z,Q){{if(vz("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!tZ)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),tZ=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!Sz)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),Sz=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:Y7(Q.value!=null?Q.value:Z),controlled:zJ(Q)}}function s(z,Q){var X=z,Z=Q.checked;if(Z!=null)D1(X,"checked",Z,!1)}function $0(z,Q){var X=z;{var Z=zJ(Q);if(!X._wrapperState.controlled&&Z&&!eZ)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"),eZ=!0;if(X._wrapperState.controlled&&!Z&&!sZ)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"),sZ=!0}s(z,Q);var J=Y7(Q.value),$=Q.type;if(J!=null){if($==="number"){if(J===0&&X.value===""||X.value!=J)X.value=Q5(J)}else if(X.value!==Q5(J))X.value=Q5(J)}else if($==="submit"||$==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))L1(X,Q.type,J);else if(Q.hasOwnProperty("defaultValue"))L1(X,Q.type,Y7(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function I0(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=Q5(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 B1(z,Q){var X=z;$0(X,Q),l0(X,Q)}function l0(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;r4(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=jJ(H);if(!B)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Cz(H),$0(H,B)}}}function L1(z,Q,X){if(Q!=="number"||X8(z.ownerDocument)!==z){if(X==null)z.defaultValue=Q5(z._wrapperState.initialValue);else if(z.defaultValue!==Q5(X))z.defaultValue=Q5(X)}}var g1=!1,Z4=!1,_4=!1;function N4(z,Q){{if(Q.value==null){if(typeof Q.children==="object"&&Q.children!==null)CZ.Children.forEach(Q.children,function(X){if(X==null)return;if(typeof X==="string"||typeof X==="number")return;if(!Z4)Z4=!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(!_4)_4=!0,q("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!g1)q("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),g1=!0}}function v4(z,Q){if(Q.value!=null)z.setAttribute("value",Q5(Y7(Q.value)))}var p4=Array.isArray;function a1(z){return p4(z)}var u8=!1;function fz(){var z=z8();if(z)return`
|
|
30
|
-
|
|
31
|
-
Check the render method of \``+z+"`.";return""}var tQ=["value","defaultValue"];function v3(z){{vz("select",z);for(var Q=0;Q<tQ.length;Q++){var X=tQ[Q];if(z[X]==null)continue;var Z=a1(z[X]);if(z.multiple&&!Z)q("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,fz());else if(!z.multiple&&Z)q("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,fz())}}}function P7(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 K=0;K<J.length;K++){var R=H.hasOwnProperty("$"+J[K].value);if(J[K].selected!==R)J[K].selected=R;if(R&&Z)J[K].defaultSelected=!0}}else{var A=Q5(Y7(X)),x=null;for(var E=0;E<J.length;E++){if(J[E].value===A){if(J[E].selected=!0,Z)J[E].defaultSelected=!0;return}if(x===null&&!J[E].disabled)x=J[E]}if(x!==null)x.selected=!0}}function sQ(z,Q){return v1({},Q,{value:void 0})}function eQ(z,Q){var X=z;if(v3(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 C3(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)P7(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)P7(X,!!Q.multiple,Q.defaultValue,!0)}function _O(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var J=Q.value;if(J!=null)P7(X,!!Q.multiple,J,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)P7(X,!!Q.multiple,Q.defaultValue,!0);else P7(X,!!Q.multiple,Q.multiple?[]:"",!1)}function NO(z,Q){var X=z,Z=Q.value;if(Z!=null)P7(X,!!Q.multiple,Z,!1)}var Y9=!1;function S3(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=v1({},Q,{value:void 0,defaultValue:void 0,children:Q5(X._wrapperState.initialValue)});return Z}function $9(z,Q){var X=z;if(vz("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!Y9)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"),Y9=!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(a1(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:Y7(Z)}}function H9(z,Q){var X=z,Z=Y7(Q.value),J=Y7(Q.defaultValue);if(Z!=null){var $=Q5(Z);if($!==X.value)X.value=$;if(Q.defaultValue==null&&X.defaultValue!==$)X.defaultValue=$}if(J!=null)X.defaultValue=Q5(J)}function G9(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function RO(z,Q){H9(z,Q)}var A7="http://www.w3.org/1999/xhtml",bO="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 bO;default:return A7}}function y3(z,Q){if(z==null||z===A7)return h3(Q);if(z===f3&&Q==="foreignObject")return A7;return z}var wO=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},QJ,q9=wO(function(z,Q){if(z.namespaceURI===f3){if(!("innerHTML"in z)){QJ=QJ||document.createElement("div"),QJ.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=QJ.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),X5=1,I7=3,s4=8,T7=9,V3=11,XJ=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===I7){X.nodeValue=Q;return}}z.textContent=Q},FO={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 MO(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var PO=["Webkit","ms","Moz","O"];Object.keys(zX).forEach(function(z){PO.forEach(function(Q){zX[MO(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 y4(Q,z),(""+Q).trim()}var AO=/([A-Z])/g,IO=/^ms-/;function TO(z){return z.replace(AO,"-$1").toLowerCase().replace(IO,"-ms-")}var B9=function(){};{var kO=/^(?:webkit|moz|o)[A-Z]/,vO=/^-ms-/,CO=/-(.)/g,U9=/;\s*$/,hz={},m3={},K9=!1,W9=!1,SO=function(z){return z.replace(CO,function(Q,X){return X.toUpperCase()})},fO=function(z){if(hz.hasOwnProperty(z)&&hz[z])return;hz[z]=!0,q("Unsupported style property %s. Did you mean %s?",z,SO(z.replace(vO,"ms-")))},hO=function(z){if(hz.hasOwnProperty(z)&&hz[z])return;hz[z]=!0,q("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},yO=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(U9,""))},VO=function(z,Q){if(K9)return;K9=!0,q("`NaN` is an invalid value for the `%s` css style property.",z)},DO=function(z,Q){if(W9)return;W9=!0,q("`Infinity` is an invalid value for the `%s` css style property.",z)};B9=function(z,Q){if(z.indexOf("-")>-1)fO(z);else if(kO.test(z))hO(z);else if(U9.test(Q))yO(z,Q);if(typeof Q==="number"){if(isNaN(Q))VO(z,Q);else if(!isFinite(Q))DO(z,Q)}}}var mO=B9;function uO(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:TO(Z))+":",Q+=D3(Z,J,$),X=";"}}return Q||null}}function O9(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var J=Z.indexOf("--")===0;if(!J)mO(Z,Q[Z]);var $=D3(Z,Q[Z],J);if(Z==="float")Z="cssFloat";if(J)X.setProperty(Z,$);else X[Z]=$}}function gO(z){return z==null||typeof z==="boolean"||z===""}function L9(z){var Q={};for(var X in z){var Z=FO[X]||[X];for(var J=0;J<Z.length;J++)Q[Z[J]]=X}return Q}function EO(z,Q){{if(!Q)return;var X=L9(z),Z=L9(Q),J={};for(var $ in X){var H=X[$],B=Z[$];if(B&&H!==B){var K=H+","+B;if(J[K])continue;J[K]=!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.",gO(z[H])?"Removing":"Updating",H,B)}}}}var xO={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},jO=v1({menuitem:!0},xO),pO="__html";function u3(z,Q){if(!Q)return;if(jO[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"||!(pO 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 ZJ={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"},_9={"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},yz={},cO=new RegExp("^(aria)-["+t4+"]*$"),dO=new RegExp("^(aria)[A-Z]["+t4+"]*$");function lO(z,Q){{if(B4.call(yz,Q)&&yz[Q])return!0;if(dO.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=_9.hasOwnProperty(X)?X:null;if(Z==null)return q("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),yz[Q]=!0,!0;if(Q!==Z)return q("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),yz[Q]=!0,!0}if(cO.test(Q)){var J=Q.toLowerCase(),$=_9.hasOwnProperty(J)?J:null;if($==null)return yz[Q]=!0,!1;if(Q!==$)return q("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,$),yz[Q]=!0,!0}}return!0}function iO(z,Q){{var X=[];for(var Z in Q){var J=lO(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 oO(z,Q){if(g8(z,Q))return;iO(z,Q)}var N9=!1;function aO(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!N9)if(N9=!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 R9=function(){};{var o6={},b9=/^on./,nO=/^on[^A-Z]/,rO=new RegExp("^(aria)-["+t4+"]*$"),tO=new RegExp("^(aria)[A-Z]["+t4+"]*$");R9=function(z,Q,X,Z){if(B4.call(o6,Q)&&o6[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."),o6[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),o6[Q]=!0,!0;if(b9.test(Q))return q("Unknown event handler property `%s`. It will be ignored.",Q),o6[Q]=!0,!0}else if(b9.test(Q)){if(nO.test(Q))q("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return o6[Q]=!0,!0}if(rO.test(Q)||tO.test(Q))return!0;if(J==="innerhtml")return q("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),o6[Q]=!0,!0;if(J==="aria")return q("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),o6[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),o6[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),o6[Q]=!0,!0;var K=a4(Q),R=K!==null&&K.type===F6;if(ZJ.hasOwnProperty(J)){var A=ZJ[J];if(A!==Q)return q("Invalid DOM property `%s`. Did you mean `%s`?",Q,A),o6[Q]=!0,!0}else if(!R&&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),o6[Q]=!0,!0;if(typeof X==="boolean"&&V4(Q,X,K,!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 o6[Q]=!0,!0}if(R)return!0;if(V4(Q,X,K,!1))return o6[Q]=!0,!1;if((X==="false"||X==="true")&&K!==null&&K.type===M4)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),o6[Q]=!0,!0;return!0}}var sO=function(z,Q,X){{var Z=[];for(var J in Q){var $=R9(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 eO(z,Q,X){if(g8(z,Q))return;sO(z,Q,X)}var w9=1,g3=2,QX=4,zL=w9|g3|QX,XX=null;function QL(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 XL(){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 ZL(z){return z===XX}function E3(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===I7?Q.parentNode:Q}var x3=null,Vz=null,Dz=null;function F9(z){var Q=B8(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=jJ(X);x3(Q.stateNode,Q.type,Z)}}function JL(z){x3=z}function M9(z){if(Vz)if(Dz)Dz.push(z);else Dz=[z];else Vz=z}function YL(){return Vz!==null||Dz!==null}function P9(){if(!Vz)return;var z=Vz,Q=Dz;if(Vz=null,Dz=null,F9(z),Q)for(var X=0;X<Q.length;X++)F9(Q[X])}var A9=function(z,Q){return z(Q)},I9=function(){},j3=!1;function $L(){var z=YL();if(z)I9(),P9()}function T9(z,Q,X){if(j3)return z(Q,X);j3=!0;try{return A9(z,Q,X)}finally{j3=!1,$L()}}function HL(z,Q,X){A9=z,I9=X}function GL(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function qL(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&&GL(Q));default:return!1}}function ZX(z,Q){var X=z.stateNode;if(X===null)return null;var Z=jJ(X);if(Z===null)return null;var J=Z[Q];if(qL(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(h1)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 k9(z,Q,X,Z,J,$,H,B,K){var R=Array.prototype.slice.call(arguments,3);try{Q.apply(X,R)}catch(A){this.onError(A)}}var v9=k9;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var c3=document.createElement("react");v9=function(Q,X,Z,J,$,H,B,K,R){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 A=document.createEvent("Event"),x=!1,E=!0,e=window.event,z0=Object.getOwnPropertyDescriptor(window,"event");function Y0(){if(c3.removeEventListener(G0,z1,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=e}var y0=Array.prototype.slice.call(arguments,3);function z1(){x=!0,Y0(),X.apply(Z,y0),E=!1}var a0,y1=!1,V1=!1;function n(r){if(a0=r.error,y1=!0,a0===null&&r.colno===0&&r.lineno===0)V1=!0;if(r.defaultPrevented){if(a0!=null&&typeof a0==="object")try{a0._suppressLogging=!0}catch(w0){}}}var G0="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",n),c3.addEventListener(G0,z1,!1),A.initEvent(G0,!1,!1),c3.dispatchEvent(A),z0)Object.defineProperty(window,"event",z0);if(x&&E){if(!y1)a0=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(V1)a0=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(a0)}if(window.removeEventListener("error",n),!x)return Y0(),k9.apply(this,arguments)}}var BL=v9,mz=!1,JJ=null,YJ=!1,d3=null,UL={onError:function(z){mz=!0,JJ=z}};function l3(z,Q,X,Z,J,$,H,B,K){mz=!1,JJ=null,BL.apply(UL,arguments)}function KL(z,Q,X,Z,J,$,H,B,K){if(l3.apply(this,arguments),mz){var R=i3();if(!YJ)YJ=!0,d3=R}}function WL(){if(YJ){var z=d3;throw YJ=!1,d3=null,z}}function OL(){return mz}function i3(){if(mz){var z=JJ;return mz=!1,JJ=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 LL(z){return z._reactInternals!==void 0}function _L(z,Q){z._reactInternals=Q}var q1=0,gz=1,e4=2,c1=4,E8=16,YX=32,o3=64,n1=128,k7=256,Z8=512,x8=1024,E5=2048,v7=4096,j8=8192,$J=16384,NL=E5|c1|o3|Z8|x8|$J,RL=32767,$X=32768,a6=65536,a3=131072,C9=1048576,n3=2097152,p8=4194304,r3=8388608,C7=16777216,HJ=33554432,t3=c1|x8|0,s3=e4|c1|E8|YX|Z8|v7|j8,HX=c1|o3|Z8|j8,Ez=E5|E8,S7=p8|r3|n3,bL=Y.ReactCurrentOwner;function c8(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(e4|v7))!==q1)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===T)return X;return null}function S9(z){if(z.tag===u){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 f9(z){return z.tag===T?z.stateNode.containerInfo:null}function wL(z){return c8(z)===z}function FL(z){{var Q=bL.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.",P1(X)||"A component");Z._warnedAboutRefsInRender=!0}}var J=uz(z);if(!J)return!1;return c8(J)===J}function h9(z){if(c8(z)!==z)throw Error("Unable to find node on an unmounted component.")}function y9(z){var Q=z.alternate;if(!Q){var X=c8(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 K=$.child;while(K){if(K===Z)return h9($),z;if(K===J)return h9($),Q;K=K.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==J.return)Z=$,J=H;else{var R=!1,A=$.child;while(A){if(A===Z){R=!0,Z=$,J=H;break}if(A===J){R=!0,J=$,Z=H;break}A=A.sibling}if(!R){A=H.child;while(A){if(A===Z){R=!0,Z=H,J=$;break}if(A===J){R=!0,J=H,Z=$;break}A=A.sibling}if(!R)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!==T)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function V9(z){var Q=y9(z);return Q!==null?D9(Q):null}function D9(z){if(z.tag===w||z.tag===b)return z;var Q=z.child;while(Q!==null){var X=D9(Q);if(X!==null)return X;Q=Q.sibling}return null}function ML(z){var Q=y9(z);return Q!==null?m9(Q):null}function m9(z){if(z.tag===w||z.tag===b)return z;var Q=z.child;while(Q!==null){if(Q.tag!==F){var X=m9(Q);if(X!==null)return X}Q=Q.sibling}return null}var u9=H4.unstable_scheduleCallback,PL=H4.unstable_cancelCallback,AL=H4.unstable_shouldYield,IL=H4.unstable_requestPaint,N6=H4.unstable_now,TL=H4.unstable_getCurrentPriorityLevel,GJ=H4.unstable_ImmediatePriority,e3=H4.unstable_UserBlockingPriority,d8=H4.unstable_NormalPriority,kL=H4.unstable_LowPriority,z$=H4.unstable_IdlePriority,vL=H4.unstable_yieldValue,CL=H4.unstable_setDisableYieldValue,l8=null,P6=null,m0=null,$7=!1,x5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function SL(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(A0)z=v1({},z,{getLaneLabelMap:mL,injectProfilingHooks:DL});l8=Q.inject(z),P6=Q}catch(X){q("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function fL(z,Q){if(P6&&typeof P6.onScheduleFiberRoot==="function")try{P6.onScheduleFiberRoot(l8,z,Q)}catch(X){if(!$7)$7=!0,q("React instrumentation encountered an error: %s",X)}}function hL(z,Q){if(P6&&typeof P6.onCommitFiberRoot==="function")try{var X=(z.current.flags&n1)===n1;if(S0){var Z;switch(Q){case O5:Z=GJ;break;case h7:Z=e3;break;case y7:Z=d8;break;case _J:Z=z$;break;default:Z=d8;break}P6.onCommitFiberRoot(l8,z,Z,X)}else P6.onCommitFiberRoot(l8,z,void 0,X)}catch(J){if(!$7)$7=!0,q("React instrumentation encountered an error: %s",J)}}function yL(z){if(P6&&typeof P6.onPostCommitFiberRoot==="function")try{P6.onPostCommitFiberRoot(l8,z)}catch(Q){if(!$7)$7=!0,q("React instrumentation encountered an error: %s",Q)}}function VL(z){if(P6&&typeof P6.onCommitFiberUnmount==="function")try{P6.onCommitFiberUnmount(l8,z)}catch(Q){if(!$7)$7=!0,q("React instrumentation encountered an error: %s",Q)}}function R6(z){{if(typeof vL==="function")CL(z),U(z);if(P6&&typeof P6.setStrictMode==="function")try{P6.setStrictMode(l8,z)}catch(Q){if(!$7)$7=!0,q("React instrumentation encountered an error: %s",Q)}}}function DL(z){m0=z}function mL(){{var z=new Map,Q=1;for(var X=0;X<X$;X++){var Z=X_(Q);z.set(Q,Z),Q*=2}return z}}function uL(z){if(m0!==null&&typeof m0.markCommitStarted==="function")m0.markCommitStarted(z)}function g9(){if(m0!==null&&typeof m0.markCommitStopped==="function")m0.markCommitStopped()}function GX(z){if(m0!==null&&typeof m0.markComponentRenderStarted==="function")m0.markComponentRenderStarted(z)}function xz(){if(m0!==null&&typeof m0.markComponentRenderStopped==="function")m0.markComponentRenderStopped()}function gL(z){if(m0!==null&&typeof m0.markComponentPassiveEffectMountStarted==="function")m0.markComponentPassiveEffectMountStarted(z)}function EL(){if(m0!==null&&typeof m0.markComponentPassiveEffectMountStopped==="function")m0.markComponentPassiveEffectMountStopped()}function xL(z){if(m0!==null&&typeof m0.markComponentPassiveEffectUnmountStarted==="function")m0.markComponentPassiveEffectUnmountStarted(z)}function jL(){if(m0!==null&&typeof m0.markComponentPassiveEffectUnmountStopped==="function")m0.markComponentPassiveEffectUnmountStopped()}function pL(z){if(m0!==null&&typeof m0.markComponentLayoutEffectMountStarted==="function")m0.markComponentLayoutEffectMountStarted(z)}function cL(){if(m0!==null&&typeof m0.markComponentLayoutEffectMountStopped==="function")m0.markComponentLayoutEffectMountStopped()}function E9(z){if(m0!==null&&typeof m0.markComponentLayoutEffectUnmountStarted==="function")m0.markComponentLayoutEffectUnmountStarted(z)}function x9(){if(m0!==null&&typeof m0.markComponentLayoutEffectUnmountStopped==="function")m0.markComponentLayoutEffectUnmountStopped()}function dL(z,Q,X){if(m0!==null&&typeof m0.markComponentErrored==="function")m0.markComponentErrored(z,Q,X)}function lL(z,Q,X){if(m0!==null&&typeof m0.markComponentSuspended==="function")m0.markComponentSuspended(z,Q,X)}function iL(z){if(m0!==null&&typeof m0.markLayoutEffectsStarted==="function")m0.markLayoutEffectsStarted(z)}function oL(){if(m0!==null&&typeof m0.markLayoutEffectsStopped==="function")m0.markLayoutEffectsStopped()}function aL(z){if(m0!==null&&typeof m0.markPassiveEffectsStarted==="function")m0.markPassiveEffectsStarted(z)}function nL(){if(m0!==null&&typeof m0.markPassiveEffectsStopped==="function")m0.markPassiveEffectsStopped()}function j9(z){if(m0!==null&&typeof m0.markRenderStarted==="function")m0.markRenderStarted(z)}function rL(){if(m0!==null&&typeof m0.markRenderYielded==="function")m0.markRenderYielded()}function p9(){if(m0!==null&&typeof m0.markRenderStopped==="function")m0.markRenderStopped()}function tL(z){if(m0!==null&&typeof m0.markRenderScheduled==="function")m0.markRenderScheduled(z)}function sL(z,Q){if(m0!==null&&typeof m0.markForceUpdateScheduled==="function")m0.markForceUpdateScheduled(z,Q)}function Q$(z,Q){if(m0!==null&&typeof m0.markStateUpdateScheduled==="function")m0.markStateUpdateScheduled(z,Q)}var H1=0,E1=1,J4=2,c4=8,H7=16,c9=Math.clz32?Math.clz32:Q_,eL=Math.log,z_=Math.LN2;function Q_(z){var Q=z>>>0;if(Q===0)return 32;return 31-(eL(Q)/z_|0)|0}var X$=31,R0=0,b6=0,_1=1,jz=2,f7=4,i8=8,G7=16,qX=32,pz=4194240,BX=64,Z$=128,J$=256,Y$=512,$$=1024,H$=2048,G$=4096,q$=8192,B$=16384,U$=32768,K$=65536,W$=131072,O$=262144,L$=524288,_$=1048576,N$=2097152,qJ=130023424,cz=4194304,R$=8388608,b$=16777216,w$=33554432,F$=67108864,d9=cz,UX=134217728,l9=268435455,KX=268435456,o8=536870912,K5=1073741824;function X_(z){{if(z&_1)return"Sync";if(z&jz)return"InputContinuousHydration";if(z&f7)return"InputContinuous";if(z&i8)return"DefaultHydration";if(z&G7)return"Default";if(z&qX)return"TransitionHydration";if(z&pz)return"Transition";if(z&qJ)return"Retry";if(z&UX)return"SelectiveHydration";if(z&KX)return"IdleHydration";if(z&o8)return"Idle";if(z&K5)return"Offscreen"}}var A4=-1,BJ=BX,UJ=cz;function WX(z){switch(a8(z)){case _1:return _1;case jz:return jz;case f7:return f7;case i8:return i8;case G7:return G7;case qX:return qX;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case N$:return z&pz;case cz:case R$:case b$:case w$:case F$:return z&qJ;case UX:return UX;case KX:return KX;case o8:return o8;case K5:return K5;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===R0)return R0;var Z=R0,J=z.suspendedLanes,$=z.pingedLanes,H=X&l9;if(H!==R0){var B=H&~J;if(B!==R0)Z=WX(B);else{var K=H&$;if(K!==R0)Z=WX(K)}}else{var R=X&~J;if(R!==R0)Z=WX(R);else if($!==R0)Z=WX($)}if(Z===R0)return R0;if(Q!==R0&&Q!==Z&&(Q&J)===R0){var A=a8(Z),x=a8(Q);if(A>=x||A===G7&&(x&pz)!==R0)return Q}if((Z&f7)!==R0)Z|=X&G7;var E=z.entangledLanes;if(E!==R0){var e=z.entanglements,z0=Z&E;while(z0>0){var Y0=n8(z0),y0=1<<Y0;Z|=e[Y0],z0&=~y0}}return Z}function Z_(z,Q){var X=z.eventTimes,Z=A4;while(Q>0){var J=n8(Q),$=1<<J,H=X[J];if(H>Z)Z=H;Q&=~$}return Z}function J_(z,Q){switch(z){case _1:case jz:case f7:return Q+250;case i8:case G7:case qX:case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case N$:return Q+5000;case cz:case R$:case b$:case w$:case F$:return A4;case UX:case KX:case o8:case K5:return A4;default:return q("Should have found matching lanes. This is a bug in React."),A4}}function Y_(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:J,expirationTimes:$}=z,H=X;while(H>0){var B=n8(H),K=1<<B,R=$[B];if(R===A4){if((K&Z)===R0||(K&J)!==R0)$[B]=J_(K,Q)}else if(R<=Q)z.expiredLanes|=K;H&=~K}}function $_(z){return WX(z.pendingLanes)}function M$(z){var Q=z.pendingLanes&~K5;if(Q!==R0)return Q;if(Q&K5)return K5;return R0}function H_(z){return(z&_1)!==R0}function P$(z){return(z&l9)!==R0}function i9(z){return(z&qJ)===z}function G_(z){var Q=_1|f7|G7;return(z&Q)===R0}function q_(z){return(z&pz)===z}function WJ(z,Q){var X=jz|f7|i8|G7;return(Q&X)!==R0}function B_(z,Q){return(Q&z.expiredLanes)!==R0}function o9(z){return(z&pz)!==R0}function a9(){var z=BJ;if(BJ<<=1,(BJ&pz)===R0)BJ=BX;return z}function U_(){var z=UJ;if(UJ<<=1,(UJ&qJ)===R0)UJ=cz;return z}function a8(z){return z&-z}function OX(z){return a8(z)}function n8(z){return 31-c9(z)}function A$(z){return n8(z)}function W5(z,Q){return(z&Q)!==R0}function dz(z,Q){return(z&Q)===Q}function T1(z,Q){return z|Q}function OJ(z,Q){return z&~Q}function n9(z,Q){return z&Q}function LJ(z){return z}function K_(z,Q){return z!==b6&&z<Q?z:Q}function I$(z){var Q=[];for(var X=0;X<X$;X++)Q.push(z);return Q}function LX(z,Q,X){if(z.pendingLanes|=Q,Q!==o8)z.suspendedLanes=R0,z.pingedLanes=R0;var Z=z.eventTimes,J=A$(Q);Z[J]=X}function W_(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var J=n8(Z),$=1<<J;X[J]=A4,Z&=~$}}function r9(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function O_(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=R0,z.pingedLanes=R0,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:J,expirationTimes:$}=z,H=X;while(H>0){var B=n8(H),K=1<<B;Z[B]=R0,J[B]=A4,$[B]=A4,H&=~K}}function T$(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,J=X;while(J){var $=n8(J),H=1<<$;if(H&Q|Z[$]&Q)Z[$]|=Q;J&=~H}}function L_(z,Q){var X=a8(Q),Z;switch(X){case f7:Z=jz;break;case G7:Z=i8;break;case BX:case Z$:case J$:case Y$:case $$:case H$:case G$:case q$:case B$:case U$:case K$:case W$:case O$:case L$:case _$:case N$:case cz:case R$:case b$:case w$:case F$:Z=qX;break;case o8:Z=KX;break;default:Z=b6;break}if((Z&(z.suspendedLanes|Q))!==b6)return b6;return Z}function t9(z,Q,X){if(!x5)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var J=A$(X),$=1<<J,H=Z[J];H.add(Q),X&=~$}}function s9(z,Q){if(!x5)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 K=B.alternate;if(K===null||!Z.has(K))Z.add(B)}),H.clear();Q&=~$}}function e9(z,Q){return null}var O5=_1,h7=f7,y7=G7,_J=o8,_X=b6;function j5(){return _X}function w6(z){_X=z}function __(z,Q){var X=_X;try{return _X=z,Q()}finally{_X=X}}function N_(z,Q){return z!==0&&z<Q?z:Q}function R_(z,Q){return z===0||z>Q?z:Q}function k$(z,Q){return z!==0&&z<Q}function zq(z){var Q=a8(z);if(!k$(O5,Q))return O5;if(!k$(h7,Q))return h7;if(P$(Q))return y7;return _J}function NJ(z){var Q=z.current.memoizedState;return Q.isDehydrated}var Qq;function b_(z){Qq=z}function w_(z){Qq(z)}var v$;function F_(z){v$=z}var Xq;function M_(z){Xq=z}var Zq;function P_(z){Zq=z}var Jq;function A_(z){Jq=z}var C$=!1,RJ=[],J8=null,Y8=null,$8=null,NX=new Map,RX=new Map,H8=[],I_=["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 T_(z){return I_.indexOf(z)>-1}function k_(z,Q,X,Z,J){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:J,targetContainers:[Z]}}function Yq(z,Q){switch(z){case"focusin":case"focusout":J8=null;break;case"dragenter":case"dragleave":Y8=null;break;case"mouseover":case"mouseout":$8=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;NX.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;RX.delete(Z);break}}}function bX(z,Q,X,Z,J,$){if(z===null||z.nativeEvent!==$){var H=k_(Q,X,Z,J,$);if(Q!==null){var B=B8(Q);if(B!==null)v$(B)}return H}z.eventSystemFlags|=Z;var K=z.targetContainers;if(J!==null&&K.indexOf(J)===-1)K.push(J);return z}function v_(z,Q,X,Z,J){switch(Q){case"focusin":{var $=J;return J8=bX(J8,z,Q,X,Z,$),!0}case"dragenter":{var H=J;return Y8=bX(Y8,z,Q,X,Z,H),!0}case"mouseover":{var B=J;return $8=bX($8,z,Q,X,Z,B),!0}case"pointerover":{var K=J,R=K.pointerId;return NX.set(R,bX(NX.get(R)||null,z,Q,X,Z,K)),!0}case"gotpointercapture":{var A=J,x=A.pointerId;return RX.set(x,bX(RX.get(x)||null,z,Q,X,Z,A)),!0}}return!1}function $q(z){var Q=s8(z.target);if(Q!==null){var X=c8(Q);if(X!==null){var Z=X.tag;if(Z===u){var J=S9(X);if(J!==null){z.blockedOn=J,Jq(z.priority,function(){Xq(X)});return}}else if(Z===T){var $=X.stateNode;if(NJ($)){z.blockedOn=f9(X);return}}}}z.blockedOn=null}function C_(z){var Q=Zq(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<H8.length;Z++)if(!k$(Q,H8[Z].priority))break;if(H8.splice(Z,0,X),Z===0)$q(X)}function bJ(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);QL($),J.target.dispatchEvent($),XL()}else{var H=B8(Z);if(H!==null)v$(H);return z.blockedOn=Z,!1}Q.shift()}return!0}function Hq(z,Q,X){if(bJ(z))X.delete(Q)}function S_(){if(C$=!1,J8!==null&&bJ(J8))J8=null;if(Y8!==null&&bJ(Y8))Y8=null;if($8!==null&&bJ($8))$8=null;NX.forEach(Hq),RX.forEach(Hq)}function wX(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!C$)C$=!0,H4.unstable_scheduleCallback(H4.unstable_NormalPriority,S_)}}function FX(z){if(RJ.length>0){wX(RJ[0],z);for(var Q=1;Q<RJ.length;Q++){var X=RJ[Q];if(X.blockedOn===z)X.blockedOn=null}}if(J8!==null)wX(J8,z);if(Y8!==null)wX(Y8,z);if($8!==null)wX($8,z);var Z=function(B){return wX(B,z)};NX.forEach(Z),RX.forEach(Z);for(var J=0;J<H8.length;J++){var $=H8[J];if($.blockedOn===z)$.blockedOn=null}while(H8.length>0){var H=H8[0];if(H.blockedOn!==null)break;else if($q(H),H.blockedOn===null)H8.shift()}}var lz=Y.ReactCurrentBatchConfig,S$=!0;function Gq(z){S$=!!z}function f_(){return S$}function h_(z,Q,X){var Z=qq(Q),J;switch(Z){case O5:J=y_;break;case h7:J=V_;break;case y7:default:J=f$;break}return J.bind(null,Q,X,z)}function y_(z,Q,X,Z){var J=j5(),$=lz.transition;lz.transition=null;try{w6(O5),f$(z,Q,X,Z)}finally{w6(J),lz.transition=$}}function V_(z,Q,X,Z){var J=j5(),$=lz.transition;lz.transition=null;try{w6(h7),f$(z,Q,X,Z)}finally{w6(J),lz.transition=$}}function f$(z,Q,X,Z){if(!S$)return;D_(z,Q,X,Z)}function D_(z,Q,X,Z){var J=h$(z,Q,X,Z);if(J===null){i$(z,Q,Z,wJ,X),Yq(z,Z);return}if(v_(J,z,Q,X,Z)){Z.stopPropagation();return}if(Yq(z,Z),Q&QX&&T_(z)){while(J!==null){var $=B8(J);if($!==null)w_($);var H=h$(z,Q,X,Z);if(H===null)i$(z,Q,Z,wJ,X);if(H===J)break;J=H}if(J!==null)Z.stopPropagation();return}i$(z,Q,Z,null,X)}var wJ=null;function h$(z,Q,X,Z){wJ=null;var J=E3(Z),$=s8(J);if($!==null){var H=c8($);if(H===null)$=null;else{var B=H.tag;if(B===u){var K=S9(H);if(K!==null)return K;$=null}else if(B===T){var R=H.stateNode;if(NJ(R))return f9(H);$=null}else if(H!==$)$=null}}return wJ=$,null}function qq(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 O5;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 h7;case"message":{var Q=TL();switch(Q){case GJ:return O5;case e3:return h7;case d8:case kL:return y7;case z$:return _J;default:return y7}}default:return y7}}function m_(z,Q,X){return z.addEventListener(Q,X,!1),X}function u_(z,Q,X){return z.addEventListener(Q,X,!0),X}function g_(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function E_(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var MX=null,y$=null,PX=null;function x_(z){return MX=z,y$=Uq(),!0}function j_(){MX=null,y$=null,PX=null}function Bq(){if(PX)return PX;var z,Q=y$,X=Q.length,Z,J=Uq(),$=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 PX=J.slice(z,B),PX}function Uq(){if("value"in MX)return MX.value;return MX.textContent}function FJ(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 MJ(){return!0}function Kq(){return!1}function L5(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 K=z[B];if(K)this[B]=K($);else this[B]=$[B]}var R=$.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1;if(R)this.isDefaultPrevented=MJ;else this.isDefaultPrevented=Kq;return this.isPropagationStopped=Kq,this}return v1(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=MJ},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=MJ},persist:function(){},isPersistent:MJ}),Q}var iz={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},V$=L5(iz),AX=v1({},iz,{view:0,detail:0}),p_=L5(AX),D$,m$,IX;function c_(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 PJ=v1({},AX,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:g$,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 c_(z),D$},movementY:function(z){if("movementY"in z)return z.movementY;return m$}}),Wq=L5(PJ),d_=v1({},PJ,{dataTransfer:0}),l_=L5(d_),i_=v1({},AX,{relatedTarget:0}),u$=L5(i_),o_=v1({},iz,{animationName:0,elapsedTime:0,pseudoElement:0}),a_=L5(o_),n_=v1({},iz,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),r_=L5(n_),t_=v1({},iz,{data:0}),Oq=L5(t_),s_=Oq,e_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zN={"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 QN(z){if(z.key){var Q=e_[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=FJ(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return zN[z.keyCode]||"Unidentified";return""}var XN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZN(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=XN[z];return Z?!!X[Z]:!1}function g$(z){return ZN}var JN=v1({},AX,{key:QN,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:g$,charCode:function(z){if(z.type==="keypress")return FJ(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 FJ(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),YN=L5(JN),$N=v1({},PJ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lq=L5($N),HN=v1({},AX,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:g$}),GN=L5(HN),qN=v1({},iz,{propertyName:0,elapsedTime:0,pseudoElement:0}),BN=L5(qN),UN=v1({},PJ,{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}),KN=L5(UN),WN=[9,13,27,32],_q=229,E$=h1&&"CompositionEvent"in window,TX=null;if(h1&&"documentMode"in document)TX=document.documentMode;var ON=h1&&"TextEvent"in window&&!TX,Nq=h1&&(!E$||TX&&TX>8&&TX<=11),Rq=32,bq=String.fromCharCode(Rq);function LN(){L0("onBeforeInput",["compositionend","keypress","textInput","paste"]),L0("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),L0("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),L0("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var wq=!1;function _N(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function NN(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function RN(z,Q){return z==="keydown"&&Q.keyCode===_q}function Fq(z,Q){switch(z){case"keyup":return WN.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==_q;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mq(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function Pq(z){return z.locale==="ko"}var oz=!1;function bN(z,Q,X,Z,J){var $,H;if(E$)$=NN(Q);else if(!oz){if(RN(Q,Z))$="onCompositionStart"}else if(Fq(Q,Z))$="onCompositionEnd";if(!$)return null;if(Nq&&!Pq(Z)){if(!oz&&$==="onCompositionStart")oz=x_(J);else if($==="onCompositionEnd"){if(oz)H=Bq()}}var B=vJ(X,$);if(B.length>0){var K=new Oq($,Q,null,Z,J);if(z.push({event:K,listeners:B}),H)K.data=H;else{var R=Mq(Z);if(R!==null)K.data=R}}}function wN(z,Q){switch(z){case"compositionend":return Mq(Q);case"keypress":var X=Q.which;if(X!==Rq)return null;return wq=!0,bq;case"textInput":var Z=Q.data;if(Z===bq&&wq)return null;return Z;default:return null}}function FN(z,Q){if(oz){if(z==="compositionend"||!E$&&Fq(z,Q)){var X=Bq();return j_(),oz=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!_N(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 Nq&&!Pq(Q)?null:Q.data;default:return null}}function MN(z,Q,X,Z,J){var $;if(ON)$=wN(Q,Z);else $=FN(Q,Z);if(!$)return null;var H=vJ(X,"onBeforeInput");if(H.length>0){var B=new s_("onBeforeInput","beforeinput",null,Z,J);z.push({event:B,listeners:H}),B.data=$}}function PN(z,Q,X,Z,J,$,H){bN(z,Q,X,Z,J),MN(z,Q,X,Z,J)}var AN={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 Aq(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!AN[z.type];if(Q==="textarea")return!0;return!1}function IN(z){if(!h1)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 TN(){L0("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Iq(z,Q,X,Z){M9(Z);var J=vJ(Q,"onChange");if(J.length>0){var $=new V$("onChange","change",null,X,Z);z.push({event:$,listeners:J})}}var kX=null,vX=null;function kN(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function vN(z){var Q=[];Iq(Q,vX,z,E3(z)),T9(CN,Q)}function CN(z){cq(z,0)}function AJ(z){var Q=ez(z);if(Cz(Q))return z}function SN(z,Q){if(z==="change")return Q}var Tq=!1;if(h1)Tq=IN("input")&&(!document.documentMode||document.documentMode>9);function fN(z,Q){kX=z,vX=Q,kX.attachEvent("onpropertychange",vq)}function kq(){if(!kX)return;kX.detachEvent("onpropertychange",vq),kX=null,vX=null}function vq(z){if(z.propertyName!=="value")return;if(AJ(vX))vN(z)}function hN(z,Q,X){if(z==="focusin")kq(),fN(Q,X);else if(z==="focusout")kq()}function yN(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return AJ(vX)}function VN(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function DN(z,Q){if(z==="click")return AJ(Q)}function mN(z,Q){if(z==="input"||z==="change")return AJ(Q)}function uN(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;L1(z,"number",z.value)}function gN(z,Q,X,Z,J,$,H){var B=X?ez(X):window,K,R;if(kN(B))K=SN;else if(Aq(B))if(Tq)K=mN;else K=yN,R=hN;else if(VN(B))K=DN;if(K){var A=K(Q,X);if(A){Iq(z,A,Z,J);return}}if(R)R(Q,B,X);if(Q==="focusout")uN(B)}function EN(){n0("onMouseEnter",["mouseout","mouseover"]),n0("onMouseLeave",["mouseout","mouseover"]),n0("onPointerEnter",["pointerout","pointerover"]),n0("onPointerLeave",["pointerout","pointerover"])}function xN(z,Q,X,Z,J,$,H){var B=Q==="mouseover"||Q==="pointerover",K=Q==="mouseout"||Q==="pointerout";if(B&&!ZL(Z)){var R=Z.relatedTarget||Z.fromElement;if(R){if(s8(R)||cX(R))return}}if(!K&&!B)return;var A;if(J.window===J)A=J;else{var x=J.ownerDocument;if(x)A=x.defaultView||x.parentWindow;else A=window}var E,e;if(K){var z0=Z.relatedTarget||Z.toElement;if(E=X,e=z0?s8(z0):null,e!==null){var Y0=c8(e);if(e!==Y0||e.tag!==w&&e.tag!==b)e=null}}else E=null,e=X;if(E===e)return;var y0=Wq,z1="onMouseLeave",a0="onMouseEnter",y1="mouse";if(Q==="pointerout"||Q==="pointerover")y0=Lq,z1="onPointerLeave",a0="onPointerEnter",y1="pointer";var V1=E==null?A:ez(E),n=e==null?A:ez(e),G0=new y0(z1,y1+"leave",E,Z,J);G0.target=V1,G0.relatedTarget=n;var r=null,w0=s8(J);if(w0===X){var g0=new y0(a0,y1+"enter",e,Z,J);g0.target=n,g0.relatedTarget=V1,r=g0}BR(z,G0,r,E,e)}function jN(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var _5=typeof Object.is==="function"?Object.is:jN;function CX(z,Q){if(_5(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(!B4.call(Q,$)||!_5(z[$],Q[$]))return!1}return!0}function Cq(z){while(z&&z.firstChild)z=z.firstChild;return z}function pN(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function Sq(z,Q){var X=Cq(z),Z=0,J=0;while(X){if(X.nodeType===I7){if(J=Z+X.textContent.length,Z<=Q&&J>=Q)return{node:X,offset:Q-Z};Z=J}X=Cq(pN(X))}}function cN(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(K){return null}return dN(z,J,$,H,B)}function dN(z,Q,X,Z,J){var $=0,H=-1,B=-1,K=0,R=0,A=z,x=null;z:while(!0){var E=null;while(!0){if(A===Q&&(X===0||A.nodeType===I7))H=$+X;if(A===Z&&(J===0||A.nodeType===I7))B=$+J;if(A.nodeType===I7)$+=A.nodeValue.length;if((E=A.firstChild)===null)break;x=A,A=E}while(!0){if(A===z)break z;if(x===Q&&++K===X)H=$;if(x===Z&&++R===J)B=$;if((E=A.nextSibling)!==null)break;A=x,x=A.parentNode}A=E}if(H===-1||B===-1)return null;return{start:H,end:B}}function lN(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 K=B;B=H,H=K}var R=Sq(z,H),A=Sq(z,B);if(R&&A){if(J.rangeCount===1&&J.anchorNode===R.node&&J.anchorOffset===R.offset&&J.focusNode===A.node&&J.focusOffset===A.offset)return;var x=X.createRange();if(x.setStart(R.node,R.offset),J.removeAllRanges(),H>B)J.addRange(x),J.extend(A.node,A.offset);else x.setEnd(A.node,A.offset),J.addRange(x)}}function fq(z){return z&&z.nodeType===I7}function hq(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(fq(z))return!1;else if(fq(Q))return hq(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 iN(z){return z&&z.ownerDocument&&hq(z.ownerDocument.documentElement,z)}function oN(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function yq(){var z=window,Q=X8();while(Q instanceof z.HTMLIFrameElement){if(oN(Q))z=Q.contentWindow;else return Q;Q=X8(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 aN(){var z=yq();return{focusedElem:z,selectionRange:x$(z)?rN(z):null}}function nN(z){var Q=yq(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&iN(X)){if(Z!==null&&x$(X))tN(X,Z);var J=[],$=X;while($=$.parentNode)if($.nodeType===X5)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 rN(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=cN(z);return Q||{start:0,end:0}}function tN(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 lN(z,Q)}var sN=h1&&"documentMode"in document&&document.documentMode<=11;function eN(){L0("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var az=null,j$=null,SX=null,p$=!1;function zR(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 QR(z){return z.window===z?z.document:z.nodeType===T7?z:z.ownerDocument}function Vq(z,Q,X){var Z=QR(X);if(p$||az==null||az!==X8(Z))return;var J=zR(az);if(!SX||!CX(SX,J)){SX=J;var $=vJ(j$,"onSelect");if($.length>0){var H=new V$("onSelect","select",null,Q,X);z.push({event:H,listeners:$}),H.target=az}}}function XR(z,Q,X,Z,J,$,H){var B=X?ez(X):window;switch(Q){case"focusin":if(Aq(B)||B.contentEditable==="true")az=B,j$=X,SX=null;break;case"focusout":az=null,j$=null,SX=null;break;case"mousedown":p$=!0;break;case"contextmenu":case"mouseup":case"dragend":p$=!1,Vq(z,Z,J);break;case"selectionchange":if(sN)break;case"keydown":case"keyup":Vq(z,Z,J)}}function IJ(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var nz={animationend:IJ("Animation","AnimationEnd"),animationiteration:IJ("Animation","AnimationIteration"),animationstart:IJ("Animation","AnimationStart"),transitionend:IJ("Transition","TransitionEnd")},c$={},Dq={};if(h1){if(Dq=document.createElement("div").style,!("AnimationEvent"in window))delete nz.animationend.animation,delete nz.animationiteration.animation,delete nz.animationstart.animation;if(!("TransitionEvent"in window))delete nz.transitionend.transition}function TJ(z){if(c$[z])return c$[z];else if(!nz[z])return z;var Q=nz[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in Dq)return c$[z]=Q[X];return z}var mq=TJ("animationend"),uq=TJ("animationiteration"),gq=TJ("animationstart"),Eq=TJ("transitionend"),xq=new Map,jq=["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 G8(z,Q){xq.set(z,Q),L0(Q,[z])}function ZR(){for(var z=0;z<jq.length;z++){var Q=jq[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);G8(X,"on"+Z)}G8(mq,"onAnimationEnd"),G8(uq,"onAnimationIteration"),G8(gq,"onAnimationStart"),G8("dblclick","onDoubleClick"),G8("focusin","onFocus"),G8("focusout","onBlur"),G8(Eq,"onTransitionEnd")}function JR(z,Q,X,Z,J,$,H){var B=xq.get(Q);if(B===void 0)return;var K=V$,R=Q;switch(Q){case"keypress":if(FJ(Z)===0)return;case"keydown":case"keyup":K=YN;break;case"focusin":R="focus",K=u$;break;case"focusout":R="blur",K=u$;break;case"beforeblur":case"afterblur":K=u$;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=Wq;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=l_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=GN;break;case mq:case uq:case gq:K=a_;break;case Eq:K=BN;break;case"scroll":K=p_;break;case"wheel":K=KN;break;case"copy":case"cut":case"paste":K=r_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Lq;break}var A=($&QX)!==0;{var x=!A&&Q==="scroll",E=GR(X,B,Z.type,A,x);if(E.length>0){var e=new K(B,R,null,Z,J);z.push({event:e,listeners:E})}}}ZR(),EN(),TN(),eN(),LN();function YR(z,Q,X,Z,J,$,H){JR(z,Q,X,Z,J,$);var B=($&zL)===0;if(B)xN(z,Q,X,Z,J),gN(z,Q,X,Z,J),XR(z,Q,X,Z,J),PN(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 pq(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,KL(Z,Q,void 0,z),z.currentTarget=null}function $R(z,Q,X){var Z;if(X)for(var J=Q.length-1;J>=0;J--){var $=Q[J],H=$.instance,B=$.currentTarget,K=$.listener;if(H!==Z&&z.isPropagationStopped())return;pq(z,K,B),Z=H}else for(var R=0;R<Q.length;R++){var A=Q[R],x=A.instance,E=A.currentTarget,e=A.listener;if(x!==Z&&z.isPropagationStopped())return;pq(z,e,E),Z=x}}function cq(z,Q){var X=(Q&QX)!==0;for(var Z=0;Z<z.length;Z++){var J=z[Z],$=J.event,H=J.listeners;$R($,H,X)}WL()}function HR(z,Q,X,Z,J){var $=E3(X),H=[];YR(H,z,Z,X,$,Q),cq(H,Q)}function C4(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=ub(Q),J=UR(z,X);if(!Z.has(J))dq(Q,z,g3,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;dq(X,z,Z,Q)}var kJ="_reactListening"+Math.random().toString(36).slice(2);function hX(z){if(!z[kJ]){z[kJ]=!0,t0.forEach(function(X){if(X!=="selectionchange"){if(!d$.has(X))l$(X,!1,z);l$(X,!0,z)}});var Q=z.nodeType===T7?z:z.ownerDocument;if(Q!==null){if(!Q[kJ])Q[kJ]=!0,l$("selectionchange",!1,Q)}}}function dq(z,Q,X,Z,J){var $=h_(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=g_(z,Q,$,H);else B=u_(z,Q,$);else if(H!==void 0)B=E_(z,Q,$,H);else B=m_(z,Q,$)}function lq(z,Q){return z===Q||z.nodeType===s4&&z.parentNode===Q}function i$(z,Q,X,Z,J){var $=Z;if((Q&w9)===0&&(Q&g3)===0){var H=J;if(Z!==null){var B=Z;z:while(!0){if(B===null)return;var K=B.tag;if(K===T||K===F){var R=B.stateNode.containerInfo;if(lq(R,H))break;if(K===F){var A=B.return;while(A!==null){var x=A.tag;if(x===T||x===F){var E=A.stateNode.containerInfo;if(lq(E,H))return}A=A.return}}while(R!==null){var e=s8(R);if(e===null)return;var z0=e.tag;if(z0===w||z0===b){B=$=e;continue z}R=R.parentNode}}B=B.return}}}T9(function(){return HR(z,Q,X,$)})}function yX(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function GR(z,Q,X,Z,J,$){var H=Q!==null?Q+"Capture":null,B=Z?H:Q,K=[],R=z,A=null;while(R!==null){var x=R,E=x.stateNode,e=x.tag;if(e===w&&E!==null){if(A=E,B!==null){var z0=ZX(R,B);if(z0!=null)K.push(yX(R,z0,A))}}if(J)break;R=R.return}return K}function vJ(z,Q){var X=Q+"Capture",Z=[],J=z;while(J!==null){var $=J,H=$.stateNode,B=$.tag;if(B===w&&H!==null){var K=H,R=ZX(J,X);if(R!=null)Z.unshift(yX(J,R,K));var A=ZX(J,Q);if(A!=null)Z.push(yX(J,A,K))}J=J.return}return Z}function rz(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==w);if(z)return z;return null}function qR(z,Q){var X=z,Z=Q,J=0;for(var $=X;$;$=rz($))J++;var H=0;for(var B=Z;B;B=rz(B))H++;while(J-H>0)X=rz(X),J--;while(H-J>0)Z=rz(Z),H--;var K=J;while(K--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=rz(X),Z=rz(Z)}return null}function iq(z,Q,X,Z,J){var $=Q._reactName,H=[],B=X;while(B!==null){if(B===Z)break;var K=B,R=K.alternate,A=K.stateNode,x=K.tag;if(R!==null&&R===Z)break;if(x===w&&A!==null){var E=A;if(J){var e=ZX(B,$);if(e!=null)H.unshift(yX(B,e,E))}else if(!J){var z0=ZX(B,$);if(z0!=null)H.push(yX(B,z0,E))}}B=B.return}if(H.length!==0)z.push({event:Q,listeners:H})}function BR(z,Q,X,Z,J){var $=Z&&J?qR(Z,J):null;if(Z!==null)iq(z,Q,Z,$,!1);if(J!==null&&X!==null)iq(z,X,J,$,!0)}function UR(z,Q){return z+"__"+(Q?"capture":"bubble")}var Z5=!1,VX="dangerouslySetInnerHTML",CJ="suppressContentEditableWarning",q8="suppressHydrationWarning",oq="autoFocus",r8="children",t8="style",SJ="__html",o$,fJ,DX,aq,hJ,nq,rq;o$={dialog:!0,webview:!0},fJ=function(z,Q){oO(z,Q),aO(z,Q),eO(z,Q,{registrationNameDependencies:D0,possibleRegistrationNames:G1})},nq=h1&&!document.documentMode,DX=function(z,Q,X){if(Z5)return;var Z=yJ(X),J=yJ(Q);if(J===Z)return;Z5=!0,q("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(J),JSON.stringify(Z))},aq=function(z){if(Z5)return;Z5=!0;var Q=[];z.forEach(function(X){Q.push(X)}),q("Extra attributes from the server: %s",Q)},hJ=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)},rq=function(z,Q){var X=z.namespaceURI===A7?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var KR=/\r\n?/g,WR=/\u0000|\uFFFD/g;function yJ(z){m5(z);var Q=typeof z==="string"?z:""+z;return Q.replace(KR,`
|
|
32
|
-
`).replace(WR,"")}function VJ(z,Q,X,Z){var J=yJ(Q),$=yJ(z);if($===J)return;if(Z){if(!Z5)Z5=!0,q('Text content did not match. Server: "%s" Client: "%s"',$,J)}if(X&&F0)throw Error("Text content does not match server-rendered HTML.")}function tq(z){return z.nodeType===T7?z:z.ownerDocument}function OR(){}function DJ(z){z.onclick=OR}function LR(z,Q,X,Z,J){for(var $ in Z){if(!Z.hasOwnProperty($))continue;var H=Z[$];if($===t8){if(H)Object.freeze(H);O9(Q,H)}else if($===VX){var B=H?H[SJ]:void 0;if(B!=null)q9(Q,B)}else if($===r8){if(typeof H==="string"){var K=z!=="textarea"||H!=="";if(K)XJ(Q,H)}else if(typeof H==="number")XJ(Q,""+H)}else if($===CJ||$===q8);else if($===oq);else if(D0.hasOwnProperty($)){if(H!=null){if(typeof H!=="function")hJ($,H);if($==="onScroll")C4("scroll",Q)}}else if(H!=null)D1(Q,$,H,J)}}function _R(z,Q,X,Z){for(var J=0;J<Q.length;J+=2){var $=Q[J],H=Q[J+1];if($===t8)O9(z,H);else if($===VX)q9(z,H);else if($===r8)XJ(z,H);else D1(z,$,H,Z)}}function NR(z,Q,X,Z){var J,$=tq(X),H,B=Z;if(B===A7)B=h3(z);if(B===A7){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 K=$.createElement("div");K.innerHTML="<script></script>";var R=K.firstChild;H=K.removeChild(R)}else if(typeof Q.is==="string")H=$.createElement(z,{is:Q.is});else if(H=$.createElement(z),z==="select"){var A=H;if(Q.multiple)A.multiple=!0;else if(Q.size)A.size=Q.size}}else H=$.createElementNS(B,z);if(B===A7){if(!J&&Object.prototype.toString.call(H)==="[object HTMLUnknownElement]"&&!B4.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 RR(z,Q){return tq(Q).createTextNode(z)}function bR(z,Q,X,Z){var J=g8(Q,X);fJ(Q,X);var $;switch(Q){case"dialog":C4("cancel",z),C4("close",z),$=X;break;case"iframe":case"object":case"embed":C4("load",z),$=X;break;case"video":case"audio":for(var H=0;H<fX.length;H++)C4(fX[H],z);$=X;break;case"source":C4("error",z),$=X;break;case"img":case"image":case"link":C4("error",z),C4("load",z),$=X;break;case"details":C4("toggle",z),$=X;break;case"input":y(z,X),$=W(z,X),C4("invalid",z);break;case"option":N4(z,X),$=X;break;case"select":eQ(z,X),$=sQ(z,X),C4("invalid",z);break;case"textarea":$9(z,X),$=S3(z,X),C4("invalid",z);break;default:$=X}switch(u3(Q,$),LR(Q,z,Z,$,J),Q){case"input":M7(z),I0(z,X,!1);break;case"textarea":M7(z),G9(z);break;case"option":v4(z,X);break;case"select":C3(z,X);break;default:if(typeof $.onClick==="function")DJ(z);break}}function wR(z,Q,X,Z,J){fJ(Q,Z);var $=null,H,B;switch(Q){case"input":H=W(z,X),B=W(z,Z),$=[];break;case"select":H=sQ(z,X),B=sQ(z,Z),$=[];break;case"textarea":H=S3(z,X),B=S3(z,Z),$=[];break;default:if(H=X,B=Z,typeof H.onClick!=="function"&&typeof B.onClick==="function")DJ(z);break}u3(Q,B);var K,R,A=null;for(K in H){if(B.hasOwnProperty(K)||!H.hasOwnProperty(K)||H[K]==null)continue;if(K===t8){var x=H[K];for(R in x)if(x.hasOwnProperty(R)){if(!A)A={};A[R]=""}}else if(K===VX||K===r8);else if(K===CJ||K===q8);else if(K===oq);else if(D0.hasOwnProperty(K)){if(!$)$=[]}else($=$||[]).push(K,null)}for(K in B){var E=B[K],e=H!=null?H[K]:void 0;if(!B.hasOwnProperty(K)||E===e||E==null&&e==null)continue;if(K===t8){if(E)Object.freeze(E);if(e){for(R in e)if(e.hasOwnProperty(R)&&(!E||!E.hasOwnProperty(R))){if(!A)A={};A[R]=""}for(R in E)if(E.hasOwnProperty(R)&&e[R]!==E[R]){if(!A)A={};A[R]=E[R]}}else{if(!A){if(!$)$=[];$.push(K,A)}A=E}}else if(K===VX){var z0=E?E[SJ]:void 0,Y0=e?e[SJ]:void 0;if(z0!=null){if(Y0!==z0)($=$||[]).push(K,z0)}}else if(K===r8){if(typeof E==="string"||typeof E==="number")($=$||[]).push(K,""+E)}else if(K===CJ||K===q8);else if(D0.hasOwnProperty(K)){if(E!=null){if(typeof E!=="function")hJ(K,E);if(K==="onScroll")C4("scroll",z)}if(!$&&e!==E)$=[]}else($=$||[]).push(K,E)}if(A)EO(A,B[t8]),($=$||[]).push(t8,A);return $}function FR(z,Q,X,Z,J){if(X==="input"&&J.type==="radio"&&J.name!=null)s(z,J);var $=g8(X,Z),H=g8(X,J);switch(_R(z,Q,$,H),X){case"input":$0(z,J);break;case"textarea":H9(z,J);break;case"select":_O(z,J);break}}function MR(z){{var Q=z.toLowerCase();if(!ZJ.hasOwnProperty(Q))return null;return ZJ[Q]||null}}function PR(z,Q,X,Z,J,$,H){var B,K;switch(B=g8(Q,X),fJ(Q,X),Q){case"dialog":C4("cancel",z),C4("close",z);break;case"iframe":case"object":case"embed":C4("load",z);break;case"video":case"audio":for(var R=0;R<fX.length;R++)C4(fX[R],z);break;case"source":C4("error",z);break;case"img":case"image":case"link":C4("error",z),C4("load",z);break;case"details":C4("toggle",z);break;case"input":y(z,X),C4("invalid",z);break;case"option":N4(z,X);break;case"select":eQ(z,X),C4("invalid",z);break;case"textarea":$9(z,X),C4("invalid",z);break}u3(Q,X);{K=new Set;var A=z.attributes;for(var x=0;x<A.length;x++){var E=A[x].name.toLowerCase();switch(E){case"value":break;case"checked":break;case"selected":break;default:K.add(A[x].name)}}}var e=null;for(var z0 in X){if(!X.hasOwnProperty(z0))continue;var Y0=X[z0];if(z0===r8){if(typeof Y0==="string"){if(z.textContent!==Y0){if(X[q8]!==!0)VJ(z.textContent,Y0,$,H);e=[r8,Y0]}}else if(typeof Y0==="number"){if(z.textContent!==""+Y0){if(X[q8]!==!0)VJ(z.textContent,Y0,$,H);e=[r8,""+Y0]}}}else if(D0.hasOwnProperty(z0)){if(Y0!=null){if(typeof Y0!=="function")hJ(z0,Y0);if(z0==="onScroll")C4("scroll",z)}}else if(H&&!0&&typeof B==="boolean"){var y0=void 0,z1=B&&J0?null:a4(z0);if(X[q8]===!0);else if(z0===CJ||z0===q8||z0==="value"||z0==="checked"||z0==="selected");else if(z0===VX){var a0=z.innerHTML,y1=Y0?Y0[SJ]:void 0;if(y1!=null){var V1=rq(z,y1);if(V1!==a0)DX(z0,a0,V1)}}else if(z0===t8){if(K.delete(z0),nq){var n=uO(Y0);if(y0=z.getAttribute("style"),n!==y0)DX(z0,y0,n)}}else if(B&&!J0){if(K.delete(z0.toLowerCase()),y0=g5(z,z0,Y0),Y0!==y0)DX(z0,y0,Y0)}else if(!e1(z0,z1,B)&&!G4(z0,Y0,z1,B)){var G0=!1;if(z1!==null)K.delete(z1.attributeName),y0=u6(z,z0,Y0,z1);else{var r=Z;if(r===A7)r=h3(Q);if(r===A7)K.delete(z0.toLowerCase());else{var w0=MR(z0);if(w0!==null&&w0!==z0)G0=!0,K.delete(w0);K.delete(z0)}y0=g5(z,z0,Y0)}var g0=J0;if(!g0&&Y0!==y0&&!G0)DX(z0,y0,Y0)}}}if(H){if(K.size>0&&X[q8]!==!0)aq(K)}switch(Q){case"input":M7(z),I0(z,X,!0);break;case"textarea":M7(z),G9(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")DJ(z);break}return e}function AR(z,Q,X){var Z=z.nodeValue!==Q;return Z}function a$(z,Q){{if(Z5)return;Z5=!0,q("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function n$(z,Q){{if(Z5)return;Z5=!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(Z5)return;Z5=!0,q("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function t$(z,Q){{if(Q==="")return;if(Z5)return;Z5=!0,q('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function IR(z,Q,X){switch(Q){case"input":B1(z,X);return;case"textarea":RO(z,X);return;case"select":NO(z,X);return}}var mX=function(){},uX=function(){};{var TR=["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"],sq=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],kR=sq.concat(["button"]),vR=["dd","dt","li","option","optgroup","p","rp","rt"],eq={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};uX=function(z,Q){var X=v1({},z||eq),Z={tag:Q};if(sq.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(kR.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(TR.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 CR=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 vR.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},SR=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||eq;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 $=CR(z,J)?null:Z,H=$?null:SR(z,X),B=$||H;if(!B)return;var K=B.tag,R=!!$+"|"+z+"|"+K;if(zB[R])return;zB[R]=!0;var A=z,x="";if(z==="#text")if(/\S/.test(Q))A="Text nodes";else A="Whitespace text nodes",x=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else A="<"+z+">";if($){var E="";if(K==="table"&&z==="tr")E+=" 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",A,K,x,E)}else q("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",A,K)}}var mJ="suppressHydrationWarning",uJ="$",gJ="/$",gX="$?",EX="$!",fR="style",s$=null,e$=null;function hR(z){var Q,X,Z=z.nodeType;switch(Z){case T7:case V3:{Q=Z===T7?"#document":"#fragment";var J=z.documentElement;X=J?J.namespaceURI:y3(null,"");break}default:{var $=Z===s4?z.parentNode:z,H=$.namespaceURI||null;Q=$.tagName,X=y3(H,Q);break}}{var B=Q.toLowerCase(),K=uX(null,B);return{namespace:X,ancestorInfo:K}}}function yR(z,Q,X){{var Z=z,J=y3(Z.namespace,Q),$=uX(Z.ancestorInfo,Q);return{namespace:J,ancestorInfo:$}}}function zH(z){return z}function VR(z){s$=f_(),e$=aN();var Q=null;return Gq(!1),Q}function DR(z){nN(e$),Gq(s$),s$=null,e$=null}function mR(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,K=uX(H.ancestorInfo,z);mX(null,B,K)}$=H.namespace}var R=NR(z,Q,X,$);return pX(J,R),GH(R,Q),R}function uR(z,Q){z.appendChild(Q)}function gR(z,Q,X,Z,J){switch(bR(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function ER(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,K=uX(H.ancestorInfo,Q);mX(null,B,K)}}return wR(z,Q,X,Z)}function QH(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 xR(z,Q,X,Z){{var J=X;mX(null,z,J.ancestorInfo)}var $=RR(z,Q);return pX(Z,$),$}function jR(){var z=window.event;if(z===void 0)return y7;return qq(z.type)}var XH=typeof setTimeout==="function"?setTimeout:void 0,pR=typeof clearTimeout==="function"?clearTimeout:void 0,ZH=-1,QB=typeof Promise==="function"?Promise:void 0,cR=typeof queueMicrotask==="function"?queueMicrotask:typeof QB<"u"?function(z){return QB.resolve(null).then(z).catch(dR)}:XH;function dR(z){setTimeout(function(){throw z})}function lR(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 iR(z,Q,X,Z,J,$){FR(z,Q,X,Z,J),GH(z,J)}function XB(z){XJ(z,"")}function oR(z,Q,X){z.nodeValue=X}function aR(z,Q){z.appendChild(Q)}function nR(z,Q){var X;if(z.nodeType===s4)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)DJ(X)}function rR(z,Q,X){z.insertBefore(Q,X)}function tR(z,Q,X){if(z.nodeType===s4)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function sR(z,Q){z.removeChild(Q)}function eR(z,Q){if(z.nodeType===s4)z.parentNode.removeChild(Q);else z.removeChild(Q)}function JH(z,Q){var X=Q,Z=0;do{var J=X.nextSibling;if(z.removeChild(X),J&&J.nodeType===s4){var $=J.data;if($===gJ)if(Z===0){z.removeChild(J),FX(Q);return}else Z--;else if($===uJ||$===gX||$===EX)Z++}X=J}while(X);FX(Q)}function zb(z,Q){if(z.nodeType===s4)JH(z.parentNode,Q);else if(z.nodeType===X5)JH(z,Q);FX(z)}function Qb(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function Xb(z){z.nodeValue=""}function Zb(z,Q){z=z;var X=Q[fR],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=D3("display",Z)}function Jb(z,Q){z.nodeValue=Q}function Yb(z){if(z.nodeType===X5)z.textContent="";else if(z.nodeType===T7){if(z.documentElement)z.removeChild(z.documentElement)}}function $b(z,Q,X){if(z.nodeType!==X5||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function Hb(z,Q){if(Q===""||z.nodeType!==I7)return null;return z}function Gb(z){if(z.nodeType!==s4)return null;return z}function ZB(z){return z.data===gX}function YH(z){return z.data===EX}function qb(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 Bb(z,Q){z._reactRetry=Q}function EJ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===X5||Q===I7)break;if(Q===s4){var X=z.data;if(X===uJ||X===EX||X===gX)break;if(X===gJ)return null}}return z}function xX(z){return EJ(z.nextSibling)}function Ub(z){return EJ(z.firstChild)}function Kb(z){return EJ(z.firstChild)}function Wb(z){return EJ(z.nextSibling)}function Ob(z,Q,X,Z,J,$,H){pX($,z),GH(z,X);var B;{var K=J;B=K.namespace}var R=($.mode&E1)!==H1;return PR(z,Q,X,B,Z,R,H)}function Lb(z,Q,X,Z){pX(X,z);var J=(X.mode&E1)!==H1;return AR(z,Q)}function _b(z,Q){pX(Q,z)}function Nb(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===s4){var Z=Q.data;if(Z===gJ)if(X===0)return xX(Q);else X--;else if(Z===uJ||Z===EX||Z===gX)X++}Q=Q.nextSibling}return null}function JB(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===s4){var Z=Q.data;if(Z===uJ||Z===EX||Z===gX)if(X===0)return Q;else X--;else if(Z===gJ)X++}Q=Q.previousSibling}return null}function Rb(z){FX(z)}function bb(z){FX(z)}function wb(z){return z!=="head"&&z!=="body"}function Fb(z,Q,X,Z){var J=!0;VJ(Q.nodeValue,X,Z,J)}function Mb(z,Q,X,Z,J,$){if(Q[mJ]!==!0){var H=!0;VJ(Z.nodeValue,J,$,H)}}function Pb(z,Q){if(Q.nodeType===X5)a$(z,Q);else if(Q.nodeType===s4);else n$(z,Q)}function Ab(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===X5)a$(X,Q);else if(Q.nodeType===s4);else n$(X,Q)}}function Ib(z,Q,X,Z,J){if(J||Q[mJ]!==!0)if(Z.nodeType===X5)a$(X,Z);else if(Z.nodeType===s4);else n$(X,Z)}function Tb(z,Q,X){r$(z,Q)}function kb(z,Q){t$(z,Q)}function vb(z,Q,X){{var Z=z.parentNode;if(Z!==null)r$(Z,Q)}}function Cb(z,Q){{var X=z.parentNode;if(X!==null)t$(X,Q)}}function Sb(z,Q,X,Z,J,$){if($||Q[mJ]!==!0)r$(X,Z)}function fb(z,Q,X,Z,J){if(J||Q[mJ]!==!0)t$(X,Z)}function hb(z){q("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function yb(z){hX(z)}var tz=Math.random().toString(36).slice(2),sz="__reactFiber$"+tz,$H="__reactProps$"+tz,jX="__reactContainer$"+tz,HH="__reactEvents$"+tz,Vb="__reactListeners$"+tz,Db="__reactHandles$"+tz;function mb(z){delete z[sz],delete z[$H],delete z[HH],delete z[Vb],delete z[Db]}function pX(z,Q){Q[sz]=z}function xJ(z,Q){Q[jX]=z}function YB(z){z[jX]=null}function cX(z){return!!z[jX]}function s8(z){var Q=z[sz];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[jX]||X[sz],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var J=JB(z);while(J!==null){var $=J[sz];if($)return $;J=JB(J)}}return Q}z=X,X=z.parentNode}return null}function B8(z){var Q=z[sz]||z[jX];if(Q)if(Q.tag===w||Q.tag===b||Q.tag===u||Q.tag===T)return Q;else return null;return null}function ez(z){if(z.tag===w||z.tag===b)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function jJ(z){return z[$H]||null}function GH(z,Q){z[$H]=Q}function ub(z){var Q=z[HH];if(Q===void 0)Q=z[HH]=new Set;return Q}var $B={},HB=Y.ReactDebugCurrentFrame;function pJ(z){if(z){var Q=z._owner,X=e7(z.type,z._source,Q?Q.type:null);HB.setExtraStackFrame(X)}else HB.setExtraStackFrame(null)}function p5(z,Q,X,Z,J){{var $=Function.call.bind(B4);for(var H in z)if($(z,H)){var B=void 0;try{if(typeof z[H]!=="function"){var K=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 K.name="Invariant Violation",K}B=z[H](Q,H,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){B=R}if(B&&!(B instanceof Error))pJ(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),pJ(null);if(B instanceof Error&&!(B.message in $B))$B[B.message]=!0,pJ(J),q("Failed %s type: %s",X,B.message),pJ(null)}}}var qH=[],cJ;cJ=[];var V7=-1;function U8(z){return{current:z}}function E6(z,Q){if(V7<0){q("Unexpected pop.");return}if(Q!==cJ[V7])q("Unexpected Fiber popped.");z.current=qH[V7],qH[V7]=null,cJ[V7]=null,V7--}function x6(z,Q,X){V7++,qH[V7]=z.current,cJ[V7]=X,z.current=Q}var GB={},N5={};Object.freeze(N5);var D7=U8(N5),q7=U8(!1),BH=N5;function zQ(z,Q,X){{if(X&&B7(Q))return BH;return D7.current}}function qB(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function QQ(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return N5;var J=z.stateNode;if(J&&J.__reactInternalMemoizedUnmaskedChildContext===Q)return J.__reactInternalMemoizedMaskedChildContext;var $={};for(var H in Z)$[H]=Q[H];{var B=P1(z)||"Unknown";p5(Z,$,"context",B)}if(J)qB(z,Q,$);return $}}function dJ(){return q7.current}function B7(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function lJ(z){E6(q7,z),E6(D7,z)}function UH(z){E6(q7,z),E6(D7,z)}function BB(z,Q,X){{if(D7.current!==N5)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");x6(D7,Q,z),x6(q7,X,z)}}function UB(z,Q,X){{var Z=z.stateNode,J=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var $=P1(z)||"Unknown";if(!GB[$])GB[$]=!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((P1(z)||"Unknown")+'.getChildContext(): key "'+B+'" is not defined in childContextTypes.');{var K=P1(z)||"Unknown";p5(J,H,"child context",K)}return v1({},X,H)}}function iJ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||N5;return BH=D7.current,x6(D7,X,z),x6(q7,q7.current,z),!0}}function KB(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=UB(z,Q,BH);Z.__reactInternalMemoizedMergedChildContext=J,E6(q7,z),E6(D7,z),x6(D7,J,z),x6(q7,X,z)}else E6(q7,z),x6(q7,X,z)}}function gb(z){{if(!wL(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 T:return Q.stateNode.context;case _:{var X=Q.type;if(B7(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 K8=0,oJ=1,m7=null,KH=!1,WH=!1;function WB(z){if(m7===null)m7=[z];else m7.push(z)}function Eb(z){KH=!0,WB(z)}function OB(){if(KH)W8()}function W8(){if(!WH&&m7!==null){WH=!0;var z=0,Q=j5();try{var X=!0,Z=m7;w6(O5);for(;z<Z.length;z++){var J=Z[z];do J=J(X);while(J!==null)}m7=null,KH=!1}catch($){if(m7!==null)m7=m7.slice(z+1);throw u9(GJ,W8),$}finally{w6(Q),WH=!1}}return null}var XQ=[],ZQ=0,aJ=null,nJ=0,P5=[],A5=0,e8=null,u7=1,g7="";function xb(z){return Qz(),(z.flags&C9)!==q1}function jb(z){return Qz(),nJ}function pb(){var z=g7,Q=u7,X=Q&~cb(Q);return X.toString(32)+z}function zz(z,Q){Qz(),XQ[ZQ++]=nJ,XQ[ZQ++]=aJ,aJ=z,nJ=Q}function LB(z,Q,X){Qz(),P5[A5++]=u7,P5[A5++]=g7,P5[A5++]=e8,e8=z;var Z=u7,J=g7,$=rJ(Z)-1,H=Z&~(1<<$),B=X+1,K=rJ(Q)+$;if(K>30){var R=$-$%5,A=(1<<R)-1,x=(H&A).toString(32),E=H>>R,e=$-R,z0=rJ(Q)+e,Y0=B<<e,y0=Y0|E,z1=x+J;u7=1<<z0|y0,g7=z1}else{var a0=B<<$,y1=a0|H,V1=J;u7=1<<K|y1,g7=V1}}function OH(z){Qz();var Q=z.return;if(Q!==null){var X=1,Z=0;zz(z,X),LB(z,X,Z)}}function rJ(z){return 32-c9(z)}function cb(z){return 1<<rJ(z)-1}function LH(z){while(z===aJ)aJ=XQ[--ZQ],XQ[ZQ]=null,nJ=XQ[--ZQ],XQ[ZQ]=null;while(z===e8)e8=P5[--A5],P5[A5]=null,g7=P5[--A5],P5[A5]=null,u7=P5[--A5],P5[A5]=null}function db(){if(Qz(),e8!==null)return{id:u7,overflow:g7};else return null}function lb(z,Q){Qz(),P5[A5++]=u7,P5[A5++]=g7,P5[A5++]=e8,u7=Q.id,g7=Q.overflow,e8=z}function Qz(){if(!I6())q("Expected to be hydrating. This is a bug in React. Please file an issue.")}var A6=null,I5=null,c5=!1,Xz=!1,O8=null;function ib(){if(c5)q("We should not be hydrating here. This is a bug in React. Please file a bug.")}function _B(){Xz=!0}function ob(){return Xz}function ab(z){var Q=z.stateNode.containerInfo;return I5=Kb(Q),A6=z,c5=!0,O8=null,Xz=!1,!0}function nb(z,Q,X){if(I5=Wb(Q),A6=z,c5=!0,O8=null,Xz=!1,X!==null)lb(z,X);return!0}function NB(z,Q){switch(z.tag){case T:{Pb(z.stateNode.containerInfo,Q);break}case w:{var X=(z.mode&E1)!==H1;Ib(z.type,z.memoizedProps,z.stateNode,Q,X);break}case u:{var Z=z.memoizedState;if(Z.dehydrated!==null)Ab(Z.dehydrated,Q);break}}}function RB(z,Q){NB(z,Q);var X=ZP();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=E8;else Z.push(X)}function _H(z,Q){{if(Xz)return;switch(z.tag){case T:{var X=z.stateNode.containerInfo;switch(Q.tag){case w:var{type:Z,pendingProps:J}=Q;Tb(X,Z);break;case b:var $=Q.pendingProps;kb(X,$);break}break}case w:{var{type:H,memoizedProps:B,stateNode:K}=z;switch(Q.tag){case w:{var{type:R,pendingProps:A}=Q,x=(z.mode&E1)!==H1;Sb(H,B,K,R,A,x);break}case b:{var E=Q.pendingProps,e=(z.mode&E1)!==H1;fb(H,B,K,E,e);break}}break}case u:{var z0=z.memoizedState,Y0=z0.dehydrated;if(Y0!==null)switch(Q.tag){case w:var{type:y0,pendingProps:z1}=Q;vb(Y0,y0);break;case b:var a0=Q.pendingProps;Cb(Y0,a0);break}break}default:return}}}function bB(z,Q){Q.flags=Q.flags&~v7|e4,_H(z,Q)}function wB(z,Q){switch(z.tag){case w:{var{type:X,pendingProps:Z}=z,J=$b(Q,X);if(J!==null)return z.stateNode=J,A6=z,I5=Ub(J),!0;return!1}case b:{var $=z.pendingProps,H=Hb(Q,$);if(H!==null)return z.stateNode=H,A6=z,I5=null,!0;return!1}case u:{var B=Gb(Q);if(B!==null){var K={dehydrated:B,treeContext:db(),retryLane:K5};z.memoizedState=K;var R=JP(B);return R.return=z,z.child=R,A6=z,I5=null,!0}return!1}default:return!1}}function NH(z){return(z.mode&E1)!==H1&&(z.flags&n1)===q1}function RH(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function bH(z){if(!c5)return;var Q=I5;if(!Q){if(NH(z))_H(A6,z),RH();bB(A6,z),c5=!1,A6=z;return}var X=Q;if(!wB(z,Q)){if(NH(z))_H(A6,z),RH();Q=xX(X);var Z=A6;if(!Q||!wB(z,Q)){bB(A6,z),c5=!1,A6=z;return}RB(Z,X)}}function rb(z,Q,X){var Z=z.stateNode,J=!Xz,$=Ob(Z,z.type,z.memoizedProps,Q,X,z,J);if(z.updateQueue=$,$!==null)return!0;return!1}function tb(z){var{stateNode:Q,memoizedProps:X}=z,Z=Lb(Q,X,z);if(Z){var J=A6;if(J!==null)switch(J.tag){case T:{var $=J.stateNode.containerInfo,H=(J.mode&E1)!==H1;Fb($,Q,X,H);break}case w:{var{type:B,memoizedProps:K,stateNode:R}=J,A=(J.mode&E1)!==H1;Mb(B,K,R,Q,X,A);break}}}return Z}function sb(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.");_b(X,z)}function eb(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 Nb(X)}function FB(z){var Q=z.return;while(Q!==null&&Q.tag!==w&&Q.tag!==T&&Q.tag!==u)Q=Q.return;A6=Q}function tJ(z){if(z!==A6)return!1;if(!c5)return FB(z),c5=!0,!1;if(z.tag!==T&&(z.tag!==w||wb(z.type)&&!QH(z.type,z.memoizedProps))){var Q=I5;if(Q)if(NH(z))MB(z),RH();else while(Q)RB(z,Q),Q=xX(Q)}if(FB(z),z.tag===u)I5=eb(z);else I5=A6?xX(z.stateNode):null;return!0}function zw(){return c5&&I5!==null}function MB(z){var Q=I5;while(Q)NB(z,Q),Q=xX(Q)}function JQ(){A6=null,I5=null,c5=!1,Xz=!1}function PB(){if(O8!==null)NK(O8),O8=null}function I6(){return c5}function wH(z){if(O8===null)O8=[z];else O8.push(z)}var Qw=Y.ReactCurrentBatchConfig,Xw=null;function Zw(){return Qw.transition}var d5={recordUnsafeLifecycleWarnings:function(z,Q){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(z,Q){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Jw=function(z){var Q=null,X=z;while(X!==null){if(X.mode&c4)Q=X;X=X.return}return Q},Zz=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],Jz=new Set;d5.recordUnsafeLifecycleWarnings=function(z,Q){if(Jz.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)dX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillMount==="function")lX.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)iX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillReceiveProps==="function")oX.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)aX.push(z);if(z.mode&c4&&typeof Q.UNSAFE_componentWillUpdate==="function")nX.push(z)},d5.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(dX.length>0)dX.forEach(function(E){z.add(P1(E)||"Component"),Jz.add(E.type)}),dX=[];var Q=new Set;if(lX.length>0)lX.forEach(function(E){Q.add(P1(E)||"Component"),Jz.add(E.type)}),lX=[];var X=new Set;if(iX.length>0)iX.forEach(function(E){X.add(P1(E)||"Component"),Jz.add(E.type)}),iX=[];var Z=new Set;if(oX.length>0)oX.forEach(function(E){Z.add(P1(E)||"Component"),Jz.add(E.type)}),oX=[];var J=new Set;if(aX.length>0)aX.forEach(function(E){J.add(P1(E)||"Component"),Jz.add(E.type)}),aX=[];var $=new Set;if(nX.length>0)nX.forEach(function(E){$.add(P1(E)||"Component"),Jz.add(E.type)}),nX=[];if(Q.size>0){var H=Zz(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
|
-
|
|
34
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
35
|
-
|
|
36
|
-
Please update the following components: %s`,H)}if(Z.size>0){var B=Zz(Z);q(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
37
|
-
|
|
38
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
39
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
40
|
-
|
|
41
|
-
Please update the following components: %s`,B)}if($.size>0){var K=Zz($);q(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
42
|
-
|
|
43
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
44
|
-
|
|
45
|
-
Please update the following components: %s`,K)}if(z.size>0){var R=Zz(z);O(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
46
|
-
|
|
47
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
48
|
-
* Rename componentWillMount to UNSAFE_componentWillMount 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.
|
|
49
|
-
|
|
50
|
-
Please update the following components: %s`,R)}if(X.size>0){var A=Zz(X);O(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
51
|
-
|
|
52
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
53
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
54
|
-
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps 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.
|
|
55
|
-
|
|
56
|
-
Please update the following components: %s`,A)}if(J.size>0){var x=Zz(J);O(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
57
|
-
|
|
58
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
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
|
-
|
|
61
|
-
Please update the following components: %s`,x)}};var sJ=new Map,AB=new Set;d5.recordLegacyContextWarning=function(z,Q){var X=Jw(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(AB.has(z.type))return;var Z=sJ.get(X);if(z.type.contextTypes!=null||z.type.childContextTypes!=null||Q!==null&&typeof Q.getChildContext==="function"){if(Z===void 0)Z=[],sJ.set(X,Z);Z.push(z)}},d5.flushLegacyContextWarning=function(){sJ.forEach(function(z,Q){if(z.length===0)return;var X=z[0],Z=new Set;z.forEach(function($){Z.add(P1($)||"Component"),AB.add($.type)});var J=Zz(Z);try{u4(X),q(`Legacy context API has been detected within a strict-mode tree.
|
|
62
|
-
|
|
63
|
-
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
64
|
-
|
|
65
|
-
Please update the following components: %s
|
|
66
|
-
|
|
67
|
-
Learn more about this warning here: https://reactjs.org/link/legacy-context`,J)}finally{_6()}})},d5.discardPendingWarnings=function(){dX=[],lX=[],iX=[],oX=[],aX=[],nX=[],sJ=new Map}}var FH,MH,PH,AH,IH,IB=function(z,Q){};FH=!1,MH=!1,PH={},AH={},IH={},IB=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=P1(Q)||"Component";if(AH[X])return;AH[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 Yw(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&c4||d)&&!(X._owner&&X._self&&X._owner.stateNode!==X._self)&&!(X._owner&&X._owner.tag!==_)&&!(typeof X.type==="function"&&!Yw(X.type))&&X._owner){var J=P1(z)||"Component";if(!PH[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),PH[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 K=H;T4(Z,"ref");var R=""+Z;if(Q!==null&&Q.ref!==null&&typeof Q.ref==="function"&&Q.ref._stringRef===R)return Q.ref;var A=function(x){var E=K.refs;if(x===null)delete E[R];else E[R]=x};return A._stringRef=R,A}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
|
-
1. You may be adding a ref to a function component
|
|
69
|
-
2. You may be adding a ref to a component that was not created inside a component's render method
|
|
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 eJ(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 zY(z){{var Q=P1(z)||"Component";if(IH[Q])return;IH[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 TB(z){var{_payload:Q,_init:X}=z;return X(Q)}function kB(z){function Q(n,G0){if(!z)return;var r=n.deletions;if(r===null)n.deletions=[G0],n.flags|=E8;else r.push(G0)}function X(n,G0){if(!z)return null;var r=G0;while(r!==null)Q(n,r),r=r.sibling;return null}function Z(n,G0){var r=new Map,w0=G0;while(w0!==null){if(w0.key!==null)r.set(w0.key,w0);else r.set(w0.index,w0);w0=w0.sibling}return r}function J(n,G0){var r=Wz(n,G0);return r.index=0,r.sibling=null,r}function $(n,G0,r){if(n.index=r,!z)return n.flags|=C9,G0;var w0=n.alternate;if(w0!==null){var g0=w0.index;if(g0<G0)return n.flags|=e4,G0;else return g0}else return n.flags|=e4,G0}function H(n){if(z&&n.alternate===null)n.flags|=e4;return n}function B(n,G0,r,w0){if(G0===null||G0.tag!==b){var g0=MG(r,n.mode,w0);return g0.return=n,g0}else{var V0=J(G0,r);return V0.return=n,V0}}function K(n,G0,r,w0){var g0=r.type;if(g0===l1)return A(n,G0,r.props.children,w0,r.key);if(G0!==null){if(G0.elementType===g0||yK(G0,r)||typeof g0==="object"&&g0!==null&&g0.$$typeof===o0&&TB(g0)===G0.type){var V0=J(G0,r.props);return V0.ref=rX(n,G0,r),V0.return=n,V0._debugSource=r._source,V0._debugOwner=r._owner,V0}}var U1=FG(r,n.mode,w0);return U1.ref=rX(n,G0,r),U1.return=n,U1}function R(n,G0,r,w0){if(G0===null||G0.tag!==F||G0.stateNode.containerInfo!==r.containerInfo||G0.stateNode.implementation!==r.implementation){var g0=PG(r,n.mode,w0);return g0.return=n,g0}else{var V0=J(G0,r.children||[]);return V0.return=n,V0}}function A(n,G0,r,w0,g0){if(G0===null||G0.tag!==M){var V0=I8(r,n.mode,w0,g0);return V0.return=n,V0}else{var U1=J(G0,r);return U1.return=n,U1}}function x(n,G0,r){if(typeof G0==="string"&&G0!==""||typeof G0==="number"){var w0=MG(""+G0,n.mode,r);return w0.return=n,w0}if(typeof G0==="object"&&G0!==null){switch(G0.$$typeof){case z4:{var g0=FG(G0,n.mode,r);return g0.ref=rX(n,null,G0),g0.return=n,g0}case U4:{var V0=PG(G0,n.mode,r);return V0.return=n,V0}case o0:{var{_payload:U1,_init:w1}=G0;return x(n,w1(U1),r)}}if(a1(G0)||P4(G0)){var $4=I8(G0,n.mode,r,null);return $4.return=n,$4}eJ(n,G0)}if(typeof G0==="function")zY(n);return null}function E(n,G0,r,w0){var g0=G0!==null?G0.key:null;if(typeof r==="string"&&r!==""||typeof r==="number"){if(g0!==null)return null;return B(n,G0,""+r,w0)}if(typeof r==="object"&&r!==null){switch(r.$$typeof){case z4:if(r.key===g0)return K(n,G0,r,w0);else return null;case U4:if(r.key===g0)return R(n,G0,r,w0);else return null;case o0:{var{_payload:V0,_init:U1}=r;return E(n,G0,U1(V0),w0)}}if(a1(r)||P4(r)){if(g0!==null)return null;return A(n,G0,r,w0,null)}eJ(n,r)}if(typeof r==="function")zY(n);return null}function e(n,G0,r,w0,g0){if(typeof w0==="string"&&w0!==""||typeof w0==="number"){var V0=n.get(r)||null;return B(G0,V0,""+w0,g0)}if(typeof w0==="object"&&w0!==null){switch(w0.$$typeof){case z4:{var U1=n.get(w0.key===null?r:w0.key)||null;return K(G0,U1,w0,g0)}case U4:{var w1=n.get(w0.key===null?r:w0.key)||null;return R(G0,w1,w0,g0)}case o0:var{_payload:$4,_init:i1}=w0;return e(n,G0,r,i1($4),g0)}if(a1(w0)||P4(w0)){var n4=n.get(r)||null;return A(G0,n4,w0,g0,null)}eJ(G0,w0)}if(typeof w0==="function")zY(G0);return null}function z0(n,G0,r){{if(typeof n!=="object"||n===null)return G0;switch(n.$$typeof){case z4:case U4:IB(n,r);var w0=n.key;if(typeof w0!=="string")break;if(G0===null){G0=new Set,G0.add(w0);break}if(!G0.has(w0)){G0.add(w0);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.",w0);break;case o0:var{_payload:g0,_init:V0}=n;z0(V0(g0),G0,r);break}}return G0}function Y0(n,G0,r,w0){{var g0=null;for(var V0=0;V0<r.length;V0++){var U1=r[V0];g0=z0(U1,g0,n)}}var w1=null,$4=null,i1=G0,n4=0,o1=0,d4=null;for(;i1!==null&&o1<r.length;o1++){if(i1.index>o1)d4=i1,i1=null;else d4=i1.sibling;var p6=E(n,i1,r[o1],w0);if(p6===null){if(i1===null)i1=d4;break}if(z){if(i1&&p6.alternate===null)Q(n,i1)}if(n4=$(p6,n4,o1),$4===null)w1=p6;else $4.sibling=p6;$4=p6,i1=d4}if(o1===r.length){if(X(n,i1),I6()){var h6=o1;zz(n,h6)}return w1}if(i1===null){for(;o1<r.length;o1++){var b5=x(n,r[o1],w0);if(b5===null)continue;if(n4=$(b5,n4,o1),$4===null)w1=b5;else $4.sibling=b5;$4=b5}if(I6()){var s6=o1;zz(n,s6)}return w1}var e6=Z(n,i1);for(;o1<r.length;o1++){var c6=e(e6,n,o1,r[o1],w0);if(c6!==null){if(z){if(c6.alternate!==null)e6.delete(c6.key===null?o1:c6.key)}if(n4=$(c6,n4,o1),$4===null)w1=c6;else $4.sibling=c6;$4=c6}}if(z)e6.forEach(function(PQ){return Q(n,PQ)});if(I6()){var l7=o1;zz(n,l7)}return w1}function y0(n,G0,r,w0){var g0=P4(r);if(typeof g0!=="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"&&r[Symbol.toStringTag]==="Generator"){if(!MH)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.");MH=!0}if(r.entries===g0){if(!FH)q("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");FH=!0}var V0=g0.call(r);if(V0){var U1=null,w1=V0.next();for(;!w1.done;w1=V0.next()){var $4=w1.value;U1=z0($4,U1,n)}}}var i1=g0.call(r);if(i1==null)throw Error("An iterable object provided no iterator.");var n4=null,o1=null,d4=G0,p6=0,h6=0,b5=null,s6=i1.next();for(;d4!==null&&!s6.done;h6++,s6=i1.next()){if(d4.index>h6)b5=d4,d4=null;else b5=d4.sibling;var e6=E(n,d4,s6.value,w0);if(e6===null){if(d4===null)d4=b5;break}if(z){if(d4&&e6.alternate===null)Q(n,d4)}if(p6=$(e6,p6,h6),o1===null)n4=e6;else o1.sibling=e6;o1=e6,d4=b5}if(s6.done){if(X(n,d4),I6()){var c6=h6;zz(n,c6)}return n4}if(d4===null){for(;!s6.done;h6++,s6=i1.next()){var l7=x(n,s6.value,w0);if(l7===null)continue;if(p6=$(l7,p6,h6),o1===null)n4=l7;else o1.sibling=l7;o1=l7}if(I6()){var PQ=h6;zz(n,PQ)}return n4}var vZ=Z(n,d4);for(;!s6.done;h6++,s6=i1.next()){var R7=e(vZ,n,h6,s6.value,w0);if(R7!==null){if(z){if(R7.alternate!==null)vZ.delete(R7.key===null?h6:R7.key)}if(p6=$(R7,p6,h6),o1===null)n4=R7;else o1.sibling=R7;o1=R7}}if(z)vZ.forEach(function(DP){return Q(n,DP)});if(I6()){var VP=h6;zz(n,VP)}return n4}function z1(n,G0,r,w0){if(G0!==null&&G0.tag===b){X(n,G0.sibling);var g0=J(G0,r);return g0.return=n,g0}X(n,G0);var V0=MG(r,n.mode,w0);return V0.return=n,V0}function a0(n,G0,r,w0){var g0=r.key,V0=G0;while(V0!==null){if(V0.key===g0){var U1=r.type;if(U1===l1){if(V0.tag===M){X(n,V0.sibling);var w1=J(V0,r.props.children);return w1.return=n,w1._debugSource=r._source,w1._debugOwner=r._owner,w1}}else if(V0.elementType===U1||yK(V0,r)||typeof U1==="object"&&U1!==null&&U1.$$typeof===o0&&TB(U1)===V0.type){X(n,V0.sibling);var $4=J(V0,r.props);return $4.ref=rX(n,V0,r),$4.return=n,$4._debugSource=r._source,$4._debugOwner=r._owner,$4}X(n,V0);break}else Q(n,V0);V0=V0.sibling}if(r.type===l1){var i1=I8(r.props.children,n.mode,w0,r.key);return i1.return=n,i1}else{var n4=FG(r,n.mode,w0);return n4.ref=rX(n,G0,r),n4.return=n,n4}}function y1(n,G0,r,w0){var g0=r.key,V0=G0;while(V0!==null){if(V0.key===g0)if(V0.tag===F&&V0.stateNode.containerInfo===r.containerInfo&&V0.stateNode.implementation===r.implementation){X(n,V0.sibling);var U1=J(V0,r.children||[]);return U1.return=n,U1}else{X(n,V0);break}else Q(n,V0);V0=V0.sibling}var w1=PG(r,n.mode,w0);return w1.return=n,w1}function V1(n,G0,r,w0){var g0=typeof r==="object"&&r!==null&&r.type===l1&&r.key===null;if(g0)r=r.props.children;if(typeof r==="object"&&r!==null){switch(r.$$typeof){case z4:return H(a0(n,G0,r,w0));case U4:return H(y1(n,G0,r,w0));case o0:var{_payload:V0,_init:U1}=r;return V1(n,G0,U1(V0),w0)}if(a1(r))return Y0(n,G0,r,w0);if(P4(r))return y0(n,G0,r,w0);eJ(n,r)}if(typeof r==="string"&&r!==""||typeof r==="number")return H(z1(n,G0,""+r,w0));if(typeof r==="function")zY(n);return X(n,G0)}return V1}var YQ=kB(!0),vB=kB(!1);function $w(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=Wz(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Wz(X,X.pendingProps),Z.return=Q;Z.sibling=null}function Hw(z,Q){var X=z.child;while(X!==null)sM(X,Q),X=X.sibling}var TH=U8(null),kH;kH={};var QY=null,$Q=null,vH=null,XY=!1;function ZY(){QY=null,$Q=null,vH=null,XY=!1}function CB(){XY=!0}function SB(){XY=!1}function fB(z,Q,X){{x6(TH,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==kH)q("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=kH}}}function CH(z,Q){var X=TH.current;E6(TH,Q),z._currentValue=X}function SH(z,Q,X){var Z=z;while(Z!==null){var J=Z.alternate;if(!dz(Z.childLanes,Q)){if(Z.childLanes=T1(Z.childLanes,Q),J!==null)J.childLanes=T1(J.childLanes,Q)}else if(J!==null&&!dz(J.childLanes,Q))J.childLanes=T1(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 Gw(z,Q,X){qw(z,Q,X)}function qw(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),K=E7(A4,B);K.tag=YY;var R=Z.updateQueue;if(R===null);else{var A=R.shared,x=A.pending;if(x===null)K.next=K;else K.next=x.next,x.next=K;A.pending=K}}Z.lanes=T1(Z.lanes,X);var E=Z.alternate;if(E!==null)E.lanes=T1(E.lanes,X);SH(Z.return,X,z),$.lanes=T1($.lanes,X);break}H=H.next}}else if(Z.tag===D)J=Z.type===z.type?null:Z.child;else if(Z.tag===o){var e=Z.return;if(e===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");e.lanes=T1(e.lanes,X);var z0=e.alternate;if(z0!==null)z0.lanes=T1(z0.lanes,X);SH(e,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 HQ(z,Q){QY=z,$Q=null,vH=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(W5(X.lanes,Q))UZ();X.firstContext=null}}}function z6(z){if(XY)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(vH===z);else{var X={context:z,memoizedValue:Q,next:null};if($Q===null){if(QY===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().");$Q=X,QY.dependencies={lanes:R0,firstContext:X}}else $Q=$Q.next=X}return Q}var Yz=null;function fH(z){if(Yz===null)Yz=[z];else Yz.push(z)}function Bw(){if(Yz!==null){for(var z=0;z<Yz.length;z++){var Q=Yz[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}}Yz=null}}function hB(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,JY(z,Z)}function Uw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;Q.interleaved=X}function Kw(z,Q,X,Z){var J=Q.interleaved;if(J===null)X.next=X,fH(Q);else X.next=J.next,J.next=X;return Q.interleaved=X,JY(z,Z)}function J5(z,Q){return JY(z,Q)}var Ww=JY;function JY(z,Q){z.lanes=T1(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=T1(X.lanes,Q);if(X===null&&(z.flags&(e4|v7))!==q1)CK(z);var Z=z,J=z.return;while(J!==null){if(J.childLanes=T1(J.childLanes,Q),X=J.alternate,X!==null)X.childLanes=T1(X.childLanes,Q);else if((J.flags&(e4|v7))!==q1)CK(z);Z=J,J=J.return}if(Z.tag===T){var $=Z.stateNode;return $}else return null}var yB=0,VB=1,YY=2,hH=3,$Y=!1,yH,HY;yH=!1,HY=null;function VH(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:R0},effects:null};z.updateQueue=Q}function DB(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 E7(z,Q){var X={eventTime:z,lane:Q,tag:yB,payload:null,callback:null,next:null};return X}function L8(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var J=Z.shared;if(HY===J&&!yH)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."),yH=!0;if(LM()){var $=J.pending;if($===null)Q.next=Q;else Q.next=$.next,$.next=Q;return J.pending=Q,Ww(z,X)}else return Kw(z,J,Q,X)}function GY(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var J=Z.shared;if(o9(X)){var $=J.lanes;$=n9($,z.pendingLanes);var H=T1($,X);J.lanes=H,T$(z,H)}}function DH(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 K=B;do{var R={eventTime:K.eventTime,lane:K.lane,tag:K.tag,payload:K.payload,callback:K.callback,next:null};if(H===null)$=H=R;else H.next=R,H=R;K=K.next}while(K!==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 A=X.lastBaseUpdate;if(A===null)X.firstBaseUpdate=Q;else A.next=Q;X.lastBaseUpdate=Q}function Ow(z,Q,X,Z,J,$){switch(X.tag){case VB:{var H=X.payload;if(typeof H==="function"){CB();var B=H.call($,Z,J);{if(z.mode&c4){R6(!0);try{H.call($,Z,J)}finally{R6(!1)}}SB()}return B}return H}case hH:z.flags=z.flags&~a6|n1;case yB:{var K=X.payload,R;if(typeof K==="function"){CB(),R=K.call($,Z,J);{if(z.mode&c4){R6(!0);try{K.call($,Z,J)}finally{R6(!1)}}SB()}}else R=K;if(R===null||R===void 0)return Z;return v1({},Z,R)}case YY:return $Y=!0,Z}return Z}function qY(z,Q,X,Z){var J=z.updateQueue;$Y=!1,HY=J.shared;var{firstBaseUpdate:$,lastBaseUpdate:H}=J,B=J.shared.pending;if(B!==null){J.shared.pending=null;var K=B,R=K.next;if(K.next=null,H===null)$=R;else H.next=R;H=K;var A=z.alternate;if(A!==null){var x=A.updateQueue,E=x.lastBaseUpdate;if(E!==H){if(E===null)x.firstBaseUpdate=R;else E.next=R;x.lastBaseUpdate=K}}}if($!==null){var e=J.baseState,z0=R0,Y0=null,y0=null,z1=null,a0=$;do{var{lane:y1,eventTime:V1}=a0;if(!dz(Z,y1)){var n={eventTime:V1,lane:y1,tag:a0.tag,payload:a0.payload,callback:a0.callback,next:null};if(z1===null)y0=z1=n,Y0=e;else z1=z1.next=n;z0=T1(z0,y1)}else{if(z1!==null){var G0={eventTime:V1,lane:b6,tag:a0.tag,payload:a0.payload,callback:a0.callback,next:null};z1=z1.next=G0}e=Ow(z,J,a0,e,Q,X);var r=a0.callback;if(r!==null&&a0.lane!==b6){z.flags|=o3;var w0=J.effects;if(w0===null)J.effects=[a0];else w0.push(a0)}}if(a0=a0.next,a0===null)if(B=J.shared.pending,B===null)break;else{var g0=B,V0=g0.next;g0.next=null,a0=V0,J.lastBaseUpdate=g0,J.shared.pending=null}}while(!0);if(z1===null)Y0=e;J.baseState=Y0,J.firstBaseUpdate=y0,J.lastBaseUpdate=z1;var U1=J.shared.interleaved;if(U1!==null){var w1=U1;do z0=T1(z0,w1.lane),w1=w1.next;while(w1!==U1)}else if($===null)J.shared.lanes=R0;PZ(z0),z.lanes=z0,z.memoizedState=e}HY=null}function Lw(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function mB(){$Y=!1}function BY(){return $Y}function uB(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,Lw(H,X)}}var tX={},_8=U8(tX),sX=U8(tX),UY=U8(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 gB(){var z=KY(UY.current);return z}function mH(z,Q){x6(UY,Q,z),x6(sX,z,z),x6(_8,tX,z);var X=hR(Q);E6(_8,z),x6(_8,X,z)}function GQ(z){E6(_8,z),E6(sX,z),E6(UY,z)}function uH(){var z=KY(_8.current);return z}function EB(z){var Q=KY(UY.current),X=KY(_8.current),Z=yR(X,z.type);if(X===Z)return;x6(sX,z,z),x6(_8,Z,z)}function gH(z){if(sX.current!==z)return;E6(_8,z),E6(sX,z)}var _w=0,xB=1,jB=1,eX=2,l5=U8(_w);function EH(z,Q){return(z&Q)!==0}function qQ(z){return z&xB}function xH(z,Q){return z&xB|Q}function Nw(z,Q){return z|Q}function N8(z,Q){x6(l5,Q,z)}function BQ(z){E6(l5,z)}function Rw(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function WY(z){var Q=z;while(Q!==null){if(Q.tag===u){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||ZB(Z)||YH(Z))return Q}}else if(Q.tag===t&&Q.memoizedProps.revealOrder!==void 0){var J=(Q.flags&n1)!==q1;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 Y5=0,Z6=1,U7=2,J6=4,T6=8,jH=[];function pH(){for(var z=0;z<jH.length;z++){var Q=jH[z];Q._workInProgressVersionPrimary=null}jH.length=0}function bw(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:u0,ReactCurrentBatchConfig:zZ}=Y,cH,UQ;cH=new Set;var $z=R0,Y4=null,Y6=null,$6=null,OY=!1,QZ=!1,XZ=0,ww=0,Fw=25,K0=null,T5=null,R8=-1,dH=!1;function t1(){{var z=K0;if(T5===null)T5=[z];else T5.push(z)}}function h0(){{var z=K0;if(T5!==null){if(R8++,T5[R8]!==z)Mw(z)}}}function KQ(z){if(z!==void 0&&z!==null&&!a1(z))q("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",K0,typeof z)}function Mw(z){{var Q=P1(Y4);if(!cH.has(Q)){if(cH.add(Q),T5!==null){var X="",Z=30;for(var J=0;J<=R8;J++){var $=T5[J],H=J===R8?z:$,B=J+1+". "+$;while(B.length<Z)B+=" ";B+=H+`
|
|
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
|
-
|
|
74
|
-
Previous render Next render
|
|
75
|
-
------------------------------------------------------
|
|
76
|
-
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
77
|
-
`,Q,X)}}}}function j6(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
78
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
79
|
-
2. You might be breaking the Rules of Hooks
|
|
80
|
-
3. You might have more than one copy of React in the same app
|
|
81
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function lH(z,Q){if(dH)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.",K0),!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
|
-
|
|
83
|
-
Previous: %s
|
|
84
|
-
Incoming: %s`,K0,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(_5(z[X],Q[X]))continue;return!1}return!0}function WQ(z,Q,X,Z,J,$){if($z=$,Y4=Q,T5=z!==null?z._debugHookTypes:null,R8=-1,dH=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=R0,z!==null&&z.memoizedState!==null)u0.current=qU;else if(T5!==null)u0.current=GU;else u0.current=HU;var H=X(Z,J);if(QZ){var B=0;do{if(QZ=!1,XZ=0,B>=Fw)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");B+=1,dH=!1,Y6=null,$6=null,Q.updateQueue=null,R8=-1,u0.current=BU,H=X(Z,J)}while(QZ)}u0.current=CY,Q._debugHookTypes=T5;var K=Y6!==null&&Y6.next!==null;if($z=R0,Y4=null,Y6=null,$6=null,K0=null,T5=null,R8=-1,z!==null&&(z.flags&S7)!==(Q.flags&S7)&&(z.mode&E1)!==H1)q("Internal React error: Expected static flag was missing. Please notify the React team.");if(OY=!1,K)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return H}function OQ(){var z=XZ!==0;return XZ=0,z}function pB(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&H7)!==H1)Q.flags&=~(HJ|C7|E5|c1);else Q.flags&=~(E5|c1);z.lanes=OJ(z.lanes,X)}function cB(){if(u0.current=CY,OY){var z=Y4.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}OY=!1}$z=R0,Y4=null,Y6=null,$6=null,T5=null,R8=-1,K0=null,XU=!1,QZ=!1,XZ=0}function K7(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if($6===null)Y4.memoizedState=$6=z;else $6=$6.next=z;return $6}function k5(){var z;if(Y6===null){var Q=Y4.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=Y6.next;var X;if($6===null)X=Y4.memoizedState;else X=$6.next;if(X!==null)$6=X,X=$6.next,Y6=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");Y6=z;var Z={memoizedState:Y6.memoizedState,baseState:Y6.baseState,baseQueue:Y6.baseQueue,queue:Y6.queue,next:null};if($6===null)Y4.memoizedState=$6=Z;else $6=$6.next=Z}return $6}function dB(){return{lastEffect:null,stores:null}}function iH(z,Q){return typeof Q==="function"?Q(z):Q}function oH(z,Q,X){var Z=K7(),J;if(X!==void 0)J=X(Q);else J=Q;Z.memoizedState=Z.baseState=J;var $={pending:null,interleaved:null,lanes:R0,dispatch:null,lastRenderedReducer:z,lastRenderedState:J};Z.queue=$;var H=$.dispatch=Iw.bind(null,Y4,$);return[Z.memoizedState,H]}function aH(z,Q,X){var Z=k5(),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 $=Y6,H=$.baseQueue,B=J.pending;if(B!==null){if(H!==null){var K=H.next,R=B.next;H.next=R,B.next=K}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 A=H.next,x=$.baseState,E=null,e=null,z0=null,Y0=A;do{var y0=Y0.lane;if(!dz($z,y0)){var z1={lane:y0,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};if(z0===null)e=z0=z1,E=x;else z0=z0.next=z1;Y4.lanes=T1(Y4.lanes,y0),PZ(y0)}else{if(z0!==null){var a0={lane:b6,action:Y0.action,hasEagerState:Y0.hasEagerState,eagerState:Y0.eagerState,next:null};z0=z0.next=a0}if(Y0.hasEagerState)x=Y0.eagerState;else{var y1=Y0.action;x=z(x,y1)}}Y0=Y0.next}while(Y0!==null&&Y0!==A);if(z0===null)E=x;else z0.next=e;if(!_5(x,Z.memoizedState))UZ();Z.memoizedState=x,Z.baseState=E,Z.baseQueue=z0,J.lastRenderedState=x}var V1=J.interleaved;if(V1!==null){var n=V1;do{var G0=n.lane;Y4.lanes=T1(Y4.lanes,G0),PZ(G0),n=n.next}while(n!==V1)}else if(H===null)J.lanes=R0;var r=J.dispatch;return[Z.memoizedState,r]}function nH(z,Q,X){var Z=k5(),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 K=H.next,R=K;do{var A=R.action;B=z(B,A),R=R.next}while(R!==K);if(!_5(B,Z.memoizedState))UZ();if(Z.memoizedState=B,Z.baseQueue===null)Z.baseState=B;J.lastRenderedState=B}return[B,$]}function rH(z,Q,X){return}function LY(z,Q,X){return}function tH(z,Q,X){var Z=Y4,J=K7(),$,H=I6();if(H){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if($=X(),!UQ){if($!==X())q("The result of getServerSnapshot should be cached to avoid an infinite loop"),UQ=!0}}else{if($=Q(),!UQ){var B=Q();if(!_5($,B))q("The result of getSnapshot should be cached to avoid an infinite loop"),UQ=!0}var K=aY();if(K===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!WJ(K,$z))lB(Z,Q,$)}J.memoizedState=$;var R={value:$,getSnapshot:Q};return J.queue=R,wY(oB.bind(null,Z,R,z),[z]),Z.flags|=E5,ZZ(Z6|T6,iB.bind(null,Z,R,$,Q),void 0,null),$}function _Y(z,Q,X){var Z=Y4,J=k5(),$=Q();if(!UQ){var H=Q();if(!_5($,H))q("The result of getSnapshot should be cached to avoid an infinite loop"),UQ=!0}var B=J.memoizedState,K=!_5(B,$);if(K)J.memoizedState=$,UZ();var R=J.queue;if(YZ(oB.bind(null,Z,R,z),[z]),R.getSnapshot!==Q||K||$6!==null&&$6.memoizedState.tag&Z6){Z.flags|=E5,ZZ(Z6|T6,iB.bind(null,Z,R,$,Q),void 0,null);var A=aY();if(A===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!WJ(A,$z))lB(Z,Q,$)}return $}function lB(z,Q,X){z.flags|=$J;var Z={getSnapshot:Q,value:X},J=Y4.updateQueue;if(J===null)J=dB(),Y4.updateQueue=J,J.stores=[Z];else{var $=J.stores;if($===null)J.stores=[Z];else $.push(Z)}}function iB(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,aB(Q))nB(z)}function oB(z,Q,X){var Z=function(){if(aB(Q))nB(z)};return X(Z)}function aB(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!_5(X,Z)}catch(J){return!0}}function nB(z){var Q=J5(z,_1);if(Q!==null)B6(Q,z,_1,A4)}function NY(z){var Q=K7();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:R0,dispatch:null,lastRenderedReducer:iH,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=Tw.bind(null,Y4,X);return[Q.memoizedState,Z]}function sH(z){return aH(iH)}function eH(z){return nH(iH)}function ZZ(z,Q,X,Z){var J={tag:z,create:Q,destroy:X,deps:Z,next:null},$=Y4.updateQueue;if($===null)$=dB(),Y4.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 z2(z){var Q=K7();{var X={current:z};return Q.memoizedState=X,X}}function RY(z){var Q=k5();return Q.memoizedState}function JZ(z,Q,X,Z){var J=K7(),$=Z===void 0?null:Z;Y4.flags|=z,J.memoizedState=ZZ(Z6|Q,X,void 0,$)}function bY(z,Q,X,Z){var J=k5(),$=Z===void 0?null:Z,H=void 0;if(Y6!==null){var B=Y6.memoizedState;if(H=B.destroy,$!==null){var K=B.deps;if(lH($,K)){J.memoizedState=ZZ(Q,X,H,$);return}}}Y4.flags|=z,J.memoizedState=ZZ(Z6|Q,X,H,$)}function wY(z,Q){if((Y4.mode&H7)!==H1)return JZ(HJ|E5|r3,T6,z,Q);else return JZ(E5|r3,T6,z,Q)}function YZ(z,Q){return bY(E5,T6,z,Q)}function Q2(z,Q){return JZ(c1,U7,z,Q)}function FY(z,Q){return bY(c1,U7,z,Q)}function X2(z,Q){var X=c1;if(X|=p8,(Y4.mode&H7)!==H1)X|=C7;return JZ(X,J6,z,Q)}function MY(z,Q){return bY(c1,J6,z,Q)}function rB(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 Z2(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=c1;if(J|=p8,(Y4.mode&H7)!==H1)J|=C7;return JZ(J,J6,rB.bind(null,Q,z),Z)}function PY(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 bY(c1,J6,rB.bind(null,Q,z),Z)}function AY(z,Q){}var IY=AY;function J2(z,Q){var X=K7(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function TY(z,Q){var X=k5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(lH(Z,$))return J[0]}}return X.memoizedState=[z,Z],z}function Y2(z,Q){var X=K7(),Z=Q===void 0?null:Q,J=z();return X.memoizedState=[J,Z],J}function kY(z,Q){var X=k5(),Z=Q===void 0?null:Q,J=X.memoizedState;if(J!==null){if(Z!==null){var $=J[1];if(lH(Z,$))return J[0]}}var H=z();return X.memoizedState=[H,Z],H}function $2(z){var Q=K7();return Q.memoizedState=z,z}function tB(z){var Q=k5(),X=Y6,Z=X.memoizedState;return eB(Q,Z,z)}function sB(z){var Q=k5();if(Y6===null)return Q.memoizedState=z,z;else{var X=Y6.memoizedState;return eB(Q,X,z)}}function eB(z,Q,X){var Z=!G_($z);if(Z){if(!_5(X,Q)){var J=a9();Y4.lanes=T1(Y4.lanes,J),PZ(J),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,UZ();return z.memoizedState=X,X}}function Pw(z,Q,X){var Z=j5();w6(N_(Z,h7)),z(!0);var J=zZ.transition;zZ.transition={};var $=zZ.transition;zZ.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(w6(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 H2(){var z=NY(!1),Q=z[0],X=z[1],Z=Pw.bind(null,X),J=K7();return J.memoizedState=Z,[Q,Z]}function zU(){var z=sH(),Q=z[0],X=k5(),Z=X.memoizedState;return[Q,Z]}function QU(){var z=eH(),Q=z[0],X=k5(),Z=X.memoizedState;return[Q,Z]}var XU=!1;function Aw(){return XU}function G2(){var z=K7(),Q=aY(),X=Q.identifierPrefix,Z;if(I6()){var J=pb();Z=":"+X+"R"+J;var $=XZ++;if($>0)Z+="H"+$.toString(32);Z+=":"}else{var H=ww++;Z=":"+X+"r"+H.toString(32)+":"}return z.memoizedState=Z,Z}function vY(){var z=k5(),Q=z.memoizedState;return Q}function Iw(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=P8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(ZU(z))JU(Q,J);else{var $=hB(z,Q,J,Z);if($!==null){var H=t6();B6($,z,Z,H),YU($,Q,Z)}}$U(z,Z)}function Tw(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=P8(z),J={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(ZU(z))JU(Q,J);else{var $=z.alternate;if(z.lanes===R0&&($===null||$.lanes===R0)){var H=Q.lastRenderedReducer;if(H!==null){var B;B=u0.current,u0.current=i5;try{var K=Q.lastRenderedState,R=H(K,X);if(J.hasEagerState=!0,J.eagerState=R,_5(R,K)){Uw(z,Q,J,Z);return}}catch(E){}finally{u0.current=B}}}var A=hB(z,Q,J,Z);if(A!==null){var x=t6();B6(A,z,Z,x),YU(A,Q,Z)}}$U(z,Z)}function ZU(z){var Q=z.alternate;return z===Y4||Q!==null&&Q===Y4}function JU(z,Q){QZ=OY=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function YU(z,Q,X){if(o9(X)){var Z=Q.lanes;Z=n9(Z,z.pendingLanes);var J=T1(Z,X);Q.lanes=J,T$(z,J)}}function $U(z,Q,X){Q$(z,Q)}var CY={readContext:z6,useCallback:j6,useContext:j6,useEffect:j6,useImperativeHandle:j6,useInsertionEffect:j6,useLayoutEffect:j6,useMemo:j6,useReducer:j6,useRef:j6,useState:j6,useDebugValue:j6,useDeferredValue:j6,useTransition:j6,useMutableSource:j6,useSyncExternalStore:j6,useId:j6,unstable_isNewReconciler:X1},HU=null,GU=null,qU=null,BU=null,W7=null,i5=null,SY=null;{var q2=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().")},N1=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")};HU={readContext:function(z){return z6(z)},useCallback:function(z,Q){return K0="useCallback",t1(),KQ(Q),J2(z,Q)},useContext:function(z){return K0="useContext",t1(),z6(z)},useEffect:function(z,Q){return K0="useEffect",t1(),KQ(Q),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",t1(),KQ(X),Z2(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",t1(),KQ(Q),Q2(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",t1(),KQ(Q),X2(z,Q)},useMemo:function(z,Q){K0="useMemo",t1(),KQ(Q);var X=u0.current;u0.current=W7;try{return Y2(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",t1();var Z=u0.current;u0.current=W7;try{return oH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",t1(),z2(z)},useState:function(z){K0="useState",t1();var Q=u0.current;u0.current=W7;try{return NY(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",t1(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",t1(),$2(z)},useTransition:function(){return K0="useTransition",t1(),H2()},useMutableSource:function(z,Q,X){return K0="useMutableSource",t1(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",t1(),tH(z,Q,X)},useId:function(){return K0="useId",t1(),G2()},unstable_isNewReconciler:X1},GU={readContext:function(z){return z6(z)},useCallback:function(z,Q){return K0="useCallback",h0(),J2(z,Q)},useContext:function(z){return K0="useContext",h0(),z6(z)},useEffect:function(z,Q){return K0="useEffect",h0(),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",h0(),Z2(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",h0(),Q2(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",h0(),X2(z,Q)},useMemo:function(z,Q){K0="useMemo",h0();var X=u0.current;u0.current=W7;try{return Y2(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",h0();var Z=u0.current;u0.current=W7;try{return oH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",h0(),z2(z)},useState:function(z){K0="useState",h0();var Q=u0.current;u0.current=W7;try{return NY(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",h0(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",h0(),$2(z)},useTransition:function(){return K0="useTransition",h0(),H2()},useMutableSource:function(z,Q,X){return K0="useMutableSource",h0(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",h0(),tH(z,Q,X)},useId:function(){return K0="useId",h0(),G2()},unstable_isNewReconciler:X1},qU={readContext:function(z){return z6(z)},useCallback:function(z,Q){return K0="useCallback",h0(),TY(z,Q)},useContext:function(z){return K0="useContext",h0(),z6(z)},useEffect:function(z,Q){return K0="useEffect",h0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",h0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",h0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",h0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",h0();var X=u0.current;u0.current=i5;try{return kY(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",h0();var Z=u0.current;u0.current=i5;try{return aH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",h0(),RY()},useState:function(z){K0="useState",h0();var Q=u0.current;u0.current=i5;try{return sH(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",h0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",h0(),tB(z)},useTransition:function(){return K0="useTransition",h0(),zU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",h0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",h0(),_Y(z,Q)},useId:function(){return K0="useId",h0(),vY()},unstable_isNewReconciler:X1},BU={readContext:function(z){return z6(z)},useCallback:function(z,Q){return K0="useCallback",h0(),TY(z,Q)},useContext:function(z){return K0="useContext",h0(),z6(z)},useEffect:function(z,Q){return K0="useEffect",h0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",h0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",h0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",h0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",h0();var X=u0.current;u0.current=SY;try{return kY(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",h0();var Z=u0.current;u0.current=SY;try{return nH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",h0(),RY()},useState:function(z){K0="useState",h0();var Q=u0.current;u0.current=SY;try{return eH(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",h0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",h0(),sB(z)},useTransition:function(){return K0="useTransition",h0(),QU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",h0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",h0(),_Y(z,Q)},useId:function(){return K0="useId",h0(),vY()},unstable_isNewReconciler:X1},W7={readContext:function(z){return q2(),z6(z)},useCallback:function(z,Q){return K0="useCallback",N1(),t1(),J2(z,Q)},useContext:function(z){return K0="useContext",N1(),t1(),z6(z)},useEffect:function(z,Q){return K0="useEffect",N1(),t1(),wY(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",N1(),t1(),Z2(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",N1(),t1(),Q2(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",N1(),t1(),X2(z,Q)},useMemo:function(z,Q){K0="useMemo",N1(),t1();var X=u0.current;u0.current=W7;try{return Y2(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",N1(),t1();var Z=u0.current;u0.current=W7;try{return oH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",N1(),t1(),z2(z)},useState:function(z){K0="useState",N1(),t1();var Q=u0.current;u0.current=W7;try{return NY(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",N1(),t1(),AY()},useDeferredValue:function(z){return K0="useDeferredValue",N1(),t1(),$2(z)},useTransition:function(){return K0="useTransition",N1(),t1(),H2()},useMutableSource:function(z,Q,X){return K0="useMutableSource",N1(),t1(),rH()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",N1(),t1(),tH(z,Q,X)},useId:function(){return K0="useId",N1(),t1(),G2()},unstable_isNewReconciler:X1},i5={readContext:function(z){return q2(),z6(z)},useCallback:function(z,Q){return K0="useCallback",N1(),h0(),TY(z,Q)},useContext:function(z){return K0="useContext",N1(),h0(),z6(z)},useEffect:function(z,Q){return K0="useEffect",N1(),h0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",N1(),h0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",N1(),h0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",N1(),h0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",N1(),h0();var X=u0.current;u0.current=i5;try{return kY(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",N1(),h0();var Z=u0.current;u0.current=i5;try{return aH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",N1(),h0(),RY()},useState:function(z){K0="useState",N1(),h0();var Q=u0.current;u0.current=i5;try{return sH(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",N1(),h0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",N1(),h0(),tB(z)},useTransition:function(){return K0="useTransition",N1(),h0(),zU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",N1(),h0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",N1(),h0(),_Y(z,Q)},useId:function(){return K0="useId",N1(),h0(),vY()},unstable_isNewReconciler:X1},SY={readContext:function(z){return q2(),z6(z)},useCallback:function(z,Q){return K0="useCallback",N1(),h0(),TY(z,Q)},useContext:function(z){return K0="useContext",N1(),h0(),z6(z)},useEffect:function(z,Q){return K0="useEffect",N1(),h0(),YZ(z,Q)},useImperativeHandle:function(z,Q,X){return K0="useImperativeHandle",N1(),h0(),PY(z,Q,X)},useInsertionEffect:function(z,Q){return K0="useInsertionEffect",N1(),h0(),FY(z,Q)},useLayoutEffect:function(z,Q){return K0="useLayoutEffect",N1(),h0(),MY(z,Q)},useMemo:function(z,Q){K0="useMemo",N1(),h0();var X=u0.current;u0.current=i5;try{return kY(z,Q)}finally{u0.current=X}},useReducer:function(z,Q,X){K0="useReducer",N1(),h0();var Z=u0.current;u0.current=i5;try{return nH(z,Q,X)}finally{u0.current=Z}},useRef:function(z){return K0="useRef",N1(),h0(),RY()},useState:function(z){K0="useState",N1(),h0();var Q=u0.current;u0.current=i5;try{return eH(z)}finally{u0.current=Q}},useDebugValue:function(z,Q){return K0="useDebugValue",N1(),h0(),IY()},useDeferredValue:function(z){return K0="useDeferredValue",N1(),h0(),sB(z)},useTransition:function(){return K0="useTransition",N1(),h0(),QU()},useMutableSource:function(z,Q,X){return K0="useMutableSource",N1(),h0(),LY()},useSyncExternalStore:function(z,Q,X){return K0="useSyncExternalStore",N1(),h0(),_Y(z,Q)},useId:function(){return K0="useId",N1(),h0(),vY()},unstable_isNewReconciler:X1}}var b8=H4.unstable_now,UU=0,fY=-1,$Z=-1,hY=-1,B2=!1,yY=!1;function KU(){return B2}function kw(){yY=!0}function vw(){B2=!1,yY=!1}function Cw(){B2=yY,yY=!1}function WU(){return UU}function OU(){UU=b8()}function U2(z){if($Z=b8(),z.actualStartTime<0)z.actualStartTime=b8()}function LU(z){$Z=-1}function VY(z,Q){if($Z>=0){var X=b8()-$Z;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;$Z=-1}}function O7(z){if(fY>=0){var Q=b8()-fY;fY=-1;var X=z.return;while(X!==null){switch(X.tag){case T:var Z=X.stateNode;Z.effectDuration+=Q;return;case V:var J=X.stateNode;J.effectDuration+=Q;return}X=X.return}}}function K2(z){if(hY>=0){var Q=b8()-hY;hY=-1;var X=z.return;while(X!==null){switch(X.tag){case T: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 L7(){fY=b8()}function W2(){hY=b8()}function O2(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function o5(z,Q){if(z&&z.defaultProps){var X=v1({},Q),Z=z.defaultProps;for(var J in Z)if(X[J]===void 0)X[J]=Z[J];return X}return Q}var L2={},_2,N2,R2,b2,w2,_U,DY,F2,M2,P2,HZ;{_2=new Set,N2=new Set,R2=new Set,b2=new Set,F2=new Set,w2=new Set,M2=new Set,P2=new Set,HZ=new Set;var NU=new Set;DY=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!NU.has(X))NU.add(X),q("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},_U=function(z,Q){if(Q===void 0){var X=d1(z)||"Component";if(!w2.has(X))w2.add(X),q("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty(L2,"_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(L2)}function A2(z,Q,X,Z){var J=z.memoizedState,$=X(Z,J);{if(z.mode&c4){R6(!0);try{$=X(Z,J)}finally{R6(!1)}}_U(Q,$)}var H=$===null||$===void 0?J:v1({},J,$);if(z.memoizedState=H,z.lanes===R0){var B=z.updateQueue;B.baseState=H}}var I2={isMounted:FL,enqueueSetState:function(z,Q,X){var Z=uz(z),J=t6(),$=P8(Z),H=E7(J,$);if(H.payload=Q,X!==void 0&&X!==null)DY(X,"setState"),H.callback=X;var B=L8(Z,H,$);if(B!==null)B6(B,Z,$,J),GY(B,Z,$);Q$(Z,$)},enqueueReplaceState:function(z,Q,X){var Z=uz(z),J=t6(),$=P8(Z),H=E7(J,$);if(H.tag=VB,H.payload=Q,X!==void 0&&X!==null)DY(X,"replaceState"),H.callback=X;var B=L8(Z,H,$);if(B!==null)B6(B,Z,$,J),GY(B,Z,$);Q$(Z,$)},enqueueForceUpdate:function(z,Q){var X=uz(z),Z=t6(),J=P8(X),$=E7(Z,J);if($.tag=YY,Q!==void 0&&Q!==null)DY(Q,"forceUpdate"),$.callback=Q;var H=L8(X,$,J);if(H!==null)B6(H,X,J,Z),GY(H,X,J);sL(X,J)}};function RU(z,Q,X,Z,J,$,H){var B=z.stateNode;if(typeof B.shouldComponentUpdate==="function"){var K=B.shouldComponentUpdate(Z,$,H);{if(z.mode&c4){R6(!0);try{K=B.shouldComponentUpdate(Z,$,H)}finally{R6(!1)}}if(K===void 0)q("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",d1(Q)||"Component")}return K}if(Q.prototype&&Q.prototype.isPureReactComponent)return!CX(X,Z)||!CX(J,$);return!0}function Sw(z,Q,X){var Z=z.stateNode;{var J=d1(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&c4)===H1)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
|
-
|
|
86
|
-
.Learn more about this warning here: https://reactjs.org/link/legacy-context`,J);if(Q.contextTypes&&!HZ.has(Q)&&(z.mode&c4)===H1)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
|
-
|
|
88
|
-
Learn more about this warning here: https://reactjs.org/link/legacy-context`,J);if(Z.contextTypes)q("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",J);if(Q.contextType&&Q.contextTypes&&!M2.has(Q))M2.add(Q),q("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",J)}if(typeof Z.componentShouldUpdate==="function")q("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",J);if(Q.prototype&&Q.prototype.isPureReactComponent&&typeof Z.shouldComponentUpdate<"u")q("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",d1(Q)||"A pure component");if(typeof Z.componentDidUnmount==="function")q("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",J);if(typeof Z.componentDidReceiveProps==="function")q("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",J);if(typeof Z.componentWillRecieveProps==="function")q("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",J);if(typeof Z.UNSAFE_componentWillRecieveProps==="function")q("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",J);var H=Z.props!==X;if(Z.props!==void 0&&H)q("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",J,J);if(Z.defaultProps)q("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",J,J);if(typeof Z.getSnapshotBeforeUpdate==="function"&&typeof Z.componentDidUpdate!=="function"&&!R2.has(Q))R2.add(Q),q("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",d1(Q));if(typeof Z.getDerivedStateFromProps==="function")q("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",J);if(typeof Z.getDerivedStateFromError==="function")q("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",J);if(typeof Q.getSnapshotBeforeUpdate==="function")q("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",J);var B=Z.state;if(B&&(typeof B!=="object"||a1(B)))q("%s.state: must be set to an object or null",J);if(typeof Z.getChildContext==="function"&&typeof Q.childContextTypes!=="object")q("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",J)}}function bU(z,Q){Q.updater=I2,z.stateNode=Q,_L(Q,z),Q._reactInternalInstance=L2}function wU(z,Q,X){var Z=!1,J=N5,$=N5,H=Q.contextType;if("contextType"in Q){var B=H===null||H!==void 0&&H.$$typeof===I&&H._context===void 0;if(!B&&!P2.has(Q)){P2.add(Q);var K="";if(H===void 0)K=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.";else if(typeof H!=="object")K=" However, it is set to a "+typeof H+".";else if(H.$$typeof===N0)K=" Did you accidentally pass the Context.Provider instead?";else if(H._context!==void 0)K=" Did you accidentally pass the Context.Consumer instead?";else K=" However, it is set to an object with keys {"+Object.keys(H).join(", ")+"}.";q("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",d1(Q)||"Component",K)}}if(typeof H==="object"&&H!==null)$=z6(H);else{J=zQ(z,Q,!0);var R=Q.contextTypes;Z=R!==null&&R!==void 0,$=Z?QQ(z,J):N5}var A=new Q(X,$);if(z.mode&c4){R6(!0);try{A=new Q(X,$)}finally{R6(!1)}}var x=z.memoizedState=A.state!==null&&A.state!==void 0?A.state:null;bU(z,A);{if(typeof Q.getDerivedStateFromProps==="function"&&x===null){var E=d1(Q)||"Component";if(!N2.has(E))N2.add(E),q("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",E,A.state===null?"null":"undefined",E)}if(typeof Q.getDerivedStateFromProps==="function"||typeof A.getSnapshotBeforeUpdate==="function"){var e=null,z0=null,Y0=null;if(typeof A.componentWillMount==="function"&&A.componentWillMount.__suppressDeprecationWarning!==!0)e="componentWillMount";else if(typeof A.UNSAFE_componentWillMount==="function")e="UNSAFE_componentWillMount";if(typeof A.componentWillReceiveProps==="function"&&A.componentWillReceiveProps.__suppressDeprecationWarning!==!0)z0="componentWillReceiveProps";else if(typeof A.UNSAFE_componentWillReceiveProps==="function")z0="UNSAFE_componentWillReceiveProps";if(typeof A.componentWillUpdate==="function"&&A.componentWillUpdate.__suppressDeprecationWarning!==!0)Y0="componentWillUpdate";else if(typeof A.UNSAFE_componentWillUpdate==="function")Y0="UNSAFE_componentWillUpdate";if(e!==null||z0!==null||Y0!==null){var y0=d1(Q)||"Component",z1=typeof Q.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!b2.has(y0))b2.add(y0),q(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
89
|
-
|
|
90
|
-
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
91
|
-
|
|
92
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
93
|
-
https://reactjs.org/link/unsafe-component-lifecycles`,y0,z1,e!==null?`
|
|
94
|
-
`+e:"",z0!==null?`
|
|
95
|
-
`+z0:"",Y0!==null?`
|
|
96
|
-
`+Y0:"")}}}if(Z)qB(z,J,$);return A}function fw(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.",P1(z)||"Component"),I2.enqueueReplaceState(Q,Q.state,null)}function FU(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 $=P1(z)||"Component";if(!_2.has($))_2.add($),q("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",$)}I2.enqueueReplaceState(Q,Q.state,null)}}function T2(z,Q,X,Z){Sw(z,Q,X);var J=z.stateNode;J.props=X,J.state=z.memoizedState,J.refs={},VH(z);var $=Q.contextType;if(typeof $==="object"&&$!==null)J.context=z6($);else{var H=zQ(z,Q,!0);J.context=QQ(z,H)}{if(J.state===X){var B=d1(Q)||"Component";if(!F2.has(B))F2.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&c4)d5.recordLegacyContextWarning(z,J);d5.recordUnsafeLifecycleWarnings(z,J)}J.state=z.memoizedState;var K=Q.getDerivedStateFromProps;if(typeof K==="function")A2(z,Q,K,X),J.state=z.memoizedState;if(typeof Q.getDerivedStateFromProps!=="function"&&typeof J.getSnapshotBeforeUpdate!=="function"&&(typeof J.UNSAFE_componentWillMount==="function"||typeof J.componentWillMount==="function"))fw(z,J),qY(z,X,J,Z),J.state=z.memoizedState;if(typeof J.componentDidMount==="function"){var R=c1;if(R|=p8,(z.mode&H7)!==H1)R|=C7;z.flags|=R}}function hw(z,Q,X,Z){var{stateNode:J,memoizedProps:$}=z;J.props=$;var H=J.context,B=Q.contextType,K=N5;if(typeof B==="object"&&B!==null)K=z6(B);else{var R=zQ(z,Q,!0);K=QQ(z,R)}var A=Q.getDerivedStateFromProps,x=typeof A==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!x&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if($!==X||H!==K)FU(z,J,X,K)}mB();var E=z.memoizedState,e=J.state=E;if(qY(z,X,J,Z),e=z.memoizedState,$===X&&E===e&&!dJ()&&!BY()){if(typeof J.componentDidMount==="function"){var z0=c1;if(z0|=p8,(z.mode&H7)!==H1)z0|=C7;z.flags|=z0}return!1}if(typeof A==="function")A2(z,Q,A,X),e=z.memoizedState;var Y0=BY()||RU(z,Q,$,X,E,e,K);if(Y0){if(!x&&(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 y0=c1;if(y0|=p8,(z.mode&H7)!==H1)y0|=C7;z.flags|=y0}}else{if(typeof J.componentDidMount==="function"){var z1=c1;if(z1|=p8,(z.mode&H7)!==H1)z1|=C7;z.flags|=z1}z.memoizedProps=X,z.memoizedState=e}return J.props=X,J.state=e,J.context=K,Y0}function yw(z,Q,X,Z,J){var $=Q.stateNode;DB(z,Q);var H=Q.memoizedProps,B=Q.type===Q.elementType?H:o5(Q.type,H);$.props=B;var K=Q.pendingProps,R=$.context,A=X.contextType,x=N5;if(typeof A==="object"&&A!==null)x=z6(A);else{var E=zQ(Q,X,!0);x=QQ(Q,E)}var e=X.getDerivedStateFromProps,z0=typeof e==="function"||typeof $.getSnapshotBeforeUpdate==="function";if(!z0&&(typeof $.UNSAFE_componentWillReceiveProps==="function"||typeof $.componentWillReceiveProps==="function")){if(H!==K||R!==x)FU(Q,$,Z,x)}mB();var Y0=Q.memoizedState,y0=$.state=Y0;if(qY(Q,Z,$,J),y0=Q.memoizedState,H===K&&Y0===y0&&!dJ()&&!BY()&&!O1){if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=c1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=x8}return!1}if(typeof e==="function")A2(Q,X,e,Z),y0=Q.memoizedState;var z1=BY()||RU(Q,X,B,Z,Y0,y0,x)||O1;if(z1){if(!z0&&(typeof $.UNSAFE_componentWillUpdate==="function"||typeof $.componentWillUpdate==="function")){if(typeof $.componentWillUpdate==="function")$.componentWillUpdate(Z,y0,x);if(typeof $.UNSAFE_componentWillUpdate==="function")$.UNSAFE_componentWillUpdate(Z,y0,x)}if(typeof $.componentDidUpdate==="function")Q.flags|=c1;if(typeof $.getSnapshotBeforeUpdate==="function")Q.flags|=x8}else{if(typeof $.componentDidUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=c1}if(typeof $.getSnapshotBeforeUpdate==="function"){if(H!==z.memoizedProps||Y0!==z.memoizedState)Q.flags|=x8}Q.memoizedProps=Z,Q.memoizedState=y0}return $.props=Z,$.state=y0,$.context=x,z1}function Hz(z,Q){return{value:z,source:Q,stack:nQ(Q),digest:null}}function k2(z,Q,X){return{value:z,source:null,stack:X!=null?X:null,digest:Q!=null?Q:null}}function Vw(z,Q){return!0}function v2(z,Q){try{var X=Vw(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?P1(J):null,K=B?"The above error occurred in the <"+B+"> component:":"The above error occurred in one of your React components:",R;if(z.tag===T)R=`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
97
|
-
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var A=P1(z)||"Anonymous";R="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+A+".")}var x=K+`
|
|
98
|
-
`+H+`
|
|
99
|
-
|
|
100
|
-
`+(""+R);console.error(x)}catch(E){setTimeout(function(){throw E})}}var Dw=typeof WeakMap==="function"?WeakMap:Map;function MU(z,Q,X){var Z=E7(A4,X);Z.tag=hH,Z.payload={element:null};var J=Q.value;return Z.callback=function(){hM(J),v2(z,Q)},Z}function C2(z,Q,X){var Z=E7(A4,X);Z.tag=hH;var J=z.type.getDerivedStateFromError;if(typeof J==="function"){var $=Q.value;Z.payload=function(){return J($)},Z.callback=function(){VK(z),v2(z,Q)}}var H=z.stateNode;if(H!==null&&typeof H.componentDidCatch==="function")Z.callback=function(){if(VK(z),v2(z,Q),typeof J!=="function")SM(this);var{value:K,stack:R}=Q;if(this.componentDidCatch(K,{componentStack:R!==null?R:""}),typeof J!=="function"){if(!W5(z.lanes,_1))q("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",P1(z)||"Unknown")}};return Z}function PU(z,Q,X){var Z=z.pingCache,J;if(Z===null)Z=z.pingCache=new Dw,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 $=yM.bind(null,z,Q,X);if(x5)AZ(z,X);Q.then($,$)}}function mw(z,Q,X,Z){var J=z.updateQueue;if(J===null){var $=new Set;$.add(X),z.updateQueue=$}else J.add(X)}function uw(z,Q){var X=z.tag;if((z.mode&E1)===H1&&(X===L||X===C||X===c)){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 AU(z){var Q=z;do{if(Q.tag===u&&Rw(Q))return Q;Q=Q.return}while(Q!==null);return null}function IU(z,Q,X,Z,J){if((z.mode&E1)===H1){if(z===Q)z.flags|=a6;else{if(z.flags|=n1,X.flags|=a3,X.flags&=~(NL|$X),X.tag===_){var $=X.alternate;if($===null)X.tag=Q0;else{var H=E7(A4,_1);H.tag=YY,L8(X,H,_1)}}X.lanes=T1(X.lanes,_1)}return z}return z.flags|=a6,z.lanes=J,z}function gw(z,Q,X,Z,J){if(X.flags|=$X,x5)AZ(z,J);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var $=Z;if(uw(X),I6()&&X.mode&E1)_B();var H=AU(Q);if(H!==null){if(H.flags&=~k7,IU(H,Q,X,z,J),H.mode&E1)PU(z,$,J);mw(H,z,$);return}else{if(!H_(J)){PU(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(I6()&&X.mode&E1){_B();var K=AU(Q);if(K!==null){if((K.flags&a6)===q1)K.flags|=k7;IU(K,Q,X,z,J),wH(Hz(Z,X));return}}Z=Hz(Z,X),MM(Z);var R=Q;do{switch(R.tag){case T:{var A=Z;R.flags|=a6;var x=OX(J);R.lanes=T1(R.lanes,x);var E=MU(R,A,x);DH(R,E);return}case _:var e=Z,z0=R.type,Y0=R.stateNode;if((R.flags&n1)===q1&&(typeof z0.getDerivedStateFromError==="function"||Y0!==null&&typeof Y0.componentDidCatch==="function"&&!IK(Y0))){R.flags|=a6;var y0=OX(J);R.lanes=T1(R.lanes,y0);var z1=C2(R,e,y0);DH(R,z1);return}break}R=R.return}while(R!==null)}function Ew(){return null}var GZ=Y.ReactCurrentOwner,a5=!1,S2,qZ,f2,h2,y2,Gz,V2,mY,BZ;S2={},qZ={},f2={},h2={},y2={},Gz=!1,V2={},mY={},BZ={};function n6(z,Q,X,Z){if(z===null)Q.child=vB(Q,null,X,Z);else Q.child=YQ(Q,z.child,X,Z)}function xw(z,Q,X,Z){Q.child=YQ(Q,z.child,null,Z),Q.child=YQ(Q,null,X,Z)}function TU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)p5($,Z,"prop",d1(X))}var H=X.render,B=Q.ref,K,R;HQ(Q,J),GX(Q);{if(GZ.current=Q,U5(!0),K=WQ(z,Q,H,Z,B,J),R=OQ(),Q.mode&c4){R6(!0);try{K=WQ(z,Q,H,Z,B,J),R=OQ()}finally{R6(!1)}}U5(!1)}if(xz(),z!==null&&!a5)return pB(z,Q,J),x7(z,Q,J);if(I6()&&R)OH(Q);return Q.flags|=gz,n6(z,Q,K,J),Q.child}function kU(z,Q,X,Z,J){if(z===null){var $=X.type;if(rM($)&&X.compare===null&&X.defaultProps===void 0){var H=$;return H=MQ($),Q.tag=c,Q.type=H,u2(Q,$),vU(z,Q,H,Z,J)}{var B=$.propTypes;if(B)p5(B,Z,"prop",d1($));if(X.defaultProps!==void 0){var K=d1($)||"Unknown";if(!BZ[K])q("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",K),BZ[K]=!0}}var R=wG(X.type,null,Z,Q,Q.mode,J);return R.ref=Q.ref,R.return=Q,Q.child=R,R}{var A=X.type,x=A.propTypes;if(x)p5(x,Z,"prop",d1(A))}var E=z.child,e=c2(z,J);if(!e){var z0=E.memoizedProps,Y0=X.compare;if(Y0=Y0!==null?Y0:CX,Y0(z0,Z)&&z.ref===Q.ref)return x7(z,Q,J)}Q.flags|=gz;var y0=Wz(E,Z);return y0.ref=Q.ref,y0.return=Q,Q.child=y0,y0}function vU(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=Q.elementType;if($.$$typeof===o0){var H=$,B=H._payload,K=H._init;try{$=K(B)}catch(x){$=null}var R=$&&$.propTypes;if(R)p5(R,Z,"prop",d1($))}}if(z!==null){var A=z.memoizedProps;if(CX(A,Z)&&z.ref===Q.ref&&Q.type===z.type){if(a5=!1,Q.pendingProps=Z=A,!c2(z,J))return Q.lanes=z.lanes,x7(z,Q,J);else if((z.flags&a3)!==q1)a5=!0}}return D2(z,Q,X,Z,J)}function CU(z,Q,X){var Z=Q.pendingProps,J=Z.children,$=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||X0)if((Q.mode&E1)===H1){var H={baseLanes:R0,cachePool:null,transitions:null};Q.memoizedState=H,nY(Q,X)}else if(!W5(X,K5)){var B=null,K;if($!==null){var R=$.baseLanes;K=T1(R,X)}else K=X;Q.lanes=Q.childLanes=LJ(K5);var A={baseLanes:K,cachePool:B,transitions:null};return Q.memoizedState=A,Q.updateQueue=null,nY(Q,K),null}else{var x={baseLanes:R0,cachePool:null,transitions:null};Q.memoizedState=x;var E=$!==null?$.baseLanes:X;nY(Q,E)}else{var e;if($!==null)e=T1($.baseLanes,X),Q.memoizedState=null;else e=X;nY(Q,e)}return n6(z,Q,J,X),Q.child}function jw(z,Q,X){var Z=Q.pendingProps;return n6(z,Q,Z,X),Q.child}function pw(z,Q,X){var Z=Q.pendingProps.children;return n6(z,Q,Z,X),Q.child}function cw(z,Q,X){{Q.flags|=c1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var J=Q.pendingProps,$=J.children;return n6(z,Q,$,X),Q.child}function SU(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=Z8,Q.flags|=n3}function D2(z,Q,X,Z,J){if(Q.type!==Q.elementType){var $=X.propTypes;if($)p5($,Z,"prop",d1(X))}var H;{var B=zQ(Q,X,!0);H=QQ(Q,B)}var K,R;HQ(Q,J),GX(Q);{if(GZ.current=Q,U5(!0),K=WQ(z,Q,X,Z,H,J),R=OQ(),Q.mode&c4){R6(!0);try{K=WQ(z,Q,X,Z,H,J),R=OQ()}finally{R6(!1)}}U5(!1)}if(xz(),z!==null&&!a5)return pB(z,Q,J),x7(z,Q,J);if(I6()&&R)OH(Q);return Q.flags|=gz,n6(z,Q,K,J),Q.child}function fU(z,Q,X,Z,J){{switch(UP(Q)){case!1:{var{stateNode:$,type:H}=Q,B=new H(Q.memoizedProps,$.context),K=B.state;$.updater.enqueueSetState($,K,null);break}case!0:{Q.flags|=n1,Q.flags|=a6;var R=Error("Simulated error coming from DevTools"),A=OX(J);Q.lanes=T1(Q.lanes,A);var x=C2(Q,Hz(R,Q),A);DH(Q,x);break}}if(Q.type!==Q.elementType){var E=X.propTypes;if(E)p5(E,Z,"prop",d1(X))}}var e;if(B7(X))e=!0,iJ(Q);else e=!1;HQ(Q,J);var z0=Q.stateNode,Y0;if(z0===null)gY(z,Q),wU(Q,X,Z),T2(Q,X,Z,J),Y0=!0;else if(z===null)Y0=hw(Q,X,Z,J);else Y0=yw(z,Q,X,Z,J);var y0=m2(z,Q,X,Y0,e,J);{var z1=Q.stateNode;if(Y0&&z1.props!==Z){if(!Gz)q("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",P1(Q)||"a component");Gz=!0}}return y0}function m2(z,Q,X,Z,J,$){SU(z,Q);var H=(Q.flags&n1)!==q1;if(!Z&&!H){if(J)KB(Q,X,!1);return x7(z,Q,$)}var B=Q.stateNode;GZ.current=Q;var K;if(H&&typeof X.getDerivedStateFromError!=="function")K=null,LU();else{GX(Q);{if(U5(!0),K=B.render(),Q.mode&c4){R6(!0);try{B.render()}finally{R6(!1)}}U5(!1)}xz()}if(Q.flags|=gz,z!==null&&H)xw(z,Q,K,$);else n6(z,Q,K,$);if(Q.memoizedState=B.state,J)KB(Q,X,!0);return Q.child}function hU(z){var Q=z.stateNode;if(Q.pendingContext)BB(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)BB(z,Q.context,!1);mH(z,Q.containerInfo)}function dw(z,Q,X){if(hU(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:J}=Q,$=J.element;DB(z,Q),qY(Q,Z,null,X);var{memoizedState:H,stateNode:B}=Q,K=H.element;if(J.isDehydrated){var R={element:K,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},A=Q.updateQueue;if(A.baseState=R,Q.memoizedState=R,Q.flags&k7){var x=Hz(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 yU(z,Q,K,X,x)}else if(K!==$){var E=Hz(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return yU(z,Q,K,X,E)}else{ab(Q);var e=vB(Q,null,K,X);Q.child=e;var z0=e;while(z0)z0.flags=z0.flags&~e4|v7,z0=z0.sibling}}else{if(JQ(),K===$)return x7(z,Q,X);n6(z,Q,K,X)}return Q.child}function yU(z,Q,X,Z,J){return JQ(),wH(J),Q.flags|=k7,n6(z,Q,X,Z),Q.child}function lw(z,Q,X){if(EB(Q),z===null)bH(Q);var{type:Z,pendingProps:J}=Q,$=z!==null?z.memoizedProps:null,H=J.children,B=QH(Z,J);if(B)H=null;else if($!==null&&QH(Z,$))Q.flags|=YX;return SU(z,Q),n6(z,Q,H,X),Q.child}function iw(z,Q){if(z===null)bH(Q);return null}function ow(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$=X,H=$._payload,B=$._init,K=B(H);Q.type=K;var R=Q.tag=tM(K),A=o5(K,J),x;switch(R){case L:return u2(Q,K),Q.type=K=MQ(K),x=D2(null,Q,K,A,Z),x;case _:return Q.type=K=OG(K),x=fU(null,Q,K,A,Z),x;case C:return Q.type=K=LG(K),x=TU(null,Q,K,A,Z),x;case a:{if(Q.type!==Q.elementType){var E=K.propTypes;if(E)p5(E,A,"prop",d1(K))}return x=kU(null,Q,K,o5(K.type,A),Z),x}}var e="";if(K!==null&&typeof K==="object"&&K.$$typeof===o0)e=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+K+". "+("Lazy element type must resolve to a class or function."+e))}function aw(z,Q,X,Z,J){gY(z,Q),Q.tag=_;var $;if(B7(X))$=!0,iJ(Q);else $=!1;return HQ(Q,J),wU(Q,X,Z),T2(Q,X,Z,J),m2(null,Q,X,!0,$,J)}function nw(z,Q,X,Z){gY(z,Q);var J=Q.pendingProps,$;{var H=zQ(Q,X,!1);$=QQ(Q,H)}HQ(Q,Z);var B,K;GX(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var R=d1(X)||"Unknown";if(!S2[R])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.",R,R),S2[R]=!0}if(Q.mode&c4)d5.recordLegacyContextWarning(Q,null);U5(!0),GZ.current=Q,B=WQ(null,Q,X,J,$,Z),K=OQ(),U5(!1)}if(xz(),Q.flags|=gz,typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){var A=d1(X)||"Unknown";if(!qZ[A])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.",A,A,A),qZ[A]=!0}if(typeof B==="object"&&B!==null&&typeof B.render==="function"&&B.$$typeof===void 0){{var x=d1(X)||"Unknown";if(!qZ[x])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.",x,x,x),qZ[x]=!0}Q.tag=_,Q.memoizedState=null,Q.updateQueue=null;var E=!1;if(B7(X))E=!0,iJ(Q);else E=!1;return Q.memoizedState=B.state!==null&&B.state!==void 0?B.state:null,VH(Q),bU(Q,B),T2(Q,X,J,Z),m2(null,Q,X,!0,E,Z)}else{if(Q.tag=L,Q.mode&c4){R6(!0);try{B=WQ(null,Q,X,J,$,Z),K=OQ()}finally{R6(!1)}}if(I6()&&K)OH(Q);return n6(null,Q,B,Z),u2(Q,X),Q.child}}function u2(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
|
-
|
|
102
|
-
Check the render method of \``+Z+"`.";var J=Z||"",$=z._debugSource;if($)J=$.fileName+":"+$.lineNumber;if(!y2[J])y2[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=d1(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=d1(Q)||"Unknown";if(!h2[B])q("%s: Function components do not support getDerivedStateFromProps.",B),h2[B]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var K=d1(Q)||"Unknown";if(!f2[K])q("%s: Function components do not support contextType.",K),f2[K]=!0}}}var g2={dehydrated:null,treeContext:null,retryLane:b6};function E2(z){return{baseLanes:z,cachePool:Ew(),transitions:null}}function rw(z,Q){var X=null;return{baseLanes:T1(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function tw(z,Q,X,Z){if(Q!==null){var J=Q.memoizedState;if(J===null)return!1}return EH(z,eX)}function sw(z,Q){return OJ(z.childLanes,Q)}function VU(z,Q,X){var Z=Q.pendingProps;if(KP(Q))Q.flags|=n1;var J=l5.current,$=!1,H=(Q.flags&n1)!==q1;if(H||tw(J,z))$=!0,Q.flags&=~n1;else if(z===null||z.memoizedState!==null)J=Nw(J,jB);if(J=qQ(J),N8(Q,J),z===null){bH(Q);var B=Q.memoizedState;if(B!==null){var K=B.dehydrated;if(K!==null)return ZF(Q,K)}var{children:R,fallback:A}=Z;if($){var x=ew(Q,R,A,X),E=Q.child;return E.memoizedState=E2(X),Q.memoizedState=g2,x}else return x2(Q,R)}else{var e=z.memoizedState;if(e!==null){var z0=e.dehydrated;if(z0!==null)return JF(z,Q,H,Z,z0,e,X)}if($){var{fallback:Y0,children:y0}=Z,z1=QF(z,Q,y0,Y0,X),a0=Q.child,y1=z.child.memoizedState;return a0.memoizedState=y1===null?E2(X):rw(y1,X),a0.childLanes=sw(z,X),Q.memoizedState=g2,z1}else{var V1=Z.children,n=zF(z,Q,V1,X);return Q.memoizedState=null,n}}}function x2(z,Q,X){var Z=z.mode,J={mode:"visible",children:Q},$=j2(J,Z);return $.return=z,z.child=$,$}function ew(z,Q,X,Z){var{mode:J,child:$}=z,H={mode:"hidden",children:Q},B,K;if((J&E1)===H1&&$!==null){if(B=$,B.childLanes=R0,B.pendingProps=H,z.mode&J4)B.actualDuration=0,B.actualStartTime=-1,B.selfBaseDuration=0,B.treeBaseDuration=0;K=I8(X,J,Z,null)}else B=j2(H,J),K=I8(X,J,Z,null);return B.return=z,K.return=z,B.sibling=K,z.child=B,K}function j2(z,Q,X){return mK(z,Q,R0,null)}function DU(z,Q){return Wz(z,Q)}function zF(z,Q,X,Z){var J=z.child,$=J.sibling,H=DU(J,{mode:"visible",children:X});if((Q.mode&E1)===H1)H.lanes=Z;if(H.return=Q,H.sibling=null,$!==null){var B=Q.deletions;if(B===null)Q.deletions=[$],Q.flags|=E8;else B.push($)}return Q.child=H,H}function QF(z,Q,X,Z,J){var $=Q.mode,H=z.child,B=H.sibling,K={mode:"hidden",children:X},R;if(($&E1)===H1&&Q.child!==H){var A=Q.child;if(R=A,R.childLanes=R0,R.pendingProps=K,Q.mode&J4)R.actualDuration=0,R.actualStartTime=-1,R.selfBaseDuration=H.selfBaseDuration,R.treeBaseDuration=H.treeBaseDuration;Q.deletions=null}else R=DU(H,K),R.subtreeFlags=H.subtreeFlags&S7;var x;if(B!==null)x=Wz(B,Z);else x=I8(Z,$,J,null),x.flags|=e4;return x.return=Q,R.return=Q,R.sibling=x,Q.child=R,x}function uY(z,Q,X,Z){if(Z!==null)wH(Z);YQ(Q,z.child,null,X);var J=Q.pendingProps,$=J.children,H=x2(Q,$);return H.flags|=e4,Q.memoizedState=null,H}function XF(z,Q,X,Z,J){var $=Q.mode,H={mode:"visible",children:X},B=j2(H,$),K=I8(Z,$,J,null);if(K.flags|=e4,B.return=Q,K.return=Q,B.sibling=K,Q.child=B,(Q.mode&E1)!==H1)YQ(Q,z.child,null,J);return K}function ZF(z,Q,X){if((z.mode&E1)===H1)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(_1);else if(YH(Q))z.lanes=LJ(i8);else z.lanes=LJ(K5);return null}function JF(z,Q,X,Z,J,$,H){if(!X){if(ib(),(Q.mode&E1)===H1)return uY(z,Q,H,null);if(YH(J)){var B,K,R;{var A=qb(J);B=A.digest,K=A.message,R=A.stack}var x;if(K)x=Error(K);else x=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var E=k2(x,B,R);return uY(z,Q,H,E)}var e=W5(H,z.childLanes);if(a5||e){var z0=aY();if(z0!==null){var Y0=L_(z0,H);if(Y0!==b6&&Y0!==$.retryLane){$.retryLane=Y0;var y0=A4;J5(z,Y0),B6(z0,z,Y0,y0)}}qG();var z1=k2(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,z1)}else if(ZB(J)){Q.flags|=n1,Q.child=z.child;var a0=VM.bind(null,z);return Bb(J,a0),null}else{nb(Q,J,$.treeContext);var y1=Z.children,V1=x2(Q,y1);return V1.flags|=v7,V1}}else if(Q.flags&k7){Q.flags&=~k7;var n=k2(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return uY(z,Q,H,n)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=n1,null;else{var{children:G0,fallback:r}=Z,w0=XF(z,Q,G0,r,H),g0=Q.child;return g0.memoizedState=E2(H),Q.memoizedState=g2,w0}}function mU(z,Q,X){z.lanes=T1(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=T1(Z.lanes,Q);SH(z.return,Q,X)}function YF(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===u){var J=Z.memoizedState;if(J!==null)mU(Z,X,z)}else if(Z.tag===t)mU(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 $F(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&WY(Z)===null)X=Q;Q=Q.sibling}return X}function HF(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!V2[z])if(V2[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 GF(z,Q){if(z!==void 0&&!mY[z]){if(z!=="collapsed"&&z!=="hidden")mY[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")mY[z]=!0,q('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function uU(z,Q){{var X=a1(z),Z=!X&&typeof P4(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 qF(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(a1(z)){for(var X=0;X<z.length;X++)if(!uU(z[X],X))return}else{var Z=P4(z);if(typeof Z==="function"){var J=Z.call(z);if(J){var $=J.next(),H=0;for(;!$.done;$=J.next()){if(!uU($.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 p2(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 gU(z,Q,X){var Z=Q.pendingProps,J=Z.revealOrder,$=Z.tail,H=Z.children;HF(J),GF($,J),qF(H,J),n6(z,Q,H,X);var B=l5.current,K=EH(B,eX);if(K)B=xH(B,eX),Q.flags|=n1;else{var R=z!==null&&(z.flags&n1)!==q1;if(R)YF(Q,Q.child,X);B=qQ(B)}if(N8(Q,B),(Q.mode&E1)===H1)Q.memoizedState=null;else switch(J){case"forwards":{var A=$F(Q.child),x;if(A===null)x=Q.child,Q.child=null;else x=A.sibling,A.sibling=null;p2(Q,!1,x,A,$);break}case"backwards":{var E=null,e=Q.child;Q.child=null;while(e!==null){var z0=e.alternate;if(z0!==null&&WY(z0)===null){Q.child=e;break}var Y0=e.sibling;e.sibling=E,E=e,e=Y0}p2(Q,!0,E,null,$);break}case"together":{p2(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function BF(z,Q,X){mH(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=YQ(Q,null,Z,X);else n6(z,Q,Z,X);return Q.child}var EU=!1;function UF(z,Q,X){var Z=Q.type,J=Z._context,$=Q.pendingProps,H=Q.memoizedProps,B=$.value;{if(!("value"in $)){if(!EU)EU=!0,q("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var K=Q.type.propTypes;if(K)p5(K,$,"prop","Context.Provider")}if(fB(Q,J,B),H!==null){var R=H.value;if(_5(R,B)){if(H.children===$.children&&!dJ())return x7(z,Q,X)}else Gw(Q,J,X)}var A=$.children;return n6(z,Q,A,X),Q.child}var xU=!1;function KF(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!xU)xU=!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.");HQ(Q,X);var H=z6(Z);GX(Q);var B;return GZ.current=Q,U5(!0),B=$(H),U5(!1),xz(),Q.flags|=gz,n6(z,Q,B,X),Q.child}function UZ(){a5=!0}function gY(z,Q){if((Q.mode&E1)===H1){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=e4}}function x7(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(LU(),PZ(Q.lanes),!W5(X,Q.childLanes))return null;return $w(z,Q),Q.child}function WF(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|=E8;else $.push(z);return X.flags|=e4,X}}function c2(z,Q){var X=z.lanes;if(W5(X,Q))return!0;return!1}function OF(z,Q,X){switch(Q.tag){case T:hU(Q);var Z=Q.stateNode;JQ();break;case w:EB(Q);break;case _:{var J=Q.type;if(B7(J))iJ(Q);break}case F:mH(Q,Q.stateNode.containerInfo);break;case D:{var $=Q.memoizedProps.value,H=Q.type._context;fB(Q,H,$);break}case V:{var B=W5(X,Q.childLanes);if(B)Q.flags|=c1;{var K=Q.stateNode;K.effectDuration=0,K.passiveEffectDuration=0}}break;case u:{var R=Q.memoizedState;if(R!==null){if(R.dehydrated!==null)return N8(Q,qQ(l5.current)),Q.flags|=n1,null;var A=Q.child,x=A.childLanes;if(W5(X,x))return VU(z,Q,X);else{N8(Q,qQ(l5.current));var E=x7(z,Q,X);if(E!==null)return E.sibling;else return null}}else N8(Q,qQ(l5.current));break}case t:{var e=(z.flags&n1)!==q1,z0=W5(X,Q.childLanes);if(e){if(z0)return gU(z,Q,X);Q.flags|=n1}var Y0=Q.memoizedState;if(Y0!==null)Y0.rendering=null,Y0.tail=null,Y0.lastEffect=null;if(N8(Q,l5.current),z0)break;else return null}case p:case i:return Q.lanes=R0,CU(z,Q,X)}return x7(z,Q,X)}function jU(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return WF(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||dJ()||Q.type!==z.type)a5=!0;else{var $=c2(z,X);if(!$&&(Q.flags&n1)===q1)return a5=!1,OF(z,Q,X);if((z.flags&a3)!==q1)a5=!0;else a5=!1}}else if(a5=!1,I6()&&xb(Q)){var H=Q.index,B=jb();LB(Q,B,H)}switch(Q.lanes=R0,Q.tag){case k:return nw(z,Q,Q.type,X);case g:{var K=Q.elementType;return ow(z,Q,K,X)}case L:{var{type:R,pendingProps:A}=Q,x=Q.elementType===R?A:o5(R,A);return D2(z,Q,R,x,X)}case _:{var{type:E,pendingProps:e}=Q,z0=Q.elementType===E?e:o5(E,e);return fU(z,Q,E,z0,X)}case T:return dw(z,Q,X);case w:return lw(z,Q,X);case b:return iw(z,Q);case u:return VU(z,Q,X);case F:return BF(z,Q,X);case C:{var{type:Y0,pendingProps:y0}=Q,z1=Q.elementType===Y0?y0:o5(Y0,y0);return TU(z,Q,Y0,z1,X)}case M:return jw(z,Q,X);case v:return pw(z,Q,X);case V:return cw(z,Q,X);case D:return UF(z,Q,X);case m:return KF(z,Q,X);case a:{var{type:a0,pendingProps:y1}=Q,V1=o5(a0,y1);if(Q.type!==Q.elementType){var n=a0.propTypes;if(n)p5(n,V1,"prop",d1(a0))}return V1=o5(a0.type,V1),kU(z,Q,a0,V1,X)}case c:return vU(z,Q,Q.type,Q.pendingProps,X);case Q0:{var{type:G0,pendingProps:r}=Q,w0=Q.elementType===G0?r:o5(G0,r);return aw(z,Q,G0,w0,X)}case t:return gU(z,Q,X);case l:break;case p:return CU(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|=c1}function pU(z){z.flags|=Z8,z.flags|=n3}var cU,d2,dU,lU;cU=function(z,Q,X,Z){var J=Q.child;while(J!==null){if(J.tag===w||J.tag===b)uR(z,J.stateNode);else if(J.tag===F);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}},d2=function(z,Q){},dU=function(z,Q,X,Z,J){var $=z.memoizedProps;if($===Z)return;var H=Q.stateNode,B=uH(),K=ER(H,X,$,Z,J,B);if(Q.updateQueue=K,K)LQ(Q)},lU=function(z,Q,X,Z){if(X!==Z)LQ(Q)};function KZ(z,Q){if(I6())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 k6(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=R0,Z=q1;if(!Q){if((z.mode&J4)!==H1){var{actualDuration:J,selfBaseDuration:$,child:H}=z;while(H!==null)X=T1(X,T1(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=T1(X,T1(B.lanes,B.childLanes)),Z|=B.subtreeFlags,Z|=B.flags,B.return=z,B=B.sibling}z.subtreeFlags|=Z}else{if((z.mode&J4)!==H1){var{selfBaseDuration:K,child:R}=z;while(R!==null)X=T1(X,T1(R.lanes,R.childLanes)),Z|=R.subtreeFlags&S7,Z|=R.flags&S7,K+=R.treeBaseDuration,R=R.sibling;z.treeBaseDuration=K}else{var A=z.child;while(A!==null)X=T1(X,T1(A.lanes,A.childLanes)),Z|=A.subtreeFlags&S7,Z|=A.flags&S7,A.return=z,A=A.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function LF(z,Q,X){if(zw()&&(Q.mode&E1)!==H1&&(Q.flags&n1)===q1)return MB(Q),JQ(),Q.flags|=k7|$X|a6,!1;var Z=tJ(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(sb(Q),k6(Q),(Q.mode&J4)!==H1){var J=X!==null;if(J){var $=Q.child;if($!==null)Q.treeBaseDuration-=$.treeBaseDuration}}return!1}else{if(JQ(),(Q.flags&n1)===q1)Q.memoizedState=null;if(Q.flags|=c1,k6(Q),(Q.mode&J4)!==H1){var H=X!==null;if(H){var B=Q.child;if(B!==null)Q.treeBaseDuration-=B.treeBaseDuration}}return!1}else return PB(),!0}function iU(z,Q,X){var Z=Q.pendingProps;switch(LH(Q),Q.tag){case k:case g:case c:case L:case C:case M:case v:case V:case m:case a:return k6(Q),null;case _:{var J=Q.type;if(B7(J))lJ(Q);return k6(Q),null}case T:{var $=Q.stateNode;if(GQ(Q),UH(Q),pH(),$.pendingContext)$.context=$.pendingContext,$.pendingContext=null;if(z===null||z.child===null){var H=tJ(Q);if(H)LQ(Q);else if(z!==null){var B=z.memoizedState;if(!B.isDehydrated||(Q.flags&k7)!==q1)Q.flags|=x8,PB()}}return d2(z,Q),k6(Q),null}case w:{gH(Q);var K=gB(),R=Q.type;if(z!==null&&Q.stateNode!=null){if(dU(z,Q,R,Z,K),z.ref!==Q.ref)pU(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 k6(Q),null}var A=uH(),x=tJ(Q);if(x){if(rb(Q,K,A))LQ(Q)}else{var E=mR(R,Z,K,A,Q);if(cU(E,Q,!1,!1),Q.stateNode=E,gR(E,R,Z,K))LQ(Q)}if(Q.ref!==null)pU(Q)}return k6(Q),null}case b:{var e=Z;if(z&&Q.stateNode!=null){var z0=z.memoizedProps;lU(z,Q,z0,e)}else{if(typeof e!=="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=gB(),y0=uH(),z1=tJ(Q);if(z1){if(tb(Q))LQ(Q)}else Q.stateNode=xR(e,Y0,y0,Q)}return k6(Q),null}case u:{BQ(Q);var a0=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var y1=LF(z,Q,a0);if(!y1)if(Q.flags&a6)return Q;else return null}if((Q.flags&n1)!==q1){if(Q.lanes=X,(Q.mode&J4)!==H1)O2(Q);return Q}var V1=a0!==null,n=z!==null&&z.memoizedState!==null;if(V1!==n){if(V1){var G0=Q.child;if(G0.flags|=j8,(Q.mode&E1)!==H1){var r=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!U0);if(r||EH(l5.current,jB))FM();else qG()}}}var w0=Q.updateQueue;if(w0!==null)Q.flags|=c1;if(k6(Q),(Q.mode&J4)!==H1){if(V1){var g0=Q.child;if(g0!==null)Q.treeBaseDuration-=g0.treeBaseDuration}}return null}case F:if(GQ(Q),d2(z,Q),z===null)yb(Q.stateNode.containerInfo);return k6(Q),null;case D:var V0=Q.type._context;return CH(V0,Q),k6(Q),null;case Q0:{var U1=Q.type;if(B7(U1))lJ(Q);return k6(Q),null}case t:{BQ(Q);var w1=Q.memoizedState;if(w1===null)return k6(Q),null;var $4=(Q.flags&n1)!==q1,i1=w1.rendering;if(i1===null)if(!$4){var n4=PM()&&(z===null||(z.flags&n1)===q1);if(!n4){var o1=Q.child;while(o1!==null){var d4=WY(o1);if(d4!==null){$4=!0,Q.flags|=n1,KZ(w1,!1);var p6=d4.updateQueue;if(p6!==null)Q.updateQueue=p6,Q.flags|=c1;return Q.subtreeFlags=q1,Hw(Q,X),N8(Q,xH(l5.current,eX)),Q.child}o1=o1.sibling}}if(w1.tail!==null&&N6()>OK())Q.flags|=n1,$4=!0,KZ(w1,!1),Q.lanes=d9}else KZ(w1,!1);else{if(!$4){var h6=WY(i1);if(h6!==null){Q.flags|=n1,$4=!0;var b5=h6.updateQueue;if(b5!==null)Q.updateQueue=b5,Q.flags|=c1;if(KZ(w1,!0),w1.tail===null&&w1.tailMode==="hidden"&&!i1.alternate&&!I6())return k6(Q),null}else if(N6()*2-w1.renderingStartTime>OK()&&X!==K5)Q.flags|=n1,$4=!0,KZ(w1,!1),Q.lanes=d9}if(w1.isBackwards)i1.sibling=Q.child,Q.child=i1;else{var s6=w1.last;if(s6!==null)s6.sibling=i1;else Q.child=i1;w1.last=i1}}if(w1.tail!==null){var e6=w1.tail;w1.rendering=e6,w1.tail=e6.sibling,w1.renderingStartTime=N6(),e6.sibling=null;var c6=l5.current;if($4)c6=xH(c6,eX);else c6=qQ(c6);return N8(Q,c6),e6}return k6(Q),null}case l:break;case p:case i:{GG(Q);var l7=Q.memoizedState,PQ=l7!==null;if(z!==null){var vZ=z.memoizedState,R7=vZ!==null;if(R7!==PQ&&!X0)Q.flags|=j8}if(!PQ||(Q.mode&E1)===H1)k6(Q);else if(W5(N7,K5)){if(k6(Q),Q.subtreeFlags&(e4|c1))Q.flags|=j8}return null}case Z0:return null;case T0: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 _F(z,Q,X){switch(LH(Q),Q.tag){case _:{var Z=Q.type;if(B7(Z))lJ(Q);var J=Q.flags;if(J&a6){if(Q.flags=J&~a6|n1,(Q.mode&J4)!==H1)O2(Q);return Q}return null}case T:{var $=Q.stateNode;GQ(Q),UH(Q),pH();var H=Q.flags;if((H&a6)!==q1&&(H&n1)===q1)return Q.flags=H&~a6|n1,Q;return null}case w:return gH(Q),null;case u:{BQ(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.");JQ()}var K=Q.flags;if(K&a6){if(Q.flags=K&~a6|n1,(Q.mode&J4)!==H1)O2(Q);return Q}return null}case t:return BQ(Q),null;case F:return GQ(Q),null;case D:var R=Q.type._context;return CH(R,Q),null;case p:case i:return GG(Q),null;case Z0:return null;default:return null}}function oU(z,Q,X){switch(LH(Q),Q.tag){case _:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)lJ(Q);break}case T:{var J=Q.stateNode;GQ(Q),UH(Q),pH();break}case w:{gH(Q);break}case F:GQ(Q);break;case u:BQ(Q);break;case t:BQ(Q);break;case D:var $=Q.type._context;CH($,Q);break;case p:case i:GG(Q);break}}var aU=null;aU=new Set;var EY=!1,v6=!1,NF=typeof WeakSet==="function"?WeakSet:Set,c0=null,_Q=null,NQ=null;function RF(z){l3(null,function(){throw z}),i3()}var bF=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&J4)try{L7(),Q.componentWillUnmount()}finally{O7(z)}else Q.componentWillUnmount()};function nU(z,Q){try{w8(J6,z)}catch(X){R4(z,Q,X)}}function l2(z,Q,X){try{bF(z,X)}catch(Z){R4(z,Q,Z)}}function wF(z,Q,X){try{X.componentDidMount()}catch(Z){R4(z,Q,Z)}}function rU(z,Q){try{eU(z)}catch(X){R4(z,Q,X)}}function RQ(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(S0&&Z1&&z.mode&J4)try{L7(),Z=X(null)}finally{O7(z)}else Z=X(null)}catch(J){R4(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.",P1(z))}else X.current=null}function xY(z,Q,X){try{X()}catch(Z){R4(z,Q,Z)}}var tU=null,sU=!1;function FF(z,Q){tU=VR(z.containerInfo),c0=Q,MF();var X=sU;return sU=!1,tU=null,X}function MF(){while(c0!==null){var z=c0,Q=z.child;if((z.subtreeFlags&t3)!==q1&&Q!==null)Q.return=z,c0=Q;else PF()}}function PF(){while(c0!==null){var z=c0;u4(z);try{AF(z)}catch(X){R4(z,z.return,X)}_6();var Q=z.sibling;if(Q!==null){Q.return=z.return,c0=Q;return}c0=z.return}}function AF(z){var{alternate:Q,flags:X}=z;if((X&x8)!==q1){switch(u4(z),z.tag){case L:case C:case c:break;case _:{if(Q!==null){var{memoizedProps:Z,memoizedState:J}=Q,$=z.stateNode;if(z.type===z.elementType&&!Gz){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.",P1(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.",P1(z)||"instance")}var H=$.getSnapshotBeforeUpdate(z.elementType===z.type?Z:o5(z.type,Z),J);{var B=aU;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.",P1(z))}$.__reactInternalSnapshotBeforeUpdate=H}break}case T:{{var K=z.stateNode;Yb(K.containerInfo)}break}case w:case b:case F:case Q0: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.")}_6()}}function n5(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&T6)!==Y5)xL(Q);else if((z&J6)!==Y5)E9(Q);if((z&U7)!==Y5)IZ(!0);if(xY(Q,X,B),(z&U7)!==Y5)IZ(!1);if((z&T6)!==Y5)jL();else if((z&J6)!==Y5)x9()}}H=H.next}while(H!==$)}}function w8(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&T6)!==Y5)gL(Q);else if((z&J6)!==Y5)pL(Q);var H=$.create;if((z&U7)!==Y5)IZ(!0);if($.destroy=H(),(z&U7)!==Y5)IZ(!1);if((z&T6)!==Y5)EL();else if((z&J6)!==Y5)cL();{var B=$.destroy;if(B!==void 0&&typeof B!=="function"){var K=void 0;if(($.tag&J6)!==q1)K="useLayoutEffect";else if(($.tag&U7)!==q1)K="useInsertionEffect";else K="useEffect";var R=void 0;if(B===null)R=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof B.then==="function")R=`
|
|
103
|
-
|
|
104
|
-
It looks like you wrote `+K+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
105
|
-
|
|
106
|
-
`+K+`(() => {
|
|
107
|
-
async function fetchData() {
|
|
108
|
-
// You can await here
|
|
109
|
-
const response = await MyAPI.getData(someId);
|
|
110
|
-
// ...
|
|
111
|
-
}
|
|
112
|
-
fetchData();
|
|
113
|
-
}, [someId]); // Or [] if effect doesn't need props or state
|
|
114
|
-
|
|
115
|
-
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else R=" You returned: "+B;q("%s must not return anything besides a function, which is used for clean-up.%s",K,R)}}}$=$.next}while($!==J)}}function IF(z,Q){if((Q.flags&c1)!==q1)switch(Q.tag){case V:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,J=Z.id,$=Z.onPostCommit,H=WU(),B=Q.alternate===null?"mount":"update";if(KU())B="nested-update";if(typeof $==="function")$(J,B,X,H);var K=Q.return;z:while(K!==null){switch(K.tag){case T:var R=K.stateNode;R.passiveEffectDuration+=X;break z;case V:var A=K.stateNode;A.passiveEffectDuration+=X;break z}K=K.return}break}}}function TF(z,Q,X,Z){if((X.flags&HX)!==q1)switch(X.tag){case L:case C:case c:{if(!v6)if(X.mode&J4)try{L7(),w8(J6|Z6,X)}finally{O7(X)}else w8(J6|Z6,X);break}case _:{var J=X.stateNode;if(X.flags&c1){if(!v6)if(Q===null){if(X.type===X.elementType&&!Gz){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.",P1(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.",P1(X)||"instance")}if(X.mode&J4)try{L7(),J.componentDidMount()}finally{O7(X)}else J.componentDidMount()}else{var $=X.elementType===X.type?Q.memoizedProps:o5(X.type,Q.memoizedProps),H=Q.memoizedState;if(X.type===X.elementType&&!Gz){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.",P1(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.",P1(X)||"instance")}if(X.mode&J4)try{L7(),J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}finally{O7(X)}else J.componentDidUpdate($,H,J.__reactInternalSnapshotBeforeUpdate)}}var B=X.updateQueue;if(B!==null){if(X.type===X.elementType&&!Gz){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.",P1(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.",P1(X)||"instance")}uB(X,B,J)}break}case T:{var K=X.updateQueue;if(K!==null){var R=null;if(X.child!==null)switch(X.child.tag){case w:R=zH(X.child.stateNode);break;case _:R=X.child.stateNode;break}uB(X,K,R)}break}case w:{var A=X.stateNode;if(Q===null&&X.flags&c1){var{type:x,memoizedProps:E}=X;lR(A,x,E)}break}case b:break;case F:break;case V:{{var e=X.memoizedProps,z0=e.onCommit,Y0=e.onRender,y0=X.stateNode.effectDuration,z1=WU(),a0=Q===null?"mount":"update";if(KU())a0="nested-update";if(typeof Y0==="function")Y0(X.memoizedProps.id,a0,X.actualDuration,X.treeBaseDuration,X.actualStartTime,z1);{if(typeof z0==="function")z0(X.memoizedProps.id,a0,y0,z1);vM(X);var y1=X.return;z:while(y1!==null){switch(y1.tag){case T:var V1=y1.stateNode;V1.effectDuration+=y0;break z;case V:var n=y1.stateNode;n.effectDuration+=y0;break z}y1=y1.return}}}break}case u:{VF(z,X);break}case t:case Q0:case l:case p:case i:case T0: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(!v6){if(X.flags&Z8)eU(X)}}function kF(z){switch(z.tag){case L:case C:case c:{if(z.mode&J4)try{L7(),nU(z,z.return)}finally{O7(z)}else nU(z,z.return);break}case _:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")wF(z,z.return,Q);rU(z,z.return);break}case w:{rU(z,z.return);break}}}function vF(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===w){if(X===null){X=Z;try{var J=Z.stateNode;if(Q)Qb(J);else Zb(Z.stateNode,Z.memoizedProps)}catch(H){R4(z,z.return,H)}}}else if(Z.tag===b){if(X===null)try{var $=Z.stateNode;if(Q)Xb($);else Jb($,Z.memoizedProps)}catch(H){R4(z,z.return,H)}}else if((Z.tag===p||Z.tag===i)&&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 eU(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case w:Z=zH(X);break;default:Z=X}if(typeof Q==="function"){var J;if(z.mode&J4)try{L7(),J=Q(Z)}finally{O7(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.",P1(z))}else{if(!Q.hasOwnProperty("current"))q("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",P1(z));Q.current=Z}}}function CF(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function zK(z){var Q=z.alternate;if(Q!==null)z.alternate=null,zK(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===w){var X=z.stateNode;if(X!==null)mb(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 SF(z){var Q=z.return;while(Q!==null){if(QK(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 QK(z){return z.tag===w||z.tag===T||z.tag===F}function XK(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||QK(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==w&&Q.tag!==b&&Q.tag!==o){if(Q.flags&e4)continue z;if(Q.child===null||Q.tag===F)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&e4))return Q.stateNode}}function fF(z){var Q=SF(z);switch(Q.tag){case w:{var X=Q.stateNode;if(Q.flags&YX)XB(X),Q.flags&=~YX;var Z=XK(z);o2(z,Z,X);break}case T:case F:{var J=Q.stateNode.containerInfo,$=XK(z);i2(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 i2(z,Q,X){var Z=z.tag,J=Z===w||Z===b;if(J){var $=z.stateNode;if(Q)tR(X,$,Q);else nR(X,$)}else if(Z===F);else{var H=z.child;if(H!==null){i2(H,Q,X);var B=H.sibling;while(B!==null)i2(B,Q,X),B=B.sibling}}}function o2(z,Q,X){var Z=z.tag,J=Z===w||Z===b;if(J){var $=z.stateNode;if(Q)rR(X,$,Q);else aR(X,$)}else if(Z===F);else{var H=z.child;if(H!==null){o2(H,Q,X);var B=H.sibling;while(B!==null)o2(B,Q,X),B=B.sibling}}}var C6=null,r5=!1;function hF(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case w:{C6=Z.stateNode,r5=!1;break z}case T:{C6=Z.stateNode.containerInfo,r5=!0;break z}case F:{C6=Z.stateNode.containerInfo,r5=!0;break z}}Z=Z.return}if(C6===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");ZK(z,Q,X),C6=null,r5=!1}CF(X)}function F8(z,Q,X){var Z=X.child;while(Z!==null)ZK(z,Q,Z),Z=Z.sibling}function ZK(z,Q,X){switch(VL(X),X.tag){case w:if(!v6)RQ(X,Q);case b:{{var Z=C6,J=r5;if(C6=null,F8(z,Q,X),C6=Z,r5=J,C6!==null)if(r5)eR(C6,X.stateNode);else sR(C6,X.stateNode)}return}case o:{if(C6!==null)if(r5)zb(C6,X.stateNode);else JH(C6,X.stateNode);return}case F:{{var $=C6,H=r5;C6=X.stateNode.containerInfo,r5=!0,F8(z,Q,X),C6=$,r5=H}return}case L:case C:case a:case c:{if(!v6){var B=X.updateQueue;if(B!==null){var K=B.lastEffect;if(K!==null){var R=K.next,A=R;do{var x=A,E=x.destroy,e=x.tag;if(E!==void 0){if((e&U7)!==Y5)xY(X,Q,E);else if((e&J6)!==Y5){if(E9(X),X.mode&J4)L7(),xY(X,Q,E),O7(X);else xY(X,Q,E);x9()}}A=A.next}while(A!==R)}}}F8(z,Q,X);return}case _:{if(!v6){RQ(X,Q);var z0=X.stateNode;if(typeof z0.componentWillUnmount==="function")l2(X,Q,z0)}F8(z,Q,X);return}case l:{F8(z,Q,X);return}case p:{if(X.mode&E1){var Y0=v6;v6=Y0||X.memoizedState!==null,F8(z,Q,X),v6=Y0}else F8(z,Q,X);break}default:{F8(z,Q,X);return}}}function yF(z){var Q=z.memoizedState}function VF(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)bb($)}}}}function JK(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new NF;Q.forEach(function(Z){var J=DM.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),x5)if(_Q!==null&&NQ!==null)AZ(NQ,_Q);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(J,J)}})}}function DF(z,Q,X){_Q=X,NQ=z,u4(Q),YK(Q,z),u4(Q),_Q=null,NQ=null}function t5(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var J=0;J<Z.length;J++){var $=Z[J];try{hF(z,Q,$)}catch(K){R4($,Q,K)}}var H=oZ();if(Q.subtreeFlags&s3){var B=Q.child;while(B!==null)u4(B),YK(B,z),B=B.sibling}u4(H)}function YK(z,Q,X){var{alternate:Z,flags:J}=z;switch(z.tag){case L:case C:case a:case c:{if(t5(Q,z),_7(z),J&c1){try{n5(U7|Z6,z,z.return),w8(U7|Z6,z)}catch(U1){R4(z,z.return,U1)}if(z.mode&J4){try{L7(),n5(J6|Z6,z,z.return)}catch(U1){R4(z,z.return,U1)}O7(z)}else try{n5(J6|Z6,z,z.return)}catch(U1){R4(z,z.return,U1)}}return}case _:{if(t5(Q,z),_7(z),J&Z8){if(Z!==null)RQ(Z,Z.return)}return}case w:{if(t5(Q,z),_7(z),J&Z8){if(Z!==null)RQ(Z,Z.return)}{if(z.flags&YX){var $=z.stateNode;try{XB($)}catch(U1){R4(z,z.return,U1)}}if(J&c1){var H=z.stateNode;if(H!=null){var B=z.memoizedProps,K=Z!==null?Z.memoizedProps:B,R=z.type,A=z.updateQueue;if(z.updateQueue=null,A!==null)try{iR(H,A,R,K,B,z)}catch(U1){R4(z,z.return,U1)}}}}return}case b:{if(t5(Q,z),_7(z),J&c1){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:x,memoizedProps:E}=z,e=Z!==null?Z.memoizedProps:E;try{oR(x,e,E)}catch(U1){R4(z,z.return,U1)}}return}case T:{if(t5(Q,z),_7(z),J&c1){if(Z!==null){var z0=Z.memoizedState;if(z0.isDehydrated)try{Rb(Q.containerInfo)}catch(U1){R4(z,z.return,U1)}}}return}case F:{t5(Q,z),_7(z);return}case u:{t5(Q,z),_7(z);var Y0=z.child;if(Y0.flags&j8){var{stateNode:y0,memoizedState:z1}=Y0,a0=z1!==null;if(y0.isHidden=a0,a0){var y1=Y0.alternate!==null&&Y0.alternate.memoizedState!==null;if(!y1)wM()}}if(J&c1){try{yF(z)}catch(U1){R4(z,z.return,U1)}JK(z)}return}case p:{var V1=Z!==null&&Z.memoizedState!==null;if(z.mode&E1){var n=v6;v6=n||V1,t5(Q,z),v6=n}else t5(Q,z);if(_7(z),J&j8){var{stateNode:G0,memoizedState:r}=z,w0=r!==null,g0=z;if(G0.isHidden=w0,w0){if(!V1){if((g0.mode&E1)!==H1){c0=g0;var V0=g0.child;while(V0!==null)c0=V0,uF(V0),V0=V0.sibling}}}vF(g0,w0)}return}case t:{if(t5(Q,z),_7(z),J&c1)JK(z);return}case l:return;default:{t5(Q,z),_7(z);return}}}function _7(z){var Q=z.flags;if(Q&e4){try{fF(z)}catch(X){R4(z,z.return,X)}z.flags&=~e4}if(Q&v7)z.flags&=~v7}function mF(z,Q,X){_Q=X,NQ=Q,c0=z,$K(z,Q,X),_Q=null,NQ=null}function $K(z,Q,X){var Z=(z.mode&E1)!==H1;while(c0!==null){var J=c0,$=J.child;if(J.tag===p&&Z){var H=J.memoizedState!==null,B=H||EY;if(B){a2(z,Q,X);continue}else{var K=J.alternate,R=K!==null&&K.memoizedState!==null,A=R||v6,x=EY,E=v6;if(EY=B,v6=A,v6&&!E)c0=J,gF(J);var e=$;while(e!==null)c0=e,$K(e,Q,X),e=e.sibling;c0=J,EY=x,v6=E,a2(z,Q,X);continue}}if((J.subtreeFlags&HX)!==q1&&$!==null)$.return=J,c0=$;else a2(z,Q,X)}}function a2(z,Q,X){while(c0!==null){var Z=c0;if((Z.flags&HX)!==q1){var J=Z.alternate;u4(Z);try{TF(Q,J,Z,X)}catch(H){R4(Z,Z.return,H)}_6()}if(Z===z){c0=null;return}var $=Z.sibling;if($!==null){$.return=Z.return,c0=$;return}c0=Z.return}}function uF(z){while(c0!==null){var Q=c0,X=Q.child;switch(Q.tag){case L:case C:case a:case c:{if(Q.mode&J4)try{L7(),n5(J6,Q,Q.return)}finally{O7(Q)}else n5(J6,Q,Q.return);break}case _:{RQ(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")l2(Q,Q.return,Z);break}case w:{RQ(Q,Q.return);break}case p:{var J=Q.memoizedState!==null;if(J){HK(z);continue}break}}if(X!==null)X.return=Q,c0=X;else HK(z)}}function HK(z){while(c0!==null){var Q=c0;if(Q===z){c0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,c0=X;return}c0=Q.return}}function gF(z){while(c0!==null){var Q=c0,X=Q.child;if(Q.tag===p){var Z=Q.memoizedState!==null;if(Z){GK(z);continue}}if(X!==null)X.return=Q,c0=X;else GK(z)}}function GK(z){while(c0!==null){var Q=c0;u4(Q);try{kF(Q)}catch(Z){R4(Q,Q.return,Z)}if(_6(),Q===z){c0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,c0=X;return}c0=Q.return}}function EF(z,Q,X,Z){c0=Q,xF(Q,z,X,Z)}function xF(z,Q,X,Z){while(c0!==null){var J=c0,$=J.child;if((J.subtreeFlags&Ez)!==q1&&$!==null)$.return=J,c0=$;else jF(z,Q,X,Z)}}function jF(z,Q,X,Z){while(c0!==null){var J=c0;if((J.flags&E5)!==q1){u4(J);try{pF(Q,J,X,Z)}catch(H){R4(J,J.return,H)}_6()}if(J===z){c0=null;return}var $=J.sibling;if($!==null){$.return=J.return,c0=$;return}c0=J.return}}function pF(z,Q,X,Z){switch(Q.tag){case L:case C:case c:{if(Q.mode&J4){W2();try{w8(T6|Z6,Q)}finally{K2(Q)}}else w8(T6|Z6,Q);break}}}function cF(z){c0=z,dF()}function dF(){while(c0!==null){var z=c0,Q=z.child;if((c0.flags&E8)!==q1){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var J=X[Z];c0=J,oF(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)}}}c0=z}}if((z.subtreeFlags&Ez)!==q1&&Q!==null)Q.return=z,c0=Q;else lF()}}function lF(){while(c0!==null){var z=c0;if((z.flags&E5)!==q1)u4(z),iF(z),_6();var Q=z.sibling;if(Q!==null){Q.return=z.return,c0=Q;return}c0=z.return}}function iF(z){switch(z.tag){case L:case C:case c:{if(z.mode&J4)W2(),n5(T6|Z6,z,z.return),K2(z);else n5(T6|Z6,z,z.return);break}}}function oF(z,Q){while(c0!==null){var X=c0;u4(X),nF(X,Q),_6();var Z=X.child;if(Z!==null)Z.return=X,c0=Z;else aF(z)}}function aF(z){while(c0!==null){var Q=c0,X=Q.sibling,Z=Q.return;if(zK(Q),Q===z){c0=null;return}if(X!==null){X.return=Z,c0=X;return}c0=Z}}function nF(z,Q){switch(z.tag){case L:case C:case c:{if(z.mode&J4)W2(),n5(T6,z,Q),K2(z);else n5(T6,z,Q);break}}}function rF(z){switch(z.tag){case L:case C:case c:{try{w8(J6|Z6,z)}catch(X){R4(z,z.return,X)}break}case _:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){R4(z,z.return,X)}break}}}function tF(z){switch(z.tag){case L:case C:case c:{try{w8(T6|Z6,z)}catch(Q){R4(z,z.return,Q)}break}}}function sF(z){switch(z.tag){case L:case C:case c:{try{n5(J6|Z6,z,z.return)}catch(X){R4(z,z.return,X)}break}case _:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")l2(z,z.return,Q);break}}}function eF(z){switch(z.tag){case L:case C:case c:try{n5(T6|Z6,z,z.return)}catch(Q){R4(z,z.return,Q)}}}var zM=0,QM=1,XM=2,ZM=3,JM=4;if(typeof Symbol==="function"&&Symbol.for){var WZ=Symbol.for;zM=WZ("selector.component"),QM=WZ("selector.has_pseudo_class"),XM=WZ("selector.role"),ZM=WZ("selector.test_id"),JM=WZ("selector.text")}var YM=[];function $M(){YM.forEach(function(z){return z()})}var HM=Y.ReactCurrentActQueue;function GM(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function qK(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&HM.current!==null)q("The current testing environment is not configured to support act(...)");return z}}var qM=Math.ceil,n2=Y.ReactCurrentDispatcher,r2=Y.ReactCurrentOwner,S6=Y.ReactCurrentBatchConfig,s5=Y.ReactCurrentActQueue,H6=0,BK=1,f6=2,v5=4,j7=0,OZ=1,qz=2,jY=3,LZ=4,UK=5,t2=6,x1=H6,r6=null,g4=null,G6=R0,N7=R0,s2=U8(R0),q6=j7,_Z=null,e2=R0,pY=R0,NZ=R0,cY=R0,RZ=null,$5=null,zG=0,KK=500,WK=1/0,BM=500,p7=null;function bZ(){WK=N6()+BM}function OK(){return WK}var dY=!1,QG=null,bQ=null,Bz=!1,M8=null,wZ=R0,XG=[],ZG=null,UM=50,FZ=0,JG=null,YG=!1,lY=!1,KM=50,wQ=0,iY=null,MZ=A4,oY=R0,LK=!1;function aY(){return r6}function t6(){if((x1&(f6|v5))!==H6)return N6();if(MZ!==A4)return MZ;return MZ=N6(),MZ}function P8(z){var Q=z.mode;if((Q&E1)===H1)return _1;else if((x1&f6)!==H6&&G6!==R0)return OX(G6);var X=Zw()!==Xw;if(X){if(S6.transition!==null){var Z=S6.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(oY===b6)oY=a9();return oY}var J=j5();if(J!==b6)return J;var $=jR();return $}function WM(z){var Q=z.mode;if((Q&E1)===H1)return _1;return U_()}function B6(z,Q,X,Z){if(uM(),LK)q("useInsertionEffect must not schedule updates.");if(YG)lY=!0;if(LX(z,X,Z),(x1&f6)!==R0&&z===r6)xM(Q);else{if(x5)t9(z,Q,X);if(jM(Q),z===r6){if((x1&f6)===H6)NZ=T1(NZ,X);if(q6===LZ)A8(z,G6)}if(H5(z,Z),X===_1&&x1===H6&&(Q.mode&E1)===H1&&!s5.isBatchingLegacy)bZ(),OB()}}function OM(z,Q,X){var Z=z.current;Z.lanes=Q,LX(z,Q,X),H5(z,X)}function LM(z){return(x1&f6)!==H6}function H5(z,Q){var X=z.callbackNode;Y_(z,Q);var Z=KJ(z,z===r6?G6:R0);if(Z===R0){if(X!==null)fK(X);z.callbackNode=null,z.callbackPriority=b6;return}var J=a8(Z),$=z.callbackPriority;if($===J&&!(s5.current!==null&&X!==KG)){if(X==null&&$!==_1)q("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)fK(X);var H;if(J===_1){if(z.tag===K8){if(s5.isBatchingLegacy!==null)s5.didScheduleLegacyUpdate=!0;Eb(RK.bind(null,z))}else WB(RK.bind(null,z));if(s5.current!==null)s5.current.push(W8);else cR(function(){if((x1&(f6|v5))===H6)W8()});H=null}else{var B;switch(zq(Z)){case O5:B=GJ;break;case h7:B=e3;break;case y7:B=d8;break;case _J:B=z$;break;default:B=d8;break}H=WG(B,_K.bind(null,z))}z.callbackPriority=J,z.callbackNode=H}function _K(z,Q){if(vw(),MZ=A4,oY=R0,(x1&(f6|v5))!==H6)throw Error("Should not already be working.");var X=z.callbackNode,Z=d7();if(Z){if(z.callbackNode!==X)return null}var J=KJ(z,z===r6?G6:R0);if(J===R0)return null;var $=!WJ(z,J)&&!B_(z,J)&&!Q,H=$?IM(z,J):rY(z,J);if(H!==j7){if(H===qz){var B=M$(z);if(B!==R0)J=B,H=$G(z,B)}if(H===OZ){var K=_Z;throw Uz(z,R0),A8(z,J),H5(z,N6()),K}if(H===t2)A8(z,J);else{var R=!WJ(z,J),A=z.current.alternate;if(R&&!NM(A)){if(H=rY(z,J),H===qz){var x=M$(z);if(x!==R0)J=x,H=$G(z,x)}if(H===OZ){var E=_Z;throw Uz(z,R0),A8(z,J),H5(z,N6()),E}}z.finishedWork=A,z.finishedLanes=J,_M(z,H,J)}}if(H5(z,N6()),z.callbackNode===X)return _K.bind(null,z);return null}function $G(z,Q){var X=RZ;if(NJ(z)){var Z=Uz(z,Q);Z.flags|=k7,hb(z.containerInfo)}var J=rY(z,Q);if(J!==qz){var $=$5;if($5=X,$!==null)NK($)}return J}function NK(z){if($5===null)$5=z;else $5.push.apply($5,z)}function _M(z,Q,X){switch(Q){case j7:case OZ:throw Error("Root did not complete. This is a bug in React.");case qz:{Kz(z,$5,p7);break}case jY:{if(A8(z,X),i9(X)&&!hK()){var Z=zG+KK-N6();if(Z>10){var J=KJ(z,R0);if(J!==R0)break;var $=z.suspendedLanes;if(!dz($,X)){var H=t6();r9(z,$);break}z.timeoutHandle=XH(Kz.bind(null,z,$5,p7),Z);break}}Kz(z,$5,p7);break}case LZ:{if(A8(z,X),q_(X))break;if(!hK()){var B=Z_(z,X),K=B,R=N6()-K,A=mM(R)-R;if(A>10){z.timeoutHandle=XH(Kz.bind(null,z,$5,p7),A);break}}Kz(z,$5,p7);break}case UK:{Kz(z,$5,p7);break}default:throw Error("Unknown root exit status.")}}function NM(z){var Q=z;while(!0){if(Q.flags&$J){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(!_5(H(),B))return!1}catch(R){return!1}}}}var K=Q.child;if(Q.subtreeFlags&$J&&K!==null){K.return=Q,Q=K;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 A8(z,Q){Q=OJ(Q,cY),Q=OJ(Q,NZ),W_(z,Q)}function RK(z){if(Cw(),(x1&(f6|v5))!==H6)throw Error("Should not already be working.");d7();var Q=KJ(z,R0);if(!W5(Q,_1))return H5(z,N6()),null;var X=rY(z,Q);if(z.tag!==K8&&X===qz){var Z=M$(z);if(Z!==R0)Q=Z,X=$G(z,Z)}if(X===OZ){var J=_Z;throw Uz(z,R0),A8(z,Q),H5(z,N6()),J}if(X===t2)throw Error("Root did not complete. This is a bug in React.");var $=z.current.alternate;return z.finishedWork=$,z.finishedLanes=Q,Kz(z,$5,p7),H5(z,N6()),null}function RM(z,Q){if(Q!==R0){if(T$(z,T1(Q,_1)),H5(z,N6()),(x1&(f6|v5))===H6)bZ(),W8()}}function HG(z,Q){var X=x1;x1|=BK;try{return z(Q)}finally{if(x1=X,x1===H6&&!s5.isBatchingLegacy)bZ(),OB()}}function bM(z,Q,X,Z,J){var $=j5(),H=S6.transition;try{return S6.transition=null,w6(O5),z(Q,X,Z,J)}finally{if(w6($),S6.transition=H,x1===H6)bZ()}}function c7(z){if(M8!==null&&M8.tag===K8&&(x1&(f6|v5))===H6)d7();var Q=x1;x1|=BK;var X=S6.transition,Z=j5();try{if(S6.transition=null,w6(O5),z)return z();else return}finally{if(w6(Z),S6.transition=X,x1=Q,(x1&(f6|v5))===H6)W8()}}function bK(){return(x1&(f6|v5))!==H6}function nY(z,Q){x6(s2,N7,z),N7=T1(N7,Q),e2=T1(e2,Q)}function GG(z){N7=s2.current,E6(s2,z)}function Uz(z,Q){z.finishedWork=null,z.finishedLanes=R0;var X=z.timeoutHandle;if(X!==ZH)z.timeoutHandle=ZH,pR(X);if(g4!==null){var Z=g4.return;while(Z!==null){var J=Z.alternate;oU(J,Z),Z=Z.return}}r6=z;var $=Wz(z.current,null);return g4=$,G6=N7=e2=Q,q6=j7,_Z=null,pY=R0,NZ=R0,cY=R0,RZ=null,$5=null,Bw(),d5.discardPendingWarnings(),$}function wK(z,Q){do{var X=g4;try{if(ZY(),cB(),_6(),r2.current=null,X===null||X.return===null){q6=OZ,_Z=Q,g4=null;return}if(S0&&X.mode&J4)VY(X,!0);if(A0)if(xz(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;lL(X,Z,G6)}else dL(X,Q,G6);gw(z,X.return,X,Q,G6),AK(X)}catch(J){if(Q=J,g4===X&&X!==null)X=X.return,g4=X;else X=g4;continue}return}while(!0)}function FK(){var z=n2.current;if(n2.current=CY,z===null)return CY;else return z}function MK(z){n2.current=z}function wM(){zG=N6()}function PZ(z){pY=T1(z,pY)}function FM(){if(q6===j7)q6=jY}function qG(){if(q6===j7||q6===jY||q6===qz)q6=LZ;if(r6!==null&&(P$(pY)||P$(NZ)))A8(r6,G6)}function MM(z){if(q6!==LZ)q6=qz;if(RZ===null)RZ=[z];else RZ.push(z)}function PM(){return q6===j7}function rY(z,Q){var X=x1;x1|=f6;var Z=FK();if(r6!==z||G6!==Q){if(x5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,G6),J.clear();s9(z,Q)}p7=e9(),Uz(z,Q)}j9(Q);do try{AM();break}catch($){wK(z,$)}while(!0);if(ZY(),x1=X,MK(Z),g4!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return p9(),r6=null,G6=R0,q6}function AM(){while(g4!==null)PK(g4)}function IM(z,Q){var X=x1;x1|=f6;var Z=FK();if(r6!==z||G6!==Q){if(x5){var J=z.memoizedUpdaters;if(J.size>0)AZ(z,G6),J.clear();s9(z,Q)}p7=e9(),bZ(),Uz(z,Q)}j9(Q);do try{TM();break}catch($){wK(z,$)}while(!0);if(ZY(),MK(Z),x1=X,g4!==null)return rL(),j7;else return p9(),r6=null,G6=R0,q6}function TM(){while(g4!==null&&!AL())PK(g4)}function PK(z){var Q=z.alternate;u4(z);var X;if((z.mode&J4)!==H1)U2(z),X=BG(Q,z,N7),VY(z,!0);else X=BG(Q,z,N7);if(_6(),z.memoizedProps=z.pendingProps,X===null)AK(z);else g4=X;r2.current=null}function AK(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&$X)===q1){u4(Q);var J=void 0;if((Q.mode&J4)===H1)J=iU(X,Q,N7);else U2(Q),J=iU(X,Q,N7),VY(Q,!1);if(_6(),J!==null){g4=J;return}}else{var $=_F(X,Q);if($!==null){$.flags&=RL,g4=$;return}if((Q.mode&J4)!==H1){VY(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=q1,Z.deletions=null;else{q6=t2,g4=null;return}}var K=Q.sibling;if(K!==null){g4=K;return}Q=Z,g4=Q}while(Q!==null);if(q6===j7)q6=UK}function Kz(z,Q,X){var Z=j5(),J=S6.transition;try{S6.transition=null,w6(O5),kM(z,Q,X,Z)}finally{S6.transition=J,w6(Z)}return null}function kM(z,Q,X,Z){do d7();while(M8!==null);if(gM(),(x1&(f6|v5))!==H6)throw Error("Should not already be working.");var{finishedWork:J,finishedLanes:$}=z;if(uL($),J===null)return g9(),null;else if($===R0)q("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=R0,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=b6;var H=T1(J.lanes,J.childLanes);if(O_(z,H),z===r6)r6=null,g4=null,G6=R0;if((J.subtreeFlags&Ez)!==q1||(J.flags&Ez)!==q1){if(!Bz)Bz=!0,ZG=X,WG(d8,function(){return d7(),null})}var B=(J.subtreeFlags&(t3|s3|HX|Ez))!==q1,K=(J.flags&(t3|s3|HX|Ez))!==q1;if(B||K){var R=S6.transition;S6.transition=null;var A=j5();w6(O5);var x=x1;x1|=v5,r2.current=null;var E=FF(z,J);OU(),DF(z,J,$),DR(z.containerInfo),z.current=J,iL($),mF(J,z,$),oL(),IL(),x1=x,w6(A),S6.transition=R}else z.current=J,OU();var e=Bz;if(Bz)Bz=!1,M8=z,wZ=$;else wQ=0,iY=null;if(H=z.pendingLanes,H===R0)bQ=null;if(!e)vK(z.current,!1);if(hL(J.stateNode,Z),x5)z.memoizedUpdaters.clear();if($M(),H5(z,N6()),Q!==null){var z0=z.onRecoverableError;for(var Y0=0;Y0<Q.length;Y0++){var y0=Q[Y0],z1=y0.stack,a0=y0.digest;z0(y0.value,{componentStack:z1,digest:a0})}}if(dY){dY=!1;var y1=QG;throw QG=null,y1}if(W5(wZ,_1)&&z.tag!==K8)d7();if(H=z.pendingLanes,W5(H,_1))if(kw(),z===JG)FZ++;else FZ=0,JG=z;else FZ=0;return W8(),g9(),null}function d7(){if(M8!==null){var z=zq(wZ),Q=R_(y7,z),X=S6.transition,Z=j5();try{return S6.transition=null,w6(Q),CM()}finally{w6(Z),S6.transition=X}}return!1}function vM(z){if(XG.push(z),!Bz)Bz=!0,WG(d8,function(){return d7(),null})}function CM(){if(M8===null)return!1;var z=ZG;ZG=null;var Q=M8,X=wZ;if(M8=null,wZ=R0,(x1&(f6|v5))!==H6)throw Error("Cannot flush passive effects while already rendering.");YG=!0,lY=!1,aL(X);var Z=x1;x1|=v5,cF(Q.current),EF(Q,Q.current,X,z);{var J=XG;XG=[];for(var $=0;$<J.length;$++){var H=J[$];IF(Q,H)}}nL(),vK(Q.current,!0),x1=Z,W8();{if(lY)if(Q===iY)wQ++;else wQ=0,iY=Q;else wQ=0;YG=!1,lY=!1}yL(Q);{var B=Q.current.stateNode;B.effectDuration=0,B.passiveEffectDuration=0}return!0}function IK(z){return bQ!==null&&bQ.has(z)}function SM(z){if(bQ===null)bQ=new Set([z]);else bQ.add(z)}function fM(z){if(!dY)dY=!0,QG=z}var hM=fM;function TK(z,Q,X){var Z=Hz(X,Q),J=MU(z,Z,_1),$=L8(z,J,_1),H=t6();if($!==null)LX($,_1,H),H5($,H)}function R4(z,Q,X){if(RF(X),IZ(!1),z.tag===T){TK(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===T){TK(Z,z,X);return}else if(Z.tag===_){var{type:J,stateNode:$}=Z;if(typeof J.getDerivedStateFromError==="function"||typeof $.componentDidCatch==="function"&&!IK($)){var H=Hz(X,z),B=C2(Z,H,_1),K=L8(Z,B,_1),R=t6();if(K!==null)LX(K,_1,R),H5(K,R);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
|
-
|
|
117
|
-
Error message:
|
|
118
|
-
|
|
119
|
-
%s`,X)}function yM(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var J=t6();if(r9(z,X),pM(z),r6===z&&dz(G6,X))if(q6===LZ||q6===jY&&i9(G6)&&N6()-zG<KK)Uz(z,R0);else cY=T1(cY,X);H5(z,J)}function kK(z,Q){if(Q===b6)Q=WM(z);var X=t6(),Z=J5(z,Q);if(Z!==null)LX(Z,Q,X),H5(Z,X)}function VM(z){var Q=z.memoizedState,X=b6;if(Q!==null)X=Q.retryLane;kK(z,X)}function DM(z,Q){var X=b6,Z;switch(z.tag){case u:Z=z.stateNode;var J=z.memoizedState;if(J!==null)X=J.retryLane;break;case t: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);kK(z,X)}function mM(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:qM(z/1960)*1960}function uM(){if(FZ>UM)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(wQ>KM)wQ=0,iY=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 gM(){d5.flushLegacyContextWarning(),d5.flushPendingUnsafeLifecycleWarnings()}function vK(z,Q){{if(u4(z),tY(z,C7,sF),Q)tY(z,HJ,eF);if(tY(z,C7,rF),Q)tY(z,HJ,tF);_6()}}function tY(z,Q,X){{var Z=z,J=null;while(Z!==null){var $=Z.subtreeFlags&Q;if(Z!==J&&Z.child!==null&&$!==q1)Z=Z.child;else{if((Z.flags&Q)!==q1)X(Z);if(Z.sibling!==null)Z=Z.sibling;else Z=J=Z.return}}}}var sY=null;function CK(z){{if((x1&f6)!==H6)return;if(!(z.mode&E1))return;var Q=z.tag;if(Q!==k&&Q!==T&&Q!==_&&Q!==L&&Q!==C&&Q!==a&&Q!==c)return;var X=P1(z)||"ReactComponent";if(sY!==null){if(sY.has(X))return;sY.add(X)}else sY=new Set([X]);var Z=g6;try{u4(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)u4(z);else _6()}}}var BG;{var EM=null;BG=function(z,Q,X){var Z=uK(EM,Q);try{return jU(z,Q,X)}catch($){if(ob()||$!==null&&typeof $==="object"&&typeof $.then==="function")throw $;if(ZY(),cB(),oU(z,Q),uK(Q,Z),Q.mode&J4)U2(Q);if(l3(null,jU,null,z,Q,X),OL()){var J=i3();if(typeof J==="object"&&J!==null&&J._suppressLogging&&typeof $==="object"&&$!==null&&!$._suppressLogging)$._suppressLogging=!0}throw $}}}var SK=!1,UG;UG=new Set;function xM(z){if(D8&&!Aw())switch(z.tag){case L:case C:case c:{var Q=g4&&P1(g4)||"Unknown",X=Q;if(!UG.has(X)){UG.add(X);var Z=P1(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(!SK)q("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),SK=!0;break}}}function AZ(z,Q){if(x5){var X=z.memoizedUpdaters;X.forEach(function(Z){t9(z,Z,Q)})}}var KG={};function WG(z,Q){{var X=s5.current;if(X!==null)return X.push(Q),KG;else return u9(z,Q)}}function fK(z){if(z===KG)return;return PL(z)}function hK(){return s5.current!==null}function jM(z){{if(z.mode&E1){if(!qK())return}else{if(!GM())return;if(x1!==H6)return;if(z.tag!==L&&z.tag!==C&&z.tag!==c)return}if(s5.current===null){var Q=g6;try{u4(z),q(`An update to %s inside a test was not wrapped in act(...).
|
|
120
|
-
|
|
121
|
-
When testing, code that causes React state updates should be wrapped into act(...):
|
|
122
|
-
|
|
123
|
-
act(() => {
|
|
124
|
-
/* fire events that update state */
|
|
125
|
-
});
|
|
126
|
-
/* assert on the output */
|
|
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`,P1(z))}finally{if(Q)u4(z);else _6()}}}}function pM(z){if(z.tag!==K8&&qK()&&s5.current===null)q(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
129
|
-
|
|
130
|
-
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
131
|
-
|
|
132
|
-
act(() => {
|
|
133
|
-
/* finish loading suspended data */
|
|
134
|
-
});
|
|
135
|
-
/* assert on the output */
|
|
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){LK=z}var C5=null,FQ=null,cM=function(z){C5=z};function MQ(z){{if(C5===null)return z;var Q=C5(z);if(Q===void 0)return z;return Q.current}}function OG(z){return MQ(z)}function LG(z){{if(C5===null)return z;var Q=C5(z);if(Q===void 0){if(z!==null&&z!==void 0&&typeof z.render==="function"){var X=MQ(z.render);if(z.render!==X){var Z={$$typeof:j,render:X};if(z.displayName!==void 0)Z.displayName=z.displayName;return Z}}return z}return Q.current}}function yK(z,Q){{if(C5===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 L:{if(typeof Z==="function")J=!0;else if($===o0)J=!0;break}case C:{if($===j)J=!0;else if($===o0)J=!0;break}case a:case c:{if($===f0)J=!0;else if($===o0)J=!0;break}default:return!1}if(J){var H=C5(X);if(H!==void 0&&H===C5(Z))return!0}return!1}}function VK(z){{if(C5===null)return;if(typeof WeakSet!=="function")return;if(FQ===null)FQ=new WeakSet;FQ.add(z)}}var dM=function(z,Q){{if(C5===null)return;var{staleFamilies:X,updatedFamilies:Z}=Q;d7(),c7(function(){_G(z.current,Z,X)})}},lM=function(z,Q){{if(z.context!==N5)return;d7(),c7(function(){TZ(Q,z,null,null)})}};function _G(z,Q,X){{var{alternate:Z,child:J,sibling:$,tag:H,type:B}=z,K=null;switch(H){case L:case c:case _:K=B;break;case C:K=B.render;break}if(C5===null)throw Error("Expected resolveFamily to be set during hot reload.");var R=!1,A=!1;if(K!==null){var x=C5(K);if(x!==void 0){if(X.has(x))A=!0;else if(Q.has(x))if(H===_)A=!0;else R=!0}}if(FQ!==null){if(FQ.has(z)||Z!==null&&FQ.has(Z))A=!0}if(A)z._debugNeedsRemount=!0;if(A||R){var E=J5(z,_1);if(E!==null)B6(E,z,_1,A4)}if(J!==null&&!A)_G(J,Q,X);if($!==null)_G($,Q,X)}}var iM=function(z,Q){{var X=new Set,Z=new Set(Q.map(function(J){return J.current}));return NG(z.current,Z,X),X}};function NG(z,Q,X){{var{child:Z,sibling:J,tag:$,type:H}=z,B=null;switch($){case L:case c:case _:B=H;break;case C:B=H.render;break}var K=!1;if(B!==null){if(Q.has(B))K=!0}if(K)oM(z,X);else if(Z!==null)NG(Z,Q,X);if(J!==null)NG(J,Q,X)}}function oM(z,Q){{var X=aM(z,Q);if(X)return;var Z=z;while(!0){switch(Z.tag){case w:Q.add(Z.stateNode);return;case F:Q.add(Z.stateNode.containerInfo);return;case T:Q.add(Z.stateNode.containerInfo);return}if(Z.return===null)throw Error("Expected to reach root first.");Z=Z.return}}}function aM(z,Q){{var X=z,Z=!1;while(!0){if(X.tag===w)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 RG;{RG=!1;try{var DK=Object.preventExtensions({})}catch(z){RG=!0}}function nM(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=q1,this.subtreeFlags=q1,this.deletions=null,this.lanes=R0,this.childLanes=R0,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,!RG&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var R5=function(z,Q,X,Z){return new nM(z,Q,X,Z)};function bG(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function rM(z){return typeof z==="function"&&!bG(z)&&z.defaultProps===void 0}function tM(z){if(typeof z==="function")return bG(z)?_:L;else if(z!==void 0&&z!==null){var Q=z.$$typeof;if(Q===j)return C;if(Q===f0)return a}return k}function Wz(z,Q){var X=z.alternate;if(X===null)X=R5(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=q1,X.subtreeFlags=q1,X.deletions=null,X.actualDuration=0,X.actualStartTime=-1;X.flags=z.flags&S7,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 k:case L:case c:X.type=MQ(z.type);break;case _:X.type=OG(z.type);break;case C:X.type=LG(z.type);break}return X}function sM(z,Q){z.flags&=S7|e4;var X=z.alternate;if(X===null)z.childLanes=R0,z.lanes=Q,z.child=null,z.subtreeFlags=q1,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=q1,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 eM(z,Q,X){var Z;if(z===oJ){if(Z=E1,Q===!0)Z|=c4,Z|=H7}else Z=H1;if(x5)Z|=J4;return R5(T,null,null,Z)}function wG(z,Q,X,Z,J,$){var H=k,B=z;if(typeof z==="function")if(bG(z))H=_,B=OG(B);else B=MQ(B);else if(typeof z==="string")H=w;else z:switch(z){case l1:return I8(X.children,J,$,Q);case f:if(H=v,J|=c4,(J&E1)!==H1)J|=H7;break;case H0:return zP(X,J,$,Q);case W0:return QP(X,J,$,Q);case P0:return XP(X,J,$,Q);case k0:return mK(X,J,$,Q);case r0:case x0:case m1:case Q4:case O0:default:{if(typeof z==="object"&&z!==null)switch(z.$$typeof){case N0:H=D;break z;case I:H=m;break z;case j:H=C,B=LG(B);break z;case f0:H=a;break z;case o0:H=g,B=null;break z}var K="";{if(z===void 0||typeof z==="object"&&z!==null&&Object.keys(z).length===0)K+=" 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 R=Z?P1(Z):null;if(R)K+=`
|
|
138
|
-
|
|
139
|
-
Check the render method of \``+R+"`."}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)+"."+K))}}var A=R5(H,X,Q,J);return A.elementType=z,A.type=B,A.lanes=$,A._debugOwner=Z,A}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 I8(z,Q,X,Z){var J=R5(M,z,Z,Q);return J.lanes=X,J}function zP(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=R5(V,z,Z,Q|J4);return J.elementType=H0,J.lanes=X,J.stateNode={effectDuration:0,passiveEffectDuration:0},J}function QP(z,Q,X,Z){var J=R5(u,z,Z,Q);return J.elementType=W0,J.lanes=X,J}function XP(z,Q,X,Z){var J=R5(t,z,Z,Q);return J.elementType=P0,J.lanes=X,J}function mK(z,Q,X,Z){var J=R5(p,z,Z,Q);J.elementType=k0,J.lanes=X;var $={isHidden:!1};return J.stateNode=$,J}function MG(z,Q,X){var Z=R5(b,z,null,Q);return Z.lanes=X,Z}function ZP(){var z=R5(w,null,null,H1);return z.elementType="DELETED",z}function JP(z){var Q=R5(o,null,null,H1);return Q.stateNode=z,Q}function PG(z,Q,X){var Z=z.children!==null?z.children:[],J=R5(F,Z,z.key,Q);return J.lanes=X,J.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},J}function uK(z,Q){if(z===null)z=R5(k,null,null,H1);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 YP(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=ZH,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=b6,this.eventTimes=I$(R0),this.expirationTimes=I$(A4),this.pendingLanes=R0,this.suspendedLanes=R0,this.pingedLanes=R0,this.expiredLanes=R0,this.mutableReadLanes=R0,this.finishedLanes=R0,this.entangledLanes=R0,this.entanglements=I$(R0),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 oJ:this._debugRootType=X?"hydrateRoot()":"createRoot()";break;case K8:this._debugRootType=X?"hydrate()":"render()";break}}function gK(z,Q,X,Z,J,$,H,B,K,R){var A=new YP(z,Q,X,B,K),x=eM(Q,$);A.current=x,x.stateNode=A;{var E={element:Z,isDehydrated:X,cache:null,transitions:null,pendingSuspenseBoundaries:null};x.memoizedState=E}return VH(x),A}var AG="18.3.1";function $P(z,Q,X){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return o4(Z),{$$typeof:U4,key:Z==null?null:""+Z,children:z,containerInfo:Q,implementation:X}}var IG,TG;IG=!1,TG={};function EK(z){if(!z)return N5;var Q=uz(z),X=gb(Q);if(Q.tag===_){var Z=Q.type;if(B7(Z))return UB(Q,Z,X)}return X}function HP(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=V9(X);if(J===null)return null;if(J.mode&c4){var $=P1(X)||"Component";if(!TG[$]){TG[$]=!0;var H=g6;try{if(u4(J),X.mode&c4)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)u4(H);else _6()}}}return J.stateNode}}function xK(z,Q,X,Z,J,$,H,B){var K=!1,R=null;return gK(z,Q,K,R,X,Z,J,$,H)}function jK(z,Q,X,Z,J,$,H,B,K,R){var A=!0,x=gK(X,Z,A,z,J,$,H,B,K);x.context=EK(null);var E=x.current,e=t6(),z0=P8(E),Y0=E7(e,z0);return Y0.callback=Q!==void 0&&Q!==null?Q:null,L8(E,Y0,z0),OM(x,z0,e),x}function TZ(z,Q,X,Z){fL(Q,z);var J=Q.current,$=t6(),H=P8(J);tL(H);var B=EK(X);if(Q.context===null)Q.context=B;else Q.pendingContext=B;if(D8&&g6!==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
|
-
|
|
141
|
-
Check the render method of %s.`,P1(g6)||"Unknown");var K=E7($,H);if(K.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);K.callback=Z}var R=L8(J,K,H);if(R!==null)B6(R,J,H,$),GY(R,J,H);return H}function eY(z){var Q=z.current;if(!Q.child)return null;switch(Q.child.tag){case w:return zH(Q.child.stateNode);default:return Q.child.stateNode}}function GP(z){switch(z.tag){case T:{var Q=z.stateNode;if(NJ(Q)){var X=$_(Q);RM(Q,X)}break}case u:{c7(function(){var J=J5(z,_1);if(J!==null){var $=t6();B6(J,z,_1,$)}});var Z=_1;kG(z,Z);break}}}function pK(z,Q){var X=z.memoizedState;if(X!==null&&X.dehydrated!==null)X.retryLane=K_(X.retryLane,Q)}function kG(z,Q){pK(z,Q);var X=z.alternate;if(X)pK(X,Q)}function qP(z){if(z.tag!==u)return;var Q=UX,X=J5(z,Q);if(X!==null){var Z=t6();B6(X,z,Q,Z)}kG(z,Q)}function BP(z){if(z.tag!==u)return;var Q=P8(z),X=J5(z,Q);if(X!==null){var Z=t6();B6(X,z,Q,Z)}kG(z,Q)}function cK(z){var Q=ML(z);if(Q===null)return null;return Q.stateNode}var dK=function(z){return null};function UP(z){return dK(z)}var lK=function(z){return!1};function KP(z){return lK(z)}var iK=null,oK=null,aK=null,nK=null,rK=null,tK=null,sK=null,eK=null,zW=null;{var QW=function(z,Q,X){var Z=Q[X],J=a1(z)?z.slice():v1({},z);if(X+1===Q.length){if(a1(J))J.splice(Z,1);else delete J[Z];return J}return J[Z]=QW(z[Z],Q,X+1),J},XW=function(z,Q){return QW(z,Q,0)},ZW=function(z,Q,X,Z){var J=Q[Z],$=a1(z)?z.slice():v1({},z);if(Z+1===Q.length){var H=X[Z];if($[H]=$[J],a1($))$.splice(J,1);else delete $[J]}else $[J]=ZW(z[J],Q,X,Z+1);return $},JW=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 ZW(z,Q,X,0)},YW=function(z,Q,X,Z){if(X>=Q.length)return Z;var J=Q[X],$=a1(z)?z.slice():v1({},z);return $[J]=YW(z[J],Q,X+1,Z),$},$W=function(z,Q,X){return YW(z,Q,0,X)},vG=function(z,Q){var X=z.memoizedState;while(X!==null&&Q>0)X=X.next,Q--;return X};iK=function(z,Q,X,Z){var J=vG(z,Q);if(J!==null){var $=$W(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=v1({},z.memoizedProps);var H=J5(z,_1);if(H!==null)B6(H,z,_1,A4)}},oK=function(z,Q,X){var Z=vG(z,Q);if(Z!==null){var J=XW(Z.memoizedState,X);Z.memoizedState=J,Z.baseState=J,z.memoizedProps=v1({},z.memoizedProps);var $=J5(z,_1);if($!==null)B6($,z,_1,A4)}},aK=function(z,Q,X,Z){var J=vG(z,Q);if(J!==null){var $=JW(J.memoizedState,X,Z);J.memoizedState=$,J.baseState=$,z.memoizedProps=v1({},z.memoizedProps);var H=J5(z,_1);if(H!==null)B6(H,z,_1,A4)}},nK=function(z,Q,X){if(z.pendingProps=$W(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=J5(z,_1);if(Z!==null)B6(Z,z,_1,A4)},rK=function(z,Q){if(z.pendingProps=XW(z.memoizedProps,Q),z.alternate)z.alternate.pendingProps=z.pendingProps;var X=J5(z,_1);if(X!==null)B6(X,z,_1,A4)},tK=function(z,Q,X){if(z.pendingProps=JW(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=J5(z,_1);if(Z!==null)B6(Z,z,_1,A4)},sK=function(z){var Q=J5(z,_1);if(Q!==null)B6(Q,z,_1,A4)},eK=function(z){dK=z},zW=function(z){lK=z}}function WP(z){var Q=V9(z);if(Q===null)return null;return Q.stateNode}function OP(z){return null}function LP(){return g6}function _P(z){var Q=z.findFiberByHostInstance,X=Y.ReactCurrentDispatcher;return SL({bundleType:z.bundleType,version:z.version,rendererPackageName:z.rendererPackageName,rendererConfig:z.rendererConfig,overrideHookState:iK,overrideHookStateDeletePath:oK,overrideHookStateRenamePath:aK,overrideProps:nK,overridePropsDeletePath:rK,overridePropsRenamePath:tK,setErrorHandler:eK,setSuspenseHandler:zW,scheduleUpdate:sK,currentDispatcherRef:X,findHostInstanceByFiber:WP,findFiberByHostInstance:Q||OP,findHostInstancesForRefresh:iM,scheduleRefresh:dM,scheduleRoot:lM,setRefreshHandler:cM,getCurrentFiber:LP,reconcilerVersion:AG})}var HW=typeof reportError==="function"?reportError:function(z){console.error(z)};function CG(z){this._internalRoot=z}z3.prototype.render=CG.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(Q3(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!==s4){var Z=cK(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)},z3.prototype.unmount=CG.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(bK())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.");c7(function(){TZ(null,z,null,null)}),YB(Q)}};function NP(z,Q){if(!Q3(z))throw Error("createRoot(...): Target container is not a DOM element.");GW(z);var X=!1,Z=!1,J="",$=HW,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===z4)q(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
142
|
-
|
|
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=xK(z,oJ,null,X,Z,J,$);xJ(B.current,z);var K=z.nodeType===s4?z.parentNode:z;return hX(K),new CG(B)}function z3(z){this._internalRoot=z}function RP(z){if(z)C_(z)}z3.prototype.unstable_scheduleHydration=RP;function bP(z,Q,X){if(!Q3(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(GW(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="",K=HW;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)K=X.onRecoverableError}var R=jK(Q,null,z,oJ,Z,$,H,B,K);if(xJ(R.current,z),hX(z),J)for(var A=0;A<J.length;A++){var x=J[A];bw(R,x)}return new z3(R)}function Q3(z){return!!(z&&(z.nodeType===X5||z.nodeType===T7||z.nodeType===V3||!_0))}function kZ(z){return!!(z&&(z.nodeType===X5||z.nodeType===T7||z.nodeType===V3||z.nodeType===s4&&z.nodeValue===" react-mount-point-unstable "))}function GW(z){{if(z.nodeType===X5&&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 wP=Y.ReactCurrentOwner,qW;qW=function(z){if(z._reactRootContainer&&z.nodeType!==s4){var Q=cK(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=SG(z),J=!!(Z&&B8(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===X5&&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 SG(z){if(!z)return null;if(z.nodeType===T7)return z.documentElement;else return z.firstChild}function BW(){}function FP(z,Q,X,Z,J){if(J){if(typeof Z==="function"){var $=Z;Z=function(){var E=eY(H);$.call(E)}}var H=jK(Q,Z,z,K8,null,!1,!1,"",BW);z._reactRootContainer=H,xJ(H.current,z);var B=z.nodeType===s4?z.parentNode:z;return hX(B),c7(),H}else{var K;while(K=z.lastChild)z.removeChild(K);if(typeof Z==="function"){var R=Z;Z=function(){var E=eY(A);R.call(E)}}var A=xK(z,K8,null,!1,!1,"",BW);z._reactRootContainer=A,xJ(A.current,z);var x=z.nodeType===s4?z.parentNode:z;return hX(x),c7(function(){TZ(Q,A,X,Z)}),A}}function MP(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 X3(z,Q,X,Z,J){qW(X),MP(J===void 0?null:J,"render");var $=X._reactRootContainer,H;if(!$)H=FP(X,Q,z,J,Z);else{if(H=$,typeof J==="function"){var B=J;J=function(){var K=eY(H);B.call(K)}}TZ(Q,H,z,J)}return eY(H)}var UW=!1;function PP(z){{if(!UW)UW=!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=wP.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.",d1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===X5)return z;return HP(z,"findDOMNode")}function AP(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 X3(null,z,Q,!0,X)}function IP(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 X3(null,z,Q,!1,X)}function TP(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||!LL(z))throw Error("parentComponent must be a valid React Component");return X3(z,Q,X,!1,Z)}var KW=!1;function kP(z){if(!KW)KW=!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=SG(z),Z=X&&!B8(X);if(Z)q("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return c7(function(){X3(null,null,z,!1,function(){z._reactRootContainer=null,YB(z)})}),!0}else{{var J=SG(z),$=!!(J&&B8(J)),H=z.nodeType===X5&&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(b_(GP),F_(qP),M_(BP),P_(j5),A_(__),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");JL(IR),HL(HG,bM,c7);function vP(z,Q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Q3(Q))throw Error("Target container is not a DOM element.");return $P(z,Q,null,X)}function CP(z,Q,X,Z){return TP(z,Q,X,Z)}var fG={usingClientEntryPoint:!1,Events:[B8,ez,jJ,M9,P9,HG]};function SP(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 NP(z,Q)}function fP(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 bP(z,Q,X)}function hP(z){if(bK())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 c7(z)}var yP=_P({findFiberByHostInstance:s8,bundleType:1,version:AG,rendererPackageName:"react-dom"});if(!yP&&h1&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var WW=window.location.protocol;if(/^(https?|file):$/.test(WW))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(WW==="file:"?`
|
|
145
|
-
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}}if(pP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fG,pP.createPortal=vP,pP.createRoot=SP,pP.findDOMNode=PP,pP.flushSync=hP,pP.hydrate=AP,pP.hydrateRoot=fP,pP.render=IP,pP.unmountComponentAtNode=kP,pP.unstable_batchedUpdates=HG,pP.unstable_renderSubtreeIntoContainer=CP,pP.version=AG,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var RW=Oz((vk,NW)=>{var cP=q0(_W());NW.exports=cP});var bW=Oz((dP)=>{var IQ=q0(RW());AQ=IQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dP.createRoot=function(Y,G){AQ.usingClientEntryPoint=!0;try{return IQ.createRoot(Y,G)}finally{AQ.usingClientEntryPoint=!1}},dP.hydrateRoot=function(Y,G,U){AQ.usingClientEntryPoint=!0;try{return IQ.hydrateRoot(Y,G,U)}finally{AQ.usingClientEntryPoint=!1}};var AQ});var Y1=Oz((lP)=>{var yG=q0(k1());(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"),N=Symbol.for("react.provider"),L=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),M=Symbol.iterator,v="@@iterator";function m(f){if(f===null||typeof f!=="object")return null;var H0=M&&f[M]||f[v];if(typeof H0==="function")return H0;return null}var D=yG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(f){{for(var H0=arguments.length,N0=Array(H0>1?H0-1:0),I=1;I<H0;I++)N0[I-1]=arguments[I];V("error",f,N0)}}function V(f,H0,N0){{var I=D.ReactDebugCurrentFrame,j=I.getStackAddendum();if(j!=="")H0+="%s",N0=N0.concat([j]);var W0=N0.map(function(P0){return String(P0)});W0.unshift("Warning: "+H0),Function.prototype.apply.call(console[f],console,W0)}}var u=!1,a=!1,c=!1,g=!1,Q0=!1,o;o=Symbol.for("react.module.reference");function t(f){if(typeof f==="string"||typeof f==="function")return!0;if(f===U||f===q||Q0||f===O||f===k||f===T||g||f===b||u||a||c)return!0;if(typeof f==="object"&&f!==null){if(f.$$typeof===w||f.$$typeof===F||f.$$typeof===N||f.$$typeof===L||f.$$typeof===_||f.$$typeof===o||f.getModuleId!==void 0)return!0}return!1}function l(f,H0,N0){var I=f.displayName;if(I)return I;var j=H0.displayName||H0.name||"";return j!==""?N0+"("+j+")":N0}function p(f){return f.displayName||"Context"}function i(f){if(f==null)return null;if(typeof f.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof f==="function")return f.displayName||f.name||null;if(typeof f==="string")return f;switch(f){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case k:return"Suspense";case T:return"SuspenseList"}if(typeof f==="object")switch(f.$$typeof){case L:var H0=f;return p(H0)+".Consumer";case N:var N0=f;return p(N0._context)+".Provider";case _:return l(f,f.render,"ForwardRef");case F:var I=f.displayName||null;if(I!==null)return I;return i(f.type)||"Memo";case w:{var j=f,W0=j._payload,P0=j._init;try{return i(P0(W0))}catch(f0){return null}}}return null}var Z0=Object.assign,T0=0,F0,X1,O1,X0,U0,_0,J0;function d(){}d.__reactDisabledLog=!0;function A0(){{if(T0===0){F0=console.log,X1=console.info,O1=console.warn,X0=console.error,U0=console.group,_0=console.groupCollapsed,J0=console.groupEnd;var f={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}T0++}}function S0(){{if(T0--,T0===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z0({},f,{value:F0}),info:Z0({},f,{value:X1}),warn:Z0({},f,{value:O1}),error:Z0({},f,{value:X0}),group:Z0({},f,{value:U0}),groupCollapsed:Z0({},f,{value:_0}),groupEnd:Z0({},f,{value:J0})})}if(T0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z1=D.ReactCurrentDispatcher,t0;function D0(f,H0,N0){{if(t0===void 0)try{throw Error()}catch(j){var I=j.stack.trim().match(/\n( *(at )?)/);t0=I&&I[1]||""}return`
|
|
146
|
-
`+t0+f}}var G1=!1,L0;{var n0=typeof WeakMap==="function"?WeakMap:Map;L0=new n0}function h1(f,H0){if(!f||G1)return"";{var N0=L0.get(f);if(N0!==void 0)return N0}var I;G1=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W0;W0=Z1.current,Z1.current=null,A0();try{if(H0){var P0=function(){throw Error()};if(Object.defineProperty(P0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(P0,[])}catch(Q4){I=Q4}Reflect.construct(f,[],P0)}else{try{P0.call()}catch(Q4){I=Q4}f.call(P0.prototype)}}else{try{throw Error()}catch(Q4){I=Q4}f()}}catch(Q4){if(Q4&&I&&typeof Q4.stack==="string"){var f0=Q4.stack.split(`
|
|
147
|
-
`),o0=I.stack.split(`
|
|
148
|
-
`),x0=f0.length-1,O0=o0.length-1;while(x0>=1&&O0>=0&&f0[x0]!==o0[O0])O0--;for(;x0>=1&&O0>=0;x0--,O0--)if(f0[x0]!==o0[O0]){if(x0!==1||O0!==1)do if(x0--,O0--,O0<0||f0[x0]!==o0[O0]){var k0=`
|
|
149
|
-
`+f0[x0].replace(" at new "," at ");if(f.displayName&&k0.includes("<anonymous>"))k0=k0.replace("<anonymous>",f.displayName);if(typeof f==="function")L0.set(f,k0);return k0}while(x0>=1&&O0>=0);break}}}finally{G1=!1,Z1.current=W0,S0(),Error.prepareStackTrace=j}var r0=f?f.displayName||f.name:"",m1=r0?D0(r0):"";if(typeof f==="function")L0.set(f,m1);return m1}function B4(f,H0,N0){return h1(f,!1)}function h4(f){var H0=f.prototype;return!!(H0&&H0.isReactComponent)}function j1(f,H0,N0){if(f==null)return"";if(typeof f==="function")return h1(f,h4(f));if(typeof f==="string")return D0(f);switch(f){case k:return D0("Suspense");case T:return D0("SuspenseList")}if(typeof f==="object")switch(f.$$typeof){case _:return B4(f.render);case F:return j1(f.type,H0,N0);case w:{var I=f,j=I._payload,W0=I._init;try{return j1(W0(j),H0,N0)}catch(P0){}}}return""}var W1=Object.prototype.hasOwnProperty,r4={},o4=D.ReactDebugCurrentFrame;function T4(f){if(f){var H0=f._owner,N0=j1(f.type,f._source,H0?H0.type:null);o4.setExtraStackFrame(N0)}else o4.setExtraStackFrame(null)}function y4(f,H0,N0,I,j){{var W0=Function.call.bind(W1);for(var P0 in f)if(W0(f,P0)){var f0=void 0;try{if(typeof f[P0]!=="function"){var o0=Error((I||"React class")+": "+N0+" type `"+P0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[P0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw o0.name="Invariant Violation",o0}f0=f[P0](H0,P0,I,N0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x0){f0=x0}if(f0&&!(f0 instanceof Error))T4(j),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).",I||"React class",N0,P0,typeof f0),T4(null);if(f0 instanceof Error&&!(f0.message in r4))r4[f0.message]=!0,T4(j),C("Failed %s type: %s",N0,f0.message),T4(null)}}}var m5=Array.isArray;function O4(f){return m5(f)}function F6(f){{var H0=typeof Symbol==="function"&&Symbol.toStringTag,N0=H0&&f[Symbol.toStringTag]||f.constructor.name||"Object";return N0}}function L4(f){try{return M6(f),!1}catch(H0){return!0}}function M6(f){return""+f}function M4(f){if(L4(f))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",F6(f)),M6(f)}var k4=D.ReactCurrentOwner,O6={key:!0,ref:!0,__self:!0,__source:!0},m6,j4,t4;t4={};function v0(f){if(W1.call(f,"ref")){var H0=Object.getOwnPropertyDescriptor(f,"ref").get;if(H0&&H0.isReactWarning)return!1}return f.ref!==void 0}function s0(f){if(W1.call(f,"key")){var H0=Object.getOwnPropertyDescriptor(f,"key").get;if(H0&&H0.isReactWarning)return!1}return f.key!==void 0}function $1(f,H0){if(typeof f.ref==="string"&&k4.current&&H0&&k4.current.stateNode!==H0){var N0=i(k4.current.type);if(!t4[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',i(k4.current.type),f.ref),t4[N0]=!0}}function p1(f,H0){{var N0=function(){if(!m6)m6=!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(f,"key",{get:N0,configurable:!0})}}function e1(f,H0){{var N0=function(){if(!j4)j4=!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(f,"ref",{get:N0,configurable:!0})}}var V4=function(f,H0,N0,I,j,W0,P0){var f0={$$typeof:Y,type:f,key:H0,ref:N0,props:P0,_owner:W0};if(f0._store={},Object.defineProperty(f0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(f0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.freeze)Object.freeze(f0.props),Object.freeze(f0);return f0};function G4(f,H0,N0,I,j){{var W0,P0={},f0=null,o0=null;if(N0!==void 0)M4(N0),f0=""+N0;if(s0(H0))M4(H0.key),f0=""+H0.key;if(v0(H0))o0=H0.ref,$1(H0,j);for(W0 in H0)if(W1.call(H0,W0)&&!O6.hasOwnProperty(W0))P0[W0]=H0[W0];if(f&&f.defaultProps){var x0=f.defaultProps;for(W0 in x0)if(P0[W0]===void 0)P0[W0]=x0[W0]}if(f0||o0){var O0=typeof f==="function"?f.displayName||f.name||"Unknown":f;if(f0)p1(P0,O0);if(o0)e1(P0,O0)}return V4(f,f0,o0,j,I,k4.current,P0)}}var{ReactCurrentOwner:a4,ReactDebugCurrentFrame:M1}=D;function b1(f){if(f){var H0=f._owner,N0=j1(f.type,f._source,H0?H0.type:null);M1.setExtraStackFrame(N0)}else M1.setExtraStackFrame(null)}var d6=!1;function L6(f){return typeof f==="object"&&f!==null&&f.$$typeof===Y}function l6(){{if(a4.current){var f=i(a4.current.type);if(f)return`
|
|
150
|
-
|
|
151
|
-
Check the render method of \``+f+"`."}return""}}function X7(f){{if(f!==void 0){var H0=f.fileName.replace(/^.*[\\\/]/,""),N0=f.lineNumber;return`
|
|
152
|
-
|
|
153
|
-
Check your code at `+H0+":"+N0+"."}return""}}var u5={};function Z7(f){{var H0=l6();if(!H0){var N0=typeof f==="string"?f:f.displayName||f.name;if(N0)H0=`
|
|
154
|
-
|
|
155
|
-
Check the top-level render call using <`+N0+">."}return H0}}function F5(f,H0){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var N0=Z7(H0);if(u5[N0])return;u5[N0]=!0;var I="";if(f&&f._owner&&f._owner!==a4.current)I=" It was passed a child from "+i(f._owner.type)+".";b1(f),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,I),b1(null)}}function u6(f,H0){{if(typeof f!=="object")return;if(O4(f))for(var N0=0;N0<f.length;N0++){var I=f[N0];if(L6(I))F5(I,H0)}else if(L6(f)){if(f._store)f._store.validated=!0}else if(f){var j=m(f);if(typeof j==="function"){if(j!==f.entries){var W0=j.call(f),P0;while(!(P0=W0.next()).done)if(L6(P0.value))F5(P0.value,H0)}}}}}function g5(f){{var H0=f.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===F))N0=H0.propTypes;else return;if(N0){var I=i(H0);y4(N0,f.props,"prop",I,f)}else if(H0.PropTypes!==void 0&&!d6){d6=!0;var j=i(H0);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",j||"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 D1(f){{var H0=Object.keys(f.props);for(var N0=0;N0<H0.length;N0++){var I=H0[N0];if(I!=="children"&&I!=="key"){b1(f),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),b1(null);break}}if(f.ref!==null)b1(f),C("Invalid attribute `ref` supplied to `React.Fragment`."),b1(null)}}var z4={};function U4(f,H0,N0,I,j,W0){{var P0=t(f);if(!P0){var f0="";if(f===void 0||typeof f==="object"&&f!==null&&Object.keys(f).length===0)f0+=" 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 o0=X7(j);if(o0)f0+=o0;else f0+=l6();var x0;if(f===null)x0="null";else if(O4(f))x0="array";else if(f!==void 0&&f.$$typeof===Y)x0="<"+(i(f.type)||"Unknown")+" />",f0=" Did you accidentally export a JSX literal instead of a component?";else x0=typeof f;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x0,f0)}var O0=G4(f,H0,N0,j,W0);if(O0==null)return O0;if(P0){var k0=H0.children;if(k0!==void 0)if(I)if(O4(k0)){for(var r0=0;r0<k0.length;r0++)u6(k0[r0],f);if(Object.freeze)Object.freeze(k0)}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 u6(k0,f)}if(W1.call(H0,"key")){var m1=i(f),Q4=Object.keys(H0).filter(function(P4){return P4!=="key"}),i6=Q4.length>0?"{key: someKey, "+Q4.join(": ..., ")+": ...}":"{key: someKey}";if(!z4[m1+i6]){var B5=Q4.length>0?"{"+Q4.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
156
|
-
let props = %s;
|
|
157
|
-
<%s {...props} />
|
|
158
|
-
React keys must be passed directly to JSX without using spread:
|
|
159
|
-
let props = %s;
|
|
160
|
-
<%s key={someKey} {...props} />`,i6,m1,B5,m1),z4[m1+i6]=!0}}if(f===U)D1(O0);else g5(O0);return O0}}var l1=U4;lP.Fragment=U,lP.jsxDEV=l1})()});var b4=Oz((kA)=>{var dG=q0(k1());(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"),N=Symbol.for("react.provider"),L=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),M=Symbol.iterator,v="@@iterator";function m(I){if(I===null||typeof I!=="object")return null;var j=M&&I[M]||I[v];if(typeof j==="function")return j;return null}var D=dG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(I){{for(var j=arguments.length,W0=Array(j>1?j-1:0),P0=1;P0<j;P0++)W0[P0-1]=arguments[P0];V("error",I,W0)}}function V(I,j,W0){{var P0=D.ReactDebugCurrentFrame,f0=P0.getStackAddendum();if(f0!=="")j+="%s",W0=W0.concat([f0]);var o0=W0.map(function(x0){return String(x0)});o0.unshift("Warning: "+j),Function.prototype.apply.call(console[I],console,o0)}}var u=!1,a=!1,c=!1,g=!1,Q0=!1,o;o=Symbol.for("react.module.reference");function t(I){if(typeof I==="string"||typeof I==="function")return!0;if(I===U||I===q||Q0||I===O||I===k||I===T||g||I===b||u||a||c)return!0;if(typeof I==="object"&&I!==null){if(I.$$typeof===w||I.$$typeof===F||I.$$typeof===N||I.$$typeof===L||I.$$typeof===_||I.$$typeof===o||I.getModuleId!==void 0)return!0}return!1}function l(I,j,W0){var P0=I.displayName;if(P0)return P0;var f0=j.displayName||j.name||"";return f0!==""?W0+"("+f0+")":W0}function p(I){return I.displayName||"Context"}function i(I){if(I==null)return null;if(typeof I.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof I==="function")return I.displayName||I.name||null;if(typeof I==="string")return I;switch(I){case U:return"Fragment";case G:return"Portal";case q:return"Profiler";case O:return"StrictMode";case k:return"Suspense";case T:return"SuspenseList"}if(typeof I==="object")switch(I.$$typeof){case L:var j=I;return p(j)+".Consumer";case N:var W0=I;return p(W0._context)+".Provider";case _:return l(I,I.render,"ForwardRef");case F:var P0=I.displayName||null;if(P0!==null)return P0;return i(I.type)||"Memo";case w:{var f0=I,o0=f0._payload,x0=f0._init;try{return i(x0(o0))}catch(O0){return null}}}return null}var Z0=Object.assign,T0=0,F0,X1,O1,X0,U0,_0,J0;function d(){}d.__reactDisabledLog=!0;function A0(){{if(T0===0){F0=console.log,X1=console.info,O1=console.warn,X0=console.error,U0=console.group,_0=console.groupCollapsed,J0=console.groupEnd;var I={configurable:!0,enumerable:!0,value:d,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}T0++}}function S0(){{if(T0--,T0===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z0({},I,{value:F0}),info:Z0({},I,{value:X1}),warn:Z0({},I,{value:O1}),error:Z0({},I,{value:X0}),group:Z0({},I,{value:U0}),groupCollapsed:Z0({},I,{value:_0}),groupEnd:Z0({},I,{value:J0})})}if(T0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z1=D.ReactCurrentDispatcher,t0;function D0(I,j,W0){{if(t0===void 0)try{throw Error()}catch(f0){var P0=f0.stack.trim().match(/\n( *(at )?)/);t0=P0&&P0[1]||""}return`
|
|
161
|
-
`+t0+I}}var G1=!1,L0;{var n0=typeof WeakMap==="function"?WeakMap:Map;L0=new n0}function h1(I,j){if(!I||G1)return"";{var W0=L0.get(I);if(W0!==void 0)return W0}var P0;G1=!0;var f0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var o0;o0=Z1.current,Z1.current=null,A0();try{if(j){var x0=function(){throw Error()};if(Object.defineProperty(x0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(x0,[])}catch(P4){P0=P4}Reflect.construct(I,[],x0)}else{try{x0.call()}catch(P4){P0=P4}I.call(x0.prototype)}}else{try{throw Error()}catch(P4){P0=P4}I()}}catch(P4){if(P4&&P0&&typeof P4.stack==="string"){var O0=P4.stack.split(`
|
|
162
|
-
`),k0=P0.stack.split(`
|
|
163
|
-
`),r0=O0.length-1,m1=k0.length-1;while(r0>=1&&m1>=0&&O0[r0]!==k0[m1])m1--;for(;r0>=1&&m1>=0;r0--,m1--)if(O0[r0]!==k0[m1]){if(r0!==1||m1!==1)do if(r0--,m1--,m1<0||O0[r0]!==k0[m1]){var Q4=`
|
|
164
|
-
`+O0[r0].replace(" at new "," at ");if(I.displayName&&Q4.includes("<anonymous>"))Q4=Q4.replace("<anonymous>",I.displayName);if(typeof I==="function")L0.set(I,Q4);return Q4}while(r0>=1&&m1>=0);break}}}finally{G1=!1,Z1.current=o0,S0(),Error.prepareStackTrace=f0}var i6=I?I.displayName||I.name:"",B5=i6?D0(i6):"";if(typeof I==="function")L0.set(I,B5);return B5}function B4(I,j,W0){return h1(I,!1)}function h4(I){var j=I.prototype;return!!(j&&j.isReactComponent)}function j1(I,j,W0){if(I==null)return"";if(typeof I==="function")return h1(I,h4(I));if(typeof I==="string")return D0(I);switch(I){case k:return D0("Suspense");case T:return D0("SuspenseList")}if(typeof I==="object")switch(I.$$typeof){case _:return B4(I.render);case F:return j1(I.type,j,W0);case w:{var P0=I,f0=P0._payload,o0=P0._init;try{return j1(o0(f0),j,W0)}catch(x0){}}}return""}var W1=Object.prototype.hasOwnProperty,r4={},o4=D.ReactDebugCurrentFrame;function T4(I){if(I){var j=I._owner,W0=j1(I.type,I._source,j?j.type:null);o4.setExtraStackFrame(W0)}else o4.setExtraStackFrame(null)}function y4(I,j,W0,P0,f0){{var o0=Function.call.bind(W1);for(var x0 in I)if(o0(I,x0)){var O0=void 0;try{if(typeof I[x0]!=="function"){var k0=Error((P0||"React class")+": "+W0+" type `"+x0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[x0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k0.name="Invariant Violation",k0}O0=I[x0](j,x0,P0,W0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(r0){O0=r0}if(O0&&!(O0 instanceof Error))T4(f0),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).",P0||"React class",W0,x0,typeof O0),T4(null);if(O0 instanceof Error&&!(O0.message in r4))r4[O0.message]=!0,T4(f0),C("Failed %s type: %s",W0,O0.message),T4(null)}}}var m5=Array.isArray;function O4(I){return m5(I)}function F6(I){{var j=typeof Symbol==="function"&&Symbol.toStringTag,W0=j&&I[Symbol.toStringTag]||I.constructor.name||"Object";return W0}}function L4(I){try{return M6(I),!1}catch(j){return!0}}function M6(I){return""+I}function M4(I){if(L4(I))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",F6(I)),M6(I)}var k4=D.ReactCurrentOwner,O6={key:!0,ref:!0,__self:!0,__source:!0},m6,j4,t4;t4={};function v0(I){if(W1.call(I,"ref")){var j=Object.getOwnPropertyDescriptor(I,"ref").get;if(j&&j.isReactWarning)return!1}return I.ref!==void 0}function s0(I){if(W1.call(I,"key")){var j=Object.getOwnPropertyDescriptor(I,"key").get;if(j&&j.isReactWarning)return!1}return I.key!==void 0}function $1(I,j){if(typeof I.ref==="string"&&k4.current&&j&&k4.current.stateNode!==j){var W0=i(k4.current.type);if(!t4[W0])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',i(k4.current.type),I.ref),t4[W0]=!0}}function p1(I,j){{var W0=function(){if(!m6)m6=!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)",j)};W0.isReactWarning=!0,Object.defineProperty(I,"key",{get:W0,configurable:!0})}}function e1(I,j){{var W0=function(){if(!j4)j4=!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)",j)};W0.isReactWarning=!0,Object.defineProperty(I,"ref",{get:W0,configurable:!0})}}var V4=function(I,j,W0,P0,f0,o0,x0){var O0={$$typeof:Y,type:I,key:j,ref:W0,props:x0,_owner:o0};if(O0._store={},Object.defineProperty(O0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P0}),Object.defineProperty(O0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f0}),Object.freeze)Object.freeze(O0.props),Object.freeze(O0);return O0};function G4(I,j,W0,P0,f0){{var o0,x0={},O0=null,k0=null;if(W0!==void 0)M4(W0),O0=""+W0;if(s0(j))M4(j.key),O0=""+j.key;if(v0(j))k0=j.ref,$1(j,f0);for(o0 in j)if(W1.call(j,o0)&&!O6.hasOwnProperty(o0))x0[o0]=j[o0];if(I&&I.defaultProps){var r0=I.defaultProps;for(o0 in r0)if(x0[o0]===void 0)x0[o0]=r0[o0]}if(O0||k0){var m1=typeof I==="function"?I.displayName||I.name||"Unknown":I;if(O0)p1(x0,m1);if(k0)e1(x0,m1)}return V4(I,O0,k0,f0,P0,k4.current,x0)}}var{ReactCurrentOwner:a4,ReactDebugCurrentFrame:M1}=D;function b1(I){if(I){var j=I._owner,W0=j1(I.type,I._source,j?j.type:null);M1.setExtraStackFrame(W0)}else M1.setExtraStackFrame(null)}var d6=!1;function L6(I){return typeof I==="object"&&I!==null&&I.$$typeof===Y}function l6(){{if(a4.current){var I=i(a4.current.type);if(I)return`
|
|
165
|
-
|
|
166
|
-
Check the render method of \``+I+"`."}return""}}function X7(I){{if(I!==void 0){var j=I.fileName.replace(/^.*[\\\/]/,""),W0=I.lineNumber;return`
|
|
167
|
-
|
|
168
|
-
Check your code at `+j+":"+W0+"."}return""}}var u5={};function Z7(I){{var j=l6();if(!j){var W0=typeof I==="string"?I:I.displayName||I.name;if(W0)j=`
|
|
169
|
-
|
|
170
|
-
Check the top-level render call using <`+W0+">."}return j}}function F5(I,j){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var W0=Z7(j);if(u5[W0])return;u5[W0]=!0;var P0="";if(I&&I._owner&&I._owner!==a4.current)P0=" It was passed a child from "+i(I._owner.type)+".";b1(I),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',W0,P0),b1(null)}}function u6(I,j){{if(typeof I!=="object")return;if(O4(I))for(var W0=0;W0<I.length;W0++){var P0=I[W0];if(L6(P0))F5(P0,j)}else if(L6(I)){if(I._store)I._store.validated=!0}else if(I){var f0=m(I);if(typeof f0==="function"){if(f0!==I.entries){var o0=f0.call(I),x0;while(!(x0=o0.next()).done)if(L6(x0.value))F5(x0.value,j)}}}}}function g5(I){{var j=I.type;if(j===null||j===void 0||typeof j==="string")return;var W0;if(typeof j==="function")W0=j.propTypes;else if(typeof j==="object"&&(j.$$typeof===_||j.$$typeof===F))W0=j.propTypes;else return;if(W0){var P0=i(j);y4(W0,I.props,"prop",P0,I)}else if(j.PropTypes!==void 0&&!d6){d6=!0;var f0=i(j);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f0||"Unknown")}if(typeof j.getDefaultProps==="function"&&!j.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function D1(I){{var j=Object.keys(I.props);for(var W0=0;W0<j.length;W0++){var P0=j[W0];if(P0!=="children"&&P0!=="key"){b1(I),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P0),b1(null);break}}if(I.ref!==null)b1(I),C("Invalid attribute `ref` supplied to `React.Fragment`."),b1(null)}}var z4={};function U4(I,j,W0,P0,f0,o0){{var x0=t(I);if(!x0){var O0="";if(I===void 0||typeof I==="object"&&I!==null&&Object.keys(I).length===0)O0+=" 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 k0=X7(f0);if(k0)O0+=k0;else O0+=l6();var r0;if(I===null)r0="null";else if(O4(I))r0="array";else if(I!==void 0&&I.$$typeof===Y)r0="<"+(i(I.type)||"Unknown")+" />",O0=" Did you accidentally export a JSX literal instead of a component?";else r0=typeof I;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",r0,O0)}var m1=G4(I,j,W0,f0,o0);if(m1==null)return m1;if(x0){var Q4=j.children;if(Q4!==void 0)if(P0)if(O4(Q4)){for(var i6=0;i6<Q4.length;i6++)u6(Q4[i6],I);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 u6(Q4,I)}if(W1.call(j,"key")){var B5=i(I),P4=Object.keys(j).filter(function(J7){return J7!=="key"}),v1=P4.length>0?"{key: someKey, "+P4.join(": ..., ")+": ...}":"{key: someKey}";if(!z4[B5+v1]){var F7=P4.length>0?"{"+P4.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
171
|
-
let props = %s;
|
|
172
|
-
<%s {...props} />
|
|
173
|
-
React keys must be passed directly to JSX without using spread:
|
|
174
|
-
let props = %s;
|
|
175
|
-
<%s key={someKey} {...props} />`,v1,B5,F7,B5),z4[B5+v1]=!0}}if(I===U)D1(m1);else g5(m1);return m1}}function l1(I,j,W0){return U4(I,j,W0,!0)}function f(I,j,W0){return U4(I,j,W0,!1)}var H0=f,N0=l1;kA.Fragment=U,kA.jsx=H0,kA.jsxs=N0})()});var D5=q0(k1(),1),LO=q0(bW(),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 _z(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 U6=q0(k1(),1),FW=q0(Y1(),1),wW=U6.createContext(null),iP=200;function VG({children:Y}){let[G,U]=U6.useState(!1),[O,q]=U6.useState([]),[N,L]=U6.useState({}),[_,k]=U6.useState({}),T=U6.useRef(null),F=U6.useRef(null);U6.useEffect(()=>{let M=setInterval(()=>{let v=Date.now();k((m)=>{let D={};for(let[C,V]of Object.entries(m))if(V.expiresAt>v)D[C]=V;return D})},500);return()=>clearInterval(M)},[]);let w=U6.useCallback(()=>{if(T.current)T.current.close(),T.current=null;try{let M=new EventSource("/api/telemetry/stream");T.current=M,M.onopen=()=>{U(!0)},M.onmessage=(v)=>{if(!v.data||v.data.trim()==="")return;try{let m=JSON.parse(v.data);if(m.connected){U(!0);return}if(Array.isArray(m))q((D)=>{return[...m,...D].slice(0,iP)}),L((D)=>{let C={...D};for(let V of m){let u=C[V.agent_id];if(!u||new Date(V.timestamp)>new Date(u.timestamp))C[V.agent_id]={timestamp:V.timestamp,category:V.category,type:V.type}}return C}),k((D)=>{let C={...D},V=Date.now()+3000;for(let u of m)C[u.agent_id]={type:u.type,expiresAt:V};return C})}catch{}},M.onerror=()=>{if(U(!1),M.close(),T.current=null,F.current)clearTimeout(F.current);F.current=setTimeout(w,2000)}}catch{if(U(!1),F.current)clearTimeout(F.current);F.current=setTimeout(w,2000)}},[]);U6.useEffect(()=>{return w(),()=>{if(T.current)T.current.close();if(F.current)clearTimeout(F.current)}},[w]);let b=U6.useCallback(()=>{q([])},[]);return FW.jsxDEV(wW.Provider,{value:{connected:G,events:O,lastActivityByAgent:N,activeAgents:_,clearEvents:b},children:Y},void 0,!1,void 0,this)}function TQ(){let Y=U6.useContext(wW);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function SZ(Y){let{activeAgents:G}=TQ(),U=G[Y];return{isActive:!!U,type:U?.type}}var S4=q0(k1(),1),PW=q0(Y1(),1),MW=S4.createContext(null);function A1(){let Y=S4.useContext(MW);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function DG({children:Y}){let[G,U]=S4.useState(null),[O,q]=S4.useState(null),[N,L]=S4.useState(!0),[_,k]=S4.useState(null),[T,F]=S4.useState(!1),w=S4.useRef(null),b=S4.useRef(!1),M=S4.useRef(!1),v=S4.useCallback((g)=>{w.current=g,q(g)},[]),m=S4.useCallback(async()=>{if(b.current)return!1;b.current=!0;try{let g=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!g.ok)return!1;let Q0=await g.json();v(Q0.accessToken);let o=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${Q0.accessToken}`}});if(o.ok){let t=await o.json();return U(t.user),!0}return!1}catch(g){return console.error("Token refresh failed:",g),!1}finally{b.current=!1}},[v]),D=S4.useCallback(async()=>{try{let g=w.current,o=await(await fetch("/api/auth/check",{headers:g?{Authorization:`Bearer ${g}`}:{}})).json();if(k(o.hasUsers),F(o.isDev??!1),o.authenticated&&o.user)U(o.user);else if(U(null),o.hasUsers){if(!await m())v(null)}}catch(g){console.error("Auth check failed:",g),U(null),v(null)}finally{L(!1)}},[m,v]),C=S4.useCallback(async(g,Q0)=>{try{let o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:g,password:Q0})}),t=await o.json();if(!o.ok)return{success:!1,error:t.error||"Login failed"};return v(t.accessToken),U(t.user),k(!0),{success:!0}}catch(o){return console.error("Login failed:",o),{success:!1,error:"Login failed"}}},[v]),V=S4.useCallback(async()=>{try{let g=w.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:g?{Authorization:`Bearer ${g}`}:{}})}catch(g){console.error("Logout failed:",g)}finally{U(null),v(null)}},[v]),u=S4.useCallback(async(g,Q0={})=>{let o=new Headers(Q0.headers),t=w.current;if(t)o.set("Authorization",`Bearer ${t}`);return fetch(g,{...Q0,headers:o})},[]),a=S4.useCallback(async()=>{return m()},[m]);S4.useEffect(()=>{if(M.current)return;M.current=!0,D()},[D]),S4.useEffect(()=>{if(!O)return;let g=setInterval(()=>{m()},840000);return()=>clearInterval(g)},[O,m]);let c={user:G,isAuthenticated:!!G,isLoading:N,hasUsers:_,isDev:T,accessToken:O,login:C,logout:V,refreshToken:a,checkAuth:D,authFetch:u};return PW.jsxDEV(MW.Provider,{value:c,children:Y},void 0,!1,void 0,this)}var Q6=q0(k1(),1);var IW=q0(Y1(),1),AW=Q6.createContext(null);function E4(){let Y=Q6.useContext(AW);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var mG="apteva_current_project";function uG({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=A1(),[q,N]=Q6.useState([]),[L,_]=Q6.useState(()=>{if(typeof window<"u")return localStorage.getItem(mG);return null}),[k,T]=Q6.useState(!0),[F,w]=Q6.useState(null),[b,M]=Q6.useState(0),[v,m]=Q6.useState(!1);Q6.useEffect(()=>{fetch("/api/features").then((Q0)=>Q0.json()).then((Q0)=>{m(Q0.projects===!0)}).catch(()=>{m(!1)})},[]);let D=Q6.useCallback((Q0)=>{if(_(Q0),typeof window<"u")if(Q0===null)localStorage.removeItem(mG);else localStorage.setItem(mG,Q0)},[]),C=q.find((Q0)=>Q0.id===L)||null,V=Q6.useCallback(async()=>{if(!v){N([]),T(!1);return}if(!U&&!O){N([]),T(!1);return}try{w(null);let Q0=await G("/api/projects");if(!Q0.ok)throw Error("Failed to fetch projects");let o=await Q0.json();if(N(o.projects||[]),M(o.unassignedCount||0),L&&L!=="unassigned"&&!o.projects.find((t)=>t.id===L))D(null)}catch(Q0){console.error("Failed to fetch projects:",Q0),w("Failed to load projects")}finally{T(!1)}},[G,U,O,L,D,v]),u=Q6.useCallback(async(Q0)=>{try{let o=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q0)});if(!o.ok){let l=await o.json();throw Error(l.error||"Failed to create project")}let t=await o.json();return await V(),t.project}catch(o){return console.error("Failed to create project:",o),null}},[G,V]),a=Q6.useCallback(async(Q0,o)=>{try{let t=await G(`/api/projects/${Q0}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!t.ok){let p=await t.json();throw Error(p.error||"Failed to update project")}let l=await t.json();return await V(),l.project}catch(t){return console.error("Failed to update project:",t),null}},[G,V]),c=Q6.useCallback(async(Q0)=>{try{let o=await G(`/api/projects/${Q0}`,{method:"DELETE"});if(!o.ok){let t=await o.json();throw Error(t.error||"Failed to delete project")}if(L===Q0)D(null);return await V(),!0}catch(o){return console.error("Failed to delete project:",o),!1}},[G,L,D,V]);Q6.useEffect(()=>{if(!O&&v)V()},[O,v,V]);let g={projects:q,currentProjectId:L,currentProject:C,isLoading:k,error:F,unassignedCount:b,projectsEnabled:v,setCurrentProjectId:D,createProject:u,updateProject:a,deleteProject:c,refreshProjects:V};return IW.jsxDEV(AW.Provider,{value:g,children:Y},void 0,!1,void 0,this)}var T8=q0(k1(),1);function gG(Y){let{accessToken:G}=A1(),[U,O]=T8.useState([]),[q,N]=T8.useState(!0),L=T8.useCallback(()=>{let M={"Content-Type":"application/json"};if(G)M.Authorization=`Bearer ${G}`;return M},[G]),_=T8.useCallback(async()=>{let v=await(await fetch("/api/agents",{headers:L()})).json();O(v.agents||[]),N(!1)},[L]);T8.useEffect(()=>{if(Y)_()},[Y,_]);let k=async(M)=>{await fetch("/api/agents",{method:"POST",headers:L(),body:JSON.stringify(M)}),await _()},T=async(M)=>{await fetch(`/api/agents/${M}`,{method:"DELETE",headers:L()}),await _()},F=async(M,v)=>{let m=await fetch(`/api/agents/${M}`,{method:"PUT",headers:L(),body:JSON.stringify(v)}),D=await m.json();if(await _(),!m.ok&&D.error)return{error:D.error};return{}},w=async(M)=>{let v=M.status==="running"?"stop":"start",m=await fetch(`/api/agents/${M.id}/${v}`,{method:"POST",headers:L()}),D=await m.json();if(await _(),!m.ok&&D.error)return{error:D.error};return{}},b=U.filter((M)=>M.status==="running").length;return{agents:U,loading:q,runningCount:b,fetchAgents:_,createAgent:k,updateAgent:F,deleteAgent:T,toggleAgent:w}}var Nz=q0(k1(),1);function EG(Y){let{accessToken:G}=A1(),[U,O]=Nz.useState([]),q=Nz.useCallback(()=>{let T={"Content-Type":"application/json"};if(G)T.Authorization=`Bearer ${G}`;return T},[G]),N=Nz.useCallback(async()=>{let F=await(await fetch("/api/providers",{headers:q()})).json();O(F.providers||[])},[q]);Nz.useEffect(()=>{if(Y)N()},[Y,N]);let L=U.filter((T)=>T.hasKey);return{providers:U,configuredProviders:L,fetchProviders:N,saveKey:async(T,F)=>{let b=await(await fetch(`/api/keys/${T}/test`,{method:"POST",headers:q(),body:JSON.stringify({key:F})})).json();if(!b.valid)return{success:!1,error:b.error||"API key is invalid"};let M=await fetch(`/api/keys/${T}`,{method:"POST",headers:q(),body:JSON.stringify({key:F})});if(!M.ok)return{success:!1,error:(await M.json()).error||"Failed to save key"};return await N(),{success:!0}},deleteKey:async(T)=>{await fetch(`/api/keys/${T}`,{method:"DELETE",headers:q()}),await N()}}}var Rz=q0(k1(),1);function xG(){let{accessToken:Y,isAuthenticated:G}=A1(),[U,O]=Rz.useState(null),q=Rz.useCallback(()=>{let L={};if(Y)L.Authorization=`Bearer ${Y}`;return L},[Y]);Rz.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:q()}).then((L)=>L.json()).then((L)=>{O(L.completed||L.has_any_keys)}).catch(()=>O(!0))},[G,q]);let N=Rz.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:q()}),O(!0)},[q]);return{isComplete:U,setIsComplete:O,complete:N}}var k8=q0(Y1(),1);function bz({message:Y="Loading...",fullScreen:G=!1}){let U=k8.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[k8.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[k8.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),k8.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),k8.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return k8.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 k8.jsxDEV("div",{className:"flex items-center justify-center py-20",children:U},void 0,!1,void 0,this)}var i7=q0(k1(),1),K6=q0(Y1(),1);function kQ({children:Y,onClose:G}){return K6.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:K6.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 oP({title:Y,message:G,confirmText:U="Confirm",cancelText:O="Cancel",confirmVariant:q="danger",onConfirm:N,onCancel:L}){return K6.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:K6.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[Y&&K6.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),K6.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),K6.jsxDEV("div",{className:"flex gap-2",children:[K6.jsxDEV("button",{onClick:L,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),K6.jsxDEV("button",{onClick:N,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 aP({title:Y,message:G,buttonText:U="OK",variant:O="info",onClose:q}){let N={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},L={error:"✕",success:"✓",info:"ℹ"};return K6.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:K6.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[K6.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${N[O]}`,children:K6.jsxDEV("span",{className:"text-xl",children:L[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&K6.jsxDEV("h3",{className:"font-medium mb-2",children:Y},void 0,!1,void 0,this),K6.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:G},void 0,!1,void 0,this),K6.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 S5(){let[Y,G]=i7.useState(null),U=i7.useCallback((L,_={})=>{return new Promise((k)=>{G({message:L,options:_,resolve:k})})},[]),O=i7.useCallback(()=>{Y?.resolve(!0),G(null)},[Y]),q=i7.useCallback(()=>{Y?.resolve(!1),G(null)},[Y]),N=Y?K6.jsxDEV(oP,{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:N}}function J3(){let[Y,G]=i7.useState(null),U=i7.useCallback((N,L={})=>{return new Promise((_)=>{G({message:N,options:L,resolve:_})})},[]),O=i7.useCallback(()=>{Y?.resolve(),G(null)},[Y]),q=Y?K6.jsxDEV(aP,{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 vQ=q0(k1(),1),y6=q0(Y1(),1);function V6({value:Y,options:G,onChange:U,placeholder:O="Select..."}){let[q,N]=vQ.useState(!1),L=vQ.useRef(null),_=G.find((k)=>k.value===Y);return vQ.useEffect(()=>{function k(T){if(L.current&&!L.current.contains(T.target))N(!1)}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]),y6.jsxDEV("div",{ref:L,className:"relative",children:[y6.jsxDEV("button",{type:"button",onClick:()=>N(!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:[y6.jsxDEV("span",{className:_?"text-[#e0e0e0]":"text-[#666]",children:_?y6.jsxDEV(y6.Fragment,{children:[_.label,_.recommended&&y6.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),y6.jsxDEV(nP,{isOpen:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&y6.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((k)=>y6.jsxDEV("button",{type:"button",onClick:()=>{U(k.value),N(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${k.value===Y?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[y6.jsxDEV("span",{children:[k.label,k.recommended&&y6.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.value===Y&&y6.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y6.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)]},k.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nP({isOpen:Y}){return y6.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y6.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 C1=q0(Y1(),1);function G5({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 f5({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C1.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),C1.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 wz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 h5({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 Fz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C1.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),C1.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 Mz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 y5({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 fZ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 Pz({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 jG({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 TW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 CQ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 SQ({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 kW({className:Y="w-5 h-5"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 vW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 CW({className:Y="w-4 h-4"}){return C1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C1.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 z9=q0(k1(),1);var Q7=q0(k1(),1);var s1=q0(k1(),1),VQ=q0(k1(),1),Iz=q0(k1(),1);function SW(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=SW(Y[G]))&&(O&&(O+=" "),O+=U)}else for(U in Y)Y[U]&&(O&&(O+=" "),O+=U);return O}function fW(){for(var Y,G,U=0,O="",q=arguments.length;U<q;U++)(Y=arguments[U])&&(G=SW(Y))&&(O&&(O+=" "),O+=G);return O}var rP=(Y)=>{let G=sP(Y),{conflictingClassGroups:U,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(L)=>{let _=L.split("-");if(_[0]===""&&_.length!==1)_.shift();return VW(_,G)||tP(L)},getConflictingClassGroupIds:(L,_)=>{let k=U[L]||[];if(_&&O[L])return[...k,...O[L]];return k}}},VW=(Y,G)=>{if(Y.length===0)return G.classGroupId;let U=Y[0],O=G.nextPart.get(U),q=O?VW(Y.slice(1),O):void 0;if(q)return q;if(G.validators.length===0)return;let N=Y.join("-");return G.validators.find(({validator:L})=>L(N))?.classGroupId},hW=/^\[(.+)\]$/,tP=(Y)=>{if(hW.test(Y)){let G=hW.exec(Y)[1],U=G?.substring(0,G.indexOf(":"));if(U)return"arbitrary.."+U}},sP=(Y)=>{let{theme:G,prefix:U}=Y,O={nextPart:new Map,validators:[]};return zA(Object.entries(Y.classGroups),U).forEach(([N,L])=>{cG(L,O,N,G)}),O},cG=(Y,G,U,O)=>{Y.forEach((q)=>{if(typeof q==="string"){let N=q===""?G:yW(G,q);N.classGroupId=U;return}if(typeof q==="function"){if(eP(q)){cG(q(O),G,U,O);return}G.validators.push({validator:q,classGroupId:U});return}Object.entries(q).forEach(([N,L])=>{cG(L,yW(G,N),U,O)})})},yW=(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},eP=(Y)=>Y.isThemeGetter,zA=(Y,G)=>{if(!G)return Y;return Y.map(([U,O])=>{let q=O.map((N)=>{if(typeof N==="string")return G+N;if(typeof N==="object")return Object.fromEntries(Object.entries(N).map(([L,_])=>[G+L,_]));return N});return[U,q]})},QA=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,U=new Map,O=new Map,q=(N,L)=>{if(U.set(N,L),G++,G>Y)G=0,O=U,U=new Map};return{get(N){let L=U.get(N);if(L!==void 0)return L;if((L=O.get(N))!==void 0)return q(N,L),L},set(N,L){if(U.has(N))U.set(N,L);else q(N,L)}}};var XA=(Y)=>{let{separator:G,experimentalParseClassName:U}=Y,O=G.length===1,q=G[0],N=G.length,L=(_)=>{let k=[],T=0,F=0,w;for(let D=0;D<_.length;D++){let C=_[D];if(T===0){if(C===q&&(O||_.slice(D,D+N)===G)){k.push(_.slice(F,D)),F=D+N;continue}if(C==="/"){w=D;continue}}if(C==="[")T++;else if(C==="]")T--}let b=k.length===0?_:_.substring(F),M=b.startsWith("!"),v=M?b.substring(1):b,m=w&&w>F?w-F:void 0;return{modifiers:k,hasImportantModifier:M,baseClassName:v,maybePostfixModifierPosition:m}};if(U)return(_)=>U({className:_,parseClassName:L});return L},ZA=(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},JA=(Y)=>({cache:QA(Y.cacheSize),parseClassName:XA(Y),...rP(Y)}),YA=/\s+/,$A=(Y,G)=>{let{parseClassName:U,getClassGroupId:O,getConflictingClassGroupIds:q}=G,N=[],L=Y.trim().split(YA),_="";for(let k=L.length-1;k>=0;k-=1){let T=L[k],{modifiers:F,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:M}=U(T),v=Boolean(M),m=O(v?b.substring(0,M):b);if(!m){if(!v){_=T+(_.length>0?" "+_:_);continue}if(m=O(b),!m){_=T+(_.length>0?" "+_:_);continue}v=!1}let D=ZA(F).join(":"),C=w?D+"!":D,V=C+m;if(N.includes(V))continue;N.push(V);let u=q(m,v);for(let a=0;a<u.length;++a){let c=u[a];N.push(C+c)}_=T+(_.length>0?" "+_:_)}return _};function HA(){let Y=0,G,U,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(U=DW(G))O&&(O+=" "),O+=U}return O}var DW=(Y)=>{if(typeof Y==="string")return Y;let G,U="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=DW(Y[O]))U&&(U+=" "),U+=G}return U};function GA(Y,...G){let U,O,q,N=L;function L(k){let T=G.reduce((F,w)=>w(F),Y());return U=JA(T),O=U.cache.get,q=U.cache.set,N=_,_(k)}function _(k){let T=O(k);if(T)return T;let F=$A(k,U);return q(k,F),F}return function(){return N(HA.apply(null,arguments))}}var f4=(Y)=>{let G=(U)=>U[Y]||[];return G.isThemeGetter=!0,G},mW=/^\[(?:([a-z-]+):)?(.+)\]$/i,qA=/^\d+\/\d+$/,BA=new Set(["px","full","screen"]),UA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KA=/\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$/,WA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,o7=(Y)=>fQ(Y)||BA.has(Y)||qA.test(Y),v8=(Y)=>hQ(Y,"length",PA),fQ=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),pG=(Y)=>hQ(Y,"number",fQ),hZ=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),_A=(Y)=>Y.endsWith("%")&&fQ(Y.slice(0,-1)),S1=(Y)=>mW.test(Y),C8=(Y)=>UA.test(Y),NA=new Set(["length","size","percentage"]),RA=(Y)=>hQ(Y,NA,uW),bA=(Y)=>hQ(Y,"position",uW),wA=new Set(["image","url"]),FA=(Y)=>hQ(Y,wA,IA),MA=(Y)=>hQ(Y,"",AA),yZ=()=>!0,hQ=(Y,G,U)=>{let O=mW.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return U(O[2])}return!1},PA=(Y)=>KA.test(Y)&&!WA.test(Y),uW=()=>!1,AA=(Y)=>OA.test(Y),IA=(Y)=>LA.test(Y);var TA=()=>{let Y=f4("colors"),G=f4("spacing"),U=f4("blur"),O=f4("brightness"),q=f4("borderColor"),N=f4("borderRadius"),L=f4("borderSpacing"),_=f4("borderWidth"),k=f4("contrast"),T=f4("grayscale"),F=f4("hueRotate"),w=f4("invert"),b=f4("gap"),M=f4("gradientColorStops"),v=f4("gradientColorStopPositions"),m=f4("inset"),D=f4("margin"),C=f4("opacity"),V=f4("padding"),u=f4("saturate"),a=f4("scale"),c=f4("sepia"),g=f4("skew"),Q0=f4("space"),o=f4("translate"),t=()=>["auto","contain","none"],l=()=>["auto","hidden","clip","visible","scroll"],p=()=>["auto",S1,G],i=()=>[S1,G],Z0=()=>["",o7,v8],T0=()=>["auto",fQ,S1],F0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X1=()=>["solid","dashed","dotted","double","none"],O1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X0=()=>["start","end","center","between","around","evenly","stretch"],U0=()=>["","0",S1],_0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J0=()=>[fQ,S1];return{cacheSize:500,separator:":",theme:{colors:[yZ],spacing:[o7,v8],blur:["none","",C8,S1],brightness:J0(),borderColor:[Y],borderRadius:["none","","full",C8,S1],borderSpacing:i(),borderWidth:Z0(),contrast:J0(),grayscale:U0(),hueRotate:J0(),invert:U0(),gap:i(),gradientColorStops:[Y],gradientColorStopPositions:[_A,v8],inset:p(),margin:p(),opacity:J0(),padding:i(),saturate:J0(),scale:J0(),sepia:U0(),skew:J0(),space:i(),translate:i()},classGroups:{aspect:[{aspect:["auto","square","video",S1]}],container:["container"],columns:[{columns:[C8]}],"break-after":[{"break-after":_0()}],"break-before":[{"break-before":_0()}],"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:[...F0(),S1]}],overflow:[{overflow:l()}],"overflow-x":[{"overflow-x":l()}],"overflow-y":[{"overflow-y":l()}],overscroll:[{overscroll:t()}],"overscroll-x":[{"overscroll-x":t()}],"overscroll-y":[{"overscroll-y":t()}],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",hZ,S1]}],basis:[{basis:p()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",S1]}],grow:[{grow:U0()}],shrink:[{shrink:U0()}],order:[{order:["first","last","none",hZ,S1]}],"grid-cols":[{"grid-cols":[yZ]}],"col-start-end":[{col:["auto",{span:["full",hZ,S1]},S1]}],"col-start":[{"col-start":T0()}],"col-end":[{"col-end":T0()}],"grid-rows":[{"grid-rows":[yZ]}],"row-start-end":[{row:["auto",{span:[hZ,S1]},S1]}],"row-start":[{"row-start":T0()}],"row-end":[{"row-end":T0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",S1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",S1]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...X0()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X0(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X0(),"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:[D]}],mx:[{mx:[D]}],my:[{my:[D]}],ms:[{ms:[D]}],me:[{me:[D]}],mt:[{mt:[D]}],mr:[{mr:[D]}],mb:[{mb:[D]}],ml:[{ml:[D]}],"space-x":[{"space-x":[Q0]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Q0]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",S1,G]}],"min-w":[{"min-w":[S1,G,"min","max","fit"]}],"max-w":[{"max-w":[S1,G,"none","full","min","max","fit","prose",{screen:[C8]},C8]}],h:[{h:[S1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[S1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[S1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[S1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",C8,v8]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pG]}],"font-family":[{font:[yZ]}],"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",S1]}],"line-clamp":[{"line-clamp":["none",fQ,pG]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",o7,S1]}],"list-image":[{"list-image":["none",S1]}],"list-style-type":[{list:["none","disc","decimal",S1]}],"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:[...X1(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",o7,v8]}],"underline-offset":[{"underline-offset":["auto",o7,S1]}],"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:i()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",S1]}],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",S1]}],"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:[...F0(),bA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",RA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FA]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[M]}],"gradient-via":[{via:[M]}],"gradient-to":[{to:[M]}],rounded:[{rounded:[N]}],"rounded-s":[{"rounded-s":[N]}],"rounded-e":[{"rounded-e":[N]}],"rounded-t":[{"rounded-t":[N]}],"rounded-r":[{"rounded-r":[N]}],"rounded-b":[{"rounded-b":[N]}],"rounded-l":[{"rounded-l":[N]}],"rounded-ss":[{"rounded-ss":[N]}],"rounded-se":[{"rounded-se":[N]}],"rounded-ee":[{"rounded-ee":[N]}],"rounded-es":[{"rounded-es":[N]}],"rounded-tl":[{"rounded-tl":[N]}],"rounded-tr":[{"rounded-tr":[N]}],"rounded-br":[{"rounded-br":[N]}],"rounded-bl":[{"rounded-bl":[N]}],"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:[...X1(),"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:X1()}],"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:["",...X1()]}],"outline-offset":[{"outline-offset":[o7,S1]}],"outline-w":[{outline:[o7,v8]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:Z0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[o7,v8]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",C8,MA]}],"shadow-color":[{shadow:[yZ]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...O1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O1()}],filter:[{filter:["","none"]}],blur:[{blur:[U]}],brightness:[{brightness:[O]}],contrast:[{contrast:[k]}],"drop-shadow":[{"drop-shadow":["","none",C8,S1]}],grayscale:[{grayscale:[T]}],"hue-rotate":[{"hue-rotate":[F]}],invert:[{invert:[w]}],saturate:[{saturate:[u]}],sepia:[{sepia:[c]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[U]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[k]}],"backdrop-grayscale":[{"backdrop-grayscale":[T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[F]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[u]}],"backdrop-sepia":[{"backdrop-sepia":[c]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[L]}],"border-spacing-x":[{"border-spacing-x":[L]}],"border-spacing-y":[{"border-spacing-y":[L]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",S1]}],duration:[{duration:J0()}],ease:[{ease:["linear","in","out","in-out",S1]}],delay:[{delay:J0()}],animate:[{animate:["none","spin","ping","pulse","bounce",S1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[a]}],"scale-x":[{"scale-x":[a]}],"scale-y":[{"scale-y":[a]}],rotate:[{rotate:[hZ,S1]}],"translate-x":[{"translate-x":[o]}],"translate-y":[{"translate-y":[o]}],"skew-x":[{"skew-x":[g]}],"skew-y":[{"skew-y":[g]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",S1]}],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",S1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":i()}],"scroll-mx":[{"scroll-mx":i()}],"scroll-my":[{"scroll-my":i()}],"scroll-ms":[{"scroll-ms":i()}],"scroll-me":[{"scroll-me":i()}],"scroll-mt":[{"scroll-mt":i()}],"scroll-mr":[{"scroll-mr":i()}],"scroll-mb":[{"scroll-mb":i()}],"scroll-ml":[{"scroll-ml":i()}],"scroll-p":[{"scroll-p":i()}],"scroll-px":[{"scroll-px":i()}],"scroll-py":[{"scroll-py":i()}],"scroll-ps":[{"scroll-ps":i()}],"scroll-pe":[{"scroll-pe":i()}],"scroll-pt":[{"scroll-pt":i()}],"scroll-pr":[{"scroll-pr":i()}],"scroll-pb":[{"scroll-pb":i()}],"scroll-pl":[{"scroll-pl":i()}],"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",S1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[o7,v8,pG]}],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 gW=GA(TA);var iW=q0(k1(),1),z7=q0(b4(),1),DQ=q0(k1(),1),D6=q0(b4(),1),oW=q0(b4(),1),nG=q0(b4(),1),mQ=q0(k1(),1),l4=q0(b4(),1),aW=q0(k1(),1),W6=q0(b4(),1),DZ=q0(b4(),1),C0=q0(b4(),1),q5=q0(b4(),1),tG=q0(b4(),1),e0=q0(b4(),1),D4=q0(b4(),1),r1=q0(b4(),1),E0=q0(b4(),1),R1=q0(b4(),1),VZ=q0(b4(),1),b7=q0(k1(),1),K1=q0(b4(),1),n7=q0(k1(),1),i0=q0(b4(),1),z5=q0(b4(),1),LI=q0(k1(),1),nW=q0(b4(),1),sG=q0(k1(),1),eG=q0(b4(),1),_I=q0(k1(),1),rW=q0(b4(),1),tW=q0(k1(),1),sW=q0(b4(),1),NI=q0(k1(),1),eW=q0(b4(),1),zO=q0(b4(),1),QO=q0(b4(),1),vA=Object.defineProperty,CA=(Y,G,U)=>(G in Y)?vA(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:U}):Y[G]=U,SA=(Y,G,U)=>CA(Y,typeof G!=="symbol"?G+"":G,U);function K4(...Y){return gW(fW(Y))}var kv=[{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)}],vv=[{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 fA(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 hA(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 yA(Y){let G=hA(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 VA(Y,G,U,O,q=30){let{message:N,widgets:L}=yA(Y),_=N.split(" "),k=0,T=setInterval(()=>{try{if(k<_.length)G({type:"token",content:_[k]+" "}),k++;else{clearInterval(T),L.forEach((w)=>{G({type:"widget",widget:w})});let F=`mock_thread_${Date.now()}`;G({type:"complete"}),U(F)}}catch(F){clearInterval(T),O(F instanceof Error?F:Error("Mock streaming error"))}},q)}function DA(Y){return new Promise((G,U)=>{let O=new FileReader;O.onload=()=>{let N=O.result.split(",")[1];G(N)},O.onerror=()=>U(Error("Failed to read file")),O.readAsDataURL(Y)})}function mA(Y){if(Y.startsWith("image/"))return"image";return"document"}function uA(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 gA(Y){let G=await DA(Y);return{type:mA(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function EA(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>gA(O)))}async function EW(Y,G){if(!G||G.length===0)return Y;let U=[];if(Y.trim())U.push({type:"text",text:Y.trim()});let O=await EA(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 xW=10485760;function cW(Y){if(!uA(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>xW)return{valid:!1,error:`File too large: ${q3(Y.size)} (max ${q3(xW)})`};return{valid:!0}}var xA=["list","table"];function jA(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 N=0,L=!1,_=!1,k=-1;for(let w=q+1;w<Y.length;w++){let b=Y[w];if(_){_=!1;continue}if(b==="\\"&&L){_=!0;continue}if(b==='"'){L=!L;continue}if(L)continue;if(b==="{"){if(N===0)k=w;N++}else if(b==="}"){if(N--,N===0&&k!==-1){let M=Y.slice(k,w+1);try{let v=JSON.parse(M);if(!v.id)v.id=`item-${G.length}-${oG(M)}`;G.push(v)}catch(v){}k=-1}}else if(b==="]"&&N===0){U=!1;break}}if(N>0||k!==-1)U=!0;let T=Y.slice(q);if(aG(T,0)===-1)U=!0;return{items:G,isStreaming:U}}function oG(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 aG(Y,G){let U=0,O=!1,q=!1;for(let N=G;N<Y.length;N++){let L=Y[N];if(q){q=!1;continue}if(L==="\\"&&O){q=!0;continue}if(L==='"'){O=!O;continue}if(O)continue;if(L==="["||L==="{")U++;else if(L==="]"||L==="}"){if(U--,U===0)return N}}return-1}function G3(Y){let G=[],U=!1,O=!1,q=0,N=null,L=Y,_=Y.lastIndexOf("@ui:");if(_!==-1){let F=Y.slice(_),w=F.match(/^@ui:(\w+)/);if(w){let b=w[1],M=F.indexOf("[");if(M===-1)L=Y.slice(0,_),N=b,O=!0;else{let v=_+M;if(aG(Y,v)===-1)if(xA.includes(b)){let D=Y.slice(v+1),{items:C,isStreaming:V}=jA(D);if(C.length>0){L=Y.slice(0,_);let u=`widget-${b}-streaming-${oG(D)}`,a=L.replace(/[\s:;\-–—\.]+$/g,"").trim();if(a)G.push({type:"text",content:a});G.push({type:"widget",widget:{type:b,id:u,props:b==="table"?{rows:C,columns:[]}:{items:C},isStreaming:V}}),U=!0,O=!1,L=""}else L=Y.slice(0,_),N=b,O=!0}else L=Y.slice(0,_),N=b,O=!0}}}if(O)L=L.replace(/[\s:;\-–—\.]+$/g,"");let k=/@ui:(\w+)\[/g,T;while((T=k.exec(L))!==null){let F=T[1],w=T.index+T[0].length-1,b=aG(L,w);if(b===-1)continue;let M=L.slice(w+1,b);if(T.index>q){let v=L.slice(q,T.index).trim();if(v)G.push({type:"text",content:v})}try{let v=M.trim(),m=JSON.parse(v),D=`widget-${F}-${oG(v)}`,{metadata:C,actions:V,...u}=m;G.push({type:"widget",widget:{type:F,id:D,props:u,...V&&{actions:V},...C&&{metadata:C}}}),U=!0}catch(v){}q=b+1,k.lastIndex=q}if(q<L.length){let F=L.slice(q).trim();if(F)G.push({type:"text",content:F})}if(G.length===0&&L.trim())G.push({type:"text",content:L.trim()});if(N)G.push({type:"widget_pending",pendingType:N});return{segments:G,hasWidgets:U,hasPendingWidget:O}}var dW={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"}]}]'}},pA=Object.keys(dW),cA=["flow"],lW=pA.filter((Y)=>!cA.includes(Y));function dA(Y){let G=Y||lW,U=`
|
|
176
|
-
## UI Widgets
|
|
177
|
-
SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
|
|
178
|
-
CORRECT: @ui:list[{"items": [...]}]
|
|
179
|
-
WRONG: @ui:list{"items": [...]} (missing square brackets)
|
|
180
|
-
|
|
181
|
-
`;for(let O of G){let q=dW[O];if(!q)continue;U+=`${O}: ${q.schema} | ${q.example}
|
|
182
|
-
`}return U+=`
|
|
183
|
-
Per-item "metadata" is sent as payload on action click.
|
|
184
|
-
`,U}function lA(Y){return`
|
|
185
|
-
Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(Y||lW).join(", ")}. Per-item "metadata" is sent as action payload.
|
|
186
|
-
`}function iA({widget:Y,onAction:G}){let{title:U,description:O,image:q,footer:N}=Y.props;return z7.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[q&&z7.jsx("img",{src:q,alt:U,className:"w-full h-48 object-cover"}),z7.jsxs("div",{className:"p-4",children:[z7.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:U}),O&&z7.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(N||Y.actions&&Y.actions.length>0)&&z7.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[N&&z7.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:N}),Y.actions&&Y.actions.length>0&&z7.jsx("div",{className:"flex gap-2",children:Y.actions.map((L,_)=>z7.jsx("button",{onClick:()=>G?.({type:L.type,payload:L.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:L.label},_))})]})]})}function oA({widget:Y,onAction:G}){let{items:U}=Y.props,O=Y.isStreaming??!1,q=DQ.useRef(new Set),[N,L]=DQ.useState(new Set);return DQ.useEffect(()=>{let _=new Set(U.map((T)=>T.id)),k=new Set;if(U.forEach((T)=>{if(!q.current.has(T.id))k.add(T.id)}),U.forEach((T)=>q.current.add(T.id)),k.size>0){L(k);let T=setTimeout(()=>{L(new Set)},500);return()=>clearTimeout(T)}},[U]),D6.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[U.map((_,k)=>{let T=N.has(_.id),F=k===U.length-1;return D6.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!F||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!_.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${T?"apteva-list-item-new":""}`,style:_.backgroundColor?{backgroundColor:_.backgroundColor}:void 0,children:[_.image&&D6.jsx("img",{src:_.image,alt:_.title,className:"w-16 h-16 rounded object-cover"}),D6.jsxs("div",{className:`flex-1 ${_.image?"ml-4":""}`,children:[D6.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:_.title}),_.subtitle&&D6.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:_.subtitle}),_.description&&D6.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:_.description})]}),Y.actions&&Y.actions.length>0&&D6.jsx("div",{className:"flex gap-2",children:Y.actions.map((w,b)=>D6.jsx("button",{onClick:()=>G?.({type:w.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:w.label},b))})]},_.id)}),O&&D6.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[D6.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[D6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),D6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),D6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),D6.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function aA({widget:Y,onAction:G}){let{label:U,variant:O="primary",disabled:q=!1}=Y.props;return oW.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:K4("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 nA({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"},N=(L)=>{return Y.actions?.find((_)=>_.payload?.buttonId===L)||Y.actions?.[0]};return nG.jsx("div",{className:K4("flex gap-2",U==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((L)=>{let _=N(L.id);return nG.jsx("button",{onClick:()=>{if(_)G?.({type:_.type,payload:{..._.payload,buttonId:L.id},widgetId:Y.id,timestamp:new Date})},className:K4("px-4 py-2 rounded-lg font-medium transition-colors text-sm",q[L.variant||"secondary"]),children:L.label},L.id)})})}function rA({widget:Y,onAction:G}){let{columns:U,rows:O,caption:q,compact:N=!1,striped:L=!1}=Y.props,_=Y.isStreaming??!1,k=mQ.useRef(new Set),[T,F]=mQ.useState(new Set);mQ.useEffect(()=>{let b=new Set;if(O.forEach((M,v)=>{let m=M.id||`row-${v}`;if(!k.current.has(m))b.add(m)}),O.forEach((M,v)=>{let m=M.id||`row-${v}`;k.current.add(m)}),b.size>0){F(b);let M=setTimeout(()=>{F(new Set)},500);return()=>clearTimeout(M)}},[O]);let w=(b)=>{switch(b){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return l4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:l4.jsx("div",{className:"overflow-x-auto",children:l4.jsxs("table",{className:"w-full",children:[q&&l4.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}),l4.jsx("thead",{children:l4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:U.map((b)=>l4.jsx("th",{className:K4("font-semibold text-neutral-900 dark:text-white",N?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(b.align)),style:b.width?{width:b.width}:void 0,children:b.label},b.key))})}),l4.jsxs("tbody",{children:[O.map((b,M)=>{let v=b.id||`row-${M}`,m=T.has(v);return l4.jsx("tr",{className:K4("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",L&&M%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:b,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:U.map((D)=>l4.jsx("td",{className:K4("text-neutral-700 dark:text-neutral-300",N?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(D.align)),children:b[D.key]??"—"},D.key))},v)}),O.length===0&&!_&&l4.jsx("tr",{children:l4.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"})}),_&&l4.jsx("tr",{className:"apteva-table-streaming",children:l4.jsx("td",{colSpan:U.length||1,className:"px-4 py-3 text-center",children:l4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[l4.jsxs("div",{className:"flex gap-1",children:[l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),l4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),l4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function tA({widget:Y,onAction:G}){let{title:U,fields:O}=Y.props,[q,N]=aW.useState(()=>{let F={};return O.forEach((w)=>{F[w.name]=w.defaultValue??(w.type==="checkbox"?!1:"")}),F}),L=(F,w)=>{N((b)=>({...b,[F]:w}))},_=(F)=>{if(F.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:q},widgetId:Y.id,timestamp:new Date})},k=(F)=>{switch(F.type){case"text":case"password":case"number":case"date":return W6.jsx("input",{type:F.type,name:F.name,value:q[F.name]||"",onChange:(b)=>L(F.name,F.type==="number"?Number(b.target.value):b.target.value),placeholder:F.placeholder,required:F.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 W6.jsx("textarea",{name:F.name,value:q[F.name]||"",onChange:(b)=>L(F.name,b.target.value),placeholder:F.placeholder,required:F.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 W6.jsxs("select",{name:F.name,value:q[F.name]||"",onChange:(b)=>L(F.name,b.target.value),required:F.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:[W6.jsx("option",{value:"",children:F.placeholder||"Select..."}),F.options?.map((b)=>W6.jsx("option",{value:b.value,children:b.label},b.value))]});case"checkbox":return W6.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[W6.jsx("input",{type:"checkbox",name:F.name,checked:q[F.name]||!1,onChange:(b)=>L(F.name,b.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),W6.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:F.label})]});default:return null}},T=Y.actions?.find((F)=>F.type==="submit")||Y.actions?.[0];return W6.jsxs("form",{onSubmit:_,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[W6.jsxs("div",{className:"p-4",children:[U&&W6.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:U}),W6.jsx("div",{className:"space-y-3",children:O.map((F)=>W6.jsxs("div",{className:F.type==="checkbox"?"":"space-y-1",children:[F.type!=="checkbox"&&W6.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[F.label,F.required&&W6.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),k(F)]},F.name))})]}),T&&W6.jsx("div",{className:"px-4 pb-4",children:W6.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:T.label||"Submit"})})]})}function sA({widget:Y}){let{src:G,alt:U,caption:O}=Y.props;return DZ.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[DZ.jsx("img",{src:G,alt:U,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&DZ.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function eA({type:Y,status:G}){if(G==="completed")return C0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return C0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,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"})});if(Y==="review"||Y==="inspect"||Y==="eye")return C0.jsxs("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("svg",{className:U,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return C0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function zI({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 C0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:C0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C0.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 QI(){return C0.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:C0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var e5={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 XI(Y,G){if(Y.color&&e5[Y.color])return e5[Y.color];if(G==="time"||G==="schedule"||G==="clock")return e5.blue;if(G==="agent"||G?.startsWith("@"))return e5.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return e5.cyan;if(G==="generate"||G==="document"||G==="create")return e5.amber;if(G==="deploy"||G==="rocket"||G==="launch")return e5.rose;if(G==="build"||G==="compile"||G==="package")return e5.indigo;if(G==="test"||G==="check"||G==="verify")return e5.emerald;if(G==="data"||G==="database"||G==="storage")return e5.orange;return e5.blue}function ZI({widget:Y}){let{title:G,subtitle:U,icon:O,steps:q}=Y.props;return C0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[C0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[C0.jsx(zI,{icon:O}),C0.jsxs("div",{className:"flex-1 min-w-0",children:[C0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),U&&C0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:U})]})]}),C0.jsx("div",{className:"px-4 pb-4",children:C0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:q.map((N,L)=>{let _=L===q.length-1,k=N.status==="active",T=N.status==="completed",F=N.status==="error",w=N.status==="skipped",b=N.label,M=N.type;if(!M)if(b.startsWith("@"))M="agent";else if(/^\d+[ap]m$/i.test(b)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(b))M="time";else{let D=b.toLowerCase();M={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"}[D]}let v,m="";if(k)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(T)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(F)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(w)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=XI(N,M);return C0.jsxs("div",{className:"flex items-center gap-2",children:[C0.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:[C0.jsx(eA,{type:M,status:N.status}),b]}),!_&&C0.jsx(QI,{})]},N.id)})})})]})}function rG({widget:Y,onAction:G}){return q5.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return q5.jsx(iA,{widget:Y,onAction:G});case"list":return q5.jsx(oA,{widget:Y,onAction:G});case"button":return q5.jsx(aA,{widget:Y,onAction:G});case"button_group":return q5.jsx(nA,{widget:Y,onAction:G});case"table":return q5.jsx(rA,{widget:Y,onAction:G});case"form":return q5.jsx(tA,{widget:Y,onAction:G});case"image":return q5.jsx(sA,{widget:Y});case"flow":return q5.jsx(ZI,{widget:Y});default:return q5.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[q5.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),q5.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function lG({widgets:Y,onAction:G,onWidgetMount:U,layout:O="stack",spacing:q="normal",columns:N=3,className:L}){iW.useEffect(()=>{Y.forEach((T)=>{U?.(T.id)})},[Y,U]);let _={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${N}`,masonry:"columns-1 md:columns-2 lg:columns-3"},k={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return tG.jsx("div",{className:K4(_[O],k[q],L),children:Y.map((T)=>tG.jsx(rG,{widget:T,onAction:G},T.id))})}function jW({type:Y,className:G}){switch(Y){case"card":return e0.jsx("div",{className:K4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:e0.jsxs("div",{className:"p-4 space-y-3",children:[e0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return e0.jsx("div",{className:K4("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((U)=>e0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[e0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),e0.jsxs("div",{className:"flex-1 space-y-2",children:[e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),e0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},U))});case"button_group":return e0.jsxs("div",{className:K4("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[e0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),e0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),e0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return e0.jsxs("div",{className:K4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[e0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),e0.jsxs("div",{className:"space-y-3",children:[e0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),e0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),e0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return e0.jsxs("div",{className:K4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[e0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),e0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[e0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),e0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),e0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),e0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),e0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return e0.jsx("div",{className:K4("apteva-widget-skeleton animate-pulse",G),children:e0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return e0.jsx("div",{className:K4("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((U)=>e0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},U))});case"map":return e0.jsx("div",{className:K4("apteva-widget-skeleton animate-pulse",G),children:e0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:e0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e0.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"}),e0.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 e0.jsxs("div",{className:K4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[e0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((U)=>e0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),e0.jsx("div",{className:"flex-1 px-4 py-3",children:e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},U))]});default:return e0.jsxs("div",{className:K4("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[e0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),e0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function JI(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function Az(Y,G=""){let U=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,q=0,N,L=0;while((N=O.exec(Y))!==null){if(N.index>q)U.push(Y.slice(q,N.index));if(N[1]!==void 0||N[2]!==void 0){let _=N[1]||"",k=N[2];U.push(D4.jsx("img",{src:k,alt:_,className:"apteva-md-img"},`${G}img${L++}`))}else if(N[3]!==void 0||N[4]!==void 0){let _=N[3],k=N[4];if(JI(k))U.push(D4.jsx("img",{src:k,alt:_,className:"apteva-md-img"},`${G}img${L++}`));else U.push(D4.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:_},`${G}a${L++}`))}else if(N[5]!==void 0)U.push(D4.jsx("strong",{children:N[6]},`${G}b${L++}`));else if(N[7]!==void 0)U.push(D4.jsx("code",{className:"apteva-md-inline-code",children:N[7]},`${G}code${L++}`));q=N.index+N[0].length}if(q<Y.length)U.push(Y.slice(q));return U.length>0?U:[Y]}function YI(Y){let G=Y.split(`
|
|
187
|
-
`),U=[],O=0,q=0;while(q<G.length){let N=G[q],L=N.match(/^##\s+(.*)$/);if(L){U.push(D4.jsx("h2",{className:"apteva-md-h2",children:Az(L[1],`${O}`)},`h2${O++}`)),q++;continue}let _=N.match(/^###\s+(.*)$/);if(_){U.push(D4.jsx("h3",{className:"apteva-md-h3",children:Az(_[1],`${O}`)},`h3${O++}`)),q++;continue}let k=N.match(/^(\s*)([-*+])\s+(.*)$/);if(k){let w=[],b=k[1].length;while(q<G.length){let M=G[q].match(/^(\s*)([-*+])\s+(.*)$/);if(M&&M[1].length===b)w.push(D4.jsx("li",{className:"apteva-md-li",children:Az(M[3],`${O}`)},`li${O++}`)),q++;else break}U.push(D4.jsx("ul",{className:"apteva-md-ul",children:w},`ul${O++}`));continue}let T=N.match(/^(\s*)(\d+)\.\s+(.*)$/);if(T){let w=[],b=T[1].length;while(q<G.length){let M=G[q].match(/^(\s*)(\d+)\.\s+(.*)$/);if(M&&M[1].length===b)w.push(D4.jsx("li",{className:"apteva-md-li",children:Az(M[3],`${O}`)},`li${O++}`)),q++;else break}U.push(D4.jsx("ol",{className:"apteva-md-ol",children:w},`ol${O++}`));continue}if(N.match(/^\|(.+)\|$/)&&q+1<G.length){if(G[q+1].match(/^\|([\s:-]+\|)+$/)){let M=N.split("|").filter((m)=>m.trim()!=="").map((m)=>m.trim());q+=2;let v=[];while(q<G.length)if(G[q].match(/^\|(.+)\|$/)){let D=G[q].split("|").filter((C)=>C.trim()!=="").map((C)=>C.trim());v.push(D),q++}else break;U.push(D4.jsx("div",{className:"apteva-md-table-wrapper",children:D4.jsxs("table",{className:"apteva-md-table",children:[D4.jsx("thead",{children:D4.jsx("tr",{children:M.map((m,D)=>D4.jsx("th",{className:"apteva-md-th",children:Az(m,`th${O}${D}`)},`th${D}`))})}),D4.jsx("tbody",{children:v.map((m,D)=>D4.jsx("tr",{children:m.map((C,V)=>D4.jsx("td",{className:"apteva-md-td",children:Az(C,`td${O}${D}${V}`)},`td${V}`))},`tr${D}`))})]})},`table-wrapper${O++}`));continue}}if(N==="")U.push(D4.jsx("br",{},`br${O++}`));else U.push(D4.jsxs("span",{children:[Az(N,`${O}`),q<G.length-1?`
|
|
188
|
-
`:""]},`p${O++}`));q++}return U}function a7({content:Y,className:G=""}){return D4.jsx("div",{className:`apteva-md ${G}`,children:YI(Y)})}function $I({name:Y,status:G,isReceiving:U=!1,inputLength:O=0,streamOutput:q}){if(G==="preparing")return r1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[r1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[r1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),r1.jsxs("span",{className:"apteva-tool-label",children:[r1.jsx("strong",{children:Y}),r1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(G==="running")return r1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[r1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[r1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),r1.jsxs("span",{className:"apteva-tool-label",children:[r1.jsx("strong",{children:Y}),q?r1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,q?r1.jsx("span",{className:"apteva-tool-stream-output",children:q}):r1.jsxs(r1.Fragment,{children:[r1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),r1.jsxs("span",{className:"apteva-tool-dots",children:[r1.jsx("span",{children:"."}),r1.jsx("span",{children:"."}),r1.jsx("span",{children:"."})]})]})]})]});if(G==="completed")return r1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[r1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),r1.jsx("span",{className:"apteva-tool-label",children:Y})]});return r1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[r1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),r1.jsxs("span",{className:"apteva-tool-label",children:[Y," failed"]})]})}function HI({message:Y,onAction:G,enableWidgets:U,onWidgetRender:O}){let q=Y.role==="user",N=Y.metadata?.content_segments,L=Y.metadata?.isStreaming===!0,_=Y.content||N&&N.length>0,k=Iz.useRef(new Set),T=Iz.useMemo(()=>{if(!U||q||!Y.content)return[];return G3(Y.content).segments.filter((a)=>a.type==="widget"&&!!a.widget).map((a)=>a.widget)},[U,q,Y.content]);Iz.useEffect(()=>{if(O&&Y.widgets){for(let u of Y.widgets)if(!k.current.has(u.id))k.current.add(u.id),O(u)}},[Y.widgets,O]),Iz.useEffect(()=>{if(O&&T.length>0){for(let u of T)if(!k.current.has(u.id))k.current.add(u.id),O(u)}},[T,O]);let F=(u)=>{if(!U||q)return E0.jsx(a7,{content:u});let c=G3(u).segments.filter((g)=>g.type==="text"&&g.content).map((g)=>g.content).join("");if(!c.trim())return null;return E0.jsx(a7,{content:c})},w=()=>{if(!U||q||!Y.content)return null;let u=G3(Y.content),a=[],c="";if(u.segments.forEach((g,Q0)=>{if(g.type==="text"&&g.content)c+=g.content;else if(g.type==="widget"&&g.widget){if(c.trim())a.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:c})})},`text-${Q0}`)),c="";a.push(E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(rG,{widget:g.widget,onAction:G})},`widget-${Q0}`))}else if(g.type==="widget_pending"&&g.pendingType){if(c.trim())a.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:c})})},`text-${Q0}`)),c="";a.push(E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(jW,{type:g.pendingType})},`pending-${Q0}`))}}),c.trim())a.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:c})})},"text-final"));return a.length>0?a:null},b=Y.metadata?.attachments||[],M=b.length>0,v=()=>{if(!M)return null;return E0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:b.map((u,a)=>{let c=u.type.startsWith("image/"),g=u.type==="application/pdf";if(c&&u.preview)return E0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:E0.jsx("img",{src:u.preview,alt:u.name,className:"max-w-[150px] max-h-[150px] object-cover"})},a);return E0.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:[E0.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:g?E0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E0.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"})}):E0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E0.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"})})}),E0.jsxs("div",{className:"flex flex-col min-w-0",children:[E0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:u.name}),E0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[g?"PDF":"Document"," · ",q3(u.size)]})]})]},a)})})},m=()=>{if(q)return E0.jsx("div",{className:"apteva-message-text",children:Y.content});if(L&&!_)return E0.jsxs("div",{className:"apteva-typing-indicator",children:[E0.jsx("span",{}),E0.jsx("span",{}),E0.jsx("span",{})]});if(N&&N.length>0)return null;return F(Y.content)},D=(u,a)=>{if(!U)return E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:u})})},a);let c=G3(u),g=[],Q0="";if(c.segments.forEach((o,t)=>{if(o.type==="text"&&o.content)Q0+=o.content;else if(o.type==="widget"&&o.widget){if(Q0.trim())g.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:Q0})})},`${a}-text-${t}`)),Q0="";g.push(E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(rG,{widget:o.widget,onAction:G})},`${a}-widget-${t}`))}else if(o.type==="widget_pending"&&o.pendingType){if(Q0.trim())g.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:Q0})})},`${a}-text-${t}`)),Q0="";g.push(E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(jW,{type:o.pendingType})},`${a}-pending-${t}`))}}),Q0.trim())g.push(E0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:E0.jsx("div",{className:"apteva-message-content-assistant",children:E0.jsx(a7,{content:Q0})})},`${a}-text-final`));return g},C=()=>{if(!N||N.length===0)return null;let u=[];return N.forEach((a,c)=>{if(a.type==="text"&&a.content){let g=D(a.content,`seg-${c}`);if(Array.isArray(g))u.push(...g);else u.push(g)}else if(a.type==="tool")u.push(E0.jsx("div",{className:"apteva-tool-call-standalone",children:E0.jsx($I,{name:a.name,status:a.status||(a.result!==void 0?"completed":"running"),isReceiving:a.isReceiving,inputLength:a.inputLength,streamOutput:a.streamOutput})},a.id))}),u};if(!q&&(N&&N.length>0))return E0.jsxs("div",{className:"apteva-message-segmented",children:[C(),Y.widgets&&Y.widgets.length>0&&E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(lG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),E0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let V=w();if(!q&&U&&V)return E0.jsxs("div",{className:"apteva-message-segmented",children:[V,Y.widgets&&Y.widgets.length>0&&E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(lG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),E0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(q&&M)return E0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[v(),Y.content&&E0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:E0.jsx("div",{className:"apteva-message-content-user",children:E0.jsx("div",{className:"apteva-message-text",children:Y.content})})}),E0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return E0.jsxs("div",{className:K4("apteva-message-bubble",q?"apteva-message-user":"apteva-message-assistant"),children:[E0.jsx("div",{className:q?"apteva-message-content-user":"apteva-message-content-assistant",children:m()}),Y.widgets&&Y.widgets.length>0&&E0.jsx("div",{className:"apteva-widget-standalone",children:E0.jsx(lG,{widgets:Y.widgets,onAction:G,layout:"stack"})}),E0.jsx("div",{className:K4("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 pW=()=>R1.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R1.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"})}),iG=()=>R1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:R1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function GI({title:Y,subtitle:G,icon:U,prompts:O,variant:q="centered",chatVariant:N="default",onPromptClick:L}){let _=(O||[]).map((F)=>typeof F==="string"?{text:F}:F),k=_.length>0,T=Y||G||U;if(!T&&!k)return R1.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:R1.jsxs("div",{className:"text-center space-y-2",children:[R1.jsx("div",{className:"flex justify-center",children:R1.jsx(pW,{})}),R1.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(q==="minimal")return R1.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[T&&R1.jsxs("div",{className:"mb-4",children:[Y&&R1.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:Y}),G&&R1.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:G})]}),k&&R1.jsx("div",{className:"flex-1 space-y-2",children:_.map((F,w)=>R1.jsx("button",{onClick:()=>L(F.text),className:K4("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:R1.jsxs("div",{className:"flex items-center gap-3",children:[R1.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:F.icon||R1.jsx(iG,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:F.description})]})]})},w))})]});return R1.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[R1.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[R1.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:U||R1.jsx(pW,{})}),Y&&R1.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:Y}),G&&R1.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:G})]}),k&&R1.jsxs("div",{className:"w-full max-w-2xl",children:[R1.jsx("div",{className:"sm:hidden space-y-2",children:_.map((F,w)=>R1.jsx("button",{onClick:()=>L(F.text),className:K4("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:R1.jsxs("div",{className:"flex items-center gap-3",children:[R1.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:F.icon||R1.jsx(iG,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:F.description})]}),R1.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:R1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},w))}),R1.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:_.map((F,w)=>R1.jsx("button",{onClick:()=>L(F.text),className:K4("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:R1.jsxs("div",{className:"flex items-start gap-3",children:[R1.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:F.icon||R1.jsx(iG,{})}),R1.jsxs("div",{className:"flex-1 min-w-0",children:[R1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:F.text}),F.description&&R1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:F.description})]})]})},w))})]})]})}function qI({messages:Y,onAction:G,welcomeTitle:U,welcomeSubtitle:O,welcomeIcon:q,suggestedPrompts:N,welcomeVariant:L,chatVariant:_,onPromptClick:k,enableWidgets:T,onWidgetRender:F}){let w=VQ.useRef(null),b=VQ.useRef(!0),M=VQ.useRef(0),v=()=>{if(w.current){let{scrollTop:m,scrollHeight:D,clientHeight:C}=w.current;b.current=D-m-C<100}};return VQ.useEffect(()=>{if(w.current&&b.current){let m=w.current.scrollHeight;if(m!==M.current)w.current.scrollTop=m,M.current=m}},[Y]),VZ.jsx("div",{ref:w,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:v,children:Y.length===0?VZ.jsx(GI,{title:U,subtitle:O,icon:q,prompts:N,variant:L,chatVariant:_,onPromptClick:k||(()=>{})}):Y.map((m)=>VZ.jsx("div",{className:m.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:VZ.jsx(HI,{message:m,onAction:G,enableWidgets:T,onWidgetRender:F})},m.id))})}function BI({onSendMessage:Y,placeholder:G="Type a message...",disabled:U=!1,isLoading:O=!1,onStop:q,onFileUpload:N,onSwitchMode:L}){let[_,k]=b7.useState(""),[T,F]=b7.useState(!1),[w,b]=b7.useState([]),[M,v]=b7.useState(null),[m,D]=b7.useState(!1),C=b7.useRef(null),V=b7.useRef(null),u=b7.useRef(null),a=(l)=>{if(l.key==="Enter"&&!l.shiftKey)l.preventDefault(),c()},c=()=>{let l=_.trim(),p=w.length>0;if((l||p)&&!U){let i=w.map((Z0)=>Z0.file);if(Y(_.trim(),i.length>0?i:void 0),k(""),b([]),v(null),D(!1),C.current)C.current.style.height="auto"}},g=(l)=>{k(l.target.value),l.target.style.height="auto";let p=l.target.scrollHeight;l.target.style.height=`${p}px`;let i=l.target.value.includes(`
|
|
189
|
-
`),T0=p>36;if(!m&&(i||T0))D(!0);else if(m&&!i&&!T0&&l.target.value.length<20)D(!1)},Q0=(l)=>{if(l.target.files&&l.target.files.length>0){let p=Array.from(l.target.files),i=[],Z0=[];if(p.forEach((T0)=>{let F0=cW(T0);if(F0.valid){let X1={file:T0};if(T0.type.startsWith("image/"))X1.preview=URL.createObjectURL(T0);i.push(X1)}else Z0.push(F0.error||"Invalid file")}),i.length>0)b((T0)=>[...T0,...i]);if(Z0.length>0)v(Z0.join(", ")),setTimeout(()=>v(null),5000);N?.(l.target.files),F(!1),l.target.value=""}},o=(l)=>{b((p)=>{let i=p[l];if(i.preview)URL.revokeObjectURL(i.preview);return p.filter((Z0,T0)=>T0!==l)})},t=(l)=>{if(l.startsWith("image/"))return K1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.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(l==="application/pdf")return K1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.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 K1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.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 K1.jsxs("div",{className:"px-4 py-3 relative",children:[M&&K1.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:K1.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[K1.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),K1.jsx("span",{children:M})]})}),w.length>0&&K1.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:w.map((l,p)=>K1.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:[l.preview?K1.jsx("img",{src:l.preview,alt:l.file.name,className:"w-8 h-8 object-cover rounded"}):K1.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:t(l.file.type)}),K1.jsxs("div",{className:"flex flex-col min-w-0",children:[K1.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:l.file.name}),K1.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:q3(l.file.size)})]}),K1.jsx("button",{onClick:()=>o(p),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:K1.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},p))}),K1.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:m?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[K1.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[K1.jsx("button",{ref:u,onClick:()=>F(!T),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:K1.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:K1.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),T&&K1.jsxs(K1.Fragment,{children:[K1.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>F(!1)}),K1.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:u.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(u.current?.getBoundingClientRect().top??0)+8},children:[K1.jsxs("button",{onClick:()=>{V.current?.click(),F(!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:[K1.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:K1.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)"})}),K1.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),L&&K1.jsxs("button",{onClick:()=>{L(),F(!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:[K1.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),K1.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),K1.jsx("textarea",{ref:C,value:_,onChange:g,onKeyDown:a,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}),K1.jsx("div",{className:"self-end",style:{gridArea:"send"},children:O&&q?K1.jsx("button",{onClick:q,className:"apteva-composer-stop-btn",title:"Stop generation",children:K1.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:K1.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):K1.jsx("button",{onClick:c,disabled:!_.trim()&&w.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:K1.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:K1.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),K1.jsx("input",{ref:V,type:"file",multiple:!0,onChange:Q0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function UI({onExecute:Y,state:G,response:U,error:O,plan:q,streamedContent:N,toolName:L,onApprove:_,onReject:k,onReset:T,onStop:F,onExpand:w,placeholder:b="Enter your command...",disabled:M=!1}){let[v,m]=n7.useState(""),[D,C]=n7.useState([]),[V,u]=n7.useState(null),[a,c]=n7.useState(!1),g=n7.useRef(null),Q0=n7.useRef(null),o=n7.useRef(null),t=()=>{let _0=v.trim(),J0=D.length>0;if((_0||J0)&&!M&&G==="idle"){let d=D.map((A0)=>A0.file);Y(v.trim(),d.length>0?d:void 0),m(""),C([])}},l=(_0)=>{if(_0.key==="Enter"&&!_0.shiftKey)_0.preventDefault(),t()},p=()=>{T?.(),g.current?.focus()},i=(_0)=>{if(m(_0),g.current)g.current.style.height="auto",g.current.style.height=`${Math.min(g.current.scrollHeight,120)}px`},Z0=(_0)=>{if(_0.target.files&&_0.target.files.length>0){let J0=Array.from(_0.target.files),d=[],A0=[];if(J0.forEach((S0)=>{let Z1=cW(S0);if(Z1.valid){let t0={file:S0};if(S0.type.startsWith("image/"))t0.preview=URL.createObjectURL(S0);d.push(t0)}else A0.push(Z1.error||"Invalid file")}),d.length>0)C((S0)=>[...S0,...d]);if(A0.length>0)u(A0.join(", ")),setTimeout(()=>u(null),5000);c(!1),_0.target.value=""}},T0=(_0)=>{C((J0)=>{let d=J0[_0];if(d.preview)URL.revokeObjectURL(d.preview);return J0.filter((A0,S0)=>S0!==_0)})},F0=(_0)=>{if(_0.startsWith("image/"))return i0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.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(_0==="application/pdf")return i0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.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 i0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.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"})})},X1=()=>{if(G==="loading"){if(L)return{text:L,isToolCall:!0};if(N)return{text:N,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}},O1=G!=="idle",{text:X0,isToolCall:U0}=X1();return i0.jsxs("div",{className:"w-full relative",children:[V&&i0.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:i0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-xs",children:[i0.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i0.jsx("span",{children:V})]})}),i0.jsxs("div",{className:K4("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:[i0.jsxs("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:[G==="idle"&&i0.jsxs("div",{className:"relative",children:[i0.jsx("button",{ref:o,onClick:()=>c(!a),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:i0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a&&i0.jsxs(i0.Fragment,{children:[i0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>c(!1)}),i0.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:o.current?.getBoundingClientRect().left??0,top:(o.current?.getBoundingClientRect().bottom??0)+8},children:[i0.jsxs("button",{onClick:()=>{Q0.current?.click(),c(!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:[i0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i0.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)"})}),i0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),w&&i0.jsxs("button",{onClick:()=>{w(),c(!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:[i0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.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"})}),i0.jsx("span",{className:"!text-sm font-medium",children:"Expand to chat"})]})]})]})]}),G==="loading"&&!L&&i0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),G==="loading"&&L&&i0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),D.length>0&&G==="idle"&&i0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:D.map((_0,J0)=>i0.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:_0.file.name,children:[_0.preview?i0.jsx("img",{src:_0.preview,alt:_0.file.name,className:"w-6 h-6 object-cover"}):i0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:F0(_0.file.type)}),i0.jsx("button",{onClick:()=>T0(J0),className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",title:"Remove",children:i0.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},J0))}),G==="idle"?i0.jsx("textarea",{ref:g,value:v,onChange:(_0)=>i(_0.target.value),onKeyDown:l,placeholder:D.length>0?"Add a message...":b,disabled:M,rows:1,className:K4("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"}}):i0.jsx("div",{className:K4("flex-1 text-sm py-1 truncate flex items-center gap-2",G==="loading"&&!U0&&"!text-neutral-600 dark:!text-neutral-400",G==="loading"&&U0&&"!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:U0?i0.jsxs(i0.Fragment,{children:[i0.jsx("span",{className:"font-mono",children:X0}),i0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):X0}),i0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:G==="plan-pending"?i0.jsxs("div",{className:"flex items-center gap-1",children:[i0.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"}),i0.jsx("button",{onClick:k,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"})]}):i0.jsxs(i0.Fragment,{children:[G==="loading"&&F&&i0.jsx("button",{onClick:F,className:"apteva-composer-stop-btn",title:"Stop generation",children:i0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}),(G==="success"||G==="error")&&i0.jsx("button",{onClick:p,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:i0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),G==="idle"&&i0.jsx("button",{onClick:t,disabled:!v.trim()&&D.length===0||M,className:K4("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()||D.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:i0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M12 5l7 7-7 7"})})})]})})]}),i0.jsx("input",{ref:Q0,type:"file",multiple:!0,onChange:Z0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var KI="http://91.99.200.48:3000/agents",WI="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",OI=class{constructor(){SA(this,"config"),this.config={apiUrl:KI,apiKey:WI}}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 T=await q.json().catch(()=>({error:"Request failed"}));throw Error(T.error||`Request failed with status ${q.status}`)}let N=q.body?.getReader();if(!N)throw Error("Response body is not readable");let L=new TextDecoder,_="",k="";while(!0){let{done:T,value:F}=await N.read();if(T)break;_+=L.decode(F,{stream:!0});let w=_.split(`
|
|
190
|
-
`);_=w.pop()||"";for(let b of w){if(!b.trim()||b.startsWith(":"))continue;if(b.startsWith("data: ")){let M=b.slice(6);if(M==="[DONE]"){U?.(k);return}try{let v=JSON.parse(M);if(v.thread_id)k=v.thread_id;G(v)}catch(v){console.warn("[AptevaClient] Failed to parse SSE data:",M)}}}}U?.(k)}catch(q){let N=q instanceof Error?q:Error("Unknown error");throw O?.(N),N}}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 OI,B3=s1.forwardRef(function({agentId:G,threadId:U,initialMessages:O=[],context:q,apiUrl:N,apiKey:L,useMock:_=!1,initialMode:k="chat",showModeToggle:T=!1,onModeChange:F,commandVariant:w="default",planMode:b=!1,onPlanModeChange:M,enableStreaming:v=!0,showProgress:m=!0,loadingText:D="Processing...",welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:u,suggestedPrompts:a,welcomeVariant:c,onThreadChange:g,onMessageSent:Q0,onAction:o,onFileUpload:t,onComplete:l,onError:p,onToolCall:i,onToolResult:Z0,variant:T0="default",placeholder:F0,showHeader:X1=!0,headerTitle:O1="Chat",enableWidgets:X0=!1,availableWidgets:U0,compactWidgetContext:_0=!1,onWidgetRender:J0,className:d},A0){let[S0,Z1]=s1.useState(O),[t0,D0]=s1.useState(!1),[G1,L0]=s1.useState(U||null),[n0,h1]=s1.useState(k),[B4,h4]=s1.useState(null),[j1,W1]=s1.useState("idle"),[r4,o4]=s1.useState(null),[T4,y4]=s1.useState(null),[m5,O4]=s1.useState(0),[F6,L4]=s1.useState(""),[M6,M4]=s1.useState(""),[k4,O6]=s1.useState(null),[m6,j4]=s1.useState(null),[t4,v0]=s1.useState(""),[s0,$1]=s1.useState(""),[p1,e1]=s1.useState(b),[V4,G4]=s1.useState(!1),a4=s1.useRef(null),M1=s1.useRef(null);s1.useImperativeHandle(A0,()=>({sendMessage:async(D1)=>{if(M1.current)await M1.current(D1)},sendSystemMessage:async(D1)=>{if(M1.current)await M1.current(D1,void 0,!0)},getMessages:()=>S0,clearMessages:()=>Z1([])}),[S0]);let b1=s1.useMemo(()=>{if(!X0)return q;let D1=_0?lA(U0):dA(U0);return q?`${q}
|
|
191
|
-
${D1}`:D1},[q,X0,U0,_0]);s1.useEffect(()=>{if(N||L)yQ.configure({...N&&{apiUrl:N},...L&&{apiKey:L}})},[N,L]),s1.useEffect(()=>{if(U)g?.(U)},[U,g]),s1.useEffect(()=>{e1(b)},[b]),s1.useEffect(()=>{let D1=(z4)=>{let U4=z4.target;if(V4&&!U4.closest(".settings-menu-container"))G4(!1)};return document.addEventListener("mousedown",D1),()=>document.removeEventListener("mousedown",D1)},[V4]);let d6=(D1)=>{if(h1(D1),F?.(D1),D1==="command")W1("idle"),o4(null),y4(null)},L6=n0==="chat"?"Type a message...":"Enter your command...",l6=async(D1,z4,U4)=>{let l1=z4&&z4.length>0,f=l1?z4.map((H0)=>({name:H0.name,type:H0.type,size:H0.size,preview:H0.type.startsWith("image/")?URL.createObjectURL(H0):void 0})):[];if(!U4){let H0={id:`msg-${Date.now()}`,role:"user",content:D1,timestamp:new Date,metadata:l1?{attachments:f}:void 0};Z1((N0)=>[...N0,H0]),Q0?.(H0)}D0(!0);try{let H0=await EW(D1,z4);if(_){let N0=await fA(1000);Z1((I)=>[...I,N0])}else{let N0=[],I="",j=[],W0=G1,P0={},f0={},o0=`msg-${Date.now()}`,x0=()=>{let O0=[...N0];if(I){let k0=O0[O0.length-1];if(k0&&k0.type==="text")k0.content=I;else O0.push({type:"text",content:I})}Z1((k0)=>{let r0=k0[k0.length-1];if(r0&&r0.role==="assistant")return[...k0.slice(0,-1),{...r0,content:I,widgets:j.length>0?j:void 0,metadata:{...r0.metadata,content_segments:O0,isStreaming:!0}}];else return[...k0,{id:o0,role:"assistant",content:I,widgets:j.length>0?j:void 0,timestamp:new Date,metadata:{content_segments:O0,isStreaming:!0}}]})};await yQ.chatStream({agent_id:G,message:H0,stream:!0,...G1&&{thread_id:G1},...b1&&{system:b1}},(O0)=>{switch(O0.type){case"thread_id":if(O0.thread_id){if(W0=O0.thread_id,!G1)L0(O0.thread_id),g?.(O0.thread_id)}break;case"request_id":if(O0.request_id)j4(O0.request_id);break;case"content":case"token":if(O0.content)I+=O0.content,x0();break;case"tool_call":if(O0.tool_id&&O0.tool_name){let k0=O0.tool_display_name||O0.tool_name;if(I)N0.push({type:"text",content:I}),I="";N0.push({type:"tool",id:O0.tool_id,name:k0,status:"preparing"}),P0[O0.tool_id]="",h4(k0),i?.(O0.tool_name,O0.tool_id),x0()}break;case"tool_input_delta":if(O0.tool_id&&O0.content){let k0=O0.tool_id;if(P0[k0]===void 0)P0[k0]="";P0[k0]+=O0.content;let r0=N0.find((m1)=>m1.type==="tool"&&m1.id===k0);if(r0){if(r0.isReceiving=!0,r0.inputLength=P0[k0].length,x0(),f0[k0])clearTimeout(f0[k0]);f0[k0]=setTimeout(()=>{if(r0.status==="preparing")r0.isReceiving=!1,x0()},150)}}break;case"tool_use":if(O0.tool_id){let k0=N0.find((r0)=>r0.type==="tool"&&r0.id===O0.tool_id);if(k0&&k0.status==="preparing")k0.status="running",k0.isReceiving=!1,x0()}break;case"tool_stream":if(O0.tool_id){let k0=N0.find((r0)=>r0.type==="tool"&&r0.id===O0.tool_id);if(k0){if(O0.event==="chunk"&&O0.content){if(k0.pendingReset)k0.streamOutput="",k0.pendingReset=!1;k0.streamOutput=(k0.streamOutput||"")+O0.content,x0()}else if(O0.event==="log"||O0.event==="progress")k0.pendingReset=!0}}break;case"tool_result":if(O0.tool_id){let k0=N0.find((r0)=>r0.type==="tool"&&r0.id===O0.tool_id);if(k0)k0.result=O0.content,k0.status="completed",k0.isReceiving=!1,Z0?.(k0.name,O0.content);h4(null),x0()}break;case"widget":if(O0.widget)j.push(O0.widget),x0();break;case"error":throw Error(O0.message||"Stream error")}},(O0)=>{if(I){let k0=N0[N0.length-1];if(k0&&k0.type==="text")k0.content=I;else N0.push({type:"text",content:I})}if(Z1((k0)=>{let r0=k0[k0.length-1];if(r0&&r0.role==="assistant")return[...k0.slice(0,-1),{...r0,content:I||"Response received",widgets:j.length>0?j:void 0,metadata:{thread_id:O0,content_segments:N0,isStreaming:!1}}];return k0}),O0&&O0!==G1)L0(O0),g?.(O0);D0(!1),j4(null),h4(null)},(O0)=>{let k0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${O0.message}`,timestamp:new Date,metadata:{error:!0}};Z1((r0)=>{let m1=r0[r0.length-1];if(m1&&m1.id.includes("streaming"))return[...r0.slice(0,-1),k0];return[...r0,k0]}),D0(!1),j4(null),h4(null),p?.(O0)})}}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}};Z1((I)=>[...I,N0]),p?.(H0 instanceof Error?H0:Error("Unknown error"))}finally{D0(!1)}};M1.current=l6;let X7=async(D1,z4)=>{let U4=D1||F6;if(!U4.trim()&&(!z4||z4.length===0)){y4(Error("Please enter a command")),W1("error");return}if(p1&&j1!=="plan-pending"){if(W1("loading"),y4(null),L4(""),_)setTimeout(()=>{let l1=`1. Analyze the request: "${U4}"
|
|
192
|
-
2. Process the data
|
|
193
|
-
3. Generate response
|
|
194
|
-
4. Return results`;v0(l1),$1(U4),W1("plan-pending")},800);else try{let f=b1?`${b1}
|
|
195
|
-
|
|
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:U4,stream:!1,system:f});v0(H0.message),$1(U4),W1("plan-pending")}catch(l1){let f=l1 instanceof Error?l1:Error("Failed to generate plan");y4(f),W1("error"),p?.(f)}return}W1("loading"),y4(null),O4(0),M4(""),L4("");try{if(_)if(v){let l1="";VA(U4,(f)=>{if(f.type==="token"&&f.content){l1+=f.content,M4(l1);let H0=Math.min(Math.round(l1.length/10),90);O4(H0)}},(f)=>{let H0={success:!0,data:{summary:l1,thread_id:f},message:l1||"Command executed successfully"};o4(H0),W1("success"),O4(100),l?.(H0)},(f)=>{y4(f),W1("error"),p?.(f)})}else{await new Promise((f)=>setTimeout(f,1500));let l1={success:!0,data:{summary:`Executed: ${U4}`},message:"Command executed successfully"};o4(l1),W1("success"),O4(100),l?.(l1)}else{let f=b1?`${b1}
|
|
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=z4&&z4.length>0?await EW(U4,z4):U4;if(v){let N0="",I="";await yQ.chatStream({agent_id:G,message:H0,stream:!0,...G1&&{thread_id:G1},system:f},(j)=>{if((j.type==="token"||j.type==="content")&&j.content){N0+=j.content,M4(N0),O6(null);let W0=Math.min(Math.round(N0.length/10),90);O4(W0)}else if(j.type==="tool_call"&&j.tool_name){let W0=j.tool_display_name||j.tool_name;I=j.tool_name,O6(W0),i?.(j.tool_name,j.tool_id||""),N0="",M4("")}else if(j.type==="tool_result")Z0?.(I,j.content),O6(null);else if(j.type==="thread_id"&&j.thread_id){if(!G1)L0(j.thread_id),g?.(j.thread_id)}else if(j.type==="request_id"&&j.request_id)j4(j.request_id)},(j)=>{let W0={success:!0,data:{summary:N0,thread_id:j},message:N0||"Command executed successfully"};o4(W0),W1("success"),O4(100),j4(null),l?.(W0)},(j)=>{y4(j),W1("error"),j4(null),p?.(j)})}else{let N0=await yQ.chat({agent_id:G,message:H0,stream:!1,...G1&&{thread_id:G1},system:f}),I={success:!0,data:{summary:N0.message,thread_id:N0.thread_id},widgets:N0.widgets,message:N0.message};o4(I),W1("success"),O4(100),l?.(I)}}}catch(l1){let f=l1 instanceof Error?l1:Error("Unknown error");y4(f),W1("error"),p?.(f)}},u5=()=>{W1("idle"),o4(null),y4(null),O4(0),L4(""),v0(""),$1(""),M4(""),O6(null)},Z7=()=>{let D1=t4;v0(""),$1("");let z4=`Execute this plan now:
|
|
199
|
-
|
|
200
|
-
${D1}`;X7(z4)},F5=()=>{L4(s0),v0(""),$1(""),W1("idle")},u6=async()=>{if(m6&&G)try{await yQ.cancelRequest(G,m6)}catch(D1){console.error("Failed to cancel request:",D1)}if(D0(!1),j1==="loading")W1("idle"),M4(""),O6(null),O4(0);j4(null)},g5=w==="compact";return z5.jsxs("div",{className:K4("apteva-chat flex flex-col h-full",T0!=="default"&&`apteva-chat-${T0}`,d),children:[X1&&n0==="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:O1}),z5.jsx("div",{className:K4("apteva-chat-status",t0?B4?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:t0?B4?`Using ${B4}...`:"Thinking...":"Ready"})]})}),n0==="chat"&&z5.jsxs(z5.Fragment,{children:[z5.jsx(qI,{messages:S0,onAction:o,welcomeTitle:C,welcomeSubtitle:V,welcomeIcon:u,suggestedPrompts:a,welcomeVariant:c,chatVariant:T0,onPromptClick:(D1)=>l6(D1),enableWidgets:X0,onWidgetRender:J0}),z5.jsx(BI,{onSendMessage:l6,placeholder:F0||L6,disabled:t0,isLoading:t0,onStop:u6,onFileUpload:t,onSwitchMode:T?()=>d6("command"):void 0})]}),n0==="command"&&z5.jsx("div",{className:"w-full",children:z5.jsx(UI,{onExecute:(D1,z4)=>{L4(D1),X7(D1,z4)},state:j1,response:r4?.data?.summary||r4?.message,error:T4?.message,plan:t4,streamedContent:M6,toolName:k4,onApprove:Z7,onReject:F5,onReset:u5,onStop:u6,onExpand:T?()=>d6("chat"):void 0,placeholder:F0||"Enter your command..."})}),z5.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
201
|
-
@keyframes pulse-border {
|
|
202
|
-
0%, 100% { border-color: rgb(59, 130, 246); }
|
|
203
|
-
50% { border-color: rgb(147, 197, 253); }
|
|
204
|
-
}
|
|
205
|
-
.animate-pulse-border {
|
|
206
|
-
animation: pulse-border 2s ease-in-out infinite;
|
|
207
|
-
}
|
|
208
|
-
.apteva-composer {
|
|
209
|
-
border-radius: var(--apteva-border-radius, 1rem) !important;
|
|
210
|
-
}
|
|
211
|
-
`}})]})});var q4=q0(Y1(),1),XO=Q7.createContext(null);function ZO(){return Q7.useContext(XO)}function JO({children:Y}){let{authFetch:G,isAuthenticated:U,isLoading:O}=A1(),[q,N]=Q7.useState(null),[L,_]=Q7.useState(!1),[k,T]=Q7.useState(!1),[F,w]=Q7.useState(null),b=async()=>{try{let u=await(await G("/api/meta-agent/status")).json();N(u)}catch(V){console.error("[MetaAgent] Failed to fetch status:",V)}};Q7.useEffect(()=>{if(!O&&U)b()},[G,U,O]);let M=async()=>{T(!0),w(null);try{let V=await G("/api/meta-agent/start",{method:"POST"}),u=await V.json();if(!V.ok)w(u.error||"Failed to start assistant");else await b()}catch(V){w("Failed to start assistant")}T(!1)},v=!!(q?.enabled&&q?.available),m=q?.agent,D=!!(m?.status==="running"&&m?.port),C={status:q,isOpen:L,isStarting:k,error:F,isAvailable:v,isRunning:D,agent:m,toggle:()=>_(!L),close:()=>_(!1),startAgent:M};return q4.jsxDEV(XO.Provider,{value:C,children:Y},void 0,!1,void 0,this)}function YO(){let Y=ZO();if(!Y?.isAvailable)return null;return q4.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:[q4.jsxDEV(HO,{className:"w-5 h-5"},void 0,!1,void 0,this),q4.jsxDEV("span",{className:"text-sm",children:"Assistant"},void 0,!1,void 0,this),Y.isRunning&&q4.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 $O(){let Y=ZO();if(!Y?.isAvailable||!Y.isOpen)return null;let{agent:G,isRunning:U,error:O,isStarting:q,startAgent:N,close:L}=Y;return q4.jsxDEV(q4.Fragment,{children:[q4.jsxDEV("div",{className:"hidden md:block fixed inset-0 bg-black/20 z-40",onClick:L},void 0,!1,void 0,this),q4.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:[q4.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#1a1a1a] bg-[#111]",children:[q4.jsxDEV("div",{className:"flex items-center gap-2",children:[q4.jsxDEV("div",{className:`w-2 h-2 rounded-full ${U?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),q4.jsxDEV("span",{className:"font-medium text-sm",children:"Apteva Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q4.jsxDEV("button",{onClick:L,className:"text-[#666] hover:text-[#888] transition",children:q4.jsxDEV(RI,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q4.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col",children:U?q4.jsxDEV(B3,{agentId:"default",apiUrl:`/api/agents/${G.id}`,placeholder:"Ask me anything about Apteva...",variant:"terminal",showHeader:!1},void 0,!1,void 0,this):q4.jsxDEV("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:[q4.jsxDEV(HO,{className:"w-12 h-12 text-[#333] mb-4"},void 0,!1,void 0,this),q4.jsxDEV("h3",{className:"font-medium mb-2",children:"Apteva Assistant"},void 0,!1,void 0,this),q4.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),O&&q4.jsxDEV("p",{className:"text-sm text-red-400 mb-4",children:O},void 0,!1,void 0,this),q4.jsxDEV("button",{onClick:N,disabled:q,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-white px-6 py-2 rounded font-medium transition",children:q?"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 HO({className:Y="w-6 h-6"}){return q4.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q4.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 RI(){return q4.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q4.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 f1=q0(Y1(),1);function U3({onMenuClick:Y}){let{connected:G}=TQ(),{user:U,logout:O}=A1(),{projects:q,currentProjectId:N,currentProject:L,setCurrentProjectId:_,unassignedCount:k,projectsEnabled:T}=E4(),[F,w]=z9.useState(!1),[b,M]=z9.useState(!1),v=async()=>{await O(),w(!1)},m=(V)=>{_(V),M(!1)},D=()=>{if(N===null)return"All Projects";if(N==="unassigned")return"Unassigned";return L?.name||"Select Project"},C=()=>{if(N===null)return"#666";if(N==="unassigned")return"#888";return L?.color||"#6366f1"};return f1.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:f1.jsxDEV("div",{className:"flex items-center justify-between",children:[f1.jsxDEV("div",{className:"flex items-center gap-3",children:[f1.jsxDEV("button",{onClick:Y,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:f1.jsxDEV(kW,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),f1.jsxDEV("div",{className:"flex items-center gap-2",children:[f1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T&&q.length>0&&f1.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[f1.jsxDEV("button",{onClick:()=>M(!b),className:"flex items-center gap-2 px-3 py-1.5 rounded border border-[#222] bg-[#111] hover:bg-[#1a1a1a] transition text-sm",children:[f1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:C()}},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:D()},void 0,!1,void 0,this),f1.jsxDEV(vW,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&f1.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:f1.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[f1.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 ${N===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[f1.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)=>f1.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 ${N===V.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[f1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:V.color}},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"truncate",children:V.name},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:V.agentCount},void 0,!1,void 0,this)]},V.id,!0,void 0,this)),k>0&&f1.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 ${N==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[f1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),f1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:k},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),f1.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[f1.jsxDEV("div",{className:"flex items-center gap-2",children:[f1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${G?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),f1.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),f1.jsxDEV(YO,{},void 0,!1,void 0,this),U&&f1.jsxDEV("div",{className:"relative",children:[f1.jsxDEV("button",{onClick:()=>w(!F),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[f1.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),f1.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),F&&f1.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[f1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[f1.jsxDEV("p",{className:"text-sm font-medium",children:U.username},void 0,!1,void 0,this),f1.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:U.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),f1.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 X4=q0(Y1(),1);function K3({route:Y,agentCount:G,taskCount:U,onNavigate:O,isOpen:q,onClose:N}){let L=(_)=>{O(_),N?.()};return X4.jsxDEV(X4.Fragment,{children:[q&&X4.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:N},void 0,!1,void 0,this),X4.jsxDEV("aside",{className:`
|
|
212
|
-
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
|
-
md:relative md:w-56 md:translate-x-0 md:z-auto
|
|
214
|
-
${q?"translate-x-0":"-translate-x-full"}
|
|
215
|
-
`,children:[X4.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[X4.jsxDEV("div",{className:"flex items-center gap-2",children:[X4.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),X4.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X4.jsxDEV("button",{onClick:N,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:X4.jsxDEV(f5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X4.jsxDEV("nav",{className:"space-y-1",children:[X4.jsxDEV(S8,{icon:X4.jsxDEV(Y3,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV($3,{},void 0,!1,void 0,this),label:"Agents",active:Y==="agents",onClick:()=>L("agents"),badge:G>0?String(G):void 0},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(h5,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>L("tasks"),badge:U&&U>0?String(U):void 0},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(y5,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(fZ,{},void 0,!1,void 0,this),label:"Skills",active:Y==="skills",onClick:()=>L("skills")},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(jG,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(TW,{},void 0,!1,void 0,this),label:"API",active:Y==="api",onClick:()=>L("api")},void 0,!1,void 0,this),X4.jsxDEV(S8,{icon:X4.jsxDEV(H3,{},void 0,!1,void 0,this),label:"Settings",active:Y==="settings",onClick:()=>L("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 S8({icon:Y,label:G,active:U,onClick:O,badge:q}){return X4.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&&X4.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 mZ=q0(Y1(),1);function W3({message:Y,onDismiss:G}){return mZ.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:[mZ.jsxDEV("span",{children:Y},void 0,!1,void 0,this),mZ.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:mZ.jsxDEV(f5,{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=q0(k1(),1);var X6=q0(Y1(),1);function O3(){let{login:Y}=A1(),[G,U]=uZ.useState(""),[O,q]=uZ.useState(""),[N,L]=uZ.useState(null),[_,k]=uZ.useState(!1);return X6.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:X6.jsxDEV("div",{className:"w-full max-w-md",children:[X6.jsxDEV("div",{className:"text-center mb-8",children:[X6.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[X6.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),X6.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X6.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X6.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[X6.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),X6.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),X6.jsxDEV("form",{onSubmit:async(F)=>{F.preventDefault(),L(null),k(!0);let w=await Y(G,O);if(!w.success)L(w.error||"Login failed");k(!1)},className:"space-y-4",children:[X6.jsxDEV("div",{children:[X6.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),X6.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(F)=>U(F.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),X6.jsxDEV("div",{children:[X6.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),X6.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(F)=>q(F.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),N&&X6.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:N},void 0,!1,void 0,this),X6.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 f8=q0(k1(),1),w4=q0(Y1(),1);function L3({onComplete:Y}){let[G,U]=f8.useState(""),[O,q]=f8.useState(""),[N,L]=f8.useState(""),[_,k]=f8.useState(""),[T,F]=f8.useState(!1),[w,b]=f8.useState(null),[M,v]=f8.useState(!1);return w4.jsxDEV(w4.Fragment,{children:[w4.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),w4.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),w4.jsxDEV("form",{onSubmit:async(D)=>{if(D.preventDefault(),b(null),O!==N){b("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){b(V.error||"Failed to create account"),v(!1);return}let u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!u.ok){b("Account created but login failed. Please try logging in."),v(!1);return}let a=await u.json();if(a.accessToken)sessionStorage.setItem("accessToken",a.accessToken);Y({username:G})}catch(C){b("Failed to create account"),v(!1)}},className:"space-y-4",children:[w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(D)=>U(D.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),w4.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),w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(D)=>q(D.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),w4.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),w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),w4.jsxDEV("input",{id:"confirmPassword",type:"password",value:N,onChange:(D)=>L(D.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),!T?w4.jsxDEV("button",{type:"button",onClick:()=>F(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):w4.jsxDEV("div",{children:[w4.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",w4.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w4.jsxDEV("input",{id:"email",type:"email",value:_,onChange:(D)=>k(D.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),w4.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),w&&w4.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:w},void 0,!1,void 0,this),w4.jsxDEV("button",{type:"submit",disabled:M||!G||!O||!N,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:M?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w4.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 V5=q0(k1(),1);var d0=q0(Y1(),1);function gZ({onComplete:Y,needsAccount:G=!1}){let[U,O]=V5.useState(G?0:1),[q,N]=V5.useState([]),[L,_]=V5.useState(null),[k,T]=V5.useState(""),[F,w]=V5.useState(!1),[b,M]=V5.useState(!1),[v,m]=V5.useState(null),[D,C]=V5.useState(null),[V,u]=V5.useState(!1),a=()=>{let p=sessionStorage.getItem("accessToken");return p?{Authorization:`Bearer ${p}`}:{}};V5.useEffect(()=>{if(G&&!V&&U===0)return;fetch("/api/providers",{headers:a()}).then((p)=>p.json()).then((p)=>{let i=(p.providers||[]).filter((Z0)=>Z0.type==="llm");N(i)})},[V,U,G]);let c=q.filter((p)=>p.hasKey),g=async()=>{if(!L||!k)return;w(!0),m(null),C(null);try{M(!0);let i=await(await fetch(`/api/keys/${L}/test`,{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({key:k})})).json();if(M(!1),!i.valid){m(i.error||"API key is invalid"),w(!1);return}let Z0=await fetch(`/api/keys/${L}`,{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({key:k})}),T0=await Z0.json();if(!Z0.ok)m(T0.error||"Failed to save key");else{C("API key saved successfully!"),T("");let X1=await(await fetch("/api/providers",{headers:a()})).json();N(X1.providers||[]),_(null)}}catch(p){m("Failed to save key")}w(!1)},Q0=async()=>{try{let p=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...a()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(p.ok){let i=await p.json();if(i.project?.id)localStorage.setItem("apteva_current_project",i.project.id)}}catch(p){console.error("Failed to create default project:",p)}await fetch("/api/onboarding/complete",{method:"POST",headers:a()}),Y()},o=()=>{u(!0),O(1)},t=G?3:2,l=G?U:U-1;return d0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:d0.jsxDEV("div",{className:"w-full max-w-2xl",children:[d0.jsxDEV("div",{className:"text-center mb-8",children:[d0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[d0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),d0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),d0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),d0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&d0.jsxDEV(d0.Fragment,{children:[d0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),d0.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),d0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${U>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),d0.jsxDEV("div",{className:`w-16 h-0.5 ${U>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),d0.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),d0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[U===0&&G&&d0.jsxDEV(L3,{onComplete:o},void 0,!1,void 0,this),U===1&&d0.jsxDEV(bI,{providers:q,configuredProviders:c,selectedProvider:L,apiKey:k,saving:F,testing:b,error:v,success:D,onSelectProvider:_,onApiKeyChange:T,onSaveKey:g,onContinue:()=>O(2)},void 0,!1,void 0,this),U===2&&d0.jsxDEV(FI,{configuredProviders:c,onAddMore:()=>O(1),onComplete:Q0},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 bI({providers:Y,configuredProviders:G,selectedProvider:U,apiKey:O,saving:q,testing:N,error:L,success:_,onSelectProvider:k,onApiKeyChange:T,onSaveKey:F,onContinue:w}){let b=Y.find((M)=>M.id===U);if(U&&b)return d0.jsxDEV(d0.Fragment,{children:[d0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",b.name," Key"]},void 0,!0,void 0,this),d0.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),d0.jsxDEV("div",{className:"mb-6",children:[d0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:d0.jsxDEV("div",{className:"flex items-center justify-between",children:[d0.jsxDEV("div",{children:[d0.jsxDEV("p",{className:"font-medium",children:b.name},void 0,!1,void 0,this),d0.jsxDEV("p",{className:"text-sm text-[#666]",children:[b.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),d0.jsxDEV("a",{href:b.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),d0.jsxDEV("div",{className:"space-y-3",children:[d0.jsxDEV("input",{type:"password",value:O,onChange:(M)=>T(M.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),L&&d0.jsxDEV("p",{className:"text-red-400 text-sm",children:L},void 0,!1,void 0,this),_&&d0.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),d0.jsxDEV("div",{className:"flex gap-3",children:[d0.jsxDEV("button",{onClick:()=>{k(null),T("")},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),d0.jsxDEV("button",{onClick:F,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:N?"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 d0.jsxDEV(d0.Fragment,{children:[d0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),d0.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),d0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((M)=>d0.jsxDEV(wI,{provider:M,selected:!1,onSelect:()=>!M.hasKey&&k(M.id)},M.id,!1,void 0,this))},void 0,!1,void 0,this),d0.jsxDEV("button",{onClick:w,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 wI({provider:Y,selected:G,onSelect:U}){return d0.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:d0.jsxDEV("div",{className:"flex items-center justify-between",children:[d0.jsxDEV("div",{children:[d0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),d0.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?d0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[d0.jsxDEV(G5,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):d0.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 FI({configuredProviders:Y,onAddMore:G,onComplete:U}){return d0.jsxDEV(d0.Fragment,{children:[d0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),d0.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),d0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>d0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[d0.jsxDEV(G5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),d0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),d0.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),d0.jsxDEV("div",{className:"flex gap-3",children:[d0.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),d0.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 u1=q0(k1(),1);var h=q0(Y1(),1);function _3(){let{projectsEnabled:Y}=E4(),[G,U]=u1.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 h.jsxDEV("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden",children:[h.jsxDEV("div",{className:"md:hidden border-b border-[#1a1a1a] bg-[#0a0a0a]",children:h.jsxDEV("div",{className:"flex overflow-x-auto",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:O.map((q)=>h.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),h.jsxDEV("div",{className:"hidden md:block w-48 border-r border-[#1a1a1a] p-4 flex-shrink-0",children:[h.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),h.jsxDEV("nav",{className:"space-y-1",children:O.map((q)=>h.jsxDEV(MI,{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),h.jsxDEV("div",{className:"flex-1 overflow-auto p-4 md:p-6",children:[G==="providers"&&h.jsxDEV(PI,{},void 0,!1,void 0,this),G==="projects"&&Y&&h.jsxDEV(AI,{},void 0,!1,void 0,this),G==="account"&&h.jsxDEV(CI,{},void 0,!1,void 0,this),G==="updates"&&h.jsxDEV(TI,{},void 0,!1,void 0,this),G==="data"&&h.jsxDEV(SI,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function MI({label:Y,active:G,onClick:U}){return h.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 PI(){let{authFetch:Y}=A1(),[G,U]=u1.useState([]),[O,q]=u1.useState(null),[N,L]=u1.useState(""),[_,k]=u1.useState(!1),[T,F]=u1.useState(!1),[w,b]=u1.useState(null),[M,v]=u1.useState(null),{confirm:m,ConfirmDialog:D}=S5(),C=async()=>{let t=await(await Y("/api/providers")).json();U(t.providers||[])};u1.useEffect(()=>{C()},[]);let V=async()=>{if(!O||!N)return;k(!0),b(null),v(null);try{F(!0);let t=await(await Y(`/api/keys/${O}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:N})})).json();if(F(!1),!t.valid){b(t.error||"API key is invalid"),k(!1);return}let l=await Y(`/api/keys/${O}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:N})}),p=await l.json();if(!l.ok)b(p.error||"Failed to save key");else{let i="API key saved!";if(p.restartedAgents&&p.restartedAgents.length>0){let Z0=p.restartedAgents.filter((F0)=>F0.success).length;if(p.restartedAgents.length-Z0===0)i+=` Restarted ${Z0} agent${Z0>1?"s":""} with new key.`;else i+=` Restarted ${Z0}/${p.restartedAgents.length} agents.`}v(i),L(""),q(null),C()}}catch(o){b("Failed to save key")}k(!1)},u=async(o)=>{if(!await m("Are you sure you want to remove this API key?",{confirmText:"Remove",title:"Remove API Key"}))return;await Y(`/api/keys/${o}`,{method:"DELETE"}),C()},a=G.filter((o)=>o.type==="llm"),c=G.filter((o)=>o.type==="integration"),g=a.filter((o)=>o.hasKey).length,Q0=c.filter((o)=>o.hasKey).length;return u1.useEffect(()=>{if(M&&!O){let o=setTimeout(()=>v(null),5000);return()=>clearTimeout(o)}},[M,O]),h.jsxDEV(h.Fragment,{children:[D,h.jsxDEV("div",{className:"space-y-10",children:[M&&!O&&h.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center justify-between",children:[h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400",children:[h.jsxDEV(G5,{className:"w-5 h-5"},void 0,!1,void 0,this),h.jsxDEV("span",{children:M},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:()=>v(null),className:"text-green-400 hover:text-green-300",children:h.jsxDEV(f5,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",g," of ",a.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:a.map((o)=>h.jsxDEV(kI,{provider:o,isEditing:O===o.id,apiKey:N,saving:_,testing:T,error:O===o.id?w:null,success:O===o.id?M:null,onStartEdit:()=>{q(o.id),b(null),v(null)},onCancelEdit:()=>{q(null),L(""),b(null)},onApiKeyChange:L,onSave:V,onDelete:()=>u(o.id)},o.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",Q0," of ",c.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:c.map((o)=>h.jsxDEV(vI,{provider:o,isEditing:O===o.id,apiKey:N,saving:_,testing:T,error:O===o.id?w:null,success:O===o.id?M:null,onStartEdit:()=>{q(o.id),b(null),v(null)},onCancelEdit:()=>{q(null),L(""),b(null)},onApiKeyChange:L,onSave:V,onDelete:()=>u(o.id)},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,!0,void 0,this)}var Q9=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function AI(){let{projects:Y,createProject:G,updateProject:U,deleteProject:O}=E4(),[q,N]=u1.useState(!1),[L,_]=u1.useState(null),{confirm:k,ConfirmDialog:T}=S5(),F=async(v)=>{if(!await k("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)},w=()=>{_(null),N(!0)},b=(v)=>{_(v),N(!0)},M=()=>{N(!1),_(null)};return h.jsxDEV(h.Fragment,{children:[T,h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),h.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),h.jsxDEV("button",{onClick:w,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:[h.jsxDEV(CW,{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?h.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[h.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),h.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):h.jsxDEV("div",{className:"space-y-3",children:Y.map((v)=>h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[h.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:v.color}},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex-1 min-w-0",children:[h.jsxDEV("h3",{className:"font-medium",children:v.name},void 0,!1,void 0,this),v.description&&h.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:v.description},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.jsxDEV("button",{onClick:()=>b(v),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:()=>F(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&&h.jsxDEV(II,{project:L,onSave:async(v)=>{if(L){let m=await U(L.id,v);if(m)M();return!!m}else{let m=await G(v);if(m)M();return!!m}},onClose:M},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function II({project:Y,onSave:G,onClose:U}){let[O,q]=u1.useState(Y?.name||""),[N,L]=u1.useState(Y?.description||""),[_,k]=u1.useState(Y?.color||Q9[Math.floor(Math.random()*Q9.length)]),[T,F]=u1.useState(!1),[w,b]=u1.useState(null),M=async()=>{if(!O.trim()){b("Name is required");return}F(!0),b(null);let v=await G({name:O,description:N||void 0,color:_});if(F(!1),!v)b(Y?"Failed to update project":"Failed to create project")};return h.jsxDEV(kQ,{onClose:U,children:[h.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"text",value:N,onChange:(v)=>L(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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:Q9.map((v)=>h.jsxDEV("button",{type:"button",onClick:()=>k(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),w&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex gap-3 mt-6",children:[h.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),h.jsxDEV("button",{onClick:M,disabled:T||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:T?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function TI(){let{authFetch:Y}=A1(),[G,U]=u1.useState(null),[O,q]=u1.useState(!1),[N,L]=u1.useState(!1),[_,k]=u1.useState(null),[T,F]=u1.useState(null),[w,b]=u1.useState(null),M=async()=>{q(!0),k(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){k("Failed to check for updates")}q(!1)},v=async()=>{L(!0),k(null),F(null);try{let V=await(await Y("/api/version/update",{method:"POST"})).json();if(!V.success)k(V.error||"Update failed");else{let u=V.restarted?.length||0,a=u>0?` ${u} running agent${u>1?"s":""} restarted.`:"";F(`Agent binary updated to v${V.version}.${a}`),await M()}}catch(C){k("Failed to update agent")}L(!1)};u1.useEffect(()=>{M()},[]);let m=(C,V)=>{navigator.clipboard.writeText(C),b(V),setTimeout(()=>b(null),2000)},D=G?.apteva.updateAvailable||G?.agent.updateAvailable;return h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),h.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?h.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):_&&!G?h.jsxDEV("div",{className:"text-red-400",children:_},void 0,!1,void 0,this):G?.isDocker?h.jsxDEV("div",{className:"space-y-6",children:[h.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[h.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[h.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:h.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),h.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"text-right",children:h.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),D?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.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),h.jsxDEV("div",{className:"space-y-2",children:[h.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),h.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),h.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),b("docker"),setTimeout(()=>b(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:w==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G5,{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),h.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?h.jsxDEV("div",{className:"space-y-6",children:[T&&h.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:T},void 0,!1,void 0,this),_&&h.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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"text-right",children:[h.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&h.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?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-2",children:[h.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),h.jsxDEV("button",{onClick:()=>m("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:w==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G5,{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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"text-right",children:[h.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&h.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?h.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[h.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),h.jsxDEV("div",{className:"flex items-center gap-2",children:h.jsxDEV("button",{onClick:v,disabled:N,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:N?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[h.jsxDEV(G5,{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),!D&&!T&&h.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:[h.jsxDEV(G5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),h.jsxDEV("button",{onClick:M,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 kI({provider:Y,isEditing:G,apiKey:U,saving:O,testing:q,error:N,success:L,onStartEdit:_,onCancelEdit:k,onApiKeyChange:T,onSave:F,onDelete:w}){let b=Y.id==="ollama",[M,v]=u1.default.useState(null);return u1.default.useEffect(()=>{if(b&&Y.hasKey)fetch("/api/providers/ollama/status").then((m)=>m.json()).then((m)=>v({connected:m.connected,modelCount:m.modelCount})).catch(()=>v({connected:!1}))},[b,Y.hasKey]),h.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[h.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[h.jsxDEV("div",{className:"min-w-0",children:[h.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":b?"Run models locally":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?h.jsxDEV("span",{className:`text-xs flex items-center gap-1 px-2 py-1 rounded whitespace-nowrap flex-shrink-0 ${b&&M?M.connected?"text-green-400 bg-green-500/10":"text-yellow-400 bg-yellow-500/10":"text-green-400 bg-green-500/10"}`,children:b&&M?M.connected?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(G5,{className:"w-3 h-3"},void 0,!1,void 0,this),M.modelCount," models"]},void 0,!0,void 0,this):h.jsxDEV(h.Fragment,{children:"Not running"},void 0,!1,void 0,this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV(G5,{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):h.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),h.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?h.jsxDEV("div",{className:"space-y-3",children:[h.jsxDEV("input",{type:b?"text":"password",value:U,onChange:(m)=>T(m.target.value),placeholder:b?"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),b&&h.jsxDEV("p",{className:"text-xs text-[#666]",children:"Enter your Ollama server URL. Default is http://localhost:11434"},void 0,!1,void 0,this),N&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:N},void 0,!1,void 0,this),L&&h.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{onClick: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),h.jsxDEV("button",{onClick:F,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...":b?"Connect":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):Y.hasKey?h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:b?"Download Ollama":"View docs"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex items-center gap-3",children:[h.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:b?"Change URL":"Update key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:w,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):h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:b?"Download Ollama":"Get API key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:_,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:b?"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:N,success:L,onStartEdit:_,onCancelEdit:k,onApiKeyChange:T,onSave:F,onDelete:w}){return h.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[h.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[h.jsxDEV("div",{children:[h.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),h.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?h.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[h.jsxDEV(G5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):h.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),h.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?h.jsxDEV("div",{className:"space-y-3",children:[h.jsxDEV("input",{type:"password",value:U,onChange:(b)=>T(b.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),N&&h.jsxDEV("p",{className:"text-red-400 text-sm",children:N},void 0,!1,void 0,this),L&&h.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),h.jsxDEV("div",{className:"flex gap-2",children:[h.jsxDEV("button",{onClick: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),h.jsxDEV("button",{onClick:F,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?h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.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),h.jsxDEV("div",{className:"flex items-center gap-3",children:[h.jsxDEV("button",{onClick:_,className:"text-sm text-[#888] hover:text-[#e0e0e0]",children:"Update key"},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:w,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):h.jsxDEV("div",{className:"flex items-center justify-between",children:[h.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),h.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)}function CI(){let{authFetch:Y,user:G}=A1(),[U,O]=u1.useState(""),[q,N]=u1.useState(""),[L,_]=u1.useState(""),[k,T]=u1.useState(!1),[F,w]=u1.useState(null),b=async()=>{if(!U||!q||!L){w({type:"error",text:"All fields are required"});return}if(q!==L){w({type:"error",text:"New passwords do not match"});return}if(q.length<8){w({type:"error",text:"Password must be at least 8 characters"});return}T(!0),w(null);try{let M=await Y("/api/auth/password",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:U,newPassword:q})}),v=await M.json();if(M.ok)w({type:"success",text:"Password updated successfully"}),O(""),N(""),_("");else w({type:"error",text:v.error||"Failed to update password"})}catch{w({type:"error",text:"Failed to update password"})}T(!1)};return h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Account Settings"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:"Manage your account and security."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G&&h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 mb-6",children:[h.jsxDEV("h3",{className:"font-medium mb-3",children:"Profile"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-2 text-sm",children:[h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Username"},void 0,!1,void 0,this),h.jsxDEV("span",{children:G.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.email&&h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Email"},void 0,!1,void 0,this),h.jsxDEV("span",{children:G.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"flex justify-between",children:[h.jsxDEV("span",{className:"text-[#666]",children:"Role"},void 0,!1,void 0,this),h.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),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[h.jsxDEV("h3",{className:"font-medium mb-4",children:"Change Password"},void 0,!1,void 0,this),h.jsxDEV("div",{className:"space-y-4 max-w-md",children:[h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Current Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:U,onChange:(M)=>O(M.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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"New Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:q,onChange:(M)=>N(M.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),h.jsxDEV("div",{children:[h.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Confirm New Password"},void 0,!1,void 0,this),h.jsxDEV("input",{type:"password",value:L,onChange:(M)=>_(M.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),F&&h.jsxDEV("div",{className:`p-3 rounded text-sm ${F.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:F.text},void 0,!1,void 0,this),h.jsxDEV("button",{onClick:b,disabled:k||!U||!q||!L,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:k?"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 SI(){let{authFetch:Y}=A1(),[G,U]=u1.useState(!1),[O,q]=u1.useState(null),[N,L]=u1.useState(null),{confirm:_,ConfirmDialog:k}=S5(),T=async()=>{try{let b=await(await Y("/api/telemetry/stats")).json();L(b.stats?.total_events||0)}catch{L(null)}};u1.useEffect(()=>{T()},[]);let F=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 b=await Y("/api/telemetry/clear",{method:"POST"}),M=await b.json();if(b.ok)q({type:"success",text:`Cleared ${M.deleted||0} telemetry events.`}),L(0);else q({type:"error",text:M.error||"Failed to clear telemetry"})}catch{q({type:"error",text:"Failed to clear telemetry"})}U(!1)};return h.jsxDEV(h.Fragment,{children:[k,h.jsxDEV("div",{className:"max-w-4xl w-full",children:[h.jsxDEV("div",{className:"mb-6",children:[h.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[h.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),h.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:N!==null?`${N.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&h.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),h.jsxDEV("button",{onClick:F,disabled:G||N===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 x4=q0(Y1(),1),fI=[{key:"memory",icon:wz,label:"Memory"},{key:"tasks",icon:h5,label:"Tasks"},{key:"files",icon:CQ,label:"Files"},{key:"vision",icon:Fz,label:"Vision"},{key:"operator",icon:Mz,label:"Operator"},{key:"mcp",icon:y5,label:"MCP"},{key:"realtime",icon:Pz,label:"Realtime"},{key:"agents",icon:SQ,label:"Multi-Agent"}];function N3({agent:Y,selected:G,onSelect:U,onToggle:O,showProject:q}){let N=fI.filter((b)=>Y.features?.[b.key]),L=Y.mcpServerDetails||[],_=Y.skillDetails||[],{isActive:k,type:T}=SZ(Y.id),{projects:F}=E4(),w=Y.projectId?F.find((b)=>b.id===Y.projectId):null;return x4.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:[x4.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[x4.jsxDEV("div",{children:[x4.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),x4.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&x4.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q&&w&&x4.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[x4.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),w.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),x4.jsxDEV(hI,{status:Y.status,isActive:k&&Y.status==="running",activityType:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this),N.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:N.map(({key:b,icon:M,label:v})=>x4.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:[x4.jsxDEV(M,{className:"w-3 h-3"},void 0,!1,void 0,this),v]},b,!0,void 0,this))},void 0,!1,void 0,this),L.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:L.map((b)=>{let M=b.type==="http"&&b.url||b.status==="running";return x4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${M?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${b.name} (${M?"available":b.status})`,children:[x4.jsxDEV(y5,{className:"w-3 h-3"},void 0,!1,void 0,this),b.name]},b.id,!0,void 0,this)})},void 0,!1,void 0,this),_.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:_.map((b)=>x4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${b.enabled?"bg-purple-500/10 text-purple-400":"bg-[#222] text-[#666]"}`,title:`Skill: ${b.name} v${b.version}`,children:[x4.jsxDEV(fZ,{className:"w-3 h-3"},void 0,!1,void 0,this),b.name]},b.id,!0,void 0,this))},void 0,!1,void 0,this),x4.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4 flex-1",children:Y.systemPrompt},void 0,!1,void 0,this),x4.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 hI({status:Y,isActive:G,activityType:U}){if(Y==="running"&&G&&U)return x4.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 x4.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 EZ=q0(k1(),1);var J1=q0(Y1(),1),yI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:wz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:h5},{key:"files",label:"Files",description:"File storage and management",icon:CQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Fz},{key:"operator",label:"Operator",description:"Browser automation",icon:Mz},{key:"mcp",label:"MCP",description:"External tools/services",icon:y5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Pz},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:SQ}];function R3({form:Y,providers:G,configuredProviders:U,onFormChange:O,onProviderChange:q,onCreate:N,onClose:L,onGoToSettings:_}){let{projects:k,currentProjectId:T}=E4(),F=G.find((g)=>g.id===Y.provider),[w,b]=EZ.default.useState([]),[M,v]=EZ.default.useState(!1);EZ.default.useEffect(()=>{if(Y.provider==="ollama")v(!0),fetch("/api/providers/ollama/models").then((g)=>g.json()).then((g)=>{if(g.models&&g.models.length>0){if(b(g.models.map((Q0)=>({value:Q0.value,label:Q0.label||Q0.value}))),!Y.model&&g.models.length>0)O({...Y,model:g.models[0].value})}}).catch(()=>b([])).finally(()=>v(!1))},[Y.provider]);let m=U.filter((g)=>g.type==="llm").map((g)=>({value:g.id,label:g.name})),D=Y.provider==="ollama"&&w.length>0?w:F?.models.map((g)=>({value:g.value,label:g.label,recommended:g.recommended}))||[],C=k.map((g)=>({value:g.id,label:g.name}));EZ.default.useEffect(()=>{if(Y.projectId===void 0&&T&&T!=="unassigned")O({...Y,projectId:T})},[T]);let V=(g)=>{if(g==="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,[g]:!Y.features[g]}})},u=()=>{let g=Y.features.agents;if(typeof g==="boolean")return g;return g?.enabled??!1},a=()=>{return _z(Y.features,Y.projectId).mode||"worker"},c=(g)=>{let Q0=_z(Y.features,Y.projectId);O({...Y,features:{...Y.features,agents:{...Q0,enabled:!0,mode:g}}})};return J1.jsxDEV(kQ,{children:[J1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),m.length===0?J1.jsxDEV(VI,{onGoToSettings:_},void 0,!1,void 0,this):J1.jsxDEV(J1.Fragment,{children:[J1.jsxDEV("div",{className:"space-y-4",children:[J1.jsxDEV(h8,{label:"Name",children:J1.jsxDEV("input",{type:"text",value:Y.name,onChange:(g)=>O({...Y,name:g.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),k.length>0&&J1.jsxDEV(h8,{label:"Project",children:J1.jsxDEV(V6,{value:Y.projectId||"",options:C,onChange:(g)=>O({...Y,projectId:g||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),J1.jsxDEV(h8,{label:"Provider",children:J1.jsxDEV(V6,{value:Y.provider,options:m,onChange:q,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),J1.jsxDEV(h8,{label:"Model",children:M?J1.jsxDEV("div",{className:"text-sm text-[#666] py-2",children:"Loading Ollama models..."},void 0,!1,void 0,this):Y.provider==="ollama"&&D.length===0?J1.jsxDEV("div",{className:"text-sm text-yellow-400/80 py-2",children:["No models found. Run ",J1.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):J1.jsxDEV(V6,{value:Y.model,options:D,onChange:(g)=>O({...Y,model:g}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),J1.jsxDEV(h8,{label:"System Prompt",children:J1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(g)=>O({...Y,systemPrompt:g.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),J1.jsxDEV(h8,{label:"Features",children:J1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:yI.map(({key:g,label:Q0,description:o,icon:t})=>{let l=g==="agents"?u():!!Y.features[g];return J1.jsxDEV("button",{type:"button",onClick:()=>V(g),className:`flex items-center gap-3 p-3 rounded border text-left transition ${l?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[J1.jsxDEV(t,{className:`w-5 h-5 flex-shrink-0 ${l?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),J1.jsxDEV("div",{className:"flex-1 min-w-0",children:[J1.jsxDEV("div",{className:`text-sm font-medium ${l?"text-[#f97316]":""}`,children:Q0},void 0,!1,void 0,this),J1.jsxDEV("div",{className:"text-xs text-[#666]",children:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},g,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),u()&&J1.jsxDEV(h8,{label:"Multi-Agent Mode",children:[J1.jsxDEV("div",{className:"flex gap-2",children:[J1.jsxDEV("button",{type:"button",onClick:()=>c("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${a()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[J1.jsxDEV("div",{className:`text-sm font-medium ${a()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),J1.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J1.jsxDEV("button",{type:"button",onClick:()=>c("worker"),className:`flex-1 p-3 rounded border text-left transition ${a()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[J1.jsxDEV("div",{className:`text-sm font-medium ${a()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),J1.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&&J1.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"&&J1.jsxDEV(h8,{label:"Agent Built-in Tools",children:[J1.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[J1.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:[J1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:J1.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),J1.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J1.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:[J1.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:J1.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),J1.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),J1.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),J1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[J1.jsxDEV("button",{onClick:L,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),J1.jsxDEV("button",{onClick:N,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 h8({label:Y,children:G}){return J1.jsxDEV("div",{children:[J1.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 VI({onGoToSettings:Y}){return J1.jsxDEV("div",{className:"text-center py-6",children:[J1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),J1.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 F1=q0(k1(),1);var S=q0(Y1(),1),DI=[{key:"memory",label:"Memory",description:"Persistent recall",icon:wz},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:h5},{key:"files",label:"Files",description:"File storage and management",icon:CQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Fz},{key:"operator",label:"Operator",description:"Browser automation",icon:Mz},{key:"mcp",label:"MCP",description:"External tools/services",icon:y5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:Pz},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:SQ}];function b3({agent:Y,providers:G,onClose:U,onStartAgent:O,onUpdateAgent:q,onDeleteAgent:N}){let[L,_]=F1.useState("chat");return S.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[S.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[S.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:S.jsxDEV("div",{className:"flex gap-1",children:[S.jsxDEV(uQ,{active:L==="chat",onClick:()=>_("chat"),children:"Chat"},void 0,!1,void 0,this),S.jsxDEV(uQ,{active:L==="threads",onClick:()=>_("threads"),children:"Threads"},void 0,!1,void 0,this),S.jsxDEV(uQ,{active:L==="tasks",onClick:()=>_("tasks"),children:"Tasks"},void 0,!1,void 0,this),S.jsxDEV(uQ,{active:L==="memory",onClick:()=>_("memory"),children:"Memory"},void 0,!1,void 0,this),S.jsxDEV(uQ,{active:L==="files",onClick:()=>_("files"),children:"Files"},void 0,!1,void 0,this),S.jsxDEV(uQ,{active:L==="settings",onClick:()=>_("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:S.jsxDEV(f5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[L==="chat"&&S.jsxDEV(mI,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),L==="threads"&&S.jsxDEV(uI,{agent:Y},void 0,!1,void 0,this),L==="tasks"&&S.jsxDEV(gI,{agent:Y},void 0,!1,void 0,this),L==="memory"&&S.jsxDEV(EI,{agent:Y},void 0,!1,void 0,this),L==="files"&&S.jsxDEV(xI,{agent:Y},void 0,!1,void 0,this),L==="settings"&&S.jsxDEV(jI,{agent:Y,providers:G,onUpdateAgent:q,onDeleteAgent:N},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function uQ({active:Y,onClick:G,children:U}){return S.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 mI({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),S.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 uI({agent:Y}){let[G,U]=F1.useState([]),[O,q]=F1.useState(!0),[N,L]=F1.useState(null),[_,k]=F1.useState(null),[T,F]=F1.useState([]),[w,b]=F1.useState(!1),{confirm:M,ConfirmDialog:v}=S5();F1.useEffect(()=>{U([]),k(null),F([]),L(null),q(!0)},[Y.id]),F1.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 u=await V.json();U(u.threads||[]),L(null)}catch(V){L(V instanceof Error?V.message:"Failed to load threads")}finally{q(!1)}})()},[Y.id,Y.status]);let m=async(C)=>{k(C),b(!0);try{let V=await fetch(`/api/agents/${Y.id}/threads/${C}/messages`);if(!V.ok)throw Error("Failed to fetch messages");let u=await V.json();F(u.messages||[])}catch{F([])}finally{b(!1)}},D=async(C,V)=>{if(V.stopPropagation(),!await M("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${C}`,{method:"DELETE"}),U((a)=>a.filter((c)=>c.id!==C)),_===C)k(null),F([])}catch{}};if(Y.status!=="running")return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(N)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(_){let C=G.find((V)=>V.id===_);return S.jsxDEV(S.Fragment,{children:[v,S.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[S.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[S.jsxDEV("button",{onClick:()=>{k(null),F([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1",children:[S.jsxDEV("p",{className:"text-sm font-medium",children:C?.title||`Thread ${_.slice(0,8)}`},void 0,!1,void 0,this),S.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),S.jsxDEV("button",{onClick:(V)=>D(_,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),S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:w?S.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):T.length===0?S.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-4",children:T.map((V,u)=>S.jsxDEV("div",{className:`${V.role==="user"?"text-right":""}`,children:S.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${V.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[S.jsxDEV("div",{className:"text-sm whitespace-pre-wrap",children:typeof V.content==="string"?V.content:Array.isArray(V.content)?V.content.map((a,c)=>S.jsxDEV("div",{children:[a.type==="text"&&a.text,a.type==="tool_use"&&S.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDD27 Tool: ",a.name]},void 0,!0,void 0,this),a.type==="tool_result"&&S.jsxDEV("div",{className:"bg-[#222] p-2 rounded mt-1 text-xs text-[#888]",children:["\uD83D\uDCCB Result: ",typeof a.content==="string"?a.content.slice(0,200):"..."]},void 0,!0,void 0,this)]},c,!0,void 0,this)):JSON.stringify(V.content)},void 0,!1,void 0,this),S.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)},u,!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 S.jsxDEV(S.Fragment,{children:[v,S.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?S.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:S.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((C)=>S.jsxDEV("div",{onClick:()=>m(C.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm font-medium truncate",children:C.title||`Thread ${C.id.slice(0,8)}`},void 0,!1,void 0,this),S.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),S.jsxDEV("button",{onClick:(V)=>D(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 gI({agent:Y}){let[G,U]=F1.useState([]),[O,q]=F1.useState(!0),[N,L]=F1.useState(null),[_,k]=F1.useState("all");F1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let T=async()=>{if(Y.status!=="running"){q(!1);return}try{let w=await fetch(`/api/agents/${Y.id}/tasks?status=${_}`);if(!w.ok)throw Error("Failed to fetch tasks");let b=await w.json();U(b.tasks||[]),L(null)}catch(w){L(w instanceof Error?w.message:"Failed to load tasks")}finally{q(!1)}};F1.useEffect(()=>{q(!0),T()},[Y.id,Y.status,_]),F1.useEffect(()=>{if(Y.status!=="running")return;let w=setInterval(T,5000);return()=>clearInterval(w)},[Y.id,Y.status,_]);let F=(w)=>{switch(w){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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(N)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this);return S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[S.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((w)=>S.jsxDEV("button",{onClick:()=>k(w),className:`px-3 py-1 text-xs rounded transition ${_===w?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:w.charAt(0).toUpperCase()+w.slice(1)},w,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:S.jsxDEV("p",{children:["No ",_==="all"?"":_+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-3",children:G.map((w)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[S.jsxDEV("div",{className:"flex items-start justify-between",children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:w.name},void 0,!1,void 0,this),w.description&&S.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:w.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${F(w.status)}`,children:w.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[S.jsxDEV("span",{children:["Created: ",new Date(w.created_at).toLocaleString()]},void 0,!0,void 0,this),w.scheduled_at&&S.jsxDEV("span",{children:["Scheduled: ",new Date(w.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),w.status==="completed"&&w.result&&S.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[S.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"whitespace-pre-wrap",children:w.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.status==="failed"&&w.error&&S.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[S.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),S.jsxDEV("p",{className:"whitespace-pre-wrap",children:w.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},w.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function EI({agent:Y}){let[G,U]=F1.useState([]),[O,q]=F1.useState(!0),[N,L]=F1.useState(null),[_,k]=F1.useState(!1),{confirm:T,ConfirmDialog:F}=S5();F1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let w=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||[]),k(m.enabled??!1),L(null)}catch(v){L(v instanceof Error?v.message:"Failed to load memories")}finally{q(!1)}};F1.useEffect(()=>{w()},[Y.id,Y.status]);let b=async(v)=>{try{await fetch(`/api/agents/${Y.id}/memories/${v}`,{method:"DELETE"}),U((m)=>m.filter((D)=>D.id!==v))}catch{}},M=async()=>{if(!await T("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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(N)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!_)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),S.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 S.jsxDEV(S.Fragment,{children:[F,S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&S.jsxDEV("button",{onClick:M,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?S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[S.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),S.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):S.jsxDEV("div",{className:"space-y-3",children:G.map((v)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[S.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[S.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:v.content},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>b(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),S.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[S.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),S.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(v.created_at).toLocaleString()},void 0,!1,void 0,this),v.importance&&S.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 xI({agent:Y}){let[G,U]=F1.useState([]),[O,q]=F1.useState(!0),[N,L]=F1.useState(null),[_,k]=F1.useState(!1),[T,F]=F1.useState(null),[w,b]=F1.useState(!1),M=F1.default.useRef(null),{confirm:v,ConfirmDialog:m}=S5();F1.useEffect(()=>{U([]),L(null),q(!0)},[Y.id]);let D=async()=>{if(Y.status!=="running"){q(!1);return}try{let l=await fetch(`/api/agents/${Y.id}/files`);if(!l.ok)throw Error("Failed to fetch files");let p=await l.json();U(p.files||[]),L(null)}catch(l){L(l instanceof Error?l.message:"Failed to load files")}finally{q(!1)}};F1.useEffect(()=>{D()},[Y.id,Y.status]);let C=async(l)=>{if(!await v("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${Y.id}/files/${l}`,{method:"DELETE"}),U((i)=>i.filter((Z0)=>Z0.id!==l))}catch{}},V=(l,p)=>{let i=document.createElement("a");i.href=`/api/agents/${Y.id}/files/${l}/download`,i.download=p,i.click()},u=(l)=>{if(l<1024)return`${l} B`;if(l<1048576)return`${(l/1024).toFixed(1)} KB`;return`${(l/1048576).toFixed(1)} MB`},a=async(l)=>{k(!0),F(null);try{let p=new FormData;p.append("file",l);let i=await fetch(`/api/agents/${Y.id}/files`,{method:"POST",body:p});if(!i.ok){let Z0=await i.json();throw Error(Z0.error||"Upload failed")}await D()}catch(p){F(p instanceof Error?p.message:"Upload failed")}finally{k(!1)}},c=(l)=>{let p=l.target.files?.[0];if(p)a(p);l.target.value=""},g=(l)=>{l.preventDefault(),b(!1);let p=l.dataTransfer.files?.[0];if(p)a(p)},Q0=(l)=>{l.preventDefault(),b(!0)},o=(l)=>{l.preventDefault(),b(!1)},t=(l)=>{if(l.startsWith("image/"))return"\uD83D\uDDBC";if(l.includes("pdf"))return"\uD83D\uDCD5";if(l.includes("json"))return"{}";if(l.includes("javascript")||l.includes("typescript"))return"⚡";if(l.startsWith("text/"))return"\uD83D\uDCC4";if(l.startsWith("audio/"))return"\uD83C\uDFB5";if(l.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("div",{className:"text-center",children:[S.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),S.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 S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:S.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(N)return S.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:S.jsxDEV("p",{children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this);return S.jsxDEV(S.Fragment,{children:[m,S.jsxDEV("div",{className:`flex-1 overflow-auto p-4 transition ${w?"bg-[#f97316]/5":""}`,onDrop:g,onDragOver:Q0,onDragLeave:o,children:[S.jsxDEV("input",{ref:M,type:"file",className:"hidden",onChange:c},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[S.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("button",{onClick:()=>M.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),S.jsxDEV("button",{onClick:D,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),T&&S.jsxDEV("div",{className:"mb-4 text-sm bg-red-500/10 text-red-400 px-3 py-2 rounded",children:T},void 0,!1,void 0,this),w&&S.jsxDEV("div",{className:"mb-4 border-2 border-dashed border-[#f97316] rounded-lg p-8 text-center",children:S.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&&!w&&S.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[S.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),S.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&&S.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&&S.jsxDEV("div",{className:"space-y-2",children:G.map((l)=>S.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[S.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:t(l.mime_type)},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:l.filename},void 0,!1,void 0,this),S.jsxDEV("p",{className:"text-xs text-[#666]",children:[u(l.size_bytes)," • ",new Date(l.created_at).toLocaleString(),l.source&&l.source!=="upload"&&` • ${l.source}`]},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:()=>V(l.id,l.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>C(l.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},l.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function jI({agent:Y,providers:G,onUpdateAgent:U,onDeleteAgent:O}){let{authFetch:q,isDev:N}=A1(),[L,_]=F1.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||[]]}),[k,T]=F1.useState(!1),[F,w]=F1.useState(!1),[b,M]=F1.useState(null),[v,m]=F1.useState([]),[D,C]=F1.useState([]),[V,u]=F1.useState(null),[a,c]=F1.useState(!1);F1.useEffect(()=>{(async()=>{try{let _0=await(await q("/api/mcp/servers")).json();m(_0.servers||[])}catch(U0){console.error("Failed to fetch MCP servers:",U0)}})()},[q]),F1.useEffect(()=>{if(!N)return;(async()=>{try{let U0=await q(`/api/agents/${Y.id}/api-key`);if(U0.ok){let _0=await U0.json();u(_0.apiKey)}}catch(U0){}})()},[Y.id,N,q]),F1.useEffect(()=>{(async()=>{try{let _0=await(await q("/api/skills")).json();C(_0.skills||[])}catch(U0){console.error("Failed to fetch skills:",U0)}})()},[q]),F1.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||[]]}),M(null)},[Y.id]);let g=G.find((X0)=>X0.id===L.provider),Q0=G.filter((X0)=>X0.hasKey&&X0.type==="llm").map((X0)=>({value:X0.id,label:X0.name})),o=g?.models.map((X0)=>({value:X0.value,label:X0.label,recommended:X0.recommended}))||[],t=(X0)=>{let U0=G.find((J0)=>J0.id===X0),_0=U0?.models.find((J0)=>J0.recommended)?.value||U0?.models[0]?.value||"";_((J0)=>({...J0,provider:X0,model:_0}))},l=(X0)=>{if(X0==="agents"){let U0=(_0)=>{return _z(_0.features,Y.projectId).enabled};_((_0)=>{if(typeof _0.features.agents==="boolean"?_0.features.agents:_0.features.agents?.enabled??!1)return{..._0,features:{..._0.features,agents:!1}};else return{..._0,features:{..._0.features,agents:{enabled:!0,mode:"worker",group:Y.projectId||void 0}}}})}else _((U0)=>({...U0,features:{...U0.features,[X0]:!U0.features[X0]}}))},p=(X0)=>{_((U0)=>{let _0=_z(U0.features,Y.projectId);return{...U0,features:{...U0.features,agents:{..._0,enabled:!0,mode:X0}}}})},i=()=>{let X0=L.features.agents;if(typeof X0==="boolean")return X0;return X0?.enabled??!1},Z0=()=>{return _z(L.features,Y.projectId).mode||"worker"},T0=(X0)=>{_((U0)=>({...U0,mcpServers:U0.mcpServers.includes(X0)?U0.mcpServers.filter((_0)=>_0!==X0):[...U0.mcpServers,X0]}))},F0=(X0)=>{_((U0)=>({...U0,skills:U0.skills.includes(X0)?U0.skills.filter((_0)=>_0!==X0):[...U0.skills,X0]}))},X1=async()=>{T(!0),M(null);let X0=await U(L);if(T(!1),X0.error)M({type:"error",text:X0.error});else M({type:"success",text:"Settings saved"}),setTimeout(()=>M(null),2000)},O1=L.name!==Y.name||L.provider!==Y.provider||L.model!==Y.model||L.systemPrompt!==Y.systemPrompt||JSON.stringify(L.features)!==JSON.stringify(Y.features)||JSON.stringify(L.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort())||JSON.stringify(L.skills.sort())!==JSON.stringify((Y.skills||[]).sort());return S.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:S.jsxDEV("div",{className:"space-y-4",children:[S.jsxDEV(r7,{label:"Name",children:S.jsxDEV("input",{type:"text",value:L.name,onChange:(X0)=>_((U0)=>({...U0,name:X0.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),S.jsxDEV(r7,{label:"Provider",children:S.jsxDEV(V6,{value:L.provider,options:Q0,onChange:t},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV(r7,{label:"Model",children:S.jsxDEV(V6,{value:L.model,options:o,onChange:(X0)=>_((U0)=>({...U0,model:X0}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),S.jsxDEV(r7,{label:"System Prompt",children:S.jsxDEV("textarea",{value:L.systemPrompt,onChange:(X0)=>_((U0)=>({...U0,systemPrompt:X0.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),S.jsxDEV(r7,{label:"Features",children:S.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:DI.map(({key:X0,label:U0,description:_0,icon:J0})=>{let d=X0==="agents"?i():!!L.features[X0];return S.jsxDEV("button",{type:"button",onClick:()=>l(X0),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:[S.jsxDEV(J0,{className:`w-5 h-5 flex-shrink-0 ${d?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:`text-sm font-medium ${d?"text-[#f97316]":""}`,children:U0},void 0,!1,void 0,this),S.jsxDEV("div",{className:"text-xs text-[#666]",children:_0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},X0,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),i()&&S.jsxDEV(r7,{label:"Multi-Agent Mode",children:[S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{type:"button",onClick:()=>p("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${Z0()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`text-sm font-medium ${Z0()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),S.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),S.jsxDEV("button",{type:"button",onClick:()=>p("worker"),className:`flex-1 p-3 rounded border text-left transition ${Z0()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`text-sm font-medium ${Z0()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),S.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&&S.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),L.provider==="anthropic"&&S.jsxDEV(r7,{label:"Agent Built-in Tools",children:[S.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[S.jsxDEV("button",{type:"button",onClick:()=>_((X0)=>({...X0,features:{...X0.features,builtinTools:{...X0.features.builtinTools,webSearch:!X0.features.builtinTools?.webSearch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[S.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.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),S.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("button",{type:"button",onClick:()=>_((X0)=>({...X0,features:{...X0.features,builtinTools:{...X0.features.builtinTools,webFetch:!X0.features.builtinTools?.webFetch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[S.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.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),S.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),S.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),L.features.mcp&&S.jsxDEV(r7,{label:"MCP Servers",children:v.length===0?S.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):S.jsxDEV("div",{className:"space-y-2",children:[v.filter((X0)=>X0.project_id===null||X0.project_id===Y.projectId).map((X0)=>{let U0=X0.type==="http"&&X0.url,_0=U0||X0.status==="running",J0=U0?`${X0.source||"remote"} • http`:`${X0.type} • ${X0.package||X0.command||"custom"}${X0.status==="running"&&X0.port?` • :${X0.port}`:""}`;return S.jsxDEV("button",{type:"button",onClick:()=>T0(X0.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.mcpServers.includes(X0.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${_0?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:`text-sm font-medium ${L.mcpServers.includes(X0.id)?"text-[#f97316]":""}`,children:X0.name},void 0,!1,void 0,this),X0.project_id===null&&S.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),S.jsxDEV("div",{className:"text-xs text-[#666]",children:J0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${_0?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:U0?"remote":X0.status},void 0,!1,void 0,this)]},X0.id,!0,void 0,this)}),S.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),S.jsxDEV(r7,{label:"Skills",children:D.length===0?S.jsxDEV("p",{className:"text-sm text-[#666]",children:"No skills configured. Add skills in the Skills page first."},void 0,!1,void 0,this):S.jsxDEV("div",{className:"space-y-2",children:[D.filter((X0)=>X0.enabled&&(X0.project_id===null||X0.project_id===Y.projectId)).map((X0)=>S.jsxDEV("button",{type:"button",onClick:()=>F0(X0.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.skills.includes(X0.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[S.jsxDEV("div",{className:"flex-1 min-w-0",children:[S.jsxDEV("div",{className:"flex items-center gap-2",children:[S.jsxDEV("span",{className:`text-sm font-medium ${L.skills.includes(X0.id)?"text-[#f97316]":""}`,children:X0.name},void 0,!1,void 0,this),X0.project_id===null&&S.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),S.jsxDEV("div",{className:"text-xs text-[#666]",children:X0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S.jsxDEV("div",{className:"text-xs px-2 py-0.5 rounded bg-[#222] text-[#666]",children:["v",X0.version]},void 0,!0,void 0,this)]},X0.id,!0,void 0,this)),S.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),b&&S.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${b.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:b.text},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:X1,disabled:!O1||k||!L.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:k?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&O1&&S.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),N&&V&&S.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[S.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Developer Info"},void 0,!1,void 0,this),S.jsxDEV("div",{className:"space-y-2",children:[S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Agent ID"},void 0,!1,void 0,this),S.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),S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Port"},void 0,!1,void 0,this),S.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),S.jsxDEV("div",{className:"flex flex-col gap-1",children:[S.jsxDEV("div",{className:"flex items-center justify-between",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"API Key"},void 0,!1,void 0,this),S.jsxDEV("button",{onClick:()=>c(!a),className:"text-xs text-[#f97316] hover:text-[#fb923c]",children:a?"Hide":"Show"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a&&S.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&&S.jsxDEV("div",{className:"flex flex-col gap-1 mt-2",children:[S.jsxDEV("span",{className:"text-xs text-[#666]",children:"Test with curl"},void 0,!1,void 0,this),S.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1.5 rounded text-[#666] break-all",children:['curl -H "X-API-Key: ',a?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),S.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[S.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),F?S.jsxDEV("div",{className:"flex gap-2",children:[S.jsxDEV("button",{onClick:()=>w(!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),S.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):S.jsxDEV("button",{onClick:()=>w(!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 r7({label:Y,children:G}){return S.jsxDEV("div",{children:[S.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 GO=q0(k1(),1);var F4=q0(Y1(),1);function w3({agents:Y,loading:G,selectedAgent:U,providers:O,onSelectAgent:q,onCloseAgent:N,onToggleAgent:L,onDeleteAgent:_,onUpdateAgent:k,onNewAgent:T,canCreateAgent:F=!0}){let{currentProjectId:w,currentProject:b}=E4(),M=GO.useMemo(()=>{if(w===null)return Y;if(w==="unassigned")return Y.filter((m)=>!m.projectId);return Y.filter((m)=>m.projectId===w)},[Y,w]),v=w===null?"Agents":w==="unassigned"?"Unassigned Agents":b?.name||"Agents";return F4.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[F4.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[F4.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[F4.jsxDEV("div",{className:"flex items-center gap-3",children:[b&&F4.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:b.color}},void 0,!1,void 0,this),F4.jsxDEV("h1",{className:"text-xl font-semibold",children:v},void 0,!1,void 0,this),w!==null&&F4.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",M.length," agent",M.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),T&&F4.jsxDEV("button",{onClick:T,disabled:!F,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?F4.jsxDEV(bz,{message:"Loading agents..."},void 0,!1,void 0,this):M.length===0?F4.jsxDEV(pI,{onNewAgent:T,canCreateAgent:F,hasProjectFilter:w!==null},void 0,!1,void 0,this):F4.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3 auto-rows-fr",children:M.map((m)=>F4.jsxDEV(N3,{agent:m,selected:U?.id===m.id,onSelect:()=>q(m),onToggle:(D)=>L(m,D),showProject:w===null},m.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&F4.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:N},void 0,!1,void 0,this),U&&F4.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:F4.jsxDEV(b3,{agent:U,providers:O,onClose:N,onStartAgent:(m)=>L(U,m),onUpdateAgent:(m)=>k(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 pI({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:U}){return F4.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[U?F4.jsxDEV(F4.Fragment,{children:[F4.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),F4.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):F4.jsxDEV(F4.Fragment,{children:[F4.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),F4.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&&F4.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 w5=q0(k1(),1);var I1=q0(Y1(),1);function M3({agents:Y,loading:G,runningCount:U,configuredProviders:O,onNavigate:q,onSelectAgent:N}){let{authFetch:L}=A1(),{currentProjectId:_}=E4(),[k,T]=w5.useState(null),[F,w]=w5.useState([]),b=w5.useMemo(()=>{if(!_)return Y;if(_==="unassigned")return Y.filter((V)=>!V.projectId);return Y.filter((V)=>V.projectId===_)},[Y,_]),M=w5.useMemo(()=>{return b.filter((V)=>V.status==="running").length},[b]),v=w5.useMemo(()=>{return new Set(b.map((V)=>V.id))},[b]),m=w5.useCallback(async()=>{try{let[V,u]=await Promise.all([L("/api/dashboard"),L("/api/tasks?status=all")]);if(V.ok){let a=await V.json();T(a)}if(u.ok){let a=await u.json();w((a.tasks||[]).slice(0,5))}}catch(V){console.error("Failed to fetch dashboard data:",V)}},[L]);w5.useEffect(()=>{m();let V=setInterval(m,1e4);return()=>clearInterval(V)},[m]);let D=w5.useMemo(()=>{if(!_)return F;return F.filter((V)=>v.has(V.agentId))},[F,_,v]),C=w5.useMemo(()=>{if(!_)return k?.tasks||{total:0,pending:0,running:0,completed:0};let V=D.length,u=D.filter((g)=>g.status==="pending").length,a=D.filter((g)=>g.status==="running").length,c=D.filter((g)=>g.status==="completed").length;return{total:V,pending:u,running:a,completed:c}},[k,_,D]);return I1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[I1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[I1.jsxDEV(F3,{label:"Agents",value:b.length,subValue:`${M} running`},void 0,!1,void 0,this),I1.jsxDEV(F3,{label:"Tasks",value:C.total,subValue:`${C.pending} pending`},void 0,!1,void 0,this),I1.jsxDEV(F3,{label:"Completed",value:C.completed,color:"text-green-400"},void 0,!1,void 0,this),I1.jsxDEV(F3,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[I1.jsxDEV(qO,{title:"Agents",actionLabel:"View All",onAction:()=>q("agents"),children:G?I1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):b.length===0?I1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):I1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:b.slice(0,5).map((V)=>I1.jsxDEV(cI,{agent:V,onSelect:()=>N(V),showProject:!_},V.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),I1.jsxDEV(qO,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>q("tasks"),children:D.length===0?I1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[I1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),I1.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):I1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:D.map((V)=>I1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[I1.jsxDEV("div",{className:"flex-1 min-w-0",children:[I1.jsxDEV("p",{className:"font-medium truncate",children:V.title},void 0,!1,void 0,this),I1.jsxDEV("p",{className:"text-sm text-[#666]",children:V.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I1.jsxDEV(dI,{status:V.status},void 0,!1,void 0,this)]},`${V.agentId}-${V.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 I1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[I1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),I1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),U&&I1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qO({title:Y,actionLabel:G,onAction:U,children:O}){return I1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[I1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[I1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),I1.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 cI({agent:Y,onSelect:G,showProject:U}){let{isActive:O}=SZ(Y.id),{projects:q}=E4(),N=Y.projectId?q.find((L)=>L.id===Y.projectId):null;return I1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[I1.jsxDEV("div",{className:"flex-1 min-w-0",children:[I1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),I1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[I1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),U&&N&&I1.jsxDEV(I1.Fragment,{children:[I1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),I1.jsxDEV("span",{className:"flex items-center gap-1",children:[I1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:N.color}},void 0,!1,void 0,this),N.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),I1.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 dI({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 I1.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 w7=q0(k1(),1);var M0=q0(Y1(),1);function P3({onSelectAgent:Y}){let{authFetch:G}=A1(),[U,O]=w7.useState([]),[q,N]=w7.useState(!0),[L,_]=w7.useState("all"),[k,T]=w7.useState(null),F=w7.useCallback(async()=>{try{let v=await(await G(`/api/tasks?status=${L}`)).json();O(v.tasks||[])}catch(M){console.error("Failed to fetch tasks:",M)}finally{N(!1)}},[G,L]);w7.useEffect(()=>{F();let M=setInterval(F,1e4);return()=>clearInterval(M)},[F]);let w={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 M0.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[M0.jsxDEV("div",{className:`flex-1 p-4 md:p-6 overflow-auto ${k?"hidden md:block md:w-1/2 lg:w-2/3":""}`,children:M0.jsxDEV("div",{className:"max-w-4xl",children:[M0.jsxDEV("div",{className:"mb-6",children:[M0.jsxDEV("div",{className:"mb-4",children:[M0.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),M0.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),M0.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((M)=>M0.jsxDEV("button",{onClick:()=>_(M.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${L===M.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:M.label},M.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q?M0.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):U.length===0?M0.jsxDEV("div",{className:"text-center py-12",children:[M0.jsxDEV(h5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),M0.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),M0.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):M0.jsxDEV("div",{className:"space-y-3",children:U.map((M)=>M0.jsxDEV("div",{onClick:()=>T(M),className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${k?.id===M.id&&k?.agentId===M.agentId?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[M0.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[M0.jsxDEV("div",{className:"flex-1",children:[M0.jsxDEV("h3",{className:"font-medium",children:M.title},void 0,!1,void 0,this),M0.jsxDEV("p",{className:"text-sm text-[#666]",children:[M.agentName,M.execute_at&&M0.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(M.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${w[M.status]||w.pending}`,children:M.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.description&&M0.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:M.description},void 0,!1,void 0,this),M0.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[M0.jsxDEV("span",{children:["Type: ",M.type]},void 0,!0,void 0,this),M0.jsxDEV("span",{children:["Priority: ",M.priority]},void 0,!0,void 0,this),M.recurrence&&M0.jsxDEV("span",{children:["Recurrence: ",M.recurrence]},void 0,!0,void 0,this),M0.jsxDEV("span",{children:["Created: ",new Date(M.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${M.agentId}-${M.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),k&&M0.jsxDEV(lI,{task:k,statusColors:w,onClose:()=>T(null),onSelectAgent:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lI({task:Y,statusColors:G,onClose:U,onSelectAgent:O}){return M0.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:[M0.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-[#1a1a1a]",children:[M0.jsxDEV("h2",{className:"font-medium truncate pr-2",children:"Task Details"},void 0,!1,void 0,this),M0.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#e0e0e0] transition",children:M0.jsxDEV(f5,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[M0.jsxDEV("div",{children:[M0.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[M0.jsxDEV("h3",{className:"text-lg font-medium",children:Y.title},void 0,!1,void 0,this),M0.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),M0.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&&M0.jsxDEV("div",{children:[M0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-1",children:"Description"},void 0,!1,void 0,this),M0.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),M0.jsxDEV("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[M0.jsxDEV("div",{children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Type"},void 0,!1,void 0,this),M0.jsxDEV("p",{className:"capitalize",children:Y.type},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("div",{children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Priority"},void 0,!1,void 0,this),M0.jsxDEV("p",{children:Y.priority},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("div",{children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Source"},void 0,!1,void 0,this),M0.jsxDEV("p",{className:"capitalize",children:Y.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.recurrence&&M0.jsxDEV("div",{children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Recurrence"},void 0,!1,void 0,this),M0.jsxDEV("p",{children:Y.recurrence},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("div",{className:"space-y-2 text-sm",children:[M0.jsxDEV("div",{className:"flex justify-between",children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Created"},void 0,!1,void 0,this),M0.jsxDEV("span",{children:new Date(Y.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.execute_at&&M0.jsxDEV("div",{className:"flex justify-between",children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Scheduled"},void 0,!1,void 0,this),M0.jsxDEV("span",{children:new Date(Y.execute_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.executed_at&&M0.jsxDEV("div",{className:"flex justify-between",children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Started"},void 0,!1,void 0,this),M0.jsxDEV("span",{children:new Date(Y.executed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.completed_at&&M0.jsxDEV("div",{className:"flex justify-between",children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Completed"},void 0,!1,void 0,this),M0.jsxDEV("span",{children:new Date(Y.completed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.next_run&&M0.jsxDEV("div",{className:"flex justify-between",children:[M0.jsxDEV("span",{className:"text-[#666]",children:"Next Run"},void 0,!1,void 0,this),M0.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&&M0.jsxDEV("div",{children:[M0.jsxDEV("h4",{className:"text-xs text-red-400 uppercase tracking-wider mb-1",children:"Error"},void 0,!1,void 0,this),M0.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/20 rounded p-3",children:M0.jsxDEV("p",{className:"text-sm text-red-400 whitespace-pre-wrap",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&&M0.jsxDEV("div",{children:[M0.jsxDEV("h4",{className:"text-xs text-green-400 uppercase tracking-wider mb-1",children:"Result"},void 0,!1,void 0,this),M0.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/20 rounded p-3",children:M0.jsxDEV("p",{className:"text-sm text-green-400 whitespace-pre-wrap",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),Y.trajectory&&Y.trajectory.length>0&&M0.jsxDEV("div",{children:[M0.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:["Trajectory (",Y.trajectory.length," steps)"]},void 0,!0,void 0,this),M0.jsxDEV(iI,{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 iI({trajectory:Y}){let[G,U]=w7.useState(new Set),O=(N)=>{U((L)=>{let _=new Set(L);if(_.has(N))_.delete(N);else _.add(N);return _})},q={thought:{bg:"bg-purple-500/10",text:"text-purple-400",icon:"\uD83D\uDCAD"},action:{bg:"bg-blue-500/10",text:"text-blue-400",icon:"⚡"},observation:{bg:"bg-green-500/10",text:"text-green-400",icon:"\uD83D\uDC41"},tool_call:{bg:"bg-orange-500/10",text:"text-orange-400",icon:"\uD83D\uDD27"},tool_result:{bg:"bg-teal-500/10",text:"text-teal-400",icon:"\uD83D\uDCCB"},message:{bg:"bg-gray-500/10",text:"text-gray-400",icon:"\uD83D\uDCAC"}};return M0.jsxDEV("div",{className:"space-y-2",children:Y.map((N,L)=>{let _=q[N.type]||q.message,k=G.has(L),T=N.content.length>150;return M0.jsxDEV("div",{className:`${_.bg} border border-[#1a1a1a] rounded overflow-hidden`,children:M0.jsxDEV("button",{onClick:()=>T&&O(L),className:`w-full p-2 text-left flex items-start gap-2 ${T?"cursor-pointer":""}`,children:[M0.jsxDEV("span",{className:"flex-shrink-0",children:_.icon},void 0,!1,void 0,this),M0.jsxDEV("div",{className:"flex-1 min-w-0",children:[M0.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[M0.jsxDEV("span",{className:`text-xs font-medium ${_.text} capitalize`,children:N.type.replace("_"," ")},void 0,!1,void 0,this),N.tool&&M0.jsxDEV("span",{className:"text-xs text-[#666]",children:["· ",N.tool]},void 0,!0,void 0,this),N.timestamp&&M0.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",new Date(N.timestamp).toLocaleTimeString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M0.jsxDEV("p",{className:`text-sm text-[#888] whitespace-pre-wrap ${!k&&T?"line-clamp-3":""}`,children:N.content},void 0,!1,void 0,this),T&&M0.jsxDEV("span",{className:"text-xs text-[#666] mt-1 inline-block",children:k?"Click to collapse":"Click to expand..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},L,!1,void 0,this)})},void 0,!1,void 0,this)}var Q1=q0(k1(),1);var i4=q0(k1(),1);var b0=q0(Y1(),1);function X9(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="API_KEY")}function UO(Y){return Y.authSchemes.some((G)=>G.toUpperCase()==="OAUTH2")}function oI(Y){return X9(Y)&&UO(Y)}function KO({providerId:Y="composio",onConnectionComplete:G}){let{authFetch:U}=A1(),[O,q]=i4.useState([]),[N,L]=i4.useState([]),[_,k]=i4.useState(!0),[T,F]=i4.useState(""),[w,b]=i4.useState(null),[M,v]=i4.useState(null),[m,D]=i4.useState(null),[C,V]=i4.useState(null),[u,a]=i4.useState(null),[c,g]=i4.useState(""),[Q0,o]=i4.useState(null),[t,l]=i4.useState(""),[p,i]=i4.useState(!1),[Z0,T0]=i4.useState(null),[F0,X1]=i4.useState(null),O1=i4.useCallback(async()=>{k(!0),D(null);try{let[L0,n0]=await Promise.all([U(`/api/integrations/${Y}/apps`),U(`/api/integrations/${Y}/connected`)]),h1=await L0.json(),B4=await n0.json();q(h1.apps||[]),L(B4.accounts||[])}catch(L0){console.error("Failed to fetch integrations:",L0),D("Failed to load integrations")}k(!1)},[U,Y]);i4.useEffect(()=>{O1()},[O1]),i4.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),O1(),G?.()},[O1,G]),i4.useEffect(()=>{if(!M?.connectionId)return;let L0=setInterval(async()=>{try{let h1=await(await U(`/api/integrations/${Y}/connection/${M.connectionId}`)).json();if(h1.connection?.status==="active")v(null),b(null),O1(),G?.();else if(h1.connection?.status==="failed")v(null),b(null),D(`Connection to ${M.appSlug} failed`)}catch(n0){}},2000);return()=>clearInterval(L0)},[M,U,Y,O1,G]);let X0=async(L0,n0,h1)=>{if(oI(L0)&&!n0&&!h1){V({app:L0});return}if(X9(L0)&&!n0&&!h1){a({app:L0}),g("");return}b(L0.slug),D(null);try{let B4={appSlug:L0.slug};if(n0)B4.credentials={authScheme:"API_KEY",apiKey:n0};let h4=await U(`/api/integrations/${Y}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B4)}),j1=await h4.json();if(!h4.ok){D(j1.error||"Failed to initiate connection"),b(null),a(null);return}if(j1.status==="active"||!j1.redirectUrl){b(null),a(null),O1(),G?.();return}if(j1.redirectUrl){v({appSlug:L0.slug,connectionId:j1.connectionId});let W1=window.open(j1.redirectUrl,`connect-${L0.slug}`,"width=600,height=700,left=200,top=100");if(!W1||W1.closed)window.location.href=j1.redirectUrl}}catch(B4){D(`Failed to connect: ${B4}`),b(null),a(null)}},U0=(L0)=>{if(L0.preventDefault(),!u||!c.trim())return;X0(u.app,c.trim())},_0=async(L0)=>{try{let n0=await U(`/api/integrations/${Y}/connection/${L0.id}`,{method:"DELETE"});if(n0.ok)O1();else{let h1=await n0.json();D(h1.error||"Failed to disconnect")}}catch(n0){D(`Failed to disconnect: ${n0}`)}},J0=(L0)=>{o({app:L0}),l(`${L0.name} MCP`),T0(null)},d=async()=>{if(!Q0||!t.trim())return;i(!0),D(null);try{let L0=await U(`/api/integrations/${Y}/configs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:Q0.app.slug})}),n0=await L0.json();if(!L0.ok){D(n0.error||"Failed to create MCP config"),i(!1);return}T0(t),G?.()}catch(L0){D(`Failed to create MCP config: ${L0}`)}finally{i(!1)}},A0=(L0)=>{X1({message:`Disconnect ${L0.appName}?`,onConfirm:()=>{_0(L0),X1(null)}})},S0=(L0)=>{return N.some((n0)=>n0.appId===L0&&n0.status==="active")},Z1=(L0)=>{return N.find((n0)=>n0.appId===L0)},t0=O.filter((L0)=>{if(!T)return!0;let n0=T.toLowerCase();return L0.name.toLowerCase().includes(n0)||L0.slug.toLowerCase().includes(n0)||L0.description?.toLowerCase().includes(n0)||L0.categories.some((h1)=>h1.toLowerCase().includes(n0))}),D0=t0.filter((L0)=>S0(L0.slug)),G1=t0.filter((L0)=>!S0(L0.slug));if(_)return b0.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading apps..."},void 0,!1,void 0,this);return b0.jsxDEV("div",{className:"space-y-6",children:[C&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[C.app.logo&&b0.jsxDEV("img",{src:C.app.logo,alt:C.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:["Connect ",C.app.name]},void 0,!0,void 0,this),b0.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),b0.jsxDEV("div",{className:"space-y-3",children:[b0.jsxDEV("button",{onClick:()=>{V(null),a({app:C.app}),g("")},className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#333] hover:border-[#f97316] rounded-lg transition",children:[b0.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Enter your ",C.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("button",{onClick:()=>{V(null),X0(C.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:[b0.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"text-xs text-[#666] mt-0.5",children:["Sign in with your ",C.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("button",{onClick:()=>V(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),u&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[u.app.logo&&b0.jsxDEV("img",{src:u.app.logo,alt:u.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:["Connect ",u.app.name]},void 0,!0,void 0,this),b0.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),b0.jsxDEV("form",{onSubmit:U0,children:[b0.jsxDEV("input",{type:"password",value:c,onChange:(L0)=>g(L0.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),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.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),b0.jsxDEV("button",{type:"submit",disabled:!c.trim()||w===u.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===u.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),Q0&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-md mx-4",children:Z0?b0.jsxDEV(b0.Fragment,{children:[b0.jsxDEV("div",{className:"text-center mb-4",children:[b0.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:b0.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b0.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),b0.jsxDEV("p",{className:"text-sm text-[#888] mt-2",children:['"',Z0,'" has been created successfully.']},void 0,!0,void 0,this),b0.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),b0.jsxDEV("button",{onClick:()=>{o(null),T0(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):b0.jsxDEV(b0.Fragment,{children:[b0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[Q0.app.logo&&b0.jsxDEV("img",{src:Q0.app.logo,alt:Q0.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),b0.jsxDEV("p",{className:"text-xs text-[#666]",children:["Create an MCP config for ",Q0.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("form",{onSubmit:(L0)=>{L0.preventDefault(),d()},children:[b0.jsxDEV("label",{className:"block text-xs text-[#888] mb-1",children:"Config Name"},void 0,!1,void 0,this),b0.jsxDEV("input",{type:"text",value:t,onChange:(L0)=>l(L0.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),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.jsxDEV("button",{type:"button",onClick:()=>o(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),b0.jsxDEV("button",{type:"submit",disabled:!t.trim()||p,className:"flex-1 text-sm bg-[#f97316] hover:bg-[#ea580c] text-white px-4 py-2 rounded transition disabled:opacity-50",children:p?"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),F0&&b0.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:b0.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm mx-4",children:[b0.jsxDEV("p",{className:"text-center mb-4",children:F0.message},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"flex gap-2",children:[b0.jsxDEV("button",{onClick:()=>X1(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),b0.jsxDEV("button",{onClick:F0.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),m&&b0.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:[b0.jsxDEV("span",{children:m},void 0,!1,void 0,this),b0.jsxDEV("button",{onClick:()=>D(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&b0.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:[b0.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),b0.jsxDEV("span",{children:["Waiting for ",M.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("div",{children:b0.jsxDEV("input",{type:"text",value:T,onChange:(L0)=>F(L0.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),D0.length>0&&b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Connected (",D0.length,")"]},void 0,!0,void 0,this),b0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:D0.map((L0)=>b0.jsxDEV(BO,{app:L0,connection:Z1(L0.slug),onConnect:()=>X0(L0),onDisconnect:()=>{let n0=Z1(L0.slug);if(n0)A0(n0)},onCreateMcpConfig:()=>J0(L0),connecting:w===L0.slug},L0.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("div",{children:[b0.jsxDEV("h3",{className:"text-sm font-medium text-[#888] mb-3",children:["Available Apps (",G1.length,")"]},void 0,!0,void 0,this),G1.length===0?b0.jsxDEV("p",{className:"text-[#666] text-sm",children:T?"No apps match your search":"No apps available"},void 0,!1,void 0,this):b0.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:G1.slice(0,50).map((L0)=>b0.jsxDEV(BO,{app:L0,onConnect:()=>X0(L0),connecting:w===L0.slug},L0.id,!1,void 0,this))},void 0,!1,void 0,this),G1.length>50&&b0.jsxDEV("p",{className:"text-xs text-[#555] mt-3 text-center",children:["Showing first 50 of ",G1.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 BO({app:Y,connection:G,onConnect:U,onDisconnect:O,onCreateMcpConfig:q,connecting:N}){let L=G?.status==="active",_=X9(Y),k=UO(Y),T=_&&k;return b0.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition ${L?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[b0.jsxDEV("div",{className:"flex items-start gap-3",children:[b0.jsxDEV("div",{className:"w-10 h-10 rounded bg-[#1a1a1a] flex items-center justify-center flex-shrink-0 overflow-hidden",children:Y.logo?b0.jsxDEV("img",{src:Y.logo,alt:Y.name,className:"w-8 h-8 object-contain",onError:(F)=>{F.target.style.display="none"}},void 0,!1,void 0,this):b0.jsxDEV("span",{className:"text-lg",children:Y.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),b0.jsxDEV("div",{className:"flex-1 min-w-0",children:[b0.jsxDEV("div",{className:"flex items-center gap-2",children:[b0.jsxDEV("h4",{className:"font-medium text-sm truncate",children:Y.name},void 0,!1,void 0,this),L&&b0.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!L&&_&&!k&&b0.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),!L&&T&&b0.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&&b0.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&&b0.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:Y.categories.slice(0,2).map((F)=>b0.jsxDEV("span",{className:"text-[10px] bg-[#1a1a1a] text-[#555] px-1.5 py-0.5 rounded",children:F},F,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),b0.jsxDEV("div",{className:"mt-3 flex gap-2",children:L?b0.jsxDEV(b0.Fragment,{children:[q&&b0.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&&b0.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):b0.jsxDEV("button",{onClick:U,disabled:N,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:N?"Connecting...":_&&!k?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var P=q0(Y1(),1);function A3(){let{authFetch:Y}=A1(),{projects:G,currentProjectId:U}=E4(),[O,q]=Q1.useState([]),[N,L]=Q1.useState(!0),[_,k]=Q1.useState(!1),[T,F]=Q1.useState(null),[w,b]=Q1.useState(null),[M,v]=Q1.useState("servers"),{confirm:m,ConfirmDialog:D}=S5(),C=G.length>0,V=async()=>{try{let l=await(await Y("/api/mcp/servers")).json();q(l.servers||[])}catch(t){console.error("Failed to fetch MCP servers:",t)}L(!1)};Q1.useEffect(()=>{V()},[Y]);let u=O.filter((t)=>{if(!U)return!0;if(U==="unassigned")return t.project_id===null;return t.project_id===null||t.project_id===U}),a=async(t)=>{try{await Y(`/api/mcp/servers/${t}/start`,{method:"POST"}),V()}catch(l){console.error("Failed to start server:",l)}},c=async(t)=>{try{await Y(`/api/mcp/servers/${t}/stop`,{method:"POST"}),V()}catch(l){console.error("Failed to stop server:",l)}},g=async(t)=>{if(!await m("Delete this MCP server?",{confirmText:"Delete",title:"Delete Server"}))return;try{if(await Y(`/api/mcp/servers/${t}`,{method:"DELETE"}),w?.id===t)b(null);V()}catch(p){console.error("Failed to delete server:",p)}},Q0=async(t,l)=>{try{await Y(`/api/mcp/servers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l})}),V()}catch(p){console.error("Failed to rename server:",p)}},o=async(t,l)=>{try{await Y(`/api/mcp/servers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),V()}catch(p){throw console.error("Failed to update server:",p),p}};return P.jsxDEV(P.Fragment,{children:[D,P.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[P.jsxDEV("div",{className:"max-w-6xl",children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[P.jsxDEV("div",{children:[P.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),P.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),M==="servers"&&P.jsxDEV("button",{onClick:()=>k(!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),P.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[P.jsxDEV("button",{onClick:()=>v("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>v("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>v("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${M==="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),M==="servers"&&P.jsxDEV(P.Fragment,{children:[N&&P.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!N&&u.length===0&&O.length===0&&P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[P.jsxDEV(y5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),P.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),P.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),P.jsxDEV("div",{className:"flex gap-3 justify-center",children:[P.jsxDEV("button",{onClick:()=>k(!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),P.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),!N&&u.length===0&&O.length>0&&P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:P.jsxDEV("p",{className:"text-[#666]",children:"No servers match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this),!N&&u.length>0&&P.jsxDEV("div",{className:"flex gap-6",children:[P.jsxDEV("div",{className:`space-y-3 ${w?"w-1/2":"w-full"}`,children:u.map((t)=>{let p=t.type==="http"&&t.url||t.status==="running",i=C&&t.project_id?G.find((Z0)=>Z0.id===t.project_id):null;return P.jsxDEV(aI,{server:t,project:i,selected:w?.id===t.id,onSelect:()=>b(p?t:null),onStart:()=>a(t.id),onStop:()=>c(t.id),onDelete:()=>g(t.id),onEdit:()=>F(t)},t.id,!1,void 0,this)})},void 0,!1,void 0,this),w&&P.jsxDEV("div",{className:"w-1/2",children:P.jsxDEV(nI,{server:w,onClose:()=>b(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),M==="hosted"&&P.jsxDEV(sI,{onServerAdded:V},void 0,!1,void 0,this),M==="registry"&&P.jsxDEV(tI,{onInstall:(t)=>{V(),v("servers")}},void 0,!1,void 0,this),M==="servers"&&P.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[P.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),P.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),P.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((t)=>P.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:t.pkg},t.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_&&P.jsxDEV(zT,{onClose:()=>k(!1),onAdded:()=>{k(!1),V()},projects:C?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),T&&P.jsxDEV(QT,{server:T,projects:C?G:void 0,onClose:()=>F(null),onSaved:()=>{F(null),V()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aI({server:Y,project:G,selected:U,onSelect:O,onStart:q,onStop:N,onDelete:L,onEdit:_}){let k=Y.type==="http"&&Y.url,T=k||Y.status==="running",F=()=>{if(k)return`${Y.source||"remote"} • http`;return`${Y.type} • ${Y.package||Y.command||"custom"}${Y.status==="running"&&Y.port?` • :${Y.port}`:""}`},w=()=>{if(G)return P.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 P.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 P.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:T?O:void 0,children:P.jsxDEV("div",{className:"flex items-center justify-between",children:[P.jsxDEV("div",{className:"flex items-center gap-3",children:[P.jsxDEV("div",{className:`w-2 h-2 rounded-full ${T?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),w()]},void 0,!0,void 0,this),P.jsxDEV("p",{className:"text-sm text-[#666]",children:F()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("button",{onClick:(b)=>{b.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),k?P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),L()},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"?P.jsxDEV(P.Fragment,{children:[P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),O()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),N()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),L()},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):P.jsxDEV(P.Fragment,{children:[P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),q()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:(b)=>{b.stopPropagation(),L()},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 nI({server:Y,onClose:G}){let{authFetch:U}=A1(),[O,q]=Q1.useState([]),[N,L]=Q1.useState(null),[_,k]=Q1.useState(!0),[T,F]=Q1.useState(null),[w,b]=Q1.useState(null);return Q1.useEffect(()=>{(async()=>{k(!0),F(null);try{let v=await U(`/api/mcp/servers/${Y.id}/tools`),m=await v.json();if(!v.ok){F(m.error||"Failed to fetch tools");return}q(m.tools||[]),L(m.serverInfo||null)}catch(v){F(`Failed to fetch tools: ${v}`)}finally{k(!1)}})()},[Y.id,U]),P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[P.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[P.jsxDEV("div",{children:[P.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),N&&P.jsxDEV("p",{className:"text-xs text-[#666]",children:[N.name," v",N.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P.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),P.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[_&&P.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),T&&P.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:T},void 0,!1,void 0,this),!_&&!T&&O.length===0&&P.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!_&&!T&&O.length>0&&!w&&P.jsxDEV("div",{className:"space-y-2",children:O.map((M)=>P.jsxDEV("button",{onClick:()=>b(M),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[P.jsxDEV("div",{className:"font-medium text-sm",children:M.name},void 0,!1,void 0,this),M.description&&P.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:M.description},void 0,!1,void 0,this)]},M.name,!0,void 0,this))},void 0,!1,void 0,this),w&&P.jsxDEV(rI,{serverId:Y.id,tool:w,onBack:()=>b(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function rI({serverId:Y,tool:G,onBack:U}){let{authFetch:O}=A1(),[q,N]=Q1.useState("{}"),[L,_]=Q1.useState(null),[k,T]=Q1.useState(null),[F,w]=Q1.useState(!1);Q1.useEffect(()=>{let M=G.inputSchema;if(M&&typeof M==="object"&&"properties"in M){let v=M.properties,m={};for(let[D,C]of Object.entries(v))if(C.default!==void 0)m[D]=C.default;else if(C.type==="string")m[D]="";else if(C.type==="number"||C.type==="integer")m[D]=0;else if(C.type==="boolean")m[D]=!1;else if(C.type==="array")m[D]=[];else if(C.type==="object")m[D]={};N(JSON.stringify(m,null,2))}},[G]);let b=async()=>{w(!0),T(null),_(null);try{let M=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:M})}),m=await v.json();if(!v.ok){T(m.error||"Failed to call tool");return}_(m.result)}catch(M){T(`Error: ${M}`)}finally{w(!1)}};return P.jsxDEV("div",{className:"space-y-4",children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),P.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),P.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&P.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&P.jsxDEV("div",{className:"text-xs",children:P.jsxDEV("details",{className:"cursor-pointer",children:[P.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),P.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),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),P.jsxDEV("textarea",{value:q,onChange:(M)=>N(M.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),P.jsxDEV("button",{onClick:b,disabled:F,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:F?"Calling...":"Call Tool"},void 0,!1,void 0,this),k&&P.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:k},void 0,!1,void 0,this),L&&P.jsxDEV("div",{className:"space-y-2",children:[P.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",L.isError&&P.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:`p-3 rounded text-sm ${L.isError?"bg-red-500/10":"bg-green-500/10"}`,children:L.content.map((M,v)=>P.jsxDEV("div",{className:"mb-2 last:mb-0",children:[M.type==="text"&&P.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:M.text},void 0,!1,void 0,this),M.type==="image"&&M.data&&P.jsxDEV("img",{src:`data:${M.mimeType||"image/png"};base64,${M.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 tI({onInstall:Y}){let{authFetch:G}=A1(),[U,O]=Q1.useState(""),[q,N]=Q1.useState([]),[L,_]=Q1.useState(!1),[k,T]=Q1.useState(!1),[F,w]=Q1.useState(null),[b,M]=Q1.useState(null),v=async(C)=>{_(!0),M(null);try{let V=await G(`/api/mcp/registry?search=${encodeURIComponent(C)}&limit=20`),u=await V.json();if(!V.ok)M(u.error||"Failed to search registry"),N([]);else N(u.servers||[])}catch(V){M(`Failed to search: ${V}`),N([])}finally{_(!1),T(!0)}},m=(C)=>{if(C.preventDefault(),U.trim())v(U.trim())};Q1.useEffect(()=>{v("")},[]);let D=async(C)=>{if(!C.npmPackage){M("This server does not have an npm package");return}w(C.id),M(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 u=await V.json();M(u.error||"Failed to add server");return}Y(C)}catch(V){M(`Failed to add server: ${V}`)}finally{w(null)}};return P.jsxDEV("div",{className:"space-y-6",children:[P.jsxDEV("form",{onSubmit:m,className:"flex gap-2",children:[P.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),P.jsxDEV("button",{type:"submit",disabled:L,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:L?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&P.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:b},void 0,!1,void 0,this),!L&&k&&q.length===0&&P.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&&P.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:q.map((C)=>P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:P.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[P.jsxDEV("div",{className:"flex-1 min-w-0",children:[P.jsxDEV("h3",{className:"font-medium truncate",children:C.name},void 0,!1,void 0,this),P.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:C.description||"No description"},void 0,!1,void 0,this),P.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[C.version&&P.jsxDEV("span",{children:["v",C.version]},void 0,!0,void 0,this),P.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),P.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),P.jsxDEV("div",{className:"flex-shrink-0",children:C.npmPackage?P.jsxDEV("button",{onClick:()=>D(C),disabled:F===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:F===C.id?"Adding...":"Add"},void 0,!1,void 0,this):C.repository?P.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),L&&P.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),P.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:P.jsxDEV("p",{children:["Servers are sourced from the"," ",P.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 sI({onServerAdded:Y}){let{authFetch:G}=A1(),[U,O]=Q1.useState("configs"),[q,N]=Q1.useState(!1),[L,_]=Q1.useState(!1),[k,T]=Q1.useState(!1),[F,w]=Q1.useState([]),[b,M]=Q1.useState(new Set),[v,m]=Q1.useState(!0),[D,C]=Q1.useState(!1),[V,u]=Q1.useState(null),{alert:a,AlertDialog:c}=J3(),g=async()=>{try{let[p,i]=await Promise.all([G("/api/providers"),G("/api/mcp/servers")]),Z0=await p.json(),T0=await i.json(),F0=Z0.providers||[],X1=T0.servers||[],O1=new Set(X1.filter((J0)=>J0.source==="composio"&&J0.url).map((J0)=>{let d=J0.url.match(/\/v3\/mcp\/([^/]+)/);return d?d[1]:null}).filter(Boolean));M(O1);let X0=F0.find((J0)=>J0.id==="composio"),U0=F0.find((J0)=>J0.id==="smithery"),_0=F0.find((J0)=>J0.id==="agentdojo");if(N(X0?.hasKey||!1),_(U0?.hasKey||!1),T(_0?.hasKey||!1),X0?.hasKey)Q0()}catch(p){console.error("Failed to fetch providers:",p)}m(!1)},Q0=async()=>{C(!0);try{let i=await(await G("/api/integrations/composio/configs")).json();w(i.configs||[])}catch(p){console.error("Failed to fetch Composio configs:",p)}C(!1)},o=async(p)=>{u(p);try{let i=await G(`/api/integrations/composio/configs/${p}/add`,{method:"POST"});if(i.ok)M((Z0)=>new Set([...Z0,p])),Y?.();else{let Z0=await i.json();await a(Z0.error||"Failed to add config",{title:"Error",variant:"error"})}}catch(i){console.error("Failed to add config:",i)}u(null)},t=(p)=>{return b.has(p)};if(Q1.useEffect(()=>{g()},[G]),v)return P.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);if(!(q||L||k))return P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[P.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),P.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),P.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 P.jsxDEV(P.Fragment,{children:[c,P.jsxDEV("div",{className:"space-y-6",children:[q&&P.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded-lg p-1 w-fit",children:[P.jsxDEV("button",{onClick:()=>O("configs"),className:`px-4 py-2 rounded text-sm font-medium transition ${U==="configs"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"MCP Configs"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>O("connect"),className:`px-4 py-2 rounded text-sm font-medium transition ${U==="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),q&&U==="connect"&&P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:P.jsxDEV("div",{children:[P.jsxDEV("h2",{className:"font-medium",children:"Connect Apps via Composio"},void 0,!1,void 0,this),P.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Connect your accounts to enable tools in MCP configs"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),P.jsxDEV(KO,{providerId:"composio",onConnectionComplete:()=>{Q0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&U==="configs"&&P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("h2",{className:"font-medium",children:"Composio MCP Configs"},void 0,!1,void 0,this),P.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"flex items-center gap-3",children:[P.jsxDEV("button",{onClick:Q0,disabled:D,className:"text-xs text-[#666] hover:text-[#888] transition",children:D?"Loading...":"Refresh"},void 0,!1,void 0,this),P.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),D?P.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):F.length===0?P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[P.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),P.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:["First ",P.jsxDEV("button",{onClick:()=>O("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),P.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):P.jsxDEV("div",{className:"space-y-2",children:F.map((p)=>{let i=t(p.id),Z0=V===p.id;return P.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-3 transition flex items-center justify-between ${i?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:[P.jsxDEV("div",{className:"flex-1 min-w-0",children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("span",{className:"font-medium text-sm",children:p.name},void 0,!1,void 0,this),P.jsxDEV("span",{className:"text-xs text-[#555]",children:[p.toolsCount," tools"]},void 0,!0,void 0,this),i&&P.jsxDEV("span",{className:"text-xs text-green-400",children:"Added"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p.toolkits.length>0&&P.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[p.toolkits.slice(0,4).map((T0)=>P.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:T0},T0,!1,void 0,this)),p.toolkits.length>4&&P.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",p.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[i?P.jsxDEV("span",{className:"text-xs text-[#555] px-2 py-1",children:"In Servers"},void 0,!1,void 0,this):P.jsxDEV("button",{onClick:()=>o(p.id),disabled:Z0,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] text-black px-3 py-1 rounded font-medium transition disabled:opacity-50",children:Z0?"Adding...":"Add"},void 0,!1,void 0,this),P.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${p.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)]},p.id,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L&&P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("h2",{className:"font-medium",children:"Smithery"},void 0,!1,void 0,this),P.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("a",{href:"https://smithery.ai/servers",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"View Servers →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:P.jsxDEV("p",{className:"text-sm text-[#666]",children:"Smithery servers can be added from the Registry tab."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[P.jsxDEV("div",{className:"flex items-center gap-2",children:[P.jsxDEV("h2",{className:"font-medium",children:"AgentDojo"},void 0,!1,void 0,this),P.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("a",{href:"https://agentdojo.com/tools",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Browse Tools →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:P.jsxDEV("p",{className:"text-sm text-[#666]",children:"AgentDojo integration coming soon. Browse available tools on their platform."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[P.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."," · ",P.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 eI(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 N=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,L;while((L=N.exec(Y))!==null){let _=L[1],k=L[2],T=_.toUpperCase().replace(/-/g,"_"),F=O?`${O.toUpperCase().replace(/-/g,"_")}_${T}`:T;G.push({key:F,flag:_}),U=U.replace(new RegExp(`(--${_}\\s+)${k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${_} $${F}`)}return{cleanCommand:U,credentials:G,serverName:O}}function zT({onClose:Y,onAdded:G,projects:U,defaultProjectId:O}){let{authFetch:q}=A1(),[N,L]=Q1.useState("npm"),[_,k]=Q1.useState(""),[T,F]=Q1.useState(""),[w,b]=Q1.useState(""),[M,v]=Q1.useState(""),[m,D]=Q1.useState(""),[C,V]=Q1.useState(""),[u,a]=Q1.useState(""),[c,g]=Q1.useState([]),[Q0,o]=Q1.useState(O||null),[t,l]=Q1.useState(!1),[p,i]=Q1.useState(null),Z0=U&&U.length>0,T0=()=>{g([...c,{key:"",value:""}])},F0=(J0,d,A0)=>{let S0=[...c];S0[J0][d]=A0,g(S0)},X1=(J0)=>{g(c.filter((d,A0)=>A0!==J0))},O1=(J0)=>{if(v(J0),J0.includes("YOUR_")||J0.includes("<")||J0.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(J0)){let{cleanCommand:d,credentials:A0,serverName:S0}=eI(J0);if(!_&&S0)k(S0);if(A0.length>0){let Z1=new Set(c.map((D0)=>D0.key)),t0=A0.filter((D0)=>!Z1.has(D0.key)).map((D0)=>({key:D0.key,value:""}));if(t0.length>0)g([...c,...t0]),v(d)}}},X0=(J0)=>{if(J0.startsWith("npx ")||J0.includes(" --")||J0.includes("YOUR_")||J0.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(J0))L("command"),O1(J0);else if(F(J0),!_&&J0){let A0=J0.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(A0&&A0!==J0)k(A0)}},U0=async()=>{if(!_){i("Name is required");return}if(N==="npm"&&!T){i("npm package is required");return}if(N==="pip"&&!T){i("pip package is required");return}if(N==="command"&&!M){i("Command is required");return}if(N==="http"&&!m){i("URL is required");return}l(!0),i(null);let J0={};for(let{key:d,value:A0}of c)if(d.trim())J0[d.trim()]=A0;try{let d={name:_};if(N==="npm")d.type="npm",d.package=T;else if(N==="pip"){if(d.type="pip",d.package=T,w)d.pip_module=w}else if(N==="http"){d.type="http",d.url=m;let S0={"Content-Type":"application/json"};if(C&&u){let Z1=btoa(`${C}:${u}`);S0.Authorization=`Basic ${Z1}`}d.headers=S0}else{let S0=M.trim().split(/\s+/);d.type="custom",d.command=S0[0],d.args=S0.slice(1).join(" ")}if(Object.keys(J0).length>0)d.env=J0;if(Q0)d.project_id=Q0;let A0=await q("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!A0.ok){let S0=await A0.json();i(S0.error||"Failed to add server"),l(!1);return}G()}catch(d){i("Failed to add server"),l(!1)}},_0=(J0,d)=>{L("npm"),k(J0),F(d)};return P.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[P.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[P.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"p-4 space-y-4",children:[P.jsxDEV("div",{children:[P.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),P.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((J0)=>P.jsxDEV("button",{onClick:()=>{if(L(J0.type),k(J0.name),F(J0.pkg),J0.type==="pip"&&"module"in J0)b(J0.module||"");else b("")},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:J0.name},J0.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[P.jsxDEV("button",{onClick:()=>L("npm"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${N==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>L("pip"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${N==="pip"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"pip"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>L("command"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${N==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Command"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:()=>L("http"),className:`flex-1 px-2 py-1.5 rounded text-sm transition ${N==="http"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"HTTP"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:_,onChange:(J0)=>k(J0.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),Z0&&P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),P.jsxDEV(V6,{value:Q0||"",onChange:(J0)=>o(J0||null),options:[{value:"",label:"Global (all projects)"},...U.map((J0)=>({value:J0.id,label:J0.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),P.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),N==="npm"&&P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:T,onChange:(J0)=>X0(J0.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),P.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),N==="pip"&&P.jsxDEV("div",{className:"space-y-4",children:[P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"pip Package"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:T,onChange:(J0)=>{if(F(J0.target.value),!w&&J0.target.value){let d=J0.target.value.split("[")[0].replace(/-/g,".");b(d)}},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),P.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),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Module (optional)"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:w,onChange:(J0)=>b(J0.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),P.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),N==="command"&&P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:M,onChange:(J0)=>O1(J0.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),P.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),N==="http"&&P.jsxDEV("div",{className:"space-y-4",children:[P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"URL"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:m,onChange:(J0)=>D(J0.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),P.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded",children:[P.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),P.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Username"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:C,onChange:(J0)=>V(J0.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),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-xs text-[#555] mb-1",children:"Password"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"password",value:u,onChange:(J0)=>a(J0.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),P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[P.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:T0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c.length===0&&P.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),c.length>0&&P.jsxDEV("div",{className:"space-y-2",children:c.map((J0,d)=>P.jsxDEV("div",{className:"flex gap-2",children:[P.jsxDEV("input",{type:"text",value:J0.key,onChange:(A0)=>F0(d,"key",A0.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),P.jsxDEV("input",{type:"password",value:J0.value,onChange:(A0)=>F0(d,"value",A0.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),P.jsxDEV("button",{onClick:()=>X1(d),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},d,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p&&P.jsxDEV("p",{className:"text-red-400 text-sm",children:p},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[P.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),P.jsxDEV("button",{onClick:U0,disabled:t||!_||(N==="npm"?!T:N==="pip"?!T:N==="http"?!m:!M),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:t?"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 QT({server:Y,projects:G,onClose:U,onSaved:O}){let{authFetch:q}=A1(),[N,L]=Q1.useState(Y.name),[_,k]=Q1.useState(Y.package||""),[T,F]=Q1.useState(Y.command||""),[w,b]=Q1.useState(Y.args||""),[M,v]=Q1.useState(()=>{return Object.entries(Y.env||{}).map(([p,i])=>({key:p,value:i}))}),[m,D]=Q1.useState(Y.project_id),[C,V]=Q1.useState(!1),[u,a]=Q1.useState(null),c=G&&G.length>0,g=Y.type==="http"&&Y.url,Q0=()=>{v([...M,{key:"",value:""}])},o=(p,i,Z0)=>{let T0=[...M];T0[p][i]=Z0,v(T0)},t=(p)=>{v(M.filter((i,Z0)=>Z0!==p))},l=async()=>{if(!N.trim()){a("Name is required");return}V(!0),a(null);let p={};for(let{key:i,value:Z0}of M)if(i.trim())p[i.trim()]=Z0;try{let i={name:N.trim(),env:p};if(!g){if(Y.type==="npm"&&_.trim())i.package=_.trim();if(Y.type==="custom"){if(T.trim())i.command=T.trim();if(w.trim())i.args=w.trim()}}i.project_id=m;let Z0=await q(`/api/mcp/servers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!Z0.ok){let T0=await Z0.json();a(T0.error||"Failed to save changes"),V(!1);return}if(Y.status==="running"&&!g)try{await q(`/api/mcp/servers/${Y.id}/stop`,{method:"POST"}),await q(`/api/mcp/servers/${Y.id}/start`,{method:"POST"})}catch(T0){console.error("Failed to restart server:",T0)}O()}catch(i){a("Failed to save changes"),V(!1)}};return P.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:P.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[P.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[P.jsxDEV("h2",{className:"text-lg font-semibold",children:"Edit MCP Server"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"p-4 space-y-4",children:[P.jsxDEV("div",{className:"text-sm text-[#666] bg-[#0a0a0a] border border-[#222] rounded p-3",children:["Type: ",P.jsxDEV("span",{className:"text-[#888]",children:Y.type},void 0,!1,void 0,this),Y.package&&P.jsxDEV(P.Fragment,{children:[" • Package: ",P.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.package},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.command&&P.jsxDEV(P.Fragment,{children:[" • Command: ",P.jsxDEV("span",{className:"text-[#888] font-mono",children:Y.command},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g&&Y.url&&P.jsxDEV(P.Fragment,{children:[" • URL: ",P.jsxDEV("span",{className:"text-[#888] font-mono text-xs",children:Y.url},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:N,onChange:(p)=>L(p.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),c&&P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Scope"},void 0,!1,void 0,this),P.jsxDEV(V6,{value:m||"",onChange:(p)=>D(p||null),options:[{value:"",label:"Global (all projects)"},...G.map((p)=>({value:p.id,label:p.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.type==="npm"&&P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:_,onChange:(p)=>k(p.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==="custom"&&P.jsxDEV(P.Fragment,{children:[P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:T,onChange:(p)=>F(p.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),P.jsxDEV("div",{children:[P.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments"},void 0,!1,void 0,this),P.jsxDEV("input",{type:"text",value:w,onChange:(p)=>b(p.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),!g&&P.jsxDEV("div",{children:[P.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[P.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),P.jsxDEV("button",{onClick:Q0,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M.length===0&&P.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),M.length>0&&P.jsxDEV("div",{className:"space-y-2",children:M.map((p,i)=>P.jsxDEV("div",{className:"flex gap-2",children:[P.jsxDEV("input",{type:"text",value:p.key,onChange:(Z0)=>o(i,"key",Z0.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),P.jsxDEV("input",{type:"password",value:p.value,onChange:(Z0)=>o(i,"value",Z0.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),P.jsxDEV("button",{onClick:()=>t(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),P.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),u&&P.jsxDEV("p",{className:"text-red-400 text-sm",children:u},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[P.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),P.jsxDEV("button",{onClick:l,disabled:C||!N.trim(),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:C?"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 I4=q0(k1(),1);var B0=q0(Y1(),1);function Z9(){let{authFetch:Y}=A1(),{projects:G,currentProjectId:U}=E4(),[O,q]=I4.useState([]),[N,L]=I4.useState(!0),[_,k]=I4.useState("installed"),[T,F]=I4.useState(!1),[w,b]=I4.useState(!1),[M,v]=I4.useState(null),{confirm:m,ConfirmDialog:D}=S5(),{alert:C,AlertDialog:V}=J3(),u=G.length>0,[a,c]=I4.useState(""),[g,Q0]=I4.useState([]),[o,t]=I4.useState(!1),[l,p]=I4.useState(null),i=O.filter((U0)=>{if(!U)return!0;if(U==="unassigned")return U0.project_id===null;return U0.project_id===null||U0.project_id===U}),Z0=async()=>{try{let _0=await(await Y("/api/skills")).json();q(_0.skills||[])}catch(U0){console.error("Failed to fetch skills:",U0)}L(!1)},T0=async(U0)=>{t(!0);try{let _0=U0!==void 0?U0:a,J0=_0?`/api/skills/marketplace/search?q=${encodeURIComponent(_0)}`:"/api/skills/marketplace/featured",A0=await(await Y(J0)).json();Q0(A0.skills||[])}catch(_0){console.error("Failed to search marketplace:",_0)}t(!1)};I4.useEffect(()=>{Z0()},[Y]),I4.useEffect(()=>{if(_==="marketplace"&&g.length===0)T0("")},[_]);let F0=async(U0)=>{try{await Y(`/api/skills/${U0}/toggle`,{method:"POST"}),Z0()}catch(_0){console.error("Failed to toggle skill:",_0)}},X1=async(U0)=>{if(!await m("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await Y(`/api/skills/${U0}`,{method:"DELETE"}),M?.id===U0)v(null);Z0()}catch(J0){console.error("Failed to delete skill:",J0)}},O1=async(U0)=>{p(U0.id);try{let _0=await Y(`/api/skills/marketplace/${U0.id}/install`,{method:"POST"}),J0=await _0.json();if(_0.ok)await C(`Installed "${U0.name}" successfully!`,{title:"Skill Installed"}),Z0(),k("installed");else await C(J0.error||"Failed to install skill",{title:"Installation Failed"})}catch(_0){console.error("Failed to install skill:",_0),await C("Failed to install skill",{title:"Error"})}p(null)},X0=(U0)=>O.some((_0)=>_0.name===U0);return B0.jsxDEV(B0.Fragment,{children:[D,V,B0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:B0.jsxDEV("div",{className:"max-w-6xl",children:[B0.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[B0.jsxDEV("div",{children:[B0.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),B0.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"&&B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("button",{onClick:()=>b(!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),B0.jsxDEV("button",{onClick:()=>F(!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),B0.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[B0.jsxDEV("button",{onClick:()=>k("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),B0.jsxDEV("button",{onClick:()=>k("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"&&B0.jsxDEV(B0.Fragment,{children:N?B0.jsxDEV("div",{className:"text-[#666]",children:"Loading skills..."},void 0,!1,void 0,this):O.length===0?B0.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B0.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),B0.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:()=>k("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):i.length===0?B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:B0.jsxDEV("p",{className:"text-[#666]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):B0.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:i.map((U0)=>{let _0=u&&U0.project_id?G.find((J0)=>J0.id===U0.project_id):null;return B0.jsxDEV(XT,{skill:U0,project:_0,onToggle:()=>F0(U0.id),onDelete:()=>X1(U0.id),onView:()=>v(U0)},U0.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),_==="marketplace"&&B0.jsxDEV(B0.Fragment,{children:[B0.jsxDEV("div",{className:"mb-6",children:B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("input",{type:"text",value:a,onChange:(U0)=>c(U0.target.value),onKeyDown:(U0)=>U0.key==="Enter"&&T0(),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),B0.jsxDEV("button",{onClick:()=>T0(),disabled:o,className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:o?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),o?B0.jsxDEV("div",{className:"text-[#666]",children:"Loading..."},void 0,!1,void 0,this):g.length===0?B0.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B0.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),B0.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):B0.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:g.map((U0)=>B0.jsxDEV(ZT,{skill:U0,installed:X0(U0.name),installing:l===U0.id,onInstall:()=>O1(U0)},U0.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),T&&B0.jsxDEV(JT,{authFetch:Y,onClose:()=>F(!1),onCreated:()=>{F(!1),Z0()},projects:u?G:void 0,defaultProjectId:U&&U!=="unassigned"?U:null},void 0,!1,void 0,this),w&&B0.jsxDEV(YT,{authFetch:Y,onClose:()=>b(!1),onImported:()=>{b(!1),Z0()}},void 0,!1,void 0,this),M&&B0.jsxDEV($T,{skill:M,authFetch:Y,onClose:()=>v(null),onUpdated:()=>{v(null),Z0()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function XT({skill:Y,project:G,onToggle:U,onDelete:O,onView:q}){let N={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[Y.source],L=()=>{if(G)return B0.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 B0.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 B0.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:[B0.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[B0.jsxDEV("div",{className:"flex-1 min-w-0",children:[B0.jsxDEV("div",{className:"flex items-center gap-2",children:[B0.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),L()]},void 0,!0,void 0,this),B0.jsxDEV("p",{className:"text-xs text-[#666] flex items-center gap-2 mt-0.5",children:[B0.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:N},void 0,!1,void 0,this),Y.metadata?.version&&B0.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),B0.jsxDEV("button",{onClick:(_)=>{_.stopPropagation(),U()},className:`w-10 h-5 rounded-full transition-colors relative ${Y.enabled?"bg-[#f97316]":"bg-[#333]"}`,children:B0.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),B0.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"flex items-center justify-between",children:[B0.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[Y.allowed_tools.slice(0,2).map((_)=>B0.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&&B0.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),B0.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 ZT({skill:Y,installed:G,installing:U,onInstall:O}){return B0.jsxDEV("div",{className:"bg-[#111] rounded-lg p-5 border border-[#1a1a1a] hover:border-[#333] transition",children:[B0.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[B0.jsxDEV("div",{className:"flex-1 min-w-0",children:[B0.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:Y.name},void 0,!1,void 0,this),B0.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),B0.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),B0.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:Y.description},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"flex items-center justify-between",children:[B0.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:Y.tags.slice(0,3).map((q)=>B0.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?B0.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):B0.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),B0.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 JT({authFetch:Y,onClose:G,onCreated:U,projects:O,defaultProjectId:q}){let[N,L]=I4.useState(""),[_,k]=I4.useState(""),[T,F]=I4.useState(""),[w,b]=I4.useState(q||null),[M,v]=I4.useState(!1),[m,D]=I4.useState(null),C=O&&O.length>0,V=async()=>{if(!N||!_||!T){D("All fields are required");return}v(!0),D(null);try{let u={name:N,description:_,content:T,source:"local"};if(w)u.project_id=w;let a=await Y("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}),c=await a.json();if(!a.ok){D(c.error||"Failed to create skill"),v(!1);return}U()}catch(u){D("Failed to create skill"),v(!1)}};return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(u)=>u.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:B0.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),B0.jsxDEV("div",{className:"p-6 space-y-4",children:[m&&B0.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),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Name"},void 0,!1,void 0,this),B0.jsxDEV("input",{type:"text",value:N,onChange:(u)=>L(u.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),B0.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),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Description"},void 0,!1,void 0,this),B0.jsxDEV("input",{type:"text",value:_,onChange:(u)=>k(u.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&&B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Scope"},void 0,!1,void 0,this),B0.jsxDEV(V6,{value:w||"",onChange:(u)=>b(u||null),options:[{value:"",label:"Global (all projects)"},...O.map((u)=>({value:u.id,label:u.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),B0.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),B0.jsxDEV("div",{children:[B0.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),B0.jsxDEV("textarea",{value:T,onChange:(u)=>F(u.target.value),placeholder:`# Skill Instructions
|
|
216
|
-
|
|
217
|
-
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),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[B0.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:V,disabled:M,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:M?"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 YT({authFetch:Y,onClose:G,onImported:U}){let[O,q]=I4.useState(""),[N,L]=I4.useState(!1),[_,k]=I4.useState(null);return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:G,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(F)=>F.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:[B0.jsxDEV("h2",{className:"text-xl font-semibold",children:"Import Skill"},void 0,!1,void 0,this),B0.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),B0.jsxDEV("div",{className:"p-6 space-y-4",children:[_&&B0.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),B0.jsxDEV("textarea",{value:O,onChange:(F)=>q(F.target.value),placeholder:`---
|
|
218
|
-
name: skill-name
|
|
219
|
-
description: What this skill does...
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
# Instructions
|
|
223
|
-
|
|
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),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[B0.jsxDEV("button",{onClick:G,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),B0.jsxDEV("button",{onClick:async()=>{if(!O.trim()){k("Paste SKILL.md content");return}L(!0),k(null);try{let F=await Y("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:O})}),w=await F.json();if(!F.ok){k(w.error||"Failed to import skill"),L(!1);return}U()}catch(F){k("Failed to import skill"),L(!1)}},disabled:N,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:N?"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 $T({skill:Y,authFetch:G,onClose:U,onUpdated:O}){let[q,N]=I4.useState(!1),[L,_]=I4.useState(Y.content),[k,T]=I4.useState(!1),F=async()=>{T(!0);try{await G(`/api/skills/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:L})}),O()}catch(b){console.error("Failed to save:",b)}T(!1)},w=async()=>{try{let M=await(await G(`/api/skills/${Y.id}/export`)).text(),v=new Blob([M],{type:"text/markdown"}),m=URL.createObjectURL(v),D=document.createElement("a");D.href=m,D.download=`${Y.name}-SKILL.md`,D.click(),URL.revokeObjectURL(m)}catch(b){console.error("Failed to export:",b)}};return B0.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:U,children:B0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(b)=>b.stopPropagation(),children:[B0.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a] flex items-center justify-between",children:[B0.jsxDEV("div",{children:[B0.jsxDEV("h2",{className:"text-xl font-semibold",children:Y.name},void 0,!1,void 0,this),B0.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),B0.jsxDEV("div",{className:"flex gap-2",children:[B0.jsxDEV("button",{onClick:w,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),B0.jsxDEV("button",{onClick:()=>N(!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),B0.jsxDEV("div",{className:"p-6",children:q?B0.jsxDEV("textarea",{value:L,onChange:(b)=>_(b.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):B0.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),B0.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-between",children:[B0.jsxDEV("div",{className:"text-xs text-[#555]",children:Y.source!=="local"&&Y.source_url&&B0.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),B0.jsxDEV("div",{className:"flex gap-3",children:[B0.jsxDEV("button",{onClick:U,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),q&&B0.jsxDEV("button",{onClick:F,disabled:k,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:k?"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 m4=q0(k1(),1);var j0=q0(Y1(),1);function WO(Y){let G=Y.category==="LLM",U=Y.category==="TOOL",O=Y.level==="error",q=Y.data?.input_tokens||0,N=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:N}}function J9(){let{events:Y}=TQ(),{currentProjectId:G,currentProject:U}=E4(),{authFetch:O}=A1(),[q,N]=m4.useState(null),[L,_]=m4.useState([]),[k,T]=m4.useState([]),[F,w]=m4.useState(!0),[b,M]=m4.useState({level:"",agent_id:""}),[v,m]=m4.useState(new Set(["DATABASE"])),[D,C]=m4.useState([]),[V,u]=m4.useState(null),a=m4.useRef(new Set),[c,g]=m4.useState(new Set),Q0=m4.useRef(new Set);m4.useEffect(()=>{(async()=>{try{let S0=await(await O("/api/agents")).json();C(S0.agents||[])}catch(A0){console.error("Failed to fetch agents:",A0)}})()},[O]);let o=m4.useMemo(()=>{if(G===null)return D;if(G==="unassigned")return D.filter((d)=>!d.projectId);return D.filter((d)=>d.projectId===G)},[D,G]),t=m4.useMemo(()=>new Set(o.map((d)=>d.id)),[o]),l=async()=>{w(!0);try{let d=G==="unassigned"?"null":G||"",A0=new URLSearchParams;if(d)A0.set("project_id",d);let Z1=await(await O(`/api/telemetry/stats${A0.toString()?`?${A0}`:""}`)).json();N(Z1.stats);let t0=new URLSearchParams;if(b.level)t0.set("level",b.level);if(b.agent_id)t0.set("agent_id",b.agent_id);if(d)t0.set("project_id",d);t0.set("limit","100");let L0=(await(await O(`/api/telemetry/events?${t0}`)).json()).events||[];_(L0),a.current=new Set(L0.map((h4)=>h4.id));let n0=new URLSearchParams;if(n0.set("group_by","agent"),d)n0.set("project_id",d);let B4=await(await O(`/api/telemetry/usage?${n0}`)).json();T(B4.usage||[])}catch(d){console.error("Failed to fetch telemetry:",d)}w(!1)};m4.useEffect(()=>{l();let d=setInterval(l,60000);return()=>clearInterval(d)},[b,G,O]);let p=m4.useMemo(()=>{if(!q)return null;let d=0,A0=0,S0=0,Z1=0,t0=0,D0=0;for(let G1 of Y)if(!a.current.has(G1.id)){d++;let L0=WO(G1);A0+=L0.llm_calls,S0+=L0.tool_calls,Z1+=L0.errors,t0+=L0.input_tokens,D0+=L0.output_tokens}return{total_events:q.total_events+d,total_llm_calls:q.total_llm_calls+A0,total_tool_calls:q.total_tool_calls+S0,total_errors:q.total_errors+Z1,total_input_tokens:q.total_input_tokens+t0,total_output_tokens:q.total_output_tokens+D0}},[q,Y]),i=m4.useMemo(()=>{let d=new Map;for(let A0 of k)d.set(A0.agent_id,{...A0});for(let A0 of Y)if(!a.current.has(A0.id)){let S0=WO(A0),Z1=d.get(A0.agent_id);if(Z1)Z1.llm_calls+=S0.llm_calls,Z1.tool_calls+=S0.tool_calls,Z1.errors+=S0.errors,Z1.input_tokens+=S0.input_tokens,Z1.output_tokens+=S0.output_tokens;else d.set(A0.agent_id,{agent_id:A0.agent_id,llm_calls:S0.llm_calls,tool_calls:S0.tool_calls,errors:S0.errors,input_tokens:S0.input_tokens,output_tokens:S0.output_tokens})}return Array.from(d.values())},[k,Y]),Z0=m4.default.useMemo(()=>{let d=Y;if(G!==null)d=d.filter((t0)=>t.has(t0.agent_id));if(b.agent_id)d=d.filter((t0)=>t0.agent_id===b.agent_id);if(v.size>0)d=d.filter((t0)=>!v.has(t0.category));if(b.level)d=d.filter((t0)=>t0.level===b.level);let A0=L;if(v.size>0)A0=A0.filter((t0)=>!v.has(t0.category));let S0=new Set(d.map((t0)=>t0.id)),Z1=[...d];for(let t0 of A0)if(!S0.has(t0.id))Z1.push(t0),S0.add(t0.id);return Z1.sort((t0,D0)=>new Date(D0.timestamp).getTime()-new Date(t0.timestamp).getTime()),Z1.slice(0,100)},[Y,L,b,v,G,t]);m4.useEffect(()=>{let d=[];for(let A0 of Y)if(!Q0.current.has(A0.id))Q0.current.add(A0.id),d.push(A0.id);if(d.length>0)g((A0)=>{let S0=new Set(A0);return d.forEach((Z1)=>S0.add(Z1)),S0}),setTimeout(()=>{g((A0)=>{let S0=new Set(A0);return d.forEach((Z1)=>S0.delete(Z1)),S0})},5000)},[Y]);let T0=(d)=>{return D.find((S0)=>S0.id===d)?.name||d},F0=(d)=>{if(d>=1e6)return(d/1e6).toFixed(1)+"M";if(d>=1000)return(d/1000).toFixed(1)+"K";return d.toString()},X1={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},O1={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"},X0=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],U0=(d)=>{m((A0)=>{let S0=new Set(A0);if(S0.has(d))S0.delete(d);else S0.add(d);return S0})},_0=[{value:"",label:"All Agents"},...o.map((d)=>({value:d.id,label:d.name}))],J0=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return j0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:j0.jsxDEV("div",{children:[j0.jsxDEV("div",{className:"mb-6",children:[j0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[U&&j0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:U.color}},void 0,!1,void 0,this),j0.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),j0.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),p&&j0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[j0.jsxDEV(gQ,{label:"Events",value:F0(p.total_events)},void 0,!1,void 0,this),j0.jsxDEV(gQ,{label:"LLM Calls",value:F0(p.total_llm_calls)},void 0,!1,void 0,this),j0.jsxDEV(gQ,{label:"Tool Calls",value:F0(p.total_tool_calls)},void 0,!1,void 0,this),j0.jsxDEV(gQ,{label:"Errors",value:F0(p.total_errors),color:"red"},void 0,!1,void 0,this),j0.jsxDEV(gQ,{label:"Input Tokens",value:F0(p.total_input_tokens)},void 0,!1,void 0,this),j0.jsxDEV(gQ,{label:"Output Tokens",value:F0(p.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),i.length>0&&j0.jsxDEV("div",{className:"mb-6",children:[j0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),j0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:j0.jsxDEV("table",{className:"w-full text-sm",children:[j0.jsxDEV("thead",{children:j0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[j0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),j0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),j0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),j0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),j0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),j0.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),j0.jsxDEV("tbody",{children:i.map((d)=>j0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[j0.jsxDEV("td",{className:"p-3 font-medium",children:T0(d.agent_id)},void 0,!1,void 0,this),j0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.llm_calls)},void 0,!1,void 0,this),j0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.tool_calls)},void 0,!1,void 0,this),j0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.input_tokens)},void 0,!1,void 0,this),j0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(d.output_tokens)},void 0,!1,void 0,this),j0.jsxDEV("td",{className:"p-3 text-right",children:d.errors>0?j0.jsxDEV("span",{className:"text-red-400",children:d.errors},void 0,!1,void 0,this):j0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},d.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),j0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[j0.jsxDEV("div",{className:"w-44",children:j0.jsxDEV(V6,{value:b.agent_id,options:_0,onChange:(d)=>M({...b,agent_id:d}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),j0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:X0.map((d)=>{let A0=v.has(d),S0=O1[d]||"bg-[#222] text-[#888] border-[#333]";return j0.jsxDEV("button",{onClick:()=>U0(d),className:`px-2 py-0.5 rounded text-xs border transition-all ${A0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":S0}`,children:d},d,!1,void 0,this)})},void 0,!1,void 0,this),j0.jsxDEV("div",{className:"flex items-center gap-2",children:[j0.jsxDEV("div",{className:"w-36",children:j0.jsxDEV(V6,{value:b.level,options:J0,onChange:(d)=>M({...b,level:d}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),j0.jsxDEV("button",{onClick:l,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),j0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[j0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[j0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&j0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F&&Z0.length===0?j0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):Z0.length===0?j0.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):j0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:Z0.map((d)=>{let A0=c.has(d.id);return j0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${A0?"bg-green-500/5":""}`,style:{animation:A0?"slideIn 0.3s ease-out":void 0},onClick:()=>u(V===d.id?null:d.id),children:j0.jsxDEV("div",{className:"flex items-start gap-3",children:[j0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${O1[d.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:d.category},void 0,!1,void 0,this),j0.jsxDEV("div",{className:"flex-1 min-w-0",children:[j0.jsxDEV("div",{className:"flex items-center gap-2",children:[j0.jsxDEV("span",{className:"font-medium text-sm",children:d.type},void 0,!1,void 0,this),j0.jsxDEV("span",{className:`text-xs ${X1[d.level]||"text-[#666]"}`,children:d.level},void 0,!1,void 0,this),d.duration_ms&&j0.jsxDEV("span",{className:"text-xs text-[#555]",children:[d.duration_ms,"ms"]},void 0,!0,void 0,this),j0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${A0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),j0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[T0(d.agent_id)," · ",new Date(d.timestamp).toLocaleString()]},void 0,!0,void 0,this),d.error&&j0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:d.error},void 0,!1,void 0,this),V===d.id&&d.data&&Object.keys(d.data).length>0&&j0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(d.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},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,!1,void 0,this)}function gQ({label:Y,value:G,color:U}){return j0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[j0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),j0.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 y8=q0(k1(),1);var p0=q0(Y1(),1),HT={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function OO(){let{authFetch:Y}=A1(),[G,U]=y8.useState(null),[O,q]=y8.useState(!0),[N,L]=y8.useState(new Set),[_,k]=y8.useState(null),[T,F]=y8.useState(!1);y8.useEffect(()=>{M()},[]);async function w(){if(!G)return;try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),F(!0),setTimeout(()=>F(!1),2000)}catch(c){console.error("Failed to copy:",c)}}function b(){if(!G)return;let c=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),g=URL.createObjectURL(c),Q0=document.createElement("a");Q0.href=g,Q0.download="apteva-openapi.json",Q0.click(),URL.revokeObjectURL(g)}async function M(){try{let c=await Y("/api/openapi");if(c.ok){let g=await c.json();U(g)}}catch(c){console.error("Failed to load OpenAPI spec:",c)}finally{q(!1)}}function v(c){L((g)=>{let Q0=new Set(g);if(Q0.has(c))Q0.delete(c);else Q0.add(c);return Q0})}function m(c,g=0){if(!c)return"{}";if(g>2)return"...";if(c.$ref)return c.$ref.split("/").pop()||"Object";if(c.type==="array")return`${m(c.items,g+1)}[]`;if(c.type==="object"&&c.properties){let Q0=Object.entries(c.properties).slice(0,3).map(([t,l])=>`${t}: ${l.type||"any"}`).join(", "),o=Object.keys(c.properties).length>3?", ...":"";return`{ ${Q0}${o} }`}return c.type||"any"}if(O)return p0.jsxDEV("div",{style:{padding:24},children:p0.jsxDEV("p",{style:{color:"#888"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!G)return p0.jsxDEV("div",{style:{padding:24},children:p0.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let D=G.tags||[],C=Object.entries(G.paths);function V(c){let g=new Set;function Q0(o){if(!o)return;if(typeof o==="object"){if(o.$ref){let t=o.$ref.split("/").pop();if(t)g.add(t)}for(let t of Object.values(o))Q0(t)}}return Q0(c.requestBody),Q0(c.responses),g}function u(){if(!_||!G.components?.schemas)return Object.keys(G.components?.schemas||{});let c=new Set;for(let[g,Q0]of a)for(let[o,t]of Object.entries(Q0)){if(!["get","post","put","delete","patch"].includes(o))continue;if(t.tags?.includes(_))V(t).forEach((p)=>c.add(p))}return Array.from(c)}let a=_?C.filter(([c,g])=>Object.values(g).some((Q0)=>Q0.tags?.includes(_))):C;return p0.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[p0.jsxDEV("div",{style:{marginBottom:24},children:[p0.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[p0.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:G.info.title},void 0,!1,void 0,this),p0.jsxDEV("div",{style:{display:"flex",gap:8},children:[p0.jsxDEV("button",{onClick:w,style:{padding:"8px 16px",borderRadius:4,border:"1px solid #333",background:T?"#49cc90":"#1a1a2e",color:T?"#000":"#fff",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:T?"Copied!":"Copy JSON"},void 0,!1,void 0,this),p0.jsxDEV("button",{onClick:b,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),p0.jsxDEV("p",{style:{color:"#888",marginBottom:8},children:G.info.description.split(`
|
|
225
|
-
`)[0]},void 0,!1,void 0,this),p0.jsxDEV("p",{style:{color:"#666",fontSize:12},children:["Version: ",G.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0.jsxDEV("div",{style:{background:"#1a1a2e",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[p0.jsxDEV("span",{style:{color:"#888"},children:"Base URL: "},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[p0.jsxDEV("button",{onClick:()=>k(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),D.map((c)=>p0.jsxDEV("button",{onClick:()=>k(c.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid #333",background:_===c.name?"#333":"transparent",color:_===c.name?"#fff":"#888",cursor:"pointer",fontSize:12},title:c.description,children:c.name},c.name,!1,void 0,this))]},void 0,!0,void 0,this),p0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:a.map(([c,g])=>Object.entries(g).filter(([Q0])=>["get","post","put","delete","patch"].includes(Q0)).map(([Q0,o])=>{let t=`${Q0}:${c}`,l=N.has(t),p=Q0.toUpperCase(),i=HT[Q0]||"#888";return p0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,overflow:"hidden"},children:[p0.jsxDEV("div",{onClick:()=>v(t),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:l?"#1a1a2e":"transparent",cursor:"pointer"},children:[p0.jsxDEV("span",{style:{background:i,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:p},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{fontFamily:"monospace",color:"#fff"},children:c},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{color:"#888",flex:1,fontSize:13},children:o.summary},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{color:"#666",fontSize:12},children:l?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l&&p0.jsxDEV("div",{style:{padding:16,background:"#0d0d1a",borderTop:"1px solid #333"},children:[o.description&&p0.jsxDEV("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:o.description},void 0,!1,void 0,this),o.parameters&&o.parameters.length>0&&p0.jsxDEV("div",{style:{marginBottom:16},children:[p0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),p0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:o.parameters.map((Z0)=>p0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[p0.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[Z0.name,Z0.required&&p0.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0.jsxDEV("span",{style:{color:"#666"},children:["(",Z0.in,")"]},void 0,!0,void 0,this),p0.jsxDEV("span",{style:{color:"#888"},children:Z0.schema?.type||"string"},void 0,!1,void 0,this),Z0.description&&p0.jsxDEV("span",{style:{color:"#666"},children:["- ",Z0.description]},void 0,!0,void 0,this)]},Z0.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o.requestBody&&p0.jsxDEV("div",{style:{marginBottom:16},children:[p0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:["Request Body",o.requestBody.required&&p0.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(o.requestBody.content||{}).map(([Z0,T0])=>p0.jsxDEV("div",{children:[p0.jsxDEV("span",{style:{color:"#666"},children:[Z0,": "]},void 0,!0,void 0,this),m(T0.schema)]},Z0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o.responses&&p0.jsxDEV("div",{children:[p0.jsxDEV("h4",{style:{fontSize:13,color:"#888",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),p0.jsxDEV("div",{style:{background:"#1a1a2e",borderRadius:4,padding:12},children:Object.entries(o.responses).map(([Z0,T0])=>{let F0=T0.content?.["application/json"]?.schema,X1=F0?.$ref?.split("/").pop(),O1=F0?.type,X0=F0?.items?.$ref?.split("/").pop();return p0.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[p0.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[p0.jsxDEV("span",{style:{color:Z0.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:Z0},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{color:"#888"},children:T0.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0&&p0.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"#0d0d1a",borderRadius:4,fontFamily:"monospace"},children:X1?p0.jsxDEV("span",{style:{color:"#61affe"},children:X1},void 0,!1,void 0,this):O1==="array"&&X0?p0.jsxDEV("span",{style:{color:"#61affe"},children:[X0,"[]"]},void 0,!0,void 0,this):O1==="array"?p0.jsxDEV("span",{style:{color:"#888"},children:"array"},void 0,!1,void 0,this):p0.jsxDEV("span",{style:{color:"#888"},children:m(F0)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},Z0,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},t,!0,void 0,this)}))},void 0,!1,void 0,this),G.components?.schemas&&u().length>0&&p0.jsxDEV("div",{style:{marginTop:32},children:[p0.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",_&&p0.jsxDEV("span",{style:{color:"#666",fontSize:14},children:["(",_,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:u().map((c)=>{let g=G.components.schemas[c];if(!g)return null;return p0.jsxDEV("div",{style:{border:"1px solid #333",borderRadius:6,padding:12},children:[p0.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:c},void 0,!1,void 0,this),g.properties&&p0.jsxDEV("div",{style:{fontSize:12},children:Object.entries(g.properties).map(([Q0,o])=>p0.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[p0.jsxDEV("span",{style:{color:"#fff",minWidth:120},children:Q0},void 0,!1,void 0,this),p0.jsxDEV("span",{style:{color:"#888"},children:[o.type||(o.$ref?o.$ref.split("/").pop():"any"),o.nullable&&" | null"]},void 0,!0,void 0,this),o.enum&&p0.jsxDEV("span",{style:{color:"#666"},children:["[",o.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},Q0,!0,void 0,this))},void 0,!1,void 0,this)]},c,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var W4=q0(Y1(),1);function GT(){let{isAuthenticated:Y,isLoading:G,hasUsers:U,accessToken:O,checkAuth:q}=A1(),{refreshProjects:N}=E4(),{isComplete:L,setIsComplete:_}=xG(),k=()=>{return O?{Authorization:`Bearer ${O}`}:{}},T=Y&&L===!0,{agents:F,loading:w,runningCount:b,fetchAgents:M,createAgent:v,updateAgent:m,deleteAgent:D,toggleAgent:C}=gG(T),{providers:V,configuredProviders:u,fetchProviders:a}=EG(T),c=u.filter((D0)=>D0.type==="llm"),[g,Q0]=D5.useState(!1),[o,t]=D5.useState(null),[l,p]=D5.useState("dashboard"),[i,Z0]=D5.useState(null),[T0,F0]=D5.useState(0),[X1,O1]=D5.useState(!1);D5.useEffect(()=>{if(!T)return;let D0=async()=>{try{let L0=await fetch("/api/tasks?status=pending",{headers:k()});if(L0.ok){let n0=await L0.json();F0(n0.count||0)}}catch{}};D0();let G1=setInterval(D0,15000);return()=>clearInterval(G1)},[T,O]);let[X0,U0]=D5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]});D5.useEffect(()=>{if(c.length>0&&!X0.provider){let D0=c[0],G1=D0.models.find((L0)=>L0.recommended)?.value||D0.models[0]?.value||"";U0((L0)=>({...L0,provider:D0.id,model:G1}))}},[c,X0.provider]),D5.useEffect(()=>{if(o){let D0=F.find((G1)=>G1.id===o.id);if(D0)t(D0);else t(null)}},[F,o]);let _0=(D0)=>{let G1=V.find((n0)=>n0.id===D0),L0=G1?.models.find((n0)=>n0.recommended)?.value||G1?.models[0]?.value||"";U0((n0)=>({...n0,provider:D0,model:L0}))},J0=async()=>{if(!X0.name)return;await v(X0),await N();let D0=c[0],G1=D0?.models.find((L0)=>L0.recommended)?.value||D0?.models[0]?.value||"";U0({name:"",model:G1,provider:D0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...hG},mcpServers:[],skills:[]}),Q0(!1)},d=async(D0,G1)=>{G1?.stopPropagation(),Z0(null);let L0=await C(D0);if(L0.error)Z0(L0.error)},A0=async(D0,G1)=>{if(G1?.stopPropagation(),o?.id===D0)t(null);await D(D0),await N()},S0=(D0)=>{t(D0),Z0(null),p("agents")},Z1=(D0)=>{p(D0),t(null)},t0=()=>{_(!0),a(),q()};if(G||U===null)return W4.jsxDEV(bz,{fullScreen:!0},void 0,!1,void 0,this);if(!U)return W4.jsxDEV(gZ,{onComplete:t0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return W4.jsxDEV(O3,{},void 0,!1,void 0,this);if(L===null)return W4.jsxDEV(bz,{fullScreen:!0},void 0,!1,void 0,this);if(!L)return W4.jsxDEV(gZ,{onComplete:t0,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:()=>O1(!0)},void 0,!1,void 0,this),i&&W4.jsxDEV(W3,{message:i,onDismiss:()=>Z0(null)},void 0,!1,void 0,this),W4.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[W4.jsxDEV(K3,{route:l,agentCount:F.length,taskCount:T0,onNavigate:Z1,isOpen:X1,onClose:()=>O1(!1)},void 0,!1,void 0,this),W4.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[l==="settings"&&W4.jsxDEV(_3,{},void 0,!1,void 0,this),l==="agents"&&W4.jsxDEV(w3,{agents:F,loading:w,selectedAgent:o,providers:V,onSelectAgent:S0,onCloseAgent:()=>t(null),onToggleAgent:d,onDeleteAgent:A0,onUpdateAgent:m,onNewAgent:()=>Q0(!0),canCreateAgent:c.length>0},void 0,!1,void 0,this),l==="dashboard"&&W4.jsxDEV(M3,{agents:F,loading:w,runningCount:b,configuredProviders:u,onNavigate:Z1,onSelectAgent:S0},void 0,!1,void 0,this),l==="tasks"&&W4.jsxDEV(P3,{},void 0,!1,void 0,this),l==="mcp"&&W4.jsxDEV(A3,{},void 0,!1,void 0,this),l==="skills"&&W4.jsxDEV(Z9,{},void 0,!1,void 0,this),l==="telemetry"&&W4.jsxDEV(J9,{},void 0,!1,void 0,this),l==="api"&&W4.jsxDEV(OO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g&&W4.jsxDEV(R3,{form:X0,providers:V,configuredProviders:u,onFormChange:U0,onProviderChange:_0,onCreate:J0,onClose:()=>Q0(!1),onGoToSettings:()=>{Q0(!1),p("settings")}},void 0,!1,void 0,this),W4.jsxDEV($O,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qT(){return W4.jsxDEV(DG,{children:W4.jsxDEV(uG,{children:W4.jsxDEV(JO,{children:W4.jsxDEV(VG,{children:W4.jsxDEV(GT,{},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 BT=LO.createRoot(document.getElementById("root"));BT.render(W4.jsxDEV(qT,{},void 0,!1,void 0,this));
|
|
226
|
-
|
|
227
|
-
//# debugId=0CD6DC59801E6BD564756E2164756E21
|