apteva 0.2.3 → 0.2.5
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.ggy88vnx.js +213 -0
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/src/binary.ts +271 -1
- package/src/crypto.ts +53 -0
- package/src/db.ts +492 -3
- package/src/mcp-client.ts +599 -0
- package/src/providers.ts +31 -0
- package/src/routes/api.ts +786 -63
- package/src/server.ts +122 -5
- package/src/web/App.tsx +36 -1
- package/src/web/components/agents/AgentCard.tsx +22 -1
- package/src/web/components/agents/AgentPanel.tsx +381 -0
- package/src/web/components/agents/AgentsView.tsx +27 -10
- package/src/web/components/agents/CreateAgentModal.tsx +7 -7
- package/src/web/components/agents/index.ts +1 -1
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/common/Modal.tsx +2 -2
- package/src/web/components/common/Select.tsx +1 -1
- package/src/web/components/common/index.ts +1 -0
- package/src/web/components/dashboard/Dashboard.tsx +74 -25
- package/src/web/components/index.ts +5 -2
- package/src/web/components/layout/Sidebar.tsx +22 -2
- package/src/web/components/mcp/McpPage.tsx +1144 -0
- package/src/web/components/mcp/index.ts +1 -0
- package/src/web/components/onboarding/OnboardingWizard.tsx +5 -1
- package/src/web/components/settings/SettingsPage.tsx +312 -82
- package/src/web/components/tasks/TasksPage.tsx +129 -0
- package/src/web/components/tasks/index.ts +1 -0
- package/src/web/components/telemetry/TelemetryPage.tsx +316 -0
- package/src/web/hooks/useAgents.ts +23 -0
- package/src/web/styles.css +18 -0
- package/src/web/types.ts +75 -1
- package/dist/App.wfhmfhx7.js +0 -213
- package/src/web/components/agents/ChatPanel.tsx +0 -63
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
var SF=Object.create;var{getPrototypeOf:VF,defineProperty:TB,getOwnPropertyNames:DF}=Object;var EF=Object.prototype.hasOwnProperty;var J0=(H,U,B)=>{B=H!=null?SF(VF(H)):{};let L=U||!H||!H.__esModule?TB(B,"default",{value:H,enumerable:!0}):B;for(let G of DF(H))if(!EF.call(L,G))TB(L,G,{get:()=>H[G],enumerable:!0});return L};var db=(H,U)=>()=>(U||H((U={exports:{}}).exports,U),U.exports);var y1=db((uF,IZ)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H="18.3.1",U=Symbol.for("react.element"),B=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),W=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),E=Symbol.iterator,r="@@iterator";function D(q){if(q===null||typeof q!=="object")return null;var k=E&&q[E]||q[r];if(typeof k==="function")return k;return null}var u={current:null},v0={transition:null},s={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},Q0={current:null},n={},C=null;function j(q){C=q}n.setExtraStackFrame=function(q){C=q},n.getCurrentStack=null,n.getStackAddendum=function(){var q="";if(C)q+=C;var k=n.getCurrentStack;if(k)q+=k()||"";return q};var $0=!1,O0=!1,L0=!1,g0=!1,Z0=!1,k0={ReactCurrentDispatcher:u,ReactCurrentBatchConfig:v0,ReactCurrentOwner:Q0};k0.ReactDebugCurrentFrame=n,k0.ReactCurrentActQueue=s;function a0(q){{for(var k=arguments.length,m=Array(k>1?k-1:0),l=1;l<k;l++)m[l-1]=arguments[l];S0("warn",q,m)}}function C0(q){{for(var k=arguments.length,m=Array(k>1?k-1:0),l=1;l<k;l++)m[l-1]=arguments[l];S0("error",q,m)}}function S0(q,k,m){{var l=k0.ReactDebugCurrentFrame,Y0=l.getStackAddendum();if(Y0!=="")k+="%s",m=m.concat([Y0]);var x0=m.map(function(w0){return String(w0)});x0.unshift("Warning: "+k),Function.prototype.apply.call(console[q],console,x0)}}var _1={};function H1(q,k){{var m=q.constructor,l=m&&(m.displayName||m.name)||"ReactClass",Y0=l+"."+k;if(_1[Y0])return;C0("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.",k,l),_1[Y0]=!0}}var P1={isMounted:function(q){return!1},enqueueForceUpdate:function(q,k,m){H1(q,"forceUpdate")},enqueueReplaceState:function(q,k,m,l){H1(q,"replaceState")},enqueueSetState:function(q,k,m,l){H1(q,"setState")}},i0=Object.assign,Y1={};Object.freeze(Y1);function C1(q,k,m){this.props=q,this.context=k,this.refs=Y1,this.updater=m||P1}C1.prototype.isReactComponent={},C1.prototype.setState=function(q,k){if(typeof q!=="object"&&typeof q!=="function"&&q!=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,q,k,"setState")},C1.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};{var v4={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)."]},Y4=function(q,k){Object.defineProperty(C1.prototype,q,{get:function(){a0("%s(...) is deprecated in plain JavaScript React classes. %s",k[0],k[1]);return}})};for(var Q4 in v4)if(v4.hasOwnProperty(Q4))Y4(Q4,v4[Q4])}function W4(){}W4.prototype=C1.prototype;function a1(q,k,m){this.props=q,this.context=k,this.refs=Y1,this.updater=m||P1}var i1=a1.prototype=new W4;i1.constructor=a1,i0(i1,C1.prototype),i1.isPureReactComponent=!0;function $4(){var q={current:null};return Object.seal(q),q}var D4=Array.isArray;function X4(q){return D4(q)}function E4(q){{var k=typeof Symbol==="function"&&Symbol.toStringTag,m=k&&q[Symbol.toStringTag]||q.constructor.name||"Object";return m}}function u4(q){try{return x1(q),!1}catch(k){return!0}}function x1(q){return""+q}function s0(q){if(u4(q))return C0("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",E4(q)),x1(q)}function T4(q,k,m){var l=q.displayName;if(l)return l;var Y0=k.displayName||k.name||"";return Y0!==""?m+"("+Y0+")":m}function w4(q){return q.displayName||"Context"}function G4(q){if(q==null)return null;if(typeof q.tag==="number")C0("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof q==="function")return q.displayName||q.name||null;if(typeof q==="string")return q;switch(q){case L:return"Fragment";case B:return"Portal";case _:return"Profiler";case G:return"StrictMode";case w:return"Suspense";case P:return"SuspenseList"}if(typeof q==="object")switch(q.$$typeof){case W:var k=q;return w4(k)+".Consumer";case R:var m=q;return w4(m._context)+".Provider";case I:return T4(q,q.render,"ForwardRef");case A:var l=q.displayName||null;if(l!==null)return l;return G4(q.type)||"Memo";case F:{var Y0=q,x0=Y0._payload,w0=Y0._init;try{return G4(w0(x0))}catch(p0){return null}}}return null}var O4=Object.prototype.hasOwnProperty,B5={key:!0,ref:!0,__self:!0,__source:!0},r1,z6,n1;n1={};function Q6(q){if(O4.call(q,"ref")){var k=Object.getOwnPropertyDescriptor(q,"ref").get;if(k&&k.isReactWarning)return!1}return q.ref!==void 0}function Z4(q){if(O4.call(q,"key")){var k=Object.getOwnPropertyDescriptor(q,"key").get;if(k&&k.isReactWarning)return!1}return q.key!==void 0}function K4(q,k){var m=function(){if(!r1)r1=!0,C0("%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)",k)};m.isReactWarning=!0,Object.defineProperty(q,"key",{get:m,configurable:!0})}function o4(q,k){var m=function(){if(!z6)z6=!0,C0("%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)",k)};m.isReactWarning=!0,Object.defineProperty(q,"ref",{get:m,configurable:!0})}function v6(q){if(typeof q.ref==="string"&&Q0.current&&q.__self&&Q0.current.stateNode!==q.__self){var k=G4(Q0.current.type);if(!n1[k])C0('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',k,q.ref),n1[k]=!0}}var R4=function(q,k,m,l,Y0,x0,w0){var p0={$$typeof:U,type:q,key:k,ref:m,props:w0,_owner:x0};if(p0._store={},Object.defineProperty(p0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(p0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.defineProperty(p0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Y0}),Object.freeze)Object.freeze(p0.props),Object.freeze(p0);return p0};function h4(q,k,m){var l,Y0={},x0=null,w0=null,p0=null,q1=null;if(k!=null){if(Q6(k))w0=k.ref,v6(k);if(Z4(k))s0(k.key),x0=""+k.key;p0=k.__self===void 0?null:k.__self,q1=k.__source===void 0?null:k.__source;for(l in k)if(O4.call(k,l)&&!B5.hasOwnProperty(l))Y0[l]=k[l]}var u1=arguments.length-2;if(u1===1)Y0.children=m;else if(u1>1){var t1=Array(u1);for(var s1=0;s1<u1;s1++)t1[s1]=arguments[s1+2];if(Object.freeze)Object.freeze(t1);Y0.children=t1}if(q&&q.defaultProps){var U4=q.defaultProps;for(l in U4)if(Y0[l]===void 0)Y0[l]=U4[l]}if(x0||w0){var F4=typeof q==="function"?q.displayName||q.name||"Unknown":q;if(x0)K4(Y0,F4);if(w0)o4(Y0,F4)}return R4(q,x0,w0,p0,q1,Q0.current,Y0)}function K0(q,k){var m=R4(q.type,k,q.ref,q._self,q._source,q._owner,q.props);return m}function E0(q,k,m){if(q===null||q===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+q+".");var l,Y0=i0({},q.props),x0=q.key,w0=q.ref,p0=q._self,q1=q._source,u1=q._owner;if(k!=null){if(Q6(k))w0=k.ref,u1=Q0.current;if(Z4(k))s0(k.key),x0=""+k.key;var t1;if(q.type&&q.type.defaultProps)t1=q.type.defaultProps;for(l in k)if(O4.call(k,l)&&!B5.hasOwnProperty(l))if(k[l]===void 0&&t1!==void 0)Y0[l]=t1[l];else Y0[l]=k[l]}var s1=arguments.length-2;if(s1===1)Y0.children=m;else if(s1>1){var U4=Array(s1);for(var F4=0;F4<s1;F4++)U4[F4]=arguments[F4+2];Y0.children=U4}return R4(q.type,x0,w0,p0,q1,u1,Y0)}function y0(q){return typeof q==="object"&&q!==null&&q.$$typeof===U}var N1=".",S1=":";function L4(q){var k=/[=:]/g,m={"=":"=0",":":"=2"},l=q.replace(k,function(Y0){return m[Y0]});return"$"+l}var l1=!1,I4=/\/+/g;function z1(q){return q.replace(I4,"$&/")}function e0(q,k){if(typeof q==="object"&&q!==null&&q.key!=null)return s0(q.key),L4(""+q.key);return k.toString(36)}function A6(q,k,m,l,Y0){var x0=typeof q;if(x0==="undefined"||x0==="boolean")q=null;var w0=!1;if(q===null)w0=!0;else switch(x0){case"string":case"number":w0=!0;break;case"object":switch(q.$$typeof){case U:case B:w0=!0}}if(w0){var p0=q,q1=Y0(p0),u1=l===""?N1+e0(p0,0):l;if(X4(q1)){var t1="";if(u1!=null)t1=z1(u1)+"/";A6(q1,k,t1,"",function(tZ){return tZ})}else if(q1!=null){if(y0(q1)){if(q1.key&&(!p0||p0.key!==q1.key))s0(q1.key);q1=K0(q1,m+(q1.key&&(!p0||p0.key!==q1.key)?z1(""+q1.key)+"/":"")+u1)}k.push(q1)}return 1}var s1,U4,F4=0,A1=l===""?N1:l+S1;if(X4(q))for(var Kb=0;Kb<q.length;Kb++)s1=q[Kb],U4=A1+e0(s1,Kb),F4+=A6(s1,k,m,U4,Y0);else{var Q8=D(q);if(typeof Q8==="function"){var k3=q;if(Q8===k3.entries){if(!l1)a0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");l1=!0}var nZ=Q8.call(k3),X7,A3=0;while(!(X7=nZ.next()).done)s1=X7.value,U4=A1+e0(s1,A3++),F4+=A6(s1,k,m,U4,Y0)}else if(x0==="object"){var w3=String(q);throw Error("Objects are not valid as a React child (found: "+(w3==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":w3)+"). If you meant to render a collection of children, use an array instead.")}}return F4}function p4(q,k,m){if(q==null)return q;var l=[],Y0=0;return A6(q,l,"","",function(x0){return k.call(m,x0,Y0++)}),l}function w6(q){var k=0;return p4(q,function(){k++}),k}function u5(q,k,m){p4(q,function(){k.apply(this,arguments)},m)}function O5(q){return p4(q,function(k){return k})||[]}function m5(q){if(!y0(q))throw Error("React.Children.only expected to receive a single React element child.");return q}function z5(q){var k={$$typeof:W,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};k.Provider={$$typeof:R,_context:k};var m=!1,l=!1,Y0=!1;{var x0={$$typeof:W,_context:k};Object.defineProperties(x0,{Provider:{get:function(){if(!l)l=!0,C0("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 k.Provider},set:function(w0){k.Provider=w0}},_currentValue:{get:function(){return k._currentValue},set:function(w0){k._currentValue=w0}},_currentValue2:{get:function(){return k._currentValue2},set:function(w0){k._currentValue2=w0}},_threadCount:{get:function(){return k._threadCount},set:function(w0){k._threadCount=w0}},Consumer:{get:function(){if(!m)m=!0,C0("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 k.Consumer}},displayName:{get:function(){return k.displayName},set:function(w0){if(!Y0)a0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",w0),Y0=!0}}}),k.Consumer=x0}return k._currentRenderer=null,k._currentRenderer2=null,k}var W6=-1,L5=0,K1=1,V1=2;function j1(q){if(q._status===W6){var k=q._result,m=k();if(m.then(function(x0){if(q._status===L5||q._status===W6){var w0=q;w0._status=K1,w0._result=x0}},function(x0){if(q._status===L5||q._status===W6){var w0=q;w0._status=V1,w0._result=x0}}),q._status===W6){var l=q;l._status=L5,l._result=m}}if(q._status===K1){var Y0=q._result;if(Y0===void 0)C0(`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?`,Y0);if(!("default"in Y0))C0(`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'))`,Y0);return Y0.default}else throw q._result}function F1(q){var k={_status:W6,_result:q},m={$$typeof:F,_payload:k,_init:j1};{var l,Y0;Object.defineProperties(m,{defaultProps:{configurable:!0,get:function(){return l},set:function(x0){C0("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."),l=x0,Object.defineProperty(m,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Y0},set:function(x0){C0("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."),Y0=x0,Object.defineProperty(m,"propTypes",{enumerable:!0})}}})}return m}function M(q){{if(q!=null&&q.$$typeof===A)C0("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");else if(typeof q!=="function")C0("forwardRef requires a render function but was given %s.",q===null?"null":typeof q);else if(q.length!==0&&q.length!==2)C0("forwardRef render functions accept exactly two parameters: props and ref. %s",q.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined.");if(q!=null){if(q.defaultProps!=null||q.propTypes!=null)C0("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")}}var k={$$typeof:I,render:q};{var m;Object.defineProperty(k,"displayName",{enumerable:!1,configurable:!0,get:function(){return m},set:function(l){if(m=l,!q.name&&!q.displayName)q.displayName=l}})}return k}var i=Symbol.for("react.module.reference");function b0(q){if(typeof q==="string"||typeof q==="function")return!0;if(q===L||q===_||Z0||q===G||q===w||q===P||g0||q===d||$0||O0||L0)return!0;if(typeof q==="object"&&q!==null){if(q.$$typeof===F||q.$$typeof===A||q.$$typeof===R||q.$$typeof===W||q.$$typeof===I||q.$$typeof===i||q.getModuleId!==void 0)return!0}return!1}function v(q,k){if(!b0(q))C0("memo: The first argument must be a component. Instead received: %s",q===null?"null":typeof q);var m={$$typeof:A,type:q,compare:k===void 0?null:k};{var l;Object.defineProperty(m,"displayName",{enumerable:!1,configurable:!0,get:function(){return l},set:function(Y0){if(l=Y0,!q.name&&!q.displayName)q.displayName=Y0}})}return m}function h(){var q=u.current;if(q===null)C0(`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 q}function p(q){var k=h();if(q._context!==void 0){var m=q._context;if(m.Consumer===q)C0("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(m.Provider===q)C0("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return k.useContext(q)}function H0(q){var k=h();return k.useState(q)}function q0(q,k,m){var l=h();return l.useReducer(q,k,m)}function f0(q){var k=h();return k.useRef(q)}function M0(q,k){var m=h();return m.useEffect(q,k)}function t(q,k){var m=h();return m.useInsertionEffect(q,k)}function G0(q,k){var m=h();return m.useLayoutEffect(q,k)}function V0(q,k){var m=h();return m.useCallback(q,k)}function U1(q,k){var m=h();return m.useMemo(q,k)}function D1(q,k,m){var l=h();return l.useImperativeHandle(q,k,m)}function I6(q,k){{var m=h();return m.useDebugValue(q,k)}}function i6(){var q=h();return q.useTransition()}function J4(q){var k=h();return k.useDeferredValue(q)}function Z1(){var q=h();return q.useId()}function z7(q,k,m){var l=h();return l.useSyncExternalStore(q,k,m)}var g5=0,q3,B3,O3,L3,N3,v3,W3;function KQ(){}KQ.__reactDisabledLog=!0;function oZ(){{if(g5===0){q3=console.log,B3=console.info,O3=console.warn,L3=console.error,N3=console.group,v3=console.groupCollapsed,W3=console.groupEnd;var q={configurable:!0,enumerable:!0,value:KQ,writable:!0};Object.defineProperties(console,{info:q,log:q,warn:q,error:q,group:q,groupCollapsed:q,groupEnd:q})}g5++}}function _3(){{if(g5--,g5===0){var q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:i0({},q,{value:q3}),info:i0({},q,{value:B3}),warn:i0({},q,{value:O3}),error:i0({},q,{value:L3}),group:i0({},q,{value:N3}),groupCollapsed:i0({},q,{value:v3}),groupEnd:i0({},q,{value:W3})})}if(g5<0)C0("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Yb=k0.ReactCurrentDispatcher,Q5;function T7(q,k,m){{if(Q5===void 0)try{throw Error()}catch(Y0){var l=Y0.stack.trim().match(/\n( *(at )?)/);Q5=l&&l[1]||""}return`
|
|
14
|
+
`+Q5+q}}var h7=!1,tb;{var P3=typeof WeakMap==="function"?WeakMap:Map;tb=new P3}function UQ(q,k){if(!q||h7)return"";{var m=tb.get(q);if(m!==void 0)return m}var l;h7=!0;var Y0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x0;x0=Yb.current,Yb.current=null,oZ();try{if(k){var w0=function(){throw Error()};if(Object.defineProperty(w0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(w0,[])}catch(A1){l=A1}Reflect.construct(q,[],w0)}else{try{w0.call()}catch(A1){l=A1}q.call(w0.prototype)}}else{try{throw Error()}catch(A1){l=A1}q()}}catch(A1){if(A1&&l&&typeof A1.stack==="string"){var p0=A1.stack.split(`
|
|
15
|
+
`),q1=l.stack.split(`
|
|
16
|
+
`),u1=p0.length-1,t1=q1.length-1;while(u1>=1&&t1>=0&&p0[u1]!==q1[t1])t1--;for(;u1>=1&&t1>=0;u1--,t1--)if(p0[u1]!==q1[t1]){if(u1!==1||t1!==1)do if(u1--,t1--,t1<0||p0[u1]!==q1[t1]){var s1=`
|
|
17
|
+
`+p0[u1].replace(" at new "," at ");if(q.displayName&&s1.includes("<anonymous>"))s1=s1.replace("<anonymous>",q.displayName);if(typeof q==="function")tb.set(q,s1);return s1}while(u1>=1&&t1>=0);break}}}finally{h7=!1,Yb.current=x0,_3(),Error.prepareStackTrace=Y0}var U4=q?q.displayName||q.name:"",F4=U4?T7(U4):"";if(typeof q==="function")tb.set(q,F4);return F4}function R3(q,k,m){return UQ(q,!1)}function pZ(q){var k=q.prototype;return!!(k&&k.isReactComponent)}function C7(q,k,m){if(q==null)return"";if(typeof q==="function")return UQ(q,pZ(q));if(typeof q==="string")return T7(q);switch(q){case w:return T7("Suspense");case P:return T7("SuspenseList")}if(typeof q==="object")switch(q.$$typeof){case I:return R3(q.render);case A:return C7(q.type,k,m);case F:{var l=q,Y0=l._payload,x0=l._init;try{return C7(x0(Y0),k,m)}catch(w0){}}}return""}var qQ={},F3=k0.ReactDebugCurrentFrame;function sb(q){if(q){var k=q._owner,m=C7(q.type,q._source,k?k.type:null);F3.setExtraStackFrame(m)}else F3.setExtraStackFrame(null)}function BQ(q,k,m,l,Y0){{var x0=Function.call.bind(O4);for(var w0 in q)if(x0(q,w0)){var p0=void 0;try{if(typeof q[w0]!=="function"){var q1=Error((l||"React class")+": "+m+" type `"+w0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof q[w0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q1.name="Invariant Violation",q1}p0=q[w0](k,w0,l,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u1){p0=u1}if(p0&&!(p0 instanceof Error))sb(Y0),C0("%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).",l||"React class",m,w0,typeof p0),sb(null);if(p0 instanceof Error&&!(p0.message in qQ))qQ[p0.message]=!0,sb(Y0),C0("Failed %s type: %s",m,p0.message),sb(null)}}}function R1(q){if(q){var k=q._owner,m=C7(q.type,q._source,k?k.type:null);j(m)}else j(null)}var OQ=!1;function M3(){if(Q0.current){var q=G4(Q0.current.type);if(q)return`
|
|
18
|
+
|
|
19
|
+
Check the render method of \``+q+"`."}return""}function Q1(q){if(q!==void 0){var k=q.fileName.replace(/^.*[\\\/]/,""),m=q.lineNumber;return`
|
|
20
|
+
|
|
21
|
+
Check your code at `+k+":"+m+"."}return""}function LQ(q){if(q!==null&&q!==void 0)return Q1(q.__source);return""}var _6={};function $b(q){var k=M3();if(!k){var m=typeof q==="string"?q:q.displayName||q.name;if(m)k=`
|
|
22
|
+
|
|
23
|
+
Check the top-level render call using <`+m+">."}return k}function S7(q,k){if(!q._store||q._store.validated||q.key!=null)return;q._store.validated=!0;var m=$b(k);if(_6[m])return;_6[m]=!0;var l="";if(q&&q._owner&&q._owner!==Q0.current)l=" It was passed a child from "+G4(q._owner.type)+".";R1(q),C0('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,l),R1(null)}function NQ(q,k){if(typeof q!=="object")return;if(X4(q))for(var m=0;m<q.length;m++){var l=q[m];if(y0(l))S7(l,k)}else if(y0(q)){if(q._store)q._store.validated=!0}else if(q){var Y0=D(q);if(typeof Y0==="function"){if(Y0!==q.entries){var x0=Y0.call(q),w0;while(!(w0=x0.next()).done)if(y0(w0.value))S7(w0.value,k)}}}}function r4(q){{var k=q.type;if(k===null||k===void 0||typeof k==="string")return;var m;if(typeof k==="function")m=k.propTypes;else if(typeof k==="object"&&(k.$$typeof===I||k.$$typeof===A))m=k.propTypes;else return;if(m){var l=G4(k);BQ(m,q.props,"prop",l,q)}else if(k.PropTypes!==void 0&&!OQ){OQ=!0;var Y0=G4(k);C0("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y0||"Unknown")}if(typeof k.getDefaultProps==="function"&&!k.getDefaultProps.isReactClassApproved)C0("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _4(q){{var k=Object.keys(q.props);for(var m=0;m<k.length;m++){var l=k[m];if(l!=="children"&&l!=="key"){R1(q),C0("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",l),R1(null);break}}if(q.ref!==null)R1(q),C0("Invalid attribute `ref` supplied to `React.Fragment`."),R1(null)}}function vQ(q,k,m){var l=b0(q);if(!l){var Y0="";if(q===void 0||typeof q==="object"&&q!==null&&Object.keys(q).length===0)Y0+=" 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 x0=LQ(k);if(x0)Y0+=x0;else Y0+=M3();var w0;if(q===null)w0="null";else if(X4(q))w0="array";else if(q!==void 0&&q.$$typeof===U)w0="<"+(G4(q.type)||"Unknown")+" />",Y0=" Did you accidentally export a JSX literal instead of a component?";else w0=typeof q;C0("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w0,Y0)}var p0=h4.apply(this,arguments);if(p0==null)return p0;if(l)for(var q1=2;q1<arguments.length;q1++)NQ(arguments[q1],q);if(q===L)_4(p0);else r4(p0);return p0}var x6=!1;function u6(q){var k=vQ.bind(null,q);k.type=q;{if(!x6)x6=!0,a0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(k,"type",{enumerable:!1,get:function(){return a0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:q}),q}})}return k}function c5(q,k,m){var l=E0.apply(this,arguments);for(var Y0=2;Y0<arguments.length;Y0++)NQ(arguments[Y0],l.type);return r4(l),l}function rZ(q,k){var m=v0.transition;v0.transition={};var l=v0.transition;v0.transition._updatedFibers=new Set;try{q()}finally{if(v0.transition=m,m===null&&l._updatedFibers){var Y0=l._updatedFibers.size;if(Y0>10)a0("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.");l._updatedFibers.clear()}}}var eb=!1,Gb=null;function WQ(q){if(Gb===null)try{var k=("require"+Math.random()).slice(0,7),m=IZ&&IZ[k];Gb=m.call(IZ,"timers").setImmediate}catch(l){Gb=function(Y0){if(eb===!1){if(eb=!0,typeof MessageChannel>"u")C0("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 x0=new MessageChannel;x0.port1.onmessage=Y0,x0.port2.postMessage(void 0)}}return Gb(q)}var V7=0,_Q=!1;function PQ(q){{var k=V7;if(V7++,s.current===null)s.current=[];var m=s.isBatchingLegacy,l;try{if(s.isBatchingLegacy=!0,l=q(),!m&&s.didScheduleLegacyUpdate){var Y0=s.current;if(Y0!==null)s.didScheduleLegacyUpdate=!1,z8(Y0)}}catch(U4){throw Q7(k),U4}finally{s.isBatchingLegacy=m}if(l!==null&&typeof l==="object"&&typeof l.then==="function"){var x0=l,w0=!1,p0={then:function(U4,F4){w0=!0,x0.then(function(A1){if(Q7(k),V7===0)b8(A1,U4,F4);else U4(A1)},function(A1){Q7(k),F4(A1)})}};if(!_Q&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!w0)_Q=!0,C0("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 p0}else{var q1=l;if(Q7(k),V7===0){var u1=s.current;if(u1!==null)z8(u1),s.current=null;var t1={then:function(U4,F4){if(s.current===null)s.current=[],b8(q1,U4,F4);else U4(q1)}};return t1}else{var s1={then:function(U4,F4){U4(q1)}};return s1}}}}function Q7(q){{if(q!==V7-1)C0("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");V7=q}}function b8(q,k,m){{var l=s.current;if(l!==null)try{z8(l),WQ(function(){if(l.length===0)s.current=null,k(q);else b8(q,k,m)})}catch(Y0){m(Y0)}else k(q)}}var D7=!1;function z8(q){if(!D7){D7=!0;var k=0;try{for(;k<q.length;k++){var m=q[k];do m=m(!0);while(m!==null)}q.length=0}catch(l){throw q=q.slice(k+1),l}finally{D7=!1}}}var RQ=vQ,FQ=c5,MQ=u6,kQ={map:p4,forEach:u5,count:w6,toArray:O5,only:m5};if(uF.Children=kQ,uF.Component=C1,uF.Fragment=L,uF.Profiler=_,uF.PureComponent=a1,uF.StrictMode=G,uF.Suspense=w,uF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k0,uF.act=PQ,uF.cloneElement=FQ,uF.createContext=z5,uF.createElement=RQ,uF.createFactory=MQ,uF.createRef=$4,uF.forwardRef=M,uF.isValidElement=y0,uF.lazy=F1,uF.memo=v,uF.startTransition=rZ,uF.unstable_act=PQ,uF.useCallback=V0,uF.useContext=p,uF.useDebugValue=I6,uF.useDeferredValue=J4,uF.useEffect=M0,uF.useId=Z1,uF.useImperativeHandle=D1,uF.useInsertionEffect=t,uF.useLayoutEffect=G0,uF.useMemo=U1,uF.useReducer=q0,uF.useRef=f0,uF.useState=H0,uF.useSyncExternalStore=z7,uF.useTransition=i6,uF.version=H,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var hB=db((mF)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H=!1,U=!1,B=5;function L(K0,E0){var y0=K0.length;K0.push(E0),R(K0,E0,y0)}function G(K0){return K0.length===0?null:K0[0]}function _(K0){if(K0.length===0)return null;var E0=K0[0],y0=K0.pop();if(y0!==E0)K0[0]=y0,W(K0,y0,0);return E0}function R(K0,E0,y0){var N1=y0;while(N1>0){var S1=N1-1>>>1,L4=K0[S1];if(I(L4,E0)>0)K0[S1]=E0,K0[N1]=L4,N1=S1;else return}}function W(K0,E0,y0){var N1=y0,S1=K0.length,L4=S1>>>1;while(N1<L4){var l1=(N1+1)*2-1,I4=K0[l1],z1=l1+1,e0=K0[z1];if(I(I4,E0)<0)if(z1<S1&&I(e0,I4)<0)K0[N1]=e0,K0[z1]=E0,N1=z1;else K0[N1]=I4,K0[l1]=E0,N1=l1;else if(z1<S1&&I(e0,E0)<0)K0[N1]=e0,K0[z1]=E0,N1=z1;else return}}function I(K0,E0){var y0=K0.sortIndex-E0.sortIndex;return y0!==0?y0:K0.id-E0.id}var w=1,P=2,A=3,F=4,d=5;function E(K0,E0){}var r=typeof performance==="object"&&typeof performance.now==="function";if(r){var D=performance;mF.unstable_now=function(){return D.now()}}else{var u=Date,v0=u.now();mF.unstable_now=function(){return u.now()-v0}}var s=1073741823,Q0=-1,n=250,C=5000,j=1e4,$0=s,O0=[],L0=[],g0=1,Z0=null,k0=A,a0=!1,C0=!1,S0=!1,_1=typeof setTimeout==="function"?setTimeout:null,H1=typeof clearTimeout==="function"?clearTimeout:null,P1=typeof setImmediate<"u"?setImmediate:null,i0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function Y1(K0){var E0=G(L0);while(E0!==null){if(E0.callback===null)_(L0);else if(E0.startTime<=K0)_(L0),E0.sortIndex=E0.expirationTime,L(O0,E0);else return;E0=G(L0)}}function C1(K0){if(S0=!1,Y1(K0),!C0)if(G(O0)!==null)C0=!0,K4(v4);else{var E0=G(L0);if(E0!==null)o4(C1,E0.startTime-K0)}}function v4(K0,E0){if(C0=!1,S0)S0=!1,v6();a0=!0;var y0=k0;try{if(U)try{return Y4(K0,E0)}catch(S1){if(Z0!==null){var N1=mF.unstable_now();E(Z0,N1),Z0.isQueued=!1}throw S1}else return Y4(K0,E0)}finally{Z0=null,k0=y0,a0=!1}}function Y4(K0,E0){var y0=E0;Y1(y0),Z0=G(O0);while(Z0!==null&&!H){if(Z0.expirationTime>y0&&(!K0||O4()))break;var N1=Z0.callback;if(typeof N1==="function"){Z0.callback=null,k0=Z0.priorityLevel;var S1=Z0.expirationTime<=y0,L4=N1(S1);if(y0=mF.unstable_now(),typeof L4==="function")Z0.callback=L4;else if(Z0===G(O0))_(O0);Y1(y0)}else _(O0);Z0=G(O0)}if(Z0!==null)return!0;else{var l1=G(L0);if(l1!==null)o4(C1,l1.startTime-y0);return!1}}function Q4(K0,E0){switch(K0){case w:case P:case A:case F:case d:break;default:K0=A}var y0=k0;k0=K0;try{return E0()}finally{k0=y0}}function W4(K0){var E0;switch(k0){case w:case P:case A:E0=A;break;default:E0=k0;break}var y0=k0;k0=E0;try{return K0()}finally{k0=y0}}function a1(K0){var E0=k0;return function(){var y0=k0;k0=E0;try{return K0.apply(this,arguments)}finally{k0=y0}}}function i1(K0,E0,y0){var N1=mF.unstable_now(),S1;if(typeof y0==="object"&&y0!==null){var L4=y0.delay;if(typeof L4==="number"&&L4>0)S1=N1+L4;else S1=N1}else S1=N1;var l1;switch(K0){case w:l1=Q0;break;case P:l1=n;break;case d:l1=$0;break;case F:l1=j;break;case A:default:l1=C;break}var I4=S1+l1,z1={id:g0++,callback:E0,priorityLevel:K0,startTime:S1,expirationTime:I4,sortIndex:-1};if(S1>N1){if(z1.sortIndex=S1,L(L0,z1),G(O0)===null&&z1===G(L0)){if(S0)v6();else S0=!0;o4(C1,S1-N1)}}else if(z1.sortIndex=I4,L(O0,z1),!C0&&!a0)C0=!0,K4(v4);return z1}function $4(){}function D4(){if(!C0&&!a0)C0=!0,K4(v4)}function X4(){return G(O0)}function E4(K0){K0.callback=null}function u4(){return k0}var x1=!1,s0=null,T4=-1,w4=B,G4=-1;function O4(){var K0=mF.unstable_now()-G4;if(K0<w4)return!1;return!0}function B5(){}function r1(K0){if(K0<0||K0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(K0>0)w4=Math.floor(1000/K0);else w4=B}var z6=function(){if(s0!==null){var K0=mF.unstable_now();G4=K0;var E0=!0,y0=!0;try{y0=s0(E0,K0)}finally{if(y0)n1();else x1=!1,s0=null}}else x1=!1},n1;if(typeof P1==="function")n1=function(){P1(z6)};else if(typeof MessageChannel<"u"){var Q6=new MessageChannel,Z4=Q6.port2;Q6.port1.onmessage=z6,n1=function(){Z4.postMessage(null)}}else n1=function(){_1(z6,0)};function K4(K0){if(s0=K0,!x1)x1=!0,n1()}function o4(K0,E0){T4=_1(function(){K0(mF.unstable_now())},E0)}function v6(){H1(T4),T4=-1}var R4=B5,h4=null;if(mF.unstable_IdlePriority=d,mF.unstable_ImmediatePriority=w,mF.unstable_LowPriority=F,mF.unstable_NormalPriority=A,mF.unstable_Profiling=h4,mF.unstable_UserBlockingPriority=P,mF.unstable_cancelCallback=E4,mF.unstable_continueExecution=D4,mF.unstable_forceFrameRate=r1,mF.unstable_getCurrentPriorityLevel=u4,mF.unstable_getFirstCallbackNode=X4,mF.unstable_next=W4,mF.unstable_pauseExecution=$4,mF.unstable_requestPaint=R4,mF.unstable_runWithPriority=Q4,mF.unstable_scheduleCallback=i1,mF.unstable_shouldYield=O4,mF.unstable_wrapCallback=a1,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var CB=db((gF)=>{var QQ=J0(y1()),d1=J0(hB());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H=QQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=!1;function B(b){U=b}function L(b){if(!U){for(var z=arguments.length,Q=Array(z>1?z-1:0),X=1;X<z;X++)Q[X-1]=arguments[X];_("warn",b,Q)}}function G(b){if(!U){for(var z=arguments.length,Q=Array(z>1?z-1:0),X=1;X<z;X++)Q[X-1]=arguments[X];_("error",b,Q)}}function _(b,z,Q){{var X=H.ReactDebugCurrentFrame,Z=X.getStackAddendum();if(Z!=="")z+="%s",Q=Q.concat([Z]);var J=Q.map(function(Y){return String(Y)});J.unshift("Warning: "+z),Function.prototype.apply.call(console[b],console,J)}}var R=0,W=1,I=2,w=3,P=4,A=5,F=6,d=7,E=8,r=9,D=10,u=11,v0=12,s=13,Q0=14,n=15,C=16,j=17,$0=18,O0=19,L0=21,g0=22,Z0=23,k0=24,a0=25,C0=!0,S0=!1,_1=!1,H1=!1,P1=!1,i0=!0,Y1=!1,C1=!0,v4=!0,Y4=!0,Q4=!0,W4=new Set,a1={},i1={};function $4(b,z){D4(b,z),D4(b+"Capture",z)}function D4(b,z){if(a1[b])G("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",b);a1[b]=z;{var Q=b.toLowerCase();if(i1[Q]=b,b==="onDoubleClick")i1.ondblclick=b}for(var X=0;X<z.length;X++)W4.add(z[X])}var X4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E4=Object.prototype.hasOwnProperty;function u4(b){{var z=typeof Symbol==="function"&&Symbol.toStringTag,Q=z&&b[Symbol.toStringTag]||b.constructor.name||"Object";return Q}}function x1(b){try{return s0(b),!1}catch(z){return!0}}function s0(b){return""+b}function T4(b,z){if(x1(b))return G("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",z,u4(b)),s0(b)}function w4(b){if(x1(b))return G("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",u4(b)),s0(b)}function G4(b,z){if(x1(b))return G("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",z,u4(b)),s0(b)}function O4(b,z){if(x1(b))return G("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",z,u4(b)),s0(b)}function B5(b){if(x1(b))return G("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",u4(b)),s0(b)}function r1(b){if(x1(b))return G("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.",u4(b)),s0(b)}var z6=0,n1=1,Q6=2,Z4=3,K4=4,o4=5,v6=6,R4=":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",h4=R4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",K0=new RegExp("^["+R4+"]["+h4+"]*$"),E0={},y0={};function N1(b){if(E4.call(y0,b))return!0;if(E4.call(E0,b))return!1;if(K0.test(b))return y0[b]=!0,!0;return E0[b]=!0,G("Invalid attribute name: `%s`",b),!1}function S1(b,z,Q){if(z!==null)return z.type===z6;if(Q)return!1;if(b.length>2&&(b[0]==="o"||b[0]==="O")&&(b[1]==="n"||b[1]==="N"))return!0;return!1}function L4(b,z,Q,X){if(Q!==null&&Q.type===z6)return!1;switch(typeof z){case"function":case"symbol":return!0;case"boolean":{if(X)return!1;if(Q!==null)return!Q.acceptsBooleans;else{var Z=b.toLowerCase().slice(0,5);return Z!=="data-"&&Z!=="aria-"}}default:return!1}}function l1(b,z,Q,X){if(z===null||typeof z>"u")return!0;if(L4(b,z,Q,X))return!0;if(X)return!1;if(Q!==null)switch(Q.type){case Z4:return!z;case K4:return z===!1;case o4:return isNaN(z);case v6:return isNaN(z)||z<1}return!1}function I4(b){return e0.hasOwnProperty(b)?e0[b]:null}function z1(b,z,Q,X,Z,J,Y){this.acceptsBooleans=z===Q6||z===Z4||z===K4,this.attributeName=X,this.attributeNamespace=Z,this.mustUseProperty=Q,this.propertyName=b,this.type=z,this.sanitizeURL=J,this.removeEmptyString=Y}var e0={},A6=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];A6.forEach(function(b){e0[b]=new z1(b,z6,!1,b,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(b){var z=b[0],Q=b[1];e0[z]=new z1(z,n1,!1,Q,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(b){e0[b]=new z1(b,Q6,!1,b.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(b){e0[b]=new z1(b,Q6,!1,b,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(b){e0[b]=new z1(b,Z4,!1,b.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(b){e0[b]=new z1(b,Z4,!0,b,null,!1,!1)}),["capture","download"].forEach(function(b){e0[b]=new z1(b,K4,!1,b,null,!1,!1)}),["cols","rows","size","span"].forEach(function(b){e0[b]=new z1(b,v6,!1,b,null,!1,!1)}),["rowSpan","start"].forEach(function(b){e0[b]=new z1(b,o4,!1,b.toLowerCase(),null,!1,!1)});var p4=/[\-\:]([a-z])/g,w6=function(b){return b[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(b){var z=b.replace(p4,w6);e0[z]=new z1(z,n1,!1,b,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(b){var z=b.replace(p4,w6);e0[z]=new z1(z,n1,!1,b,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(b){var z=b.replace(p4,w6);e0[z]=new z1(z,n1,!1,b,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(b){e0[b]=new z1(b,n1,!1,b.toLowerCase(),null,!1,!1)});var u5="xlinkHref";e0[u5]=new z1("xlinkHref",n1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(b){e0[b]=new z1(b,n1,!1,b.toLowerCase(),null,!0,!0)});var O5=/^[\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,m5=!1;function z5(b){if(!m5&&O5.test(b))m5=!0,G("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(b))}function W6(b,z,Q,X){if(X.mustUseProperty){var Z=X.propertyName;return b[Z]}else{if(T4(Q,z),X.sanitizeURL)z5(""+Q);var J=X.attributeName,Y=null;if(X.type===K4){if(b.hasAttribute(J)){var $=b.getAttribute(J);if($==="")return!0;if(l1(z,Q,X,!1))return $;if($===""+Q)return Q;return $}}else if(b.hasAttribute(J)){if(l1(z,Q,X,!1))return b.getAttribute(J);if(X.type===Z4)return Q;Y=b.getAttribute(J)}if(l1(z,Q,X,!1))return Y===null?Q:Y;else if(Y===""+Q)return Q;else return Y}}function L5(b,z,Q,X){{if(!N1(z))return;if(!b.hasAttribute(z))return Q===void 0?void 0:null;var Z=b.getAttribute(z);if(T4(Q,z),Z===""+Q)return Q;return Z}}function K1(b,z,Q,X){var Z=I4(z);if(S1(z,Z,X))return;if(l1(z,Q,Z,X))Q=null;if(X||Z===null){if(N1(z)){var J=z;if(Q===null)b.removeAttribute(J);else T4(Q,z),b.setAttribute(J,""+Q)}return}var Y=Z.mustUseProperty;if(Y){var $=Z.propertyName;if(Q===null){var K=Z.type;b[$]=K===Z4?!1:""}else b[$]=Q;return}var{attributeName:O,attributeNamespace:N}=Z;if(Q===null)b.removeAttribute(O);else{var T=Z.type,f;if(T===Z4||T===K4&&Q===!0)f="";else if(T4(Q,O),f=""+Q,Z.sanitizeURL)z5(f.toString());if(N)b.setAttributeNS(N,O,f);else b.setAttribute(O,f)}}var V1=Symbol.for("react.element"),j1=Symbol.for("react.portal"),F1=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),b0=Symbol.for("react.provider"),v=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),H0=Symbol.for("react.suspense_list"),q0=Symbol.for("react.memo"),f0=Symbol.for("react.lazy"),M0=Symbol.for("react.scope"),t=Symbol.for("react.debug_trace_mode"),G0=Symbol.for("react.offscreen"),V0=Symbol.for("react.legacy_hidden"),U1=Symbol.for("react.cache"),D1=Symbol.for("react.tracing_marker"),I6=Symbol.iterator,i6="@@iterator";function J4(b){if(b===null||typeof b!=="object")return null;var z=I6&&b[I6]||b[i6];if(typeof z==="function")return z;return null}var Z1=Object.assign,z7=0,g5,q3,B3,O3,L3,N3,v3;function W3(){}W3.__reactDisabledLog=!0;function KQ(){{if(z7===0){g5=console.log,q3=console.info,B3=console.warn,O3=console.error,L3=console.group,N3=console.groupCollapsed,v3=console.groupEnd;var b={configurable:!0,enumerable:!0,value:W3,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}z7++}}function oZ(){{if(z7--,z7===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z1({},b,{value:g5}),info:Z1({},b,{value:q3}),warn:Z1({},b,{value:B3}),error:Z1({},b,{value:O3}),group:Z1({},b,{value:L3}),groupCollapsed:Z1({},b,{value:N3}),groupEnd:Z1({},b,{value:v3})})}if(z7<0)G("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var _3=H.ReactCurrentDispatcher,Yb;function Q5(b,z,Q){{if(Yb===void 0)try{throw Error()}catch(Z){var X=Z.stack.trim().match(/\n( *(at )?)/);Yb=X&&X[1]||""}return`
|
|
24
|
+
`+Yb+b}}var T7=!1,h7;{var tb=typeof WeakMap==="function"?WeakMap:Map;h7=new tb}function P3(b,z){if(!b||T7)return"";{var Q=h7.get(b);if(Q!==void 0)return Q}var X;T7=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=_3.current,_3.current=null,KQ();try{if(z){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(c){X=c}Reflect.construct(b,[],Y)}else{try{Y.call()}catch(c){X=c}b.call(Y.prototype)}}else{try{throw Error()}catch(c){X=c}b()}}catch(c){if(c&&X&&typeof c.stack==="string"){var $=c.stack.split(`
|
|
25
|
+
`),K=X.stack.split(`
|
|
26
|
+
`),O=$.length-1,N=K.length-1;while(O>=1&&N>=0&&$[O]!==K[N])N--;for(;O>=1&&N>=0;O--,N--)if($[O]!==K[N]){if(O!==1||N!==1)do if(O--,N--,N<0||$[O]!==K[N]){var T=`
|
|
27
|
+
`+$[O].replace(" at new "," at ");if(b.displayName&&T.includes("<anonymous>"))T=T.replace("<anonymous>",b.displayName);if(typeof b==="function")h7.set(b,T);return T}while(O>=1&&N>=0);break}}}finally{T7=!1,_3.current=J,oZ(),Error.prepareStackTrace=Z}var f=b?b.displayName||b.name:"",g=f?Q5(f):"";if(typeof b==="function")h7.set(b,g);return g}function UQ(b,z,Q){return P3(b,!0)}function R3(b,z,Q){return P3(b,!1)}function pZ(b){var z=b.prototype;return!!(z&&z.isReactComponent)}function C7(b,z,Q){if(b==null)return"";if(typeof b==="function")return P3(b,pZ(b));if(typeof b==="string")return Q5(b);switch(b){case p:return Q5("Suspense");case H0:return Q5("SuspenseList")}if(typeof b==="object")switch(b.$$typeof){case h:return R3(b.render);case q0:return C7(b.type,z,Q);case f0:{var X=b,Z=X._payload,J=X._init;try{return C7(J(Z),z,Q)}catch(Y){}}}return""}function qQ(b){var z=b._debugOwner?b._debugOwner.type:null,Q=b._debugSource;switch(b.tag){case A:return Q5(b.type);case C:return Q5("Lazy");case s:return Q5("Suspense");case O0:return Q5("SuspenseList");case R:case I:case n:return R3(b.type);case u:return R3(b.type.render);case W:return UQ(b.type);default:return""}}function F3(b){try{var z="",Q=b;do z+=qQ(Q),Q=Q.return;while(Q);return z}catch(X){return`
|
|
28
|
+
Error generating stack: `+X.message+`
|
|
29
|
+
`+X.stack}}function sb(b,z,Q){var X=b.displayName;if(X)return X;var Z=z.displayName||z.name||"";return Z!==""?Q+"("+Z+")":Q}function BQ(b){return b.displayName||"Context"}function R1(b){if(b==null)return null;if(typeof b.tag==="number")G("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof b==="function")return b.displayName||b.name||null;if(typeof b==="string")return b;switch(b){case F1:return"Fragment";case j1:return"Portal";case i:return"Profiler";case M:return"StrictMode";case p:return"Suspense";case H0:return"SuspenseList"}if(typeof b==="object")switch(b.$$typeof){case v:var z=b;return BQ(z)+".Consumer";case b0:var Q=b;return BQ(Q._context)+".Provider";case h:return sb(b,b.render,"ForwardRef");case q0:var X=b.displayName||null;if(X!==null)return X;return R1(b.type)||"Memo";case f0:{var Z=b,J=Z._payload,Y=Z._init;try{return R1(Y(J))}catch($){return null}}}return null}function OQ(b,z,Q){var X=z.displayName||z.name||"";return b.displayName||(X!==""?Q+"("+X+")":Q)}function M3(b){return b.displayName||"Context"}function Q1(b){var{tag:z,type:Q}=b;switch(z){case k0:return"Cache";case r:var X=Q;return M3(X)+".Consumer";case D:var Z=Q;return M3(Z._context)+".Provider";case $0:return"DehydratedFragment";case u:return OQ(Q,Q.render,"ForwardRef");case d:return"Fragment";case A:return Q;case P:return"Portal";case w:return"Root";case F:return"Text";case C:return R1(Q);case E:if(Q===M)return"StrictMode";return"Mode";case g0:return"Offscreen";case v0:return"Profiler";case L0:return"Scope";case s:return"Suspense";case O0:return"SuspenseList";case a0:return"TracingMarker";case W:case R:case j:case I:case Q0:case n:if(typeof Q==="function")return Q.displayName||Q.name||null;if(typeof Q==="string")return Q;break}return null}var LQ=H.ReactDebugCurrentFrame,_6=null,$b=!1;function S7(){{if(_6===null)return null;var b=_6._debugOwner;if(b!==null&&typeof b<"u")return Q1(b)}return null}function NQ(){{if(_6===null)return"";return F3(_6)}}function r4(){LQ.getCurrentStack=null,_6=null,$b=!1}function _4(b){LQ.getCurrentStack=b===null?null:NQ,_6=b,$b=!1}function vQ(){return _6}function x6(b){$b=b}function u6(b){return""+b}function c5(b){switch(typeof b){case"boolean":case"number":case"string":case"undefined":return b;case"object":return r1(b),b;default:return""}}var rZ={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function eb(b,z){{if(!(rZ[z.type]||z.onChange||z.onInput||z.readOnly||z.disabled||z.value==null))G("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(!(z.onChange||z.readOnly||z.disabled||z.checked==null))G("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 Gb(b){var{type:z,nodeName:Q}=b;return Q&&Q.toLowerCase()==="input"&&(z==="checkbox"||z==="radio")}function WQ(b){return b._valueTracker}function V7(b){b._valueTracker=null}function _Q(b){var z="";if(!b)return z;if(Gb(b))z=b.checked?"true":"false";else z=b.value;return z}function PQ(b){var z=Gb(b)?"checked":"value",Q=Object.getOwnPropertyDescriptor(b.constructor.prototype,z);r1(b[z]);var X=""+b[z];if(b.hasOwnProperty(z)||typeof Q>"u"||typeof Q.get!=="function"||typeof Q.set!=="function")return;var{get:Z,set:J}=Q;Object.defineProperty(b,z,{configurable:!0,get:function(){return Z.call(this)},set:function($){r1($),X=""+$,J.call(this,$)}}),Object.defineProperty(b,z,{enumerable:Q.enumerable});var Y={getValue:function(){return X},setValue:function($){r1($),X=""+$},stopTracking:function(){V7(b),delete b[z]}};return Y}function Q7(b){if(WQ(b))return;b._valueTracker=PQ(b)}function b8(b){if(!b)return!1;var z=WQ(b);if(!z)return!0;var Q=z.getValue(),X=_Q(b);if(X!==Q)return z.setValue(X),!0;return!1}function D7(b){if(b=b||(typeof document<"u"?document:void 0),typeof b>"u")return null;try{return b.activeElement||b.body}catch(z){return b.body}}var z8=!1,RQ=!1,FQ=!1,MQ=!1;function kQ(b){var z=b.type==="checkbox"||b.type==="radio";return z?b.checked!=null:b.value!=null}function q(b,z){var Q=b,X=z.checked,Z=Z1({},z,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:X!=null?X:Q._wrapperState.initialChecked});return Z}function k(b,z){{if(eb("input",z),z.checked!==void 0&&z.defaultChecked!==void 0&&!RQ)G("%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",S7()||"A component",z.type),RQ=!0;if(z.value!==void 0&&z.defaultValue!==void 0&&!z8)G("%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",S7()||"A component",z.type),z8=!0}var Q=b,X=z.defaultValue==null?"":z.defaultValue;Q._wrapperState={initialChecked:z.checked!=null?z.checked:z.defaultChecked,initialValue:c5(z.value!=null?z.value:X),controlled:kQ(z)}}function m(b,z){var Q=b,X=z.checked;if(X!=null)K1(Q,"checked",X,!1)}function l(b,z){var Q=b;{var X=kQ(z);if(!Q._wrapperState.controlled&&X&&!MQ)G("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"),MQ=!0;if(Q._wrapperState.controlled&&!X&&!FQ)G("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"),FQ=!0}m(b,z);var Z=c5(z.value),J=z.type;if(Z!=null){if(J==="number"){if(Z===0&&Q.value===""||Q.value!=Z)Q.value=u6(Z)}else if(Q.value!==u6(Z))Q.value=u6(Z)}else if(J==="submit"||J==="reset"){Q.removeAttribute("value");return}if(z.hasOwnProperty("value"))p0(Q,z.type,Z);else if(z.hasOwnProperty("defaultValue"))p0(Q,z.type,c5(z.defaultValue));if(z.checked==null&&z.defaultChecked!=null)Q.defaultChecked=!!z.defaultChecked}function Y0(b,z,Q){var X=b;if(z.hasOwnProperty("value")||z.hasOwnProperty("defaultValue")){var Z=z.type,J=Z==="submit"||Z==="reset";if(J&&(z.value===void 0||z.value===null))return;var Y=u6(X._wrapperState.initialValue);if(!Q){if(Y!==X.value)X.value=Y}X.defaultValue=Y}var $=X.name;if($!=="")X.name="";if(X.defaultChecked=!X.defaultChecked,X.defaultChecked=!!X._wrapperState.initialChecked,$!=="")X.name=$}function x0(b,z){var Q=b;l(Q,z),w0(Q,z)}function w0(b,z){var Q=z.name;if(z.type==="radio"&&Q!=null){var X=b;while(X.parentNode)X=X.parentNode;T4(Q,"name");var Z=X.querySelectorAll("input[name="+JSON.stringify(""+Q)+'][type="radio"]');for(var J=0;J<Z.length;J++){var Y=Z[J];if(Y===b||Y.form!==b.form)continue;var $=UX(Y);if(!$)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");b8(Y),l(Y,$)}}}function p0(b,z,Q){if(z!=="number"||D7(b.ownerDocument)!==b){if(Q==null)b.defaultValue=u6(b._wrapperState.initialValue);else if(b.defaultValue!==u6(Q))b.defaultValue=u6(Q)}}var q1=!1,u1=!1,t1=!1;function s1(b,z){{if(z.value==null){if(typeof z.children==="object"&&z.children!==null)QQ.Children.forEach(z.children,function(Q){if(Q==null)return;if(typeof Q==="string"||typeof Q==="number")return;if(!u1)u1=!0,G("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(z.dangerouslySetInnerHTML!=null){if(!t1)t1=!0,G("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(z.selected!=null&&!q1)G("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),q1=!0}}function U4(b,z){if(z.value!=null)b.setAttribute("value",u6(c5(z.value)))}var F4=Array.isArray;function A1(b){return F4(b)}var Kb=!1;function Q8(){var b=S7();if(b)return`
|
|
30
|
+
|
|
31
|
+
Check the render method of \``+b+"`.";return""}var k3=["value","defaultValue"];function nZ(b){{eb("select",b);for(var z=0;z<k3.length;z++){var Q=k3[z];if(b[Q]==null)continue;var X=A1(b[Q]);if(b.multiple&&!X)G("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",Q,Q8());else if(!b.multiple&&X)G("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",Q,Q8())}}}function X7(b,z,Q,X){var Z=b.options;if(z){var J=Q,Y={};for(var $=0;$<J.length;$++)Y["$"+J[$]]=!0;for(var K=0;K<Z.length;K++){var O=Y.hasOwnProperty("$"+Z[K].value);if(Z[K].selected!==O)Z[K].selected=O;if(O&&X)Z[K].defaultSelected=!0}}else{var N=u6(c5(Q)),T=null;for(var f=0;f<Z.length;f++){if(Z[f].value===N){if(Z[f].selected=!0,X)Z[f].defaultSelected=!0;return}if(T===null&&!Z[f].disabled)T=Z[f]}if(T!==null)T.selected=!0}}function A3(b,z){return Z1({},z,{value:void 0})}function w3(b,z){var Q=b;if(nZ(z),Q._wrapperState={wasMultiple:!!z.multiple},z.value!==void 0&&z.defaultValue!==void 0&&!Kb)G("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"),Kb=!0}function tZ(b,z){var Q=b;Q.multiple=!!z.multiple;var X=z.value;if(X!=null)X7(Q,!!z.multiple,X,!1);else if(z.defaultValue!=null)X7(Q,!!z.multiple,z.defaultValue,!0)}function q2(b,z){var Q=b,X=Q._wrapperState.wasMultiple;Q._wrapperState.wasMultiple=!!z.multiple;var Z=z.value;if(Z!=null)X7(Q,!!z.multiple,Z,!1);else if(X!==!!z.multiple)if(z.defaultValue!=null)X7(Q,!!z.multiple,z.defaultValue,!0);else X7(Q,!!z.multiple,z.multiple?[]:"",!1)}function B2(b,z){var Q=b,X=z.value;if(X!=null)X7(Q,!!z.multiple,X,!1)}var PG=!1;function sZ(b,z){var Q=b;if(z.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var X=Z1({},z,{value:void 0,defaultValue:void 0,children:u6(Q._wrapperState.initialValue)});return X}function RG(b,z){var Q=b;if(eb("textarea",z),z.value!==void 0&&z.defaultValue!==void 0&&!PG)G("%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",S7()||"A component"),PG=!0;var X=z.value;if(X==null){var{children:Z,defaultValue:J}=z;if(Z!=null){G("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(J!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(A1(Z)){if(Z.length>1)throw Error("<textarea> can only have at most one child.");Z=Z[0]}J=Z}}if(J==null)J="";X=J}Q._wrapperState={initialValue:c5(X)}}function FG(b,z){var Q=b,X=c5(z.value),Z=c5(z.defaultValue);if(X!=null){var J=u6(X);if(J!==Q.value)Q.value=J;if(z.defaultValue==null&&Q.defaultValue!==J)Q.defaultValue=J}if(Z!=null)Q.defaultValue=u6(Z)}function MG(b,z){var Q=b,X=Q.textContent;if(X===Q._wrapperState.initialValue){if(X!==""&&X!==null)Q.value=X}}function O2(b,z){FG(b,z)}var Z7="http://www.w3.org/1999/xhtml",L2="http://www.w3.org/1998/Math/MathML",eZ="http://www.w3.org/2000/svg";function bJ(b){switch(b){case"svg":return eZ;case"math":return L2;default:return Z7}}function zJ(b,z){if(b==null||b===Z7)return bJ(z);if(b===eZ&&z==="foreignObject")return Z7;return b}var N2=function(b){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(z,Q,X,Z){MSApp.execUnsafeLocalFunction(function(){return b(z,Q,X,Z)})};else return b},AQ,kG=N2(function(b,z){if(b.namespaceURI===eZ){if(!("innerHTML"in b)){AQ=AQ||document.createElement("div"),AQ.innerHTML="<svg>"+z.valueOf().toString()+"</svg>";var Q=AQ.firstChild;while(b.firstChild)b.removeChild(b.firstChild);while(Q.firstChild)b.appendChild(Q.firstChild);return}}b.innerHTML=z}),m6=1,J7=3,C4=8,H7=9,QJ=11,wQ=function(b,z){if(z){var Q=b.firstChild;if(Q&&Q===b.lastChild&&Q.nodeType===J7){Q.nodeValue=z;return}}b.textContent=z},v2={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"]},I3={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 W2(b,z){return b+z.charAt(0).toUpperCase()+z.substring(1)}var _2=["Webkit","ms","Moz","O"];Object.keys(I3).forEach(function(b){_2.forEach(function(z){I3[W2(z,b)]=I3[b]})});function XJ(b,z,Q){var X=z==null||typeof z==="boolean"||z==="";if(X)return"";if(!Q&&typeof z==="number"&&z!==0&&!(I3.hasOwnProperty(b)&&I3[b]))return z+"px";return O4(z,b),(""+z).trim()}var P2=/([A-Z])/g,R2=/^ms-/;function F2(b){return b.replace(P2,"-$1").toLowerCase().replace(R2,"-ms-")}var AG=function(){};{var M2=/^(?:webkit|moz|o)[A-Z]/,k2=/^-ms-/,A2=/-(.)/g,wG=/;\s*$/,X8={},ZJ={},IG=!1,fG=!1,w2=function(b){return b.replace(A2,function(z,Q){return Q.toUpperCase()})},I2=function(b){if(X8.hasOwnProperty(b)&&X8[b])return;X8[b]=!0,G("Unsupported style property %s. Did you mean %s?",b,w2(b.replace(k2,"ms-")))},f2=function(b){if(X8.hasOwnProperty(b)&&X8[b])return;X8[b]=!0,G("Unsupported vendor-prefixed style property %s. Did you mean %s?",b,b.charAt(0).toUpperCase()+b.slice(1))},T2=function(b,z){if(ZJ.hasOwnProperty(z)&&ZJ[z])return;ZJ[z]=!0,G(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,b,z.replace(wG,""))},h2=function(b,z){if(IG)return;IG=!0,G("`NaN` is an invalid value for the `%s` css style property.",b)},C2=function(b,z){if(fG)return;fG=!0,G("`Infinity` is an invalid value for the `%s` css style property.",b)};AG=function(b,z){if(b.indexOf("-")>-1)I2(b);else if(M2.test(b))f2(b);else if(wG.test(z))T2(b,z);if(typeof z==="number"){if(isNaN(z))h2(b,z);else if(!isFinite(z))C2(b,z)}}}var S2=AG;function V2(b){{var z="",Q="";for(var X in b){if(!b.hasOwnProperty(X))continue;var Z=b[X];if(Z!=null){var J=X.indexOf("--")===0;z+=Q+(J?X:F2(X))+":",z+=XJ(X,Z,J),Q=";"}}return z||null}}function TG(b,z){var Q=b.style;for(var X in z){if(!z.hasOwnProperty(X))continue;var Z=X.indexOf("--")===0;if(!Z)S2(X,z[X]);var J=XJ(X,z[X],Z);if(X==="float")X="cssFloat";if(Z)Q.setProperty(X,J);else Q[X]=J}}function D2(b){return b==null||typeof b==="boolean"||b===""}function hG(b){var z={};for(var Q in b){var X=v2[Q]||[Q];for(var Z=0;Z<X.length;Z++)z[X[Z]]=Q}return z}function E2(b,z){{if(!z)return;var Q=hG(b),X=hG(z),Z={};for(var J in Q){var Y=Q[J],$=X[J];if($&&Y!==$){var K=Y+","+$;if(Z[K])continue;Z[K]=!0,G("%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.",D2(b[Y])?"Removing":"Updating",Y,$)}}}}var u2={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},m2=Z1({menuitem:!0},u2),g2="__html";function JJ(b,z){if(!z)return;if(m2[b]){if(z.children!=null||z.dangerouslySetInnerHTML!=null)throw Error(b+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(z.dangerouslySetInnerHTML!=null){if(z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof z.dangerouslySetInnerHTML!=="object"||!(g2 in z.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(!z.suppressContentEditableWarning&&z.contentEditable&&z.children!=null)G("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(z.style!=null&&typeof z.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 Ub(b,z){if(b.indexOf("-")===-1)return typeof z.is==="string";switch(b){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 IQ={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"},CG={"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},Z8={},c2=new RegExp("^(aria)-["+h4+"]*$"),y2=new RegExp("^(aria)[A-Z]["+h4+"]*$");function d2(b,z){{if(E4.call(Z8,z)&&Z8[z])return!0;if(y2.test(z)){var Q="aria-"+z.slice(4).toLowerCase(),X=CG.hasOwnProperty(Q)?Q:null;if(X==null)return G("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",z),Z8[z]=!0,!0;if(z!==X)return G("Invalid ARIA attribute `%s`. Did you mean `%s`?",z,X),Z8[z]=!0,!0}if(c2.test(z)){var Z=z.toLowerCase(),J=CG.hasOwnProperty(Z)?Z:null;if(J==null)return Z8[z]=!0,!1;if(z!==J)return G("Unknown ARIA attribute `%s`. Did you mean `%s`?",z,J),Z8[z]=!0,!0}}return!0}function a2(b,z){{var Q=[];for(var X in z){var Z=d2(b,X);if(!Z)Q.push(X)}var J=Q.map(function(Y){return"`"+Y+"`"}).join(", ");if(Q.length===1)G("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,b);else if(Q.length>1)G("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,b)}}function l2(b,z){if(Ub(b,z))return;a2(b,z)}var SG=!1;function i2(b,z){{if(b!=="input"&&b!=="textarea"&&b!=="select")return;if(z!=null&&z.value===null&&!SG)if(SG=!0,b==="select"&&z.multiple)G("`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.",b);else G("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",b)}}var VG=function(){};{var f6={},DG=/^on./,x2=/^on[^A-Z]/,j2=new RegExp("^(aria)-["+h4+"]*$"),o2=new RegExp("^(aria)[A-Z]["+h4+"]*$");VG=function(b,z,Q,X){if(E4.call(f6,z)&&f6[z])return!0;var Z=z.toLowerCase();if(Z==="onfocusin"||Z==="onfocusout")return G("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."),f6[z]=!0,!0;if(X!=null){var{registrationNameDependencies:J,possibleRegistrationNames:Y}=X;if(J.hasOwnProperty(z))return!0;var $=Y.hasOwnProperty(Z)?Y[Z]:null;if($!=null)return G("Invalid event handler property `%s`. Did you mean `%s`?",z,$),f6[z]=!0,!0;if(DG.test(z))return G("Unknown event handler property `%s`. It will be ignored.",z),f6[z]=!0,!0}else if(DG.test(z)){if(x2.test(z))G("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",z);return f6[z]=!0,!0}if(j2.test(z)||o2.test(z))return!0;if(Z==="innerhtml")return G("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),f6[z]=!0,!0;if(Z==="aria")return G("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),f6[z]=!0,!0;if(Z==="is"&&Q!==null&&Q!==void 0&&typeof Q!=="string")return G("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof Q),f6[z]=!0,!0;if(typeof Q==="number"&&isNaN(Q))return G("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",z),f6[z]=!0,!0;var K=I4(z),O=K!==null&&K.type===z6;if(IQ.hasOwnProperty(Z)){var N=IQ[Z];if(N!==z)return G("Invalid DOM property `%s`. Did you mean `%s`?",z,N),f6[z]=!0,!0}else if(!O&&z!==Z)return G("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.",z,Z),f6[z]=!0,!0;if(typeof Q==="boolean"&&L4(z,Q,K,!1)){if(Q)G('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()}.',Q,z,z,Q,z);else G('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.',Q,z,z,Q,z,z,z);return f6[z]=!0,!0}if(O)return!0;if(L4(z,Q,K,!1))return f6[z]=!0,!1;if((Q==="false"||Q==="true")&&K!==null&&K.type===Z4)return G("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",Q,z,Q==="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".',z,Q),f6[z]=!0,!0;return!0}}var p2=function(b,z,Q){{var X=[];for(var Z in z){var J=VG(b,Z,z[Z],Q);if(!J)X.push(Z)}var Y=X.map(function($){return"`"+$+"`"}).join(", ");if(X.length===1)G("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 ",Y,b);else if(X.length>1)G("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 ",Y,b)}};function r2(b,z,Q){if(Ub(b,z))return;p2(b,z,Q)}var EG=1,HJ=2,f3=4,n2=EG|HJ|f3,T3=null;function t2(b){if(T3!==null)G("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");T3=b}function s2(){if(T3===null)G("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");T3=null}function e2(b){return b===T3}function YJ(b){var z=b.target||b.srcElement||window;if(z.correspondingUseElement)z=z.correspondingUseElement;return z.nodeType===J7?z.parentNode:z}var $J=null,J8=null,H8=null;function uG(b){var z=a7(b);if(!z)return;if(typeof $J!=="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 Q=z.stateNode;if(Q){var X=UX(Q);$J(z.stateNode,z.type,X)}}function bO(b){$J=b}function mG(b){if(J8)if(H8)H8.push(b);else H8=[b];else J8=b}function zO(){return J8!==null||H8!==null}function gG(){if(!J8)return;var b=J8,z=H8;if(J8=null,H8=null,uG(b),z)for(var Q=0;Q<z.length;Q++)uG(z[Q])}var cG=function(b,z){return b(z)},yG=function(){},GJ=!1;function QO(){var b=zO();if(b)yG(),gG()}function dG(b,z,Q){if(GJ)return b(z,Q);GJ=!0;try{return cG(b,z,Q)}finally{GJ=!1,QO()}}function XO(b,z,Q){cG=b,yG=Q}function ZO(b){return b==="button"||b==="input"||b==="select"||b==="textarea"}function JO(b,z,Q){switch(b){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(Q.disabled&&ZO(z));default:return!1}}function h3(b,z){var Q=b.stateNode;if(Q===null)return null;var X=UX(Q);if(X===null)return null;var Z=X[z];if(JO(z,b.type,X))return null;if(Z&&typeof Z!=="function")throw Error("Expected `"+z+"` listener to be a function, instead got a value of `"+typeof Z+"` type.");return Z}var KJ=!1;if(X4)try{var C3={};Object.defineProperty(C3,"passive",{get:function(){KJ=!0}}),window.addEventListener("test",C3,C3),window.removeEventListener("test",C3,C3)}catch(b){KJ=!1}function aG(b,z,Q,X,Z,J,Y,$,K){var O=Array.prototype.slice.call(arguments,3);try{z.apply(Q,O)}catch(N){this.onError(N)}}var lG=aG;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var UJ=document.createElement("react");lG=function(z,Q,X,Z,J,Y,$,K,O){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 N=document.createEvent("Event"),T=!1,f=!0,g=window.event,c=Object.getOwnPropertyDescriptor(window,"event");function a(){if(UJ.removeEventListener(x,m0,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=g}var N0=Array.prototype.slice.call(arguments,3);function m0(){T=!0,a(),Q.apply(X,N0),f=!1}var T0,$1=!1,G1=!1;function S(V){if(T0=V.error,$1=!0,T0===null&&V.colno===0&&V.lineno===0)G1=!0;if(V.defaultPrevented){if(T0!=null&&typeof T0==="object")try{T0._suppressLogging=!0}catch(X0){}}}var x="react-"+(z?z:"invokeguardedcallback");if(window.addEventListener("error",S),UJ.addEventListener(x,m0,!1),N.initEvent(x,!1,!1),UJ.dispatchEvent(N),c)Object.defineProperty(window,"event",c);if(T&&f){if(!$1)T0=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(G1)T0=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(T0)}if(window.removeEventListener("error",S),!T)return a(),aG.apply(this,arguments)}}var HO=lG,Y8=!1,fQ=null,TQ=!1,qJ=null,YO={onError:function(b){Y8=!0,fQ=b}};function BJ(b,z,Q,X,Z,J,Y,$,K){Y8=!1,fQ=null,HO.apply(YO,arguments)}function $O(b,z,Q,X,Z,J,Y,$,K){if(BJ.apply(this,arguments),Y8){var O=OJ();if(!TQ)TQ=!0,qJ=O}}function GO(){if(TQ){var b=qJ;throw TQ=!1,qJ=null,b}}function KO(){return Y8}function OJ(){if(Y8){var b=fQ;return Y8=!1,fQ=null,b}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 $8(b){return b._reactInternals}function UO(b){return b._reactInternals!==void 0}function qO(b,z){b._reactInternals=z}var l0=0,G8=1,S4=2,v1=4,qb=16,S3=32,LJ=64,w1=128,Y7=256,E7=512,Bb=1024,N5=2048,$7=4096,Ob=8192,hQ=16384,BO=N5|v1|LJ|E7|Bb|hQ,OO=32767,V3=32768,T6=65536,NJ=131072,iG=1048576,vJ=2097152,Lb=4194304,WJ=8388608,G7=16777216,CQ=33554432,_J=v1|Bb|0,PJ=S4|v1|qb|S3|E7|$7|Ob,D3=v1|LJ|E7|Ob,K8=N5|qb,K7=Lb|WJ|vJ,LO=H.ReactCurrentOwner;function Nb(b){var z=b,Q=b;if(!b.alternate){var X=z;do{if(z=X,(z.flags&(S4|$7))!==l0)Q=z.return;X=z.return}while(X)}else while(z.return)z=z.return;if(z.tag===w)return Q;return null}function xG(b){if(b.tag===s){var z=b.memoizedState;if(z===null){var Q=b.alternate;if(Q!==null)z=Q.memoizedState}if(z!==null)return z.dehydrated}return null}function jG(b){return b.tag===w?b.stateNode.containerInfo:null}function NO(b){return Nb(b)===b}function vO(b){{var z=LO.current;if(z!==null&&z.tag===W){var Q=z,X=Q.stateNode;if(!X._warnedAboutRefsInRender)G("%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.",Q1(Q)||"A component");X._warnedAboutRefsInRender=!0}}var Z=$8(b);if(!Z)return!1;return Nb(Z)===Z}function oG(b){if(Nb(b)!==b)throw Error("Unable to find node on an unmounted component.")}function pG(b){var z=b.alternate;if(!z){var Q=Nb(b);if(Q===null)throw Error("Unable to find node on an unmounted component.");if(Q!==b)return null;return b}var X=b,Z=z;while(!0){var J=X.return;if(J===null)break;var Y=J.alternate;if(Y===null){var $=J.return;if($!==null){X=Z=$;continue}break}if(J.child===Y.child){var K=J.child;while(K){if(K===X)return oG(J),b;if(K===Z)return oG(J),z;K=K.sibling}throw Error("Unable to find node on an unmounted component.")}if(X.return!==Z.return)X=J,Z=Y;else{var O=!1,N=J.child;while(N){if(N===X){O=!0,X=J,Z=Y;break}if(N===Z){O=!0,Z=J,X=Y;break}N=N.sibling}if(!O){N=Y.child;while(N){if(N===X){O=!0,X=Y,Z=J;break}if(N===Z){O=!0,Z=Y,X=J;break}N=N.sibling}if(!O)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(X.alternate!==Z)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(X.tag!==w)throw Error("Unable to find node on an unmounted component.");if(X.stateNode.current===X)return b;return z}function rG(b){var z=pG(b);return z!==null?nG(z):null}function nG(b){if(b.tag===A||b.tag===F)return b;var z=b.child;while(z!==null){var Q=nG(z);if(Q!==null)return Q;z=z.sibling}return null}function WO(b){var z=pG(b);return z!==null?tG(z):null}function tG(b){if(b.tag===A||b.tag===F)return b;var z=b.child;while(z!==null){if(z.tag!==P){var Q=tG(z);if(Q!==null)return Q}z=z.sibling}return null}var sG=d1.unstable_scheduleCallback,_O=d1.unstable_cancelCallback,PO=d1.unstable_shouldYield,RO=d1.unstable_requestPaint,n4=d1.unstable_now,FO=d1.unstable_getCurrentPriorityLevel,SQ=d1.unstable_ImmediatePriority,RJ=d1.unstable_UserBlockingPriority,vb=d1.unstable_NormalPriority,MO=d1.unstable_LowPriority,FJ=d1.unstable_IdlePriority,kO=d1.unstable_yieldValue,AO=d1.unstable_setDisableYieldValue,Wb=null,X6=null,_0=null,y5=!1,v5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function wO(b){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var z=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(z.isDisabled)return!0;if(!z.supportsFiber)return G("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(v4)b=Z1({},b,{getLaneLabelMap:SO,injectProfilingHooks:CO});Wb=z.inject(b),X6=z}catch(Q){G("React instrumentation encountered an error: %s.",Q)}if(z.checkDCE)return!0;else return!1}function IO(b,z){if(X6&&typeof X6.onScheduleFiberRoot==="function")try{X6.onScheduleFiberRoot(Wb,b,z)}catch(Q){if(!y5)y5=!0,G("React instrumentation encountered an error: %s",Q)}}function fO(b,z){if(X6&&typeof X6.onCommitFiberRoot==="function")try{var Q=(b.current.flags&w1)===w1;if(Y4){var X;switch(z){case p6:X=SQ;break;case q7:X=RJ;break;case B7:X=vb;break;case yQ:X=FJ;break;default:X=vb;break}X6.onCommitFiberRoot(Wb,b,X,Q)}else X6.onCommitFiberRoot(Wb,b,void 0,Q)}catch(Z){if(!y5)y5=!0,G("React instrumentation encountered an error: %s",Z)}}function TO(b){if(X6&&typeof X6.onPostCommitFiberRoot==="function")try{X6.onPostCommitFiberRoot(Wb,b)}catch(z){if(!y5)y5=!0,G("React instrumentation encountered an error: %s",z)}}function hO(b){if(X6&&typeof X6.onCommitFiberUnmount==="function")try{X6.onCommitFiberUnmount(Wb,b)}catch(z){if(!y5)y5=!0,G("React instrumentation encountered an error: %s",z)}}function t4(b){{if(typeof kO==="function")AO(b),B(b);if(X6&&typeof X6.setStrictMode==="function")try{X6.setStrictMode(Wb,b)}catch(z){if(!y5)y5=!0,G("React instrumentation encountered an error: %s",z)}}}function CO(b){_0=b}function SO(){{var b=new Map,z=1;for(var Q=0;Q<kJ;Q++){var X=sO(z);b.set(z,X),z*=2}return b}}function VO(b){if(_0!==null&&typeof _0.markCommitStarted==="function")_0.markCommitStarted(b)}function eG(){if(_0!==null&&typeof _0.markCommitStopped==="function")_0.markCommitStopped()}function E3(b){if(_0!==null&&typeof _0.markComponentRenderStarted==="function")_0.markComponentRenderStarted(b)}function U8(){if(_0!==null&&typeof _0.markComponentRenderStopped==="function")_0.markComponentRenderStopped()}function DO(b){if(_0!==null&&typeof _0.markComponentPassiveEffectMountStarted==="function")_0.markComponentPassiveEffectMountStarted(b)}function EO(){if(_0!==null&&typeof _0.markComponentPassiveEffectMountStopped==="function")_0.markComponentPassiveEffectMountStopped()}function uO(b){if(_0!==null&&typeof _0.markComponentPassiveEffectUnmountStarted==="function")_0.markComponentPassiveEffectUnmountStarted(b)}function mO(){if(_0!==null&&typeof _0.markComponentPassiveEffectUnmountStopped==="function")_0.markComponentPassiveEffectUnmountStopped()}function gO(b){if(_0!==null&&typeof _0.markComponentLayoutEffectMountStarted==="function")_0.markComponentLayoutEffectMountStarted(b)}function cO(){if(_0!==null&&typeof _0.markComponentLayoutEffectMountStopped==="function")_0.markComponentLayoutEffectMountStopped()}function b9(b){if(_0!==null&&typeof _0.markComponentLayoutEffectUnmountStarted==="function")_0.markComponentLayoutEffectUnmountStarted(b)}function z9(){if(_0!==null&&typeof _0.markComponentLayoutEffectUnmountStopped==="function")_0.markComponentLayoutEffectUnmountStopped()}function yO(b,z,Q){if(_0!==null&&typeof _0.markComponentErrored==="function")_0.markComponentErrored(b,z,Q)}function dO(b,z,Q){if(_0!==null&&typeof _0.markComponentSuspended==="function")_0.markComponentSuspended(b,z,Q)}function aO(b){if(_0!==null&&typeof _0.markLayoutEffectsStarted==="function")_0.markLayoutEffectsStarted(b)}function lO(){if(_0!==null&&typeof _0.markLayoutEffectsStopped==="function")_0.markLayoutEffectsStopped()}function iO(b){if(_0!==null&&typeof _0.markPassiveEffectsStarted==="function")_0.markPassiveEffectsStarted(b)}function xO(){if(_0!==null&&typeof _0.markPassiveEffectsStopped==="function")_0.markPassiveEffectsStopped()}function Q9(b){if(_0!==null&&typeof _0.markRenderStarted==="function")_0.markRenderStarted(b)}function jO(){if(_0!==null&&typeof _0.markRenderYielded==="function")_0.markRenderYielded()}function X9(){if(_0!==null&&typeof _0.markRenderStopped==="function")_0.markRenderStopped()}function oO(b){if(_0!==null&&typeof _0.markRenderScheduled==="function")_0.markRenderScheduled(b)}function pO(b,z){if(_0!==null&&typeof _0.markForceUpdateScheduled==="function")_0.markForceUpdateScheduled(b,z)}function MJ(b,z){if(_0!==null&&typeof _0.markStateUpdateScheduled==="function")_0.markStateUpdateScheduled(b,z)}var d0=0,B1=1,m1=2,M4=8,d5=16,Z9=Math.clz32?Math.clz32:tO,rO=Math.log,nO=Math.LN2;function tO(b){var z=b>>>0;if(z===0)return 32;return 31-(rO(z)/nO|0)|0}var kJ=31,z0=0,s4=0,r0=1,q8=2,U7=4,_b=8,a5=16,u3=32,B8=4194240,m3=64,AJ=128,wJ=256,IJ=512,fJ=1024,TJ=2048,hJ=4096,CJ=8192,SJ=16384,VJ=32768,DJ=65536,EJ=131072,uJ=262144,mJ=524288,gJ=1048576,cJ=2097152,VQ=130023424,O8=4194304,yJ=8388608,dJ=16777216,aJ=33554432,lJ=67108864,J9=O8,g3=134217728,H9=268435455,c3=268435456,Pb=536870912,j6=1073741824;function sO(b){{if(b&r0)return"Sync";if(b&q8)return"InputContinuousHydration";if(b&U7)return"InputContinuous";if(b&_b)return"DefaultHydration";if(b&a5)return"Default";if(b&u3)return"TransitionHydration";if(b&B8)return"Transition";if(b&VQ)return"Retry";if(b&g3)return"SelectiveHydration";if(b&c3)return"IdleHydration";if(b&Pb)return"Idle";if(b&j6)return"Offscreen"}}var H4=-1,DQ=m3,EQ=O8;function y3(b){switch(Rb(b)){case r0:return r0;case q8:return q8;case U7:return U7;case _b:return _b;case a5:return a5;case u3:return u3;case m3:case AJ:case wJ:case IJ:case fJ:case TJ:case hJ:case CJ:case SJ:case VJ:case DJ:case EJ:case uJ:case mJ:case gJ:case cJ:return b&B8;case O8:case yJ:case dJ:case aJ:case lJ:return b&VQ;case g3:return g3;case c3:return c3;case Pb:return Pb;case j6:return j6;default:return G("Should have found matching lanes. This is a bug in React."),b}}function uQ(b,z){var Q=b.pendingLanes;if(Q===z0)return z0;var X=z0,Z=b.suspendedLanes,J=b.pingedLanes,Y=Q&H9;if(Y!==z0){var $=Y&~Z;if($!==z0)X=y3($);else{var K=Y&J;if(K!==z0)X=y3(K)}}else{var O=Q&~Z;if(O!==z0)X=y3(O);else if(J!==z0)X=y3(J)}if(X===z0)return z0;if(z!==z0&&z!==X&&(z&Z)===z0){var N=Rb(X),T=Rb(z);if(N>=T||N===a5&&(T&B8)!==z0)return z}if((X&U7)!==z0)X|=Q&a5;var f=b.entangledLanes;if(f!==z0){var g=b.entanglements,c=X&f;while(c>0){var a=Fb(c),N0=1<<a;X|=g[a],c&=~N0}}return X}function eO(b,z){var Q=b.eventTimes,X=H4;while(z>0){var Z=Fb(z),J=1<<Z,Y=Q[Z];if(Y>X)X=Y;z&=~J}return X}function bL(b,z){switch(b){case r0:case q8:case U7:return z+250;case _b:case a5:case u3:case m3:case AJ:case wJ:case IJ:case fJ:case TJ:case hJ:case CJ:case SJ:case VJ:case DJ:case EJ:case uJ:case mJ:case gJ:case cJ:return z+5000;case O8:case yJ:case dJ:case aJ:case lJ:return H4;case g3:case c3:case Pb:case j6:return H4;default:return G("Should have found matching lanes. This is a bug in React."),H4}}function zL(b,z){var{pendingLanes:Q,suspendedLanes:X,pingedLanes:Z,expirationTimes:J}=b,Y=Q;while(Y>0){var $=Fb(Y),K=1<<$,O=J[$];if(O===H4){if((K&X)===z0||(K&Z)!==z0)J[$]=bL(K,z)}else if(O<=z)b.expiredLanes|=K;Y&=~K}}function QL(b){return y3(b.pendingLanes)}function iJ(b){var z=b.pendingLanes&~j6;if(z!==z0)return z;if(z&j6)return j6;return z0}function XL(b){return(b&r0)!==z0}function xJ(b){return(b&H9)!==z0}function Y9(b){return(b&VQ)===b}function ZL(b){var z=r0|U7|a5;return(b&z)===z0}function JL(b){return(b&B8)===b}function mQ(b,z){var Q=q8|U7|_b|a5;return(z&Q)!==z0}function HL(b,z){return(z&b.expiredLanes)!==z0}function $9(b){return(b&B8)!==z0}function G9(){var b=DQ;if(DQ<<=1,(DQ&B8)===z0)DQ=m3;return b}function YL(){var b=EQ;if(EQ<<=1,(EQ&VQ)===z0)EQ=O8;return b}function Rb(b){return b&-b}function d3(b){return Rb(b)}function Fb(b){return 31-Z9(b)}function jJ(b){return Fb(b)}function o6(b,z){return(b&z)!==z0}function L8(b,z){return(b&z)===z}function X1(b,z){return b|z}function gQ(b,z){return b&~z}function K9(b,z){return b&z}function cQ(b){return b}function $L(b,z){return b!==s4&&b<z?b:z}function oJ(b){var z=[];for(var Q=0;Q<kJ;Q++)z.push(b);return z}function a3(b,z,Q){if(b.pendingLanes|=z,z!==Pb)b.suspendedLanes=z0,b.pingedLanes=z0;var X=b.eventTimes,Z=jJ(z);X[Z]=Q}function GL(b,z){b.suspendedLanes|=z,b.pingedLanes&=~z;var Q=b.expirationTimes,X=z;while(X>0){var Z=Fb(X),J=1<<Z;Q[Z]=H4,X&=~J}}function U9(b,z,Q){b.pingedLanes|=b.suspendedLanes&z}function KL(b,z){var Q=b.pendingLanes&~z;b.pendingLanes=z,b.suspendedLanes=z0,b.pingedLanes=z0,b.expiredLanes&=z,b.mutableReadLanes&=z,b.entangledLanes&=z;var{entanglements:X,eventTimes:Z,expirationTimes:J}=b,Y=Q;while(Y>0){var $=Fb(Y),K=1<<$;X[$]=z0,Z[$]=H4,J[$]=H4,Y&=~K}}function pJ(b,z){var Q=b.entangledLanes|=z,X=b.entanglements,Z=Q;while(Z){var J=Fb(Z),Y=1<<J;if(Y&z|X[J]&z)X[J]|=z;Z&=~Y}}function UL(b,z){var Q=Rb(z),X;switch(Q){case U7:X=q8;break;case a5:X=_b;break;case m3:case AJ:case wJ:case IJ:case fJ:case TJ:case hJ:case CJ:case SJ:case VJ:case DJ:case EJ:case uJ:case mJ:case gJ:case cJ:case O8:case yJ:case dJ:case aJ:case lJ:X=u3;break;case Pb:X=c3;break;default:X=s4;break}if((X&(b.suspendedLanes|z))!==s4)return s4;return X}function q9(b,z,Q){if(!v5)return;var X=b.pendingUpdatersLaneMap;while(Q>0){var Z=jJ(Q),J=1<<Z,Y=X[Z];Y.add(z),Q&=~J}}function B9(b,z){if(!v5)return;var{pendingUpdatersLaneMap:Q,memoizedUpdaters:X}=b;while(z>0){var Z=jJ(z),J=1<<Z,Y=Q[Z];if(Y.size>0)Y.forEach(function($){var K=$.alternate;if(K===null||!X.has(K))X.add($)}),Y.clear();z&=~J}}function O9(b,z){return null}var p6=r0,q7=U7,B7=a5,yQ=Pb,l3=s4;function W5(){return l3}function e4(b){l3=b}function qL(b,z){var Q=l3;try{return l3=b,z()}finally{l3=Q}}function BL(b,z){return b!==0&&b<z?b:z}function OL(b,z){return b===0||b>z?b:z}function rJ(b,z){return b!==0&&b<z}function L9(b){var z=Rb(b);if(!rJ(p6,z))return p6;if(!rJ(q7,z))return q7;if(xJ(z))return B7;return yQ}function dQ(b){var z=b.current.memoizedState;return z.isDehydrated}var N9;function LL(b){N9=b}function NL(b){N9(b)}var nJ;function vL(b){nJ=b}var v9;function WL(b){v9=b}var W9;function _L(b){W9=b}var _9;function PL(b){_9=b}var tJ=!1,aQ=[],u7=null,m7=null,g7=null,i3=new Map,x3=new Map,c7=[],RL=["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 FL(b){return RL.indexOf(b)>-1}function ML(b,z,Q,X,Z){return{blockedOn:b,domEventName:z,eventSystemFlags:Q,nativeEvent:Z,targetContainers:[X]}}function P9(b,z){switch(b){case"focusin":case"focusout":u7=null;break;case"dragenter":case"dragleave":m7=null;break;case"mouseover":case"mouseout":g7=null;break;case"pointerover":case"pointerout":{var Q=z.pointerId;i3.delete(Q);break}case"gotpointercapture":case"lostpointercapture":{var X=z.pointerId;x3.delete(X);break}}}function j3(b,z,Q,X,Z,J){if(b===null||b.nativeEvent!==J){var Y=ML(z,Q,X,Z,J);if(z!==null){var $=a7(z);if($!==null)nJ($)}return Y}b.eventSystemFlags|=X;var K=b.targetContainers;if(Z!==null&&K.indexOf(Z)===-1)K.push(Z);return b}function kL(b,z,Q,X,Z){switch(z){case"focusin":{var J=Z;return u7=j3(u7,b,z,Q,X,J),!0}case"dragenter":{var Y=Z;return m7=j3(m7,b,z,Q,X,Y),!0}case"mouseover":{var $=Z;return g7=j3(g7,b,z,Q,X,$),!0}case"pointerover":{var K=Z,O=K.pointerId;return i3.set(O,j3(i3.get(O)||null,b,z,Q,X,K)),!0}case"gotpointercapture":{var N=Z,T=N.pointerId;return x3.set(T,j3(x3.get(T)||null,b,z,Q,X,N)),!0}}return!1}function R9(b){var z=Ab(b.target);if(z!==null){var Q=Nb(z);if(Q!==null){var X=Q.tag;if(X===s){var Z=xG(Q);if(Z!==null){b.blockedOn=Z,_9(b.priority,function(){v9(Q)});return}}else if(X===w){var J=Q.stateNode;if(dQ(J)){b.blockedOn=jG(Q);return}}}}b.blockedOn=null}function AL(b){var z=W9(),Q={blockedOn:null,target:b,priority:z},X=0;for(;X<c7.length;X++)if(!rJ(z,c7[X].priority))break;if(c7.splice(X,0,Q),X===0)R9(Q)}function lQ(b){if(b.blockedOn!==null)return!1;var z=b.targetContainers;while(z.length>0){var Q=z[0],X=bH(b.domEventName,b.eventSystemFlags,Q,b.nativeEvent);if(X===null){var Z=b.nativeEvent,J=new Z.constructor(Z.type,Z);t2(J),Z.target.dispatchEvent(J),s2()}else{var Y=a7(X);if(Y!==null)nJ(Y);return b.blockedOn=X,!1}z.shift()}return!0}function F9(b,z,Q){if(lQ(b))Q.delete(z)}function wL(){if(tJ=!1,u7!==null&&lQ(u7))u7=null;if(m7!==null&&lQ(m7))m7=null;if(g7!==null&&lQ(g7))g7=null;i3.forEach(F9),x3.forEach(F9)}function o3(b,z){if(b.blockedOn===z){if(b.blockedOn=null,!tJ)tJ=!0,d1.unstable_scheduleCallback(d1.unstable_NormalPriority,wL)}}function p3(b){if(aQ.length>0){o3(aQ[0],b);for(var z=1;z<aQ.length;z++){var Q=aQ[z];if(Q.blockedOn===b)Q.blockedOn=null}}if(u7!==null)o3(u7,b);if(m7!==null)o3(m7,b);if(g7!==null)o3(g7,b);var X=function($){return o3($,b)};i3.forEach(X),x3.forEach(X);for(var Z=0;Z<c7.length;Z++){var J=c7[Z];if(J.blockedOn===b)J.blockedOn=null}while(c7.length>0){var Y=c7[0];if(Y.blockedOn!==null)break;else if(R9(Y),Y.blockedOn===null)c7.shift()}}var N8=H.ReactCurrentBatchConfig,sJ=!0;function M9(b){sJ=!!b}function IL(){return sJ}function fL(b,z,Q){var X=k9(z),Z;switch(X){case p6:Z=TL;break;case q7:Z=hL;break;case B7:default:Z=eJ;break}return Z.bind(null,z,Q,b)}function TL(b,z,Q,X){var Z=W5(),J=N8.transition;N8.transition=null;try{e4(p6),eJ(b,z,Q,X)}finally{e4(Z),N8.transition=J}}function hL(b,z,Q,X){var Z=W5(),J=N8.transition;N8.transition=null;try{e4(q7),eJ(b,z,Q,X)}finally{e4(Z),N8.transition=J}}function eJ(b,z,Q,X){if(!sJ)return;CL(b,z,Q,X)}function CL(b,z,Q,X){var Z=bH(b,z,Q,X);if(Z===null){OH(b,z,X,iQ,Q),P9(b,X);return}if(kL(Z,b,z,Q,X)){X.stopPropagation();return}if(P9(b,X),z&f3&&FL(b)){while(Z!==null){var J=a7(Z);if(J!==null)NL(J);var Y=bH(b,z,Q,X);if(Y===null)OH(b,z,X,iQ,Q);if(Y===Z)break;Z=Y}if(Z!==null)X.stopPropagation();return}OH(b,z,X,null,Q)}var iQ=null;function bH(b,z,Q,X){iQ=null;var Z=YJ(X),J=Ab(Z);if(J!==null){var Y=Nb(J);if(Y===null)J=null;else{var $=Y.tag;if($===s){var K=xG(Y);if(K!==null)return K;J=null}else if($===w){var O=Y.stateNode;if(dQ(O))return jG(Y);J=null}else if(Y!==J)J=null}}return iQ=J,null}function k9(b){switch(b){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 p6;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 q7;case"message":{var z=FO();switch(z){case SQ:return p6;case RJ:return q7;case vb:case MO:return B7;case FJ:return yQ;default:return B7}}default:return B7}}function SL(b,z,Q){return b.addEventListener(z,Q,!1),Q}function VL(b,z,Q){return b.addEventListener(z,Q,!0),Q}function DL(b,z,Q,X){return b.addEventListener(z,Q,{capture:!0,passive:X}),Q}function EL(b,z,Q,X){return b.addEventListener(z,Q,{passive:X}),Q}var r3=null,zH=null,n3=null;function uL(b){return r3=b,zH=w9(),!0}function mL(){r3=null,zH=null,n3=null}function A9(){if(n3)return n3;var b,z=zH,Q=z.length,X,Z=w9(),J=Z.length;for(b=0;b<Q;b++)if(z[b]!==Z[b])break;var Y=Q-b;for(X=1;X<=Y;X++)if(z[Q-X]!==Z[J-X])break;var $=X>1?1-X:void 0;return n3=Z.slice(b,$),n3}function w9(){if("value"in r3)return r3.value;return r3.textContent}function xQ(b){var z,Q=b.keyCode;if("charCode"in b){if(z=b.charCode,z===0&&Q===13)z=13}else z=Q;if(z===10)z=13;if(z>=32||z===13)return z;return 0}function jQ(){return!0}function I9(){return!1}function r6(b){function z(Q,X,Z,J,Y){this._reactName=Q,this._targetInst=Z,this.type=X,this.nativeEvent=J,this.target=Y,this.currentTarget=null;for(var $ in b){if(!b.hasOwnProperty($))continue;var K=b[$];if(K)this[$]=K(J);else this[$]=J[$]}var O=J.defaultPrevented!=null?J.defaultPrevented:J.returnValue===!1;if(O)this.isDefaultPrevented=jQ;else this.isDefaultPrevented=I9;return this.isPropagationStopped=I9,this}return Z1(z.prototype,{preventDefault:function(){this.defaultPrevented=!0;var Q=this.nativeEvent;if(!Q)return;if(Q.preventDefault)Q.preventDefault();else if(typeof Q.returnValue!=="unknown")Q.returnValue=!1;this.isDefaultPrevented=jQ},stopPropagation:function(){var Q=this.nativeEvent;if(!Q)return;if(Q.stopPropagation)Q.stopPropagation();else if(typeof Q.cancelBubble!=="unknown")Q.cancelBubble=!0;this.isPropagationStopped=jQ},persist:function(){},isPersistent:jQ}),z}var v8={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(b){return b.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},QH=r6(v8),t3=Z1({},v8,{view:0,detail:0}),gL=r6(t3),XH,ZH,s3;function cL(b){if(b!==s3){if(s3&&b.type==="mousemove")XH=b.screenX-s3.screenX,ZH=b.screenY-s3.screenY;else XH=0,ZH=0;s3=b}}var oQ=Z1({},t3,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:HH,button:0,buttons:0,relatedTarget:function(b){if(b.relatedTarget===void 0)return b.fromElement===b.srcElement?b.toElement:b.fromElement;return b.relatedTarget},movementX:function(b){if("movementX"in b)return b.movementX;return cL(b),XH},movementY:function(b){if("movementY"in b)return b.movementY;return ZH}}),f9=r6(oQ),yL=Z1({},oQ,{dataTransfer:0}),dL=r6(yL),aL=Z1({},t3,{relatedTarget:0}),JH=r6(aL),lL=Z1({},v8,{animationName:0,elapsedTime:0,pseudoElement:0}),iL=r6(lL),xL=Z1({},v8,{clipboardData:function(b){return"clipboardData"in b?b.clipboardData:window.clipboardData}}),jL=r6(xL),oL=Z1({},v8,{data:0}),T9=r6(oL),pL=T9,rL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nL={"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 tL(b){if(b.key){var z=rL[b.key]||b.key;if(z!=="Unidentified")return z}if(b.type==="keypress"){var Q=xQ(b);return Q===13?"Enter":String.fromCharCode(Q)}if(b.type==="keydown"||b.type==="keyup")return nL[b.keyCode]||"Unidentified";return""}var sL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eL(b){var z=this,Q=z.nativeEvent;if(Q.getModifierState)return Q.getModifierState(b);var X=sL[b];return X?!!Q[X]:!1}function HH(b){return eL}var bN=Z1({},t3,{key:tL,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:HH,charCode:function(b){if(b.type==="keypress")return xQ(b);return 0},keyCode:function(b){if(b.type==="keydown"||b.type==="keyup")return b.keyCode;return 0},which:function(b){if(b.type==="keypress")return xQ(b);if(b.type==="keydown"||b.type==="keyup")return b.keyCode;return 0}}),zN=r6(bN),QN=Z1({},oQ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),h9=r6(QN),XN=Z1({},t3,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:HH}),ZN=r6(XN),JN=Z1({},v8,{propertyName:0,elapsedTime:0,pseudoElement:0}),HN=r6(JN),YN=Z1({},oQ,{deltaX:function(b){return"deltaX"in b?b.deltaX:("wheelDeltaX"in b)?-b.wheelDeltaX:0},deltaY:function(b){return"deltaY"in b?b.deltaY:("wheelDeltaY"in b)?-b.wheelDeltaY:("wheelDelta"in b)?-b.wheelDelta:0},deltaZ:0,deltaMode:0}),$N=r6(YN),GN=[9,13,27,32],C9=229,YH=X4&&"CompositionEvent"in window,e3=null;if(X4&&"documentMode"in document)e3=document.documentMode;var KN=X4&&"TextEvent"in window&&!e3,S9=X4&&(!YH||e3&&e3>8&&e3<=11),V9=32,D9=String.fromCharCode(V9);function UN(){$4("onBeforeInput",["compositionend","keypress","textInput","paste"]),$4("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),$4("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),$4("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var E9=!1;function qN(b){return(b.ctrlKey||b.altKey||b.metaKey)&&!(b.ctrlKey&&b.altKey)}function BN(b){switch(b){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function ON(b,z){return b==="keydown"&&z.keyCode===C9}function u9(b,z){switch(b){case"keyup":return GN.indexOf(z.keyCode)!==-1;case"keydown":return z.keyCode!==C9;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m9(b){var z=b.detail;if(typeof z==="object"&&"data"in z)return z.data;return null}function g9(b){return b.locale==="ko"}var W8=!1;function LN(b,z,Q,X,Z){var J,Y;if(YH)J=BN(z);else if(!W8){if(ON(z,X))J="onCompositionStart"}else if(u9(z,X))J="onCompositionEnd";if(!J)return null;if(S9&&!g9(X)){if(!W8&&J==="onCompositionStart")W8=uL(Z);else if(J==="onCompositionEnd"){if(W8)Y=A9()}}var $=sQ(Q,J);if($.length>0){var K=new T9(J,z,null,X,Z);if(b.push({event:K,listeners:$}),Y)K.data=Y;else{var O=m9(X);if(O!==null)K.data=O}}}function NN(b,z){switch(b){case"compositionend":return m9(z);case"keypress":var Q=z.which;if(Q!==V9)return null;return E9=!0,D9;case"textInput":var X=z.data;if(X===D9&&E9)return null;return X;default:return null}}function vN(b,z){if(W8){if(b==="compositionend"||!YH&&u9(b,z)){var Q=A9();return mL(),W8=!1,Q}return null}switch(b){case"paste":return null;case"keypress":if(!qN(z)){if(z.char&&z.char.length>1)return z.char;else if(z.which)return String.fromCharCode(z.which)}return null;case"compositionend":return S9&&!g9(z)?null:z.data;default:return null}}function WN(b,z,Q,X,Z){var J;if(KN)J=NN(z,X);else J=vN(z,X);if(!J)return null;var Y=sQ(Q,"onBeforeInput");if(Y.length>0){var $=new pL("onBeforeInput","beforeinput",null,X,Z);b.push({event:$,listeners:Y}),$.data=J}}function _N(b,z,Q,X,Z,J,Y){LN(b,z,Q,X,Z),WN(b,z,Q,X,Z)}var PN={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 c9(b){var z=b&&b.nodeName&&b.nodeName.toLowerCase();if(z==="input")return!!PN[b.type];if(z==="textarea")return!0;return!1}function RN(b){if(!X4)return!1;var z="on"+b,Q=z in document;if(!Q){var X=document.createElement("div");X.setAttribute(z,"return;"),Q=typeof X[z]==="function"}return Q}function FN(){$4("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function y9(b,z,Q,X){mG(X);var Z=sQ(z,"onChange");if(Z.length>0){var J=new QH("onChange","change",null,Q,X);b.push({event:J,listeners:Z})}}var bz=null,zz=null;function MN(b){var z=b.nodeName&&b.nodeName.toLowerCase();return z==="select"||z==="input"&&b.type==="file"}function kN(b){var z=[];y9(z,zz,b,YJ(b)),dG(AN,z)}function AN(b){ZK(b,0)}function pQ(b){var z=k8(b);if(b8(z))return b}function wN(b,z){if(b==="change")return z}var d9=!1;if(X4)d9=RN("input")&&(!document.documentMode||document.documentMode>9);function IN(b,z){bz=b,zz=z,bz.attachEvent("onpropertychange",l9)}function a9(){if(!bz)return;bz.detachEvent("onpropertychange",l9),bz=null,zz=null}function l9(b){if(b.propertyName!=="value")return;if(pQ(zz))kN(b)}function fN(b,z,Q){if(b==="focusin")a9(),IN(z,Q);else if(b==="focusout")a9()}function TN(b,z){if(b==="selectionchange"||b==="keyup"||b==="keydown")return pQ(zz)}function hN(b){var z=b.nodeName;return z&&z.toLowerCase()==="input"&&(b.type==="checkbox"||b.type==="radio")}function CN(b,z){if(b==="click")return pQ(z)}function SN(b,z){if(b==="input"||b==="change")return pQ(z)}function VN(b){var z=b._wrapperState;if(!z||!z.controlled||b.type!=="number")return;p0(b,"number",b.value)}function DN(b,z,Q,X,Z,J,Y){var $=Q?k8(Q):window,K,O;if(MN($))K=wN;else if(c9($))if(d9)K=SN;else K=TN,O=fN;else if(hN($))K=CN;if(K){var N=K(z,Q);if(N){y9(b,N,X,Z);return}}if(O)O(z,$,Q);if(z==="focusout")VN($)}function EN(){D4("onMouseEnter",["mouseout","mouseover"]),D4("onMouseLeave",["mouseout","mouseover"]),D4("onPointerEnter",["pointerout","pointerover"]),D4("onPointerLeave",["pointerout","pointerover"])}function uN(b,z,Q,X,Z,J,Y){var $=z==="mouseover"||z==="pointerover",K=z==="mouseout"||z==="pointerout";if($&&!e2(X)){var O=X.relatedTarget||X.fromElement;if(O){if(Ab(O)||Nz(O))return}}if(!K&&!$)return;var N;if(Z.window===Z)N=Z;else{var T=Z.ownerDocument;if(T)N=T.defaultView||T.parentWindow;else N=window}var f,g;if(K){var c=X.relatedTarget||X.toElement;if(f=Q,g=c?Ab(c):null,g!==null){var a=Nb(g);if(g!==a||g.tag!==A&&g.tag!==F)g=null}}else f=null,g=Q;if(f===g)return;var N0=f9,m0="onMouseLeave",T0="onMouseEnter",$1="mouse";if(z==="pointerout"||z==="pointerover")N0=h9,m0="onPointerLeave",T0="onPointerEnter",$1="pointer";var G1=f==null?N:k8(f),S=g==null?N:k8(g),x=new N0(m0,$1+"leave",f,X,Z);x.target=G1,x.relatedTarget=S;var V=null,X0=Ab(Z);if(X0===Q){var R0=new N0(T0,$1+"enter",g,X,Z);R0.target=S,R0.relatedTarget=G1,V=R0}Hv(b,x,V,f,g)}function mN(b,z){return b===z&&(b!==0||1/b===1/z)||b!==b&&z!==z}var n6=typeof Object.is==="function"?Object.is:mN;function Qz(b,z){if(n6(b,z))return!0;if(typeof b!=="object"||b===null||typeof z!=="object"||z===null)return!1;var Q=Object.keys(b),X=Object.keys(z);if(Q.length!==X.length)return!1;for(var Z=0;Z<Q.length;Z++){var J=Q[Z];if(!E4.call(z,J)||!n6(b[J],z[J]))return!1}return!0}function i9(b){while(b&&b.firstChild)b=b.firstChild;return b}function gN(b){while(b){if(b.nextSibling)return b.nextSibling;b=b.parentNode}}function x9(b,z){var Q=i9(b),X=0,Z=0;while(Q){if(Q.nodeType===J7){if(Z=X+Q.textContent.length,X<=z&&Z>=z)return{node:Q,offset:z-X};X=Z}Q=i9(gN(Q))}}function cN(b){var z=b.ownerDocument,Q=z&&z.defaultView||window,X=Q.getSelection&&Q.getSelection();if(!X||X.rangeCount===0)return null;var{anchorNode:Z,anchorOffset:J,focusNode:Y,focusOffset:$}=X;try{Z.nodeType,Y.nodeType}catch(K){return null}return yN(b,Z,J,Y,$)}function yN(b,z,Q,X,Z){var J=0,Y=-1,$=-1,K=0,O=0,N=b,T=null;b:while(!0){var f=null;while(!0){if(N===z&&(Q===0||N.nodeType===J7))Y=J+Q;if(N===X&&(Z===0||N.nodeType===J7))$=J+Z;if(N.nodeType===J7)J+=N.nodeValue.length;if((f=N.firstChild)===null)break;T=N,N=f}while(!0){if(N===b)break b;if(T===z&&++K===Q)Y=J;if(T===X&&++O===Z)$=J;if((f=N.nextSibling)!==null)break;N=T,T=N.parentNode}N=f}if(Y===-1||$===-1)return null;return{start:Y,end:$}}function dN(b,z){var Q=b.ownerDocument||document,X=Q&&Q.defaultView||window;if(!X.getSelection)return;var Z=X.getSelection(),J=b.textContent.length,Y=Math.min(z.start,J),$=z.end===void 0?Y:Math.min(z.end,J);if(!Z.extend&&Y>$){var K=$;$=Y,Y=K}var O=x9(b,Y),N=x9(b,$);if(O&&N){if(Z.rangeCount===1&&Z.anchorNode===O.node&&Z.anchorOffset===O.offset&&Z.focusNode===N.node&&Z.focusOffset===N.offset)return;var T=Q.createRange();if(T.setStart(O.node,O.offset),Z.removeAllRanges(),Y>$)Z.addRange(T),Z.extend(N.node,N.offset);else T.setEnd(N.node,N.offset),Z.addRange(T)}}function j9(b){return b&&b.nodeType===J7}function o9(b,z){if(!b||!z)return!1;else if(b===z)return!0;else if(j9(b))return!1;else if(j9(z))return o9(b,z.parentNode);else if("contains"in b)return b.contains(z);else if(b.compareDocumentPosition)return!!(b.compareDocumentPosition(z)&16);else return!1}function aN(b){return b&&b.ownerDocument&&o9(b.ownerDocument.documentElement,b)}function lN(b){try{return typeof b.contentWindow.location.href==="string"}catch(z){return!1}}function p9(){var b=window,z=D7();while(z instanceof b.HTMLIFrameElement){if(lN(z))b=z.contentWindow;else return z;z=D7(b.document)}return z}function $H(b){var z=b&&b.nodeName&&b.nodeName.toLowerCase();return z&&(z==="input"&&(b.type==="text"||b.type==="search"||b.type==="tel"||b.type==="url"||b.type==="password")||z==="textarea"||b.contentEditable==="true")}function iN(){var b=p9();return{focusedElem:b,selectionRange:$H(b)?jN(b):null}}function xN(b){var z=p9(),Q=b.focusedElem,X=b.selectionRange;if(z!==Q&&aN(Q)){if(X!==null&&$H(Q))oN(Q,X);var Z=[],J=Q;while(J=J.parentNode)if(J.nodeType===m6)Z.push({element:J,left:J.scrollLeft,top:J.scrollTop});if(typeof Q.focus==="function")Q.focus();for(var Y=0;Y<Z.length;Y++){var $=Z[Y];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}}function jN(b){var z;if("selectionStart"in b)z={start:b.selectionStart,end:b.selectionEnd};else z=cN(b);return z||{start:0,end:0}}function oN(b,z){var{start:Q,end:X}=z;if(X===void 0)X=Q;if("selectionStart"in b)b.selectionStart=Q,b.selectionEnd=Math.min(X,b.value.length);else dN(b,z)}var pN=X4&&"documentMode"in document&&document.documentMode<=11;function rN(){$4("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var _8=null,GH=null,Xz=null,KH=!1;function nN(b){if("selectionStart"in b&&$H(b))return{start:b.selectionStart,end:b.selectionEnd};else{var z=b.ownerDocument&&b.ownerDocument.defaultView||window,Q=z.getSelection();return{anchorNode:Q.anchorNode,anchorOffset:Q.anchorOffset,focusNode:Q.focusNode,focusOffset:Q.focusOffset}}}function tN(b){return b.window===b?b.document:b.nodeType===H7?b:b.ownerDocument}function r9(b,z,Q){var X=tN(Q);if(KH||_8==null||_8!==D7(X))return;var Z=nN(_8);if(!Xz||!Qz(Xz,Z)){Xz=Z;var J=sQ(GH,"onSelect");if(J.length>0){var Y=new QH("onSelect","select",null,z,Q);b.push({event:Y,listeners:J}),Y.target=_8}}}function sN(b,z,Q,X,Z,J,Y){var $=Q?k8(Q):window;switch(z){case"focusin":if(c9($)||$.contentEditable==="true")_8=$,GH=Q,Xz=null;break;case"focusout":_8=null,GH=null,Xz=null;break;case"mousedown":KH=!0;break;case"contextmenu":case"mouseup":case"dragend":KH=!1,r9(b,X,Z);break;case"selectionchange":if(pN)break;case"keydown":case"keyup":r9(b,X,Z)}}function rQ(b,z){var Q={};return Q[b.toLowerCase()]=z.toLowerCase(),Q["Webkit"+b]="webkit"+z,Q["Moz"+b]="moz"+z,Q}var P8={animationend:rQ("Animation","AnimationEnd"),animationiteration:rQ("Animation","AnimationIteration"),animationstart:rQ("Animation","AnimationStart"),transitionend:rQ("Transition","TransitionEnd")},UH={},n9={};if(X4){if(n9=document.createElement("div").style,!("AnimationEvent"in window))delete P8.animationend.animation,delete P8.animationiteration.animation,delete P8.animationstart.animation;if(!("TransitionEvent"in window))delete P8.transitionend.transition}function nQ(b){if(UH[b])return UH[b];else if(!P8[b])return b;var z=P8[b];for(var Q in z)if(z.hasOwnProperty(Q)&&Q in n9)return UH[b]=z[Q];return b}var t9=nQ("animationend"),s9=nQ("animationiteration"),e9=nQ("animationstart"),bK=nQ("transitionend"),zK=new Map,QK=["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 y7(b,z){zK.set(b,z),$4(z,[b])}function eN(){for(var b=0;b<QK.length;b++){var z=QK[b],Q=z.toLowerCase(),X=z[0].toUpperCase()+z.slice(1);y7(Q,"on"+X)}y7(t9,"onAnimationEnd"),y7(s9,"onAnimationIteration"),y7(e9,"onAnimationStart"),y7("dblclick","onDoubleClick"),y7("focusin","onFocus"),y7("focusout","onBlur"),y7(bK,"onTransitionEnd")}function bv(b,z,Q,X,Z,J,Y){var $=zK.get(z);if($===void 0)return;var K=QH,O=z;switch(z){case"keypress":if(xQ(X)===0)return;case"keydown":case"keyup":K=zN;break;case"focusin":O="focus",K=JH;break;case"focusout":O="blur",K=JH;break;case"beforeblur":case"afterblur":K=JH;break;case"click":if(X.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=f9;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=dL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=ZN;break;case t9:case s9:case e9:K=iL;break;case bK:K=HN;break;case"scroll":K=gL;break;case"wheel":K=$N;break;case"copy":case"cut":case"paste":K=jL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=h9;break}var N=(J&f3)!==0;{var T=!N&&z==="scroll",f=Zv(Q,$,X.type,N,T);if(f.length>0){var g=new K($,O,null,X,Z);b.push({event:g,listeners:f})}}}eN(),EN(),FN(),rN(),UN();function zv(b,z,Q,X,Z,J,Y){bv(b,z,Q,X,Z,J);var $=(J&n2)===0;if($)uN(b,z,Q,X,Z),DN(b,z,Q,X,Z),sN(b,z,Q,X,Z),_N(b,z,Q,X,Z)}var Zz=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],qH=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Zz));function XK(b,z,Q){var X=b.type||"unknown-event";b.currentTarget=Q,$O(X,z,void 0,b),b.currentTarget=null}function Qv(b,z,Q){var X;if(Q)for(var Z=z.length-1;Z>=0;Z--){var J=z[Z],Y=J.instance,$=J.currentTarget,K=J.listener;if(Y!==X&&b.isPropagationStopped())return;XK(b,K,$),X=Y}else for(var O=0;O<z.length;O++){var N=z[O],T=N.instance,f=N.currentTarget,g=N.listener;if(T!==X&&b.isPropagationStopped())return;XK(b,g,f),X=T}}function ZK(b,z){var Q=(z&f3)!==0;for(var X=0;X<b.length;X++){var Z=b[X],J=Z.event,Y=Z.listeners;Qv(J,Y,Q)}GO()}function Xv(b,z,Q,X,Z){var J=YJ(Q),Y=[];zv(Y,b,X,Q,J,z),ZK(Y,z)}function q4(b,z){if(!qH.has(b))G('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',b);var Q=!1,X=VW(z),Z=Yv(b,Q);if(!X.has(Z))JK(z,b,HJ,Q),X.add(Z)}function BH(b,z,Q){if(qH.has(b)&&!z)G('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',b);var X=0;if(z)X|=f3;JK(Q,b,X,z)}var tQ="_reactListening"+Math.random().toString(36).slice(2);function Jz(b){if(!b[tQ]){b[tQ]=!0,W4.forEach(function(Q){if(Q!=="selectionchange"){if(!qH.has(Q))BH(Q,!1,b);BH(Q,!0,b)}});var z=b.nodeType===H7?b:b.ownerDocument;if(z!==null){if(!z[tQ])z[tQ]=!0,BH("selectionchange",!1,z)}}}function JK(b,z,Q,X,Z){var J=fL(b,z,Q),Y=void 0;if(KJ){if(z==="touchstart"||z==="touchmove"||z==="wheel")Y=!0}b=b;var $;if(X)if(Y!==void 0)$=DL(b,z,J,Y);else $=VL(b,z,J);else if(Y!==void 0)$=EL(b,z,J,Y);else $=SL(b,z,J)}function HK(b,z){return b===z||b.nodeType===C4&&b.parentNode===z}function OH(b,z,Q,X,Z){var J=X;if((z&EG)===0&&(z&HJ)===0){var Y=Z;if(X!==null){var $=X;b:while(!0){if($===null)return;var K=$.tag;if(K===w||K===P){var O=$.stateNode.containerInfo;if(HK(O,Y))break;if(K===P){var N=$.return;while(N!==null){var T=N.tag;if(T===w||T===P){var f=N.stateNode.containerInfo;if(HK(f,Y))return}N=N.return}}while(O!==null){var g=Ab(O);if(g===null)return;var c=g.tag;if(c===A||c===F){$=J=g;continue b}O=O.parentNode}}$=$.return}}}dG(function(){return Xv(b,z,Q,J)})}function Hz(b,z,Q){return{instance:b,listener:z,currentTarget:Q}}function Zv(b,z,Q,X,Z,J){var Y=z!==null?z+"Capture":null,$=X?Y:z,K=[],O=b,N=null;while(O!==null){var T=O,f=T.stateNode,g=T.tag;if(g===A&&f!==null){if(N=f,$!==null){var c=h3(O,$);if(c!=null)K.push(Hz(O,c,N))}}if(Z)break;O=O.return}return K}function sQ(b,z){var Q=z+"Capture",X=[],Z=b;while(Z!==null){var J=Z,Y=J.stateNode,$=J.tag;if($===A&&Y!==null){var K=Y,O=h3(Z,Q);if(O!=null)X.unshift(Hz(Z,O,K));var N=h3(Z,z);if(N!=null)X.push(Hz(Z,N,K))}Z=Z.return}return X}function R8(b){if(b===null)return null;do b=b.return;while(b&&b.tag!==A);if(b)return b;return null}function Jv(b,z){var Q=b,X=z,Z=0;for(var J=Q;J;J=R8(J))Z++;var Y=0;for(var $=X;$;$=R8($))Y++;while(Z-Y>0)Q=R8(Q),Z--;while(Y-Z>0)X=R8(X),Y--;var K=Z;while(K--){if(Q===X||X!==null&&Q===X.alternate)return Q;Q=R8(Q),X=R8(X)}return null}function YK(b,z,Q,X,Z){var J=z._reactName,Y=[],$=Q;while($!==null){if($===X)break;var K=$,O=K.alternate,N=K.stateNode,T=K.tag;if(O!==null&&O===X)break;if(T===A&&N!==null){var f=N;if(Z){var g=h3($,J);if(g!=null)Y.unshift(Hz($,g,f))}else if(!Z){var c=h3($,J);if(c!=null)Y.push(Hz($,c,f))}}$=$.return}if(Y.length!==0)b.push({event:z,listeners:Y})}function Hv(b,z,Q,X,Z){var J=X&&Z?Jv(X,Z):null;if(X!==null)YK(b,z,X,J,!1);if(Z!==null&&Q!==null)YK(b,Q,Z,J,!0)}function Yv(b,z){return b+"__"+(z?"capture":"bubble")}var g6=!1,Yz="dangerouslySetInnerHTML",eQ="suppressContentEditableWarning",d7="suppressHydrationWarning",$K="autoFocus",Mb="children",kb="style",bX="__html",LH,zX,$z,GK,QX,KK,UK;LH={dialog:!0,webview:!0},zX=function(b,z){l2(b,z),i2(b,z),r2(b,z,{registrationNameDependencies:a1,possibleRegistrationNames:i1})},KK=X4&&!document.documentMode,$z=function(b,z,Q){if(g6)return;var X=XX(Q),Z=XX(z);if(Z===X)return;g6=!0,G("Prop `%s` did not match. Server: %s Client: %s",b,JSON.stringify(Z),JSON.stringify(X))},GK=function(b){if(g6)return;g6=!0;var z=[];b.forEach(function(Q){z.push(Q)}),G("Extra attributes from the server: %s",z)},QX=function(b,z){if(z===!1)G("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.",b,b,b);else G("Expected `%s` listener to be a function, instead got a value of `%s` type.",b,typeof z)},UK=function(b,z){var Q=b.namespaceURI===Z7?b.ownerDocument.createElement(b.tagName):b.ownerDocument.createElementNS(b.namespaceURI,b.tagName);return Q.innerHTML=z,Q.innerHTML};var $v=/\r\n?/g,Gv=/\u0000|\uFFFD/g;function XX(b){B5(b);var z=typeof b==="string"?b:""+b;return z.replace($v,`
|
|
32
|
+
`).replace(Gv,"")}function ZX(b,z,Q,X){var Z=XX(z),J=XX(b);if(J===Z)return;if(X){if(!g6)g6=!0,G('Text content did not match. Server: "%s" Client: "%s"',J,Z)}if(Q&&C0)throw Error("Text content does not match server-rendered HTML.")}function qK(b){return b.nodeType===H7?b:b.ownerDocument}function Kv(){}function JX(b){b.onclick=Kv}function Uv(b,z,Q,X,Z){for(var J in X){if(!X.hasOwnProperty(J))continue;var Y=X[J];if(J===kb){if(Y)Object.freeze(Y);TG(z,Y)}else if(J===Yz){var $=Y?Y[bX]:void 0;if($!=null)kG(z,$)}else if(J===Mb){if(typeof Y==="string"){var K=b!=="textarea"||Y!=="";if(K)wQ(z,Y)}else if(typeof Y==="number")wQ(z,""+Y)}else if(J===eQ||J===d7);else if(J===$K);else if(a1.hasOwnProperty(J)){if(Y!=null){if(typeof Y!=="function")QX(J,Y);if(J==="onScroll")q4("scroll",z)}}else if(Y!=null)K1(z,J,Y,Z)}}function qv(b,z,Q,X){for(var Z=0;Z<z.length;Z+=2){var J=z[Z],Y=z[Z+1];if(J===kb)TG(b,Y);else if(J===Yz)kG(b,Y);else if(J===Mb)wQ(b,Y);else K1(b,J,Y,X)}}function Bv(b,z,Q,X){var Z,J=qK(Q),Y,$=X;if($===Z7)$=bJ(b);if($===Z7){if(Z=Ub(b,z),!Z&&b!==b.toLowerCase())G("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",b);if(b==="script"){var K=J.createElement("div");K.innerHTML="<script></script>";var O=K.firstChild;Y=K.removeChild(O)}else if(typeof z.is==="string")Y=J.createElement(b,{is:z.is});else if(Y=J.createElement(b),b==="select"){var N=Y;if(z.multiple)N.multiple=!0;else if(z.size)N.size=z.size}}else Y=J.createElementNS($,b);if($===Z7){if(!Z&&Object.prototype.toString.call(Y)==="[object HTMLUnknownElement]"&&!E4.call(LH,b))LH[b]=!0,G("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",b)}return Y}function Ov(b,z){return qK(z).createTextNode(b)}function Lv(b,z,Q,X){var Z=Ub(z,Q);zX(z,Q);var J;switch(z){case"dialog":q4("cancel",b),q4("close",b),J=Q;break;case"iframe":case"object":case"embed":q4("load",b),J=Q;break;case"video":case"audio":for(var Y=0;Y<Zz.length;Y++)q4(Zz[Y],b);J=Q;break;case"source":q4("error",b),J=Q;break;case"img":case"image":case"link":q4("error",b),q4("load",b),J=Q;break;case"details":q4("toggle",b),J=Q;break;case"input":k(b,Q),J=q(b,Q),q4("invalid",b);break;case"option":s1(b,Q),J=Q;break;case"select":w3(b,Q),J=A3(b,Q),q4("invalid",b);break;case"textarea":RG(b,Q),J=sZ(b,Q),q4("invalid",b);break;default:J=Q}switch(JJ(z,J),Uv(z,b,X,J,Z),z){case"input":Q7(b),Y0(b,Q,!1);break;case"textarea":Q7(b),MG(b);break;case"option":U4(b,Q);break;case"select":tZ(b,Q);break;default:if(typeof J.onClick==="function")JX(b);break}}function Nv(b,z,Q,X,Z){zX(z,X);var J=null,Y,$;switch(z){case"input":Y=q(b,Q),$=q(b,X),J=[];break;case"select":Y=A3(b,Q),$=A3(b,X),J=[];break;case"textarea":Y=sZ(b,Q),$=sZ(b,X),J=[];break;default:if(Y=Q,$=X,typeof Y.onClick!=="function"&&typeof $.onClick==="function")JX(b);break}JJ(z,$);var K,O,N=null;for(K in Y){if($.hasOwnProperty(K)||!Y.hasOwnProperty(K)||Y[K]==null)continue;if(K===kb){var T=Y[K];for(O in T)if(T.hasOwnProperty(O)){if(!N)N={};N[O]=""}}else if(K===Yz||K===Mb);else if(K===eQ||K===d7);else if(K===$K);else if(a1.hasOwnProperty(K)){if(!J)J=[]}else(J=J||[]).push(K,null)}for(K in $){var f=$[K],g=Y!=null?Y[K]:void 0;if(!$.hasOwnProperty(K)||f===g||f==null&&g==null)continue;if(K===kb){if(f)Object.freeze(f);if(g){for(O in g)if(g.hasOwnProperty(O)&&(!f||!f.hasOwnProperty(O))){if(!N)N={};N[O]=""}for(O in f)if(f.hasOwnProperty(O)&&g[O]!==f[O]){if(!N)N={};N[O]=f[O]}}else{if(!N){if(!J)J=[];J.push(K,N)}N=f}}else if(K===Yz){var c=f?f[bX]:void 0,a=g?g[bX]:void 0;if(c!=null){if(a!==c)(J=J||[]).push(K,c)}}else if(K===Mb){if(typeof f==="string"||typeof f==="number")(J=J||[]).push(K,""+f)}else if(K===eQ||K===d7);else if(a1.hasOwnProperty(K)){if(f!=null){if(typeof f!=="function")QX(K,f);if(K==="onScroll")q4("scroll",b)}if(!J&&g!==f)J=[]}else(J=J||[]).push(K,f)}if(N)E2(N,$[kb]),(J=J||[]).push(kb,N);return J}function vv(b,z,Q,X,Z){if(Q==="input"&&Z.type==="radio"&&Z.name!=null)m(b,Z);var J=Ub(Q,X),Y=Ub(Q,Z);switch(qv(b,z,J,Y),Q){case"input":l(b,Z);break;case"textarea":FG(b,Z);break;case"select":q2(b,Z);break}}function Wv(b){{var z=b.toLowerCase();if(!IQ.hasOwnProperty(z))return null;return IQ[z]||null}}function _v(b,z,Q,X,Z,J,Y){var $,K;switch($=Ub(z,Q),zX(z,Q),z){case"dialog":q4("cancel",b),q4("close",b);break;case"iframe":case"object":case"embed":q4("load",b);break;case"video":case"audio":for(var O=0;O<Zz.length;O++)q4(Zz[O],b);break;case"source":q4("error",b);break;case"img":case"image":case"link":q4("error",b),q4("load",b);break;case"details":q4("toggle",b);break;case"input":k(b,Q),q4("invalid",b);break;case"option":s1(b,Q);break;case"select":w3(b,Q),q4("invalid",b);break;case"textarea":RG(b,Q),q4("invalid",b);break}JJ(z,Q);{K=new Set;var N=b.attributes;for(var T=0;T<N.length;T++){var f=N[T].name.toLowerCase();switch(f){case"value":break;case"checked":break;case"selected":break;default:K.add(N[T].name)}}}var g=null;for(var c in Q){if(!Q.hasOwnProperty(c))continue;var a=Q[c];if(c===Mb){if(typeof a==="string"){if(b.textContent!==a){if(Q[d7]!==!0)ZX(b.textContent,a,J,Y);g=[Mb,a]}}else if(typeof a==="number"){if(b.textContent!==""+a){if(Q[d7]!==!0)ZX(b.textContent,a,J,Y);g=[Mb,""+a]}}}else if(a1.hasOwnProperty(c)){if(a!=null){if(typeof a!=="function")QX(c,a);if(c==="onScroll")q4("scroll",b)}}else if(Y&&!0&&typeof $==="boolean"){var N0=void 0,m0=$&&Y1?null:I4(c);if(Q[d7]===!0);else if(c===eQ||c===d7||c==="value"||c==="checked"||c==="selected");else if(c===Yz){var T0=b.innerHTML,$1=a?a[bX]:void 0;if($1!=null){var G1=UK(b,$1);if(G1!==T0)$z(c,T0,G1)}}else if(c===kb){if(K.delete(c),KK){var S=V2(a);if(N0=b.getAttribute("style"),S!==N0)$z(c,N0,S)}}else if($&&!Y1){if(K.delete(c.toLowerCase()),N0=L5(b,c,a),a!==N0)$z(c,N0,a)}else if(!S1(c,m0,$)&&!l1(c,a,m0,$)){var x=!1;if(m0!==null)K.delete(m0.attributeName),N0=W6(b,c,a,m0);else{var V=X;if(V===Z7)V=bJ(z);if(V===Z7)K.delete(c.toLowerCase());else{var X0=Wv(c);if(X0!==null&&X0!==c)x=!0,K.delete(X0);K.delete(c)}N0=L5(b,c,a)}var R0=Y1;if(!R0&&a!==N0&&!x)$z(c,N0,a)}}}if(Y){if(K.size>0&&Q[d7]!==!0)GK(K)}switch(z){case"input":Q7(b),Y0(b,Q,!0);break;case"textarea":Q7(b),MG(b);break;case"select":case"option":break;default:if(typeof Q.onClick==="function")JX(b);break}return g}function Pv(b,z,Q){var X=b.nodeValue!==z;return X}function NH(b,z){{if(g6)return;g6=!0,G("Did not expect server HTML to contain a <%s> in <%s>.",z.nodeName.toLowerCase(),b.nodeName.toLowerCase())}}function vH(b,z){{if(g6)return;g6=!0,G('Did not expect server HTML to contain the text node "%s" in <%s>.',z.nodeValue,b.nodeName.toLowerCase())}}function WH(b,z,Q){{if(g6)return;g6=!0,G("Expected server HTML to contain a matching <%s> in <%s>.",z,b.nodeName.toLowerCase())}}function _H(b,z){{if(z==="")return;if(g6)return;g6=!0,G('Expected server HTML to contain a matching text node for "%s" in <%s>.',z,b.nodeName.toLowerCase())}}function Rv(b,z,Q){switch(z){case"input":x0(b,Q);return;case"textarea":O2(b,Q);return;case"select":B2(b,Q);return}}var Gz=function(){},Kz=function(){};{var Fv=["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"],BK=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Mv=BK.concat(["button"]),kv=["dd","dt","li","option","optgroup","p","rp","rt"],OK={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Kz=function(b,z){var Q=Z1({},b||OK),X={tag:z};if(BK.indexOf(z)!==-1)Q.aTagInScope=null,Q.buttonTagInScope=null,Q.nobrTagInScope=null;if(Mv.indexOf(z)!==-1)Q.pTagInButtonScope=null;if(Fv.indexOf(z)!==-1&&z!=="address"&&z!=="div"&&z!=="p")Q.listItemTagAutoclosing=null,Q.dlItemTagAutoclosing=null;if(Q.current=X,z==="form")Q.formTag=X;if(z==="a")Q.aTagInScope=X;if(z==="button")Q.buttonTagInScope=X;if(z==="nobr")Q.nobrTagInScope=X;if(z==="p")Q.pTagInButtonScope=X;if(z==="li")Q.listItemTagAutoclosing=X;if(z==="dd"||z==="dt")Q.dlItemTagAutoclosing=X;return Q};var Av=function(b,z){switch(z){case"select":return b==="option"||b==="optgroup"||b==="#text";case"optgroup":return b==="option"||b==="#text";case"option":return b==="#text";case"tr":return b==="th"||b==="td"||b==="style"||b==="script"||b==="template";case"tbody":case"thead":case"tfoot":return b==="tr"||b==="style"||b==="script"||b==="template";case"colgroup":return b==="col"||b==="template";case"table":return b==="caption"||b==="colgroup"||b==="tbody"||b==="tfoot"||b==="thead"||b==="style"||b==="script"||b==="template";case"head":return b==="base"||b==="basefont"||b==="bgsound"||b==="link"||b==="meta"||b==="title"||b==="noscript"||b==="noframes"||b==="style"||b==="script"||b==="template";case"html":return b==="head"||b==="body"||b==="frameset";case"frameset":return b==="frame";case"#document":return b==="html"}switch(b){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return z!=="h1"&&z!=="h2"&&z!=="h3"&&z!=="h4"&&z!=="h5"&&z!=="h6";case"rp":case"rt":return kv.indexOf(z)===-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 z==null}return!0},wv=function(b,z){switch(b){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 z.pTagInButtonScope;case"form":return z.formTag||z.pTagInButtonScope;case"li":return z.listItemTagAutoclosing;case"dd":case"dt":return z.dlItemTagAutoclosing;case"button":return z.buttonTagInScope;case"a":return z.aTagInScope;case"nobr":return z.nobrTagInScope}return null},LK={};Gz=function(b,z,Q){Q=Q||OK;var X=Q.current,Z=X&&X.tag;if(z!=null){if(b!=null)G("validateDOMNesting: when childText is passed, childTag should be null");b="#text"}var J=Av(b,Z)?null:X,Y=J?null:wv(b,Q),$=J||Y;if(!$)return;var K=$.tag,O=!!J+"|"+b+"|"+K;if(LK[O])return;LK[O]=!0;var N=b,T="";if(b==="#text")if(/\S/.test(z))N="Text nodes";else N="Whitespace text nodes",T=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else N="<"+b+">";if(J){var f="";if(K==="table"&&b==="tr")f+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";G("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",N,K,T,f)}else G("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",N,K)}}var HX="suppressHydrationWarning",YX="$",$X="/$",Uz="$?",qz="$!",Iv="style",PH=null,RH=null;function fv(b){var z,Q,X=b.nodeType;switch(X){case H7:case QJ:{z=X===H7?"#document":"#fragment";var Z=b.documentElement;Q=Z?Z.namespaceURI:zJ(null,"");break}default:{var J=X===C4?b.parentNode:b,Y=J.namespaceURI||null;z=J.tagName,Q=zJ(Y,z);break}}{var $=z.toLowerCase(),K=Kz(null,$);return{namespace:Q,ancestorInfo:K}}}function Tv(b,z,Q){{var X=b,Z=zJ(X.namespace,z),J=Kz(X.ancestorInfo,z);return{namespace:Z,ancestorInfo:J}}}function FH(b){return b}function hv(b){PH=IL(),RH=iN();var z=null;return M9(!1),z}function Cv(b){xN(RH),M9(PH),PH=null,RH=null}function Sv(b,z,Q,X,Z){var J;{var Y=X;if(Gz(b,null,Y.ancestorInfo),typeof z.children==="string"||typeof z.children==="number"){var $=""+z.children,K=Kz(Y.ancestorInfo,b);Gz(null,$,K)}J=Y.namespace}var O=Bv(b,z,Q,J);return Lz(Z,O),hH(O,z),O}function Vv(b,z){b.appendChild(z)}function Dv(b,z,Q,X,Z){switch(Lv(b,z,Q,X),z){case"button":case"input":case"select":case"textarea":return!!Q.autoFocus;case"img":return!0;default:return!1}}function Ev(b,z,Q,X,Z,J){{var Y=J;if(typeof X.children!==typeof Q.children&&(typeof X.children==="string"||typeof X.children==="number")){var $=""+X.children,K=Kz(Y.ancestorInfo,z);Gz(null,$,K)}}return Nv(b,z,Q,X)}function MH(b,z){return b==="textarea"||b==="noscript"||typeof z.children==="string"||typeof z.children==="number"||typeof z.dangerouslySetInnerHTML==="object"&&z.dangerouslySetInnerHTML!==null&&z.dangerouslySetInnerHTML.__html!=null}function uv(b,z,Q,X){{var Z=Q;Gz(null,b,Z.ancestorInfo)}var J=Ov(b,z);return Lz(X,J),J}function mv(){var b=window.event;if(b===void 0)return B7;return k9(b.type)}var kH=typeof setTimeout==="function"?setTimeout:void 0,gv=typeof clearTimeout==="function"?clearTimeout:void 0,AH=-1,NK=typeof Promise==="function"?Promise:void 0,cv=typeof queueMicrotask==="function"?queueMicrotask:typeof NK<"u"?function(b){return NK.resolve(null).then(b).catch(yv)}:kH;function yv(b){setTimeout(function(){throw b})}function dv(b,z,Q,X){switch(z){case"button":case"input":case"select":case"textarea":if(Q.autoFocus)b.focus();return;case"img":{if(Q.src)b.src=Q.src;return}}}function av(b,z,Q,X,Z,J){vv(b,z,Q,X,Z),hH(b,Z)}function vK(b){wQ(b,"")}function lv(b,z,Q){b.nodeValue=Q}function iv(b,z){b.appendChild(z)}function xv(b,z){var Q;if(b.nodeType===C4)Q=b.parentNode,Q.insertBefore(z,b);else Q=b,Q.appendChild(z);var X=b._reactRootContainer;if((X===null||X===void 0)&&Q.onclick===null)JX(Q)}function jv(b,z,Q){b.insertBefore(z,Q)}function ov(b,z,Q){if(b.nodeType===C4)b.parentNode.insertBefore(z,Q);else b.insertBefore(z,Q)}function pv(b,z){b.removeChild(z)}function rv(b,z){if(b.nodeType===C4)b.parentNode.removeChild(z);else b.removeChild(z)}function wH(b,z){var Q=z,X=0;do{var Z=Q.nextSibling;if(b.removeChild(Q),Z&&Z.nodeType===C4){var J=Z.data;if(J===$X)if(X===0){b.removeChild(Z),p3(z);return}else X--;else if(J===YX||J===Uz||J===qz)X++}Q=Z}while(Q);p3(z)}function nv(b,z){if(b.nodeType===C4)wH(b.parentNode,z);else if(b.nodeType===m6)wH(b,z);p3(b)}function tv(b){b=b;var z=b.style;if(typeof z.setProperty==="function")z.setProperty("display","none","important");else z.display="none"}function sv(b){b.nodeValue=""}function ev(b,z){b=b;var Q=z[Iv],X=Q!==void 0&&Q!==null&&Q.hasOwnProperty("display")?Q.display:null;b.style.display=XJ("display",X)}function bW(b,z){b.nodeValue=z}function zW(b){if(b.nodeType===m6)b.textContent="";else if(b.nodeType===H7){if(b.documentElement)b.removeChild(b.documentElement)}}function QW(b,z,Q){if(b.nodeType!==m6||z.toLowerCase()!==b.nodeName.toLowerCase())return null;return b}function XW(b,z){if(z===""||b.nodeType!==J7)return null;return b}function ZW(b){if(b.nodeType!==C4)return null;return b}function WK(b){return b.data===Uz}function IH(b){return b.data===qz}function JW(b){var z=b.nextSibling&&b.nextSibling.dataset,Q,X,Z;if(z)Q=z.dgst,X=z.msg,Z=z.stck;return{message:X,digest:Q,stack:Z}}function HW(b,z){b._reactRetry=z}function GX(b){for(;b!=null;b=b.nextSibling){var z=b.nodeType;if(z===m6||z===J7)break;if(z===C4){var Q=b.data;if(Q===YX||Q===qz||Q===Uz)break;if(Q===$X)return null}}return b}function Bz(b){return GX(b.nextSibling)}function YW(b){return GX(b.firstChild)}function $W(b){return GX(b.firstChild)}function GW(b){return GX(b.nextSibling)}function KW(b,z,Q,X,Z,J,Y){Lz(J,b),hH(b,Q);var $;{var K=Z;$=K.namespace}var O=(J.mode&B1)!==d0;return _v(b,z,Q,$,X,O,Y)}function UW(b,z,Q,X){Lz(Q,b);var Z=(Q.mode&B1)!==d0;return Pv(b,z)}function qW(b,z){Lz(z,b)}function BW(b){var z=b.nextSibling,Q=0;while(z){if(z.nodeType===C4){var X=z.data;if(X===$X)if(Q===0)return Bz(z);else Q--;else if(X===YX||X===qz||X===Uz)Q++}z=z.nextSibling}return null}function _K(b){var z=b.previousSibling,Q=0;while(z){if(z.nodeType===C4){var X=z.data;if(X===YX||X===qz||X===Uz)if(Q===0)return z;else Q--;else if(X===$X)Q++}z=z.previousSibling}return null}function OW(b){p3(b)}function LW(b){p3(b)}function NW(b){return b!=="head"&&b!=="body"}function vW(b,z,Q,X){var Z=!0;ZX(z.nodeValue,Q,X,Z)}function WW(b,z,Q,X,Z,J){if(z[HX]!==!0){var Y=!0;ZX(X.nodeValue,Z,J,Y)}}function _W(b,z){if(z.nodeType===m6)NH(b,z);else if(z.nodeType===C4);else vH(b,z)}function PW(b,z){{var Q=b.parentNode;if(Q!==null)if(z.nodeType===m6)NH(Q,z);else if(z.nodeType===C4);else vH(Q,z)}}function RW(b,z,Q,X,Z){if(Z||z[HX]!==!0)if(X.nodeType===m6)NH(Q,X);else if(X.nodeType===C4);else vH(Q,X)}function FW(b,z,Q){WH(b,z)}function MW(b,z){_H(b,z)}function kW(b,z,Q){{var X=b.parentNode;if(X!==null)WH(X,z)}}function AW(b,z){{var Q=b.parentNode;if(Q!==null)_H(Q,z)}}function wW(b,z,Q,X,Z,J){if(J||z[HX]!==!0)WH(Q,X)}function IW(b,z,Q,X,Z){if(Z||z[HX]!==!0)_H(Q,X)}function fW(b){G("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",b.nodeName.toLowerCase())}function TW(b){Jz(b)}var F8=Math.random().toString(36).slice(2),M8="__reactFiber$"+F8,fH="__reactProps$"+F8,Oz="__reactContainer$"+F8,TH="__reactEvents$"+F8,hW="__reactListeners$"+F8,CW="__reactHandles$"+F8;function SW(b){delete b[M8],delete b[fH],delete b[TH],delete b[hW],delete b[CW]}function Lz(b,z){z[M8]=b}function KX(b,z){z[Oz]=b}function PK(b){b[Oz]=null}function Nz(b){return!!b[Oz]}function Ab(b){var z=b[M8];if(z)return z;var Q=b.parentNode;while(Q){if(z=Q[Oz]||Q[M8],z){var X=z.alternate;if(z.child!==null||X!==null&&X.child!==null){var Z=_K(b);while(Z!==null){var J=Z[M8];if(J)return J;Z=_K(Z)}}return z}b=Q,Q=b.parentNode}return null}function a7(b){var z=b[M8]||b[Oz];if(z)if(z.tag===A||z.tag===F||z.tag===s||z.tag===w)return z;else return null;return null}function k8(b){if(b.tag===A||b.tag===F)return b.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function UX(b){return b[fH]||null}function hH(b,z){b[fH]=z}function VW(b){var z=b[TH];if(z===void 0)z=b[TH]=new Set;return z}var RK={},FK=H.ReactDebugCurrentFrame;function qX(b){if(b){var z=b._owner,Q=C7(b.type,b._source,z?z.type:null);FK.setExtraStackFrame(Q)}else FK.setExtraStackFrame(null)}function _5(b,z,Q,X,Z){{var J=Function.call.bind(E4);for(var Y in b)if(J(b,Y)){var $=void 0;try{if(typeof b[Y]!=="function"){var K=Error((X||"React class")+": "+Q+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}$=b[Y](z,Y,X,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(O){$=O}if($&&!($ instanceof Error))qX(Z),G("%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).",X||"React class",Q,Y,typeof $),qX(null);if($ instanceof Error&&!($.message in RK))RK[$.message]=!0,qX(Z),G("Failed %s type: %s",Q,$.message),qX(null)}}}var CH=[],BX;BX=[];var O7=-1;function l7(b){return{current:b}}function P6(b,z){if(O7<0){G("Unexpected pop.");return}if(z!==BX[O7])G("Unexpected Fiber popped.");b.current=CH[O7],CH[O7]=null,BX[O7]=null,O7--}function R6(b,z,Q){O7++,CH[O7]=b.current,BX[O7]=Q,b.current=z}var MK={},t6={};Object.freeze(t6);var L7=l7(t6),l5=l7(!1),SH=t6;function A8(b,z,Q){{if(Q&&i5(z))return SH;return L7.current}}function kK(b,z,Q){{var X=b.stateNode;X.__reactInternalMemoizedUnmaskedChildContext=z,X.__reactInternalMemoizedMaskedChildContext=Q}}function w8(b,z){{var Q=b.type,X=Q.contextTypes;if(!X)return t6;var Z=b.stateNode;if(Z&&Z.__reactInternalMemoizedUnmaskedChildContext===z)return Z.__reactInternalMemoizedMaskedChildContext;var J={};for(var Y in X)J[Y]=z[Y];{var $=Q1(b)||"Unknown";_5(X,J,"context",$)}if(Z)kK(b,z,J);return J}}function OX(){return l5.current}function i5(b){{var z=b.childContextTypes;return z!==null&&z!==void 0}}function LX(b){P6(l5,b),P6(L7,b)}function VH(b){P6(l5,b),P6(L7,b)}function AK(b,z,Q){{if(L7.current!==t6)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");R6(L7,z,b),R6(l5,Q,b)}}function wK(b,z,Q){{var X=b.stateNode,Z=z.childContextTypes;if(typeof X.getChildContext!=="function"){{var J=Q1(b)||"Unknown";if(!MK[J])MK[J]=!0,G("%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.",J,J)}return Q}var Y=X.getChildContext();for(var $ in Y)if(!($ in Z))throw Error((Q1(b)||"Unknown")+'.getChildContext(): key "'+$+'" is not defined in childContextTypes.');{var K=Q1(b)||"Unknown";_5(Z,Y,"child context",K)}return Z1({},Q,Y)}}function NX(b){{var z=b.stateNode,Q=z&&z.__reactInternalMemoizedMergedChildContext||t6;return SH=L7.current,R6(L7,Q,b),R6(l5,l5.current,b),!0}}function IK(b,z,Q){{var X=b.stateNode;if(!X)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(Q){var Z=wK(b,z,SH);X.__reactInternalMemoizedMergedChildContext=Z,P6(l5,b),P6(L7,b),R6(L7,Z,b),R6(l5,Q,b)}else P6(l5,b),R6(l5,Q,b)}}function DW(b){{if(!NO(b)||b.tag!==W)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 z=b;do{switch(z.tag){case w:return z.stateNode.context;case W:{var Q=z.type;if(i5(Q))return z.stateNode.__reactInternalMemoizedMergedChildContext;break}}z=z.return}while(z!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var i7=0,vX=1,N7=null,DH=!1,EH=!1;function fK(b){if(N7===null)N7=[b];else N7.push(b)}function EW(b){DH=!0,fK(b)}function TK(){if(DH)x7()}function x7(){if(!EH&&N7!==null){EH=!0;var b=0,z=W5();try{var Q=!0,X=N7;e4(p6);for(;b<X.length;b++){var Z=X[b];do Z=Z(Q);while(Z!==null)}N7=null,DH=!1}catch(J){if(N7!==null)N7=N7.slice(b+1);throw sG(SQ,x7),J}finally{e4(z),EH=!1}}return null}var I8=[],f8=0,WX=null,_X=0,X5=[],Z5=0,wb=null,v7=1,W7="";function uW(b){return fb(),(b.flags&iG)!==l0}function mW(b){return fb(),_X}function gW(){var b=W7,z=v7,Q=z&~cW(z);return Q.toString(32)+b}function Ib(b,z){fb(),I8[f8++]=_X,I8[f8++]=WX,WX=b,_X=z}function hK(b,z,Q){fb(),X5[Z5++]=v7,X5[Z5++]=W7,X5[Z5++]=wb,wb=b;var X=v7,Z=W7,J=PX(X)-1,Y=X&~(1<<J),$=Q+1,K=PX(z)+J;if(K>30){var O=J-J%5,N=(1<<O)-1,T=(Y&N).toString(32),f=Y>>O,g=J-O,c=PX(z)+g,a=$<<g,N0=a|f,m0=T+Z;v7=1<<c|N0,W7=m0}else{var T0=$<<J,$1=T0|Y,G1=Z;v7=1<<K|$1,W7=G1}}function uH(b){fb();var z=b.return;if(z!==null){var Q=1,X=0;Ib(b,Q),hK(b,Q,X)}}function PX(b){return 32-Z9(b)}function cW(b){return 1<<PX(b)-1}function mH(b){while(b===WX)WX=I8[--f8],I8[f8]=null,_X=I8[--f8],I8[f8]=null;while(b===wb)wb=X5[--Z5],X5[Z5]=null,W7=X5[--Z5],X5[Z5]=null,v7=X5[--Z5],X5[Z5]=null}function yW(){if(fb(),wb!==null)return{id:v7,overflow:W7};else return null}function dW(b,z){fb(),X5[Z5++]=v7,X5[Z5++]=W7,X5[Z5++]=wb,v7=z.id,W7=z.overflow,wb=b}function fb(){if(!J6())G("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Z6=null,J5=null,P5=!1,Tb=!1,j7=null;function aW(){if(P5)G("We should not be hydrating here. This is a bug in React. Please file a bug.")}function CK(){Tb=!0}function lW(){return Tb}function iW(b){var z=b.stateNode.containerInfo;return J5=$W(z),Z6=b,P5=!0,j7=null,Tb=!1,!0}function xW(b,z,Q){if(J5=GW(z),Z6=b,P5=!0,j7=null,Tb=!1,Q!==null)dW(b,Q);return!0}function SK(b,z){switch(b.tag){case w:{_W(b.stateNode.containerInfo,z);break}case A:{var Q=(b.mode&B1)!==d0;RW(b.type,b.memoizedProps,b.stateNode,z,Q);break}case s:{var X=b.memoizedState;if(X.dehydrated!==null)PW(X.dehydrated,z);break}}}function VK(b,z){SK(b,z);var Q=eR();Q.stateNode=z,Q.return=b;var X=b.deletions;if(X===null)b.deletions=[Q],b.flags|=qb;else X.push(Q)}function gH(b,z){{if(Tb)return;switch(b.tag){case w:{var Q=b.stateNode.containerInfo;switch(z.tag){case A:var{type:X,pendingProps:Z}=z;FW(Q,X);break;case F:var J=z.pendingProps;MW(Q,J);break}break}case A:{var{type:Y,memoizedProps:$,stateNode:K}=b;switch(z.tag){case A:{var{type:O,pendingProps:N}=z,T=(b.mode&B1)!==d0;wW(Y,$,K,O,N,T);break}case F:{var f=z.pendingProps,g=(b.mode&B1)!==d0;IW(Y,$,K,f,g);break}}break}case s:{var c=b.memoizedState,a=c.dehydrated;if(a!==null)switch(z.tag){case A:var{type:N0,pendingProps:m0}=z;kW(a,N0);break;case F:var T0=z.pendingProps;AW(a,T0);break}break}default:return}}}function DK(b,z){z.flags=z.flags&~$7|S4,gH(b,z)}function EK(b,z){switch(b.tag){case A:{var{type:Q,pendingProps:X}=b,Z=QW(z,Q);if(Z!==null)return b.stateNode=Z,Z6=b,J5=YW(Z),!0;return!1}case F:{var J=b.pendingProps,Y=XW(z,J);if(Y!==null)return b.stateNode=Y,Z6=b,J5=null,!0;return!1}case s:{var $=ZW(z);if($!==null){var K={dehydrated:$,treeContext:yW(),retryLane:j6};b.memoizedState=K;var O=bF($);return O.return=b,b.child=O,Z6=b,J5=null,!0}return!1}default:return!1}}function cH(b){return(b.mode&B1)!==d0&&(b.flags&w1)===l0}function yH(b){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function dH(b){if(!P5)return;var z=J5;if(!z){if(cH(b))gH(Z6,b),yH();DK(Z6,b),P5=!1,Z6=b;return}var Q=z;if(!EK(b,z)){if(cH(b))gH(Z6,b),yH();z=Bz(Q);var X=Z6;if(!z||!EK(b,z)){DK(Z6,b),P5=!1,Z6=b;return}VK(X,Q)}}function jW(b,z,Q){var X=b.stateNode,Z=!Tb,J=KW(X,b.type,b.memoizedProps,z,Q,b,Z);if(b.updateQueue=J,J!==null)return!0;return!1}function oW(b){var{stateNode:z,memoizedProps:Q}=b,X=UW(z,Q,b);if(X){var Z=Z6;if(Z!==null)switch(Z.tag){case w:{var J=Z.stateNode.containerInfo,Y=(Z.mode&B1)!==d0;vW(J,z,Q,Y);break}case A:{var{type:$,memoizedProps:K,stateNode:O}=Z,N=(Z.mode&B1)!==d0;WW($,K,O,z,Q,N);break}}}return X}function pW(b){var z=b.memoizedState,Q=z!==null?z.dehydrated:null;if(!Q)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");qW(Q,b)}function rW(b){var z=b.memoizedState,Q=z!==null?z.dehydrated:null;if(!Q)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return BW(Q)}function uK(b){var z=b.return;while(z!==null&&z.tag!==A&&z.tag!==w&&z.tag!==s)z=z.return;Z6=z}function RX(b){if(b!==Z6)return!1;if(!P5)return uK(b),P5=!0,!1;if(b.tag!==w&&(b.tag!==A||NW(b.type)&&!MH(b.type,b.memoizedProps))){var z=J5;if(z)if(cH(b))mK(b),yH();else while(z)VK(b,z),z=Bz(z)}if(uK(b),b.tag===s)J5=rW(b);else J5=Z6?Bz(b.stateNode):null;return!0}function nW(){return P5&&J5!==null}function mK(b){var z=J5;while(z)SK(b,z),z=Bz(z)}function T8(){Z6=null,J5=null,P5=!1,Tb=!1}function gK(){if(j7!==null)Sq(j7),j7=null}function J6(){return P5}function aH(b){if(j7===null)j7=[b];else j7.push(b)}var tW=H.ReactCurrentBatchConfig,sW=null;function eW(){return tW.transition}var R5={recordUnsafeLifecycleWarnings:function(b,z){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(b,z){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var b_=function(b){var z=null,Q=b;while(Q!==null){if(Q.mode&M4)z=Q;Q=Q.return}return z},hb=function(b){var z=[];return b.forEach(function(Q){z.push(Q)}),z.sort().join(", ")},vz=[],Wz=[],_z=[],Pz=[],Rz=[],Fz=[],Cb=new Set;R5.recordUnsafeLifecycleWarnings=function(b,z){if(Cb.has(b.type))return;if(typeof z.componentWillMount==="function"&&z.componentWillMount.__suppressDeprecationWarning!==!0)vz.push(b);if(b.mode&M4&&typeof z.UNSAFE_componentWillMount==="function")Wz.push(b);if(typeof z.componentWillReceiveProps==="function"&&z.componentWillReceiveProps.__suppressDeprecationWarning!==!0)_z.push(b);if(b.mode&M4&&typeof z.UNSAFE_componentWillReceiveProps==="function")Pz.push(b);if(typeof z.componentWillUpdate==="function"&&z.componentWillUpdate.__suppressDeprecationWarning!==!0)Rz.push(b);if(b.mode&M4&&typeof z.UNSAFE_componentWillUpdate==="function")Fz.push(b)},R5.flushPendingUnsafeLifecycleWarnings=function(){var b=new Set;if(vz.length>0)vz.forEach(function(f){b.add(Q1(f)||"Component"),Cb.add(f.type)}),vz=[];var z=new Set;if(Wz.length>0)Wz.forEach(function(f){z.add(Q1(f)||"Component"),Cb.add(f.type)}),Wz=[];var Q=new Set;if(_z.length>0)_z.forEach(function(f){Q.add(Q1(f)||"Component"),Cb.add(f.type)}),_z=[];var X=new Set;if(Pz.length>0)Pz.forEach(function(f){X.add(Q1(f)||"Component"),Cb.add(f.type)}),Pz=[];var Z=new Set;if(Rz.length>0)Rz.forEach(function(f){Z.add(Q1(f)||"Component"),Cb.add(f.type)}),Rz=[];var J=new Set;if(Fz.length>0)Fz.forEach(function(f){J.add(Q1(f)||"Component"),Cb.add(f.type)}),Fz=[];if(z.size>0){var Y=hb(z);G(`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`,Y)}if(X.size>0){var $=hb(X);G(`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`,$)}if(J.size>0){var K=hb(J);G(`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(b.size>0){var O=hb(b);L(`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`,O)}if(Q.size>0){var N=hb(Q);L(`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`,N)}if(Z.size>0){var T=hb(Z);L(`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`,T)}};var FX=new Map,cK=new Set;R5.recordLegacyContextWarning=function(b,z){var Q=b_(b);if(Q===null){G("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(cK.has(b.type))return;var X=FX.get(Q);if(b.type.contextTypes!=null||b.type.childContextTypes!=null||z!==null&&typeof z.getChildContext==="function"){if(X===void 0)X=[],FX.set(Q,X);X.push(b)}},R5.flushLegacyContextWarning=function(){FX.forEach(function(b,z){if(b.length===0)return;var Q=b[0],X=new Set;b.forEach(function(J){X.add(Q1(J)||"Component"),cK.add(J.type)});var Z=hb(X);try{_4(Q),G(`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`,Z)}finally{r4()}})},R5.discardPendingWarnings=function(){vz=[],Wz=[],_z=[],Pz=[],Rz=[],Fz=[],FX=new Map}}var lH,iH,xH,jH,oH,yK=function(b,z){};lH=!1,iH=!1,xH={},jH={},oH={},yK=function(b,z){if(b===null||typeof b!=="object")return;if(!b._store||b._store.validated||b.key!=null)return;if(typeof b._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.");b._store.validated=!0;var Q=Q1(z)||"Component";if(jH[Q])return;jH[Q]=!0,G('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function z_(b){return b.prototype&&b.prototype.isReactComponent}function Mz(b,z,Q){var X=Q.ref;if(X!==null&&typeof X!=="function"&&typeof X!=="object"){if((b.mode&M4||C1)&&!(Q._owner&&Q._self&&Q._owner.stateNode!==Q._self)&&!(Q._owner&&Q._owner.tag!==W)&&!(typeof Q.type==="function"&&!z_(Q.type))&&Q._owner){var Z=Q1(b)||"Component";if(!xH[Z])G('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',Z,X),xH[Z]=!0}if(Q._owner){var J=Q._owner,Y;if(J){var $=J;if($.tag!==W)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");Y=$.stateNode}if(!Y)throw Error("Missing owner for string ref "+X+". This error is likely caused by a bug in React. Please file an issue.");var K=Y;G4(X,"ref");var O=""+X;if(z!==null&&z.ref!==null&&typeof z.ref==="function"&&z.ref._stringRef===O)return z.ref;var N=function(T){var f=K.refs;if(T===null)delete f[O];else f[O]=T};return N._stringRef=O,N}else{if(typeof X!=="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!Q._owner)throw Error("Element ref was specified as a string ("+X+`) 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 X}function MX(b,z){var Q=Object.prototype.toString.call(z);throw Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}function kX(b){{var z=Q1(b)||"Component";if(oH[z])return;oH[z]=!0,G("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 dK(b){var{_payload:z,_init:Q}=b;return Q(z)}function aK(b){function z(S,x){if(!b)return;var V=S.deletions;if(V===null)S.deletions=[x],S.flags|=qb;else V.push(x)}function Q(S,x){if(!b)return null;var V=x;while(V!==null)z(S,V),V=V.sibling;return null}function X(S,x){var V=new Map,X0=x;while(X0!==null){if(X0.key!==null)V.set(X0.key,X0);else V.set(X0.index,X0);X0=X0.sibling}return V}function Z(S,x){var V=yb(S,x);return V.index=0,V.sibling=null,V}function J(S,x,V){if(S.index=V,!b)return S.flags|=iG,x;var X0=S.alternate;if(X0!==null){var R0=X0.index;if(R0<x)return S.flags|=S4,x;else return R0}else return S.flags|=S4,x}function Y(S){if(b&&S.alternate===null)S.flags|=S4;return S}function $(S,x,V,X0){if(x===null||x.tag!==F){var R0=i$(V,S.mode,X0);return R0.return=S,R0}else{var W0=Z(x,V);return W0.return=S,W0}}function K(S,x,V,X0){var R0=V.type;if(R0===F1)return N(S,x,V.props.children,X0,V.key);if(x!==null){if(x.elementType===R0||pq(x,V)||typeof R0==="object"&&R0!==null&&R0.$$typeof===f0&&dK(R0)===x.type){var W0=Z(x,V.props);return W0.ref=Mz(S,x,V),W0.return=S,W0._debugSource=V._source,W0._debugOwner=V._owner,W0}}var j0=l$(V,S.mode,X0);return j0.ref=Mz(S,x,V),j0.return=S,j0}function O(S,x,V,X0){if(x===null||x.tag!==P||x.stateNode.containerInfo!==V.containerInfo||x.stateNode.implementation!==V.implementation){var R0=x$(V,S.mode,X0);return R0.return=S,R0}else{var W0=Z(x,V.children||[]);return W0.return=S,W0}}function N(S,x,V,X0,R0){if(x===null||x.tag!==d){var W0=Xb(V,S.mode,X0,R0);return W0.return=S,W0}else{var j0=Z(x,V);return j0.return=S,j0}}function T(S,x,V){if(typeof x==="string"&&x!==""||typeof x==="number"){var X0=i$(""+x,S.mode,V);return X0.return=S,X0}if(typeof x==="object"&&x!==null){switch(x.$$typeof){case V1:{var R0=l$(x,S.mode,V);return R0.ref=Mz(S,null,x),R0.return=S,R0}case j1:{var W0=x$(x,S.mode,V);return W0.return=S,W0}case f0:{var{_payload:j0,_init:b1}=x;return T(S,b1(j0),V)}}if(A1(x)||J4(x)){var c1=Xb(x,S.mode,V,null);return c1.return=S,c1}MX(S,x)}if(typeof x==="function")kX(S);return null}function f(S,x,V,X0){var R0=x!==null?x.key:null;if(typeof V==="string"&&V!==""||typeof V==="number"){if(R0!==null)return null;return $(S,x,""+V,X0)}if(typeof V==="object"&&V!==null){switch(V.$$typeof){case V1:if(V.key===R0)return K(S,x,V,X0);else return null;case j1:if(V.key===R0)return O(S,x,V,X0);else return null;case f0:{var{_payload:W0,_init:j0}=V;return f(S,x,j0(W0),X0)}}if(A1(V)||J4(V)){if(R0!==null)return null;return N(S,x,V,X0,null)}MX(S,V)}if(typeof V==="function")kX(S);return null}function g(S,x,V,X0,R0){if(typeof X0==="string"&&X0!==""||typeof X0==="number"){var W0=S.get(V)||null;return $(x,W0,""+X0,R0)}if(typeof X0==="object"&&X0!==null){switch(X0.$$typeof){case V1:{var j0=S.get(X0.key===null?V:X0.key)||null;return K(x,j0,X0,R0)}case j1:{var b1=S.get(X0.key===null?V:X0.key)||null;return O(x,b1,X0,R0)}case f0:var{_payload:c1,_init:M1}=X0;return g(S,x,V,M1(c1),R0)}if(A1(X0)||J4(X0)){var f4=S.get(V)||null;return N(x,f4,X0,R0,null)}MX(x,X0)}if(typeof X0==="function")kX(x);return null}function c(S,x,V){{if(typeof S!=="object"||S===null)return x;switch(S.$$typeof){case V1:case j1:yK(S,V);var X0=S.key;if(typeof X0!=="string")break;if(x===null){x=new Set,x.add(X0);break}if(!x.has(X0)){x.add(X0);break}G("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.",X0);break;case f0:var{_payload:R0,_init:W0}=S;c(W0(R0),x,V);break}}return x}function a(S,x,V,X0){{var R0=null;for(var W0=0;W0<V.length;W0++){var j0=V[W0];R0=c(j0,R0,S)}}var b1=null,c1=null,M1=x,f4=0,k1=0,k4=null;for(;M1!==null&&k1<V.length;k1++){if(M1.index>k1)k4=M1,M1=null;else k4=M1.sibling;var M6=f(S,M1,V[k1],X0);if(M6===null){if(M1===null)M1=k4;break}if(b){if(M1&&M6.alternate===null)z(S,M1)}if(f4=J(M6,f4,k1),c1===null)b1=M6;else c1.sibling=M6;c1=M6,M1=k4}if(k1===V.length){if(Q(S,M1),J6()){var q6=k1;Ib(S,q6)}return b1}if(M1===null){for(;k1<V.length;k1++){var e6=T(S,V[k1],X0);if(e6===null)continue;if(f4=J(e6,f4,k1),c1===null)b1=e6;else c1.sibling=e6;c1=e6}if(J6()){var V6=k1;Ib(S,V6)}return b1}var D6=X(S,M1);for(;k1<V.length;k1++){var k6=g(D6,S,k1,V[k1],X0);if(k6!==null){if(b){if(k6.alternate!==null)D6.delete(k6.key===null?k1:k6.key)}if(f4=J(k6,f4,k1),c1===null)b1=k6;else c1.sibling=k6;c1=k6}}if(b)D6.forEach(function(p8){return z(S,p8)});if(J6()){var A7=k1;Ib(S,A7)}return b1}function N0(S,x,V,X0){var R0=J4(V);if(typeof R0!=="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"&&V[Symbol.toStringTag]==="Generator"){if(!iH)G("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.");iH=!0}if(V.entries===R0){if(!lH)G("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");lH=!0}var W0=R0.call(V);if(W0){var j0=null,b1=W0.next();for(;!b1.done;b1=W0.next()){var c1=b1.value;j0=c(c1,j0,S)}}}var M1=R0.call(V);if(M1==null)throw Error("An iterable object provided no iterator.");var f4=null,k1=null,k4=x,M6=0,q6=0,e6=null,V6=M1.next();for(;k4!==null&&!V6.done;q6++,V6=M1.next()){if(k4.index>q6)e6=k4,k4=null;else e6=k4.sibling;var D6=f(S,k4,V6.value,X0);if(D6===null){if(k4===null)k4=e6;break}if(b){if(k4&&D6.alternate===null)z(S,k4)}if(M6=J(D6,M6,q6),k1===null)f4=D6;else k1.sibling=D6;k1=D6,k4=e6}if(V6.done){if(Q(S,k4),J6()){var k6=q6;Ib(S,k6)}return f4}if(k4===null){for(;!V6.done;q6++,V6=M1.next()){var A7=T(S,V6.value,X0);if(A7===null)continue;if(M6=J(A7,M6,q6),k1===null)f4=A7;else k1.sibling=A7;k1=A7}if(J6()){var p8=q6;Ib(S,p8)}return f4}var zQ=X(S,k4);for(;!V6.done;q6++,V6=M1.next()){var s5=g(zQ,S,q6,V6.value,X0);if(s5!==null){if(b){if(s5.alternate!==null)zQ.delete(s5.key===null?q6:s5.key)}if(M6=J(s5,M6,q6),k1===null)f4=s5;else k1.sibling=s5;k1=s5}}if(b)zQ.forEach(function(CF){return z(S,CF)});if(J6()){var hF=q6;Ib(S,hF)}return f4}function m0(S,x,V,X0){if(x!==null&&x.tag===F){Q(S,x.sibling);var R0=Z(x,V);return R0.return=S,R0}Q(S,x);var W0=i$(V,S.mode,X0);return W0.return=S,W0}function T0(S,x,V,X0){var R0=V.key,W0=x;while(W0!==null){if(W0.key===R0){var j0=V.type;if(j0===F1){if(W0.tag===d){Q(S,W0.sibling);var b1=Z(W0,V.props.children);return b1.return=S,b1._debugSource=V._source,b1._debugOwner=V._owner,b1}}else if(W0.elementType===j0||pq(W0,V)||typeof j0==="object"&&j0!==null&&j0.$$typeof===f0&&dK(j0)===W0.type){Q(S,W0.sibling);var c1=Z(W0,V.props);return c1.ref=Mz(S,W0,V),c1.return=S,c1._debugSource=V._source,c1._debugOwner=V._owner,c1}Q(S,W0);break}else z(S,W0);W0=W0.sibling}if(V.type===F1){var M1=Xb(V.props.children,S.mode,X0,V.key);return M1.return=S,M1}else{var f4=l$(V,S.mode,X0);return f4.ref=Mz(S,x,V),f4.return=S,f4}}function $1(S,x,V,X0){var R0=V.key,W0=x;while(W0!==null){if(W0.key===R0)if(W0.tag===P&&W0.stateNode.containerInfo===V.containerInfo&&W0.stateNode.implementation===V.implementation){Q(S,W0.sibling);var j0=Z(W0,V.children||[]);return j0.return=S,j0}else{Q(S,W0);break}else z(S,W0);W0=W0.sibling}var b1=x$(V,S.mode,X0);return b1.return=S,b1}function G1(S,x,V,X0){var R0=typeof V==="object"&&V!==null&&V.type===F1&&V.key===null;if(R0)V=V.props.children;if(typeof V==="object"&&V!==null){switch(V.$$typeof){case V1:return Y(T0(S,x,V,X0));case j1:return Y($1(S,x,V,X0));case f0:var{_payload:W0,_init:j0}=V;return G1(S,x,j0(W0),X0)}if(A1(V))return a(S,x,V,X0);if(J4(V))return N0(S,x,V,X0);MX(S,V)}if(typeof V==="string"&&V!==""||typeof V==="number")return Y(m0(S,x,""+V,X0));if(typeof V==="function")kX(S);return Q(S,x)}return G1}var h8=aK(!0),lK=aK(!1);function Q_(b,z){if(b!==null&&z.child!==b.child)throw Error("Resuming work not yet implemented.");if(z.child===null)return;var Q=z.child,X=yb(Q,Q.pendingProps);z.child=X,X.return=z;while(Q.sibling!==null)Q=Q.sibling,X=X.sibling=yb(Q,Q.pendingProps),X.return=z;X.sibling=null}function X_(b,z){var Q=b.child;while(Q!==null)pR(Q,z),Q=Q.sibling}var pH=l7(null),rH;rH={};var AX=null,C8=null,nH=null,wX=!1;function IX(){AX=null,C8=null,nH=null,wX=!1}function iK(){wX=!0}function xK(){wX=!1}function jK(b,z,Q){{R6(pH,z._currentValue,b),z._currentValue=Q;{if(z._currentRenderer!==void 0&&z._currentRenderer!==null&&z._currentRenderer!==rH)G("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");z._currentRenderer=rH}}}function tH(b,z){var Q=pH.current;P6(pH,z),b._currentValue=Q}function sH(b,z,Q){var X=b;while(X!==null){var Z=X.alternate;if(!L8(X.childLanes,z)){if(X.childLanes=X1(X.childLanes,z),Z!==null)Z.childLanes=X1(Z.childLanes,z)}else if(Z!==null&&!L8(Z.childLanes,z))Z.childLanes=X1(Z.childLanes,z);if(X===Q)break;X=X.return}if(X!==Q)G("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 Z_(b,z,Q){J_(b,z,Q)}function J_(b,z,Q){var X=b.child;if(X!==null)X.return=b;while(X!==null){var Z=void 0,J=X.dependencies;if(J!==null){Z=X.child;var Y=J.firstContext;while(Y!==null){if(Y.context===z){if(X.tag===W){var $=d3(Q),K=_7(H4,$);K.tag=TX;var O=X.updateQueue;if(O===null);else{var N=O.shared,T=N.pending;if(T===null)K.next=K;else K.next=T.next,T.next=K;N.pending=K}}X.lanes=X1(X.lanes,Q);var f=X.alternate;if(f!==null)f.lanes=X1(f.lanes,Q);sH(X.return,Q,b),J.lanes=X1(J.lanes,Q);break}Y=Y.next}}else if(X.tag===D)Z=X.type===b.type?null:X.child;else if(X.tag===$0){var g=X.return;if(g===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");g.lanes=X1(g.lanes,Q);var c=g.alternate;if(c!==null)c.lanes=X1(c.lanes,Q);sH(g,Q,b),Z=X.sibling}else Z=X.child;if(Z!==null)Z.return=X;else{Z=X;while(Z!==null){if(Z===b){Z=null;break}var a=Z.sibling;if(a!==null){a.return=Z.return,Z=a;break}Z=Z.return}}X=Z}}function S8(b,z){AX=b,C8=null,nH=null;var Q=b.dependencies;if(Q!==null){var X=Q.firstContext;if(X!==null){if(o6(Q.lanes,z))gz();Q.firstContext=null}}}function V4(b){if(wX)G("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 z=b._currentValue;if(nH===b);else{var Q={context:b,memoizedValue:z,next:null};if(C8===null){if(AX===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().");C8=Q,AX.dependencies={lanes:z0,firstContext:Q}}else C8=C8.next=Q}return z}var Sb=null;function eH(b){if(Sb===null)Sb=[b];else Sb.push(b)}function H_(){if(Sb!==null){for(var b=0;b<Sb.length;b++){var z=Sb[b],Q=z.interleaved;if(Q!==null){z.interleaved=null;var X=Q.next,Z=z.pending;if(Z!==null){var J=Z.next;Z.next=X,Q.next=J}z.pending=Q}}Sb=null}}function oK(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,eH(z);else Q.next=Z.next,Z.next=Q;return z.interleaved=Q,fX(b,X)}function Y_(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,eH(z);else Q.next=Z.next,Z.next=Q;z.interleaved=Q}function $_(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,eH(z);else Q.next=Z.next,Z.next=Q;return z.interleaved=Q,fX(b,X)}function c6(b,z){return fX(b,z)}var G_=fX;function fX(b,z){b.lanes=X1(b.lanes,z);var Q=b.alternate;if(Q!==null)Q.lanes=X1(Q.lanes,z);if(Q===null&&(b.flags&(S4|$7))!==l0)iq(b);var X=b,Z=b.return;while(Z!==null){if(Z.childLanes=X1(Z.childLanes,z),Q=Z.alternate,Q!==null)Q.childLanes=X1(Q.childLanes,z);else if((Z.flags&(S4|$7))!==l0)iq(b);X=Z,Z=Z.return}if(X.tag===w){var J=X.stateNode;return J}else return null}var pK=0,rK=1,TX=2,bY=3,hX=!1,zY,CX;zY=!1,CX=null;function QY(b){var z={baseState:b.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:z0},effects:null};b.updateQueue=z}function nK(b,z){var Q=z.updateQueue,X=b.updateQueue;if(Q===X){var Z={baseState:X.baseState,firstBaseUpdate:X.firstBaseUpdate,lastBaseUpdate:X.lastBaseUpdate,shared:X.shared,effects:X.effects};z.updateQueue=Z}}function _7(b,z){var Q={eventTime:b,lane:z,tag:pK,payload:null,callback:null,next:null};return Q}function o7(b,z,Q){var X=b.updateQueue;if(X===null)return null;var Z=X.shared;if(CX===Z&&!zY)G("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."),zY=!0;if(UR()){var J=Z.pending;if(J===null)z.next=z;else z.next=J.next,J.next=z;return Z.pending=z,G_(b,Q)}else return $_(b,Z,z,Q)}function SX(b,z,Q){var X=z.updateQueue;if(X===null)return;var Z=X.shared;if($9(Q)){var J=Z.lanes;J=K9(J,b.pendingLanes);var Y=X1(J,Q);Z.lanes=Y,pJ(b,Y)}}function XY(b,z){var{updateQueue:Q,alternate:X}=b;if(X!==null){var Z=X.updateQueue;if(Q===Z){var J=null,Y=null,$=Q.firstBaseUpdate;if($!==null){var K=$;do{var O={eventTime:K.eventTime,lane:K.lane,tag:K.tag,payload:K.payload,callback:K.callback,next:null};if(Y===null)J=Y=O;else Y.next=O,Y=O;K=K.next}while(K!==null);if(Y===null)J=Y=z;else Y.next=z,Y=z}else J=Y=z;Q={baseState:Z.baseState,firstBaseUpdate:J,lastBaseUpdate:Y,shared:Z.shared,effects:Z.effects},b.updateQueue=Q;return}}var N=Q.lastBaseUpdate;if(N===null)Q.firstBaseUpdate=z;else N.next=z;Q.lastBaseUpdate=z}function K_(b,z,Q,X,Z,J){switch(Q.tag){case rK:{var Y=Q.payload;if(typeof Y==="function"){iK();var $=Y.call(J,X,Z);{if(b.mode&M4){t4(!0);try{Y.call(J,X,Z)}finally{t4(!1)}}xK()}return $}return Y}case bY:b.flags=b.flags&~T6|w1;case pK:{var K=Q.payload,O;if(typeof K==="function"){iK(),O=K.call(J,X,Z);{if(b.mode&M4){t4(!0);try{K.call(J,X,Z)}finally{t4(!1)}}xK()}}else O=K;if(O===null||O===void 0)return X;return Z1({},X,O)}case TX:return hX=!0,X}return X}function VX(b,z,Q,X){var Z=b.updateQueue;hX=!1,CX=Z.shared;var{firstBaseUpdate:J,lastBaseUpdate:Y}=Z,$=Z.shared.pending;if($!==null){Z.shared.pending=null;var K=$,O=K.next;if(K.next=null,Y===null)J=O;else Y.next=O;Y=K;var N=b.alternate;if(N!==null){var T=N.updateQueue,f=T.lastBaseUpdate;if(f!==Y){if(f===null)T.firstBaseUpdate=O;else f.next=O;T.lastBaseUpdate=K}}}if(J!==null){var g=Z.baseState,c=z0,a=null,N0=null,m0=null,T0=J;do{var{lane:$1,eventTime:G1}=T0;if(!L8(X,$1)){var S={eventTime:G1,lane:$1,tag:T0.tag,payload:T0.payload,callback:T0.callback,next:null};if(m0===null)N0=m0=S,a=g;else m0=m0.next=S;c=X1(c,$1)}else{if(m0!==null){var x={eventTime:G1,lane:s4,tag:T0.tag,payload:T0.payload,callback:T0.callback,next:null};m0=m0.next=x}g=K_(b,Z,T0,g,z,Q);var V=T0.callback;if(V!==null&&T0.lane!==s4){b.flags|=LJ;var X0=Z.effects;if(X0===null)Z.effects=[T0];else X0.push(T0)}}if(T0=T0.next,T0===null)if($=Z.shared.pending,$===null)break;else{var R0=$,W0=R0.next;R0.next=null,T0=W0,Z.lastBaseUpdate=R0,Z.shared.pending=null}}while(!0);if(m0===null)a=g;Z.baseState=a,Z.firstBaseUpdate=N0,Z.lastBaseUpdate=m0;var j0=Z.shared.interleaved;if(j0!==null){var b1=j0;do c=X1(c,b1.lane),b1=b1.next;while(b1!==j0)}else if(J===null)Z.shared.lanes=z0;nz(c),b.lanes=c,b.memoizedState=g}CX=null}function U_(b,z){if(typeof b!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+b));b.call(z)}function tK(){hX=!1}function DX(){return hX}function sK(b,z,Q){var X=z.effects;if(z.effects=null,X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z],Y=J.callback;if(Y!==null)J.callback=null,U_(Y,Q)}}var kz={},p7=l7(kz),Az=l7(kz),EX=l7(kz);function uX(b){if(b===kz)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return b}function eK(){var b=uX(EX.current);return b}function ZY(b,z){R6(EX,z,b),R6(Az,b,b),R6(p7,kz,b);var Q=fv(z);P6(p7,b),R6(p7,Q,b)}function V8(b){P6(p7,b),P6(Az,b),P6(EX,b)}function JY(){var b=uX(p7.current);return b}function bU(b){var z=uX(EX.current),Q=uX(p7.current),X=Tv(Q,b.type);if(Q===X)return;R6(Az,b,b),R6(p7,X,b)}function HY(b){if(Az.current!==b)return;P6(p7,b),P6(Az,b)}var q_=0,zU=1,QU=1,wz=2,F5=l7(q_);function YY(b,z){return(b&z)!==0}function D8(b){return b&zU}function $Y(b,z){return b&zU|z}function B_(b,z){return b|z}function r7(b,z){R6(F5,z,b)}function E8(b){P6(F5,b)}function O_(b,z){var Q=b.memoizedState;if(Q!==null){if(Q.dehydrated!==null)return!0;return!1}var X=b.memoizedProps;return!0}function mX(b){var z=b;while(z!==null){if(z.tag===s){var Q=z.memoizedState;if(Q!==null){var X=Q.dehydrated;if(X===null||WK(X)||IH(X))return z}}else if(z.tag===O0&&z.memoizedProps.revealOrder!==void 0){var Z=(z.flags&w1)!==l0;if(Z)return z}else if(z.child!==null){z.child.return=z,z=z.child;continue}if(z===b)return null;while(z.sibling===null){if(z.return===null||z.return===b)return null;z=z.return}z.sibling.return=z.return,z=z.sibling}return null}var y6=0,m4=1,x5=2,g4=4,H6=8,GY=[];function KY(){for(var b=0;b<GY.length;b++){var z=GY[b];z._workInProgressVersionPrimary=null}GY.length=0}function L_(b,z){var Q=z._getVersion,X=Q(z._source);if(b.mutableSourceEagerHydrationData==null)b.mutableSourceEagerHydrationData=[z,X];else b.mutableSourceEagerHydrationData.push(z,X)}var{ReactCurrentDispatcher:P0,ReactCurrentBatchConfig:Iz}=H,UY,u8;UY=new Set;var Vb=z0,g1=null,c4=null,y4=null,gX=!1,fz=!1,Tz=0,N_=0,v_=25,o=null,H5=null,n7=-1,qY=!1;function T1(){{var b=o;if(H5===null)H5=[b];else H5.push(b)}}function B0(){{var b=o;if(H5!==null){if(n7++,H5[n7]!==b)W_(b)}}}function m8(b){if(b!==void 0&&b!==null&&!A1(b))G("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",o,typeof b)}function W_(b){{var z=Q1(g1);if(!UY.has(z)){if(UY.add(z),H5!==null){var Q="",X=30;for(var Z=0;Z<=n7;Z++){var J=H5[Z],Y=Z===n7?b:J,$=Z+1+". "+J;while($.length<X)$+=" ";$+=Y+`
|
|
72
|
+
`,Q+=$}G(`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
|
+
`,z,Q)}}}}function F6(){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 BY(b,z){if(qY)return!1;if(z===null)return G("%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.",o),!1;if(b.length!==z.length)G(`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`,o,"["+z.join(", ")+"]","["+b.join(", ")+"]");for(var Q=0;Q<z.length&&Q<b.length;Q++){if(n6(b[Q],z[Q]))continue;return!1}return!0}function g8(b,z,Q,X,Z,J){if(Vb=J,g1=z,H5=b!==null?b._debugHookTypes:null,n7=-1,qY=b!==null&&b.type!==z.type,z.memoizedState=null,z.updateQueue=null,z.lanes=z0,b!==null&&b.memoizedState!==null)P0.current=kU;else if(H5!==null)P0.current=MU;else P0.current=FU;var Y=Q(X,Z);if(fz){var $=0;do{if(fz=!1,Tz=0,$>=v_)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");$+=1,qY=!1,c4=null,y4=null,z.updateQueue=null,n7=-1,P0.current=AU,Y=Q(X,Z)}while(fz)}P0.current=eX,z._debugHookTypes=H5;var K=c4!==null&&c4.next!==null;if(Vb=z0,g1=null,c4=null,y4=null,o=null,H5=null,n7=-1,b!==null&&(b.flags&K7)!==(z.flags&K7)&&(b.mode&B1)!==d0)G("Internal React error: Expected static flag was missing. Please notify the React team.");if(gX=!1,K)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return Y}function c8(){var b=Tz!==0;return Tz=0,b}function XU(b,z,Q){if(z.updateQueue=b.updateQueue,(z.mode&d5)!==d0)z.flags&=~(CQ|G7|N5|v1);else z.flags&=~(N5|v1);b.lanes=gQ(b.lanes,Q)}function ZU(){if(P0.current=eX,gX){var b=g1.memoizedState;while(b!==null){var z=b.queue;if(z!==null)z.pending=null;b=b.next}gX=!1}Vb=z0,g1=null,c4=null,y4=null,H5=null,n7=-1,o=null,vU=!1,fz=!1,Tz=0}function j5(){var b={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(y4===null)g1.memoizedState=y4=b;else y4=y4.next=b;return y4}function Y5(){var b;if(c4===null){var z=g1.alternate;if(z!==null)b=z.memoizedState;else b=null}else b=c4.next;var Q;if(y4===null)Q=g1.memoizedState;else Q=y4.next;if(Q!==null)y4=Q,Q=y4.next,c4=b;else{if(b===null)throw Error("Rendered more hooks than during the previous render.");c4=b;var X={memoizedState:c4.memoizedState,baseState:c4.baseState,baseQueue:c4.baseQueue,queue:c4.queue,next:null};if(y4===null)g1.memoizedState=y4=X;else y4=y4.next=X}return y4}function JU(){return{lastEffect:null,stores:null}}function OY(b,z){return typeof z==="function"?z(b):z}function LY(b,z,Q){var X=j5(),Z;if(Q!==void 0)Z=Q(z);else Z=z;X.memoizedState=X.baseState=Z;var J={pending:null,interleaved:null,lanes:z0,dispatch:null,lastRenderedReducer:b,lastRenderedState:Z};X.queue=J;var Y=J.dispatch=R_.bind(null,g1,J);return[X.memoizedState,Y]}function NY(b,z,Q){var X=Y5(),Z=X.queue;if(Z===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Z.lastRenderedReducer=b;var J=c4,Y=J.baseQueue,$=Z.pending;if($!==null){if(Y!==null){var K=Y.next,O=$.next;Y.next=O,$.next=K}if(J.baseQueue!==Y)G("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");J.baseQueue=Y=$,Z.pending=null}if(Y!==null){var N=Y.next,T=J.baseState,f=null,g=null,c=null,a=N;do{var N0=a.lane;if(!L8(Vb,N0)){var m0={lane:N0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};if(c===null)g=c=m0,f=T;else c=c.next=m0;g1.lanes=X1(g1.lanes,N0),nz(N0)}else{if(c!==null){var T0={lane:s4,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};c=c.next=T0}if(a.hasEagerState)T=a.eagerState;else{var $1=a.action;T=b(T,$1)}}a=a.next}while(a!==null&&a!==N);if(c===null)f=T;else c.next=g;if(!n6(T,X.memoizedState))gz();X.memoizedState=T,X.baseState=f,X.baseQueue=c,Z.lastRenderedState=T}var G1=Z.interleaved;if(G1!==null){var S=G1;do{var x=S.lane;g1.lanes=X1(g1.lanes,x),nz(x),S=S.next}while(S!==G1)}else if(Y===null)Z.lanes=z0;var V=Z.dispatch;return[X.memoizedState,V]}function vY(b,z,Q){var X=Y5(),Z=X.queue;if(Z===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Z.lastRenderedReducer=b;var{dispatch:J,pending:Y}=Z,$=X.memoizedState;if(Y!==null){Z.pending=null;var K=Y.next,O=K;do{var N=O.action;$=b($,N),O=O.next}while(O!==K);if(!n6($,X.memoizedState))gz();if(X.memoizedState=$,X.baseQueue===null)X.baseState=$;Z.lastRenderedState=$}return[$,J]}function WY(b,z,Q){return}function cX(b,z,Q){return}function _Y(b,z,Q){var X=g1,Z=j5(),J,Y=J6();if(Y){if(Q===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if(J=Q(),!u8){if(J!==Q())G("The result of getServerSnapshot should be cached to avoid an infinite loop"),u8=!0}}else{if(J=z(),!u8){var $=z();if(!n6(J,$))G("The result of getSnapshot should be cached to avoid an infinite loop"),u8=!0}var K=WZ();if(K===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!mQ(K,Vb))HU(X,z,J)}Z.memoizedState=J;var O={value:J,getSnapshot:z};return Z.queue=O,iX($U.bind(null,X,O,b),[b]),X.flags|=N5,hz(m4|H6,YU.bind(null,X,O,J,z),void 0,null),J}function yX(b,z,Q){var X=g1,Z=Y5(),J=z();if(!u8){var Y=z();if(!n6(J,Y))G("The result of getSnapshot should be cached to avoid an infinite loop"),u8=!0}var $=Z.memoizedState,K=!n6($,J);if(K)Z.memoizedState=J,gz();var O=Z.queue;if(Sz($U.bind(null,X,O,b),[b]),O.getSnapshot!==z||K||y4!==null&&y4.memoizedState.tag&m4){X.flags|=N5,hz(m4|H6,YU.bind(null,X,O,J,z),void 0,null);var N=WZ();if(N===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!mQ(N,Vb))HU(X,z,J)}return J}function HU(b,z,Q){b.flags|=hQ;var X={getSnapshot:z,value:Q},Z=g1.updateQueue;if(Z===null)Z=JU(),g1.updateQueue=Z,Z.stores=[X];else{var J=Z.stores;if(J===null)Z.stores=[X];else J.push(X)}}function YU(b,z,Q,X){if(z.value=Q,z.getSnapshot=X,GU(z))KU(b)}function $U(b,z,Q){var X=function(){if(GU(z))KU(b)};return Q(X)}function GU(b){var{getSnapshot:z,value:Q}=b;try{var X=z();return!n6(Q,X)}catch(Z){return!0}}function KU(b){var z=c6(b,r0);if(z!==null)i4(z,b,r0,H4)}function dX(b){var z=j5();if(typeof b==="function")b=b();z.memoizedState=z.baseState=b;var Q={pending:null,interleaved:null,lanes:z0,dispatch:null,lastRenderedReducer:OY,lastRenderedState:b};z.queue=Q;var X=Q.dispatch=F_.bind(null,g1,Q);return[z.memoizedState,X]}function PY(b){return NY(OY)}function RY(b){return vY(OY)}function hz(b,z,Q,X){var Z={tag:b,create:z,destroy:Q,deps:X,next:null},J=g1.updateQueue;if(J===null)J=JU(),g1.updateQueue=J,J.lastEffect=Z.next=Z;else{var Y=J.lastEffect;if(Y===null)J.lastEffect=Z.next=Z;else{var $=Y.next;Y.next=Z,Z.next=$,J.lastEffect=Z}}return Z}function FY(b){var z=j5();{var Q={current:b};return z.memoizedState=Q,Q}}function aX(b){var z=Y5();return z.memoizedState}function Cz(b,z,Q,X){var Z=j5(),J=X===void 0?null:X;g1.flags|=b,Z.memoizedState=hz(m4|z,Q,void 0,J)}function lX(b,z,Q,X){var Z=Y5(),J=X===void 0?null:X,Y=void 0;if(c4!==null){var $=c4.memoizedState;if(Y=$.destroy,J!==null){var K=$.deps;if(BY(J,K)){Z.memoizedState=hz(z,Q,Y,J);return}}}g1.flags|=b,Z.memoizedState=hz(m4|z,Q,Y,J)}function iX(b,z){if((g1.mode&d5)!==d0)return Cz(CQ|N5|WJ,H6,b,z);else return Cz(N5|WJ,H6,b,z)}function Sz(b,z){return lX(N5,H6,b,z)}function MY(b,z){return Cz(v1,x5,b,z)}function xX(b,z){return lX(v1,x5,b,z)}function kY(b,z){var Q=v1;if(Q|=Lb,(g1.mode&d5)!==d0)Q|=G7;return Cz(Q,g4,b,z)}function jX(b,z){return lX(v1,g4,b,z)}function UU(b,z){if(typeof z==="function"){var Q=z,X=b();return Q(X),function(){Q(null)}}else if(z!==null&&z!==void 0){var Z=z;if(!Z.hasOwnProperty("current"))G("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(Z).join(", ")+"}");var J=b();return Z.current=J,function(){Z.current=null}}}function AY(b,z,Q){if(typeof z!=="function")G("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",z!==null?typeof z:"null");var X=Q!==null&&Q!==void 0?Q.concat([b]):null,Z=v1;if(Z|=Lb,(g1.mode&d5)!==d0)Z|=G7;return Cz(Z,g4,UU.bind(null,z,b),X)}function oX(b,z,Q){if(typeof z!=="function")G("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",z!==null?typeof z:"null");var X=Q!==null&&Q!==void 0?Q.concat([b]):null;return lX(v1,g4,UU.bind(null,z,b),X)}function pX(b,z){}var rX=pX;function wY(b,z){var Q=j5(),X=z===void 0?null:z;return Q.memoizedState=[b,X],b}function nX(b,z){var Q=Y5(),X=z===void 0?null:z,Z=Q.memoizedState;if(Z!==null){if(X!==null){var J=Z[1];if(BY(X,J))return Z[0]}}return Q.memoizedState=[b,X],b}function IY(b,z){var Q=j5(),X=z===void 0?null:z,Z=b();return Q.memoizedState=[Z,X],Z}function tX(b,z){var Q=Y5(),X=z===void 0?null:z,Z=Q.memoizedState;if(Z!==null){if(X!==null){var J=Z[1];if(BY(X,J))return Z[0]}}var Y=b();return Q.memoizedState=[Y,X],Y}function fY(b){var z=j5();return z.memoizedState=b,b}function qU(b){var z=Y5(),Q=c4,X=Q.memoizedState;return OU(z,X,b)}function BU(b){var z=Y5();if(c4===null)return z.memoizedState=b,b;else{var Q=c4.memoizedState;return OU(z,Q,b)}}function OU(b,z,Q){var X=!ZL(Vb);if(X){if(!n6(Q,z)){var Z=G9();g1.lanes=X1(g1.lanes,Z),nz(Z),b.baseState=!0}return z}else{if(b.baseState)b.baseState=!1,gz();return b.memoizedState=Q,Q}}function __(b,z,Q){var X=W5();e4(BL(X,q7)),b(!0);var Z=Iz.transition;Iz.transition={};var J=Iz.transition;Iz.transition._updatedFibers=new Set;try{b(!1),z()}finally{if(e4(X),Iz.transition=Z,Z===null&&J._updatedFibers){var Y=J._updatedFibers.size;if(Y>10)L("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.");J._updatedFibers.clear()}}}function TY(){var b=dX(!1),z=b[0],Q=b[1],X=__.bind(null,Q),Z=j5();return Z.memoizedState=X,[z,X]}function LU(){var b=PY(),z=b[0],Q=Y5(),X=Q.memoizedState;return[z,X]}function NU(){var b=RY(),z=b[0],Q=Y5(),X=Q.memoizedState;return[z,X]}var vU=!1;function P_(){return vU}function hY(){var b=j5(),z=WZ(),Q=z.identifierPrefix,X;if(J6()){var Z=gW();X=":"+Q+"R"+Z;var J=Tz++;if(J>0)X+="H"+J.toString(32);X+=":"}else{var Y=N_++;X=":"+Q+"r"+Y.toString(32)+":"}return b.memoizedState=X,X}function sX(){var b=Y5(),z=b.memoizedState;return z}function R_(b,z,Q){if(typeof arguments[3]==="function")G("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 X=zb(b),Z={lane:X,action:Q,hasEagerState:!1,eagerState:null,next:null};if(WU(b))_U(z,Z);else{var J=oK(b,z,Z,X);if(J!==null){var Y=S6();i4(J,b,X,Y),PU(J,z,X)}}RU(b,X)}function F_(b,z,Q){if(typeof arguments[3]==="function")G("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 X=zb(b),Z={lane:X,action:Q,hasEagerState:!1,eagerState:null,next:null};if(WU(b))_U(z,Z);else{var J=b.alternate;if(b.lanes===z0&&(J===null||J.lanes===z0)){var Y=z.lastRenderedReducer;if(Y!==null){var $;$=P0.current,P0.current=M5;try{var K=z.lastRenderedState,O=Y(K,Q);if(Z.hasEagerState=!0,Z.eagerState=O,n6(O,K)){Y_(b,z,Z,X);return}}catch(f){}finally{P0.current=$}}}var N=oK(b,z,Z,X);if(N!==null){var T=S6();i4(N,b,X,T),PU(N,z,X)}}RU(b,X)}function WU(b){var z=b.alternate;return b===g1||z!==null&&z===g1}function _U(b,z){fz=gX=!0;var Q=b.pending;if(Q===null)z.next=z;else z.next=Q.next,Q.next=z;b.pending=z}function PU(b,z,Q){if($9(Q)){var X=z.lanes;X=K9(X,b.pendingLanes);var Z=X1(X,Q);z.lanes=Z,pJ(b,Z)}}function RU(b,z,Q){MJ(b,z)}var eX={readContext:V4,useCallback:F6,useContext:F6,useEffect:F6,useImperativeHandle:F6,useInsertionEffect:F6,useLayoutEffect:F6,useMemo:F6,useReducer:F6,useRef:F6,useState:F6,useDebugValue:F6,useDeferredValue:F6,useTransition:F6,useMutableSource:F6,useSyncExternalStore:F6,useId:F6,unstable_isNewReconciler:S0},FU=null,MU=null,kU=null,AU=null,o5=null,M5=null,bZ=null;{var CY=function(){G("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().")},n0=function(){G("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")};FU={readContext:function(b){return V4(b)},useCallback:function(b,z){return o="useCallback",T1(),m8(z),wY(b,z)},useContext:function(b){return o="useContext",T1(),V4(b)},useEffect:function(b,z){return o="useEffect",T1(),m8(z),iX(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",T1(),m8(Q),AY(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",T1(),m8(z),MY(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",T1(),m8(z),kY(b,z)},useMemo:function(b,z){o="useMemo",T1(),m8(z);var Q=P0.current;P0.current=o5;try{return IY(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",T1();var X=P0.current;P0.current=o5;try{return LY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",T1(),FY(b)},useState:function(b){o="useState",T1();var z=P0.current;P0.current=o5;try{return dX(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",T1(),pX()},useDeferredValue:function(b){return o="useDeferredValue",T1(),fY(b)},useTransition:function(){return o="useTransition",T1(),TY()},useMutableSource:function(b,z,Q){return o="useMutableSource",T1(),WY()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",T1(),_Y(b,z,Q)},useId:function(){return o="useId",T1(),hY()},unstable_isNewReconciler:S0},MU={readContext:function(b){return V4(b)},useCallback:function(b,z){return o="useCallback",B0(),wY(b,z)},useContext:function(b){return o="useContext",B0(),V4(b)},useEffect:function(b,z){return o="useEffect",B0(),iX(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",B0(),AY(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",B0(),MY(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",B0(),kY(b,z)},useMemo:function(b,z){o="useMemo",B0();var Q=P0.current;P0.current=o5;try{return IY(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",B0();var X=P0.current;P0.current=o5;try{return LY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",B0(),FY(b)},useState:function(b){o="useState",B0();var z=P0.current;P0.current=o5;try{return dX(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",B0(),pX()},useDeferredValue:function(b){return o="useDeferredValue",B0(),fY(b)},useTransition:function(){return o="useTransition",B0(),TY()},useMutableSource:function(b,z,Q){return o="useMutableSource",B0(),WY()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",B0(),_Y(b,z,Q)},useId:function(){return o="useId",B0(),hY()},unstable_isNewReconciler:S0},kU={readContext:function(b){return V4(b)},useCallback:function(b,z){return o="useCallback",B0(),nX(b,z)},useContext:function(b){return o="useContext",B0(),V4(b)},useEffect:function(b,z){return o="useEffect",B0(),Sz(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",B0(),oX(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",B0(),xX(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",B0(),jX(b,z)},useMemo:function(b,z){o="useMemo",B0();var Q=P0.current;P0.current=M5;try{return tX(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",B0();var X=P0.current;P0.current=M5;try{return NY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",B0(),aX()},useState:function(b){o="useState",B0();var z=P0.current;P0.current=M5;try{return PY(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",B0(),rX()},useDeferredValue:function(b){return o="useDeferredValue",B0(),qU(b)},useTransition:function(){return o="useTransition",B0(),LU()},useMutableSource:function(b,z,Q){return o="useMutableSource",B0(),cX()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",B0(),yX(b,z)},useId:function(){return o="useId",B0(),sX()},unstable_isNewReconciler:S0},AU={readContext:function(b){return V4(b)},useCallback:function(b,z){return o="useCallback",B0(),nX(b,z)},useContext:function(b){return o="useContext",B0(),V4(b)},useEffect:function(b,z){return o="useEffect",B0(),Sz(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",B0(),oX(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",B0(),xX(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",B0(),jX(b,z)},useMemo:function(b,z){o="useMemo",B0();var Q=P0.current;P0.current=bZ;try{return tX(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",B0();var X=P0.current;P0.current=bZ;try{return vY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",B0(),aX()},useState:function(b){o="useState",B0();var z=P0.current;P0.current=bZ;try{return RY(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",B0(),rX()},useDeferredValue:function(b){return o="useDeferredValue",B0(),BU(b)},useTransition:function(){return o="useTransition",B0(),NU()},useMutableSource:function(b,z,Q){return o="useMutableSource",B0(),cX()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",B0(),yX(b,z)},useId:function(){return o="useId",B0(),sX()},unstable_isNewReconciler:S0},o5={readContext:function(b){return CY(),V4(b)},useCallback:function(b,z){return o="useCallback",n0(),T1(),wY(b,z)},useContext:function(b){return o="useContext",n0(),T1(),V4(b)},useEffect:function(b,z){return o="useEffect",n0(),T1(),iX(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",n0(),T1(),AY(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",n0(),T1(),MY(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",n0(),T1(),kY(b,z)},useMemo:function(b,z){o="useMemo",n0(),T1();var Q=P0.current;P0.current=o5;try{return IY(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",n0(),T1();var X=P0.current;P0.current=o5;try{return LY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",n0(),T1(),FY(b)},useState:function(b){o="useState",n0(),T1();var z=P0.current;P0.current=o5;try{return dX(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",n0(),T1(),pX()},useDeferredValue:function(b){return o="useDeferredValue",n0(),T1(),fY(b)},useTransition:function(){return o="useTransition",n0(),T1(),TY()},useMutableSource:function(b,z,Q){return o="useMutableSource",n0(),T1(),WY()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",n0(),T1(),_Y(b,z,Q)},useId:function(){return o="useId",n0(),T1(),hY()},unstable_isNewReconciler:S0},M5={readContext:function(b){return CY(),V4(b)},useCallback:function(b,z){return o="useCallback",n0(),B0(),nX(b,z)},useContext:function(b){return o="useContext",n0(),B0(),V4(b)},useEffect:function(b,z){return o="useEffect",n0(),B0(),Sz(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",n0(),B0(),oX(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",n0(),B0(),xX(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",n0(),B0(),jX(b,z)},useMemo:function(b,z){o="useMemo",n0(),B0();var Q=P0.current;P0.current=M5;try{return tX(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",n0(),B0();var X=P0.current;P0.current=M5;try{return NY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",n0(),B0(),aX()},useState:function(b){o="useState",n0(),B0();var z=P0.current;P0.current=M5;try{return PY(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",n0(),B0(),rX()},useDeferredValue:function(b){return o="useDeferredValue",n0(),B0(),qU(b)},useTransition:function(){return o="useTransition",n0(),B0(),LU()},useMutableSource:function(b,z,Q){return o="useMutableSource",n0(),B0(),cX()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",n0(),B0(),yX(b,z)},useId:function(){return o="useId",n0(),B0(),sX()},unstable_isNewReconciler:S0},bZ={readContext:function(b){return CY(),V4(b)},useCallback:function(b,z){return o="useCallback",n0(),B0(),nX(b,z)},useContext:function(b){return o="useContext",n0(),B0(),V4(b)},useEffect:function(b,z){return o="useEffect",n0(),B0(),Sz(b,z)},useImperativeHandle:function(b,z,Q){return o="useImperativeHandle",n0(),B0(),oX(b,z,Q)},useInsertionEffect:function(b,z){return o="useInsertionEffect",n0(),B0(),xX(b,z)},useLayoutEffect:function(b,z){return o="useLayoutEffect",n0(),B0(),jX(b,z)},useMemo:function(b,z){o="useMemo",n0(),B0();var Q=P0.current;P0.current=M5;try{return tX(b,z)}finally{P0.current=Q}},useReducer:function(b,z,Q){o="useReducer",n0(),B0();var X=P0.current;P0.current=M5;try{return vY(b,z,Q)}finally{P0.current=X}},useRef:function(b){return o="useRef",n0(),B0(),aX()},useState:function(b){o="useState",n0(),B0();var z=P0.current;P0.current=M5;try{return RY(b)}finally{P0.current=z}},useDebugValue:function(b,z){return o="useDebugValue",n0(),B0(),rX()},useDeferredValue:function(b){return o="useDeferredValue",n0(),B0(),BU(b)},useTransition:function(){return o="useTransition",n0(),B0(),NU()},useMutableSource:function(b,z,Q){return o="useMutableSource",n0(),B0(),cX()},useSyncExternalStore:function(b,z,Q){return o="useSyncExternalStore",n0(),B0(),yX(b,z)},useId:function(){return o="useId",n0(),B0(),sX()},unstable_isNewReconciler:S0}}var t7=d1.unstable_now,wU=0,zZ=-1,Vz=-1,QZ=-1,SY=!1,XZ=!1;function IU(){return SY}function M_(){XZ=!0}function k_(){SY=!1,XZ=!1}function A_(){SY=XZ,XZ=!1}function fU(){return wU}function TU(){wU=t7()}function VY(b){if(Vz=t7(),b.actualStartTime<0)b.actualStartTime=t7()}function hU(b){Vz=-1}function ZZ(b,z){if(Vz>=0){var Q=t7()-Vz;if(b.actualDuration+=Q,z)b.selfBaseDuration=Q;Vz=-1}}function p5(b){if(zZ>=0){var z=t7()-zZ;zZ=-1;var Q=b.return;while(Q!==null){switch(Q.tag){case w:var X=Q.stateNode;X.effectDuration+=z;return;case v0:var Z=Q.stateNode;Z.effectDuration+=z;return}Q=Q.return}}}function DY(b){if(QZ>=0){var z=t7()-QZ;QZ=-1;var Q=b.return;while(Q!==null){switch(Q.tag){case w:var X=Q.stateNode;if(X!==null)X.passiveEffectDuration+=z;return;case v0:var Z=Q.stateNode;if(Z!==null)Z.passiveEffectDuration+=z;return}Q=Q.return}}}function r5(){zZ=t7()}function EY(){QZ=t7()}function uY(b){var z=b.child;while(z)b.actualDuration+=z.actualDuration,z=z.sibling}function k5(b,z){if(b&&b.defaultProps){var Q=Z1({},z),X=b.defaultProps;for(var Z in X)if(Q[Z]===void 0)Q[Z]=X[Z];return Q}return z}var mY={},gY,cY,yY,dY,aY,CU,JZ,lY,iY,xY,Dz;{gY=new Set,cY=new Set,yY=new Set,dY=new Set,lY=new Set,aY=new Set,iY=new Set,xY=new Set,Dz=new Set;var SU=new Set;JZ=function(b,z){if(b===null||typeof b==="function")return;var Q=z+"_"+b;if(!SU.has(Q))SU.add(Q),G("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",z,b)},CU=function(b,z){if(z===void 0){var Q=R1(b)||"Component";if(!aY.has(Q))aY.add(Q),G("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",Q)}},Object.defineProperty(mY,"_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(mY)}function jY(b,z,Q,X){var Z=b.memoizedState,J=Q(X,Z);{if(b.mode&M4){t4(!0);try{J=Q(X,Z)}finally{t4(!1)}}CU(z,J)}var Y=J===null||J===void 0?Z:Z1({},Z,J);if(b.memoizedState=Y,b.lanes===z0){var $=b.updateQueue;$.baseState=Y}}var oY={isMounted:vO,enqueueSetState:function(b,z,Q){var X=$8(b),Z=S6(),J=zb(X),Y=_7(Z,J);if(Y.payload=z,Q!==void 0&&Q!==null)JZ(Q,"setState"),Y.callback=Q;var $=o7(X,Y,J);if($!==null)i4($,X,J,Z),SX($,X,J);MJ(X,J)},enqueueReplaceState:function(b,z,Q){var X=$8(b),Z=S6(),J=zb(X),Y=_7(Z,J);if(Y.tag=rK,Y.payload=z,Q!==void 0&&Q!==null)JZ(Q,"replaceState"),Y.callback=Q;var $=o7(X,Y,J);if($!==null)i4($,X,J,Z),SX($,X,J);MJ(X,J)},enqueueForceUpdate:function(b,z){var Q=$8(b),X=S6(),Z=zb(Q),J=_7(X,Z);if(J.tag=TX,z!==void 0&&z!==null)JZ(z,"forceUpdate"),J.callback=z;var Y=o7(Q,J,Z);if(Y!==null)i4(Y,Q,Z,X),SX(Y,Q,Z);pO(Q,Z)}};function VU(b,z,Q,X,Z,J,Y){var $=b.stateNode;if(typeof $.shouldComponentUpdate==="function"){var K=$.shouldComponentUpdate(X,J,Y);{if(b.mode&M4){t4(!0);try{K=$.shouldComponentUpdate(X,J,Y)}finally{t4(!1)}}if(K===void 0)G("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",R1(z)||"Component")}return K}if(z.prototype&&z.prototype.isPureReactComponent)return!Qz(Q,X)||!Qz(Z,J);return!0}function w_(b,z,Q){var X=b.stateNode;{var Z=R1(z)||"Component",J=X.render;if(!J)if(z.prototype&&typeof z.prototype.render==="function")G("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",Z);else G("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",Z);if(X.getInitialState&&!X.getInitialState.isReactClassApproved&&!X.state)G("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?",Z);if(X.getDefaultProps&&!X.getDefaultProps.isReactClassApproved)G("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.",Z);if(X.propTypes)G("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",Z);if(X.contextType)G("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",Z);{if(z.childContextTypes&&!Dz.has(z)&&(b.mode&M4)===d0)Dz.add(z),G(`%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`,Z);if(z.contextTypes&&!Dz.has(z)&&(b.mode&M4)===d0)Dz.add(z),G(`%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`,Z);if(X.contextTypes)G("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",Z);if(z.contextType&&z.contextTypes&&!iY.has(z))iY.add(z),G("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",Z)}if(typeof X.componentShouldUpdate==="function")G("%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.",Z);if(z.prototype&&z.prototype.isPureReactComponent&&typeof X.shouldComponentUpdate<"u")G("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",R1(z)||"A pure component");if(typeof X.componentDidUnmount==="function")G("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",Z);if(typeof X.componentDidReceiveProps==="function")G("%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().",Z);if(typeof X.componentWillRecieveProps==="function")G("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",Z);if(typeof X.UNSAFE_componentWillRecieveProps==="function")G("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",Z);var Y=X.props!==Q;if(X.props!==void 0&&Y)G("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",Z,Z);if(X.defaultProps)G("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",Z,Z);if(typeof X.getSnapshotBeforeUpdate==="function"&&typeof X.componentDidUpdate!=="function"&&!yY.has(z))yY.add(z),G("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",R1(z));if(typeof X.getDerivedStateFromProps==="function")G("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Z);if(typeof X.getDerivedStateFromError==="function")G("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Z);if(typeof z.getSnapshotBeforeUpdate==="function")G("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",Z);var $=X.state;if($&&(typeof $!=="object"||A1($)))G("%s.state: must be set to an object or null",Z);if(typeof X.getChildContext==="function"&&typeof z.childContextTypes!=="object")G("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",Z)}}function DU(b,z){z.updater=oY,b.stateNode=z,qO(z,b),z._reactInternalInstance=mY}function EU(b,z,Q){var X=!1,Z=t6,J=t6,Y=z.contextType;if("contextType"in z){var $=Y===null||Y!==void 0&&Y.$$typeof===v&&Y._context===void 0;if(!$&&!xY.has(z)){xY.add(z);var K="";if(Y===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 Y!=="object")K=" However, it is set to a "+typeof Y+".";else if(Y.$$typeof===b0)K=" Did you accidentally pass the Context.Provider instead?";else if(Y._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(Y).join(", ")+"}.";G("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",R1(z)||"Component",K)}}if(typeof Y==="object"&&Y!==null)J=V4(Y);else{Z=A8(b,z,!0);var O=z.contextTypes;X=O!==null&&O!==void 0,J=X?w8(b,Z):t6}var N=new z(Q,J);if(b.mode&M4){t4(!0);try{N=new z(Q,J)}finally{t4(!1)}}var T=b.memoizedState=N.state!==null&&N.state!==void 0?N.state:null;DU(b,N);{if(typeof z.getDerivedStateFromProps==="function"&&T===null){var f=R1(z)||"Component";if(!cY.has(f))cY.add(f),G("`%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.",f,N.state===null?"null":"undefined",f)}if(typeof z.getDerivedStateFromProps==="function"||typeof N.getSnapshotBeforeUpdate==="function"){var g=null,c=null,a=null;if(typeof N.componentWillMount==="function"&&N.componentWillMount.__suppressDeprecationWarning!==!0)g="componentWillMount";else if(typeof N.UNSAFE_componentWillMount==="function")g="UNSAFE_componentWillMount";if(typeof N.componentWillReceiveProps==="function"&&N.componentWillReceiveProps.__suppressDeprecationWarning!==!0)c="componentWillReceiveProps";else if(typeof N.UNSAFE_componentWillReceiveProps==="function")c="UNSAFE_componentWillReceiveProps";if(typeof N.componentWillUpdate==="function"&&N.componentWillUpdate.__suppressDeprecationWarning!==!0)a="componentWillUpdate";else if(typeof N.UNSAFE_componentWillUpdate==="function")a="UNSAFE_componentWillUpdate";if(g!==null||c!==null||a!==null){var N0=R1(z)||"Component",m0=typeof z.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!dY.has(N0))dY.add(N0),G(`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`,N0,m0,g!==null?`
|
|
94
|
+
`+g:"",c!==null?`
|
|
95
|
+
`+c:"",a!==null?`
|
|
96
|
+
`+a:"")}}}if(X)kK(b,Z,J);return N}function I_(b,z){var Q=z.state;if(typeof z.componentWillMount==="function")z.componentWillMount();if(typeof z.UNSAFE_componentWillMount==="function")z.UNSAFE_componentWillMount();if(Q!==z.state)G("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Q1(b)||"Component"),oY.enqueueReplaceState(z,z.state,null)}function uU(b,z,Q,X){var Z=z.state;if(typeof z.componentWillReceiveProps==="function")z.componentWillReceiveProps(Q,X);if(typeof z.UNSAFE_componentWillReceiveProps==="function")z.UNSAFE_componentWillReceiveProps(Q,X);if(z.state!==Z){{var J=Q1(b)||"Component";if(!gY.has(J))gY.add(J),G("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J)}oY.enqueueReplaceState(z,z.state,null)}}function pY(b,z,Q,X){w_(b,z,Q);var Z=b.stateNode;Z.props=Q,Z.state=b.memoizedState,Z.refs={},QY(b);var J=z.contextType;if(typeof J==="object"&&J!==null)Z.context=V4(J);else{var Y=A8(b,z,!0);Z.context=w8(b,Y)}{if(Z.state===Q){var $=R1(z)||"Component";if(!lY.has($))lY.add($),G("%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.",$)}if(b.mode&M4)R5.recordLegacyContextWarning(b,Z);R5.recordUnsafeLifecycleWarnings(b,Z)}Z.state=b.memoizedState;var K=z.getDerivedStateFromProps;if(typeof K==="function")jY(b,z,K,Q),Z.state=b.memoizedState;if(typeof z.getDerivedStateFromProps!=="function"&&typeof Z.getSnapshotBeforeUpdate!=="function"&&(typeof Z.UNSAFE_componentWillMount==="function"||typeof Z.componentWillMount==="function"))I_(b,Z),VX(b,Q,Z,X),Z.state=b.memoizedState;if(typeof Z.componentDidMount==="function"){var O=v1;if(O|=Lb,(b.mode&d5)!==d0)O|=G7;b.flags|=O}}function f_(b,z,Q,X){var{stateNode:Z,memoizedProps:J}=b;Z.props=J;var Y=Z.context,$=z.contextType,K=t6;if(typeof $==="object"&&$!==null)K=V4($);else{var O=A8(b,z,!0);K=w8(b,O)}var N=z.getDerivedStateFromProps,T=typeof N==="function"||typeof Z.getSnapshotBeforeUpdate==="function";if(!T&&(typeof Z.UNSAFE_componentWillReceiveProps==="function"||typeof Z.componentWillReceiveProps==="function")){if(J!==Q||Y!==K)uU(b,Z,Q,K)}tK();var f=b.memoizedState,g=Z.state=f;if(VX(b,Q,Z,X),g=b.memoizedState,J===Q&&f===g&&!OX()&&!DX()){if(typeof Z.componentDidMount==="function"){var c=v1;if(c|=Lb,(b.mode&d5)!==d0)c|=G7;b.flags|=c}return!1}if(typeof N==="function")jY(b,z,N,Q),g=b.memoizedState;var a=DX()||VU(b,z,J,Q,f,g,K);if(a){if(!T&&(typeof Z.UNSAFE_componentWillMount==="function"||typeof Z.componentWillMount==="function")){if(typeof Z.componentWillMount==="function")Z.componentWillMount();if(typeof Z.UNSAFE_componentWillMount==="function")Z.UNSAFE_componentWillMount()}if(typeof Z.componentDidMount==="function"){var N0=v1;if(N0|=Lb,(b.mode&d5)!==d0)N0|=G7;b.flags|=N0}}else{if(typeof Z.componentDidMount==="function"){var m0=v1;if(m0|=Lb,(b.mode&d5)!==d0)m0|=G7;b.flags|=m0}b.memoizedProps=Q,b.memoizedState=g}return Z.props=Q,Z.state=g,Z.context=K,a}function T_(b,z,Q,X,Z){var J=z.stateNode;nK(b,z);var Y=z.memoizedProps,$=z.type===z.elementType?Y:k5(z.type,Y);J.props=$;var K=z.pendingProps,O=J.context,N=Q.contextType,T=t6;if(typeof N==="object"&&N!==null)T=V4(N);else{var f=A8(z,Q,!0);T=w8(z,f)}var g=Q.getDerivedStateFromProps,c=typeof g==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!c&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if(Y!==K||O!==T)uU(z,J,X,T)}tK();var a=z.memoizedState,N0=J.state=a;if(VX(z,X,J,Z),N0=z.memoizedState,Y===K&&a===N0&&!OX()&&!DX()&&!_1){if(typeof J.componentDidUpdate==="function"){if(Y!==b.memoizedProps||a!==b.memoizedState)z.flags|=v1}if(typeof J.getSnapshotBeforeUpdate==="function"){if(Y!==b.memoizedProps||a!==b.memoizedState)z.flags|=Bb}return!1}if(typeof g==="function")jY(z,Q,g,X),N0=z.memoizedState;var m0=DX()||VU(z,Q,$,X,a,N0,T)||_1;if(m0){if(!c&&(typeof J.UNSAFE_componentWillUpdate==="function"||typeof J.componentWillUpdate==="function")){if(typeof J.componentWillUpdate==="function")J.componentWillUpdate(X,N0,T);if(typeof J.UNSAFE_componentWillUpdate==="function")J.UNSAFE_componentWillUpdate(X,N0,T)}if(typeof J.componentDidUpdate==="function")z.flags|=v1;if(typeof J.getSnapshotBeforeUpdate==="function")z.flags|=Bb}else{if(typeof J.componentDidUpdate==="function"){if(Y!==b.memoizedProps||a!==b.memoizedState)z.flags|=v1}if(typeof J.getSnapshotBeforeUpdate==="function"){if(Y!==b.memoizedProps||a!==b.memoizedState)z.flags|=Bb}z.memoizedProps=X,z.memoizedState=N0}return J.props=X,J.state=N0,J.context=T,m0}function Db(b,z){return{value:b,source:z,stack:F3(z),digest:null}}function rY(b,z,Q){return{value:b,source:null,stack:Q!=null?Q:null,digest:z!=null?z:null}}function h_(b,z){return!0}function nY(b,z){try{var Q=h_(b,z);if(Q===!1)return;var{value:X,source:Z,stack:J}=z,Y=J!==null?J:"";if(X!=null&&X._suppressLogging){if(b.tag===W)return;console.error(X)}var $=Z?Q1(Z):null,K=$?"The above error occurred in the <"+$+"> component:":"The above error occurred in one of your React components:",O;if(b.tag===w)O=`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 N=Q1(b)||"Anonymous";O="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+N+".")}var T=K+`
|
|
98
|
+
`+Y+`
|
|
99
|
+
|
|
100
|
+
`+(""+O);console.error(T)}catch(f){setTimeout(function(){throw f})}}var C_=typeof WeakMap==="function"?WeakMap:Map;function mU(b,z,Q){var X=_7(H4,Q);X.tag=bY,X.payload={element:null};var Z=z.value;return X.callback=function(){fR(Z),nY(b,z)},X}function tY(b,z,Q){var X=_7(H4,Q);X.tag=bY;var Z=b.type.getDerivedStateFromError;if(typeof Z==="function"){var J=z.value;X.payload=function(){return Z(J)},X.callback=function(){rq(b),nY(b,z)}}var Y=b.stateNode;if(Y!==null&&typeof Y.componentDidCatch==="function")X.callback=function(){if(rq(b),nY(b,z),typeof Z!=="function")wR(this);var{value:K,stack:O}=z;if(this.componentDidCatch(K,{componentStack:O!==null?O:""}),typeof Z!=="function"){if(!o6(b.lanes,r0))G("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Q1(b)||"Unknown")}};return X}function gU(b,z,Q){var X=b.pingCache,Z;if(X===null)X=b.pingCache=new C_,Z=new Set,X.set(z,Z);else if(Z=X.get(z),Z===void 0)Z=new Set,X.set(z,Z);if(!Z.has(Q)){Z.add(Q);var J=TR.bind(null,b,z,Q);if(v5)tz(b,Q);z.then(J,J)}}function S_(b,z,Q,X){var Z=b.updateQueue;if(Z===null){var J=new Set;J.add(Q),b.updateQueue=J}else Z.add(Q)}function V_(b,z){var Q=b.tag;if((b.mode&B1)===d0&&(Q===R||Q===u||Q===n)){var X=b.alternate;if(X)b.updateQueue=X.updateQueue,b.memoizedState=X.memoizedState,b.lanes=X.lanes;else b.updateQueue=null,b.memoizedState=null}}function cU(b){var z=b;do{if(z.tag===s&&O_(z))return z;z=z.return}while(z!==null);return null}function yU(b,z,Q,X,Z){if((b.mode&B1)===d0){if(b===z)b.flags|=T6;else{if(b.flags|=w1,Q.flags|=NJ,Q.flags&=~(BO|V3),Q.tag===W){var J=Q.alternate;if(J===null)Q.tag=j;else{var Y=_7(H4,r0);Y.tag=TX,o7(Q,Y,r0)}}Q.lanes=X1(Q.lanes,r0)}return b}return b.flags|=T6,b.lanes=Z,b}function D_(b,z,Q,X,Z){if(Q.flags|=V3,v5)tz(b,Z);if(X!==null&&typeof X==="object"&&typeof X.then==="function"){var J=X;if(V_(Q),J6()&&Q.mode&B1)CK();var Y=cU(z);if(Y!==null){if(Y.flags&=~Y7,yU(Y,z,Q,b,Z),Y.mode&B1)gU(b,J,Z);S_(Y,b,J);return}else{if(!XL(Z)){gU(b,J,Z),C$();return}var $=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.");X=$}}else if(J6()&&Q.mode&B1){CK();var K=cU(z);if(K!==null){if((K.flags&T6)===l0)K.flags|=Y7;yU(K,z,Q,b,Z),aH(Db(X,Q));return}}X=Db(X,Q),WR(X);var O=z;do{switch(O.tag){case w:{var N=X;O.flags|=T6;var T=d3(Z);O.lanes=X1(O.lanes,T);var f=mU(O,N,T);XY(O,f);return}case W:var g=X,c=O.type,a=O.stateNode;if((O.flags&w1)===l0&&(typeof c.getDerivedStateFromError==="function"||a!==null&&typeof a.componentDidCatch==="function"&&!yq(a))){O.flags|=T6;var N0=d3(Z);O.lanes=X1(O.lanes,N0);var m0=tY(O,g,N0);XY(O,m0);return}break}O=O.return}while(O!==null)}function E_(){return null}var Ez=H.ReactCurrentOwner,A5=!1,sY,uz,eY,b$,z$,Eb,Q$,HZ,mz;sY={},uz={},eY={},b$={},z$={},Eb=!1,Q$={},HZ={},mz={};function h6(b,z,Q,X){if(b===null)z.child=lK(z,null,Q,X);else z.child=h8(z,b.child,Q,X)}function u_(b,z,Q,X){z.child=h8(z,b.child,null,X),z.child=h8(z,null,Q,X)}function dU(b,z,Q,X,Z){if(z.type!==z.elementType){var J=Q.propTypes;if(J)_5(J,X,"prop",R1(Q))}var Y=Q.render,$=z.ref,K,O;S8(z,Z),E3(z);{if(Ez.current=z,x6(!0),K=g8(b,z,Y,X,$,Z),O=c8(),z.mode&M4){t4(!0);try{K=g8(b,z,Y,X,$,Z),O=c8()}finally{t4(!1)}}x6(!1)}if(U8(),b!==null&&!A5)return XU(b,z,Z),P7(b,z,Z);if(J6()&&O)uH(z);return z.flags|=G8,h6(b,z,K,Z),z.child}function aU(b,z,Q,X,Z){if(b===null){var J=Q.type;if(jR(J)&&Q.compare===null&&Q.defaultProps===void 0){var Y=J;return Y=o8(J),z.tag=n,z.type=Y,J$(z,J),lU(b,z,Y,X,Z)}{var $=J.propTypes;if($)_5($,X,"prop",R1(J));if(Q.defaultProps!==void 0){var K=R1(J)||"Unknown";if(!mz[K])G("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",K),mz[K]=!0}}var O=a$(Q.type,null,X,z,z.mode,Z);return O.ref=z.ref,O.return=z,z.child=O,O}{var N=Q.type,T=N.propTypes;if(T)_5(T,X,"prop",R1(N))}var f=b.child,g=U$(b,Z);if(!g){var c=f.memoizedProps,a=Q.compare;if(a=a!==null?a:Qz,a(c,X)&&b.ref===z.ref)return P7(b,z,Z)}z.flags|=G8;var N0=yb(f,X);return N0.ref=z.ref,N0.return=z,z.child=N0,N0}function lU(b,z,Q,X,Z){if(z.type!==z.elementType){var J=z.elementType;if(J.$$typeof===f0){var Y=J,$=Y._payload,K=Y._init;try{J=K($)}catch(T){J=null}var O=J&&J.propTypes;if(O)_5(O,X,"prop",R1(J))}}if(b!==null){var N=b.memoizedProps;if(Qz(N,X)&&b.ref===z.ref&&z.type===b.type){if(A5=!1,z.pendingProps=X=N,!U$(b,Z))return z.lanes=b.lanes,P7(b,z,Z);else if((b.flags&NJ)!==l0)A5=!0}}return X$(b,z,Q,X,Z)}function iU(b,z,Q){var X=z.pendingProps,Z=X.children,J=b!==null?b.memoizedState:null;if(X.mode==="hidden"||H1)if((z.mode&B1)===d0){var Y={baseLanes:z0,cachePool:null,transitions:null};z.memoizedState=Y,_Z(z,Q)}else if(!o6(Q,j6)){var $=null,K;if(J!==null){var O=J.baseLanes;K=X1(O,Q)}else K=Q;z.lanes=z.childLanes=cQ(j6);var N={baseLanes:K,cachePool:$,transitions:null};return z.memoizedState=N,z.updateQueue=null,_Z(z,K),null}else{var T={baseLanes:z0,cachePool:null,transitions:null};z.memoizedState=T;var f=J!==null?J.baseLanes:Q;_Z(z,f)}else{var g;if(J!==null)g=X1(J.baseLanes,Q),z.memoizedState=null;else g=Q;_Z(z,g)}return h6(b,z,Z,Q),z.child}function m_(b,z,Q){var X=z.pendingProps;return h6(b,z,X,Q),z.child}function g_(b,z,Q){var X=z.pendingProps.children;return h6(b,z,X,Q),z.child}function c_(b,z,Q){{z.flags|=v1;{var X=z.stateNode;X.effectDuration=0,X.passiveEffectDuration=0}}var Z=z.pendingProps,J=Z.children;return h6(b,z,J,Q),z.child}function xU(b,z){var Q=z.ref;if(b===null&&Q!==null||b!==null&&b.ref!==Q)z.flags|=E7,z.flags|=vJ}function X$(b,z,Q,X,Z){if(z.type!==z.elementType){var J=Q.propTypes;if(J)_5(J,X,"prop",R1(Q))}var Y;{var $=A8(z,Q,!0);Y=w8(z,$)}var K,O;S8(z,Z),E3(z);{if(Ez.current=z,x6(!0),K=g8(b,z,Q,X,Y,Z),O=c8(),z.mode&M4){t4(!0);try{K=g8(b,z,Q,X,Y,Z),O=c8()}finally{t4(!1)}}x6(!1)}if(U8(),b!==null&&!A5)return XU(b,z,Z),P7(b,z,Z);if(J6()&&O)uH(z);return z.flags|=G8,h6(b,z,K,Z),z.child}function jU(b,z,Q,X,Z){{switch(YF(z)){case!1:{var{stateNode:J,type:Y}=z,$=new Y(z.memoizedProps,J.context),K=$.state;J.updater.enqueueSetState(J,K,null);break}case!0:{z.flags|=w1,z.flags|=T6;var O=Error("Simulated error coming from DevTools"),N=d3(Z);z.lanes=X1(z.lanes,N);var T=tY(z,Db(O,z),N);XY(z,T);break}}if(z.type!==z.elementType){var f=Q.propTypes;if(f)_5(f,X,"prop",R1(Q))}}var g;if(i5(Q))g=!0,NX(z);else g=!1;S8(z,Z);var c=z.stateNode,a;if(c===null)$Z(b,z),EU(z,Q,X),pY(z,Q,X,Z),a=!0;else if(b===null)a=f_(z,Q,X,Z);else a=T_(b,z,Q,X,Z);var N0=Z$(b,z,Q,a,g,Z);{var m0=z.stateNode;if(a&&m0.props!==X){if(!Eb)G("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Q1(z)||"a component");Eb=!0}}return N0}function Z$(b,z,Q,X,Z,J){xU(b,z);var Y=(z.flags&w1)!==l0;if(!X&&!Y){if(Z)IK(z,Q,!1);return P7(b,z,J)}var $=z.stateNode;Ez.current=z;var K;if(Y&&typeof Q.getDerivedStateFromError!=="function")K=null,hU();else{E3(z);{if(x6(!0),K=$.render(),z.mode&M4){t4(!0);try{$.render()}finally{t4(!1)}}x6(!1)}U8()}if(z.flags|=G8,b!==null&&Y)u_(b,z,K,J);else h6(b,z,K,J);if(z.memoizedState=$.state,Z)IK(z,Q,!0);return z.child}function oU(b){var z=b.stateNode;if(z.pendingContext)AK(b,z.pendingContext,z.pendingContext!==z.context);else if(z.context)AK(b,z.context,!1);ZY(b,z.containerInfo)}function y_(b,z,Q){if(oU(z),b===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:X,memoizedState:Z}=z,J=Z.element;nK(b,z),VX(z,X,null,Q);var{memoizedState:Y,stateNode:$}=z,K=Y.element;if(Z.isDehydrated){var O={element:K,isDehydrated:!1,cache:Y.cache,pendingSuspenseBoundaries:Y.pendingSuspenseBoundaries,transitions:Y.transitions},N=z.updateQueue;if(N.baseState=O,z.memoizedState=O,z.flags&Y7){var T=Db(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),z);return pU(b,z,K,Q,T)}else if(K!==J){var f=Db(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),z);return pU(b,z,K,Q,f)}else{iW(z);var g=lK(z,null,K,Q);z.child=g;var c=g;while(c)c.flags=c.flags&~S4|$7,c=c.sibling}}else{if(T8(),K===J)return P7(b,z,Q);h6(b,z,K,Q)}return z.child}function pU(b,z,Q,X,Z){return T8(),aH(Z),z.flags|=Y7,h6(b,z,Q,X),z.child}function d_(b,z,Q){if(bU(z),b===null)dH(z);var{type:X,pendingProps:Z}=z,J=b!==null?b.memoizedProps:null,Y=Z.children,$=MH(X,Z);if($)Y=null;else if(J!==null&&MH(X,J))z.flags|=S3;return xU(b,z),h6(b,z,Y,Q),z.child}function a_(b,z){if(b===null)dH(z);return null}function l_(b,z,Q,X){$Z(b,z);var Z=z.pendingProps,J=Q,Y=J._payload,$=J._init,K=$(Y);z.type=K;var O=z.tag=oR(K),N=k5(K,Z),T;switch(O){case R:return J$(z,K),z.type=K=o8(K),T=X$(null,z,K,N,X),T;case W:return z.type=K=u$(K),T=jU(null,z,K,N,X),T;case u:return z.type=K=m$(K),T=dU(null,z,K,N,X),T;case Q0:{if(z.type!==z.elementType){var f=K.propTypes;if(f)_5(f,N,"prop",R1(K))}return T=aU(null,z,K,k5(K.type,N),X),T}}var g="";if(K!==null&&typeof K==="object"&&K.$$typeof===f0)g=" 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."+g))}function i_(b,z,Q,X,Z){$Z(b,z),z.tag=W;var J;if(i5(Q))J=!0,NX(z);else J=!1;return S8(z,Z),EU(z,Q,X),pY(z,Q,X,Z),Z$(null,z,Q,!0,J,Z)}function x_(b,z,Q,X){$Z(b,z);var Z=z.pendingProps,J;{var Y=A8(z,Q,!1);J=w8(z,Y)}S8(z,X);var $,K;E3(z);{if(Q.prototype&&typeof Q.prototype.render==="function"){var O=R1(Q)||"Unknown";if(!sY[O])G("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.",O,O),sY[O]=!0}if(z.mode&M4)R5.recordLegacyContextWarning(z,null);x6(!0),Ez.current=z,$=g8(null,z,Q,Z,J,X),K=c8(),x6(!1)}if(U8(),z.flags|=G8,typeof $==="object"&&$!==null&&typeof $.render==="function"&&$.$$typeof===void 0){var N=R1(Q)||"Unknown";if(!uz[N])G("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.",N,N,N),uz[N]=!0}if(typeof $==="object"&&$!==null&&typeof $.render==="function"&&$.$$typeof===void 0){{var T=R1(Q)||"Unknown";if(!uz[T])G("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.",T,T,T),uz[T]=!0}z.tag=W,z.memoizedState=null,z.updateQueue=null;var f=!1;if(i5(Q))f=!0,NX(z);else f=!1;return z.memoizedState=$.state!==null&&$.state!==void 0?$.state:null,QY(z),DU(z,$),pY(z,Q,Z,X),Z$(null,z,Q,!0,f,X)}else{if(z.tag=R,z.mode&M4){t4(!0);try{$=g8(null,z,Q,Z,J,X),K=c8()}finally{t4(!1)}}if(J6()&&K)uH(z);return h6(null,z,$,X),J$(z,Q),z.child}}function J$(b,z){{if(z){if(z.childContextTypes)G("%s(...): childContextTypes cannot be defined on a function component.",z.displayName||z.name||"Component")}if(b.ref!==null){var Q="",X=S7();if(X)Q+=`
|
|
101
|
+
|
|
102
|
+
Check the render method of \``+X+"`.";var Z=X||"",J=b._debugSource;if(J)Z=J.fileName+":"+J.lineNumber;if(!z$[Z])z$[Z]=!0,G("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",Q)}if(z.defaultProps!==void 0){var Y=R1(z)||"Unknown";if(!mz[Y])G("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",Y),mz[Y]=!0}if(typeof z.getDerivedStateFromProps==="function"){var $=R1(z)||"Unknown";if(!b$[$])G("%s: Function components do not support getDerivedStateFromProps.",$),b$[$]=!0}if(typeof z.contextType==="object"&&z.contextType!==null){var K=R1(z)||"Unknown";if(!eY[K])G("%s: Function components do not support contextType.",K),eY[K]=!0}}}var H$={dehydrated:null,treeContext:null,retryLane:s4};function Y$(b){return{baseLanes:b,cachePool:E_(),transitions:null}}function j_(b,z){var Q=null;return{baseLanes:X1(b.baseLanes,z),cachePool:Q,transitions:b.transitions}}function o_(b,z,Q,X){if(z!==null){var Z=z.memoizedState;if(Z===null)return!1}return YY(b,wz)}function p_(b,z){return gQ(b.childLanes,z)}function rU(b,z,Q){var X=z.pendingProps;if($F(z))z.flags|=w1;var Z=F5.current,J=!1,Y=(z.flags&w1)!==l0;if(Y||o_(Z,b))J=!0,z.flags&=~w1;else if(b===null||b.memoizedState!==null)Z=B_(Z,QU);if(Z=D8(Z),r7(z,Z),b===null){dH(z);var $=z.memoizedState;if($!==null){var K=$.dehydrated;if(K!==null)return e_(z,K)}var{children:O,fallback:N}=X;if(J){var T=r_(z,O,N,Q),f=z.child;return f.memoizedState=Y$(Q),z.memoizedState=H$,T}else return $$(z,O)}else{var g=b.memoizedState;if(g!==null){var c=g.dehydrated;if(c!==null)return bP(b,z,Y,X,c,g,Q)}if(J){var{fallback:a,children:N0}=X,m0=t_(b,z,N0,a,Q),T0=z.child,$1=b.child.memoizedState;return T0.memoizedState=$1===null?Y$(Q):j_($1,Q),T0.childLanes=p_(b,Q),z.memoizedState=H$,m0}else{var G1=X.children,S=n_(b,z,G1,Q);return z.memoizedState=null,S}}}function $$(b,z,Q){var X=b.mode,Z={mode:"visible",children:z},J=G$(Z,X);return J.return=b,b.child=J,J}function r_(b,z,Q,X){var{mode:Z,child:J}=b,Y={mode:"hidden",children:z},$,K;if((Z&B1)===d0&&J!==null){if($=J,$.childLanes=z0,$.pendingProps=Y,b.mode&m1)$.actualDuration=0,$.actualStartTime=-1,$.selfBaseDuration=0,$.treeBaseDuration=0;K=Xb(Q,Z,X,null)}else $=G$(Y,Z),K=Xb(Q,Z,X,null);return $.return=b,K.return=b,$.sibling=K,b.child=$,K}function G$(b,z,Q){return tq(b,z,z0,null)}function nU(b,z){return yb(b,z)}function n_(b,z,Q,X){var Z=b.child,J=Z.sibling,Y=nU(Z,{mode:"visible",children:Q});if((z.mode&B1)===d0)Y.lanes=X;if(Y.return=z,Y.sibling=null,J!==null){var $=z.deletions;if($===null)z.deletions=[J],z.flags|=qb;else $.push(J)}return z.child=Y,Y}function t_(b,z,Q,X,Z){var J=z.mode,Y=b.child,$=Y.sibling,K={mode:"hidden",children:Q},O;if((J&B1)===d0&&z.child!==Y){var N=z.child;if(O=N,O.childLanes=z0,O.pendingProps=K,z.mode&m1)O.actualDuration=0,O.actualStartTime=-1,O.selfBaseDuration=Y.selfBaseDuration,O.treeBaseDuration=Y.treeBaseDuration;z.deletions=null}else O=nU(Y,K),O.subtreeFlags=Y.subtreeFlags&K7;var T;if($!==null)T=yb($,X);else T=Xb(X,J,Z,null),T.flags|=S4;return T.return=z,O.return=z,O.sibling=T,z.child=O,T}function YZ(b,z,Q,X){if(X!==null)aH(X);h8(z,b.child,null,Q);var Z=z.pendingProps,J=Z.children,Y=$$(z,J);return Y.flags|=S4,z.memoizedState=null,Y}function s_(b,z,Q,X,Z){var J=z.mode,Y={mode:"visible",children:Q},$=G$(Y,J),K=Xb(X,J,Z,null);if(K.flags|=S4,$.return=z,K.return=z,$.sibling=K,z.child=$,(z.mode&B1)!==d0)h8(z,b.child,null,Z);return K}function e_(b,z,Q){if((b.mode&B1)===d0)G("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."),b.lanes=cQ(r0);else if(IH(z))b.lanes=cQ(_b);else b.lanes=cQ(j6);return null}function bP(b,z,Q,X,Z,J,Y){if(!Q){if(aW(),(z.mode&B1)===d0)return YZ(b,z,Y,null);if(IH(Z)){var $,K,O;{var N=JW(Z);$=N.digest,K=N.message,O=N.stack}var T;if(K)T=Error(K);else T=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var f=rY(T,$,O);return YZ(b,z,Y,f)}var g=o6(Y,b.childLanes);if(A5||g){var c=WZ();if(c!==null){var a=UL(c,Y);if(a!==s4&&a!==J.retryLane){J.retryLane=a;var N0=H4;c6(b,a),i4(c,b,a,N0)}}C$();var m0=rY(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 YZ(b,z,Y,m0)}else if(WK(Z)){z.flags|=w1,z.child=b.child;var T0=hR.bind(null,b);return HW(Z,T0),null}else{xW(z,Z,J.treeContext);var $1=X.children,G1=$$(z,$1);return G1.flags|=$7,G1}}else if(z.flags&Y7){z.flags&=~Y7;var S=rY(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return YZ(b,z,Y,S)}else if(z.memoizedState!==null)return z.child=b.child,z.flags|=w1,null;else{var{children:x,fallback:V}=X,X0=s_(b,z,x,V,Y),R0=z.child;return R0.memoizedState=Y$(Y),z.memoizedState=H$,X0}}function tU(b,z,Q){b.lanes=X1(b.lanes,z);var X=b.alternate;if(X!==null)X.lanes=X1(X.lanes,z);sH(b.return,z,Q)}function zP(b,z,Q){var X=z;while(X!==null){if(X.tag===s){var Z=X.memoizedState;if(Z!==null)tU(X,Q,b)}else if(X.tag===O0)tU(X,Q,b);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===b)return;while(X.sibling===null){if(X.return===null||X.return===b)return;X=X.return}X.sibling.return=X.return,X=X.sibling}}function QP(b){var z=b,Q=null;while(z!==null){var X=z.alternate;if(X!==null&&mX(X)===null)Q=z;z=z.sibling}return Q}function XP(b){if(b!==void 0&&b!=="forwards"&&b!=="backwards"&&b!=="together"&&!Q$[b])if(Q$[b]=!0,typeof b==="string")switch(b.toLowerCase()){case"together":case"forwards":case"backwards":{G('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',b,b.toLowerCase());break}case"forward":case"backward":{G('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',b,b.toLowerCase());break}default:G('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',b);break}else G('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',b)}function ZP(b,z){if(b!==void 0&&!HZ[b]){if(b!=="collapsed"&&b!=="hidden")HZ[b]=!0,G('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',b);else if(z!=="forwards"&&z!=="backwards")HZ[b]=!0,G('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',b)}}function sU(b,z){{var Q=A1(b),X=!Q&&typeof J4(b)==="function";if(Q||X){var Z=Q?"array":"iterable";return G("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>",Z,z,Z),!1}}return!0}function JP(b,z){if((z==="forwards"||z==="backwards")&&b!==void 0&&b!==null&&b!==!1)if(A1(b)){for(var Q=0;Q<b.length;Q++)if(!sU(b[Q],Q))return}else{var X=J4(b);if(typeof X==="function"){var Z=X.call(b);if(Z){var J=Z.next(),Y=0;for(;!J.done;J=Z.next()){if(!sU(J.value,Y))return;Y++}}}else G('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?',z)}}function K$(b,z,Q,X,Z){var J=b.memoizedState;if(J===null)b.memoizedState={isBackwards:z,rendering:null,renderingStartTime:0,last:X,tail:Q,tailMode:Z};else J.isBackwards=z,J.rendering=null,J.renderingStartTime=0,J.last=X,J.tail=Q,J.tailMode=Z}function eU(b,z,Q){var X=z.pendingProps,Z=X.revealOrder,J=X.tail,Y=X.children;XP(Z),ZP(J,Z),JP(Y,Z),h6(b,z,Y,Q);var $=F5.current,K=YY($,wz);if(K)$=$Y($,wz),z.flags|=w1;else{var O=b!==null&&(b.flags&w1)!==l0;if(O)zP(z,z.child,Q);$=D8($)}if(r7(z,$),(z.mode&B1)===d0)z.memoizedState=null;else switch(Z){case"forwards":{var N=QP(z.child),T;if(N===null)T=z.child,z.child=null;else T=N.sibling,N.sibling=null;K$(z,!1,T,N,J);break}case"backwards":{var f=null,g=z.child;z.child=null;while(g!==null){var c=g.alternate;if(c!==null&&mX(c)===null){z.child=g;break}var a=g.sibling;g.sibling=f,f=g,g=a}K$(z,!0,f,null,J);break}case"together":{K$(z,!1,null,null,void 0);break}default:z.memoizedState=null}return z.child}function HP(b,z,Q){ZY(z,z.stateNode.containerInfo);var X=z.pendingProps;if(b===null)z.child=h8(z,null,X,Q);else h6(b,z,X,Q);return z.child}var bq=!1;function YP(b,z,Q){var X=z.type,Z=X._context,J=z.pendingProps,Y=z.memoizedProps,$=J.value;{if(!("value"in J)){if(!bq)bq=!0,G("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var K=z.type.propTypes;if(K)_5(K,J,"prop","Context.Provider")}if(jK(z,Z,$),Y!==null){var O=Y.value;if(n6(O,$)){if(Y.children===J.children&&!OX())return P7(b,z,Q)}else Z_(z,Z,Q)}var N=J.children;return h6(b,z,N,Q),z.child}var zq=!1;function $P(b,z,Q){var X=z.type;if(X._context===void 0){if(X!==X.Consumer){if(!zq)zq=!0,G("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else X=X._context;var Z=z.pendingProps,J=Z.children;if(typeof J!=="function")G("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.");S8(z,Q);var Y=V4(X);E3(z);var $;return Ez.current=z,x6(!0),$=J(Y),x6(!1),U8(),z.flags|=G8,h6(b,z,$,Q),z.child}function gz(){A5=!0}function $Z(b,z){if((z.mode&B1)===d0){if(b!==null)b.alternate=null,z.alternate=null,z.flags|=S4}}function P7(b,z,Q){if(b!==null)z.dependencies=b.dependencies;if(hU(),nz(z.lanes),!o6(Q,z.childLanes))return null;return Q_(b,z),z.child}function GP(b,z,Q){{var X=z.return;if(X===null)throw Error("Cannot swap the root fiber.");if(b.alternate=null,z.alternate=null,Q.index=z.index,Q.sibling=z.sibling,Q.return=z.return,Q.ref=z.ref,z===X.child)X.child=Q;else{var Z=X.child;if(Z===null)throw Error("Expected parent to have a child.");while(Z.sibling!==z)if(Z=Z.sibling,Z===null)throw Error("Expected to find the previous sibling.");Z.sibling=Q}var J=X.deletions;if(J===null)X.deletions=[b],X.flags|=qb;else J.push(b);return Q.flags|=S4,Q}}function U$(b,z){var Q=b.lanes;if(o6(Q,z))return!0;return!1}function KP(b,z,Q){switch(z.tag){case w:oU(z);var X=z.stateNode;T8();break;case A:bU(z);break;case W:{var Z=z.type;if(i5(Z))NX(z);break}case P:ZY(z,z.stateNode.containerInfo);break;case D:{var J=z.memoizedProps.value,Y=z.type._context;jK(z,Y,J);break}case v0:{var $=o6(Q,z.childLanes);if($)z.flags|=v1;{var K=z.stateNode;K.effectDuration=0,K.passiveEffectDuration=0}}break;case s:{var O=z.memoizedState;if(O!==null){if(O.dehydrated!==null)return r7(z,D8(F5.current)),z.flags|=w1,null;var N=z.child,T=N.childLanes;if(o6(Q,T))return rU(b,z,Q);else{r7(z,D8(F5.current));var f=P7(b,z,Q);if(f!==null)return f.sibling;else return null}}else r7(z,D8(F5.current));break}case O0:{var g=(b.flags&w1)!==l0,c=o6(Q,z.childLanes);if(g){if(c)return eU(b,z,Q);z.flags|=w1}var a=z.memoizedState;if(a!==null)a.rendering=null,a.tail=null,a.lastEffect=null;if(r7(z,F5.current),c)break;else return null}case g0:case Z0:return z.lanes=z0,iU(b,z,Q)}return P7(b,z,Q)}function Qq(b,z,Q){if(z._debugNeedsRemount&&b!==null)return GP(b,z,a$(z.type,z.key,z.pendingProps,z._debugOwner||null,z.mode,z.lanes));if(b!==null){var X=b.memoizedProps,Z=z.pendingProps;if(X!==Z||OX()||z.type!==b.type)A5=!0;else{var J=U$(b,Q);if(!J&&(z.flags&w1)===l0)return A5=!1,KP(b,z,Q);if((b.flags&NJ)!==l0)A5=!0;else A5=!1}}else if(A5=!1,J6()&&uW(z)){var Y=z.index,$=mW();hK(z,$,Y)}switch(z.lanes=z0,z.tag){case I:return x_(b,z,z.type,Q);case C:{var K=z.elementType;return l_(b,z,K,Q)}case R:{var{type:O,pendingProps:N}=z,T=z.elementType===O?N:k5(O,N);return X$(b,z,O,T,Q)}case W:{var{type:f,pendingProps:g}=z,c=z.elementType===f?g:k5(f,g);return jU(b,z,f,c,Q)}case w:return y_(b,z,Q);case A:return d_(b,z,Q);case F:return a_(b,z);case s:return rU(b,z,Q);case P:return HP(b,z,Q);case u:{var{type:a,pendingProps:N0}=z,m0=z.elementType===a?N0:k5(a,N0);return dU(b,z,a,m0,Q)}case d:return m_(b,z,Q);case E:return g_(b,z,Q);case v0:return c_(b,z,Q);case D:return YP(b,z,Q);case r:return $P(b,z,Q);case Q0:{var{type:T0,pendingProps:$1}=z,G1=k5(T0,$1);if(z.type!==z.elementType){var S=T0.propTypes;if(S)_5(S,G1,"prop",R1(T0))}return G1=k5(T0.type,G1),aU(b,z,T0,G1,Q)}case n:return lU(b,z,z.type,z.pendingProps,Q);case j:{var{type:x,pendingProps:V}=z,X0=z.elementType===x?V:k5(x,V);return i_(b,z,x,X0,Q)}case O0:return eU(b,z,Q);case L0:break;case g0:return iU(b,z,Q)}throw Error("Unknown unit of work tag ("+z.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function y8(b){b.flags|=v1}function Xq(b){b.flags|=E7,b.flags|=vJ}var Zq,q$,Jq,Hq;Zq=function(b,z,Q,X){var Z=z.child;while(Z!==null){if(Z.tag===A||Z.tag===F)Vv(b,Z.stateNode);else if(Z.tag===P);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}},q$=function(b,z){},Jq=function(b,z,Q,X,Z){var J=b.memoizedProps;if(J===X)return;var Y=z.stateNode,$=JY(),K=Ev(Y,Q,J,X,Z,$);if(z.updateQueue=K,K)y8(z)},Hq=function(b,z,Q,X){if(Q!==X)y8(z)};function cz(b,z){if(J6())return;switch(b.tailMode){case"hidden":{var Q=b.tail,X=null;while(Q!==null){if(Q.alternate!==null)X=Q;Q=Q.sibling}if(X===null)b.tail=null;else X.sibling=null;break}case"collapsed":{var Z=b.tail,J=null;while(Z!==null){if(Z.alternate!==null)J=Z;Z=Z.sibling}if(J===null)if(!z&&b.tail!==null)b.tail.sibling=null;else b.tail=null;else J.sibling=null;break}}}function Y6(b){var z=b.alternate!==null&&b.alternate.child===b.child,Q=z0,X=l0;if(!z){if((b.mode&m1)!==d0){var{actualDuration:Z,selfBaseDuration:J,child:Y}=b;while(Y!==null)Q=X1(Q,X1(Y.lanes,Y.childLanes)),X|=Y.subtreeFlags,X|=Y.flags,Z+=Y.actualDuration,J+=Y.treeBaseDuration,Y=Y.sibling;b.actualDuration=Z,b.treeBaseDuration=J}else{var $=b.child;while($!==null)Q=X1(Q,X1($.lanes,$.childLanes)),X|=$.subtreeFlags,X|=$.flags,$.return=b,$=$.sibling}b.subtreeFlags|=X}else{if((b.mode&m1)!==d0){var{selfBaseDuration:K,child:O}=b;while(O!==null)Q=X1(Q,X1(O.lanes,O.childLanes)),X|=O.subtreeFlags&K7,X|=O.flags&K7,K+=O.treeBaseDuration,O=O.sibling;b.treeBaseDuration=K}else{var N=b.child;while(N!==null)Q=X1(Q,X1(N.lanes,N.childLanes)),X|=N.subtreeFlags&K7,X|=N.flags&K7,N.return=b,N=N.sibling}b.subtreeFlags|=X}return b.childLanes=Q,z}function UP(b,z,Q){if(nW()&&(z.mode&B1)!==d0&&(z.flags&w1)===l0)return mK(z),T8(),z.flags|=Y7|V3|T6,!1;var X=RX(z);if(Q!==null&&Q.dehydrated!==null)if(b===null){if(!X)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(pW(z),Y6(z),(z.mode&m1)!==d0){var Z=Q!==null;if(Z){var J=z.child;if(J!==null)z.treeBaseDuration-=J.treeBaseDuration}}return!1}else{if(T8(),(z.flags&w1)===l0)z.memoizedState=null;if(z.flags|=v1,Y6(z),(z.mode&m1)!==d0){var Y=Q!==null;if(Y){var $=z.child;if($!==null)z.treeBaseDuration-=$.treeBaseDuration}}return!1}else return gK(),!0}function Yq(b,z,Q){var X=z.pendingProps;switch(mH(z),z.tag){case I:case C:case n:case R:case u:case d:case E:case v0:case r:case Q0:return Y6(z),null;case W:{var Z=z.type;if(i5(Z))LX(z);return Y6(z),null}case w:{var J=z.stateNode;if(V8(z),VH(z),KY(),J.pendingContext)J.context=J.pendingContext,J.pendingContext=null;if(b===null||b.child===null){var Y=RX(z);if(Y)y8(z);else if(b!==null){var $=b.memoizedState;if(!$.isDehydrated||(z.flags&Y7)!==l0)z.flags|=Bb,gK()}}return q$(b,z),Y6(z),null}case A:{HY(z);var K=eK(),O=z.type;if(b!==null&&z.stateNode!=null){if(Jq(b,z,O,X,K),b.ref!==z.ref)Xq(z)}else{if(!X){if(z.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 Y6(z),null}var N=JY(),T=RX(z);if(T){if(jW(z,K,N))y8(z)}else{var f=Sv(O,X,K,N,z);if(Zq(f,z,!1,!1),z.stateNode=f,Dv(f,O,X,K))y8(z)}if(z.ref!==null)Xq(z)}return Y6(z),null}case F:{var g=X;if(b&&z.stateNode!=null){var c=b.memoizedProps;Hq(b,z,c,g)}else{if(typeof g!=="string"){if(z.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 a=eK(),N0=JY(),m0=RX(z);if(m0){if(oW(z))y8(z)}else z.stateNode=uv(g,a,N0,z)}return Y6(z),null}case s:{E8(z);var T0=z.memoizedState;if(b===null||b.memoizedState!==null&&b.memoizedState.dehydrated!==null){var $1=UP(b,z,T0);if(!$1)if(z.flags&T6)return z;else return null}if((z.flags&w1)!==l0){if(z.lanes=Q,(z.mode&m1)!==d0)uY(z);return z}var G1=T0!==null,S=b!==null&&b.memoizedState!==null;if(G1!==S){if(G1){var x=z.child;if(x.flags|=Ob,(z.mode&B1)!==d0){var V=b===null&&(z.memoizedProps.unstable_avoidThisFallback!==!0||!P1);if(V||YY(F5.current,QU))vR();else C$()}}}var X0=z.updateQueue;if(X0!==null)z.flags|=v1;if(Y6(z),(z.mode&m1)!==d0){if(G1){var R0=z.child;if(R0!==null)z.treeBaseDuration-=R0.treeBaseDuration}}return null}case P:if(V8(z),q$(b,z),b===null)TW(z.stateNode.containerInfo);return Y6(z),null;case D:var W0=z.type._context;return tH(W0,z),Y6(z),null;case j:{var j0=z.type;if(i5(j0))LX(z);return Y6(z),null}case O0:{E8(z);var b1=z.memoizedState;if(b1===null)return Y6(z),null;var c1=(z.flags&w1)!==l0,M1=b1.rendering;if(M1===null)if(!c1){var f4=_R()&&(b===null||(b.flags&w1)===l0);if(!f4){var k1=z.child;while(k1!==null){var k4=mX(k1);if(k4!==null){c1=!0,z.flags|=w1,cz(b1,!1);var M6=k4.updateQueue;if(M6!==null)z.updateQueue=M6,z.flags|=v1;return z.subtreeFlags=l0,X_(z,Q),r7(z,$Y(F5.current,wz)),z.child}k1=k1.sibling}}if(b1.tail!==null&&n4()>Tq())z.flags|=w1,c1=!0,cz(b1,!1),z.lanes=J9}else cz(b1,!1);else{if(!c1){var q6=mX(M1);if(q6!==null){z.flags|=w1,c1=!0;var e6=q6.updateQueue;if(e6!==null)z.updateQueue=e6,z.flags|=v1;if(cz(b1,!0),b1.tail===null&&b1.tailMode==="hidden"&&!M1.alternate&&!J6())return Y6(z),null}else if(n4()*2-b1.renderingStartTime>Tq()&&Q!==j6)z.flags|=w1,c1=!0,cz(b1,!1),z.lanes=J9}if(b1.isBackwards)M1.sibling=z.child,z.child=M1;else{var V6=b1.last;if(V6!==null)V6.sibling=M1;else z.child=M1;b1.last=M1}}if(b1.tail!==null){var D6=b1.tail;b1.rendering=D6,b1.tail=D6.sibling,b1.renderingStartTime=n4(),D6.sibling=null;var k6=F5.current;if(c1)k6=$Y(k6,wz);else k6=D8(k6);return r7(z,k6),D6}return Y6(z),null}case L0:break;case g0:case Z0:{h$(z);var A7=z.memoizedState,p8=A7!==null;if(b!==null){var zQ=b.memoizedState,s5=zQ!==null;if(s5!==p8&&!H1)z.flags|=Ob}if(!p8||(z.mode&B1)===d0)Y6(z);else if(o6(t5,j6)){if(Y6(z),z.subtreeFlags&(S4|v1))z.flags|=Ob}return null}case k0:return null;case a0:return null}throw Error("Unknown unit of work tag ("+z.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function qP(b,z,Q){switch(mH(z),z.tag){case W:{var X=z.type;if(i5(X))LX(z);var Z=z.flags;if(Z&T6){if(z.flags=Z&~T6|w1,(z.mode&m1)!==d0)uY(z);return z}return null}case w:{var J=z.stateNode;V8(z),VH(z),KY();var Y=z.flags;if((Y&T6)!==l0&&(Y&w1)===l0)return z.flags=Y&~T6|w1,z;return null}case A:return HY(z),null;case s:{E8(z);var $=z.memoizedState;if($!==null&&$.dehydrated!==null){if(z.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");T8()}var K=z.flags;if(K&T6){if(z.flags=K&~T6|w1,(z.mode&m1)!==d0)uY(z);return z}return null}case O0:return E8(z),null;case P:return V8(z),null;case D:var O=z.type._context;return tH(O,z),null;case g0:case Z0:return h$(z),null;case k0:return null;default:return null}}function $q(b,z,Q){switch(mH(z),z.tag){case W:{var X=z.type.childContextTypes;if(X!==null&&X!==void 0)LX(z);break}case w:{var Z=z.stateNode;V8(z),VH(z),KY();break}case A:{HY(z);break}case P:V8(z);break;case s:E8(z);break;case O0:E8(z);break;case D:var J=z.type._context;tH(J,z);break;case g0:case Z0:h$(z);break}}var Gq=null;Gq=new Set;var GZ=!1,$6=!1,BP=typeof WeakSet==="function"?WeakSet:Set,A0=null,d8=null,a8=null;function OP(b){BJ(null,function(){throw b}),OJ()}var LP=function(b,z){if(z.props=b.memoizedProps,z.state=b.memoizedState,b.mode&m1)try{r5(),z.componentWillUnmount()}finally{p5(b)}else z.componentWillUnmount()};function Kq(b,z){try{s7(g4,b)}catch(Q){e1(b,z,Q)}}function B$(b,z,Q){try{LP(b,Q)}catch(X){e1(b,z,X)}}function NP(b,z,Q){try{Q.componentDidMount()}catch(X){e1(b,z,X)}}function Uq(b,z){try{Oq(b)}catch(Q){e1(b,z,Q)}}function l8(b,z){var Q=b.ref;if(Q!==null)if(typeof Q==="function"){var X;try{if(Y4&&Q4&&b.mode&m1)try{r5(),X=Q(null)}finally{p5(b)}else X=Q(null)}catch(Z){e1(b,z,Z)}if(typeof X==="function")G("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Q1(b))}else Q.current=null}function KZ(b,z,Q){try{Q()}catch(X){e1(b,z,X)}}var qq=null,Bq=!1;function vP(b,z){qq=hv(b.containerInfo),A0=z,WP();var Q=Bq;return Bq=!1,qq=null,Q}function WP(){while(A0!==null){var b=A0,z=b.child;if((b.subtreeFlags&_J)!==l0&&z!==null)z.return=b,A0=z;else _P()}}function _P(){while(A0!==null){var b=A0;_4(b);try{PP(b)}catch(Q){e1(b,b.return,Q)}r4();var z=b.sibling;if(z!==null){z.return=b.return,A0=z;return}A0=b.return}}function PP(b){var{alternate:z,flags:Q}=b;if((Q&Bb)!==l0){switch(_4(b),b.tag){case R:case u:case n:break;case W:{if(z!==null){var{memoizedProps:X,memoizedState:Z}=z,J=b.stateNode;if(b.type===b.elementType&&!Eb){if(J.props!==b.memoizedProps)G("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.",Q1(b)||"instance");if(J.state!==b.memoizedState)G("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.",Q1(b)||"instance")}var Y=J.getSnapshotBeforeUpdate(b.elementType===b.type?X:k5(b.type,X),Z);{var $=Gq;if(Y===void 0&&!$.has(b.type))$.add(b.type),G("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Q1(b))}J.__reactInternalSnapshotBeforeUpdate=Y}break}case w:{{var K=b.stateNode;zW(K.containerInfo)}break}case A:case F:case P:case j: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.")}r4()}}function w5(b,z,Q){var X=z.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,Y=J;do{if((Y.tag&b)===b){var $=Y.destroy;if(Y.destroy=void 0,$!==void 0){if((b&H6)!==y6)uO(z);else if((b&g4)!==y6)b9(z);if((b&x5)!==y6)sz(!0);if(KZ(z,Q,$),(b&x5)!==y6)sz(!1);if((b&H6)!==y6)mO();else if((b&g4)!==y6)z9()}}Y=Y.next}while(Y!==J)}}function s7(b,z){var Q=z.updateQueue,X=Q!==null?Q.lastEffect:null;if(X!==null){var Z=X.next,J=Z;do{if((J.tag&b)===b){if((b&H6)!==y6)DO(z);else if((b&g4)!==y6)gO(z);var Y=J.create;if((b&x5)!==y6)sz(!0);if(J.destroy=Y(),(b&x5)!==y6)sz(!1);if((b&H6)!==y6)EO();else if((b&g4)!==y6)cO();{var $=J.destroy;if($!==void 0&&typeof $!=="function"){var K=void 0;if((J.tag&g4)!==l0)K="useLayoutEffect";else if((J.tag&x5)!==l0)K="useInsertionEffect";else K="useEffect";var O=void 0;if($===null)O=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof $.then==="function")O=`
|
|
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 O=" You returned: "+$;G("%s must not return anything besides a function, which is used for clean-up.%s",K,O)}}}J=J.next}while(J!==Z)}}function RP(b,z){if((z.flags&v1)!==l0)switch(z.tag){case v0:{var Q=z.stateNode.passiveEffectDuration,X=z.memoizedProps,Z=X.id,J=X.onPostCommit,Y=fU(),$=z.alternate===null?"mount":"update";if(IU())$="nested-update";if(typeof J==="function")J(Z,$,Q,Y);var K=z.return;b:while(K!==null){switch(K.tag){case w:var O=K.stateNode;O.passiveEffectDuration+=Q;break b;case v0:var N=K.stateNode;N.passiveEffectDuration+=Q;break b}K=K.return}break}}}function FP(b,z,Q,X){if((Q.flags&D3)!==l0)switch(Q.tag){case R:case u:case n:{if(!$6)if(Q.mode&m1)try{r5(),s7(g4|m4,Q)}finally{p5(Q)}else s7(g4|m4,Q);break}case W:{var Z=Q.stateNode;if(Q.flags&v1){if(!$6)if(z===null){if(Q.type===Q.elementType&&!Eb){if(Z.props!==Q.memoizedProps)G("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.",Q1(Q)||"instance");if(Z.state!==Q.memoizedState)G("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.",Q1(Q)||"instance")}if(Q.mode&m1)try{r5(),Z.componentDidMount()}finally{p5(Q)}else Z.componentDidMount()}else{var J=Q.elementType===Q.type?z.memoizedProps:k5(Q.type,z.memoizedProps),Y=z.memoizedState;if(Q.type===Q.elementType&&!Eb){if(Z.props!==Q.memoizedProps)G("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.",Q1(Q)||"instance");if(Z.state!==Q.memoizedState)G("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.",Q1(Q)||"instance")}if(Q.mode&m1)try{r5(),Z.componentDidUpdate(J,Y,Z.__reactInternalSnapshotBeforeUpdate)}finally{p5(Q)}else Z.componentDidUpdate(J,Y,Z.__reactInternalSnapshotBeforeUpdate)}}var $=Q.updateQueue;if($!==null){if(Q.type===Q.elementType&&!Eb){if(Z.props!==Q.memoizedProps)G("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.",Q1(Q)||"instance");if(Z.state!==Q.memoizedState)G("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.",Q1(Q)||"instance")}sK(Q,$,Z)}break}case w:{var K=Q.updateQueue;if(K!==null){var O=null;if(Q.child!==null)switch(Q.child.tag){case A:O=FH(Q.child.stateNode);break;case W:O=Q.child.stateNode;break}sK(Q,K,O)}break}case A:{var N=Q.stateNode;if(z===null&&Q.flags&v1){var{type:T,memoizedProps:f}=Q;dv(N,T,f)}break}case F:break;case P:break;case v0:{{var g=Q.memoizedProps,c=g.onCommit,a=g.onRender,N0=Q.stateNode.effectDuration,m0=fU(),T0=z===null?"mount":"update";if(IU())T0="nested-update";if(typeof a==="function")a(Q.memoizedProps.id,T0,Q.actualDuration,Q.treeBaseDuration,Q.actualStartTime,m0);{if(typeof c==="function")c(Q.memoizedProps.id,T0,N0,m0);kR(Q);var $1=Q.return;b:while($1!==null){switch($1.tag){case w:var G1=$1.stateNode;G1.effectDuration+=N0;break b;case v0:var S=$1.stateNode;S.effectDuration+=N0;break b}$1=$1.return}}}break}case s:{hP(b,Q);break}case O0:case j:case L0:case g0:case Z0:case a0: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(!$6){if(Q.flags&E7)Oq(Q)}}function MP(b){switch(b.tag){case R:case u:case n:{if(b.mode&m1)try{r5(),Kq(b,b.return)}finally{p5(b)}else Kq(b,b.return);break}case W:{var z=b.stateNode;if(typeof z.componentDidMount==="function")NP(b,b.return,z);Uq(b,b.return);break}case A:{Uq(b,b.return);break}}}function kP(b,z){var Q=null;{var X=b;while(!0){if(X.tag===A){if(Q===null){Q=X;try{var Z=X.stateNode;if(z)tv(Z);else ev(X.stateNode,X.memoizedProps)}catch(Y){e1(b,b.return,Y)}}}else if(X.tag===F){if(Q===null)try{var J=X.stateNode;if(z)sv(J);else bW(J,X.memoizedProps)}catch(Y){e1(b,b.return,Y)}}else if((X.tag===g0||X.tag===Z0)&&X.memoizedState!==null&&X!==b);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===b)return;while(X.sibling===null){if(X.return===null||X.return===b)return;if(Q===X)Q=null;X=X.return}if(Q===X)Q=null;X.sibling.return=X.return,X=X.sibling}}}function Oq(b){var z=b.ref;if(z!==null){var Q=b.stateNode,X;switch(b.tag){case A:X=FH(Q);break;default:X=Q}if(typeof z==="function"){var Z;if(b.mode&m1)try{r5(),Z=z(X)}finally{p5(b)}else Z=z(X);if(typeof Z==="function")G("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",Q1(b))}else{if(!z.hasOwnProperty("current"))G("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Q1(b));z.current=X}}}function AP(b){var z=b.alternate;if(z!==null)z.return=null;b.return=null}function Lq(b){var z=b.alternate;if(z!==null)b.alternate=null,Lq(z);{if(b.child=null,b.deletions=null,b.sibling=null,b.tag===A){var Q=b.stateNode;if(Q!==null)SW(Q)}b.stateNode=null,b._debugOwner=null,b.return=null,b.dependencies=null,b.memoizedProps=null,b.memoizedState=null,b.pendingProps=null,b.stateNode=null,b.updateQueue=null}}function wP(b){var z=b.return;while(z!==null){if(Nq(z))return z;z=z.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function Nq(b){return b.tag===A||b.tag===w||b.tag===P}function vq(b){var z=b;b:while(!0){while(z.sibling===null){if(z.return===null||Nq(z.return))return null;z=z.return}z.sibling.return=z.return,z=z.sibling;while(z.tag!==A&&z.tag!==F&&z.tag!==$0){if(z.flags&S4)continue b;if(z.child===null||z.tag===P)continue b;else z.child.return=z,z=z.child}if(!(z.flags&S4))return z.stateNode}}function IP(b){var z=wP(b);switch(z.tag){case A:{var Q=z.stateNode;if(z.flags&S3)vK(Q),z.flags&=~S3;var X=vq(b);L$(b,X,Q);break}case w:case P:{var Z=z.stateNode.containerInfo,J=vq(b);O$(b,J,Z);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function O$(b,z,Q){var X=b.tag,Z=X===A||X===F;if(Z){var J=b.stateNode;if(z)ov(Q,J,z);else xv(Q,J)}else if(X===P);else{var Y=b.child;if(Y!==null){O$(Y,z,Q);var $=Y.sibling;while($!==null)O$($,z,Q),$=$.sibling}}}function L$(b,z,Q){var X=b.tag,Z=X===A||X===F;if(Z){var J=b.stateNode;if(z)jv(Q,J,z);else iv(Q,J)}else if(X===P);else{var Y=b.child;if(Y!==null){L$(Y,z,Q);var $=Y.sibling;while($!==null)L$($,z,Q),$=$.sibling}}}var G6=null,I5=!1;function fP(b,z,Q){{var X=z;b:while(X!==null){switch(X.tag){case A:{G6=X.stateNode,I5=!1;break b}case w:{G6=X.stateNode.containerInfo,I5=!0;break b}case P:{G6=X.stateNode.containerInfo,I5=!0;break b}}X=X.return}if(G6===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Wq(b,z,Q),G6=null,I5=!1}AP(Q)}function e7(b,z,Q){var X=Q.child;while(X!==null)Wq(b,z,X),X=X.sibling}function Wq(b,z,Q){switch(hO(Q),Q.tag){case A:if(!$6)l8(Q,z);case F:{{var X=G6,Z=I5;if(G6=null,e7(b,z,Q),G6=X,I5=Z,G6!==null)if(I5)rv(G6,Q.stateNode);else pv(G6,Q.stateNode)}return}case $0:{if(G6!==null)if(I5)nv(G6,Q.stateNode);else wH(G6,Q.stateNode);return}case P:{{var J=G6,Y=I5;G6=Q.stateNode.containerInfo,I5=!0,e7(b,z,Q),G6=J,I5=Y}return}case R:case u:case Q0:case n:{if(!$6){var $=Q.updateQueue;if($!==null){var K=$.lastEffect;if(K!==null){var O=K.next,N=O;do{var T=N,f=T.destroy,g=T.tag;if(f!==void 0){if((g&x5)!==y6)KZ(Q,z,f);else if((g&g4)!==y6){if(b9(Q),Q.mode&m1)r5(),KZ(Q,z,f),p5(Q);else KZ(Q,z,f);z9()}}N=N.next}while(N!==O)}}}e7(b,z,Q);return}case W:{if(!$6){l8(Q,z);var c=Q.stateNode;if(typeof c.componentWillUnmount==="function")B$(Q,z,c)}e7(b,z,Q);return}case L0:{e7(b,z,Q);return}case g0:{if(Q.mode&B1){var a=$6;$6=a||Q.memoizedState!==null,e7(b,z,Q),$6=a}else e7(b,z,Q);break}default:{e7(b,z,Q);return}}}function TP(b){var z=b.memoizedState}function hP(b,z){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null){var Z=X.memoizedState;if(Z!==null){var J=Z.dehydrated;if(J!==null)LW(J)}}}}function _q(b){var z=b.updateQueue;if(z!==null){b.updateQueue=null;var Q=b.stateNode;if(Q===null)Q=b.stateNode=new BP;z.forEach(function(X){var Z=CR.bind(null,b,X);if(!Q.has(X)){if(Q.add(X),v5)if(d8!==null&&a8!==null)tz(a8,d8);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");X.then(Z,Z)}})}}function CP(b,z,Q){d8=Q,a8=b,_4(z),Pq(z,b),_4(z),d8=null,a8=null}function f5(b,z,Q){var X=z.deletions;if(X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z];try{fP(b,z,J)}catch(K){e1(J,z,K)}}var Y=vQ();if(z.subtreeFlags&PJ){var $=z.child;while($!==null)_4($),Pq($,b),$=$.sibling}_4(Y)}function Pq(b,z,Q){var{alternate:X,flags:Z}=b;switch(b.tag){case R:case u:case Q0:case n:{if(f5(z,b),n5(b),Z&v1){try{w5(x5|m4,b,b.return),s7(x5|m4,b)}catch(j0){e1(b,b.return,j0)}if(b.mode&m1){try{r5(),w5(g4|m4,b,b.return)}catch(j0){e1(b,b.return,j0)}p5(b)}else try{w5(g4|m4,b,b.return)}catch(j0){e1(b,b.return,j0)}}return}case W:{if(f5(z,b),n5(b),Z&E7){if(X!==null)l8(X,X.return)}return}case A:{if(f5(z,b),n5(b),Z&E7){if(X!==null)l8(X,X.return)}{if(b.flags&S3){var J=b.stateNode;try{vK(J)}catch(j0){e1(b,b.return,j0)}}if(Z&v1){var Y=b.stateNode;if(Y!=null){var $=b.memoizedProps,K=X!==null?X.memoizedProps:$,O=b.type,N=b.updateQueue;if(b.updateQueue=null,N!==null)try{av(Y,N,O,K,$,b)}catch(j0){e1(b,b.return,j0)}}}}return}case F:{if(f5(z,b),n5(b),Z&v1){if(b.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:T,memoizedProps:f}=b,g=X!==null?X.memoizedProps:f;try{lv(T,g,f)}catch(j0){e1(b,b.return,j0)}}return}case w:{if(f5(z,b),n5(b),Z&v1){if(X!==null){var c=X.memoizedState;if(c.isDehydrated)try{OW(z.containerInfo)}catch(j0){e1(b,b.return,j0)}}}return}case P:{f5(z,b),n5(b);return}case s:{f5(z,b),n5(b);var a=b.child;if(a.flags&Ob){var{stateNode:N0,memoizedState:m0}=a,T0=m0!==null;if(N0.isHidden=T0,T0){var $1=a.alternate!==null&&a.alternate.memoizedState!==null;if(!$1)NR()}}if(Z&v1){try{TP(b)}catch(j0){e1(b,b.return,j0)}_q(b)}return}case g0:{var G1=X!==null&&X.memoizedState!==null;if(b.mode&B1){var S=$6;$6=S||G1,f5(z,b),$6=S}else f5(z,b);if(n5(b),Z&Ob){var{stateNode:x,memoizedState:V}=b,X0=V!==null,R0=b;if(x.isHidden=X0,X0){if(!G1){if((R0.mode&B1)!==d0){A0=R0;var W0=R0.child;while(W0!==null)A0=W0,VP(W0),W0=W0.sibling}}}kP(R0,X0)}return}case O0:{if(f5(z,b),n5(b),Z&v1)_q(b);return}case L0:return;default:{f5(z,b),n5(b);return}}}function n5(b){var z=b.flags;if(z&S4){try{IP(b)}catch(Q){e1(b,b.return,Q)}b.flags&=~S4}if(z&$7)b.flags&=~$7}function SP(b,z,Q){d8=Q,a8=z,A0=b,Rq(b,z,Q),d8=null,a8=null}function Rq(b,z,Q){var X=(b.mode&B1)!==d0;while(A0!==null){var Z=A0,J=Z.child;if(Z.tag===g0&&X){var Y=Z.memoizedState!==null,$=Y||GZ;if($){N$(b,z,Q);continue}else{var K=Z.alternate,O=K!==null&&K.memoizedState!==null,N=O||$6,T=GZ,f=$6;if(GZ=$,$6=N,$6&&!f)A0=Z,DP(Z);var g=J;while(g!==null)A0=g,Rq(g,z,Q),g=g.sibling;A0=Z,GZ=T,$6=f,N$(b,z,Q);continue}}if((Z.subtreeFlags&D3)!==l0&&J!==null)J.return=Z,A0=J;else N$(b,z,Q)}}function N$(b,z,Q){while(A0!==null){var X=A0;if((X.flags&D3)!==l0){var Z=X.alternate;_4(X);try{FP(z,Z,X,Q)}catch(Y){e1(X,X.return,Y)}r4()}if(X===b){A0=null;return}var J=X.sibling;if(J!==null){J.return=X.return,A0=J;return}A0=X.return}}function VP(b){while(A0!==null){var z=A0,Q=z.child;switch(z.tag){case R:case u:case Q0:case n:{if(z.mode&m1)try{r5(),w5(g4,z,z.return)}finally{p5(z)}else w5(g4,z,z.return);break}case W:{l8(z,z.return);var X=z.stateNode;if(typeof X.componentWillUnmount==="function")B$(z,z.return,X);break}case A:{l8(z,z.return);break}case g0:{var Z=z.memoizedState!==null;if(Z){Fq(b);continue}break}}if(Q!==null)Q.return=z,A0=Q;else Fq(b)}}function Fq(b){while(A0!==null){var z=A0;if(z===b){A0=null;return}var Q=z.sibling;if(Q!==null){Q.return=z.return,A0=Q;return}A0=z.return}}function DP(b){while(A0!==null){var z=A0,Q=z.child;if(z.tag===g0){var X=z.memoizedState!==null;if(X){Mq(b);continue}}if(Q!==null)Q.return=z,A0=Q;else Mq(b)}}function Mq(b){while(A0!==null){var z=A0;_4(z);try{MP(z)}catch(X){e1(z,z.return,X)}if(r4(),z===b){A0=null;return}var Q=z.sibling;if(Q!==null){Q.return=z.return,A0=Q;return}A0=z.return}}function EP(b,z,Q,X){A0=z,uP(z,b,Q,X)}function uP(b,z,Q,X){while(A0!==null){var Z=A0,J=Z.child;if((Z.subtreeFlags&K8)!==l0&&J!==null)J.return=Z,A0=J;else mP(b,z,Q,X)}}function mP(b,z,Q,X){while(A0!==null){var Z=A0;if((Z.flags&N5)!==l0){_4(Z);try{gP(z,Z,Q,X)}catch(Y){e1(Z,Z.return,Y)}r4()}if(Z===b){A0=null;return}var J=Z.sibling;if(J!==null){J.return=Z.return,A0=J;return}A0=Z.return}}function gP(b,z,Q,X){switch(z.tag){case R:case u:case n:{if(z.mode&m1){EY();try{s7(H6|m4,z)}finally{DY(z)}}else s7(H6|m4,z);break}}}function cP(b){A0=b,yP()}function yP(){while(A0!==null){var b=A0,z=b.child;if((A0.flags&qb)!==l0){var Q=b.deletions;if(Q!==null){for(var X=0;X<Q.length;X++){var Z=Q[X];A0=Z,lP(Z,b)}{var J=b.alternate;if(J!==null){var Y=J.child;if(Y!==null){J.child=null;do{var $=Y.sibling;Y.sibling=null,Y=$}while(Y!==null)}}}A0=b}}if((b.subtreeFlags&K8)!==l0&&z!==null)z.return=b,A0=z;else dP()}}function dP(){while(A0!==null){var b=A0;if((b.flags&N5)!==l0)_4(b),aP(b),r4();var z=b.sibling;if(z!==null){z.return=b.return,A0=z;return}A0=b.return}}function aP(b){switch(b.tag){case R:case u:case n:{if(b.mode&m1)EY(),w5(H6|m4,b,b.return),DY(b);else w5(H6|m4,b,b.return);break}}}function lP(b,z){while(A0!==null){var Q=A0;_4(Q),xP(Q,z),r4();var X=Q.child;if(X!==null)X.return=Q,A0=X;else iP(b)}}function iP(b){while(A0!==null){var z=A0,Q=z.sibling,X=z.return;if(Lq(z),z===b){A0=null;return}if(Q!==null){Q.return=X,A0=Q;return}A0=X}}function xP(b,z){switch(b.tag){case R:case u:case n:{if(b.mode&m1)EY(),w5(H6,b,z),DY(b);else w5(H6,b,z);break}}}function jP(b){switch(b.tag){case R:case u:case n:{try{s7(g4|m4,b)}catch(Q){e1(b,b.return,Q)}break}case W:{var z=b.stateNode;try{z.componentDidMount()}catch(Q){e1(b,b.return,Q)}break}}}function oP(b){switch(b.tag){case R:case u:case n:{try{s7(H6|m4,b)}catch(z){e1(b,b.return,z)}break}}}function pP(b){switch(b.tag){case R:case u:case n:{try{w5(g4|m4,b,b.return)}catch(Q){e1(b,b.return,Q)}break}case W:{var z=b.stateNode;if(typeof z.componentWillUnmount==="function")B$(b,b.return,z);break}}}function rP(b){switch(b.tag){case R:case u:case n:try{w5(H6|m4,b,b.return)}catch(z){e1(b,b.return,z)}}}var nP=0,tP=1,sP=2,eP=3,bR=4;if(typeof Symbol==="function"&&Symbol.for){var yz=Symbol.for;nP=yz("selector.component"),tP=yz("selector.has_pseudo_class"),sP=yz("selector.role"),eP=yz("selector.test_id"),bR=yz("selector.text")}var zR=[];function QR(){zR.forEach(function(b){return b()})}var XR=H.ReactCurrentActQueue;function ZR(b){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,Q=typeof jest<"u";return Q&&z!==!1}}function kq(){{var b=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!b&&XR.current!==null)G("The current testing environment is not configured to support act(...)");return b}}var JR=Math.ceil,v$=H.ReactCurrentDispatcher,W$=H.ReactCurrentOwner,K6=H.ReactCurrentBatchConfig,T5=H.ReactCurrentActQueue,d4=0,Aq=1,U6=2,$5=4,R7=0,dz=1,ub=2,UZ=3,az=4,wq=5,_$=6,O1=d4,C6=null,P4=null,a4=z0,t5=z0,P$=l7(z0),l4=R7,lz=null,R$=z0,qZ=z0,iz=z0,BZ=z0,xz=null,d6=null,F$=0,Iq=500,fq=1/0,HR=500,F7=null;function jz(){fq=n4()+HR}function Tq(){return fq}var OZ=!1,M$=null,i8=null,mb=!1,bb=null,oz=z0,k$=[],A$=null,YR=50,pz=0,w$=null,I$=!1,LZ=!1,$R=50,x8=0,NZ=null,rz=H4,vZ=z0,hq=!1;function WZ(){return C6}function S6(){if((O1&(U6|$5))!==d4)return n4();if(rz!==H4)return rz;return rz=n4(),rz}function zb(b){var z=b.mode;if((z&B1)===d0)return r0;else if((O1&U6)!==d4&&a4!==z0)return d3(a4);var Q=eW()!==sW;if(Q){if(K6.transition!==null){var X=K6.transition;if(!X._updatedFibers)X._updatedFibers=new Set;X._updatedFibers.add(b)}if(vZ===s4)vZ=G9();return vZ}var Z=W5();if(Z!==s4)return Z;var J=mv();return J}function GR(b){var z=b.mode;if((z&B1)===d0)return r0;return YL()}function i4(b,z,Q,X){if(VR(),hq)G("useInsertionEffect must not schedule updates.");if(I$)LZ=!0;if(a3(b,Q,X),(O1&U6)!==z0&&b===C6)uR(z);else{if(v5)q9(b,z,Q);if(mR(z),b===C6){if((O1&U6)===d4)iz=X1(iz,Q);if(l4===az)Qb(b,a4)}if(a6(b,X),Q===r0&&O1===d4&&(z.mode&B1)===d0&&!T5.isBatchingLegacy)jz(),TK()}}function KR(b,z,Q){var X=b.current;X.lanes=z,a3(b,z,Q),a6(b,Q)}function UR(b){return(O1&U6)!==d4}function a6(b,z){var Q=b.callbackNode;zL(b,z);var X=uQ(b,b===C6?a4:z0);if(X===z0){if(Q!==null)jq(Q);b.callbackNode=null,b.callbackPriority=s4;return}var Z=Rb(X),J=b.callbackPriority;if(J===Z&&!(T5.current!==null&&Q!==D$)){if(Q==null&&J!==r0)G("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(Q!=null)jq(Q);var Y;if(Z===r0){if(b.tag===i7){if(T5.isBatchingLegacy!==null)T5.didScheduleLegacyUpdate=!0;EW(Vq.bind(null,b))}else fK(Vq.bind(null,b));if(T5.current!==null)T5.current.push(x7);else cv(function(){if((O1&(U6|$5))===d4)x7()});Y=null}else{var $;switch(L9(X)){case p6:$=SQ;break;case q7:$=RJ;break;case B7:$=vb;break;case yQ:$=FJ;break;default:$=vb;break}Y=E$($,Cq.bind(null,b))}b.callbackPriority=Z,b.callbackNode=Y}function Cq(b,z){if(k_(),rz=H4,vZ=z0,(O1&(U6|$5))!==d4)throw Error("Should not already be working.");var Q=b.callbackNode,X=k7();if(X){if(b.callbackNode!==Q)return null}var Z=uQ(b,b===C6?a4:z0);if(Z===z0)return null;var J=!mQ(b,Z)&&!HL(b,Z)&&!z,Y=J?RR(b,Z):PZ(b,Z);if(Y!==R7){if(Y===ub){var $=iJ(b);if($!==z0)Z=$,Y=f$(b,$)}if(Y===dz){var K=lz;throw gb(b,z0),Qb(b,Z),a6(b,n4()),K}if(Y===_$)Qb(b,Z);else{var O=!mQ(b,Z),N=b.current.alternate;if(O&&!BR(N)){if(Y=PZ(b,Z),Y===ub){var T=iJ(b);if(T!==z0)Z=T,Y=f$(b,T)}if(Y===dz){var f=lz;throw gb(b,z0),Qb(b,Z),a6(b,n4()),f}}b.finishedWork=N,b.finishedLanes=Z,qR(b,Y,Z)}}if(a6(b,n4()),b.callbackNode===Q)return Cq.bind(null,b);return null}function f$(b,z){var Q=xz;if(dQ(b)){var X=gb(b,z);X.flags|=Y7,fW(b.containerInfo)}var Z=PZ(b,z);if(Z!==ub){var J=d6;if(d6=Q,J!==null)Sq(J)}return Z}function Sq(b){if(d6===null)d6=b;else d6.push.apply(d6,b)}function qR(b,z,Q){switch(z){case R7:case dz:throw Error("Root did not complete. This is a bug in React.");case ub:{cb(b,d6,F7);break}case UZ:{if(Qb(b,Q),Y9(Q)&&!oq()){var X=F$+Iq-n4();if(X>10){var Z=uQ(b,z0);if(Z!==z0)break;var J=b.suspendedLanes;if(!L8(J,Q)){var Y=S6();U9(b,J);break}b.timeoutHandle=kH(cb.bind(null,b,d6,F7),X);break}}cb(b,d6,F7);break}case az:{if(Qb(b,Q),JL(Q))break;if(!oq()){var $=eO(b,Q),K=$,O=n4()-K,N=SR(O)-O;if(N>10){b.timeoutHandle=kH(cb.bind(null,b,d6,F7),N);break}}cb(b,d6,F7);break}case wq:{cb(b,d6,F7);break}default:throw Error("Unknown root exit status.")}}function BR(b){var z=b;while(!0){if(z.flags&hQ){var Q=z.updateQueue;if(Q!==null){var X=Q.stores;if(X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z],Y=J.getSnapshot,$=J.value;try{if(!n6(Y(),$))return!1}catch(O){return!1}}}}var K=z.child;if(z.subtreeFlags&hQ&&K!==null){K.return=z,z=K;continue}if(z===b)return!0;while(z.sibling===null){if(z.return===null||z.return===b)return!0;z=z.return}z.sibling.return=z.return,z=z.sibling}return!0}function Qb(b,z){z=gQ(z,BZ),z=gQ(z,iz),GL(b,z)}function Vq(b){if(A_(),(O1&(U6|$5))!==d4)throw Error("Should not already be working.");k7();var z=uQ(b,z0);if(!o6(z,r0))return a6(b,n4()),null;var Q=PZ(b,z);if(b.tag!==i7&&Q===ub){var X=iJ(b);if(X!==z0)z=X,Q=f$(b,X)}if(Q===dz){var Z=lz;throw gb(b,z0),Qb(b,z),a6(b,n4()),Z}if(Q===_$)throw Error("Root did not complete. This is a bug in React.");var J=b.current.alternate;return b.finishedWork=J,b.finishedLanes=z,cb(b,d6,F7),a6(b,n4()),null}function OR(b,z){if(z!==z0){if(pJ(b,X1(z,r0)),a6(b,n4()),(O1&(U6|$5))===d4)jz(),x7()}}function T$(b,z){var Q=O1;O1|=Aq;try{return b(z)}finally{if(O1=Q,O1===d4&&!T5.isBatchingLegacy)jz(),TK()}}function LR(b,z,Q,X,Z){var J=W5(),Y=K6.transition;try{return K6.transition=null,e4(p6),b(z,Q,X,Z)}finally{if(e4(J),K6.transition=Y,O1===d4)jz()}}function M7(b){if(bb!==null&&bb.tag===i7&&(O1&(U6|$5))===d4)k7();var z=O1;O1|=Aq;var Q=K6.transition,X=W5();try{if(K6.transition=null,e4(p6),b)return b();else return}finally{if(e4(X),K6.transition=Q,O1=z,(O1&(U6|$5))===d4)x7()}}function Dq(){return(O1&(U6|$5))!==d4}function _Z(b,z){R6(P$,t5,b),t5=X1(t5,z),R$=X1(R$,z)}function h$(b){t5=P$.current,P6(P$,b)}function gb(b,z){b.finishedWork=null,b.finishedLanes=z0;var Q=b.timeoutHandle;if(Q!==AH)b.timeoutHandle=AH,gv(Q);if(P4!==null){var X=P4.return;while(X!==null){var Z=X.alternate;$q(Z,X),X=X.return}}C6=b;var J=yb(b.current,null);return P4=J,a4=t5=R$=z,l4=R7,lz=null,qZ=z0,iz=z0,BZ=z0,xz=null,d6=null,H_(),R5.discardPendingWarnings(),J}function Eq(b,z){do{var Q=P4;try{if(IX(),ZU(),r4(),W$.current=null,Q===null||Q.return===null){l4=dz,lz=z,P4=null;return}if(Y4&&Q.mode&m1)ZZ(Q,!0);if(v4)if(U8(),z!==null&&typeof z==="object"&&typeof z.then==="function"){var X=z;dO(Q,X,a4)}else yO(Q,z,a4);D_(b,Q.return,Q,z,a4),cq(Q)}catch(Z){if(z=Z,P4===Q&&Q!==null)Q=Q.return,P4=Q;else Q=P4;continue}return}while(!0)}function uq(){var b=v$.current;if(v$.current=eX,b===null)return eX;else return b}function mq(b){v$.current=b}function NR(){F$=n4()}function nz(b){qZ=X1(b,qZ)}function vR(){if(l4===R7)l4=UZ}function C$(){if(l4===R7||l4===UZ||l4===ub)l4=az;if(C6!==null&&(xJ(qZ)||xJ(iz)))Qb(C6,a4)}function WR(b){if(l4!==az)l4=ub;if(xz===null)xz=[b];else xz.push(b)}function _R(){return l4===R7}function PZ(b,z){var Q=O1;O1|=U6;var X=uq();if(C6!==b||a4!==z){if(v5){var Z=b.memoizedUpdaters;if(Z.size>0)tz(b,a4),Z.clear();B9(b,z)}F7=O9(),gb(b,z)}Q9(z);do try{PR();break}catch(J){Eq(b,J)}while(!0);if(IX(),O1=Q,mq(X),P4!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return X9(),C6=null,a4=z0,l4}function PR(){while(P4!==null)gq(P4)}function RR(b,z){var Q=O1;O1|=U6;var X=uq();if(C6!==b||a4!==z){if(v5){var Z=b.memoizedUpdaters;if(Z.size>0)tz(b,a4),Z.clear();B9(b,z)}F7=O9(),jz(),gb(b,z)}Q9(z);do try{FR();break}catch(J){Eq(b,J)}while(!0);if(IX(),mq(X),O1=Q,P4!==null)return jO(),R7;else return X9(),C6=null,a4=z0,l4}function FR(){while(P4!==null&&!PO())gq(P4)}function gq(b){var z=b.alternate;_4(b);var Q;if((b.mode&m1)!==d0)VY(b),Q=S$(z,b,t5),ZZ(b,!0);else Q=S$(z,b,t5);if(r4(),b.memoizedProps=b.pendingProps,Q===null)cq(b);else P4=Q;W$.current=null}function cq(b){var z=b;do{var{alternate:Q,return:X}=z;if((z.flags&V3)===l0){_4(z);var Z=void 0;if((z.mode&m1)===d0)Z=Yq(Q,z,t5);else VY(z),Z=Yq(Q,z,t5),ZZ(z,!1);if(r4(),Z!==null){P4=Z;return}}else{var J=qP(Q,z);if(J!==null){J.flags&=OO,P4=J;return}if((z.mode&m1)!==d0){ZZ(z,!1);var{actualDuration:Y,child:$}=z;while($!==null)Y+=$.actualDuration,$=$.sibling;z.actualDuration=Y}if(X!==null)X.flags|=V3,X.subtreeFlags=l0,X.deletions=null;else{l4=_$,P4=null;return}}var K=z.sibling;if(K!==null){P4=K;return}z=X,P4=z}while(z!==null);if(l4===R7)l4=wq}function cb(b,z,Q){var X=W5(),Z=K6.transition;try{K6.transition=null,e4(p6),MR(b,z,Q,X)}finally{K6.transition=Z,e4(X)}return null}function MR(b,z,Q,X){do k7();while(bb!==null);if(DR(),(O1&(U6|$5))!==d4)throw Error("Should not already be working.");var{finishedWork:Z,finishedLanes:J}=b;if(VO(J),Z===null)return eG(),null;else if(J===z0)G("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(b.finishedWork=null,b.finishedLanes=z0,Z===b.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");b.callbackNode=null,b.callbackPriority=s4;var Y=X1(Z.lanes,Z.childLanes);if(KL(b,Y),b===C6)C6=null,P4=null,a4=z0;if((Z.subtreeFlags&K8)!==l0||(Z.flags&K8)!==l0){if(!mb)mb=!0,A$=Q,E$(vb,function(){return k7(),null})}var $=(Z.subtreeFlags&(_J|PJ|D3|K8))!==l0,K=(Z.flags&(_J|PJ|D3|K8))!==l0;if($||K){var O=K6.transition;K6.transition=null;var N=W5();e4(p6);var T=O1;O1|=$5,W$.current=null;var f=vP(b,Z);TU(),CP(b,Z,J),Cv(b.containerInfo),b.current=Z,aO(J),SP(Z,b,J),lO(),RO(),O1=T,e4(N),K6.transition=O}else b.current=Z,TU();var g=mb;if(mb)mb=!1,bb=b,oz=J;else x8=0,NZ=null;if(Y=b.pendingLanes,Y===z0)i8=null;if(!g)lq(b.current,!1);if(fO(Z.stateNode,X),v5)b.memoizedUpdaters.clear();if(QR(),a6(b,n4()),z!==null){var c=b.onRecoverableError;for(var a=0;a<z.length;a++){var N0=z[a],m0=N0.stack,T0=N0.digest;c(N0.value,{componentStack:m0,digest:T0})}}if(OZ){OZ=!1;var $1=M$;throw M$=null,$1}if(o6(oz,r0)&&b.tag!==i7)k7();if(Y=b.pendingLanes,o6(Y,r0))if(M_(),b===w$)pz++;else pz=0,w$=b;else pz=0;return x7(),eG(),null}function k7(){if(bb!==null){var b=L9(oz),z=OL(B7,b),Q=K6.transition,X=W5();try{return K6.transition=null,e4(z),AR()}finally{e4(X),K6.transition=Q}}return!1}function kR(b){if(k$.push(b),!mb)mb=!0,E$(vb,function(){return k7(),null})}function AR(){if(bb===null)return!1;var b=A$;A$=null;var z=bb,Q=oz;if(bb=null,oz=z0,(O1&(U6|$5))!==d4)throw Error("Cannot flush passive effects while already rendering.");I$=!0,LZ=!1,iO(Q);var X=O1;O1|=$5,cP(z.current),EP(z,z.current,Q,b);{var Z=k$;k$=[];for(var J=0;J<Z.length;J++){var Y=Z[J];RP(z,Y)}}xO(),lq(z.current,!0),O1=X,x7();{if(LZ)if(z===NZ)x8++;else x8=0,NZ=z;else x8=0;I$=!1,LZ=!1}TO(z);{var $=z.current.stateNode;$.effectDuration=0,$.passiveEffectDuration=0}return!0}function yq(b){return i8!==null&&i8.has(b)}function wR(b){if(i8===null)i8=new Set([b]);else i8.add(b)}function IR(b){if(!OZ)OZ=!0,M$=b}var fR=IR;function dq(b,z,Q){var X=Db(Q,z),Z=mU(b,X,r0),J=o7(b,Z,r0),Y=S6();if(J!==null)a3(J,r0,Y),a6(J,Y)}function e1(b,z,Q){if(OP(Q),sz(!1),b.tag===w){dq(b,b,Q);return}var X=null;X=z;while(X!==null){if(X.tag===w){dq(X,b,Q);return}else if(X.tag===W){var{type:Z,stateNode:J}=X;if(typeof Z.getDerivedStateFromError==="function"||typeof J.componentDidCatch==="function"&&!yq(J)){var Y=Db(Q,b),$=tY(X,Y,r0),K=o7(X,$,r0),O=S6();if(K!==null)a3(K,r0,O),a6(K,O);return}}X=X.return}G(`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`,Q)}function TR(b,z,Q){var X=b.pingCache;if(X!==null)X.delete(z);var Z=S6();if(U9(b,Q),gR(b),C6===b&&L8(a4,Q))if(l4===az||l4===UZ&&Y9(a4)&&n4()-F$<Iq)gb(b,z0);else BZ=X1(BZ,Q);a6(b,Z)}function aq(b,z){if(z===s4)z=GR(b);var Q=S6(),X=c6(b,z);if(X!==null)a3(X,z,Q),a6(X,Q)}function hR(b){var z=b.memoizedState,Q=s4;if(z!==null)Q=z.retryLane;aq(b,Q)}function CR(b,z){var Q=s4,X;switch(b.tag){case s:X=b.stateNode;var Z=b.memoizedState;if(Z!==null)Q=Z.retryLane;break;case O0:X=b.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(X!==null)X.delete(z);aq(b,Q)}function SR(b){return b<120?120:b<480?480:b<1080?1080:b<1920?1920:b<3000?3000:b<4320?4320:JR(b/1960)*1960}function VR(){if(pz>YR)throw pz=0,w$=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(x8>$R)x8=0,NZ=null,G("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 DR(){R5.flushLegacyContextWarning(),R5.flushPendingUnsafeLifecycleWarnings()}function lq(b,z){{if(_4(b),RZ(b,G7,pP),z)RZ(b,CQ,rP);if(RZ(b,G7,jP),z)RZ(b,CQ,oP);r4()}}function RZ(b,z,Q){{var X=b,Z=null;while(X!==null){var J=X.subtreeFlags&z;if(X!==Z&&X.child!==null&&J!==l0)X=X.child;else{if((X.flags&z)!==l0)Q(X);if(X.sibling!==null)X=X.sibling;else X=Z=X.return}}}}var FZ=null;function iq(b){{if((O1&U6)!==d4)return;if(!(b.mode&B1))return;var z=b.tag;if(z!==I&&z!==w&&z!==W&&z!==R&&z!==u&&z!==Q0&&z!==n)return;var Q=Q1(b)||"ReactComponent";if(FZ!==null){if(FZ.has(Q))return;FZ.add(Q)}else FZ=new Set([Q]);var X=_6;try{_4(b),G("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(X)_4(b);else r4()}}}var S$;{var ER=null;S$=function(b,z,Q){var X=sq(ER,z);try{return Qq(b,z,Q)}catch(J){if(lW()||J!==null&&typeof J==="object"&&typeof J.then==="function")throw J;if(IX(),ZU(),$q(b,z),sq(z,X),z.mode&m1)VY(z);if(BJ(null,Qq,null,b,z,Q),KO()){var Z=OJ();if(typeof Z==="object"&&Z!==null&&Z._suppressLogging&&typeof J==="object"&&J!==null&&!J._suppressLogging)J._suppressLogging=!0}throw J}}}var xq=!1,V$;V$=new Set;function uR(b){if($b&&!P_())switch(b.tag){case R:case u:case n:{var z=P4&&Q1(P4)||"Unknown",Q=z;if(!V$.has(Q)){V$.add(Q);var X=Q1(b)||"Unknown";G("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",X,z,z)}break}case W:{if(!xq)G("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),xq=!0;break}}}function tz(b,z){if(v5){var Q=b.memoizedUpdaters;Q.forEach(function(X){q9(b,X,z)})}}var D$={};function E$(b,z){{var Q=T5.current;if(Q!==null)return Q.push(z),D$;else return sG(b,z)}}function jq(b){if(b===D$)return;return _O(b)}function oq(){return T5.current!==null}function mR(b){{if(b.mode&B1){if(!kq())return}else{if(!ZR())return;if(O1!==d4)return;if(b.tag!==R&&b.tag!==u&&b.tag!==n)return}if(T5.current===null){var z=_6;try{_4(b),G(`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`,Q1(b))}finally{if(z)_4(b);else r4()}}}}function gR(b){if(b.tag!==i7&&kq()&&T5.current===null)G(`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 sz(b){hq=b}var G5=null,j8=null,cR=function(b){G5=b};function o8(b){{if(G5===null)return b;var z=G5(b);if(z===void 0)return b;return z.current}}function u$(b){return o8(b)}function m$(b){{if(G5===null)return b;var z=G5(b);if(z===void 0){if(b!==null&&b!==void 0&&typeof b.render==="function"){var Q=o8(b.render);if(b.render!==Q){var X={$$typeof:h,render:Q};if(b.displayName!==void 0)X.displayName=b.displayName;return X}}return b}return z.current}}function pq(b,z){{if(G5===null)return!1;var Q=b.elementType,X=z.type,Z=!1,J=typeof X==="object"&&X!==null?X.$$typeof:null;switch(b.tag){case W:{if(typeof X==="function")Z=!0;break}case R:{if(typeof X==="function")Z=!0;else if(J===f0)Z=!0;break}case u:{if(J===h)Z=!0;else if(J===f0)Z=!0;break}case Q0:case n:{if(J===q0)Z=!0;else if(J===f0)Z=!0;break}default:return!1}if(Z){var Y=G5(Q);if(Y!==void 0&&Y===G5(X))return!0}return!1}}function rq(b){{if(G5===null)return;if(typeof WeakSet!=="function")return;if(j8===null)j8=new WeakSet;j8.add(b)}}var yR=function(b,z){{if(G5===null)return;var{staleFamilies:Q,updatedFamilies:X}=z;k7(),M7(function(){g$(b.current,X,Q)})}},dR=function(b,z){{if(b.context!==t6)return;k7(),M7(function(){ez(z,b,null,null)})}};function g$(b,z,Q){{var{alternate:X,child:Z,sibling:J,tag:Y,type:$}=b,K=null;switch(Y){case R:case n:case W:K=$;break;case u:K=$.render;break}if(G5===null)throw Error("Expected resolveFamily to be set during hot reload.");var O=!1,N=!1;if(K!==null){var T=G5(K);if(T!==void 0){if(Q.has(T))N=!0;else if(z.has(T))if(Y===W)N=!0;else O=!0}}if(j8!==null){if(j8.has(b)||X!==null&&j8.has(X))N=!0}if(N)b._debugNeedsRemount=!0;if(N||O){var f=c6(b,r0);if(f!==null)i4(f,b,r0,H4)}if(Z!==null&&!N)g$(Z,z,Q);if(J!==null)g$(J,z,Q)}}var aR=function(b,z){{var Q=new Set,X=new Set(z.map(function(Z){return Z.current}));return c$(b.current,X,Q),Q}};function c$(b,z,Q){{var{child:X,sibling:Z,tag:J,type:Y}=b,$=null;switch(J){case R:case n:case W:$=Y;break;case u:$=Y.render;break}var K=!1;if($!==null){if(z.has($))K=!0}if(K)lR(b,Q);else if(X!==null)c$(X,z,Q);if(Z!==null)c$(Z,z,Q)}}function lR(b,z){{var Q=iR(b,z);if(Q)return;var X=b;while(!0){switch(X.tag){case A:z.add(X.stateNode);return;case P:z.add(X.stateNode.containerInfo);return;case w:z.add(X.stateNode.containerInfo);return}if(X.return===null)throw Error("Expected to reach root first.");X=X.return}}}function iR(b,z){{var Q=b,X=!1;while(!0){if(Q.tag===A)X=!0,z.add(Q.stateNode);else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===b)return X;while(Q.sibling===null){if(Q.return===null||Q.return===b)return X;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}return!1}var y$;{y$=!1;try{var nq=Object.preventExtensions({})}catch(b){y$=!0}}function xR(b,z,Q,X){if(this.tag=b,this.key=Q,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=z,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=X,this.flags=l0,this.subtreeFlags=l0,this.deletions=null,this.lanes=z0,this.childLanes=z0,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,!y$&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var s6=function(b,z,Q,X){return new xR(b,z,Q,X)};function d$(b){var z=b.prototype;return!!(z&&z.isReactComponent)}function jR(b){return typeof b==="function"&&!d$(b)&&b.defaultProps===void 0}function oR(b){if(typeof b==="function")return d$(b)?W:R;else if(b!==void 0&&b!==null){var z=b.$$typeof;if(z===h)return u;if(z===q0)return Q0}return I}function yb(b,z){var Q=b.alternate;if(Q===null)Q=s6(b.tag,z,b.key,b.mode),Q.elementType=b.elementType,Q.type=b.type,Q.stateNode=b.stateNode,Q._debugSource=b._debugSource,Q._debugOwner=b._debugOwner,Q._debugHookTypes=b._debugHookTypes,Q.alternate=b,b.alternate=Q;else Q.pendingProps=z,Q.type=b.type,Q.flags=l0,Q.subtreeFlags=l0,Q.deletions=null,Q.actualDuration=0,Q.actualStartTime=-1;Q.flags=b.flags&K7,Q.childLanes=b.childLanes,Q.lanes=b.lanes,Q.child=b.child,Q.memoizedProps=b.memoizedProps,Q.memoizedState=b.memoizedState,Q.updateQueue=b.updateQueue;var X=b.dependencies;switch(Q.dependencies=X===null?null:{lanes:X.lanes,firstContext:X.firstContext},Q.sibling=b.sibling,Q.index=b.index,Q.ref=b.ref,Q.selfBaseDuration=b.selfBaseDuration,Q.treeBaseDuration=b.treeBaseDuration,Q._debugNeedsRemount=b._debugNeedsRemount,Q.tag){case I:case R:case n:Q.type=o8(b.type);break;case W:Q.type=u$(b.type);break;case u:Q.type=m$(b.type);break}return Q}function pR(b,z){b.flags&=K7|S4;var Q=b.alternate;if(Q===null)b.childLanes=z0,b.lanes=z,b.child=null,b.subtreeFlags=l0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null,b.selfBaseDuration=0,b.treeBaseDuration=0;else{b.childLanes=Q.childLanes,b.lanes=Q.lanes,b.child=Q.child,b.subtreeFlags=l0,b.deletions=null,b.memoizedProps=Q.memoizedProps,b.memoizedState=Q.memoizedState,b.updateQueue=Q.updateQueue,b.type=Q.type;var X=Q.dependencies;b.dependencies=X===null?null:{lanes:X.lanes,firstContext:X.firstContext},b.selfBaseDuration=Q.selfBaseDuration,b.treeBaseDuration=Q.treeBaseDuration}return b}function rR(b,z,Q){var X;if(b===vX){if(X=B1,z===!0)X|=M4,X|=d5}else X=d0;if(v5)X|=m1;return s6(w,null,null,X)}function a$(b,z,Q,X,Z,J){var Y=I,$=b;if(typeof b==="function")if(d$(b))Y=W,$=u$($);else $=o8($);else if(typeof b==="string")Y=A;else b:switch(b){case F1:return Xb(Q.children,Z,J,z);case M:if(Y=E,Z|=M4,(Z&B1)!==d0)Z|=d5;break;case i:return nR(Q,Z,J,z);case p:return tR(Q,Z,J,z);case H0:return sR(Q,Z,J,z);case G0:return tq(Q,Z,J,z);case V0:case M0:case U1:case D1:case t:default:{if(typeof b==="object"&&b!==null)switch(b.$$typeof){case b0:Y=D;break b;case v:Y=r;break b;case h:Y=u,$=m$($);break b;case q0:Y=Q0;break b;case f0:Y=C,$=null;break b}var K="";{if(b===void 0||typeof b==="object"&&b!==null&&Object.keys(b).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 O=X?Q1(X):null;if(O)K+=`
|
|
138
|
+
|
|
139
|
+
Check the render method of \``+O+"`."}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(b==null?b:typeof b)+"."+K))}}var N=s6(Y,Q,z,Z);return N.elementType=b,N.type=$,N.lanes=J,N._debugOwner=X,N}function l$(b,z,Q){var X=null;X=b._owner;var{type:Z,key:J,props:Y}=b,$=a$(Z,J,Y,X,z,Q);return $._debugSource=b._source,$._debugOwner=b._owner,$}function Xb(b,z,Q,X){var Z=s6(d,b,X,z);return Z.lanes=Q,Z}function nR(b,z,Q,X){if(typeof b.id!=="string")G('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof b.id);var Z=s6(v0,b,X,z|m1);return Z.elementType=i,Z.lanes=Q,Z.stateNode={effectDuration:0,passiveEffectDuration:0},Z}function tR(b,z,Q,X){var Z=s6(s,b,X,z);return Z.elementType=p,Z.lanes=Q,Z}function sR(b,z,Q,X){var Z=s6(O0,b,X,z);return Z.elementType=H0,Z.lanes=Q,Z}function tq(b,z,Q,X){var Z=s6(g0,b,X,z);Z.elementType=G0,Z.lanes=Q;var J={isHidden:!1};return Z.stateNode=J,Z}function i$(b,z,Q){var X=s6(F,b,null,z);return X.lanes=Q,X}function eR(){var b=s6(A,null,null,d0);return b.elementType="DELETED",b}function bF(b){var z=s6($0,null,null,d0);return z.stateNode=b,z}function x$(b,z,Q){var X=b.children!==null?b.children:[],Z=s6(P,X,b.key,z);return Z.lanes=Q,Z.stateNode={containerInfo:b.containerInfo,pendingChildren:null,implementation:b.implementation},Z}function sq(b,z){if(b===null)b=s6(I,null,null,d0);return b.tag=z.tag,b.key=z.key,b.elementType=z.elementType,b.type=z.type,b.stateNode=z.stateNode,b.return=z.return,b.child=z.child,b.sibling=z.sibling,b.index=z.index,b.ref=z.ref,b.pendingProps=z.pendingProps,b.memoizedProps=z.memoizedProps,b.updateQueue=z.updateQueue,b.memoizedState=z.memoizedState,b.dependencies=z.dependencies,b.mode=z.mode,b.flags=z.flags,b.subtreeFlags=z.subtreeFlags,b.deletions=z.deletions,b.lanes=z.lanes,b.childLanes=z.childLanes,b.alternate=z.alternate,b.actualDuration=z.actualDuration,b.actualStartTime=z.actualStartTime,b.selfBaseDuration=z.selfBaseDuration,b.treeBaseDuration=z.treeBaseDuration,b._debugSource=z._debugSource,b._debugOwner=z._debugOwner,b._debugNeedsRemount=z._debugNeedsRemount,b._debugHookTypes=z._debugHookTypes,b}function zF(b,z,Q,X,Z){this.tag=z,this.containerInfo=b,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=AH,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=s4,this.eventTimes=oJ(z0),this.expirationTimes=oJ(H4),this.pendingLanes=z0,this.suspendedLanes=z0,this.pingedLanes=z0,this.expiredLanes=z0,this.mutableReadLanes=z0,this.finishedLanes=z0,this.entangledLanes=z0,this.entanglements=oJ(z0),this.identifierPrefix=X,this.onRecoverableError=Z,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var J=this.pendingUpdatersLaneMap=[];for(var Y=0;Y<kJ;Y++)J.push(new Set)}switch(z){case vX:this._debugRootType=Q?"hydrateRoot()":"createRoot()";break;case i7:this._debugRootType=Q?"hydrate()":"render()";break}}function eq(b,z,Q,X,Z,J,Y,$,K,O){var N=new zF(b,z,Q,$,K),T=rR(z,J);N.current=T,T.stateNode=N;{var f={element:X,isDehydrated:Q,cache:null,transitions:null,pendingSuspenseBoundaries:null};T.memoizedState=f}return QY(T),N}var j$="18.3.1";function QF(b,z,Q){var X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return w4(X),{$$typeof:j1,key:X==null?null:""+X,children:b,containerInfo:z,implementation:Q}}var o$,p$;o$=!1,p$={};function bB(b){if(!b)return t6;var z=$8(b),Q=DW(z);if(z.tag===W){var X=z.type;if(i5(X))return wK(z,X,Q)}return Q}function XF(b,z){{var Q=$8(b);if(Q===void 0)if(typeof b.render==="function")throw Error("Unable to find node on an unmounted component.");else{var X=Object.keys(b).join(",");throw Error("Argument appears to not be a ReactComponent. Keys: "+X)}var Z=rG(Q);if(Z===null)return null;if(Z.mode&M4){var J=Q1(Q)||"Component";if(!p$[J]){p$[J]=!0;var Y=_6;try{if(_4(Z),Q.mode&M4)G("%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",z,z,J);else G("%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",z,z,J)}finally{if(Y)_4(Y);else r4()}}}return Z.stateNode}}function zB(b,z,Q,X,Z,J,Y,$){var K=!1,O=null;return eq(b,z,K,O,Q,X,Z,J,Y)}function QB(b,z,Q,X,Z,J,Y,$,K,O){var N=!0,T=eq(Q,X,N,b,Z,J,Y,$,K);T.context=bB(null);var f=T.current,g=S6(),c=zb(f),a=_7(g,c);return a.callback=z!==void 0&&z!==null?z:null,o7(f,a,c),KR(T,c,g),T}function ez(b,z,Q,X){IO(z,b);var Z=z.current,J=S6(),Y=zb(Z);oO(Y);var $=bB(Q);if(z.context===null)z.context=$;else z.pendingContext=$;if($b&&_6!==null&&!o$)o$=!0,G(`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.`,Q1(_6)||"Unknown");var K=_7(J,Y);if(K.payload={element:b},X=X===void 0?null:X,X!==null){if(typeof X!=="function")G("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",X);K.callback=X}var O=o7(Z,K,Y);if(O!==null)i4(O,Z,Y,J),SX(O,Z,Y);return Y}function MZ(b){var z=b.current;if(!z.child)return null;switch(z.child.tag){case A:return FH(z.child.stateNode);default:return z.child.stateNode}}function ZF(b){switch(b.tag){case w:{var z=b.stateNode;if(dQ(z)){var Q=QL(z);OR(z,Q)}break}case s:{M7(function(){var Z=c6(b,r0);if(Z!==null){var J=S6();i4(Z,b,r0,J)}});var X=r0;r$(b,X);break}}}function XB(b,z){var Q=b.memoizedState;if(Q!==null&&Q.dehydrated!==null)Q.retryLane=$L(Q.retryLane,z)}function r$(b,z){XB(b,z);var Q=b.alternate;if(Q)XB(Q,z)}function JF(b){if(b.tag!==s)return;var z=g3,Q=c6(b,z);if(Q!==null){var X=S6();i4(Q,b,z,X)}r$(b,z)}function HF(b){if(b.tag!==s)return;var z=zb(b),Q=c6(b,z);if(Q!==null){var X=S6();i4(Q,b,z,X)}r$(b,z)}function ZB(b){var z=WO(b);if(z===null)return null;return z.stateNode}var JB=function(b){return null};function YF(b){return JB(b)}var HB=function(b){return!1};function $F(b){return HB(b)}var YB=null,$B=null,GB=null,KB=null,UB=null,qB=null,BB=null,OB=null,LB=null;{var NB=function(b,z,Q){var X=z[Q],Z=A1(b)?b.slice():Z1({},b);if(Q+1===z.length){if(A1(Z))Z.splice(X,1);else delete Z[X];return Z}return Z[X]=NB(b[X],z,Q+1),Z},vB=function(b,z){return NB(b,z,0)},WB=function(b,z,Q,X){var Z=z[X],J=A1(b)?b.slice():Z1({},b);if(X+1===z.length){var Y=Q[X];if(J[Y]=J[Z],A1(J))J.splice(Z,1);else delete J[Z]}else J[Z]=WB(b[Z],z,Q,X+1);return J},_B=function(b,z,Q){if(z.length!==Q.length){L("copyWithRename() expects paths of the same length");return}else for(var X=0;X<Q.length-1;X++)if(z[X]!==Q[X]){L("copyWithRename() expects paths to be the same except for the deepest key");return}return WB(b,z,Q,0)},PB=function(b,z,Q,X){if(Q>=z.length)return X;var Z=z[Q],J=A1(b)?b.slice():Z1({},b);return J[Z]=PB(b[Z],z,Q+1,X),J},RB=function(b,z,Q){return PB(b,z,0,Q)},n$=function(b,z){var Q=b.memoizedState;while(Q!==null&&z>0)Q=Q.next,z--;return Q};YB=function(b,z,Q,X){var Z=n$(b,z);if(Z!==null){var J=RB(Z.memoizedState,Q,X);Z.memoizedState=J,Z.baseState=J,b.memoizedProps=Z1({},b.memoizedProps);var Y=c6(b,r0);if(Y!==null)i4(Y,b,r0,H4)}},$B=function(b,z,Q){var X=n$(b,z);if(X!==null){var Z=vB(X.memoizedState,Q);X.memoizedState=Z,X.baseState=Z,b.memoizedProps=Z1({},b.memoizedProps);var J=c6(b,r0);if(J!==null)i4(J,b,r0,H4)}},GB=function(b,z,Q,X){var Z=n$(b,z);if(Z!==null){var J=_B(Z.memoizedState,Q,X);Z.memoizedState=J,Z.baseState=J,b.memoizedProps=Z1({},b.memoizedProps);var Y=c6(b,r0);if(Y!==null)i4(Y,b,r0,H4)}},KB=function(b,z,Q){if(b.pendingProps=RB(b.memoizedProps,z,Q),b.alternate)b.alternate.pendingProps=b.pendingProps;var X=c6(b,r0);if(X!==null)i4(X,b,r0,H4)},UB=function(b,z){if(b.pendingProps=vB(b.memoizedProps,z),b.alternate)b.alternate.pendingProps=b.pendingProps;var Q=c6(b,r0);if(Q!==null)i4(Q,b,r0,H4)},qB=function(b,z,Q){if(b.pendingProps=_B(b.memoizedProps,z,Q),b.alternate)b.alternate.pendingProps=b.pendingProps;var X=c6(b,r0);if(X!==null)i4(X,b,r0,H4)},BB=function(b){var z=c6(b,r0);if(z!==null)i4(z,b,r0,H4)},OB=function(b){JB=b},LB=function(b){HB=b}}function GF(b){var z=rG(b);if(z===null)return null;return z.stateNode}function KF(b){return null}function UF(){return _6}function qF(b){var z=b.findFiberByHostInstance,Q=H.ReactCurrentDispatcher;return wO({bundleType:b.bundleType,version:b.version,rendererPackageName:b.rendererPackageName,rendererConfig:b.rendererConfig,overrideHookState:YB,overrideHookStateDeletePath:$B,overrideHookStateRenamePath:GB,overrideProps:KB,overridePropsDeletePath:UB,overridePropsRenamePath:qB,setErrorHandler:OB,setSuspenseHandler:LB,scheduleUpdate:BB,currentDispatcherRef:Q,findHostInstanceByFiber:GF,findFiberByHostInstance:z||KF,findHostInstancesForRefresh:aR,scheduleRefresh:yR,scheduleRoot:dR,setRefreshHandler:cR,getCurrentFiber:UF,reconcilerVersion:j$})}var FB=typeof reportError==="function"?reportError:function(b){console.error(b)};function t$(b){this._internalRoot=b}kZ.prototype.render=t$.prototype.render=function(b){var z=this._internalRoot;if(z===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")G("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(AZ(arguments[1]))G("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")G("You passed a second argument to root.render(...) but it only accepts one argument.");var Q=z.containerInfo;if(Q.nodeType!==C4){var X=ZB(z.current);if(X){if(X.parentNode!==Q)G("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.")}}}ez(b,z,null,null)},kZ.prototype.unmount=t$.prototype.unmount=function(){if(typeof arguments[0]==="function")G("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var b=this._internalRoot;if(b!==null){this._internalRoot=null;var z=b.containerInfo;if(Dq())G("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.");M7(function(){ez(null,b,null,null)}),PK(z)}};function BF(b,z){if(!AZ(b))throw Error("createRoot(...): Target container is not a DOM element.");MB(b);var Q=!1,X=!1,Z="",J=FB,Y=null;if(z!==null&&z!==void 0){if(z.hydrate)L("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");else if(typeof z==="object"&&z!==null&&z.$$typeof===V1)G(`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(z.unstable_strictMode===!0)Q=!0;if(z.identifierPrefix!==void 0)Z=z.identifierPrefix;if(z.onRecoverableError!==void 0)J=z.onRecoverableError;if(z.transitionCallbacks!==void 0)Y=z.transitionCallbacks}var $=zB(b,vX,null,Q,X,Z,J);KX($.current,b);var K=b.nodeType===C4?b.parentNode:b;return Jz(K),new t$($)}function kZ(b){this._internalRoot=b}function OF(b){if(b)AL(b)}kZ.prototype.unstable_scheduleHydration=OF;function LF(b,z,Q){if(!AZ(b))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(MB(b),z===void 0)G("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var X=Q!=null?Q:null,Z=Q!=null&&Q.hydratedSources||null,J=!1,Y=!1,$="",K=FB;if(Q!==null&&Q!==void 0){if(Q.unstable_strictMode===!0)J=!0;if(Q.identifierPrefix!==void 0)$=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)K=Q.onRecoverableError}var O=QB(z,null,b,vX,X,J,Y,$,K);if(KX(O.current,b),Jz(b),Z)for(var N=0;N<Z.length;N++){var T=Z[N];L_(O,T)}return new kZ(O)}function AZ(b){return!!(b&&(b.nodeType===m6||b.nodeType===H7||b.nodeType===QJ||!i0))}function bQ(b){return!!(b&&(b.nodeType===m6||b.nodeType===H7||b.nodeType===QJ||b.nodeType===C4&&b.nodeValue===" react-mount-point-unstable "))}function MB(b){{if(b.nodeType===m6&&b.tagName&&b.tagName.toUpperCase()==="BODY")G("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(Nz(b))if(b._reactRootContainer)G("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else G("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 NF=H.ReactCurrentOwner,kB;kB=function(b){if(b._reactRootContainer&&b.nodeType!==C4){var z=ZB(b._reactRootContainer.current);if(z){if(z.parentNode!==b)G("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 Q=!!b._reactRootContainer,X=s$(b),Z=!!(X&&a7(X));if(Z&&!Q)G("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(b.nodeType===m6&&b.tagName&&b.tagName.toUpperCase()==="BODY")G("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 s$(b){if(!b)return null;if(b.nodeType===H7)return b.documentElement;else return b.firstChild}function AB(){}function vF(b,z,Q,X,Z){if(Z){if(typeof X==="function"){var J=X;X=function(){var f=MZ(Y);J.call(f)}}var Y=QB(z,X,b,i7,null,!1,!1,"",AB);b._reactRootContainer=Y,KX(Y.current,b);var $=b.nodeType===C4?b.parentNode:b;return Jz($),M7(),Y}else{var K;while(K=b.lastChild)b.removeChild(K);if(typeof X==="function"){var O=X;X=function(){var f=MZ(N);O.call(f)}}var N=zB(b,i7,null,!1,!1,"",AB);b._reactRootContainer=N,KX(N.current,b);var T=b.nodeType===C4?b.parentNode:b;return Jz(T),M7(function(){ez(z,N,Q,X)}),N}}function WF(b,z){if(b!==null&&typeof b!=="function")G("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",z,b)}function wZ(b,z,Q,X,Z){kB(Q),WF(Z===void 0?null:Z,"render");var J=Q._reactRootContainer,Y;if(!J)Y=vF(Q,z,b,Z,X);else{if(Y=J,typeof Z==="function"){var $=Z;Z=function(){var K=MZ(Y);$.call(K)}}ez(z,Y,b,Z)}return MZ(Y)}var wB=!1;function _F(b){{if(!wB)wB=!0,G("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 z=NF.current;if(z!==null&&z.stateNode!==null){var Q=z.stateNode._warnedAboutRefsInRender;if(!Q)G("%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.",R1(z.type)||"A component");z.stateNode._warnedAboutRefsInRender=!0}}if(b==null)return null;if(b.nodeType===m6)return b;return XF(b,"findDOMNode")}function PF(b,z,Q){if(G("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"),!bQ(z))throw Error("Target container is not a DOM element.");{var X=Nz(z)&&z._reactRootContainer===void 0;if(X)G("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 wZ(null,b,z,!0,Q)}function RF(b,z,Q){if(G("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"),!bQ(z))throw Error("Target container is not a DOM element.");{var X=Nz(z)&&z._reactRootContainer===void 0;if(X)G("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 wZ(null,b,z,!1,Q)}function FF(b,z,Q,X){if(G("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"),!bQ(Q))throw Error("Target container is not a DOM element.");if(b==null||!UO(b))throw Error("parentComponent must be a valid React Component");return wZ(b,z,Q,!1,X)}var IB=!1;function MF(b){if(!IB)IB=!0,G("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(!bQ(b))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var z=Nz(b)&&b._reactRootContainer===void 0;if(z)G("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(b._reactRootContainer){{var Q=s$(b),X=Q&&!a7(Q);if(X)G("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return M7(function(){wZ(null,null,b,!1,function(){b._reactRootContainer=null,PK(b)})}),!0}else{{var Z=s$(b),J=!!(Z&&a7(Z)),Y=b.nodeType===m6&&bQ(b.parentNode)&&!!b.parentNode._reactRootContainer;if(J)G("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",Y?"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(LL(ZF),vL(JF),WL(HF),_L(W5),PL(qL),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")G("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");bO(Rv),XO(T$,LR,M7);function kF(b,z){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!AZ(z))throw Error("Target container is not a DOM element.");return QF(b,z,null,Q)}function AF(b,z,Q,X){return FF(b,z,Q,X)}var e$={usingClientEntryPoint:!1,Events:[a7,k8,UX,mG,gG,T$]};function wF(b,z){if(!e$.usingClientEntryPoint)G('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return BF(b,z)}function IF(b,z,Q){if(!e$.usingClientEntryPoint)G('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return LF(b,z,Q)}function fF(b){if(Dq())G("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 M7(b)}var TF=qF({findFiberByHostInstance:Ab,bundleType:1,version:j$,rendererPackageName:"react-dom"});if(!TF&&X4&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var fB=window.location.protocol;if(/^(https?|file):$/.test(fB))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(fB==="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(gF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e$,gF.createPortal=kF,gF.createRoot=wF,gF.findDOMNode=_F,gF.flushSync=fF,gF.hydrate=PF,gF.hydrateRoot=IF,gF.render=RF,gF.unmountComponentAtNode=MF,gF.unstable_batchedUpdates=T$,gF.unstable_renderSubtreeIntoContainer=AF,gF.version=j$,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var VB=db((sA,SB)=>{var cF=J0(CB());SB.exports=cF});var DB=db((yF)=>{var n8=J0(VB());r8=n8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yF.createRoot=function(H,U){r8.usingClientEntryPoint=!0;try{return n8.createRoot(H,U)}finally{r8.usingClientEntryPoint=!1}},yF.hydrateRoot=function(H,U,B){r8.usingClientEntryPoint=!0;try{return n8.hydrateRoot(H,U,B)}finally{r8.usingClientEntryPoint=!1}};var r8});var L1=db((dF)=>{var ZG=J0(y1());(function(){var H=Symbol.for("react.element"),U=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),R=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),d=Symbol.iterator,E="@@iterator";function r(M){if(M===null||typeof M!=="object")return null;var i=d&&M[d]||M[E];if(typeof i==="function")return i;return null}var D=ZG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(M){{for(var i=arguments.length,b0=Array(i>1?i-1:0),v=1;v<i;v++)b0[v-1]=arguments[v];v0("error",M,b0)}}function v0(M,i,b0){{var v=D.ReactDebugCurrentFrame,h=v.getStackAddendum();if(h!=="")i+="%s",b0=b0.concat([h]);var p=b0.map(function(H0){return String(H0)});p.unshift("Warning: "+i),Function.prototype.apply.call(console[M],console,p)}}var s=!1,Q0=!1,n=!1,C=!1,j=!1,$0;$0=Symbol.for("react.module.reference");function O0(M){if(typeof M==="string"||typeof M==="function")return!0;if(M===B||M===G||j||M===L||M===I||M===w||C||M===F||s||Q0||n)return!0;if(typeof M==="object"&&M!==null){if(M.$$typeof===A||M.$$typeof===P||M.$$typeof===_||M.$$typeof===R||M.$$typeof===W||M.$$typeof===$0||M.getModuleId!==void 0)return!0}return!1}function L0(M,i,b0){var v=M.displayName;if(v)return v;var h=i.displayName||i.name||"";return h!==""?b0+"("+h+")":b0}function g0(M){return M.displayName||"Context"}function Z0(M){if(M==null)return null;if(typeof M.tag==="number")u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof M==="function")return M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case B:return"Fragment";case U:return"Portal";case G:return"Profiler";case L:return"StrictMode";case I:return"Suspense";case w:return"SuspenseList"}if(typeof M==="object")switch(M.$$typeof){case R:var i=M;return g0(i)+".Consumer";case _:var b0=M;return g0(b0._context)+".Provider";case W:return L0(M,M.render,"ForwardRef");case P:var v=M.displayName||null;if(v!==null)return v;return Z0(M.type)||"Memo";case A:{var h=M,p=h._payload,H0=h._init;try{return Z0(H0(p))}catch(q0){return null}}}return null}var k0=Object.assign,a0=0,C0,S0,_1,H1,P1,i0,Y1;function C1(){}C1.__reactDisabledLog=!0;function v4(){{if(a0===0){C0=console.log,S0=console.info,_1=console.warn,H1=console.error,P1=console.group,i0=console.groupCollapsed,Y1=console.groupEnd;var M={configurable:!0,enumerable:!0,value:C1,writable:!0};Object.defineProperties(console,{info:M,log:M,warn:M,error:M,group:M,groupCollapsed:M,groupEnd:M})}a0++}}function Y4(){{if(a0--,a0===0){var M={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k0({},M,{value:C0}),info:k0({},M,{value:S0}),warn:k0({},M,{value:_1}),error:k0({},M,{value:H1}),group:k0({},M,{value:P1}),groupCollapsed:k0({},M,{value:i0}),groupEnd:k0({},M,{value:Y1})})}if(a0<0)u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q4=D.ReactCurrentDispatcher,W4;function a1(M,i,b0){{if(W4===void 0)try{throw Error()}catch(h){var v=h.stack.trim().match(/\n( *(at )?)/);W4=v&&v[1]||""}return`
|
|
146
|
+
`+W4+M}}var i1=!1,$4;{var D4=typeof WeakMap==="function"?WeakMap:Map;$4=new D4}function X4(M,i){if(!M||i1)return"";{var b0=$4.get(M);if(b0!==void 0)return b0}var v;i1=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=Q4.current,Q4.current=null,v4();try{if(i){var H0=function(){throw Error()};if(Object.defineProperty(H0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(H0,[])}catch(D1){v=D1}Reflect.construct(M,[],H0)}else{try{H0.call()}catch(D1){v=D1}M.call(H0.prototype)}}else{try{throw Error()}catch(D1){v=D1}M()}}catch(D1){if(D1&&v&&typeof D1.stack==="string"){var q0=D1.stack.split(`
|
|
147
|
+
`),f0=v.stack.split(`
|
|
148
|
+
`),M0=q0.length-1,t=f0.length-1;while(M0>=1&&t>=0&&q0[M0]!==f0[t])t--;for(;M0>=1&&t>=0;M0--,t--)if(q0[M0]!==f0[t]){if(M0!==1||t!==1)do if(M0--,t--,t<0||q0[M0]!==f0[t]){var G0=`
|
|
149
|
+
`+q0[M0].replace(" at new "," at ");if(M.displayName&&G0.includes("<anonymous>"))G0=G0.replace("<anonymous>",M.displayName);if(typeof M==="function")$4.set(M,G0);return G0}while(M0>=1&&t>=0);break}}}finally{i1=!1,Q4.current=p,Y4(),Error.prepareStackTrace=h}var V0=M?M.displayName||M.name:"",U1=V0?a1(V0):"";if(typeof M==="function")$4.set(M,U1);return U1}function E4(M,i,b0){return X4(M,!1)}function u4(M){var i=M.prototype;return!!(i&&i.isReactComponent)}function x1(M,i,b0){if(M==null)return"";if(typeof M==="function")return X4(M,u4(M));if(typeof M==="string")return a1(M);switch(M){case I:return a1("Suspense");case w:return a1("SuspenseList")}if(typeof M==="object")switch(M.$$typeof){case W:return E4(M.render);case P:return x1(M.type,i,b0);case A:{var v=M,h=v._payload,p=v._init;try{return x1(p(h),i,b0)}catch(H0){}}}return""}var s0=Object.prototype.hasOwnProperty,T4={},w4=D.ReactDebugCurrentFrame;function G4(M){if(M){var i=M._owner,b0=x1(M.type,M._source,i?i.type:null);w4.setExtraStackFrame(b0)}else w4.setExtraStackFrame(null)}function O4(M,i,b0,v,h){{var p=Function.call.bind(s0);for(var H0 in M)if(p(M,H0)){var q0=void 0;try{if(typeof M[H0]!=="function"){var f0=Error((v||"React class")+": "+b0+" type `"+H0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof M[H0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f0.name="Invariant Violation",f0}q0=M[H0](i,H0,v,b0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(M0){q0=M0}if(q0&&!(q0 instanceof Error))G4(h),u("%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).",v||"React class",b0,H0,typeof q0),G4(null);if(q0 instanceof Error&&!(q0.message in T4))T4[q0.message]=!0,G4(h),u("Failed %s type: %s",b0,q0.message),G4(null)}}}var B5=Array.isArray;function r1(M){return B5(M)}function z6(M){{var i=typeof Symbol==="function"&&Symbol.toStringTag,b0=i&&M[Symbol.toStringTag]||M.constructor.name||"Object";return b0}}function n1(M){try{return Q6(M),!1}catch(i){return!0}}function Q6(M){return""+M}function Z4(M){if(n1(M))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",z6(M)),Q6(M)}var K4=D.ReactCurrentOwner,o4={key:!0,ref:!0,__self:!0,__source:!0},v6,R4,h4;h4={};function K0(M){if(s0.call(M,"ref")){var i=Object.getOwnPropertyDescriptor(M,"ref").get;if(i&&i.isReactWarning)return!1}return M.ref!==void 0}function E0(M){if(s0.call(M,"key")){var i=Object.getOwnPropertyDescriptor(M,"key").get;if(i&&i.isReactWarning)return!1}return M.key!==void 0}function y0(M,i){if(typeof M.ref==="string"&&K4.current&&i&&K4.current.stateNode!==i){var b0=Z0(K4.current.type);if(!h4[b0])u('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',Z0(K4.current.type),M.ref),h4[b0]=!0}}function N1(M,i){{var b0=function(){if(!v6)v6=!0,u("%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)",i)};b0.isReactWarning=!0,Object.defineProperty(M,"key",{get:b0,configurable:!0})}}function S1(M,i){{var b0=function(){if(!R4)R4=!0,u("%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)",i)};b0.isReactWarning=!0,Object.defineProperty(M,"ref",{get:b0,configurable:!0})}}var L4=function(M,i,b0,v,h,p,H0){var q0={$$typeof:H,type:M,key:i,ref:b0,props:H0,_owner:p};if(q0._store={},Object.defineProperty(q0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(q0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze)Object.freeze(q0.props),Object.freeze(q0);return q0};function l1(M,i,b0,v,h){{var p,H0={},q0=null,f0=null;if(b0!==void 0)Z4(b0),q0=""+b0;if(E0(i))Z4(i.key),q0=""+i.key;if(K0(i))f0=i.ref,y0(i,h);for(p in i)if(s0.call(i,p)&&!o4.hasOwnProperty(p))H0[p]=i[p];if(M&&M.defaultProps){var M0=M.defaultProps;for(p in M0)if(H0[p]===void 0)H0[p]=M0[p]}if(q0||f0){var t=typeof M==="function"?M.displayName||M.name||"Unknown":M;if(q0)N1(H0,t);if(f0)S1(H0,t)}return L4(M,q0,f0,h,v,K4.current,H0)}}var{ReactCurrentOwner:I4,ReactDebugCurrentFrame:z1}=D;function e0(M){if(M){var i=M._owner,b0=x1(M.type,M._source,i?i.type:null);z1.setExtraStackFrame(b0)}else z1.setExtraStackFrame(null)}var A6=!1;function p4(M){return typeof M==="object"&&M!==null&&M.$$typeof===H}function w6(){{if(I4.current){var M=Z0(I4.current.type);if(M)return`
|
|
150
|
+
|
|
151
|
+
Check the render method of \``+M+"`."}return""}}function u5(M){{if(M!==void 0){var i=M.fileName.replace(/^.*[\\\/]/,""),b0=M.lineNumber;return`
|
|
152
|
+
|
|
153
|
+
Check your code at `+i+":"+b0+"."}return""}}var O5={};function m5(M){{var i=w6();if(!i){var b0=typeof M==="string"?M:M.displayName||M.name;if(b0)i=`
|
|
154
|
+
|
|
155
|
+
Check the top-level render call using <`+b0+">."}return i}}function z5(M,i){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var b0=m5(i);if(O5[b0])return;O5[b0]=!0;var v="";if(M&&M._owner&&M._owner!==I4.current)v=" It was passed a child from "+Z0(M._owner.type)+".";e0(M),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b0,v),e0(null)}}function W6(M,i){{if(typeof M!=="object")return;if(r1(M))for(var b0=0;b0<M.length;b0++){var v=M[b0];if(p4(v))z5(v,i)}else if(p4(M)){if(M._store)M._store.validated=!0}else if(M){var h=r(M);if(typeof h==="function"){if(h!==M.entries){var p=h.call(M),H0;while(!(H0=p.next()).done)if(p4(H0.value))z5(H0.value,i)}}}}}function L5(M){{var i=M.type;if(i===null||i===void 0||typeof i==="string")return;var b0;if(typeof i==="function")b0=i.propTypes;else if(typeof i==="object"&&(i.$$typeof===W||i.$$typeof===P))b0=i.propTypes;else return;if(b0){var v=Z0(i);O4(b0,M.props,"prop",v,M)}else if(i.PropTypes!==void 0&&!A6){A6=!0;var h=Z0(i);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}if(typeof i.getDefaultProps==="function"&&!i.getDefaultProps.isReactClassApproved)u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function K1(M){{var i=Object.keys(M.props);for(var b0=0;b0<i.length;b0++){var v=i[b0];if(v!=="children"&&v!=="key"){e0(M),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v),e0(null);break}}if(M.ref!==null)e0(M),u("Invalid attribute `ref` supplied to `React.Fragment`."),e0(null)}}var V1={};function j1(M,i,b0,v,h,p){{var H0=O0(M);if(!H0){var q0="";if(M===void 0||typeof M==="object"&&M!==null&&Object.keys(M).length===0)q0+=" 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 f0=u5(h);if(f0)q0+=f0;else q0+=w6();var M0;if(M===null)M0="null";else if(r1(M))M0="array";else if(M!==void 0&&M.$$typeof===H)M0="<"+(Z0(M.type)||"Unknown")+" />",q0=" Did you accidentally export a JSX literal instead of a component?";else M0=typeof M;u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M0,q0)}var t=l1(M,i,b0,h,p);if(t==null)return t;if(H0){var G0=i.children;if(G0!==void 0)if(v)if(r1(G0)){for(var V0=0;V0<G0.length;V0++)W6(G0[V0],M);if(Object.freeze)Object.freeze(G0)}else u("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 W6(G0,M)}if(s0.call(i,"key")){var U1=Z0(M),D1=Object.keys(i).filter(function(J4){return J4!=="key"}),I6=D1.length>0?"{key: someKey, "+D1.join(": ..., ")+": ...}":"{key: someKey}";if(!V1[U1+I6]){var i6=D1.length>0?"{"+D1.join(": ..., ")+": ...}":"{}";u(`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,U1,i6,U1),V1[U1+I6]=!0}}if(M===B)K1(t);else L5(t);return t}}var F1=j1;dF.Fragment=B,dF.jsxDEV=F1})()});var z4=db((CM)=>{var GG=J0(y1());(function(){var H=Symbol.for("react.element"),U=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),R=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),d=Symbol.iterator,E="@@iterator";function r(v){if(v===null||typeof v!=="object")return null;var h=d&&v[d]||v[E];if(typeof h==="function")return h;return null}var D=GG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(v){{for(var h=arguments.length,p=Array(h>1?h-1:0),H0=1;H0<h;H0++)p[H0-1]=arguments[H0];v0("error",v,p)}}function v0(v,h,p){{var H0=D.ReactDebugCurrentFrame,q0=H0.getStackAddendum();if(q0!=="")h+="%s",p=p.concat([q0]);var f0=p.map(function(M0){return String(M0)});f0.unshift("Warning: "+h),Function.prototype.apply.call(console[v],console,f0)}}var s=!1,Q0=!1,n=!1,C=!1,j=!1,$0;$0=Symbol.for("react.module.reference");function O0(v){if(typeof v==="string"||typeof v==="function")return!0;if(v===B||v===G||j||v===L||v===I||v===w||C||v===F||s||Q0||n)return!0;if(typeof v==="object"&&v!==null){if(v.$$typeof===A||v.$$typeof===P||v.$$typeof===_||v.$$typeof===R||v.$$typeof===W||v.$$typeof===$0||v.getModuleId!==void 0)return!0}return!1}function L0(v,h,p){var H0=v.displayName;if(H0)return H0;var q0=h.displayName||h.name||"";return q0!==""?p+"("+q0+")":p}function g0(v){return v.displayName||"Context"}function Z0(v){if(v==null)return null;if(typeof v.tag==="number")u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof v==="function")return v.displayName||v.name||null;if(typeof v==="string")return v;switch(v){case B:return"Fragment";case U:return"Portal";case G:return"Profiler";case L:return"StrictMode";case I:return"Suspense";case w:return"SuspenseList"}if(typeof v==="object")switch(v.$$typeof){case R:var h=v;return g0(h)+".Consumer";case _:var p=v;return g0(p._context)+".Provider";case W:return L0(v,v.render,"ForwardRef");case P:var H0=v.displayName||null;if(H0!==null)return H0;return Z0(v.type)||"Memo";case A:{var q0=v,f0=q0._payload,M0=q0._init;try{return Z0(M0(f0))}catch(t){return null}}}return null}var k0=Object.assign,a0=0,C0,S0,_1,H1,P1,i0,Y1;function C1(){}C1.__reactDisabledLog=!0;function v4(){{if(a0===0){C0=console.log,S0=console.info,_1=console.warn,H1=console.error,P1=console.group,i0=console.groupCollapsed,Y1=console.groupEnd;var v={configurable:!0,enumerable:!0,value:C1,writable:!0};Object.defineProperties(console,{info:v,log:v,warn:v,error:v,group:v,groupCollapsed:v,groupEnd:v})}a0++}}function Y4(){{if(a0--,a0===0){var v={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k0({},v,{value:C0}),info:k0({},v,{value:S0}),warn:k0({},v,{value:_1}),error:k0({},v,{value:H1}),group:k0({},v,{value:P1}),groupCollapsed:k0({},v,{value:i0}),groupEnd:k0({},v,{value:Y1})})}if(a0<0)u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q4=D.ReactCurrentDispatcher,W4;function a1(v,h,p){{if(W4===void 0)try{throw Error()}catch(q0){var H0=q0.stack.trim().match(/\n( *(at )?)/);W4=H0&&H0[1]||""}return`
|
|
161
|
+
`+W4+v}}var i1=!1,$4;{var D4=typeof WeakMap==="function"?WeakMap:Map;$4=new D4}function X4(v,h){if(!v||i1)return"";{var p=$4.get(v);if(p!==void 0)return p}var H0;i1=!0;var q0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f0;f0=Q4.current,Q4.current=null,v4();try{if(h){var M0=function(){throw Error()};if(Object.defineProperty(M0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(M0,[])}catch(J4){H0=J4}Reflect.construct(v,[],M0)}else{try{M0.call()}catch(J4){H0=J4}v.call(M0.prototype)}}else{try{throw Error()}catch(J4){H0=J4}v()}}catch(J4){if(J4&&H0&&typeof J4.stack==="string"){var t=J4.stack.split(`
|
|
162
|
+
`),G0=H0.stack.split(`
|
|
163
|
+
`),V0=t.length-1,U1=G0.length-1;while(V0>=1&&U1>=0&&t[V0]!==G0[U1])U1--;for(;V0>=1&&U1>=0;V0--,U1--)if(t[V0]!==G0[U1]){if(V0!==1||U1!==1)do if(V0--,U1--,U1<0||t[V0]!==G0[U1]){var D1=`
|
|
164
|
+
`+t[V0].replace(" at new "," at ");if(v.displayName&&D1.includes("<anonymous>"))D1=D1.replace("<anonymous>",v.displayName);if(typeof v==="function")$4.set(v,D1);return D1}while(V0>=1&&U1>=0);break}}}finally{i1=!1,Q4.current=f0,Y4(),Error.prepareStackTrace=q0}var I6=v?v.displayName||v.name:"",i6=I6?a1(I6):"";if(typeof v==="function")$4.set(v,i6);return i6}function E4(v,h,p){return X4(v,!1)}function u4(v){var h=v.prototype;return!!(h&&h.isReactComponent)}function x1(v,h,p){if(v==null)return"";if(typeof v==="function")return X4(v,u4(v));if(typeof v==="string")return a1(v);switch(v){case I:return a1("Suspense");case w:return a1("SuspenseList")}if(typeof v==="object")switch(v.$$typeof){case W:return E4(v.render);case P:return x1(v.type,h,p);case A:{var H0=v,q0=H0._payload,f0=H0._init;try{return x1(f0(q0),h,p)}catch(M0){}}}return""}var s0=Object.prototype.hasOwnProperty,T4={},w4=D.ReactDebugCurrentFrame;function G4(v){if(v){var h=v._owner,p=x1(v.type,v._source,h?h.type:null);w4.setExtraStackFrame(p)}else w4.setExtraStackFrame(null)}function O4(v,h,p,H0,q0){{var f0=Function.call.bind(s0);for(var M0 in v)if(f0(v,M0)){var t=void 0;try{if(typeof v[M0]!=="function"){var G0=Error((H0||"React class")+": "+p+" type `"+M0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[M0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw G0.name="Invariant Violation",G0}t=v[M0](h,M0,H0,p,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V0){t=V0}if(t&&!(t instanceof Error))G4(q0),u("%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).",H0||"React class",p,M0,typeof t),G4(null);if(t instanceof Error&&!(t.message in T4))T4[t.message]=!0,G4(q0),u("Failed %s type: %s",p,t.message),G4(null)}}}var B5=Array.isArray;function r1(v){return B5(v)}function z6(v){{var h=typeof Symbol==="function"&&Symbol.toStringTag,p=h&&v[Symbol.toStringTag]||v.constructor.name||"Object";return p}}function n1(v){try{return Q6(v),!1}catch(h){return!0}}function Q6(v){return""+v}function Z4(v){if(n1(v))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",z6(v)),Q6(v)}var K4=D.ReactCurrentOwner,o4={key:!0,ref:!0,__self:!0,__source:!0},v6,R4,h4;h4={};function K0(v){if(s0.call(v,"ref")){var h=Object.getOwnPropertyDescriptor(v,"ref").get;if(h&&h.isReactWarning)return!1}return v.ref!==void 0}function E0(v){if(s0.call(v,"key")){var h=Object.getOwnPropertyDescriptor(v,"key").get;if(h&&h.isReactWarning)return!1}return v.key!==void 0}function y0(v,h){if(typeof v.ref==="string"&&K4.current&&h&&K4.current.stateNode!==h){var p=Z0(K4.current.type);if(!h4[p])u('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',Z0(K4.current.type),v.ref),h4[p]=!0}}function N1(v,h){{var p=function(){if(!v6)v6=!0,u("%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)",h)};p.isReactWarning=!0,Object.defineProperty(v,"key",{get:p,configurable:!0})}}function S1(v,h){{var p=function(){if(!R4)R4=!0,u("%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)",h)};p.isReactWarning=!0,Object.defineProperty(v,"ref",{get:p,configurable:!0})}}var L4=function(v,h,p,H0,q0,f0,M0){var t={$$typeof:H,type:v,key:h,ref:p,props:M0,_owner:f0};if(t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(t,"_self",{configurable:!1,enumerable:!1,writable:!1,value:H0}),Object.defineProperty(t,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q0}),Object.freeze)Object.freeze(t.props),Object.freeze(t);return t};function l1(v,h,p,H0,q0){{var f0,M0={},t=null,G0=null;if(p!==void 0)Z4(p),t=""+p;if(E0(h))Z4(h.key),t=""+h.key;if(K0(h))G0=h.ref,y0(h,q0);for(f0 in h)if(s0.call(h,f0)&&!o4.hasOwnProperty(f0))M0[f0]=h[f0];if(v&&v.defaultProps){var V0=v.defaultProps;for(f0 in V0)if(M0[f0]===void 0)M0[f0]=V0[f0]}if(t||G0){var U1=typeof v==="function"?v.displayName||v.name||"Unknown":v;if(t)N1(M0,U1);if(G0)S1(M0,U1)}return L4(v,t,G0,q0,H0,K4.current,M0)}}var{ReactCurrentOwner:I4,ReactDebugCurrentFrame:z1}=D;function e0(v){if(v){var h=v._owner,p=x1(v.type,v._source,h?h.type:null);z1.setExtraStackFrame(p)}else z1.setExtraStackFrame(null)}var A6=!1;function p4(v){return typeof v==="object"&&v!==null&&v.$$typeof===H}function w6(){{if(I4.current){var v=Z0(I4.current.type);if(v)return`
|
|
165
|
+
|
|
166
|
+
Check the render method of \``+v+"`."}return""}}function u5(v){{if(v!==void 0){var h=v.fileName.replace(/^.*[\\\/]/,""),p=v.lineNumber;return`
|
|
167
|
+
|
|
168
|
+
Check your code at `+h+":"+p+"."}return""}}var O5={};function m5(v){{var h=w6();if(!h){var p=typeof v==="string"?v:v.displayName||v.name;if(p)h=`
|
|
169
|
+
|
|
170
|
+
Check the top-level render call using <`+p+">."}return h}}function z5(v,h){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var p=m5(h);if(O5[p])return;O5[p]=!0;var H0="";if(v&&v._owner&&v._owner!==I4.current)H0=" It was passed a child from "+Z0(v._owner.type)+".";e0(v),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',p,H0),e0(null)}}function W6(v,h){{if(typeof v!=="object")return;if(r1(v))for(var p=0;p<v.length;p++){var H0=v[p];if(p4(H0))z5(H0,h)}else if(p4(v)){if(v._store)v._store.validated=!0}else if(v){var q0=r(v);if(typeof q0==="function"){if(q0!==v.entries){var f0=q0.call(v),M0;while(!(M0=f0.next()).done)if(p4(M0.value))z5(M0.value,h)}}}}}function L5(v){{var h=v.type;if(h===null||h===void 0||typeof h==="string")return;var p;if(typeof h==="function")p=h.propTypes;else if(typeof h==="object"&&(h.$$typeof===W||h.$$typeof===P))p=h.propTypes;else return;if(p){var H0=Z0(h);O4(p,v.props,"prop",H0,v)}else if(h.PropTypes!==void 0&&!A6){A6=!0;var q0=Z0(h);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q0||"Unknown")}if(typeof h.getDefaultProps==="function"&&!h.getDefaultProps.isReactClassApproved)u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function K1(v){{var h=Object.keys(v.props);for(var p=0;p<h.length;p++){var H0=h[p];if(H0!=="children"&&H0!=="key"){e0(v),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",H0),e0(null);break}}if(v.ref!==null)e0(v),u("Invalid attribute `ref` supplied to `React.Fragment`."),e0(null)}}var V1={};function j1(v,h,p,H0,q0,f0){{var M0=O0(v);if(!M0){var t="";if(v===void 0||typeof v==="object"&&v!==null&&Object.keys(v).length===0)t+=" 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 G0=u5(q0);if(G0)t+=G0;else t+=w6();var V0;if(v===null)V0="null";else if(r1(v))V0="array";else if(v!==void 0&&v.$$typeof===H)V0="<"+(Z0(v.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?";else V0=typeof v;u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V0,t)}var U1=l1(v,h,p,q0,f0);if(U1==null)return U1;if(M0){var D1=h.children;if(D1!==void 0)if(H0)if(r1(D1)){for(var I6=0;I6<D1.length;I6++)W6(D1[I6],v);if(Object.freeze)Object.freeze(D1)}else u("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 W6(D1,v)}if(s0.call(h,"key")){var i6=Z0(v),J4=Object.keys(h).filter(function(g5){return g5!=="key"}),Z1=J4.length>0?"{key: someKey, "+J4.join(": ..., ")+": ...}":"{key: someKey}";if(!V1[i6+Z1]){var z7=J4.length>0?"{"+J4.join(": ..., ")+": ...}":"{}";u(`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} />`,Z1,i6,z7,i6),V1[i6+Z1]=!0}}if(v===B)K1(U1);else L5(U1);return U1}}function F1(v,h,p){return j1(v,h,p,!0)}function M(v,h,p){return j1(v,h,p,!1)}var i=M,b0=F1;CM.Fragment=B,CM.jsx=i,CM.jsxs=b0})()});var E5=J0(y1(),1),U2=J0(DB(),1);var bG={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1};var lb=J0(y1(),1);function zG(H){let[U,B]=lb.useState([]),[L,G]=lb.useState(!0),_=lb.useCallback(async()=>{let F=await(await fetch("/api/agents")).json();B(F.agents||[]),G(!1)},[]);lb.useEffect(()=>{if(H)_()},[H,_]);let R=async(A)=>{await fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),await _()},W=async(A)=>{await fetch(`/api/agents/${A}`,{method:"DELETE"}),await _()},I=async(A,F)=>{let d=await fetch(`/api/agents/${A}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),E=await d.json();if(await _(),!d.ok&&E.error)return{error:E.error};return{}},w=async(A)=>{let F=A.status==="running"?"stop":"start",d=await fetch(`/api/agents/${A.id}/${F}`,{method:"POST"}),E=await d.json();if(await _(),!d.ok&&E.error)return{error:E.error};return{}},P=U.filter((A)=>A.status==="running").length;return{agents:U,loading:L,runningCount:P,fetchAgents:_,createAgent:R,updateAgent:I,deleteAgent:W,toggleAgent:w}}var t8=J0(y1(),1);function QG(H){let[U,B]=t8.useState([]),L=t8.useCallback(async()=>{let I=await(await fetch("/api/providers")).json();B(I.providers||[])},[]);t8.useEffect(()=>{if(H)L()},[H,L]);let G=U.filter((W)=>W.hasKey);return{providers:U,configuredProviders:G,fetchProviders:L,saveKey:async(W,I)=>{let P=await(await fetch(`/api/keys/${W}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:I})})).json();if(!P.valid)return{success:!1,error:P.error||"API key is invalid"};let A=await fetch(`/api/keys/${W}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:I})});if(!A.ok)return{success:!1,error:(await A.json()).error||"Failed to save key"};return await L(),{success:!0}},deleteKey:async(W)=>{await fetch(`/api/keys/${W}`,{method:"DELETE"}),await L()}}}var s8=J0(y1(),1);function XG(){let[H,U]=s8.useState(null);s8.useEffect(()=>{fetch("/api/onboarding/status").then((L)=>L.json()).then((L)=>{U(L.completed||L.has_any_keys)}).catch(()=>U(!0))},[]);let B=s8.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST"}),U(!0)},[]);return{isComplete:H,setIsComplete:U,complete:B}}var Zb=J0(L1(),1);function e8({message:H="Loading...",fullScreen:U=!1}){let B=Zb.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[Zb.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[Zb.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),Zb.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),Zb.jsxDEV("span",{children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(U)return Zb.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:B},void 0,!1,void 0,this);return Zb.jsxDEV("div",{className:"flex items-center justify-center py-20",children:B},void 0,!1,void 0,this)}var JG=J0(L1(),1);function fZ({children:H,onClose:U}){return JG.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:JG.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:H},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var b3=J0(y1(),1),B6=J0(L1(),1);function K5({value:H,options:U,onChange:B,placeholder:L="Select..."}){let[G,_]=b3.useState(!1),R=b3.useRef(null),W=U.find((I)=>I.value===H);return b3.useEffect(()=>{function I(w){if(R.current&&!R.current.contains(w.target))_(!1)}return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]),B6.jsxDEV("div",{ref:R,className:"relative",children:[B6.jsxDEV("button",{type:"button",onClick:()=>_(!G),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:[B6.jsxDEV("span",{className:W?"text-[#e0e0e0]":"text-[#666]",children:W?B6.jsxDEV(B6.Fragment,{children:[W.label,W.recommended&&B6.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):L},void 0,!1,void 0,this),B6.jsxDEV(aF,{isOpen:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G&&B6.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:U.map((I)=>B6.jsxDEV("button",{type:"button",onClick:()=>{B(I.value),_(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${I.value===H?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[B6.jsxDEV("span",{children:[I.label,I.recommended&&B6.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.value===H&&B6.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:B6.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)]},I.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function aF({isOpen:H}){return B6.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${H?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:B6.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 b4=J0(L1(),1);function h5({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 z3({className:H="w-5 h-5"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 TZ({className:H="w-5 h-5"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 hZ({className:H="w-5 h-5"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 CZ({className:H="w-5 h-5"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[b4.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),b4.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 ib({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 U5({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 xb({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[b4.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),b4.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 jb({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 q5({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 ob({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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 HG({className:H="w-4 h-4"}){return b4.jsxDEV("svg",{className:H,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b4.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)}var pb=J0(L1(),1);function SZ({onNewAgent:H,canCreateAgent:U}){return pb.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-6 py-4 flex-shrink-0",children:pb.jsxDEV("div",{className:"flex items-center justify-between",children:[pb.jsxDEV("div",{className:"flex items-center gap-2",children:[pb.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),pb.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),pb.jsxDEV("button",{onClick:H,disabled:!U,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)},void 0,!1,void 0,this)}var O6=J0(L1(),1);function VZ({route:H,agentCount:U,taskCount:B,onNavigate:L}){return O6.jsxDEV("aside",{className:"w-56 border-r border-[#1a1a1a] flex-shrink-0 p-4",children:O6.jsxDEV("nav",{className:"space-y-1",children:[O6.jsxDEV(Q3,{icon:O6.jsxDEV(TZ,{},void 0,!1,void 0,this),label:"Dashboard",active:H==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),O6.jsxDEV(Q3,{icon:O6.jsxDEV(hZ,{},void 0,!1,void 0,this),label:"Agents",active:H==="agents",onClick:()=>L("agents"),badge:U>0?String(U):void 0},void 0,!1,void 0,this),O6.jsxDEV(Q3,{icon:O6.jsxDEV(U5,{},void 0,!1,void 0,this),label:"Tasks",active:H==="tasks",onClick:()=>L("tasks"),badge:B&&B>0?String(B):void 0},void 0,!1,void 0,this),O6.jsxDEV(Q3,{icon:O6.jsxDEV(q5,{},void 0,!1,void 0,this),label:"MCP",active:H==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),O6.jsxDEV(Q3,{icon:O6.jsxDEV(HG,{},void 0,!1,void 0,this),label:"Telemetry",active:H==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),O6.jsxDEV(Q3,{icon:O6.jsxDEV(CZ,{},void 0,!1,void 0,this),label:"Settings",active:H==="settings",onClick:()=>L("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Q3({icon:H,label:U,active:B,onClick:L,badge:G}){return O6.jsxDEV("button",{onClick:L,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${B?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[H,U,G&&O6.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var XQ=J0(L1(),1);function DZ({message:H,onDismiss:U}){return XQ.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:[XQ.jsxDEV("span",{children:H},void 0,!1,void 0,this),XQ.jsxDEV("button",{onClick:U,className:"hover:text-red-300",children:XQ.jsxDEV(z3,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var C5=J0(y1(),1);var D0=J0(L1(),1);function EZ({onComplete:H}){let[U,B]=C5.useState(1),[L,G]=C5.useState([]),[_,R]=C5.useState(null),[W,I]=C5.useState(""),[w,P]=C5.useState(!1),[A,F]=C5.useState(!1),[d,E]=C5.useState(null),[r,D]=C5.useState(null);C5.useEffect(()=>{fetch("/api/providers").then((Q0)=>Q0.json()).then((Q0)=>{let n=(Q0.providers||[]).filter((C)=>C.type==="llm");G(n)})},[]);let u=L.filter((Q0)=>Q0.hasKey),v0=async()=>{if(!_||!W)return;P(!0),E(null),D(null);try{F(!0);let n=await(await fetch(`/api/keys/${_}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:W})})).json();if(F(!1),!n.valid){E(n.error||"API key is invalid"),P(!1);return}let C=await fetch(`/api/keys/${_}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:W})}),j=await C.json();if(!C.ok)E(j.error||"Failed to save key");else{D("API key saved successfully!"),I("");let O0=await(await fetch("/api/providers")).json();G(O0.providers||[]),R(null)}}catch(Q0){E("Failed to save key")}P(!1)},s=async()=>{await fetch("/api/onboarding/complete",{method:"POST"}),H()};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:[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===1&&D0.jsxDEV(lF,{providers:L,configuredProviders:u,selectedProvider:_,apiKey:W,saving:w,testing:A,error:d,success:r,onSelectProvider:R,onApiKeyChange:I,onSaveKey:v0,onContinue:()=>B(2)},void 0,!1,void 0,this),U===2&&D0.jsxDEV(xF,{configuredProviders:u,onAddMore:()=>B(1),onComplete:s},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 lF({providers:H,configuredProviders:U,selectedProvider:B,apiKey:L,saving:G,testing:_,error:R,success:W,onSelectProvider:I,onApiKeyChange:w,onSaveKey:P,onContinue:A}){let F=H.find((d)=>d.id===B);if(B&&F)return D0.jsxDEV(D0.Fragment,{children:[D0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",F.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:F.name},void 0,!1,void 0,this),D0.jsxDEV("p",{className:"text-sm text-[#666]",children:[F.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D0.jsxDEV("a",{href:F.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:L,onChange:(d)=>w(d.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),R&&D0.jsxDEV("p",{className:"text-red-400 text-sm",children:R},void 0,!1,void 0,this),W&&D0.jsxDEV("p",{className:"text-green-400 text-sm",children:W},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:()=>{I(null),w("")},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:P,disabled:!L||G,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:_?"Testing...":G?"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:H.map((d)=>D0.jsxDEV(iF,{provider:d,selected:!1,onSelect:()=>!d.hasKey&&I(d.id)},d.id,!1,void 0,this))},void 0,!1,void 0,this),D0.jsxDEV("button",{onClick:A,disabled:U.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:U.length===0?"Add at least one API key to continue":`Continue with ${U.length} provider${U.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iF({provider:H,selected:U,onSelect:B}){return D0.jsxDEV("div",{onClick:B,className:`p-4 rounded border transition cursor-pointer ${H.hasKey?"border-green-500/30 bg-green-500/5":U?"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:H.name},void 0,!1,void 0,this),D0.jsxDEV("p",{className:"text-sm text-[#666]",children:[H.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.hasKey?D0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[D0.jsxDEV(h5,{},void 0,!1,void 0,this),"Configured (",H.keyHint,")"]},void 0,!0,void 0,this):D0.jsxDEV("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(L)=>L.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 xF({configuredProviders:H,onAddMore:U,onComplete:B}){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 ",H.length," provider",H.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:H.map((L)=>D0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[D0.jsxDEV(h5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),D0.jsxDEV("span",{children:L.name},void 0,!1,void 0,this),D0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",L.keyHint,")"]},void 0,!0,void 0,this)]},L.id,!0,void 0,this))},void 0,!1,void 0,this),D0.jsxDEV("div",{className:"flex gap-3",children:[D0.jsxDEV("button",{onClick:U,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:B,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 b6=J0(y1(),1);var e=J0(L1(),1);function uZ(){let[H,U]=b6.useState("providers");return e.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[e.jsxDEV("div",{className:"w-48 border-r border-[#1a1a1a] p-4",children:[e.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),e.jsxDEV("nav",{className:"space-y-1",children:[e.jsxDEV(EB,{label:"Providers",active:H==="providers",onClick:()=>U("providers")},void 0,!1,void 0,this),e.jsxDEV(EB,{label:"Updates",active:H==="updates",onClick:()=>U("updates")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[H==="providers"&&e.jsxDEV(jF,{},void 0,!1,void 0,this),H==="updates"&&e.jsxDEV(oF,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function EB({label:H,active:U,onClick:B}){return e.jsxDEV("button",{onClick:B,className:`w-full text-left px-3 py-2 rounded text-sm transition ${U?"bg-[#1a1a1a] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:H},void 0,!1,void 0,this)}function jF(){let[H,U]=b6.useState([]),[B,L]=b6.useState(null),[G,_]=b6.useState(""),[R,W]=b6.useState(!1),[I,w]=b6.useState(!1),[P,A]=b6.useState(null),[F,d]=b6.useState(null),E=async()=>{let C=await(await fetch("/api/providers")).json();U(C.providers||[])};b6.useEffect(()=>{E()},[]);let r=async()=>{if(!B||!G)return;W(!0),A(null),d(null);try{w(!0);let C=await(await fetch(`/api/keys/${B}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:G})})).json();if(w(!1),!C.valid){A(C.error||"API key is invalid"),W(!1);return}let j=await fetch(`/api/keys/${B}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:G})});if(!j.ok){let $0=await j.json();A($0.error||"Failed to save key")}else d("API key saved!"),_(""),L(null),E()}catch(n){A("Failed to save key")}W(!1)},D=async(n)=>{if(!confirm("Are you sure you want to remove this API key?"))return;await fetch(`/api/keys/${n}`,{method:"DELETE"}),E()},u=H.filter((n)=>n.type==="llm"),v0=H.filter((n)=>n.type==="integration"),s=u.filter((n)=>n.hasKey).length,Q0=v0.filter((n)=>n.hasKey).length;return e.jsxDEV("div",{className:"max-w-4xl space-y-10",children:[e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-6",children:[e.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),e.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",s," of ",u.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:u.map((n)=>e.jsxDEV(pF,{provider:n,isEditing:B===n.id,apiKey:G,saving:R,testing:I,error:B===n.id?P:null,success:B===n.id?F:null,onStartEdit:()=>{L(n.id),A(null),d(null)},onCancelEdit:()=>{L(null),_(""),A(null)},onApiKeyChange:_,onSave:r,onDelete:()=>D(n.id)},n.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"mb-6",children:[e.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),e.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",Q0," of ",v0.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:v0.map((n)=>e.jsxDEV(rF,{provider:n,isEditing:B===n.id,apiKey:G,saving:R,testing:I,error:B===n.id?P:null,success:B===n.id?F:null,onStartEdit:()=>{L(n.id),A(null),d(null)},onCancelEdit:()=>{L(null),_(""),A(null)},onApiKeyChange:_,onSave:r,onDelete:()=>D(n.id)},n.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function oF(){let[H,U]=b6.useState(null),[B,L]=b6.useState(!1),[G,_]=b6.useState(!1),[R,W]=b6.useState(null),[I,w]=b6.useState(null),[P,A]=b6.useState(null),F=async()=>{L(!0),W(null);try{let D=await fetch("/api/version");if(!D.ok)throw Error("Failed to check for updates");let u=await D.json();U(u)}catch(D){W("Failed to check for updates")}L(!1)},d=async()=>{_(!0),W(null),w(null);try{let u=await(await fetch("/api/version/update",{method:"POST"})).json();if(!u.success)W(u.error||"Update failed");else w(`Agent updated to v${u.version}. New agents will use this version.`),await F()}catch(D){W("Failed to update agent")}_(!1)};b6.useEffect(()=>{F()},[]);let E=(D,u)=>{navigator.clipboard.writeText(D),A(u),setTimeout(()=>A(null),2000)},r=H?.apteva.updateAvailable||H?.agent.updateAvailable;return e.jsxDEV("div",{className:"max-w-2xl",children:[e.jsxDEV("div",{className:"mb-6",children:[e.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),e.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),B&&!H?e.jsxDEV("div",{className:"text-[#666]",children:"Checking for updates..."},void 0,!1,void 0,this):R&&!H?e.jsxDEV("div",{className:"text-red-400",children:R},void 0,!1,void 0,this):H?e.jsxDEV("div",{className:"space-y-6",children:[I&&e.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:I},void 0,!1,void 0,this),R&&e.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:R},void 0,!1,void 0,this),e.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[e.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),e.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),e.jsxDEV("div",{className:"text-right",children:[e.jsxDEV("div",{className:"text-xl font-mono",children:["v",H.apteva.installed||"?"]},void 0,!0,void 0,this),H.apteva.updateAvailable&&e.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",H.apteva.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.apteva.updateAvailable?e.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[e.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),e.jsxDEV("div",{className:"flex items-center gap-2",children:[e.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),e.jsxDEV("button",{onClick:()=>E("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:P==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[e.jsxDEV(h5,{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),e.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[e.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),e.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),e.jsxDEV("div",{className:"text-right",children:[e.jsxDEV("div",{className:"text-xl font-mono",children:["v",H.agent.installed||"?"]},void 0,!0,void 0,this),H.agent.updateAvailable&&e.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",H.agent.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.agent.updateAvailable?e.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[e.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),e.jsxDEV("div",{className:"flex items-center gap-2",children:e.jsxDEV("button",{onClick:d,disabled:G,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:G?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[e.jsxDEV(h5,{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),!r&&!I&&e.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:[e.jsxDEV(h5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),e.jsxDEV("button",{onClick:F,disabled:B,className:"text-sm text-[#666] hover:text-[#888] disabled:opacity-50",children:B?"Checking...":"Check for updates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function pF({provider:H,isEditing:U,apiKey:B,saving:L,testing:G,error:_,success:R,onStartEdit:W,onCancelEdit:I,onApiKeyChange:w,onSave:P,onDelete:A}){return e.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${H.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[e.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"font-medium",children:H.name},void 0,!1,void 0,this),e.jsxDEV("p",{className:"text-sm text-[#666]",children:[H.models.length," models"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.hasKey?e.jsxDEV("span",{className:"text-green-400 text-xs flex items-center gap-1 bg-green-500/10 px-2 py-1 rounded",children:[e.jsxDEV(h5,{className:"w-3 h-3"},void 0,!1,void 0,this),H.keyHint]},void 0,!0,void 0,this):e.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.hasKey?e.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[e.jsxDEV("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),e.jsxDEV("button",{onClick:A,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:U?e.jsxDEV("div",{className:"space-y-3",children:[e.jsxDEV("input",{type:"password",value:B,onChange:(F)=>w(F.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),_&&e.jsxDEV("p",{className:"text-red-400 text-sm",children:_},void 0,!1,void 0,this),R&&e.jsxDEV("p",{className:"text-green-400 text-sm",children:R},void 0,!1,void 0,this),e.jsxDEV("div",{className:"flex gap-2",children:[e.jsxDEV("button",{onClick:I,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),e.jsxDEV("button",{onClick:P,disabled:!B||L,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:G?"Validating...":L?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"flex items-center justify-between",children:[e.jsxDEV("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),e.jsxDEV("button",{onClick:W,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 rF({provider:H,isEditing:U,apiKey:B,saving:L,testing:G,error:_,success:R,onStartEdit:W,onCancelEdit:I,onApiKeyChange:w,onSave:P,onDelete:A}){return e.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${H.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[e.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[e.jsxDEV("div",{children:[e.jsxDEV("h3",{className:"font-medium",children:H.name},void 0,!1,void 0,this),e.jsxDEV("p",{className:"text-sm text-[#666]",children:H.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.hasKey?e.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[e.jsxDEV(h5,{className:"w-3 h-3"},void 0,!1,void 0,this),H.keyHint]},void 0,!0,void 0,this):e.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.hasKey?e.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[e.jsxDEV("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),e.jsxDEV("button",{onClick:A,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:U?e.jsxDEV("div",{className:"space-y-3",children:[e.jsxDEV("input",{type:"password",value:B,onChange:(F)=>w(F.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),_&&e.jsxDEV("p",{className:"text-red-400 text-sm",children:_},void 0,!1,void 0,this),R&&e.jsxDEV("p",{className:"text-green-400 text-sm",children:R},void 0,!1,void 0,this),e.jsxDEV("div",{className:"flex gap-2",children:[e.jsxDEV("button",{onClick:I,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),e.jsxDEV("button",{onClick:P,disabled:!B||L,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:G?"Validating...":L?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):e.jsxDEV("div",{className:"flex items-center justify-between",children:[e.jsxDEV("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),e.jsxDEV("button",{onClick:W,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)}var x4=J0(L1(),1),nF=[{key:"memory",icon:ib,label:"Memory"},{key:"tasks",icon:U5,label:"Tasks"},{key:"vision",icon:xb,label:"Vision"},{key:"operator",icon:jb,label:"Operator"},{key:"mcp",icon:q5,label:"MCP"},{key:"realtime",icon:ob,label:"Realtime"}];function mZ({agent:H,selected:U,onSelect:B,onToggle:L,onDelete:G}){let _=nF.filter((W)=>H.features?.[W.key]),R=H.mcpServerDetails||[];return x4.jsxDEV("div",{onClick:B,className:`bg-[#111] rounded p-5 border transition cursor-pointer ${U?"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:H.name},void 0,!1,void 0,this),x4.jsxDEV("p",{className:"text-sm text-[#666]",children:[H.provider," / ",H.model,H.port&&x4.jsxDEV("span",{className:"text-[#444]",children:[" · :",H.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),x4.jsxDEV(tF,{status:H.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:_.map(({key:W,icon:I,label:w})=>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:w,children:[x4.jsxDEV(I,{className:"w-3 h-3"},void 0,!1,void 0,this),w]},W,!0,void 0,this))},void 0,!1,void 0,this),R.length>0&&x4.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:R.map((W)=>x4.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${W.status==="running"?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${W.name} (${W.status})`,children:[x4.jsxDEV(q5,{className:"w-3 h-3"},void 0,!1,void 0,this),W.name]},W.id,!0,void 0,this))},void 0,!1,void 0,this),x4.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4",children:H.systemPrompt},void 0,!1,void 0,this),x4.jsxDEV("div",{className:"flex gap-2",children:[x4.jsxDEV("button",{onClick:L,className:`flex-1 px-3 py-1.5 rounded text-sm font-medium transition ${H.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:H.status==="running"?"Stop":"Start"},void 0,!1,void 0,this),x4.jsxDEV("button",{onClick:G,className:"px-3 py-1.5 rounded text-sm font-medium bg-red-500/20 text-red-400 hover:bg-red-500/30 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function tF({status:H}){return x4.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${H==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:H},void 0,!1,void 0,this)}var E1=J0(L1(),1),sF=[{key:"memory",label:"Memory",description:"Persistent recall",icon:ib},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:U5},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:xb},{key:"operator",label:"Operator",description:"Browser automation",icon:jb},{key:"mcp",label:"MCP",description:"External tools/services",icon:q5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:ob}];function gZ({form:H,providers:U,configuredProviders:B,onFormChange:L,onProviderChange:G,onCreate:_,onClose:R,onGoToSettings:W}){let I=U.find((F)=>F.id===H.provider),w=B.map((F)=>({value:F.id,label:F.name})),P=I?.models.map((F)=>({value:F.value,label:F.label,recommended:F.recommended}))||[],A=(F)=>{L({...H,features:{...H.features,[F]:!H.features[F]}})};return E1.jsxDEV(fZ,{children:[E1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),B.length===0?E1.jsxDEV(eF,{onGoToSettings:W},void 0,!1,void 0,this):E1.jsxDEV(E1.Fragment,{children:[E1.jsxDEV("div",{className:"space-y-4",children:[E1.jsxDEV(ZQ,{label:"Name",children:E1.jsxDEV("input",{type:"text",value:H.name,onChange:(F)=>L({...H,name:F.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),E1.jsxDEV(ZQ,{label:"Provider",children:E1.jsxDEV(K5,{value:H.provider,options:w,onChange:G,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),E1.jsxDEV(ZQ,{label:"Model",children:E1.jsxDEV(K5,{value:H.model,options:P,onChange:(F)=>L({...H,model:F}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),E1.jsxDEV(ZQ,{label:"System Prompt",children:E1.jsxDEV("textarea",{value:H.systemPrompt,onChange:(F)=>L({...H,systemPrompt:F.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),E1.jsxDEV(ZQ,{label:"Features",children:E1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:sF.map(({key:F,label:d,description:E,icon:r})=>E1.jsxDEV("button",{type:"button",onClick:()=>A(F),className:`flex items-center gap-3 p-3 rounded border text-left transition ${H.features[F]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[E1.jsxDEV(r,{className:`w-5 h-5 flex-shrink-0 ${H.features[F]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),E1.jsxDEV("div",{className:"flex-1 min-w-0",children:[E1.jsxDEV("div",{className:`text-sm font-medium ${H.features[F]?"text-[#f97316]":""}`,children:d},void 0,!1,void 0,this),E1.jsxDEV("div",{className:"text-xs text-[#666]",children:E},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},F,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[E1.jsxDEV("button",{onClick:R,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),E1.jsxDEV("button",{onClick:_,disabled:!H.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 ZQ({label:H,children:U}){return E1.jsxDEV("div",{children:[E1.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:H},void 0,!1,void 0,this),U]},void 0,!0,void 0,this)}function eF({onGoToSettings:H}){return E1.jsxDEV("div",{className:"text-center py-6",children:[E1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),E1.jsxDEV("button",{onClick:H,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 b7=J0(y1(),1);var h1=J0(y1(),1),H3=J0(y1(),1),nb=J0(y1(),1);function uB(H){var U,B,L="";if(typeof H=="string"||typeof H=="number")L+=H;else if(typeof H=="object")if(Array.isArray(H)){var G=H.length;for(U=0;U<G;U++)H[U]&&(B=uB(H[U]))&&(L&&(L+=" "),L+=B)}else for(B in H)H[B]&&(L&&(L+=" "),L+=B);return L}function mB(){for(var H,U,B=0,L="",G=arguments.length;B<G;B++)(H=arguments[B])&&(U=uB(H))&&(L&&(L+=" "),L+=U);return L}var bM=(H)=>{let U=QM(H),{conflictingClassGroups:B,conflictingClassGroupModifiers:L}=H;return{getClassGroupId:(R)=>{let W=R.split("-");if(W[0]===""&&W.length!==1)W.shift();return yB(W,U)||zM(R)},getConflictingClassGroupIds:(R,W)=>{let I=B[R]||[];if(W&&L[R])return[...I,...L[R]];return I}}},yB=(H,U)=>{if(H.length===0)return U.classGroupId;let B=H[0],L=U.nextPart.get(B),G=L?yB(H.slice(1),L):void 0;if(G)return G;if(U.validators.length===0)return;let _=H.join("-");return U.validators.find(({validator:R})=>R(_))?.classGroupId},gB=/^\[(.+)\]$/,zM=(H)=>{if(gB.test(H)){let U=gB.exec(H)[1],B=U?.substring(0,U.indexOf(":"));if(B)return"arbitrary.."+B}},QM=(H)=>{let{theme:U,prefix:B}=H,L={nextPart:new Map,validators:[]};return ZM(Object.entries(H.classGroups),B).forEach(([_,R])=>{$G(R,L,_,U)}),L},$G=(H,U,B,L)=>{H.forEach((G)=>{if(typeof G==="string"){let _=G===""?U:cB(U,G);_.classGroupId=B;return}if(typeof G==="function"){if(XM(G)){$G(G(L),U,B,L);return}U.validators.push({validator:G,classGroupId:B});return}Object.entries(G).forEach(([_,R])=>{$G(R,cB(U,_),B,L)})})},cB=(H,U)=>{let B=H;return U.split("-").forEach((L)=>{if(!B.nextPart.has(L))B.nextPart.set(L,{nextPart:new Map,validators:[]});B=B.nextPart.get(L)}),B},XM=(H)=>H.isThemeGetter,ZM=(H,U)=>{if(!U)return H;return H.map(([B,L])=>{let G=L.map((_)=>{if(typeof _==="string")return U+_;if(typeof _==="object")return Object.fromEntries(Object.entries(_).map(([R,W])=>[U+R,W]));return _});return[B,G]})},JM=(H)=>{if(H<1)return{get:()=>{return},set:()=>{}};let U=0,B=new Map,L=new Map,G=(_,R)=>{if(B.set(_,R),U++,U>H)U=0,L=B,B=new Map};return{get(_){let R=B.get(_);if(R!==void 0)return R;if((R=L.get(_))!==void 0)return G(_,R),R},set(_,R){if(B.has(_))B.set(_,R);else G(_,R)}}};var HM=(H)=>{let{separator:U,experimentalParseClassName:B}=H,L=U.length===1,G=U[0],_=U.length,R=(W)=>{let I=[],w=0,P=0,A;for(let D=0;D<W.length;D++){let u=W[D];if(w===0){if(u===G&&(L||W.slice(D,D+_)===U)){I.push(W.slice(P,D)),P=D+_;continue}if(u==="/"){A=D;continue}}if(u==="[")w++;else if(u==="]")w--}let F=I.length===0?W:W.substring(P),d=F.startsWith("!"),E=d?F.substring(1):F,r=A&&A>P?A-P:void 0;return{modifiers:I,hasImportantModifier:d,baseClassName:E,maybePostfixModifierPosition:r}};if(B)return(W)=>B({className:W,parseClassName:R});return R},YM=(H)=>{if(H.length<=1)return H;let U=[],B=[];return H.forEach((L)=>{if(L[0]==="[")U.push(...B.sort(),L),B=[];else B.push(L)}),U.push(...B.sort()),U},$M=(H)=>({cache:JM(H.cacheSize),parseClassName:HM(H),...bM(H)}),GM=/\s+/,KM=(H,U)=>{let{parseClassName:B,getClassGroupId:L,getConflictingClassGroupIds:G}=U,_=[],R=H.trim().split(GM),W="";for(let I=R.length-1;I>=0;I-=1){let w=R[I],{modifiers:P,hasImportantModifier:A,baseClassName:F,maybePostfixModifierPosition:d}=B(w),E=Boolean(d),r=L(E?F.substring(0,d):F);if(!r){if(!E){W=w+(W.length>0?" "+W:W);continue}if(r=L(F),!r){W=w+(W.length>0?" "+W:W);continue}E=!1}let D=YM(P).join(":"),u=A?D+"!":D,v0=u+r;if(_.includes(v0))continue;_.push(v0);let s=G(r,E);for(let Q0=0;Q0<s.length;++Q0){let n=s[Q0];_.push(u+n)}W=w+(W.length>0?" "+W:W)}return W};function UM(){let H=0,U,B,L="";while(H<arguments.length)if(U=arguments[H++]){if(B=dB(U))L&&(L+=" "),L+=B}return L}var dB=(H)=>{if(typeof H==="string")return H;let U,B="";for(let L=0;L<H.length;L++)if(H[L]){if(U=dB(H[L]))B&&(B+=" "),B+=U}return B};function qM(H,...U){let B,L,G,_=R;function R(I){let w=U.reduce((P,A)=>A(P),H());return B=$M(w),L=B.cache.get,G=B.cache.set,_=W,W(I)}function W(I){let w=L(I);if(w)return w;let P=KM(I,B);return G(I,P),P}return function(){return _(UM.apply(null,arguments))}}var B4=(H)=>{let U=(B)=>B[H]||[];return U.isThemeGetter=!0,U},aB=/^\[(?:([a-z-]+):)?(.+)\]$/i,BM=/^\d+\/\d+$/,OM=new Set(["px","full","screen"]),LM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NM=/\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$/,vM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,WM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_M=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,w7=(H)=>X3(H)||OM.has(H)||BM.test(H),Jb=(H)=>Z3(H,"length",IM),X3=(H)=>Boolean(H)&&!Number.isNaN(Number(H)),YG=(H)=>Z3(H,"number",X3),JQ=(H)=>Boolean(H)&&Number.isInteger(Number(H)),PM=(H)=>H.endsWith("%")&&X3(H.slice(0,-1)),J1=(H)=>aB.test(H),Hb=(H)=>LM.test(H),RM=new Set(["length","size","percentage"]),FM=(H)=>Z3(H,RM,lB),MM=(H)=>Z3(H,"position",lB),kM=new Set(["image","url"]),AM=(H)=>Z3(H,kM,TM),wM=(H)=>Z3(H,"",fM),HQ=()=>!0,Z3=(H,U,B)=>{let L=aB.exec(H);if(L){if(L[1])return typeof U==="string"?L[1]===U:U.has(L[1]);return B(L[2])}return!1},IM=(H)=>NM.test(H)&&!vM.test(H),lB=()=>!1,fM=(H)=>WM.test(H),TM=(H)=>_M.test(H);var hM=()=>{let H=B4("colors"),U=B4("spacing"),B=B4("blur"),L=B4("brightness"),G=B4("borderColor"),_=B4("borderRadius"),R=B4("borderSpacing"),W=B4("borderWidth"),I=B4("contrast"),w=B4("grayscale"),P=B4("hueRotate"),A=B4("invert"),F=B4("gap"),d=B4("gradientColorStops"),E=B4("gradientColorStopPositions"),r=B4("inset"),D=B4("margin"),u=B4("opacity"),v0=B4("padding"),s=B4("saturate"),Q0=B4("scale"),n=B4("sepia"),C=B4("skew"),j=B4("space"),$0=B4("translate"),O0=()=>["auto","contain","none"],L0=()=>["auto","hidden","clip","visible","scroll"],g0=()=>["auto",J1,U],Z0=()=>[J1,U],k0=()=>["",w7,Jb],a0=()=>["auto",X3,J1],C0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S0=()=>["solid","dashed","dotted","double","none"],_1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H1=()=>["start","end","center","between","around","evenly","stretch"],P1=()=>["","0",J1],i0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y1=()=>[X3,J1];return{cacheSize:500,separator:":",theme:{colors:[HQ],spacing:[w7,Jb],blur:["none","",Hb,J1],brightness:Y1(),borderColor:[H],borderRadius:["none","","full",Hb,J1],borderSpacing:Z0(),borderWidth:k0(),contrast:Y1(),grayscale:P1(),hueRotate:Y1(),invert:P1(),gap:Z0(),gradientColorStops:[H],gradientColorStopPositions:[PM,Jb],inset:g0(),margin:g0(),opacity:Y1(),padding:Z0(),saturate:Y1(),scale:Y1(),sepia:P1(),skew:Y1(),space:Z0(),translate:Z0()},classGroups:{aspect:[{aspect:["auto","square","video",J1]}],container:["container"],columns:[{columns:[Hb]}],"break-after":[{"break-after":i0()}],"break-before":[{"break-before":i0()}],"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:[...C0(),J1]}],overflow:[{overflow:L0()}],"overflow-x":[{"overflow-x":L0()}],"overflow-y":[{"overflow-y":L0()}],overscroll:[{overscroll:O0()}],"overscroll-x":[{"overscroll-x":O0()}],"overscroll-y":[{"overscroll-y":O0()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[r]}],"inset-x":[{"inset-x":[r]}],"inset-y":[{"inset-y":[r]}],start:[{start:[r]}],end:[{end:[r]}],top:[{top:[r]}],right:[{right:[r]}],bottom:[{bottom:[r]}],left:[{left:[r]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",JQ,J1]}],basis:[{basis:g0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J1]}],grow:[{grow:P1()}],shrink:[{shrink:P1()}],order:[{order:["first","last","none",JQ,J1]}],"grid-cols":[{"grid-cols":[HQ]}],"col-start-end":[{col:["auto",{span:["full",JQ,J1]},J1]}],"col-start":[{"col-start":a0()}],"col-end":[{"col-end":a0()}],"grid-rows":[{"grid-rows":[HQ]}],"row-start-end":[{row:["auto",{span:[JQ,J1]},J1]}],"row-start":[{"row-start":a0()}],"row-end":[{"row-end":a0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J1]}],gap:[{gap:[F]}],"gap-x":[{"gap-x":[F]}],"gap-y":[{"gap-y":[F]}],"justify-content":[{justify:["normal",...H1()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H1(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H1(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v0]}],px:[{px:[v0]}],py:[{py:[v0]}],ps:[{ps:[v0]}],pe:[{pe:[v0]}],pt:[{pt:[v0]}],pr:[{pr:[v0]}],pb:[{pb:[v0]}],pl:[{pl:[v0]}],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":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J1,U]}],"min-w":[{"min-w":[J1,U,"min","max","fit"]}],"max-w":[{"max-w":[J1,U,"none","full","min","max","fit","prose",{screen:[Hb]},Hb]}],h:[{h:[J1,U,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J1,U,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J1,U,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J1,U,"auto","min","max","fit"]}],"font-size":[{text:["base",Hb,Jb]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",YG]}],"font-family":[{font:[HQ]}],"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",J1]}],"line-clamp":[{"line-clamp":["none",X3,YG]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",w7,J1]}],"list-image":[{"list-image":["none",J1]}],"list-style-type":[{list:["none","disc","decimal",J1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[H]}],"placeholder-opacity":[{"placeholder-opacity":[u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[H]}],"text-opacity":[{"text-opacity":[u]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...S0(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",w7,Jb]}],"underline-offset":[{"underline-offset":["auto",w7,J1]}],"text-decoration-color":[{decoration:[H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J1]}],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",J1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[u]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...C0(),MM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",FM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AM]}],"bg-color":[{bg:[H]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[_]}],"rounded-s":[{"rounded-s":[_]}],"rounded-e":[{"rounded-e":[_]}],"rounded-t":[{"rounded-t":[_]}],"rounded-r":[{"rounded-r":[_]}],"rounded-b":[{"rounded-b":[_]}],"rounded-l":[{"rounded-l":[_]}],"rounded-ss":[{"rounded-ss":[_]}],"rounded-se":[{"rounded-se":[_]}],"rounded-ee":[{"rounded-ee":[_]}],"rounded-es":[{"rounded-es":[_]}],"rounded-tl":[{"rounded-tl":[_]}],"rounded-tr":[{"rounded-tr":[_]}],"rounded-br":[{"rounded-br":[_]}],"rounded-bl":[{"rounded-bl":[_]}],"border-w":[{border:[W]}],"border-w-x":[{"border-x":[W]}],"border-w-y":[{"border-y":[W]}],"border-w-s":[{"border-s":[W]}],"border-w-e":[{"border-e":[W]}],"border-w-t":[{"border-t":[W]}],"border-w-r":[{"border-r":[W]}],"border-w-b":[{"border-b":[W]}],"border-w-l":[{"border-l":[W]}],"border-opacity":[{"border-opacity":[u]}],"border-style":[{border:[...S0(),"hidden"]}],"divide-x":[{"divide-x":[W]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[W]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[u]}],"divide-style":[{divide:S0()}],"border-color":[{border:[G]}],"border-color-x":[{"border-x":[G]}],"border-color-y":[{"border-y":[G]}],"border-color-s":[{"border-s":[G]}],"border-color-e":[{"border-e":[G]}],"border-color-t":[{"border-t":[G]}],"border-color-r":[{"border-r":[G]}],"border-color-b":[{"border-b":[G]}],"border-color-l":[{"border-l":[G]}],"divide-color":[{divide:[G]}],"outline-style":[{outline:["",...S0()]}],"outline-offset":[{"outline-offset":[w7,J1]}],"outline-w":[{outline:[w7,Jb]}],"outline-color":[{outline:[H]}],"ring-w":[{ring:k0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[H]}],"ring-opacity":[{"ring-opacity":[u]}],"ring-offset-w":[{"ring-offset":[w7,Jb]}],"ring-offset-color":[{"ring-offset":[H]}],shadow:[{shadow:["","inner","none",Hb,wM]}],"shadow-color":[{shadow:[HQ]}],opacity:[{opacity:[u]}],"mix-blend":[{"mix-blend":[..._1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_1()}],filter:[{filter:["","none"]}],blur:[{blur:[B]}],brightness:[{brightness:[L]}],contrast:[{contrast:[I]}],"drop-shadow":[{"drop-shadow":["","none",Hb,J1]}],grayscale:[{grayscale:[w]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[A]}],saturate:[{saturate:[s]}],sepia:[{sepia:[n]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[B]}],"backdrop-brightness":[{"backdrop-brightness":[L]}],"backdrop-contrast":[{"backdrop-contrast":[I]}],"backdrop-grayscale":[{"backdrop-grayscale":[w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[u]}],"backdrop-saturate":[{"backdrop-saturate":[s]}],"backdrop-sepia":[{"backdrop-sepia":[n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[R]}],"border-spacing-x":[{"border-spacing-x":[R]}],"border-spacing-y":[{"border-spacing-y":[R]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J1]}],duration:[{duration:Y1()}],ease:[{ease:["linear","in","out","in-out",J1]}],delay:[{delay:Y1()}],animate:[{animate:["none","spin","ping","pulse","bounce",J1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q0]}],"scale-x":[{"scale-x":[Q0]}],"scale-y":[{"scale-y":[Q0]}],rotate:[{rotate:[JQ,J1]}],"translate-x":[{"translate-x":[$0]}],"translate-y":[{"translate-y":[$0]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J1]}],accent:[{accent:["auto",H]}],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",J1]}],"caret-color":[{caret:[H]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z0()}],"scroll-mx":[{"scroll-mx":Z0()}],"scroll-my":[{"scroll-my":Z0()}],"scroll-ms":[{"scroll-ms":Z0()}],"scroll-me":[{"scroll-me":Z0()}],"scroll-mt":[{"scroll-mt":Z0()}],"scroll-mr":[{"scroll-mr":Z0()}],"scroll-mb":[{"scroll-mb":Z0()}],"scroll-ml":[{"scroll-ml":Z0()}],"scroll-p":[{"scroll-p":Z0()}],"scroll-px":[{"scroll-px":Z0()}],"scroll-py":[{"scroll-py":Z0()}],"scroll-ps":[{"scroll-ps":Z0()}],"scroll-pe":[{"scroll-pe":Z0()}],"scroll-pt":[{"scroll-pt":Z0()}],"scroll-pr":[{"scroll-pr":Z0()}],"scroll-pb":[{"scroll-pb":Z0()}],"scroll-pl":[{"scroll-pl":Z0()}],"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",J1]}],fill:[{fill:[H,"none"]}],"stroke-w":[{stroke:[w7,Jb,YG]}],stroke:[{stroke:[H,"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 iB=qM(hM);var sB=J0(y1(),1),V5=J0(z4(),1),Y3=J0(y1(),1),L6=J0(z4(),1),eB=J0(z4(),1),OG=J0(z4(),1),$3=J0(y1(),1),A4=J0(z4(),1),b2=J0(y1(),1),j4=J0(z4(),1),$Q=J0(z4(),1),U0=J0(z4(),1),l6=J0(z4(),1),NG=J0(z4(),1),u0=J0(z4(),1),N4=J0(z4(),1),I1=J0(z4(),1),F0=J0(z4(),1),t0=J0(z4(),1),YQ=J0(z4(),1),e5=J0(y1(),1),o0=J0(z4(),1),f7=J0(y1(),1),I0=J0(z4(),1),E6=J0(z4(),1),_k=J0(y1(),1),Q2=J0(z4(),1),vG=J0(y1(),1),WG=J0(z4(),1),Pk=J0(y1(),1),X2=J0(z4(),1),Z2=J0(y1(),1),J2=J0(z4(),1),Rk=J0(y1(),1),H2=J0(z4(),1),Y2=J0(z4(),1),$2=J0(z4(),1),SM=Object.defineProperty,VM=(H,U,B)=>(U in H)?SM(H,U,{enumerable:!0,configurable:!0,writable:!0,value:B}):H[U]=B,DM=(H,U,B)=>VM(H,typeof U!=="symbol"?U+"":U,B);function o1(...H){return iB(mB(H))}var HI=[{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)}],YI=[{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 EM(H=1000){return new Promise((U)=>{setTimeout(()=>{U({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})},H)})}function uM(H){let U=H.toLowerCase();if(U.includes("analyze")||U.includes("analysis"))return`Analysis complete for "${H}". 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(U.includes("sales")||U.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(U.includes("report")||U.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(U.includes("data")||U.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(U.includes("customer")||U.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 mM(H){let U=uM(H),B=H.toLowerCase(),L=[],G;if(B.includes("sales")||B.includes("revenue")||B.includes("analyze"))L.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(B.includes("customer")||B.includes("user"))L.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(B.includes("task")||B.includes("todo")||B.includes("work")||B.includes("completed"))L.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:{}}]}),G={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(B.includes("analyze")||B.includes("analysis"))G={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:U,widgets:L,action:G}}function gM(H,U,B,L,G=30){let{message:_,widgets:R}=mM(H),W=_.split(" "),I=0,w=setInterval(()=>{try{if(I<W.length)U({type:"token",content:W[I]+" "}),I++;else{clearInterval(w),R.forEach((A)=>{U({type:"widget",widget:A})});let P=`mock_thread_${Date.now()}`;U({type:"complete"}),B(P)}}catch(P){clearInterval(w),L(P instanceof Error?P:Error("Mock streaming error"))}},G)}function cM(H){return new Promise((U,B)=>{let L=new FileReader;L.onload=()=>{let _=L.result.split(",")[1];U(_)},L.onerror=()=>B(Error("Failed to read file")),L.readAsDataURL(H)})}function yM(H){if(H.startsWith("image/"))return"image";return"document"}function dM(H){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(H.type)}async function aM(H){let U=await cM(H);return{type:yM(H.type),source:{type:"base64",media_type:H.type,data:U}}}async function lM(H){let U=Array.from(H);return await Promise.all(U.map((L)=>aM(L)))}async function xB(H,U){if(!U||U.length===0)return H;let B=[];if(H.trim())B.push({type:"text",text:H.trim()});let L=await lM(U);return B.push(...L),B}function yZ(H){if(H<1024)return`${H} B`;if(H<1048576)return`${(H/1024).toFixed(1)} KB`;return`${(H/1048576).toFixed(1)} MB`}var jB=10485760;function rB(H){if(!dM(H))return{valid:!1,error:`Unsupported file type: ${H.type}`};if(H.size>jB)return{valid:!1,error:`File too large: ${yZ(H.size)} (max ${yZ(jB)})`};return{valid:!0}}var iM=["list","table"];function xM(H){let U=[],B=!1,L=H.match(/"items"\s*:\s*\[/);if(!L)return{items:U,isStreaming:!1};let G=H.indexOf("[",L.index);if(G===-1)return{items:U,isStreaming:!0};let _=0,R=!1,W=!1,I=-1;for(let A=G+1;A<H.length;A++){let F=H[A];if(W){W=!1;continue}if(F==="\\"&&R){W=!0;continue}if(F==='"'){R=!R;continue}if(R)continue;if(F==="{"){if(_===0)I=A;_++}else if(F==="}"){if(_--,_===0&&I!==-1){let d=H.slice(I,A+1);try{let E=JSON.parse(d);if(!E.id)E.id=`item-${U.length}-${qG(d)}`;U.push(E)}catch(E){}I=-1}}else if(F==="]"&&_===0){B=!1;break}}if(_>0||I!==-1)B=!0;let w=H.slice(G);if(BG(w,0)===-1)B=!0;return{items:U,isStreaming:B}}function qG(H){let U=0;for(let B=0;B<H.length;B++){let L=H.charCodeAt(B);U=(U<<5)-U+L,U=U&U}return Math.abs(U).toString(36)}function BG(H,U){let B=0,L=!1,G=!1;for(let _=U;_<H.length;_++){let R=H[_];if(G){G=!1;continue}if(R==="\\"&&L){G=!0;continue}if(R==='"'){L=!L;continue}if(L)continue;if(R==="["||R==="{")B++;else if(R==="]"||R==="}"){if(B--,B===0)return _}}return-1}function cZ(H){let U=[],B=!1,L=!1,G=0,_=null,R=H,W=H.lastIndexOf("@ui:");if(W!==-1){let P=H.slice(W),A=P.match(/^@ui:(\w+)/);if(A){let F=A[1],d=P.indexOf("[");if(d===-1)R=H.slice(0,W),_=F,L=!0;else{let E=W+d;if(BG(H,E)===-1)if(iM.includes(F)){let D=H.slice(E+1),{items:u,isStreaming:v0}=xM(D);if(u.length>0){R=H.slice(0,W);let s=`widget-${F}-streaming-${qG(D)}`,Q0=R.replace(/[\s:;\-–—\.]+$/g,"").trim();if(Q0)U.push({type:"text",content:Q0});U.push({type:"widget",widget:{type:F,id:s,props:F==="table"?{rows:u,columns:[]}:{items:u},isStreaming:v0}}),B=!0,L=!1,R=""}else R=H.slice(0,W),_=F,L=!0}else R=H.slice(0,W),_=F,L=!0}}}if(L)R=R.replace(/[\s:;\-–—\.]+$/g,"");let I=/@ui:(\w+)\[/g,w;while((w=I.exec(R))!==null){let P=w[1],A=w.index+w[0].length-1,F=BG(R,A);if(F===-1)continue;let d=R.slice(A+1,F);if(w.index>G){let E=R.slice(G,w.index).trim();if(E)U.push({type:"text",content:E})}try{let E=d.trim(),r=JSON.parse(E),D=`widget-${P}-${qG(E)}`,{metadata:u,actions:v0,...s}=r;U.push({type:"widget",widget:{type:P,id:D,props:s,...v0&&{actions:v0},...u&&{metadata:u}}}),B=!0}catch(E){}G=F+1,I.lastIndex=G}if(G<R.length){let P=R.slice(G).trim();if(P)U.push({type:"text",content:P})}if(U.length===0&&R.trim())U.push({type:"text",content:R.trim()});if(_)U.push({type:"widget_pending",pendingType:_});return{segments:U,hasWidgets:B,hasPendingWidget:L}}var nB={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"}]}]'}},jM=Object.keys(nB),oM=["flow"],tB=jM.filter((H)=>!oM.includes(H));function pM(H){let U=H||tB,B=`
|
|
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 L of U){let G=nB[L];if(!G)continue;B+=`${L}: ${G.schema} | ${G.example}
|
|
182
|
+
`}return B+=`
|
|
183
|
+
Per-item "metadata" is sent as payload on action click.
|
|
184
|
+
`,B}function rM(H){return`
|
|
185
|
+
Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(H||tB).join(", ")}. Per-item "metadata" is sent as action payload.
|
|
186
|
+
`}function nM({widget:H,onAction:U}){let{title:B,description:L,image:G,footer:_}=H.props;return V5.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[G&&V5.jsx("img",{src:G,alt:B,className:"w-full h-48 object-cover"}),V5.jsxs("div",{className:"p-4",children:[V5.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:B}),L&&V5.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:L})]}),(_||H.actions&&H.actions.length>0)&&V5.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[_&&V5.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:_}),H.actions&&H.actions.length>0&&V5.jsx("div",{className:"flex gap-2",children:H.actions.map((R,W)=>V5.jsx("button",{onClick:()=>U?.({type:R.type,payload:R.payload,widgetId:H.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:R.label},W))})]})]})}function tM({widget:H,onAction:U}){let{items:B}=H.props,L=H.isStreaming??!1,G=Y3.useRef(new Set),[_,R]=Y3.useState(new Set);return Y3.useEffect(()=>{let W=new Set(B.map((w)=>w.id)),I=new Set;if(B.forEach((w)=>{if(!G.current.has(w.id))I.add(w.id)}),B.forEach((w)=>G.current.add(w.id)),I.size>0){R(I);let w=setTimeout(()=>{R(new Set)},500);return()=>clearTimeout(w)}},[B]),L6.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[B.map((W,I)=>{let w=_.has(W.id),P=I===B.length-1;return L6.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!P||L?"border-b border-neutral-200 dark:border-neutral-700":""} ${!W.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${w?"apteva-list-item-new":""}`,style:W.backgroundColor?{backgroundColor:W.backgroundColor}:void 0,children:[W.image&&L6.jsx("img",{src:W.image,alt:W.title,className:"w-16 h-16 rounded object-cover"}),L6.jsxs("div",{className:`flex-1 ${W.image?"ml-4":""}`,children:[L6.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:W.title}),W.subtitle&&L6.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:W.subtitle}),W.description&&L6.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:W.description})]}),H.actions&&H.actions.length>0&&L6.jsx("div",{className:"flex gap-2",children:H.actions.map((A,F)=>L6.jsx("button",{onClick:()=>U?.({type:A.type,payload:W.metadata||W,widgetId:H.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:A.label},F))})]},W.id)}),L&&L6.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[L6.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[L6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),L6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),L6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),L6.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function sM({widget:H,onAction:U}){let{label:B,variant:L="primary",disabled:G=!1}=H.props;return eB.jsx("button",{onClick:()=>H.actions?.[0]&&U?.({type:H.actions[0].type,payload:H.actions[0].payload,widgetId:H.id,timestamp:new Date}),disabled:G,className:o1("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"}[L],{"opacity-50 cursor-not-allowed":G}),children:B})}function eM({widget:H,onAction:U}){let{layout:B="horizontal",buttons:L}=H.props,G={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},_=(R)=>{return H.actions?.find((W)=>W.payload?.buttonId===R)||H.actions?.[0]};return OG.jsx("div",{className:o1("flex gap-2",B==="vertical"?"flex-col":"flex-row flex-wrap"),children:L.map((R)=>{let W=_(R.id);return OG.jsx("button",{onClick:()=>{if(W)U?.({type:W.type,payload:{...W.payload,buttonId:R.id},widgetId:H.id,timestamp:new Date})},className:o1("px-4 py-2 rounded-lg font-medium transition-colors text-sm",G[R.variant||"secondary"]),children:R.label},R.id)})})}function bk({widget:H,onAction:U}){let{columns:B,rows:L,caption:G,compact:_=!1,striped:R=!1}=H.props,W=H.isStreaming??!1,I=$3.useRef(new Set),[w,P]=$3.useState(new Set);$3.useEffect(()=>{let F=new Set;if(L.forEach((d,E)=>{let r=d.id||`row-${E}`;if(!I.current.has(r))F.add(r)}),L.forEach((d,E)=>{let r=d.id||`row-${E}`;I.current.add(r)}),F.size>0){P(F);let d=setTimeout(()=>{P(new Set)},500);return()=>clearTimeout(d)}},[L]);let A=(F)=>{switch(F){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return A4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:A4.jsx("div",{className:"overflow-x-auto",children:A4.jsxs("table",{className:"w-full",children:[G&&A4.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:G}),A4.jsx("thead",{children:A4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:B.map((F)=>A4.jsx("th",{className:o1("font-semibold text-neutral-900 dark:text-white",_?"px-3 py-2 text-xs":"px-4 py-3 text-sm",A(F.align)),style:F.width?{width:F.width}:void 0,children:F.label},F.key))})}),A4.jsxs("tbody",{children:[L.map((F,d)=>{let E=F.id||`row-${d}`,r=w.has(E);return A4.jsx("tr",{className:o1("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",R&&d%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",r&&"apteva-table-row-new"),onClick:()=>{if(H.actions&&H.actions.length>0)U?.({type:H.actions[0].type,payload:F,widgetId:H.id,timestamp:new Date})},style:{cursor:H.actions?.length?"pointer":"default"},children:B.map((D)=>A4.jsx("td",{className:o1("text-neutral-700 dark:text-neutral-300",_?"px-3 py-2 text-xs":"px-4 py-3 text-sm",A(D.align)),children:F[D.key]??"—"},D.key))},E)}),L.length===0&&!W&&A4.jsx("tr",{children:A4.jsx("td",{colSpan:B.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),W&&A4.jsx("tr",{className:"apteva-table-streaming",children:A4.jsx("td",{colSpan:B.length||1,className:"px-4 py-3 text-center",children:A4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[A4.jsxs("div",{className:"flex gap-1",children:[A4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),A4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),A4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),A4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function zk({widget:H,onAction:U}){let{title:B,fields:L}=H.props,[G,_]=b2.useState(()=>{let P={};return L.forEach((A)=>{P[A.name]=A.defaultValue??(A.type==="checkbox"?!1:"")}),P}),R=(P,A)=>{_((F)=>({...F,[P]:A}))},W=(P)=>{if(P.preventDefault(),H.actions?.[0]&&U)U({type:H.actions[0].type,payload:{...H.actions[0].payload,formData:G},widgetId:H.id,timestamp:new Date})},I=(P)=>{switch(P.type){case"text":case"password":case"number":case"date":return j4.jsx("input",{type:P.type,name:P.name,value:G[P.name]||"",onChange:(F)=>R(P.name,P.type==="number"?Number(F.target.value):F.target.value),placeholder:P.placeholder,required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return j4.jsx("textarea",{name:P.name,value:G[P.name]||"",onChange:(F)=>R(P.name,F.target.value),placeholder:P.placeholder,required:P.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return j4.jsxs("select",{name:P.name,value:G[P.name]||"",onChange:(F)=>R(P.name,F.target.value),required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[j4.jsx("option",{value:"",children:P.placeholder||"Select..."}),P.options?.map((F)=>j4.jsx("option",{value:F.value,children:F.label},F.value))]});case"checkbox":return j4.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[j4.jsx("input",{type:"checkbox",name:P.name,checked:G[P.name]||!1,onChange:(F)=>R(P.name,F.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),j4.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:P.label})]});default:return null}},w=H.actions?.find((P)=>P.type==="submit")||H.actions?.[0];return j4.jsxs("form",{onSubmit:W,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[j4.jsxs("div",{className:"p-4",children:[B&&j4.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:B}),j4.jsx("div",{className:"space-y-3",children:L.map((P)=>j4.jsxs("div",{className:P.type==="checkbox"?"":"space-y-1",children:[P.type!=="checkbox"&&j4.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[P.label,P.required&&j4.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),I(P)]},P.name))})]}),w&&j4.jsx("div",{className:"px-4 pb-4",children:j4.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:w.label||"Submit"})})]})}function Qk({widget:H}){let{src:U,alt:B,caption:L}=H.props;return $Q.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[$Q.jsx("img",{src:U,alt:B,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),L&&$Q.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:L})]})}function Xk({type:H,status:U}){if(U==="completed")return U0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(U==="error")return U0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(U==="active")return U0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let B="w-4 h-4";if(H==="time"||H==="schedule"||H==="clock")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if(H==="recurring"||H==="repeat")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="agent"||H?.startsWith("@"))return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="email"||H==="mail")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="slack"||H==="message"||H==="chat")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="webhook"||H==="api")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="build"||H==="compile"||H==="package")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="test"||H==="check"||H==="verify")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="deploy"||H==="rocket"||H==="launch")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(H==="push"||H==="upload"||H==="cloud")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="generate"||H==="create"||H==="document"||H==="file")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="review"||H==="inspect"||H==="eye")return U0.jsxs("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),U0.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(H==="analyze"||H==="research"||H==="chart")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="scrape"||H==="crawl"||H==="spider")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="data"||H==="database"||H==="storage")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="notification"||H==="bell"||H==="alert")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="transform"||H==="process"||H==="convert")return U0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return U0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function Zk({icon:H}){if(H==="research"||H==="multi-agent"||H==="agents")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(H==="schedule"||H==="report"||H==="calendar")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="recurring"||H==="repeat"||H==="sync")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="analyze"||H==="analysis"||H==="chart")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="deploy"||H==="rocket"||H==="launch")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(H==="automation"||H==="workflow"||H==="process")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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(H==="data"||H==="pipeline"||H==="etl")return U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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 U0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:U0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.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 Jk(){return U0.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:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var S5={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 Hk(H,U){if(H.color&&S5[H.color])return S5[H.color];if(U==="time"||U==="schedule"||U==="clock")return S5.blue;if(U==="agent"||U?.startsWith("@"))return S5.purple;if(U==="email"||U==="slack"||U==="message"||U==="notification")return S5.cyan;if(U==="generate"||U==="document"||U==="create")return S5.amber;if(U==="deploy"||U==="rocket"||U==="launch")return S5.rose;if(U==="build"||U==="compile"||U==="package")return S5.indigo;if(U==="test"||U==="check"||U==="verify")return S5.emerald;if(U==="data"||U==="database"||U==="storage")return S5.orange;return S5.blue}function Yk({widget:H}){let{title:U,subtitle:B,icon:L,steps:G}=H.props;return U0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[U0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[U0.jsx(Zk,{icon:L}),U0.jsxs("div",{className:"flex-1 min-w-0",children:[U0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:U}),B&&U0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:B})]})]}),U0.jsx("div",{className:"px-4 pb-4",children:U0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:G.map((_,R)=>{let W=R===G.length-1,I=_.status==="active",w=_.status==="completed",P=_.status==="error",A=_.status==="skipped",F=_.label,d=_.type;if(!d)if(F.startsWith("@"))d="agent";else if(/^\d+[ap]m$/i.test(F)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(F))d="time";else{let D=F.toLowerCase();d={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 E,r="";if(I)E="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(w)E="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(P)E="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(A)E="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",r="line-through";else E=Hk(_,d);return U0.jsxs("div",{className:"flex items-center gap-2",children:[U0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${E} ${r}`,children:[U0.jsx(Xk,{type:d,status:_.status}),F]}),!W&&U0.jsx(Jk,{})]},_.id)})})})]})}function LG({widget:H,onAction:U}){return l6.jsx("div",{className:"apteva-widget",children:(()=>{switch(H.type){case"card":return l6.jsx(nM,{widget:H,onAction:U});case"list":return l6.jsx(tM,{widget:H,onAction:U});case"button":return l6.jsx(sM,{widget:H,onAction:U});case"button_group":return l6.jsx(eM,{widget:H,onAction:U});case"table":return l6.jsx(bk,{widget:H,onAction:U});case"form":return l6.jsx(zk,{widget:H,onAction:U});case"image":return l6.jsx(Qk,{widget:H});case"flow":return l6.jsx(Yk,{widget:H});default:return l6.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[l6.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",H.type]}),l6.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(H,null,2)})]})}})()})}function KG({widgets:H,onAction:U,onWidgetMount:B,layout:L="stack",spacing:G="normal",columns:_=3,className:R}){sB.useEffect(()=>{H.forEach((w)=>{B?.(w.id)})},[H,B]);let W={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${_}`,masonry:"columns-1 md:columns-2 lg:columns-3"},I={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return NG.jsx("div",{className:o1(W[L],I[G],R),children:H.map((w)=>NG.jsx(LG,{widget:w,onAction:U},w.id))})}function oB({type:H,className:U}){switch(H){case"card":return u0.jsx("div",{className:o1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",U),children:u0.jsxs("div",{className:"p-4 space-y-3",children:[u0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return u0.jsx("div",{className:o1("apteva-widget-skeleton animate-pulse space-y-2",U),children:[1,2,3].map((B)=>u0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[u0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),u0.jsxs("div",{className:"flex-1 space-y-2",children:[u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),u0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},B))});case"button_group":return u0.jsxs("div",{className:o1("apteva-widget-skeleton animate-pulse flex gap-2",U),children:[u0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),u0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),u0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return u0.jsxs("div",{className:o1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",U),children:[u0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),u0.jsxs("div",{className:"space-y-3",children:[u0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),u0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),u0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return u0.jsxs("div",{className:o1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",U),children:[u0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),u0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[u0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),u0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),u0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),u0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),u0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return u0.jsx("div",{className:o1("apteva-widget-skeleton animate-pulse",U),children:u0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return u0.jsx("div",{className:o1("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",U),children:[1,2,3].map((B)=>u0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},B))});case"map":return u0.jsx("div",{className:o1("apteva-widget-skeleton animate-pulse",U),children:u0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:u0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[u0.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"}),u0.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 u0.jsxs("div",{className:o1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",U),children:[u0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((B)=>u0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),u0.jsx("div",{className:"flex-1 px-4 py-3",children:u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},B))]});default:return u0.jsxs("div",{className:o1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",U),children:[u0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),u0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function $k(H){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(H)}function rb(H,U=""){let B=[],L=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,G=0,_,R=0;while((_=L.exec(H))!==null){if(_.index>G)B.push(H.slice(G,_.index));if(_[1]!==void 0||_[2]!==void 0){let W=_[1]||"",I=_[2];B.push(N4.jsx("img",{src:I,alt:W,className:"apteva-md-img"},`${U}img${R++}`))}else if(_[3]!==void 0||_[4]!==void 0){let W=_[3],I=_[4];if($k(I))B.push(N4.jsx("img",{src:I,alt:W,className:"apteva-md-img"},`${U}img${R++}`));else B.push(N4.jsx("a",{href:I,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:W},`${U}a${R++}`))}else if(_[5]!==void 0)B.push(N4.jsx("strong",{children:_[6]},`${U}b${R++}`));else if(_[7]!==void 0)B.push(N4.jsx("code",{className:"apteva-md-inline-code",children:_[7]},`${U}code${R++}`));G=_.index+_[0].length}if(G<H.length)B.push(H.slice(G));return B.length>0?B:[H]}function Gk(H){let U=H.split(`
|
|
187
|
+
`),B=[],L=0,G=0;while(G<U.length){let _=U[G],R=_.match(/^##\s+(.*)$/);if(R){B.push(N4.jsx("h2",{className:"apteva-md-h2",children:rb(R[1],`${L}`)},`h2${L++}`)),G++;continue}let W=_.match(/^###\s+(.*)$/);if(W){B.push(N4.jsx("h3",{className:"apteva-md-h3",children:rb(W[1],`${L}`)},`h3${L++}`)),G++;continue}let I=_.match(/^(\s*)([-*+])\s+(.*)$/);if(I){let A=[],F=I[1].length;while(G<U.length){let d=U[G].match(/^(\s*)([-*+])\s+(.*)$/);if(d&&d[1].length===F)A.push(N4.jsx("li",{className:"apteva-md-li",children:rb(d[3],`${L}`)},`li${L++}`)),G++;else break}B.push(N4.jsx("ul",{className:"apteva-md-ul",children:A},`ul${L++}`));continue}let w=_.match(/^(\s*)(\d+)\.\s+(.*)$/);if(w){let A=[],F=w[1].length;while(G<U.length){let d=U[G].match(/^(\s*)(\d+)\.\s+(.*)$/);if(d&&d[1].length===F)A.push(N4.jsx("li",{className:"apteva-md-li",children:rb(d[3],`${L}`)},`li${L++}`)),G++;else break}B.push(N4.jsx("ol",{className:"apteva-md-ol",children:A},`ol${L++}`));continue}if(_.match(/^\|(.+)\|$/)&&G+1<U.length){if(U[G+1].match(/^\|([\s:-]+\|)+$/)){let d=_.split("|").filter((r)=>r.trim()!=="").map((r)=>r.trim());G+=2;let E=[];while(G<U.length)if(U[G].match(/^\|(.+)\|$/)){let D=U[G].split("|").filter((u)=>u.trim()!=="").map((u)=>u.trim());E.push(D),G++}else break;B.push(N4.jsx("div",{className:"apteva-md-table-wrapper",children:N4.jsxs("table",{className:"apteva-md-table",children:[N4.jsx("thead",{children:N4.jsx("tr",{children:d.map((r,D)=>N4.jsx("th",{className:"apteva-md-th",children:rb(r,`th${L}${D}`)},`th${D}`))})}),N4.jsx("tbody",{children:E.map((r,D)=>N4.jsx("tr",{children:r.map((u,v0)=>N4.jsx("td",{className:"apteva-md-td",children:rb(u,`td${L}${D}${v0}`)},`td${v0}`))},`tr${D}`))})]})},`table-wrapper${L++}`));continue}}if(_==="")B.push(N4.jsx("br",{},`br${L++}`));else B.push(N4.jsxs("span",{children:[rb(_,`${L}`),G<U.length-1?`
|
|
188
|
+
`:""]},`p${L++}`));G++}return B}function I7({content:H,className:U=""}){return N4.jsx("div",{className:`apteva-md ${U}`,children:Gk(H)})}function Kk({name:H,status:U,isReceiving:B=!1,inputLength:L=0,streamOutput:G}){if(U==="preparing")return I1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[I1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[I1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),I1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),I1.jsxs("span",{className:"apteva-tool-label",children:[I1.jsx("strong",{children:H}),I1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(U==="running")return I1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[I1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[I1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),I1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),I1.jsxs("span",{className:"apteva-tool-label",children:[I1.jsx("strong",{children:H}),G?I1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,G?I1.jsx("span",{className:"apteva-tool-stream-output",children:G}):I1.jsxs(I1.Fragment,{children:[I1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),I1.jsxs("span",{className:"apteva-tool-dots",children:[I1.jsx("span",{children:"."}),I1.jsx("span",{children:"."}),I1.jsx("span",{children:"."})]})]})]})]});if(U==="completed")return I1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[I1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),I1.jsx("span",{className:"apteva-tool-label",children:H})]});return I1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[I1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),I1.jsxs("span",{className:"apteva-tool-label",children:[H," failed"]})]})}function Uk({message:H,onAction:U,enableWidgets:B,onWidgetRender:L}){let G=H.role==="user",_=H.metadata?.content_segments,R=H.metadata?.isStreaming===!0,W=H.content||_&&_.length>0,I=nb.useRef(new Set),w=nb.useMemo(()=>{if(!B||G||!H.content)return[];return cZ(H.content).segments.filter((Q0)=>Q0.type==="widget"&&!!Q0.widget).map((Q0)=>Q0.widget)},[B,G,H.content]);nb.useEffect(()=>{if(L&&H.widgets){for(let s of H.widgets)if(!I.current.has(s.id))I.current.add(s.id),L(s)}},[H.widgets,L]),nb.useEffect(()=>{if(L&&w.length>0){for(let s of w)if(!I.current.has(s.id))I.current.add(s.id),L(s)}},[w,L]);let P=(s)=>{if(!B||G)return F0.jsx(I7,{content:s});let n=cZ(s).segments.filter((C)=>C.type==="text"&&C.content).map((C)=>C.content).join("");if(!n.trim())return null;return F0.jsx(I7,{content:n})},A=()=>{if(!B||G||!H.content)return null;let s=cZ(H.content),Q0=[],n="";if(s.segments.forEach((C,j)=>{if(C.type==="text"&&C.content)n+=C.content;else if(C.type==="widget"&&C.widget){if(n.trim())Q0.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:n})})},`text-${j}`)),n="";Q0.push(F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(LG,{widget:C.widget,onAction:U})},`widget-${j}`))}else if(C.type==="widget_pending"&&C.pendingType){if(n.trim())Q0.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:n})})},`text-${j}`)),n="";Q0.push(F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(oB,{type:C.pendingType})},`pending-${j}`))}}),n.trim())Q0.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:n})})},"text-final"));return Q0.length>0?Q0:null},F=H.metadata?.attachments||[],d=F.length>0,E=()=>{if(!d)return null;return F0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:F.map((s,Q0)=>{let n=s.type.startsWith("image/"),C=s.type==="application/pdf";if(n&&s.preview)return F0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:F0.jsx("img",{src:s.preview,alt:s.name,className:"max-w-[150px] max-h-[150px] object-cover"})},Q0);return F0.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:[F0.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:C?F0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F0.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"})}):F0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F0.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"})})}),F0.jsxs("div",{className:"flex flex-col min-w-0",children:[F0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:s.name}),F0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[C?"PDF":"Document"," · ",yZ(s.size)]})]})]},Q0)})})},r=()=>{if(G)return F0.jsx("div",{className:"apteva-message-text",children:H.content});if(R&&!W)return F0.jsxs("div",{className:"apteva-typing-indicator",children:[F0.jsx("span",{}),F0.jsx("span",{}),F0.jsx("span",{})]});if(_&&_.length>0)return null;return P(H.content)},D=(s,Q0)=>{if(!B)return F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:s})})},Q0);let n=cZ(s),C=[],j="";if(n.segments.forEach(($0,O0)=>{if($0.type==="text"&&$0.content)j+=$0.content;else if($0.type==="widget"&&$0.widget){if(j.trim())C.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:j})})},`${Q0}-text-${O0}`)),j="";C.push(F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(LG,{widget:$0.widget,onAction:U})},`${Q0}-widget-${O0}`))}else if($0.type==="widget_pending"&&$0.pendingType){if(j.trim())C.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:j})})},`${Q0}-text-${O0}`)),j="";C.push(F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(oB,{type:$0.pendingType})},`${Q0}-pending-${O0}`))}}),j.trim())C.push(F0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:F0.jsx("div",{className:"apteva-message-content-assistant",children:F0.jsx(I7,{content:j})})},`${Q0}-text-final`));return C},u=()=>{if(!_||_.length===0)return null;let s=[];return _.forEach((Q0,n)=>{if(Q0.type==="text"&&Q0.content){let C=D(Q0.content,`seg-${n}`);if(Array.isArray(C))s.push(...C);else s.push(C)}else if(Q0.type==="tool")s.push(F0.jsx("div",{className:"apteva-tool-call-standalone",children:F0.jsx(Kk,{name:Q0.name,status:Q0.status||(Q0.result!==void 0?"completed":"running"),isReceiving:Q0.isReceiving,inputLength:Q0.inputLength,streamOutput:Q0.streamOutput})},Q0.id))}),s};if(!G&&(_&&_.length>0))return F0.jsxs("div",{className:"apteva-message-segmented",children:[u(),H.widgets&&H.widgets.length>0&&F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(KG,{widgets:H.widgets,onAction:U,layout:"stack"})}),F0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:H.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let v0=A();if(!G&&B&&v0)return F0.jsxs("div",{className:"apteva-message-segmented",children:[v0,H.widgets&&H.widgets.length>0&&F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(KG,{widgets:H.widgets,onAction:U,layout:"stack"})}),F0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:H.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(G&&d)return F0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[E(),H.content&&F0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:F0.jsx("div",{className:"apteva-message-content-user",children:F0.jsx("div",{className:"apteva-message-text",children:H.content})})}),F0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:H.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return F0.jsxs("div",{className:o1("apteva-message-bubble",G?"apteva-message-user":"apteva-message-assistant"),children:[F0.jsx("div",{className:G?"apteva-message-content-user":"apteva-message-content-assistant",children:r()}),H.widgets&&H.widgets.length>0&&F0.jsx("div",{className:"apteva-widget-standalone",children:F0.jsx(KG,{widgets:H.widgets,onAction:U,layout:"stack"})}),F0.jsx("div",{className:o1("apteva-message-timestamp",G?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:H.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var pB=()=>t0.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t0.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"})}),UG=()=>t0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function qk({title:H,subtitle:U,icon:B,prompts:L,variant:G="centered",chatVariant:_="default",onPromptClick:R}){let W=(L||[]).map((P)=>typeof P==="string"?{text:P}:P),I=W.length>0,w=H||U||B;if(!w&&!I)return t0.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:t0.jsxs("div",{className:"text-center space-y-2",children:[t0.jsx("div",{className:"flex justify-center",children:t0.jsx(pB,{})}),t0.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(G==="minimal")return t0.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[w&&t0.jsxs("div",{className:"mb-4",children:[H&&t0.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:H}),U&&t0.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:U})]}),I&&t0.jsx("div",{className:"flex-1 space-y-2",children:W.map((P,A)=>t0.jsx("button",{onClick:()=>R(P.text),className:o1("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:t0.jsxs("div",{className:"flex items-center gap-3",children:[t0.jsx("div",{className:"flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||t0.jsx(UG,{})}),t0.jsxs("div",{className:"flex-1 min-w-0",children:[t0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:P.text}),P.description&&t0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:P.description})]})]})},A))})]});return t0.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[t0.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[t0.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:B||t0.jsx(pB,{})}),H&&t0.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:H}),U&&t0.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:U})]}),I&&t0.jsxs("div",{className:"w-full max-w-2xl",children:[t0.jsx("div",{className:"sm:hidden space-y-2",children:W.map((P,A)=>t0.jsx("button",{onClick:()=>R(P.text),className:o1("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:t0.jsxs("div",{className:"flex items-center gap-3",children:[t0.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||t0.jsx(UG,{})}),t0.jsxs("div",{className:"flex-1 min-w-0",children:[t0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:P.text}),P.description&&t0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:P.description})]}),t0.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:t0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},A))}),t0.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:W.map((P,A)=>t0.jsx("button",{onClick:()=>R(P.text),className:o1("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:t0.jsxs("div",{className:"flex items-start gap-3",children:[t0.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||t0.jsx(UG,{})}),t0.jsxs("div",{className:"flex-1 min-w-0",children:[t0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:P.text}),P.description&&t0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:P.description})]})]})},A))})]})]})}function Bk({messages:H,onAction:U,welcomeTitle:B,welcomeSubtitle:L,welcomeIcon:G,suggestedPrompts:_,welcomeVariant:R,chatVariant:W,onPromptClick:I,enableWidgets:w,onWidgetRender:P}){let A=H3.useRef(null),F=H3.useRef(!0),d=H3.useRef(0),E=()=>{if(A.current){let{scrollTop:r,scrollHeight:D,clientHeight:u}=A.current;F.current=D-r-u<100}};return H3.useEffect(()=>{if(A.current&&F.current){let r=A.current.scrollHeight;if(r!==d.current)A.current.scrollTop=r,d.current=r}},[H]),YQ.jsx("div",{ref:A,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:E,children:H.length===0?YQ.jsx(qk,{title:B,subtitle:L,icon:G,prompts:_,variant:R,chatVariant:W,onPromptClick:I||(()=>{})}):H.map((r)=>YQ.jsx("div",{className:r.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:YQ.jsx(Uk,{message:r,onAction:U,enableWidgets:w,onWidgetRender:P})},r.id))})}function Ok({onSendMessage:H,placeholder:U="Type a message...",disabled:B=!1,isLoading:L=!1,onStop:G,onFileUpload:_,onSwitchMode:R}){let[W,I]=e5.useState(""),[w,P]=e5.useState(!1),[A,F]=e5.useState([]),[d,E]=e5.useState(null),[r,D]=e5.useState(!1),u=e5.useRef(null),v0=e5.useRef(null),s=e5.useRef(null),Q0=(L0)=>{if(L0.key==="Enter"&&!L0.shiftKey)L0.preventDefault(),n()},n=()=>{let L0=W.trim(),g0=A.length>0;if((L0||g0)&&!B){let Z0=A.map((k0)=>k0.file);if(H(W.trim(),Z0.length>0?Z0:void 0),I(""),F([]),E(null),D(!1),u.current)u.current.style.height="auto"}},C=(L0)=>{I(L0.target.value),L0.target.style.height="auto";let g0=L0.target.scrollHeight;L0.target.style.height=`${g0}px`;let Z0=L0.target.value.includes(`
|
|
189
|
+
`),a0=g0>36;if(!r&&(Z0||a0))D(!0);else if(r&&!Z0&&!a0&&L0.target.value.length<20)D(!1)},j=(L0)=>{if(L0.target.files&&L0.target.files.length>0){let g0=Array.from(L0.target.files),Z0=[],k0=[];if(g0.forEach((a0)=>{let C0=rB(a0);if(C0.valid){let S0={file:a0};if(a0.type.startsWith("image/"))S0.preview=URL.createObjectURL(a0);Z0.push(S0)}else k0.push(C0.error||"Invalid file")}),Z0.length>0)F((a0)=>[...a0,...Z0]);if(k0.length>0)E(k0.join(", ")),setTimeout(()=>E(null),5000);_?.(L0.target.files),P(!1),L0.target.value=""}},$0=(L0)=>{F((g0)=>{let Z0=g0[L0];if(Z0.preview)URL.revokeObjectURL(Z0.preview);return g0.filter((k0,a0)=>a0!==L0)})},O0=(L0)=>{if(L0.startsWith("image/"))return o0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.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(L0==="application/pdf")return o0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.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 o0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.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 o0.jsxs("div",{className:"px-4 py-3 relative",children:[d&&o0.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:o0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[o0.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),o0.jsx("span",{children:d})]})}),A.length>0&&o0.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:A.map((L0,g0)=>o0.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:[L0.preview?o0.jsx("img",{src:L0.preview,alt:L0.file.name,className:"w-8 h-8 object-cover rounded"}):o0.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:O0(L0.file.type)}),o0.jsxs("div",{className:"flex flex-col min-w-0",children:[o0.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:L0.file.name}),o0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:yZ(L0.file.size)})]}),o0.jsx("button",{onClick:()=>$0(g0),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:o0.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},g0))}),o0.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:r?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[o0.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[o0.jsx("button",{ref:s,onClick:()=>P(!w),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:o0.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),w&&o0.jsxs(o0.Fragment,{children:[o0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>P(!1)}),o0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:s.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(s.current?.getBoundingClientRect().top??0)+8},children:[o0.jsxs("button",{onClick:()=>{v0.current?.click(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[o0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o0.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)"})}),o0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),R&&o0.jsxs("button",{onClick:()=>{R(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[o0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),o0.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),o0.jsx("textarea",{ref:u,value:W,onChange:C,onKeyDown:Q0,placeholder:U,disabled:B,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}),o0.jsx("div",{className:"self-end",style:{gridArea:"send"},children:L&&G?o0.jsx("button",{onClick:G,className:"apteva-composer-stop-btn",title:"Stop generation",children:o0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):o0.jsx("button",{onClick:n,disabled:!W.trim()&&A.length===0||B,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:o0.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o0.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),o0.jsx("input",{ref:v0,type:"file",multiple:!0,onChange:j,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function Lk({onExecute:H,state:U,response:B,error:L,plan:G,streamedContent:_,toolName:R,onApprove:W,onReject:I,onReset:w,onStop:P,onExpand:A,placeholder:F="Enter your command...",disabled:d=!1}){let[E,r]=f7.useState(""),[D,u]=f7.useState([]),[v0,s]=f7.useState(null),[Q0,n]=f7.useState(!1),C=f7.useRef(null),j=f7.useRef(null),$0=f7.useRef(null),O0=()=>{let i0=E.trim(),Y1=D.length>0;if((i0||Y1)&&!d&&U==="idle"){let C1=D.map((v4)=>v4.file);H(E.trim(),C1.length>0?C1:void 0),r(""),u([])}},L0=(i0)=>{if(i0.key==="Enter"&&!i0.shiftKey)i0.preventDefault(),O0()},g0=()=>{w?.(),C.current?.focus()},Z0=(i0)=>{if(r(i0),C.current)C.current.style.height="auto",C.current.style.height=`${Math.min(C.current.scrollHeight,120)}px`},k0=(i0)=>{if(i0.target.files&&i0.target.files.length>0){let Y1=Array.from(i0.target.files),C1=[],v4=[];if(Y1.forEach((Y4)=>{let Q4=rB(Y4);if(Q4.valid){let W4={file:Y4};if(Y4.type.startsWith("image/"))W4.preview=URL.createObjectURL(Y4);C1.push(W4)}else v4.push(Q4.error||"Invalid file")}),C1.length>0)u((Y4)=>[...Y4,...C1]);if(v4.length>0)s(v4.join(", ")),setTimeout(()=>s(null),5000);n(!1),i0.target.value=""}},a0=(i0)=>{u((Y1)=>{let C1=Y1[i0];if(C1.preview)URL.revokeObjectURL(C1.preview);return Y1.filter((v4,Y4)=>Y4!==i0)})},C0=(i0)=>{if(i0.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(i0==="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"})})},S0=()=>{if(U==="loading"){if(R)return{text:R,isToolCall:!0};if(_)return{text:_,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(U==="success"&&B)return{text:B,isToolCall:!1};if(U==="error"&&L)return{text:L,isToolCall:!1};if(U==="plan-pending"&&G)return{text:G,isToolCall:!1};return{text:"",isToolCall:!1}},_1=U!=="idle",{text:H1,isToolCall:P1}=S0();return I0.jsxs("div",{className:"w-full relative",children:[v0&&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:v0})]})}),I0.jsxs("div",{className:o1("apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",U==="idle"&&"border-neutral-200 dark:border-neutral-700",U==="loading"&&"border-blue-400 dark:border-blue-500",U==="plan-pending"&&"border-amber-400 dark:border-amber-500",U==="success"&&"border-green-400 dark:border-green-500",U==="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:[U==="idle"&&I0.jsxs("div",{className:"relative",children:[I0.jsx("button",{ref:$0,onClick:()=>n(!Q0),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"})})}),Q0&&I0.jsxs(I0.Fragment,{children:[I0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>n(!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:$0.current?.getBoundingClientRect().left??0,top:($0.current?.getBoundingClientRect().bottom??0)+8},children:[I0.jsxs("button",{onClick:()=>{j.current?.click(),n(!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"})]}),A&&I0.jsxs("button",{onClick:()=>{A(),n(!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"})]})]})]})]}),U==="loading"&&!R&&I0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),U==="loading"&&R&&I0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),D.length>0&&U==="idle"&&I0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:D.map((i0,Y1)=>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:i0.file.name,children:[i0.preview?I0.jsx("img",{src:i0.preview,alt:i0.file.name,className:"w-6 h-6 object-cover"}):I0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:C0(i0.file.type)}),I0.jsx("button",{onClick:()=>a0(Y1),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"})})})]},Y1))}),U==="idle"?I0.jsx("textarea",{ref:C,value:E,onChange:(i0)=>Z0(i0.target.value),onKeyDown:L0,placeholder:D.length>0?"Add a message...":F,disabled:d,rows:1,className:o1("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:o1("flex-1 text-sm py-1 truncate flex items-center gap-2",U==="loading"&&!P1&&"!text-neutral-600 dark:!text-neutral-400",U==="loading"&&P1&&"!text-blue-600 dark:!text-blue-400",U==="success"&&"!text-neutral-900 dark:!text-neutral-100",U==="error"&&"!text-red-600 dark:!text-red-400",U==="plan-pending"&&"!text-amber-700 dark:!text-amber-300"),children:P1?I0.jsxs(I0.Fragment,{children:[I0.jsx("span",{className:"font-mono",children:H1}),I0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):H1}),I0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:U==="plan-pending"?I0.jsxs("div",{className:"flex items-center gap-1",children:[I0.jsx("button",{onClick:W,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:I,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:[U==="loading"&&P&&I0.jsx("button",{onClick:P,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"})})}),(U==="success"||U==="error")&&I0.jsx("button",{onClick:g0,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"})})}),U==="idle"&&I0.jsx("button",{onClick:O0,disabled:!E.trim()&&D.length===0||d,className:o1("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",E.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:j,type:"file",multiple:!0,onChange:k0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var Nk="http://91.99.200.48:3000/agents",vk="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",Wk=class{constructor(){DM(this,"config"),this.config={apiUrl:Nk,apiKey:vk}}configure(H){if(H.apiUrl)this.config.apiUrl=H.apiUrl;if(H.apiKey)this.config.apiKey=H.apiKey}getConfig(){return{...this.config}}async chat(H){try{console.log("[AptevaClient] Chat request:",{agent_id:H.agent_id,message:typeof H.message==="string"?H.message.substring(0,100)+"...":"[multi-part message]",system:H.system,stream:H.stream});let U=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify(H)});if(!U.ok){let L=await U.json().catch(()=>({error:"Request failed"}));throw Error(L.error||`Request failed with status ${U.status}`)}let B=await U.json();return{message:B.response||B.message||"",thread_id:B.thread_id,widgets:B.widgets}}catch(U){throw console.error("Chat API error:",U),U}}async chatStream(H,U,B,L){try{console.log("[AptevaClient] Chat stream request:",{agent_id:H.agent_id,message:typeof H.message==="string"?H.message.substring(0,100)+"...":"[multi-part message]",system:H.system,stream:H.stream});let G=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({...H,stream:!0})});if(!G.ok){let w=await G.json().catch(()=>({error:"Request failed"}));throw Error(w.error||`Request failed with status ${G.status}`)}let _=G.body?.getReader();if(!_)throw Error("Response body is not readable");let R=new TextDecoder,W="",I="";while(!0){let{done:w,value:P}=await _.read();if(w)break;W+=R.decode(P,{stream:!0});let A=W.split(`
|
|
190
|
+
`);W=A.pop()||"";for(let F of A){if(!F.trim()||F.startsWith(":"))continue;if(F.startsWith("data: ")){let d=F.slice(6);if(d==="[DONE]"){B?.(I);return}try{let E=JSON.parse(d);if(E.thread_id)I=E.thread_id;U(E)}catch(E){console.warn("[AptevaClient] Failed to parse SSE data:",d)}}}}B?.(I)}catch(G){let _=G instanceof Error?G:Error("Unknown error");throw L?.(_),_}}async createThread(H,U){let B=await fetch(`${this.config.apiUrl}/agents/${H}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:U})});if(!B.ok){let G=await B.json().catch(()=>({error:"Request failed"}));throw Error(G.error||`Request failed with status ${B.status}`)}return(await B.json()).thread_id}async getThreadMessages(H){let U=await fetch(`${this.config.apiUrl}/threads/${H}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!U.ok){let L=await U.json().catch(()=>({error:"Request failed"}));throw Error(L.error||`Request failed with status ${U.status}`)}return(await U.json()).messages}async cancelRequest(H,U){try{let B=await fetch(`${this.config.apiUrl}/agents/${H}/requests/${U}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!B.ok){let L=await B.json().catch(()=>({error:"Cancel request failed"}));throw Error(L.error||`Cancel request failed with status ${B.status}`)}}catch(B){throw console.error("[AptevaClient] Cancel request error:",B),B}}},J3=new Wk,z2=h1.forwardRef(function({agentId:U,threadId:B,initialMessages:L=[],context:G,apiUrl:_,apiKey:R,useMock:W=!1,initialMode:I="chat",showModeToggle:w=!1,onModeChange:P,commandVariant:A="default",planMode:F=!1,onPlanModeChange:d,enableStreaming:E=!0,showProgress:r=!0,loadingText:D="Processing...",welcomeTitle:u,welcomeSubtitle:v0,welcomeIcon:s,suggestedPrompts:Q0,welcomeVariant:n,onThreadChange:C,onMessageSent:j,onAction:$0,onFileUpload:O0,onComplete:L0,onError:g0,onToolCall:Z0,onToolResult:k0,variant:a0="default",placeholder:C0,showHeader:S0=!0,headerTitle:_1="Chat",enableWidgets:H1=!1,availableWidgets:P1,compactWidgetContext:i0=!1,onWidgetRender:Y1,className:C1},v4){let[Y4,Q4]=h1.useState(L),[W4,a1]=h1.useState(!1),[i1,$4]=h1.useState(B||null),[D4,X4]=h1.useState(I),[E4,u4]=h1.useState(null),[x1,s0]=h1.useState("idle"),[T4,w4]=h1.useState(null),[G4,O4]=h1.useState(null),[B5,r1]=h1.useState(0),[z6,n1]=h1.useState(""),[Q6,Z4]=h1.useState(""),[K4,o4]=h1.useState(null),[v6,R4]=h1.useState(null),[h4,K0]=h1.useState(""),[E0,y0]=h1.useState(""),[N1,S1]=h1.useState(F),[L4,l1]=h1.useState(!1),I4=h1.useRef(null),z1=h1.useRef(null);h1.useImperativeHandle(v4,()=>({sendMessage:async(K1)=>{if(z1.current)await z1.current(K1)},sendSystemMessage:async(K1)=>{if(z1.current)await z1.current(K1,void 0,!0)},getMessages:()=>Y4,clearMessages:()=>Q4([])}),[Y4]);let e0=h1.useMemo(()=>{if(!H1)return G;let K1=i0?rM(P1):pM(P1);return G?`${G}
|
|
191
|
+
${K1}`:K1},[G,H1,P1,i0]);h1.useEffect(()=>{if(_||R)J3.configure({..._&&{apiUrl:_},...R&&{apiKey:R}})},[_,R]),h1.useEffect(()=>{if(B)C?.(B)},[B,C]),h1.useEffect(()=>{S1(F)},[F]),h1.useEffect(()=>{let K1=(V1)=>{let j1=V1.target;if(L4&&!j1.closest(".settings-menu-container"))l1(!1)};return document.addEventListener("mousedown",K1),()=>document.removeEventListener("mousedown",K1)},[L4]);let A6=(K1)=>{if(X4(K1),P?.(K1),K1==="command")s0("idle"),w4(null),O4(null)},p4=D4==="chat"?"Type a message...":"Enter your command...",w6=async(K1,V1,j1)=>{let F1=V1&&V1.length>0,M=F1?V1.map((i)=>({name:i.name,type:i.type,size:i.size,preview:i.type.startsWith("image/")?URL.createObjectURL(i):void 0})):[];if(!j1){let i={id:`msg-${Date.now()}`,role:"user",content:K1,timestamp:new Date,metadata:F1?{attachments:M}:void 0};Q4((b0)=>[...b0,i]),j?.(i)}a1(!0);try{let i=await xB(K1,V1);if(W){let b0=await EM(1000);Q4((v)=>[...v,b0])}else{let b0=[],v="",h=[],p=i1,H0={},q0={},f0=`msg-${Date.now()}`,M0=()=>{let t=[...b0];if(v){let G0=t[t.length-1];if(G0&&G0.type==="text")G0.content=v;else t.push({type:"text",content:v})}Q4((G0)=>{let V0=G0[G0.length-1];if(V0&&V0.role==="assistant")return[...G0.slice(0,-1),{...V0,content:v,widgets:h.length>0?h:void 0,metadata:{...V0.metadata,content_segments:t,isStreaming:!0}}];else return[...G0,{id:f0,role:"assistant",content:v,widgets:h.length>0?h:void 0,timestamp:new Date,metadata:{content_segments:t,isStreaming:!0}}]})};await J3.chatStream({agent_id:U,message:i,stream:!0,...i1&&{thread_id:i1},...e0&&{system:e0}},(t)=>{switch(t.type){case"thread_id":if(t.thread_id){if(p=t.thread_id,!i1)$4(t.thread_id),C?.(t.thread_id)}break;case"request_id":if(t.request_id)R4(t.request_id);break;case"content":case"token":if(t.content)v+=t.content,M0();break;case"tool_call":if(t.tool_id&&t.tool_name){let G0=t.tool_display_name||t.tool_name;if(v)b0.push({type:"text",content:v}),v="";b0.push({type:"tool",id:t.tool_id,name:G0,status:"preparing"}),H0[t.tool_id]="",u4(G0),Z0?.(t.tool_name,t.tool_id),M0()}break;case"tool_input_delta":if(t.tool_id&&t.content){let G0=t.tool_id;if(H0[G0]===void 0)H0[G0]="";H0[G0]+=t.content;let V0=b0.find((U1)=>U1.type==="tool"&&U1.id===G0);if(V0){if(V0.isReceiving=!0,V0.inputLength=H0[G0].length,M0(),q0[G0])clearTimeout(q0[G0]);q0[G0]=setTimeout(()=>{if(V0.status==="preparing")V0.isReceiving=!1,M0()},150)}}break;case"tool_use":if(t.tool_id){let G0=b0.find((V0)=>V0.type==="tool"&&V0.id===t.tool_id);if(G0&&G0.status==="preparing")G0.status="running",G0.isReceiving=!1,M0()}break;case"tool_stream":if(t.tool_id){let G0=b0.find((V0)=>V0.type==="tool"&&V0.id===t.tool_id);if(G0){if(t.event==="chunk"&&t.content){if(G0.pendingReset)G0.streamOutput="",G0.pendingReset=!1;G0.streamOutput=(G0.streamOutput||"")+t.content,M0()}else if(t.event==="log"||t.event==="progress")G0.pendingReset=!0}}break;case"tool_result":if(t.tool_id){let G0=b0.find((V0)=>V0.type==="tool"&&V0.id===t.tool_id);if(G0)G0.result=t.content,G0.status="completed",G0.isReceiving=!1,k0?.(G0.name,t.content);u4(null),M0()}break;case"widget":if(t.widget)h.push(t.widget),M0();break;case"error":throw Error(t.message||"Stream error")}},(t)=>{if(v){let G0=b0[b0.length-1];if(G0&&G0.type==="text")G0.content=v;else b0.push({type:"text",content:v})}if(Q4((G0)=>{let V0=G0[G0.length-1];if(V0&&V0.role==="assistant")return[...G0.slice(0,-1),{...V0,content:v||"Response received",widgets:h.length>0?h:void 0,metadata:{thread_id:t,content_segments:b0,isStreaming:!1}}];return G0}),t&&t!==i1)$4(t),C?.(t);a1(!1),R4(null),u4(null)},(t)=>{let G0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${t.message}`,timestamp:new Date,metadata:{error:!0}};Q4((V0)=>{let U1=V0[V0.length-1];if(U1&&U1.id.includes("streaming"))return[...V0.slice(0,-1),G0];return[...V0,G0]}),a1(!1),R4(null),u4(null),g0?.(t)})}}catch(i){let b0={id:`msg-${Date.now()}-error`,role:"assistant",content:i instanceof Error?`Error: ${i.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};Q4((v)=>[...v,b0]),g0?.(i instanceof Error?i:Error("Unknown error"))}finally{a1(!1)}};z1.current=w6;let u5=async(K1,V1)=>{let j1=K1||z6;if(!j1.trim()&&(!V1||V1.length===0)){O4(Error("Please enter a command")),s0("error");return}if(N1&&x1!=="plan-pending"){if(s0("loading"),O4(null),n1(""),W)setTimeout(()=>{let F1=`1. Analyze the request: "${j1}"
|
|
192
|
+
2. Process the data
|
|
193
|
+
3. Generate response
|
|
194
|
+
4. Return results`;K0(F1),y0(j1),s0("plan-pending")},800);else try{let M=e0?`${e0}
|
|
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.",i=await J3.chat({agent_id:U,message:j1,stream:!1,system:M});K0(i.message),y0(j1),s0("plan-pending")}catch(F1){let M=F1 instanceof Error?F1:Error("Failed to generate plan");O4(M),s0("error"),g0?.(M)}return}s0("loading"),O4(null),r1(0),Z4(""),n1("");try{if(W)if(E){let F1="";gM(j1,(M)=>{if(M.type==="token"&&M.content){F1+=M.content,Z4(F1);let i=Math.min(Math.round(F1.length/10),90);r1(i)}},(M)=>{let i={success:!0,data:{summary:F1,thread_id:M},message:F1||"Command executed successfully"};w4(i),s0("success"),r1(100),L0?.(i)},(M)=>{O4(M),s0("error"),g0?.(M)})}else{await new Promise((M)=>setTimeout(M,1500));let F1={success:!0,data:{summary:`Executed: ${j1}`},message:"Command executed successfully"};w4(F1),s0("success"),r1(100),L0?.(F1)}else{let M=e0?`${e0}
|
|
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.`,i=V1&&V1.length>0?await xB(j1,V1):j1;if(E){let b0="",v="";await J3.chatStream({agent_id:U,message:i,stream:!0,...i1&&{thread_id:i1},system:M},(h)=>{if((h.type==="token"||h.type==="content")&&h.content){b0+=h.content,Z4(b0),o4(null);let p=Math.min(Math.round(b0.length/10),90);r1(p)}else if(h.type==="tool_call"&&h.tool_name){let p=h.tool_display_name||h.tool_name;v=h.tool_name,o4(p),Z0?.(h.tool_name,h.tool_id||""),b0="",Z4("")}else if(h.type==="tool_result")k0?.(v,h.content),o4(null);else if(h.type==="thread_id"&&h.thread_id){if(!i1)$4(h.thread_id),C?.(h.thread_id)}else if(h.type==="request_id"&&h.request_id)R4(h.request_id)},(h)=>{let p={success:!0,data:{summary:b0,thread_id:h},message:b0||"Command executed successfully"};w4(p),s0("success"),r1(100),R4(null),L0?.(p)},(h)=>{O4(h),s0("error"),R4(null),g0?.(h)})}else{let b0=await J3.chat({agent_id:U,message:i,stream:!1,...i1&&{thread_id:i1},system:M}),v={success:!0,data:{summary:b0.message,thread_id:b0.thread_id},widgets:b0.widgets,message:b0.message};w4(v),s0("success"),r1(100),L0?.(v)}}}catch(F1){let M=F1 instanceof Error?F1:Error("Unknown error");O4(M),s0("error"),g0?.(M)}},O5=()=>{s0("idle"),w4(null),O4(null),r1(0),n1(""),K0(""),y0(""),Z4(""),o4(null)},m5=()=>{let K1=h4;K0(""),y0("");let V1=`Execute this plan now:
|
|
199
|
+
|
|
200
|
+
${K1}`;u5(V1)},z5=()=>{n1(E0),K0(""),y0(""),s0("idle")},W6=async()=>{if(v6&&U)try{await J3.cancelRequest(U,v6)}catch(K1){console.error("Failed to cancel request:",K1)}if(a1(!1),x1==="loading")s0("idle"),Z4(""),o4(null),r1(0);R4(null)},L5=A==="compact";return E6.jsxs("div",{className:o1("apteva-chat flex flex-col h-full",a0!=="default"&&`apteva-chat-${a0}`,C1),children:[S0&&D4==="chat"&&E6.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:E6.jsxs("div",{children:[E6.jsx("div",{className:"apteva-chat-title",children:_1}),E6.jsx("div",{className:o1("apteva-chat-status",W4?E4?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:W4?E4?`Using ${E4}...`:"Thinking...":"Ready"})]})}),D4==="chat"&&E6.jsxs(E6.Fragment,{children:[E6.jsx(Bk,{messages:Y4,onAction:$0,welcomeTitle:u,welcomeSubtitle:v0,welcomeIcon:s,suggestedPrompts:Q0,welcomeVariant:n,chatVariant:a0,onPromptClick:(K1)=>w6(K1),enableWidgets:H1,onWidgetRender:Y1}),E6.jsx(Ok,{onSendMessage:w6,placeholder:C0||p4,disabled:W4,isLoading:W4,onStop:W6,onFileUpload:O0,onSwitchMode:w?()=>A6("command"):void 0})]}),D4==="command"&&E6.jsx("div",{className:"w-full",children:E6.jsx(Lk,{onExecute:(K1,V1)=>{n1(K1),u5(K1,V1)},state:x1,response:T4?.data?.summary||T4?.message,error:G4?.message,plan:h4,streamedContent:Q6,toolName:K4,onApprove:m5,onReject:z5,onReset:O5,onStop:W6,onExpand:w?()=>A6("chat"):void 0,placeholder:C0||"Enter your command..."})}),E6.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 c0=J0(L1(),1),Fk=[{key:"memory",label:"Memory",description:"Persistent recall",icon:ib},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:U5},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:xb},{key:"operator",label:"Operator",description:"Browser automation",icon:jb},{key:"mcp",label:"MCP",description:"External tools/services",icon:q5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:ob}];function dZ({agent:H,providers:U,onClose:B,onStartAgent:L,onUpdateAgent:G,onDeleteAgent:_}){let[R,W]=b7.useState("chat");return c0.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[c0.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center justify-between px-4",children:[c0.jsxDEV("div",{className:"flex gap-1",children:[c0.jsxDEV(G2,{active:R==="chat",onClick:()=>W("chat"),children:"Chat"},void 0,!1,void 0,this),c0.jsxDEV(G2,{active:R==="settings",onClick:()=>W("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("button",{onClick:B,className:"text-[#666] hover:text-[#e0e0e0] transition p-2",children:c0.jsxDEV(z3,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[R==="chat"&&c0.jsxDEV(Mk,{agent:H,onStartAgent:L},void 0,!1,void 0,this),R==="settings"&&c0.jsxDEV(kk,{agent:H,providers:U,onUpdateAgent:G,onDeleteAgent:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function G2({active:H,onClick:U,children:B}){return c0.jsxDEV("button",{onClick:U,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${H?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:B},void 0,!1,void 0,this)}function Mk({agent:H,onStartAgent:U}){if(H.status==="running"&&H.port)return c0.jsxDEV(z2,{agentId:"default",apiUrl:`/api/agents/${H.id}`,placeholder:"Message this agent...",context:H.systemPrompt,variant:"terminal",headerTitle:H.name},void 0,!1,void 0,this);return c0.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:c0.jsxDEV("div",{className:"text-center",children:[c0.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),c0.jsxDEV("button",{onClick:U,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 kk({agent:H,providers:U,onUpdateAgent:B,onDeleteAgent:L}){let[G,_]=b7.useState({name:H.name,provider:H.provider,model:H.model,systemPrompt:H.systemPrompt,features:{...H.features},mcpServers:[...H.mcpServers||[]]}),[R,W]=b7.useState(!1),[I,w]=b7.useState(!1),[P,A]=b7.useState(null),[F,d]=b7.useState([]);b7.useEffect(()=>{(async()=>{try{let $0=await(await fetch("/api/mcp/servers")).json();d($0.servers||[])}catch(j){console.error("Failed to fetch MCP servers:",j)}})()},[]),b7.useEffect(()=>{_({name:H.name,provider:H.provider,model:H.model,systemPrompt:H.systemPrompt,features:{...H.features},mcpServers:[...H.mcpServers||[]]}),A(null)},[H.id]);let E=U.find((C)=>C.id===G.provider),r=U.filter((C)=>C.configured).map((C)=>({value:C.id,label:C.name})),D=E?.models.map((C)=>({value:C.value,label:C.label,recommended:C.recommended}))||[],u=(C)=>{let j=U.find((O0)=>O0.id===C),$0=j?.models.find((O0)=>O0.recommended)?.value||j?.models[0]?.value||"";_((O0)=>({...O0,provider:C,model:$0}))},v0=(C)=>{_((j)=>({...j,features:{...j.features,[C]:!j.features[C]}}))},s=(C)=>{_((j)=>({...j,mcpServers:j.mcpServers.includes(C)?j.mcpServers.filter(($0)=>$0!==C):[...j.mcpServers,C]}))},Q0=async()=>{W(!0),A(null);let C=await B(G);if(W(!1),C.error)A({type:"error",text:C.error});else A({type:"success",text:"Settings saved"}),setTimeout(()=>A(null),2000)},n=G.name!==H.name||G.provider!==H.provider||G.model!==H.model||G.systemPrompt!==H.systemPrompt||JSON.stringify(G.features)!==JSON.stringify(H.features)||JSON.stringify(G.mcpServers.sort())!==JSON.stringify((H.mcpServers||[]).sort());return c0.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:c0.jsxDEV("div",{className:"space-y-4",children:[c0.jsxDEV(G3,{label:"Name",children:c0.jsxDEV("input",{type:"text",value:G.name,onChange:(C)=>_((j)=>({...j,name:C.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),c0.jsxDEV(G3,{label:"Provider",children:c0.jsxDEV(K5,{value:G.provider,options:r,onChange:u},void 0,!1,void 0,this)},void 0,!1,void 0,this),c0.jsxDEV(G3,{label:"Model",children:c0.jsxDEV(K5,{value:G.model,options:D,onChange:(C)=>_((j)=>({...j,model:C}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),c0.jsxDEV(G3,{label:"System Prompt",children:c0.jsxDEV("textarea",{value:G.systemPrompt,onChange:(C)=>_((j)=>({...j,systemPrompt:C.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),c0.jsxDEV(G3,{label:"Features",children:c0.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:Fk.map(({key:C,label:j,description:$0,icon:O0})=>c0.jsxDEV("button",{type:"button",onClick:()=>v0(C),className:`flex items-center gap-3 p-3 rounded border text-left transition ${G.features[C]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[c0.jsxDEV(O0,{className:`w-5 h-5 flex-shrink-0 ${G.features[C]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),c0.jsxDEV("div",{className:"flex-1 min-w-0",children:[c0.jsxDEV("div",{className:`text-sm font-medium ${G.features[C]?"text-[#f97316]":""}`,children:j},void 0,!1,void 0,this),c0.jsxDEV("div",{className:"text-xs text-[#666]",children:$0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},C,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),G.features.mcp&&c0.jsxDEV(G3,{label:"MCP Servers",children:F.length===0?c0.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):c0.jsxDEV("div",{className:"space-y-2",children:[F.map((C)=>c0.jsxDEV("button",{type:"button",onClick:()=>s(C.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${G.mcpServers.includes(C.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[c0.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${C.status==="running"?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),c0.jsxDEV("div",{className:"flex-1 min-w-0",children:[c0.jsxDEV("div",{className:`text-sm font-medium ${G.mcpServers.includes(C.id)?"text-[#f97316]":""}`,children:C.name},void 0,!1,void 0,this),c0.jsxDEV("div",{className:"text-xs text-[#666]",children:[C.type," • ",C.package||C.command||"custom",C.status==="running"&&C.port&&` • :${C.port}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),c0.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${C.status==="running"?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:C.status},void 0,!1,void 0,this)]},C.id,!0,void 0,this)),c0.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Only running servers will be connected to the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),P&&c0.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${P.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:P.text},void 0,!1,void 0,this),c0.jsxDEV("button",{onClick:Q0,disabled:!n||R||!G.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:R?"Saving...":"Save Changes"},void 0,!1,void 0,this),H.status==="running"&&n&&c0.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),c0.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[c0.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),I?c0.jsxDEV("div",{className:"flex gap-2",children:[c0.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),c0.jsxDEV("button",{onClick:L,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):c0.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 G3({label:H,children:U}){return c0.jsxDEV("div",{children:[c0.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:H},void 0,!1,void 0,this),U]},void 0,!0,void 0,this)}var b5=J0(L1(),1);function aZ({agents:H,loading:U,selectedAgent:B,providers:L,onSelectAgent:G,onCloseAgent:_,onToggleAgent:R,onDeleteAgent:W,onUpdateAgent:I}){return b5.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[b5.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:U?b5.jsxDEV(e8,{message:"Loading agents..."},void 0,!1,void 0,this):H.length===0?b5.jsxDEV(Ak,{},void 0,!1,void 0,this):b5.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:H.map((w)=>b5.jsxDEV(mZ,{agent:w,selected:B?.id===w.id,onSelect:()=>G(w),onToggle:(P)=>R(w,P),onDelete:(P)=>W(w.id,P)},w.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),B&&b5.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:_},void 0,!1,void 0,this),B&&b5.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-[600px] z-20",children:b5.jsxDEV(dZ,{agent:B,providers:L,onClose:_,onStartAgent:(w)=>R(B,w),onUpdateAgent:(w)=>I(B.id,w),onDeleteAgent:()=>W(B.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ak(){return b5.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[b5.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),b5.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)}var GQ=J0(y1(),1),W1=J0(L1(),1);function iZ({agents:H,loading:U,runningCount:B,configuredProviders:L,onNavigate:G,onSelectAgent:_}){let[R,W]=GQ.useState(null),[I,w]=GQ.useState([]);GQ.useEffect(()=>{P();let F=setInterval(P,1e4);return()=>clearInterval(F)},[]);let P=async()=>{try{let[F,d]=await Promise.all([fetch("/api/dashboard"),fetch("/api/tasks?status=all")]);if(F.ok){let E=await F.json();W(E)}if(d.ok){let E=await d.json();w((E.tasks||[]).slice(0,5))}}catch(F){console.error("Failed to fetch dashboard data:",F)}},A=R?.tasks||{total:0,pending:0,running:0,completed:0};return W1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[W1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[W1.jsxDEV(lZ,{label:"Agents",value:H.length,subValue:`${B} running`},void 0,!1,void 0,this),W1.jsxDEV(lZ,{label:"Tasks",value:A.total,subValue:`${A.pending} pending`},void 0,!1,void 0,this),W1.jsxDEV(lZ,{label:"Completed",value:A.completed,color:"text-green-400"},void 0,!1,void 0,this),W1.jsxDEV(lZ,{label:"Providers",value:L.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[W1.jsxDEV(K2,{title:"Agents",actionLabel:"View All",onAction:()=>G("agents"),children:U?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):H.length===0?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):W1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:H.slice(0,5).map((F)=>W1.jsxDEV("div",{onClick:()=>_(F),className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[W1.jsxDEV("div",{children:[W1.jsxDEV("p",{className:"font-medium",children:F.name},void 0,!1,void 0,this),W1.jsxDEV("p",{className:"text-sm text-[#666]",children:F.provider},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${F.status==="running"?"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},F.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),W1.jsxDEV(K2,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>G("tasks"),children:I.length===0?W1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[W1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),W1.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):W1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:I.map((F)=>W1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[W1.jsxDEV("div",{className:"flex-1 min-w-0",children:[W1.jsxDEV("p",{className:"font-medium truncate",children:F.title},void 0,!1,void 0,this),W1.jsxDEV("p",{className:"text-sm text-[#666]",children:F.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W1.jsxDEV(wk,{status:F.status},void 0,!1,void 0,this)]},`${F.agentId}-${F.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 lZ({label:H,value:U,subValue:B,color:L}){return W1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[W1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:H},void 0,!1,void 0,this),W1.jsxDEV("p",{className:`text-2xl font-semibold ${L||""}`,children:U},void 0,!1,void 0,this),B&&W1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function K2({title:H,actionLabel:U,onAction:B,children:L}){return W1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[W1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[W1.jsxDEV("h3",{className:"font-semibold",children:H},void 0,!1,void 0,this),W1.jsxDEV("button",{onClick:B,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L]},void 0,!0,void 0,this)}function wk({status:H}){let U={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 W1.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${U[H]||U.pending}`,children:H},void 0,!1,void 0,this)}var K3=J0(y1(),1);var p1=J0(L1(),1);function xZ({onSelectAgent:H}){let[U,B]=K3.useState([]),[L,G]=K3.useState(!0),[_,R]=K3.useState("all");K3.useEffect(()=>{W();let P=setInterval(W,1e4);return()=>clearInterval(P)},[_]);let W=async()=>{try{let A=await(await fetch(`/api/tasks?status=${_}`)).json();B(A.tasks||[])}catch(P){console.error("Failed to fetch tasks:",P)}finally{G(!1)}},I={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 p1.jsxDEV("div",{className:"flex-1 p-6 overflow-auto",children:p1.jsxDEV("div",{className:"max-w-4xl mx-auto",children:[p1.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[p1.jsxDEV("div",{children:[p1.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),p1.jsxDEV("p",{className:"text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p1.jsxDEV("div",{className:"flex gap-2",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((P)=>p1.jsxDEV("button",{onClick:()=>R(P.value),className:`px-3 py-1.5 rounded text-sm transition ${_===P.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:P.label},P.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L?p1.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):U.length===0?p1.jsxDEV("div",{className:"text-center py-12",children:[p1.jsxDEV(U5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),p1.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),p1.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):p1.jsxDEV("div",{className:"space-y-3",children:U.map((P)=>p1.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:[p1.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[p1.jsxDEV("div",{className:"flex-1",children:[p1.jsxDEV("h3",{className:"font-medium",children:P.title},void 0,!1,void 0,this),p1.jsxDEV("p",{className:"text-sm text-[#666]",children:[P.agentName,P.execute_at&&p1.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(P.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p1.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${I[P.status]||I.pending}`,children:P.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.description&&p1.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:P.description},void 0,!1,void 0,this),p1.jsxDEV("div",{className:"flex items-center gap-4 text-xs text-[#555]",children:[p1.jsxDEV("span",{children:["Type: ",P.type]},void 0,!0,void 0,this),p1.jsxDEV("span",{children:["Priority: ",P.priority]},void 0,!0,void 0,this),P.recurrence&&p1.jsxDEV("span",{children:["Recurrence: ",P.recurrence]},void 0,!0,void 0,this),p1.jsxDEV("span",{children:["Created: ",new Date(P.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${P.agentId}-${P.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var f1=J0(y1(),1);var y=J0(L1(),1);function jZ(){let[H,U]=f1.useState([]),[B,L]=f1.useState(!0),[G,_]=f1.useState(!1),[R,W]=f1.useState(null),[I,w]=f1.useState("servers"),P=async()=>{try{let r=await(await fetch("/api/mcp/servers")).json();U(r.servers||[])}catch(E){console.error("Failed to fetch MCP servers:",E)}L(!1)};f1.useEffect(()=>{P()},[]);let A=async(E)=>{try{await fetch(`/api/mcp/servers/${E}/start`,{method:"POST"}),P()}catch(r){console.error("Failed to start server:",r)}},F=async(E)=>{try{await fetch(`/api/mcp/servers/${E}/stop`,{method:"POST"}),P()}catch(r){console.error("Failed to stop server:",r)}},d=async(E)=>{if(!confirm("Delete this MCP server?"))return;try{if(await fetch(`/api/mcp/servers/${E}`,{method:"DELETE"}),R?.id===E)W(null);P()}catch(r){console.error("Failed to delete server:",r)}};return y.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[y.jsxDEV("div",{className:"max-w-6xl",children:[y.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[y.jsxDEV("div",{children:[y.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),y.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),I==="servers"&&y.jsxDEV("button",{onClick:()=>_(!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),y.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[y.jsxDEV("button",{onClick:()=>w("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${I==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:()=>w("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${I==="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),I==="servers"&&y.jsxDEV(y.Fragment,{children:[B&&y.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!B&&H.length===0&&y.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[y.jsxDEV(q5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),y.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),y.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),y.jsxDEV("div",{className:"flex gap-3 justify-center",children:[y.jsxDEV("button",{onClick:()=>_(!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),y.jsxDEV("button",{onClick:()=>w("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),!B&&H.length>0&&y.jsxDEV("div",{className:"flex gap-6",children:[y.jsxDEV("div",{className:`space-y-3 ${R?"w-1/2":"w-full"}`,children:H.map((E)=>y.jsxDEV(Ik,{server:E,selected:R?.id===E.id,onSelect:()=>W(E.status==="running"?E:null),onStart:()=>A(E.id),onStop:()=>F(E.id),onDelete:()=>d(E.id)},E.id,!1,void 0,this))},void 0,!1,void 0,this),R&&y.jsxDEV("div",{className:"w-1/2",children:y.jsxDEV(fk,{server:R,onClose:()=>W(null)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),I==="registry"&&y.jsxDEV(hk,{onInstall:(E)=>{P(),w("servers")}},void 0,!1,void 0,this),I==="servers"&&y.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[y.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),y.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),y.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((E)=>y.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:E.pkg},E.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G&&y.jsxDEV(Sk,{onClose:()=>_(!1),onAdded:()=>{_(!1),P()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ik({server:H,selected:U,onSelect:B,onStart:L,onStop:G,onDelete:_}){return y.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:H.status==="running"?B:void 0,children:y.jsxDEV("div",{className:"flex items-center justify-between",children:[y.jsxDEV("div",{className:"flex items-center gap-3",children:[y.jsxDEV("div",{className:`w-2 h-2 rounded-full ${H.status==="running"?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),y.jsxDEV("div",{children:[y.jsxDEV("h3",{className:"font-medium",children:H.name},void 0,!1,void 0,this),y.jsxDEV("p",{className:"text-sm text-[#666]",children:[H.type," • ",H.package||H.command||"custom",H.status==="running"&&H.port&&` • :${H.port}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"flex items-center gap-2",children:[H.status==="running"?y.jsxDEV(y.Fragment,{children:[y.jsxDEV("button",{onClick:(R)=>{R.stopPropagation(),B()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:(R)=>{R.stopPropagation(),G()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):y.jsxDEV("button",{onClick:(R)=>{R.stopPropagation(),L()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:(R)=>{R.stopPropagation(),_()},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,!1,void 0,this)}function fk({server:H,onClose:U}){let[B,L]=f1.useState([]),[G,_]=f1.useState(null),[R,W]=f1.useState(!0),[I,w]=f1.useState(null),[P,A]=f1.useState(null);return f1.useEffect(()=>{(async()=>{W(!0),w(null);try{let d=await fetch(`/api/mcp/servers/${H.id}/tools`),E=await d.json();if(!d.ok){w(E.error||"Failed to fetch tools");return}L(E.tools||[]),_(E.serverInfo||null)}catch(d){w(`Failed to fetch tools: ${d}`)}finally{W(!1)}})()},[H.id]),y.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[y.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[y.jsxDEV("div",{children:[y.jsxDEV("h3",{className:"font-medium",children:[H.name," Tools"]},void 0,!0,void 0,this),G&&y.jsxDEV("p",{className:"text-xs text-[#666]",children:[G.name," v",G.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("button",{onClick:U,className:"text-[#666] hover:text-[#888] text-xl leading-none",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[R&&y.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),I&&y.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:I},void 0,!1,void 0,this),!R&&!I&&B.length===0&&y.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!R&&!I&&B.length>0&&!P&&y.jsxDEV("div",{className:"space-y-2",children:B.map((F)=>y.jsxDEV("button",{onClick:()=>A(F),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[y.jsxDEV("div",{className:"font-medium text-sm",children:F.name},void 0,!1,void 0,this),F.description&&y.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:F.description},void 0,!1,void 0,this)]},F.name,!0,void 0,this))},void 0,!1,void 0,this),P&&y.jsxDEV(Tk,{serverId:H.id,tool:P,onBack:()=>A(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Tk({serverId:H,tool:U,onBack:B}){let[L,G]=f1.useState("{}"),[_,R]=f1.useState(null),[W,I]=f1.useState(null),[w,P]=f1.useState(!1);f1.useEffect(()=>{let F=U.inputSchema;if(F&&typeof F==="object"&&"properties"in F){let d=F.properties,E={};for(let[r,D]of Object.entries(d))if(D.default!==void 0)E[r]=D.default;else if(D.type==="string")E[r]="";else if(D.type==="number"||D.type==="integer")E[r]=0;else if(D.type==="boolean")E[r]=!1;else if(D.type==="array")E[r]=[];else if(D.type==="object")E[r]={};G(JSON.stringify(E,null,2))}},[U]);let A=async()=>{P(!0),I(null),R(null);try{let F=JSON.parse(L),d=await fetch(`/api/mcp/servers/${H}/tools/${encodeURIComponent(U.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:F})}),E=await d.json();if(!d.ok){I(E.error||"Failed to call tool");return}R(E.result)}catch(F){I(`Error: ${F}`)}finally{P(!1)}};return y.jsxDEV("div",{className:"space-y-4",children:[y.jsxDEV("div",{className:"flex items-center gap-2",children:[y.jsxDEV("button",{onClick:B,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),y.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),y.jsxDEV("span",{className:"font-medium",children:U.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U.description&&y.jsxDEV("p",{className:"text-sm text-[#666]",children:U.description},void 0,!1,void 0,this),U.inputSchema&&y.jsxDEV("div",{className:"text-xs",children:y.jsxDEV("details",{className:"cursor-pointer",children:[y.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),y.jsxDEV("pre",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-[#888] overflow-auto max-h-32",children:JSON.stringify(U.inputSchema,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),y.jsxDEV("div",{children:[y.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),y.jsxDEV("textarea",{value:L,onChange:(F)=>G(F.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 h-32 font-mono text-sm focus:outline-none focus:border-[#f97316] resize-none",placeholder:"{}"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("button",{onClick:A,disabled:w,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:w?"Calling...":"Call Tool"},void 0,!1,void 0,this),W&&y.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:W},void 0,!1,void 0,this),_&&y.jsxDEV("div",{className:"space-y-2",children:[y.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",_.isError&&y.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:`p-3 rounded text-sm ${_.isError?"bg-red-500/10":"bg-green-500/10"}`,children:_.content.map((F,d)=>y.jsxDEV("div",{className:"mb-2 last:mb-0",children:[F.type==="text"&&y.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:F.text},void 0,!1,void 0,this),F.type==="image"&&F.data&&y.jsxDEV("img",{src:`data:${F.mimeType||"image/png"};base64,${F.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},d,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function hk({onInstall:H}){let[U,B]=f1.useState(""),[L,G]=f1.useState([]),[_,R]=f1.useState(!1),[W,I]=f1.useState(!1),[w,P]=f1.useState(null),[A,F]=f1.useState(null),d=async(D)=>{R(!0),F(null);try{let u=await fetch(`/api/mcp/registry?search=${encodeURIComponent(D)}&limit=20`),v0=await u.json();if(!u.ok)F(v0.error||"Failed to search registry"),G([]);else G(v0.servers||[])}catch(u){F(`Failed to search: ${u}`),G([])}finally{R(!1),I(!0)}},E=(D)=>{if(D.preventDefault(),U.trim())d(U.trim())};f1.useEffect(()=>{d("")},[]);let r=async(D)=>{if(!D.npmPackage){F("This server does not have an npm package");return}P(D.name),F(null);try{let u=await fetch("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:D.name,type:"npm",package:D.npmPackage})});if(!u.ok){let v0=await u.json();F(v0.error||"Failed to add server");return}H(D)}catch(u){F(`Failed to add server: ${u}`)}finally{P(null)}};return y.jsxDEV("div",{className:"space-y-6",children:[y.jsxDEV("form",{onSubmit:E,className:"flex gap-2",children:[y.jsxDEV("input",{type:"text",value:U,onChange:(D)=>B(D.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),y.jsxDEV("button",{type:"submit",disabled:_,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:_?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A&&y.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:A},void 0,!1,void 0,this),!_&&W&&L.length===0&&y.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),L.length>0&&y.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:L.map((D)=>y.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:y.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[y.jsxDEV("div",{className:"flex-1 min-w-0",children:[y.jsxDEV("h3",{className:"font-medium truncate",children:D.name},void 0,!1,void 0,this),y.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:D.description||"No description"},void 0,!1,void 0,this),y.jsxDEV("div",{className:"flex items-center gap-3 mt-2 text-xs text-[#555]",children:[D.vendor&&y.jsxDEV("span",{children:["by ",D.vendor]},void 0,!0,void 0,this),D.githubStars!==null&&D.githubStars>0&&y.jsxDEV("span",{children:["★ ",D.githubStars.toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D.npmPackage&&y.jsxDEV("code",{className:"text-xs text-[#666] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:D.npmPackage},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"flex-shrink-0",children:D.npmPackage?y.jsxDEV("button",{onClick:()=>r(D),disabled:w===D.name,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:w===D.name?"Adding...":"Add"},void 0,!1,void 0,this):y.jsxDEV("a",{href:D.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#666] hover:text-[#f97316] transition",children:"View →"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},D.name,!1,void 0,this))},void 0,!1,void 0,this),_&&y.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),y.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:y.jsxDEV("p",{children:["Servers are sourced from the"," ",y.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 Ck(H){let U=[],B=H,L=null,G=H.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(G){let W=G[2]||G[1];if(W)L=W.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let _=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,R;while((R=_.exec(H))!==null){let W=R[1],I=R[2],w=W.toUpperCase().replace(/-/g,"_"),P=L?`${L.toUpperCase().replace(/-/g,"_")}_${w}`:w;U.push({key:P,flag:W}),B=B.replace(new RegExp(`(--${W}\\s+)${I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${W} $${P}`)}return{cleanCommand:B,credentials:U,serverName:L}}function Sk({onClose:H,onAdded:U}){let[B,L]=f1.useState("npm"),[G,_]=f1.useState(""),[R,W]=f1.useState(""),[I,w]=f1.useState(""),[P,A]=f1.useState([]),[F,d]=f1.useState(!1),[E,r]=f1.useState(null),D=()=>{A([...P,{key:"",value:""}])},u=(j,$0,O0)=>{let L0=[...P];L0[j][$0]=O0,A(L0)},v0=(j)=>{A(P.filter(($0,O0)=>O0!==j))},s=(j)=>{if(w(j),j.includes("YOUR_")||j.includes("<")||j.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(j)){let{cleanCommand:$0,credentials:O0,serverName:L0}=Ck(j);if(!G&&L0)_(L0);if(O0.length>0){let g0=new Set(P.map((k0)=>k0.key)),Z0=O0.filter((k0)=>!g0.has(k0.key)).map((k0)=>({key:k0.key,value:""}));if(Z0.length>0)A([...P,...Z0]),w($0)}}},Q0=(j)=>{if(j.startsWith("npx ")||j.includes(" --")||j.includes("YOUR_")||j.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(j))L("command"),s(j);else if(W(j),!G&&j){let O0=j.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(O0&&O0!==j)_(O0)}},n=async()=>{if(!G){r("Name is required");return}if(B==="npm"&&!R){r("npm package is required");return}if(B==="command"&&!I){r("Command is required");return}d(!0),r(null);let j={};for(let{key:$0,value:O0}of P)if($0.trim())j[$0.trim()]=O0;try{let $0={name:G};if(B==="npm")$0.type="npm",$0.package=R;else{let L0=I.trim().split(/\s+/);$0.type="custom",$0.command=L0[0],$0.args=L0.slice(1).join(" ")}if(Object.keys(j).length>0)$0.env=j;let O0=await fetch("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($0)});if(!O0.ok){let L0=await O0.json();r(L0.error||"Failed to add server"),d(!1);return}U()}catch($0){r("Failed to add server"),d(!1)}},C=(j,$0)=>{L("npm"),_(j),W($0)};return y.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:y.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[y.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[y.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:H,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"p-4 space-y-4",children:[y.jsxDEV("div",{children:[y.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),y.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"},{name:"github",pkg:"@modelcontextprotocol/server-github"}].map((j)=>y.jsxDEV("button",{onClick:()=>C(j.name,j.pkg),className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:j.name},j.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[y.jsxDEV("button",{onClick:()=>L("npm"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${B==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm Package"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:()=>L("command"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${B==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Custom Command"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{children:[y.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),y.jsxDEV("input",{type:"text",value:G,onChange:(j)=>_(j.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),B==="npm"&&y.jsxDEV("div",{children:[y.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),y.jsxDEV("input",{type:"text",value:R,onChange:(j)=>Q0(j.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),y.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),B==="command"&&y.jsxDEV("div",{children:[y.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),y.jsxDEV("input",{type:"text",value:I,onChange:(j)=>s(j.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),y.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),y.jsxDEV("div",{children:[y.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[y.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:D,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P.length===0&&y.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),P.length>0&&y.jsxDEV("div",{className:"space-y-2",children:P.map((j,$0)=>y.jsxDEV("div",{className:"flex gap-2",children:[y.jsxDEV("input",{type:"text",value:j.key,onChange:(O0)=>u($0,"key",O0.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),y.jsxDEV("input",{type:"password",value:j.value,onChange:(O0)=>u($0,"value",O0.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),y.jsxDEV("button",{onClick:()=>v0($0),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},$0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E&&y.jsxDEV("p",{className:"text-red-400 text-sm",children:E},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[y.jsxDEV("button",{onClick:H,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),y.jsxDEV("button",{onClick:n,disabled:F||!G||(B==="npm"?!R:!I),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:F?"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)}var D5=J0(y1(),1);var h0=J0(L1(),1);function _G(){let[H,U]=D5.useState(null),[B,L]=D5.useState([]),[G,_]=D5.useState([]),[R,W]=D5.useState(!0),[I,w]=D5.useState({category:"",level:"",agent_id:""}),[P,A]=D5.useState([]),[F,d]=D5.useState(null);D5.useEffect(()=>{(async()=>{try{let $0=await(await fetch("/api/agents")).json();A($0.agents||[])}catch(j){console.error("Failed to fetch agents:",j)}})()},[]);let E=async()=>{W(!0);try{let j=await(await fetch("/api/telemetry/stats")).json();U(j.stats);let $0=new URLSearchParams;if(I.category)$0.set("category",I.category);if(I.level)$0.set("level",I.level);if(I.agent_id)$0.set("agent_id",I.agent_id);$0.set("limit","50");let L0=await(await fetch(`/api/telemetry/events?${$0}`)).json();L(L0.events||[]);let Z0=await(await fetch("/api/telemetry/usage?group_by=agent")).json();_(Z0.usage||[])}catch(C){console.error("Failed to fetch telemetry:",C)}W(!1)};D5.useEffect(()=>{E();let C=setInterval(E,30000);return()=>clearInterval(C)},[I]);let r=(C)=>{return P.find(($0)=>$0.id===C)?.name||C},D=(C)=>{if(C>=1e6)return(C/1e6).toFixed(1)+"M";if(C>=1000)return(C/1000).toFixed(1)+"K";return C.toString()},u={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},v0={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"},s=[{value:"",label:"All Agents"},...P.map((C)=>({value:C.id,label:C.name}))],Q0=[{value:"",label:"All Categories"},{value:"LLM",label:"LLM"},{value:"TOOL",label:"Tool"},{value:"CHAT",label:"Chat"},{value:"TASK",label:"Task"},{value:"MEMORY",label:"Memory"},{value:"MCP",label:"MCP"},{value:"SYSTEM",label:"System"},{value:"ERROR",label:"Error"}],n=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return h0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:h0.jsxDEV("div",{className:"max-w-6xl",children:[h0.jsxDEV("div",{className:"mb-6",children:[h0.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Telemetry"},void 0,!1,void 0,this),h0.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),H&&h0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[h0.jsxDEV(U3,{label:"Events",value:D(H.total_events)},void 0,!1,void 0,this),h0.jsxDEV(U3,{label:"LLM Calls",value:D(H.total_llm_calls)},void 0,!1,void 0,this),h0.jsxDEV(U3,{label:"Tool Calls",value:D(H.total_tool_calls)},void 0,!1,void 0,this),h0.jsxDEV(U3,{label:"Errors",value:D(H.total_errors),color:"red"},void 0,!1,void 0,this),h0.jsxDEV(U3,{label:"Input Tokens",value:D(H.total_input_tokens)},void 0,!1,void 0,this),h0.jsxDEV(U3,{label:"Output Tokens",value:D(H.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length>0&&h0.jsxDEV("div",{className:"mb-6",children:[h0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),h0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:h0.jsxDEV("table",{className:"w-full text-sm",children:[h0.jsxDEV("thead",{children:h0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[h0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),h0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),h0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),h0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),h0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),h0.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),h0.jsxDEV("tbody",{children:G.map((C)=>h0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[h0.jsxDEV("td",{className:"p-3 font-medium",children:r(C.agent_id)},void 0,!1,void 0,this),h0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:D(C.llm_calls)},void 0,!1,void 0,this),h0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:D(C.tool_calls)},void 0,!1,void 0,this),h0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:D(C.input_tokens)},void 0,!1,void 0,this),h0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:D(C.output_tokens)},void 0,!1,void 0,this),h0.jsxDEV("td",{className:"p-3 text-right",children:C.errors>0?h0.jsxDEV("span",{className:"text-red-400",children:C.errors},void 0,!1,void 0,this):h0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},C.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),h0.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[h0.jsxDEV("div",{className:"w-56",children:h0.jsxDEV(K5,{value:I.agent_id,options:s,onChange:(C)=>w({...I,agent_id:C}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h0.jsxDEV("div",{className:"w-48",children:h0.jsxDEV(K5,{value:I.category,options:Q0,onChange:(C)=>w({...I,category:C}),placeholder:"All Categories"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h0.jsxDEV("div",{className:"w-40",children:h0.jsxDEV(K5,{value:I.level,options:n,onChange:(C)=>w({...I,level:C}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),h0.jsxDEV("button",{onClick:E,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),h0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[h0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a]",children:h0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this)},void 0,!1,void 0,this),R&&B.length===0?h0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):B.length===0?h0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here once agents start sending data."},void 0,!1,void 0,this):h0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:B.map((C)=>h0.jsxDEV("div",{className:"p-3 hover:bg-[#0a0a0a] transition cursor-pointer",onClick:()=>d(F===C.id?null:C.id),children:h0.jsxDEV("div",{className:"flex items-start gap-3",children:[h0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border ${v0[C.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:C.category},void 0,!1,void 0,this),h0.jsxDEV("div",{className:"flex-1 min-w-0",children:[h0.jsxDEV("div",{className:"flex items-center gap-2",children:[h0.jsxDEV("span",{className:"font-medium text-sm",children:C.type},void 0,!1,void 0,this),h0.jsxDEV("span",{className:`text-xs ${u[C.level]||"text-[#666]"}`,children:C.level},void 0,!1,void 0,this),C.duration_ms&&h0.jsxDEV("span",{className:"text-xs text-[#555]",children:[C.duration_ms,"ms"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[r(C.agent_id)," · ",new Date(C.timestamp).toLocaleString()]},void 0,!0,void 0,this),C.error&&h0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:C.error},void 0,!1,void 0,this),F===C.id&&C.data&&Object.keys(C.data).length>0&&h0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(C.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},C.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 U3({label:H,value:U,color:B}){return h0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[h0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:H},void 0,!1,void 0,this),h0.jsxDEV("div",{className:`text-2xl font-semibold ${B==="red"?"text-red-400":""}`,children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var N6=J0(L1(),1);function Vk(){let{isComplete:H,setIsComplete:U}=XG(),{agents:B,loading:L,runningCount:G,fetchAgents:_,createAgent:R,updateAgent:W,deleteAgent:I,toggleAgent:w}=zG(H===!0),{providers:P,configuredProviders:A,fetchProviders:F}=QG(H===!0),[d,E]=E5.useState(!1),[r,D]=E5.useState(null),[u,v0]=E5.useState("dashboard"),[s,Q0]=E5.useState(null),[n,C]=E5.useState(0);E5.useEffect(()=>{if(H!==!0)return;let S0=async()=>{try{let H1=await fetch("/api/tasks?status=pending");if(H1.ok){let P1=await H1.json();C(P1.count||0)}}catch{}};S0();let _1=setInterval(S0,15000);return()=>clearInterval(_1)},[H]);let[j,$0]=E5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...bG}});E5.useEffect(()=>{if(A.length>0&&!j.provider){let S0=A[0],_1=S0.models.find((H1)=>H1.recommended)?.value||S0.models[0]?.value||"";$0((H1)=>({...H1,provider:S0.id,model:_1}))}},[A,j.provider]),E5.useEffect(()=>{if(r){let S0=B.find((_1)=>_1.id===r.id);if(S0)D(S0);else D(null)}},[B,r]);let O0=(S0)=>{let _1=P.find((P1)=>P1.id===S0),H1=_1?.models.find((P1)=>P1.recommended)?.value||_1?.models[0]?.value||"";$0((P1)=>({...P1,provider:S0,model:H1}))},L0=async()=>{if(!j.name)return;await R(j);let S0=A[0],_1=S0?.models.find((H1)=>H1.recommended)?.value||S0?.models[0]?.value||"";$0({name:"",model:_1,provider:S0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...bG}}),E(!1)},g0=async(S0,_1)=>{_1?.stopPropagation(),Q0(null);let H1=await w(S0);if(H1.error)Q0(H1.error)},Z0=async(S0,_1)=>{if(_1?.stopPropagation(),r?.id===S0)D(null);await I(S0)},k0=(S0)=>{D(S0),Q0(null),v0("agents")},a0=(S0)=>{v0(S0),D(null)},C0=()=>{U(!0),F()};if(H===null)return N6.jsxDEV(e8,{fullScreen:!0},void 0,!1,void 0,this);if(!H)return N6.jsxDEV(EZ,{onComplete:C0},void 0,!1,void 0,this);return N6.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[N6.jsxDEV(SZ,{onNewAgent:()=>E(!0),canCreateAgent:A.length>0},void 0,!1,void 0,this),s&&N6.jsxDEV(DZ,{message:s,onDismiss:()=>Q0(null)},void 0,!1,void 0,this),N6.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[N6.jsxDEV(VZ,{route:u,agentCount:B.length,taskCount:n,onNavigate:a0},void 0,!1,void 0,this),N6.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[u==="settings"&&N6.jsxDEV(uZ,{},void 0,!1,void 0,this),u==="agents"&&N6.jsxDEV(aZ,{agents:B,loading:L,selectedAgent:r,providers:P,onSelectAgent:k0,onCloseAgent:()=>D(null),onToggleAgent:g0,onDeleteAgent:Z0,onUpdateAgent:W},void 0,!1,void 0,this),u==="dashboard"&&N6.jsxDEV(iZ,{agents:B,loading:L,runningCount:G,configuredProviders:A,onNavigate:a0,onSelectAgent:k0},void 0,!1,void 0,this),u==="tasks"&&N6.jsxDEV(xZ,{},void 0,!1,void 0,this),u==="mcp"&&N6.jsxDEV(jZ,{},void 0,!1,void 0,this),u==="telemetry"&&N6.jsxDEV(_G,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),d&&N6.jsxDEV(gZ,{form:j,providers:P,configuredProviders:A,onFormChange:$0,onProviderChange:O0,onCreate:L0,onClose:()=>E(!1),onGoToSettings:()=>{E(!1),v0("settings")}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Dk=U2.createRoot(document.getElementById("root"));Dk.render(N6.jsxDEV(Vk,{},void 0,!1,void 0,this));
|
|
212
|
+
|
|
213
|
+
//# debugId=358C49696C72F54C64756E2164756E21
|