vibecodepilot 0.0.0-stage → 1.0.0
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/LICENSE +21 -0
- package/README.md +174 -2
- package/apps/dashboard/dist/assets/index-CqhDXwBX.css +1 -0
- package/apps/dashboard/dist/assets/index-DB7dE_Nn.js +493 -0
- package/apps/dashboard/dist/index.html +31 -0
- package/apps/dashboard/dist-server/serve-dashboard.cjs +99 -0
- package/apps/dashboard/package.json +23 -0
- package/apps/server/dist/db/database.d.ts +91 -0
- package/apps/server/dist/db/database.d.ts.map +1 -0
- package/apps/server/dist/db/database.js +902 -0
- package/apps/server/dist/db/database.js.map +1 -0
- package/apps/server/dist/index.d.ts +2 -0
- package/apps/server/dist/index.d.ts.map +1 -0
- package/apps/server/dist/index.js +2262 -0
- package/apps/server/dist/index.js.map +1 -0
- package/apps/server/dist/services/agentWorkspaceService.d.ts +89 -0
- package/apps/server/dist/services/agentWorkspaceService.d.ts.map +1 -0
- package/apps/server/dist/services/agentWorkspaceService.js +243 -0
- package/apps/server/dist/services/agentWorkspaceService.js.map +1 -0
- package/apps/server/dist/services/monitorService.d.ts +118 -0
- package/apps/server/dist/services/monitorService.d.ts.map +1 -0
- package/apps/server/dist/services/monitorService.js +497 -0
- package/apps/server/dist/services/monitorService.js.map +1 -0
- package/apps/server/dist/services/projectFlowGraph.d.ts +70 -0
- package/apps/server/dist/services/projectFlowGraph.d.ts.map +1 -0
- package/apps/server/dist/services/projectFlowGraph.js +254 -0
- package/apps/server/dist/services/projectFlowGraph.js.map +1 -0
- package/apps/server/dist/tech-detector.d.ts +2 -0
- package/apps/server/dist/tech-detector.d.ts.map +1 -0
- package/apps/server/dist/tech-detector.js +154 -0
- package/apps/server/dist/tech-detector.js.map +1 -0
- package/apps/server/dist/workspace-tools.d.ts +43 -0
- package/apps/server/dist/workspace-tools.d.ts.map +1 -0
- package/apps/server/dist/workspace-tools.js +160 -0
- package/apps/server/dist/workspace-tools.js.map +1 -0
- package/apps/server/package.json +24 -0
- package/node_modules/@VibeCodePilot/agent-registry/dist/index.d.ts +21 -0
- package/node_modules/@VibeCodePilot/agent-registry/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/agent-registry/dist/index.js +194 -0
- package/node_modules/@VibeCodePilot/agent-registry/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/agent-registry/package.json +18 -0
- package/node_modules/@VibeCodePilot/git-worktrees/dist/index.d.ts +48 -0
- package/node_modules/@VibeCodePilot/git-worktrees/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/git-worktrees/dist/index.js +121 -0
- package/node_modules/@VibeCodePilot/git-worktrees/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/git-worktrees/package.json +18 -0
- package/node_modules/@VibeCodePilot/inference-gateway/dist/index.d.ts +54 -0
- package/node_modules/@VibeCodePilot/inference-gateway/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/inference-gateway/dist/index.js +157 -0
- package/node_modules/@VibeCodePilot/inference-gateway/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/inference-gateway/package.json +19 -0
- package/node_modules/@VibeCodePilot/integration/dist/index.d.ts +13 -0
- package/node_modules/@VibeCodePilot/integration/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/integration/dist/index.js +83 -0
- package/node_modules/@VibeCodePilot/integration/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/integration/package.json +20 -0
- package/node_modules/@VibeCodePilot/model-manager/dist/index.d.ts +44 -0
- package/node_modules/@VibeCodePilot/model-manager/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/model-manager/dist/index.js +192 -0
- package/node_modules/@VibeCodePilot/model-manager/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/model-manager/package.json +19 -0
- package/node_modules/@VibeCodePilot/permissions/dist/engine.d.ts +95 -0
- package/node_modules/@VibeCodePilot/permissions/dist/engine.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/engine.js +294 -0
- package/node_modules/@VibeCodePilot/permissions/dist/engine.js.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/index.d.ts +4 -0
- package/node_modules/@VibeCodePilot/permissions/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/index.js +20 -0
- package/node_modules/@VibeCodePilot/permissions/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/security.d.ts +31 -0
- package/node_modules/@VibeCodePilot/permissions/dist/security.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/security.js +129 -0
- package/node_modules/@VibeCodePilot/permissions/dist/security.js.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/types.d.ts +108 -0
- package/node_modules/@VibeCodePilot/permissions/dist/types.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/dist/types.js +3 -0
- package/node_modules/@VibeCodePilot/permissions/dist/types.js.map +1 -0
- package/node_modules/@VibeCodePilot/permissions/package.json +20 -0
- package/node_modules/@VibeCodePilot/planner/dist/index.d.ts +35 -0
- package/node_modules/@VibeCodePilot/planner/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/planner/dist/index.js +592 -0
- package/node_modules/@VibeCodePilot/planner/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/planner/package.json +19 -0
- package/node_modules/@VibeCodePilot/promoter/dist/index.d.ts +11 -0
- package/node_modules/@VibeCodePilot/promoter/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/promoter/dist/index.js +117 -0
- package/node_modules/@VibeCodePilot/promoter/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/promoter/package.json +19 -0
- package/node_modules/@VibeCodePilot/prompter/dist/index.d.ts +17 -0
- package/node_modules/@VibeCodePilot/prompter/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/prompter/dist/index.js +216 -0
- package/node_modules/@VibeCodePilot/prompter/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/prompter/package.json +20 -0
- package/node_modules/@VibeCodePilot/provider-ollama/dist/index.d.ts +58 -0
- package/node_modules/@VibeCodePilot/provider-ollama/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/provider-ollama/dist/index.js +384 -0
- package/node_modules/@VibeCodePilot/provider-ollama/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/provider-ollama/package.json +18 -0
- package/node_modules/@VibeCodePilot/shared/dist/index.d.ts +595 -0
- package/node_modules/@VibeCodePilot/shared/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/shared/dist/index.js +24 -0
- package/node_modules/@VibeCodePilot/shared/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/shared/dist/version.d.ts +14 -0
- package/node_modules/@VibeCodePilot/shared/dist/version.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/shared/dist/version.js +17 -0
- package/node_modules/@VibeCodePilot/shared/dist/version.js.map +1 -0
- package/node_modules/@VibeCodePilot/shared/package.json +24 -0
- package/node_modules/@VibeCodePilot/skill-registry/dist/index.d.ts +15 -0
- package/node_modules/@VibeCodePilot/skill-registry/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/skill-registry/dist/index.js +126 -0
- package/node_modules/@VibeCodePilot/skill-registry/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/skill-registry/package.json +18 -0
- package/node_modules/@VibeCodePilot/supervisor/dist/index.d.ts +31 -0
- package/node_modules/@VibeCodePilot/supervisor/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/supervisor/dist/index.js +219 -0
- package/node_modules/@VibeCodePilot/supervisor/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/supervisor/package.json +19 -0
- package/node_modules/@VibeCodePilot/task-scheduler/dist/index.d.ts +29 -0
- package/node_modules/@VibeCodePilot/task-scheduler/dist/index.d.ts.map +1 -0
- package/node_modules/@VibeCodePilot/task-scheduler/dist/index.js +128 -0
- package/node_modules/@VibeCodePilot/task-scheduler/dist/index.js.map +1 -0
- package/node_modules/@VibeCodePilot/task-scheduler/package.json +20 -0
- package/package.json +114 -4
- package/packages/agent-registry/package.json +18 -0
- package/packages/cli/bin/vibepilot.js +28 -0
- package/packages/cli/dist/config.js +143 -0
- package/packages/cli/dist/doctor.js +64 -0
- package/packages/cli/dist/index.js +260 -0
- package/packages/cli/dist/ollama.js +39 -0
- package/packages/cli/dist/pidmanager.js +153 -0
- package/packages/cli/dist/runtime.js +97 -0
- package/packages/cli/dist/servicemanager.js +227 -0
- package/packages/cli/package.json +25 -0
- package/packages/git-worktrees/package.json +18 -0
- package/packages/inference-gateway/package.json +19 -0
- package/packages/integration/package.json +20 -0
- package/packages/model-manager/package.json +19 -0
- package/packages/permissions/package.json +20 -0
- package/packages/planner/package.json +19 -0
- package/packages/promoter/package.json +19 -0
- package/packages/prompter/package.json +20 -0
- package/packages/providers/ollama/package.json +18 -0
- package/packages/shared/package.json +24 -0
- package/packages/skill-registry/package.json +18 -0
- package/packages/supervisor/package.json +19 -0
- package/packages/task-scheduler/package.json +20 -0
- package/skills/ai-ml/aiml-planning.json +22 -0
- package/skills/ai-ml/backend-planning.json +31 -0
- package/skills/ai-ml/frontend-planning.json +19 -0
- package/skills/ai-ml/ollama-local.json +11 -0
- package/skills/ai-ml/prompt-engineering.json +31 -0
- package/skills/ai-ml/task-planning.json +30 -0
- package/skills/backend/python-fastapi.json +11 -0
- package/skills/backend/ruby-rails.json +11 -0
- package/skills/backend/typescript-nodejs.json +11 -0
- package/skills/frontend/react-typescript.json +11 -0
- package/tsconfig.base.json +16 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
var Y0=Object.defineProperty;var J0=(i,d,c)=>d in i?Y0(i,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):i[d]=c;var xr=(i,d,c)=>J0(i,typeof d!="symbol"?d+"":d,c);(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))b(g);new MutationObserver(g=>{for(const h of g)if(h.type==="childList")for(const C of h.addedNodes)C.tagName==="LINK"&&C.rel==="modulepreload"&&b(C)}).observe(document,{childList:!0,subtree:!0});function c(g){const h={};return g.integrity&&(h.integrity=g.integrity),g.referrerPolicy&&(h.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?h.credentials="include":g.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function b(g){if(g.ep)return;g.ep=!0;const h=c(g);fetch(g.href,h)}})();function Bd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var _i={exports:{}},fr={},Ei={exports:{}},Pe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Md;function X0(){if(Md)return Pe;Md=1;var i=Symbol.for("react.element"),d=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),C=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),H=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),R=Symbol.iterator;function L(p){return p===null||typeof p!="object"?null:(p=R&&p[R]||p["@@iterator"],typeof p=="function"?p:null)}var ge={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,se={};function Z(p,T,fe){this.props=p,this.context=T,this.refs=se,this.updater=fe||ge}Z.prototype.isReactComponent={},Z.prototype.setState=function(p,T){if(typeof p!="object"&&typeof p!="function"&&p!=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,p,T,"setState")},Z.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function I(){}I.prototype=Z.prototype;function ne(p,T,fe){this.props=p,this.context=T,this.refs=se,this.updater=fe||ge}var ae=ne.prototype=new I;ae.constructor=ne,Q(ae,Z.prototype),ae.isPureReactComponent=!0;var Y=Array.isArray,oe=Object.prototype.hasOwnProperty,X={current:null},Ee={key:!0,ref:!0,__self:!0,__source:!0};function B(p,T,fe){var he,de={},pe=null,be=null;if(T!=null)for(he in T.ref!==void 0&&(be=T.ref),T.key!==void 0&&(pe=""+T.key),T)oe.call(T,he)&&!Ee.hasOwnProperty(he)&&(de[he]=T[he]);var ve=arguments.length-2;if(ve===1)de.children=fe;else if(1<ve){for(var Ne=Array(ve),Oe=0;Oe<ve;Oe++)Ne[Oe]=arguments[Oe+2];de.children=Ne}if(p&&p.defaultProps)for(he in ve=p.defaultProps,ve)de[he]===void 0&&(de[he]=ve[he]);return{$$typeof:i,type:p,key:pe,ref:be,props:de,_owner:X.current}}function Ce(p,T){return{$$typeof:i,type:p.type,key:T,ref:p.ref,props:p.props,_owner:p._owner}}function Te(p){return typeof p=="object"&&p!==null&&p.$$typeof===i}function Me(p){var T={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(fe){return T[fe]})}var $e=/\/+/g;function ke(p,T){return typeof p=="object"&&p!==null&&p.key!=null?Me(""+p.key):T.toString(36)}function G(p,T,fe,he,de){var pe=typeof p;(pe==="undefined"||pe==="boolean")&&(p=null);var be=!1;if(p===null)be=!0;else switch(pe){case"string":case"number":be=!0;break;case"object":switch(p.$$typeof){case i:case d:be=!0}}if(be)return be=p,de=de(be),p=he===""?"."+ke(be,0):he,Y(de)?(fe="",p!=null&&(fe=p.replace($e,"$&/")+"/"),G(de,T,fe,"",function(Oe){return Oe})):de!=null&&(Te(de)&&(de=Ce(de,fe+(!de.key||be&&be.key===de.key?"":(""+de.key).replace($e,"$&/")+"/")+p)),T.push(de)),1;if(be=0,he=he===""?".":he+":",Y(p))for(var ve=0;ve<p.length;ve++){pe=p[ve];var Ne=he+ke(pe,ve);be+=G(pe,T,fe,Ne,de)}else if(Ne=L(p),typeof Ne=="function")for(p=Ne.call(p),ve=0;!(pe=p.next()).done;)pe=pe.value,Ne=he+ke(pe,ve++),be+=G(pe,T,fe,Ne,de);else if(pe==="object")throw T=String(p),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return be}function ee(p,T,fe){if(p==null)return p;var he=[],de=0;return G(p,he,"","",function(pe){return T.call(fe,pe,de++)}),he}function ue(p){if(p._status===-1){var T=p._result;T=T(),T.then(function(fe){(p._status===0||p._status===-1)&&(p._status=1,p._result=fe)},function(fe){(p._status===0||p._status===-1)&&(p._status=2,p._result=fe)}),p._status===-1&&(p._status=0,p._result=T)}if(p._status===1)return p._result.default;throw p._result}var w={current:null},E={transition:null},P={ReactCurrentDispatcher:w,ReactCurrentBatchConfig:E,ReactCurrentOwner:X};function z(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:ee,forEach:function(p,T,fe){ee(p,function(){T.apply(this,arguments)},fe)},count:function(p){var T=0;return ee(p,function(){T++}),T},toArray:function(p){return ee(p,function(T){return T})||[]},only:function(p){if(!Te(p))throw Error("React.Children.only expected to receive a single React element child.");return p}},Pe.Component=Z,Pe.Fragment=c,Pe.Profiler=g,Pe.PureComponent=ne,Pe.StrictMode=b,Pe.Suspense=$,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,Pe.act=z,Pe.cloneElement=function(p,T,fe){if(p==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+p+".");var he=Q({},p.props),de=p.key,pe=p.ref,be=p._owner;if(T!=null){if(T.ref!==void 0&&(pe=T.ref,be=X.current),T.key!==void 0&&(de=""+T.key),p.type&&p.type.defaultProps)var ve=p.type.defaultProps;for(Ne in T)oe.call(T,Ne)&&!Ee.hasOwnProperty(Ne)&&(he[Ne]=T[Ne]===void 0&&ve!==void 0?ve[Ne]:T[Ne])}var Ne=arguments.length-2;if(Ne===1)he.children=fe;else if(1<Ne){ve=Array(Ne);for(var Oe=0;Oe<Ne;Oe++)ve[Oe]=arguments[Oe+2];he.children=ve}return{$$typeof:i,type:p.type,key:de,ref:pe,props:he,_owner:be}},Pe.createContext=function(p){return p={$$typeof:C,_currentValue:p,_currentValue2:p,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},p.Provider={$$typeof:h,_context:p},p.Consumer=p},Pe.createElement=B,Pe.createFactory=function(p){var T=B.bind(null,p);return T.type=p,T},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(p){return{$$typeof:j,render:p}},Pe.isValidElement=Te,Pe.lazy=function(p){return{$$typeof:M,_payload:{_status:-1,_result:p},_init:ue}},Pe.memo=function(p,T){return{$$typeof:H,type:p,compare:T===void 0?null:T}},Pe.startTransition=function(p){var T=E.transition;E.transition={};try{p()}finally{E.transition=T}},Pe.unstable_act=z,Pe.useCallback=function(p,T){return w.current.useCallback(p,T)},Pe.useContext=function(p){return w.current.useContext(p)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(p){return w.current.useDeferredValue(p)},Pe.useEffect=function(p,T){return w.current.useEffect(p,T)},Pe.useId=function(){return w.current.useId()},Pe.useImperativeHandle=function(p,T,fe){return w.current.useImperativeHandle(p,T,fe)},Pe.useInsertionEffect=function(p,T){return w.current.useInsertionEffect(p,T)},Pe.useLayoutEffect=function(p,T){return w.current.useLayoutEffect(p,T)},Pe.useMemo=function(p,T){return w.current.useMemo(p,T)},Pe.useReducer=function(p,T,fe){return w.current.useReducer(p,T,fe)},Pe.useRef=function(p){return w.current.useRef(p)},Pe.useState=function(p){return w.current.useState(p)},Pe.useSyncExternalStore=function(p,T,fe){return w.current.useSyncExternalStore(p,T,fe)},Pe.useTransition=function(){return w.current.useTransition()},Pe.version="18.3.1",Pe}var $d;function Gi(){return $d||($d=1,Ei.exports=X0()),Ei.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Id;function Z0(){if(Id)return fr;Id=1;var i=Gi(),d=Symbol.for("react.element"),c=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,g=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function C(j,$,H){var M,R={},L=null,ge=null;H!==void 0&&(L=""+H),$.key!==void 0&&(L=""+$.key),$.ref!==void 0&&(ge=$.ref);for(M in $)b.call($,M)&&!h.hasOwnProperty(M)&&(R[M]=$[M]);if(j&&j.defaultProps)for(M in $=j.defaultProps,$)R[M]===void 0&&(R[M]=$[M]);return{$$typeof:d,type:j,key:L,ref:ge,props:R,_owner:g.current}}return fr.Fragment=c,fr.jsx=C,fr.jsxs=C,fr}var Ad;function ep(){return Ad||(Ad=1,_i.exports=Z0()),_i.exports}var s=ep(),f=Gi();const Gd=Bd(f);var Al={},Ti={exports:{}},ft={},Pi={exports:{}},Mi={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ld;function tp(){return Ld||(Ld=1,(function(i){function d(E,P){var z=E.length;E.push(P);e:for(;0<z;){var p=z-1>>>1,T=E[p];if(0<g(T,P))E[p]=P,E[z]=T,z=p;else break e}}function c(E){return E.length===0?null:E[0]}function b(E){if(E.length===0)return null;var P=E[0],z=E.pop();if(z!==P){E[0]=z;e:for(var p=0,T=E.length,fe=T>>>1;p<fe;){var he=2*(p+1)-1,de=E[he],pe=he+1,be=E[pe];if(0>g(de,z))pe<T&&0>g(be,de)?(E[p]=be,E[pe]=z,p=pe):(E[p]=de,E[he]=z,p=he);else if(pe<T&&0>g(be,z))E[p]=be,E[pe]=z,p=pe;else break e}}return P}function g(E,P){var z=E.sortIndex-P.sortIndex;return z!==0?z:E.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var C=Date,j=C.now();i.unstable_now=function(){return C.now()-j}}var $=[],H=[],M=1,R=null,L=3,ge=!1,Q=!1,se=!1,Z=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ae(E){for(var P=c(H);P!==null;){if(P.callback===null)b(H);else if(P.startTime<=E)b(H),P.sortIndex=P.expirationTime,d($,P);else break;P=c(H)}}function Y(E){if(se=!1,ae(E),!Q)if(c($)!==null)Q=!0,ue(oe);else{var P=c(H);P!==null&&w(Y,P.startTime-E)}}function oe(E,P){Q=!1,se&&(se=!1,I(B),B=-1),ge=!0;var z=L;try{for(ae(P),R=c($);R!==null&&(!(R.expirationTime>P)||E&&!Me());){var p=R.callback;if(typeof p=="function"){R.callback=null,L=R.priorityLevel;var T=p(R.expirationTime<=P);P=i.unstable_now(),typeof T=="function"?R.callback=T:R===c($)&&b($),ae(P)}else b($);R=c($)}if(R!==null)var fe=!0;else{var he=c(H);he!==null&&w(Y,he.startTime-P),fe=!1}return fe}finally{R=null,L=z,ge=!1}}var X=!1,Ee=null,B=-1,Ce=5,Te=-1;function Me(){return!(i.unstable_now()-Te<Ce)}function $e(){if(Ee!==null){var E=i.unstable_now();Te=E;var P=!0;try{P=Ee(!0,E)}finally{P?ke():(X=!1,Ee=null)}}else X=!1}var ke;if(typeof ne=="function")ke=function(){ne($e)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ee=G.port2;G.port1.onmessage=$e,ke=function(){ee.postMessage(null)}}else ke=function(){Z($e,0)};function ue(E){Ee=E,X||(X=!0,ke())}function w(E,P){B=Z(function(){E(i.unstable_now())},P)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(E){E.callback=null},i.unstable_continueExecution=function(){Q||ge||(Q=!0,ue(oe))},i.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ce=0<E?Math.floor(1e3/E):5},i.unstable_getCurrentPriorityLevel=function(){return L},i.unstable_getFirstCallbackNode=function(){return c($)},i.unstable_next=function(E){switch(L){case 1:case 2:case 3:var P=3;break;default:P=L}var z=L;L=P;try{return E()}finally{L=z}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(E,P){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var z=L;L=E;try{return P()}finally{L=z}},i.unstable_scheduleCallback=function(E,P,z){var p=i.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?p+z:p):z=p,E){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=z+T,E={id:M++,callback:P,priorityLevel:E,startTime:z,expirationTime:T,sortIndex:-1},z>p?(E.sortIndex=z,d(H,E),c($)===null&&E===c(H)&&(se?(I(B),B=-1):se=!0,w(Y,z-p))):(E.sortIndex=T,d($,E),Q||ge||(Q=!0,ue(oe))),E},i.unstable_shouldYield=Me,i.unstable_wrapCallback=function(E){var P=L;return function(){var z=L;L=P;try{return E.apply(this,arguments)}finally{L=z}}}})(Mi)),Mi}var Rd;function sp(){return Rd||(Rd=1,Pi.exports=tp()),Pi.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var zd;function np(){if(zd)return ft;zd=1;var i=Gi(),d=sp();function c(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b=new Set,g={};function h(e,t){C(e,t),C(e+"Capture",t)}function C(e,t){for(g[e]=t,e=0;e<t.length;e++)b.add(t[e])}var j=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$=Object.prototype.hasOwnProperty,H=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,M={},R={};function L(e){return $.call(R,e)?!0:$.call(M,e)?!1:H.test(e)?R[e]=!0:(M[e]=!0,!1)}function ge(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Q(e,t,n,r){if(t===null||typeof t>"u"||ge(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function se(e,t,n,r,l,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Z[e]=new se(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Z[t]=new se(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Z[e]=new se(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Z[e]=new se(e,2,!1,e,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".split(" ").forEach(function(e){Z[e]=new se(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Z[e]=new se(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Z[e]=new se(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Z[e]=new se(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Z[e]=new se(e,5,!1,e.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function ne(e){return e[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".split(" ").forEach(function(e){var t=e.replace(I,ne);Z[t]=new se(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(I,ne);Z[t]=new se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(I,ne);Z[t]=new se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Z[e]=new se(e,1,!1,e.toLowerCase(),null,!1,!1)}),Z.xlinkHref=new se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Z[e]=new se(e,1,!1,e.toLowerCase(),null,!0,!0)});function ae(e,t,n,r){var l=Z.hasOwnProperty(t)?Z[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Q(t,n,l,r)&&(n=null),r||l===null?L(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Y=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oe=Symbol.for("react.element"),X=Symbol.for("react.portal"),Ee=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Ce=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),Me=Symbol.for("react.context"),$e=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),E=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=E&&e[E]||e["@@iterator"],typeof e=="function"?e:null)}var z=Object.assign,p;function T(e){if(p===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);p=t&&t[1]||""}return`
|
|
34
|
+
`+p+e}var fe=!1;function he(e,t){if(!e||fe)return"";fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(N){var r=N}Reflect.construct(e,[],t)}else{try{t.call()}catch(N){r=N}e.call(t.prototype)}else{try{throw Error()}catch(N){r=N}e()}}catch(N){if(N&&r&&typeof N.stack=="string"){for(var l=N.stack.split(`
|
|
35
|
+
`),a=r.stack.split(`
|
|
36
|
+
`),o=l.length-1,u=a.length-1;1<=o&&0<=u&&l[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==a[u]){if(o!==1||u!==1)do if(o--,u--,0>u||l[o]!==a[u]){var m=`
|
|
37
|
+
`+l[o].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),m}while(1<=o&&0<=u);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function de(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=he(e.type,!1),e;case 11:return e=he(e.type.render,!1),e;case 1:return e=he(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ee:return"Fragment";case X:return"Portal";case Ce:return"Profiler";case B:return"StrictMode";case ke:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Me:return(e.displayName||"Context")+".Consumer";case Te:return(e._context.displayName||"Context")+".Provider";case $e:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function be(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ve(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Oe(e){var t=Ne(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ze(e){e._valueTracker||(e._valueTracker=Oe(e))}function le(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ne(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function A(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function k(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ve(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function V(e,t){t=t.checked,t!=null&&ae(e,"checked",t,!1)}function Se(e,t){V(e,t);var n=ve(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Je(e,t.type,n):t.hasOwnProperty("defaultValue")&&Je(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Je(e,t,n){(t!=="number"||A(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rt=Array.isArray;function Le(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Et(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(c(91));return z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wt(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(c(92));if(Rt(n)){if(1<n.length)throw Error(c(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Nr(e,t){var n=ve(t.value),r=ve(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Sn(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ss,Cn=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ss=Ss||document.createElement("div"),Ss.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ss.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _s={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},Hl=["Webkit","ms","Moz","O"];Object.keys(_s).forEach(function(e){Hl.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_s[t]=_s[e]})});function _n(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_s.hasOwnProperty(e)&&_s[e]?(""+t).trim():t+"px"}function Sr(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=_n(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Wl=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function En(e,t){if(t){if(Wl[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(c(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(c(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(c(61))}if(t.style!=null&&typeof t.style!="object")throw Error(c(62))}}function Qs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tn=null;function Pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mn=null,zt=null,ss=null;function Es(e){if(e=Zn(e)){if(typeof Mn!="function")throw Error(c(280));var t=e.stateNode;t&&(t=Kr(t),Mn(e.stateNode,e.type,t))}}function Cr(e){zt?ss?ss.push(e):ss=[e]:zt=e}function Bt(){if(zt){var e=zt,t=ss;if(ss=zt=null,Es(e),t)for(e=0;e<t.length;e++)Es(t[e])}}function _r(e,t){return e(t)}function Er(){}var $n=!1;function _(e,t,n){if($n)return e(t,n);$n=!0;try{return _r(e,t,n)}finally{$n=!1,(zt!==null||ss!==null)&&(Er(),Bt())}}function J(e,t){var n=e.stateNode;if(n===null)return null;var r=Kr(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var K=!1;if(j)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){K=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch{K=!1}function tt(e,t,n,r,l,a,o,u,m){var N=Array.prototype.slice.call(arguments,3);try{t.apply(n,N)}catch(F){this.onError(F)}}var Gt=!1,qs=null,Ks=!1,In=null,An={onError:function(e){Gt=!0,qs=e}};function Bl(e,t,n,r,l,a,o,u,m){Gt=!1,qs=null,tt.apply(An,arguments)}function Gl(e,t,n,r,l,a,o,u,m){if(Bl.apply(this,arguments),Gt){if(Gt){var N=qs;Gt=!1,qs=null}else throw Error(c(198));Ks||(Ks=!0,In=N)}}function Ts(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Zi(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function eo(e){if(Ts(e)!==e)throw Error(c(188))}function au(e){var t=e.alternate;if(!t){if(t=Ts(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var a=l.alternate;if(a===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return eo(l),e;if(a===r)return eo(l),t;a=a.sibling}throw Error(c(188))}if(n.return!==r.return)n=l,r=a;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=a;break}if(u===r){o=!0,r=l,n=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===n){o=!0,n=a,r=l;break}if(u===r){o=!0,r=a,n=l;break}u=u.sibling}if(!o)throw Error(c(189))}}if(n.alternate!==r)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function to(e){return e=au(e),e!==null?so(e):null}function so(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=so(e);if(t!==null)return t;e=e.sibling}return null}var no=d.unstable_scheduleCallback,ro=d.unstable_cancelCallback,iu=d.unstable_shouldYield,ou=d.unstable_requestPaint,Ge=d.unstable_now,cu=d.unstable_getCurrentPriorityLevel,Ql=d.unstable_ImmediatePriority,lo=d.unstable_UserBlockingPriority,Tr=d.unstable_NormalPriority,du=d.unstable_LowPriority,ao=d.unstable_IdlePriority,Pr=null,Ot=null;function uu(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Pr,e,void 0,(e.current.flags&128)===128)}catch{}}var Tt=Math.clz32?Math.clz32:xu,pu=Math.log,mu=Math.LN2;function xu(e){return e>>>=0,e===0?32:31-(pu(e)/mu|0)|0}var Mr=64,$r=4194304;function Ln(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ir(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=Ln(u):(a&=o,a!==0&&(r=Ln(a)))}else o=n&~l,o!==0?r=Ln(o):a!==0&&(r=Ln(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,a=t&-t,l>=a||l===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tt(t),l=1<<n,r|=e[n],t&=~l;return r}function fu(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Tt(a),u=1<<o,m=l[o];m===-1?((u&n)===0||(u&r)!==0)&&(l[o]=fu(u,t)):m<=t&&(e.expiredLanes|=u),a&=~u}}function ql(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function io(){var e=Mr;return Mr<<=1,(Mr&4194240)===0&&(Mr=64),e}function Kl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function gu(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Tt(n),a=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~a}}function Yl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var Re=0;function oo(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var co,Jl,uo,po,mo,Xl=!1,Ar=[],ns=null,rs=null,ls=null,zn=new Map,On=new Map,as=[],vu="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".split(" ");function xo(e,t){switch(e){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":rs=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":zn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":On.delete(t.pointerId)}}function Dn(e,t,n,r,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},t!==null&&(t=Zn(t),t!==null&&Jl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function yu(e,t,n,r,l){switch(t){case"focusin":return ns=Dn(ns,e,t,n,r,l),!0;case"dragenter":return rs=Dn(rs,e,t,n,r,l),!0;case"mouseover":return ls=Dn(ls,e,t,n,r,l),!0;case"pointerover":var a=l.pointerId;return zn.set(a,Dn(zn.get(a)||null,e,t,n,r,l)),!0;case"gotpointercapture":return a=l.pointerId,On.set(a,Dn(On.get(a)||null,e,t,n,r,l)),!0}return!1}function fo(e){var t=Ps(e.target);if(t!==null){var n=Ts(t);if(n!==null){if(t=n.tag,t===13){if(t=Zi(n),t!==null){e.blockedOn=t,mo(e.priority,function(){uo(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ea(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Tn=r,n.target.dispatchEvent(r),Tn=null}else return t=Zn(n),t!==null&&Jl(t),e.blockedOn=n,!1;t.shift()}return!0}function ho(e,t,n){Lr(e)&&n.delete(t)}function wu(){Xl=!1,ns!==null&&Lr(ns)&&(ns=null),rs!==null&&Lr(rs)&&(rs=null),ls!==null&&Lr(ls)&&(ls=null),zn.forEach(ho),On.forEach(ho)}function Fn(e,t){e.blockedOn===t&&(e.blockedOn=null,Xl||(Xl=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,wu)))}function Un(e){function t(l){return Fn(l,e)}if(0<Ar.length){Fn(Ar[0],e);for(var n=1;n<Ar.length;n++){var r=Ar[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ns!==null&&Fn(ns,e),rs!==null&&Fn(rs,e),ls!==null&&Fn(ls,e),zn.forEach(t),On.forEach(t),n=0;n<as.length;n++)r=as[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<as.length&&(n=as[0],n.blockedOn===null);)fo(n),n.blockedOn===null&&as.shift()}var Ys=Y.ReactCurrentBatchConfig,Rr=!0;function bu(e,t,n,r){var l=Re,a=Ys.transition;Ys.transition=null;try{Re=1,Zl(e,t,n,r)}finally{Re=l,Ys.transition=a}}function ju(e,t,n,r){var l=Re,a=Ys.transition;Ys.transition=null;try{Re=4,Zl(e,t,n,r)}finally{Re=l,Ys.transition=a}}function Zl(e,t,n,r){if(Rr){var l=ea(e,t,n,r);if(l===null)ga(e,t,r,zr,n),xo(e,r);else if(yu(l,e,t,n,r))r.stopPropagation();else if(xo(e,r),t&4&&-1<vu.indexOf(e)){for(;l!==null;){var a=Zn(l);if(a!==null&&co(a),a=ea(e,t,n,r),a===null&&ga(e,t,r,zr,n),a===l)break;l=a}l!==null&&r.stopPropagation()}else ga(e,t,r,null,n)}}var zr=null;function ea(e,t,n,r){if(zr=null,e=Pn(r),e=Ps(e),e!==null)if(t=Ts(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Zi(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return zr=e,null}function go(e){switch(e){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 1;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 4;case"message":switch(cu()){case Ql:return 1;case lo:return 4;case Tr:case du:return 16;case ao:return 536870912;default:return 16}default:return 16}}var is=null,ta=null,Or=null;function vo(){if(Or)return Or;var e,t=ta,n=t.length,r,l="value"in is?is.value:is.textContent,a=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===l[a-r];r++);return Or=l.slice(e,1<r?1-r:void 0)}function Dr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Fr(){return!0}function yo(){return!1}function vt(e){function t(n,r,l,a,o){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(a):a[u]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Fr:yo,this.isPropagationStopped=yo,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Fr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Fr)},persist:function(){},isPersistent:Fr}),t}var Js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sa=vt(Js),Vn=z({},Js,{view:0,detail:0}),Nu=vt(Vn),na,ra,Hn,Ur=z({},Vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:aa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hn&&(Hn&&e.type==="mousemove"?(na=e.screenX-Hn.screenX,ra=e.screenY-Hn.screenY):ra=na=0,Hn=e),na)},movementY:function(e){return"movementY"in e?e.movementY:ra}}),wo=vt(Ur),ku=z({},Ur,{dataTransfer:0}),Su=vt(ku),Cu=z({},Vn,{relatedTarget:0}),la=vt(Cu),_u=z({},Js,{animationName:0,elapsedTime:0,pseudoElement:0}),Eu=vt(_u),Tu=z({},Js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pu=vt(Tu),Mu=z({},Js,{data:0}),bo=vt(Mu),$u={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Iu={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"},Au={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lu(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Au[e])?!!t[e]:!1}function aa(){return Lu}var Ru=z({},Vn,{key:function(e){if(e.key){var t=$u[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Iu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:aa,charCode:function(e){return e.type==="keypress"?Dr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zu=vt(Ru),Ou=z({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jo=vt(Ou),Du=z({},Vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:aa}),Fu=vt(Du),Uu=z({},Js,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vu=vt(Uu),Hu=z({},Ur,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wu=vt(Hu),Bu=[9,13,27,32],ia=j&&"CompositionEvent"in window,Wn=null;j&&"documentMode"in document&&(Wn=document.documentMode);var Gu=j&&"TextEvent"in window&&!Wn,No=j&&(!ia||Wn&&8<Wn&&11>=Wn),ko=" ",So=!1;function Co(e,t){switch(e){case"keyup":return Bu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _o(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xs=!1;function Qu(e,t){switch(e){case"compositionend":return _o(t);case"keypress":return t.which!==32?null:(So=!0,ko);case"textInput":return e=t.data,e===ko&&So?null:e;default:return null}}function qu(e,t){if(Xs)return e==="compositionend"||!ia&&Co(e,t)?(e=vo(),Or=ta=is=null,Xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return No&&t.locale!=="ko"?null:t.data;default:return null}}var Ku={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 Eo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ku[e.type]:t==="textarea"}function To(e,t,n,r){Cr(r),t=Gr(t,"onChange"),0<t.length&&(n=new sa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bn=null,Gn=null;function Yu(e){Qo(e,0)}function Vr(e){var t=nn(e);if(le(t))return e}function Ju(e,t){if(e==="change")return t}var Po=!1;if(j){var oa;if(j){var ca="oninput"in document;if(!ca){var Mo=document.createElement("div");Mo.setAttribute("oninput","return;"),ca=typeof Mo.oninput=="function"}oa=ca}else oa=!1;Po=oa&&(!document.documentMode||9<document.documentMode)}function $o(){Bn&&(Bn.detachEvent("onpropertychange",Io),Gn=Bn=null)}function Io(e){if(e.propertyName==="value"&&Vr(Gn)){var t=[];To(t,Gn,e,Pn(e)),_(Yu,t)}}function Xu(e,t,n){e==="focusin"?($o(),Bn=t,Gn=n,Bn.attachEvent("onpropertychange",Io)):e==="focusout"&&$o()}function Zu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vr(Gn)}function e0(e,t){if(e==="click")return Vr(t)}function t0(e,t){if(e==="input"||e==="change")return Vr(t)}function s0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:s0;function Qn(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!$.call(t,l)||!Pt(e[l],t[l]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lo(e,t){var n=Ao(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ao(n)}}function Ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zo(){for(var e=window,t=A();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=A(e.document)}return t}function da(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function n0(e){var t=zo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ro(n.ownerDocument.documentElement,n)){if(r!==null&&da(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,a=Math.min(r.start,l);r=r.end===void 0?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=Lo(n,a);var o=Lo(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var r0=j&&"documentMode"in document&&11>=document.documentMode,Zs=null,ua=null,qn=null,pa=!1;function Oo(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pa||Zs==null||Zs!==A(r)||(r=Zs,"selectionStart"in r&&da(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qn&&Qn(qn,r)||(qn=r,r=Gr(ua,"onSelect"),0<r.length&&(t=new sa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zs)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var en={animationend:Hr("Animation","AnimationEnd"),animationiteration:Hr("Animation","AnimationIteration"),animationstart:Hr("Animation","AnimationStart"),transitionend:Hr("Transition","TransitionEnd")},ma={},Do={};j&&(Do=document.createElement("div").style,"AnimationEvent"in window||(delete en.animationend.animation,delete en.animationiteration.animation,delete en.animationstart.animation),"TransitionEvent"in window||delete en.transitionend.transition);function Wr(e){if(ma[e])return ma[e];if(!en[e])return e;var t=en[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Do)return ma[e]=t[n];return e}var Fo=Wr("animationend"),Uo=Wr("animationiteration"),Vo=Wr("animationstart"),Ho=Wr("transitionend"),Wo=new Map,Bo="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".split(" ");function os(e,t){Wo.set(e,t),h(t,[e])}for(var xa=0;xa<Bo.length;xa++){var fa=Bo[xa],l0=fa.toLowerCase(),a0=fa[0].toUpperCase()+fa.slice(1);os(l0,"on"+a0)}os(Fo,"onAnimationEnd"),os(Uo,"onAnimationIteration"),os(Vo,"onAnimationStart"),os("dblclick","onDoubleClick"),os("focusin","onFocus"),os("focusout","onBlur"),os(Ho,"onTransitionEnd"),C("onMouseEnter",["mouseout","mouseover"]),C("onMouseLeave",["mouseout","mouseover"]),C("onPointerEnter",["pointerout","pointerover"]),C("onPointerLeave",["pointerout","pointerover"]),h("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),h("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),h("onBeforeInput",["compositionend","keypress","textInput","paste"]),h("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),h("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),i0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kn));function Go(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Gl(r,t,void 0,e),e.currentTarget=null}function Qo(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],m=u.instance,N=u.currentTarget;if(u=u.listener,m!==a&&l.isPropagationStopped())break e;Go(l,u,N),a=m}else for(o=0;o<r.length;o++){if(u=r[o],m=u.instance,N=u.currentTarget,u=u.listener,m!==a&&l.isPropagationStopped())break e;Go(l,u,N),a=m}}}if(Ks)throw e=In,Ks=!1,In=null,e}function Fe(e,t){var n=t[Na];n===void 0&&(n=t[Na]=new Set);var r=e+"__bubble";n.has(r)||(qo(t,e,2,!1),n.add(r))}function ha(e,t,n){var r=0;t&&(r|=4),qo(n,e,r,t)}var Br="_reactListening"+Math.random().toString(36).slice(2);function Yn(e){if(!e[Br]){e[Br]=!0,b.forEach(function(n){n!=="selectionchange"&&(i0.has(n)||ha(n,!1,e),ha(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Br]||(t[Br]=!0,ha("selectionchange",!1,t))}}function qo(e,t,n,r){switch(go(t)){case 1:var l=bu;break;case 4:l=ju;break;default:l=Zl}n=l.bind(null,t,n,e),l=void 0,!K||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function ga(e,t,n,r,l){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===l||u.nodeType===8&&u.parentNode===l)break;if(o===4)for(o=r.return;o!==null;){var m=o.tag;if((m===3||m===4)&&(m=o.stateNode.containerInfo,m===l||m.nodeType===8&&m.parentNode===l))return;o=o.return}for(;u!==null;){if(o=Ps(u),o===null)return;if(m=o.tag,m===5||m===6){r=a=o;continue e}u=u.parentNode}}r=r.return}_(function(){var N=a,F=Pn(n),U=[];e:{var D=Wo.get(e);if(D!==void 0){var te=sa,ce=e;switch(e){case"keypress":if(Dr(n)===0)break e;case"keydown":case"keyup":te=zu;break;case"focusin":ce="focus",te=la;break;case"focusout":ce="blur",te=la;break;case"beforeblur":case"afterblur":te=la;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=wo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Su;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Fu;break;case Fo:case Uo:case Vo:te=Eu;break;case Ho:te=Vu;break;case"scroll":te=Nu;break;case"wheel":te=Wu;break;case"copy":case"cut":case"paste":te=Pu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=jo}var me=(t&4)!==0,Qe=!me&&e==="scroll",v=me?D!==null?D+"Capture":null:D;me=[];for(var x=N,y;x!==null;){y=x;var W=y.stateNode;if(y.tag===5&&W!==null&&(y=W,v!==null&&(W=J(x,v),W!=null&&me.push(Jn(x,W,y)))),Qe)break;x=x.return}0<me.length&&(D=new te(D,ce,null,n,F),U.push({event:D,listeners:me}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",D&&n!==Tn&&(ce=n.relatedTarget||n.fromElement)&&(Ps(ce)||ce[Qt]))break e;if((te||D)&&(D=F.window===F?F:(D=F.ownerDocument)?D.defaultView||D.parentWindow:window,te?(ce=n.relatedTarget||n.toElement,te=N,ce=ce?Ps(ce):null,ce!==null&&(Qe=Ts(ce),ce!==Qe||ce.tag!==5&&ce.tag!==6)&&(ce=null)):(te=null,ce=N),te!==ce)){if(me=wo,W="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(me=jo,W="onPointerLeave",v="onPointerEnter",x="pointer"),Qe=te==null?D:nn(te),y=ce==null?D:nn(ce),D=new me(W,x+"leave",te,n,F),D.target=Qe,D.relatedTarget=y,W=null,Ps(F)===N&&(me=new me(v,x+"enter",ce,n,F),me.target=y,me.relatedTarget=Qe,W=me),Qe=W,te&&ce)t:{for(me=te,v=ce,x=0,y=me;y;y=tn(y))x++;for(y=0,W=v;W;W=tn(W))y++;for(;0<x-y;)me=tn(me),x--;for(;0<y-x;)v=tn(v),y--;for(;x--;){if(me===v||v!==null&&me===v.alternate)break t;me=tn(me),v=tn(v)}me=null}else me=null;te!==null&&Ko(U,D,te,me,!1),ce!==null&&Qe!==null&&Ko(U,Qe,ce,me,!0)}}e:{if(D=N?nn(N):window,te=D.nodeName&&D.nodeName.toLowerCase(),te==="select"||te==="input"&&D.type==="file")var xe=Ju;else if(Eo(D))if(Po)xe=t0;else{xe=Zu;var ye=Xu}else(te=D.nodeName)&&te.toLowerCase()==="input"&&(D.type==="checkbox"||D.type==="radio")&&(xe=e0);if(xe&&(xe=xe(e,N))){To(U,xe,n,F);break e}ye&&ye(e,D,N),e==="focusout"&&(ye=D._wrapperState)&&ye.controlled&&D.type==="number"&&Je(D,"number",D.value)}switch(ye=N?nn(N):window,e){case"focusin":(Eo(ye)||ye.contentEditable==="true")&&(Zs=ye,ua=N,qn=null);break;case"focusout":qn=ua=Zs=null;break;case"mousedown":pa=!0;break;case"contextmenu":case"mouseup":case"dragend":pa=!1,Oo(U,n,F);break;case"selectionchange":if(r0)break;case"keydown":case"keyup":Oo(U,n,F)}var we;if(ia)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Xs?Co(e,n)&&(je="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(je="onCompositionStart");je&&(No&&n.locale!=="ko"&&(Xs||je!=="onCompositionStart"?je==="onCompositionEnd"&&Xs&&(we=vo()):(is=F,ta="value"in is?is.value:is.textContent,Xs=!0)),ye=Gr(N,je),0<ye.length&&(je=new bo(je,e,null,n,F),U.push({event:je,listeners:ye}),we?je.data=we:(we=_o(n),we!==null&&(je.data=we)))),(we=Gu?Qu(e,n):qu(e,n))&&(N=Gr(N,"onBeforeInput"),0<N.length&&(F=new bo("onBeforeInput","beforeinput",null,n,F),U.push({event:F,listeners:N}),F.data=we))}Qo(U,t)})}function Jn(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,a=l.stateNode;l.tag===5&&a!==null&&(l=a,a=J(e,n),a!=null&&r.unshift(Jn(e,a,l)),a=J(e,t),a!=null&&r.push(Jn(e,a,l))),e=e.return}return r}function tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ko(e,t,n,r,l){for(var a=t._reactName,o=[];n!==null&&n!==r;){var u=n,m=u.alternate,N=u.stateNode;if(m!==null&&m===r)break;u.tag===5&&N!==null&&(u=N,l?(m=J(n,a),m!=null&&o.unshift(Jn(n,m,u))):l||(m=J(n,a),m!=null&&o.push(Jn(n,m,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var o0=/\r\n?/g,c0=/\u0000|\uFFFD/g;function Yo(e){return(typeof e=="string"?e:""+e).replace(o0,`
|
|
38
|
+
`).replace(c0,"")}function Qr(e,t,n){if(t=Yo(t),Yo(e)!==t&&n)throw Error(c(425))}function qr(){}var va=null,ya=null;function wa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ba=typeof setTimeout=="function"?setTimeout:void 0,d0=typeof clearTimeout=="function"?clearTimeout:void 0,Jo=typeof Promise=="function"?Promise:void 0,u0=typeof queueMicrotask=="function"?queueMicrotask:typeof Jo<"u"?function(e){return Jo.resolve(null).then(e).catch(p0)}:ba;function p0(e){setTimeout(function(){throw e})}function ja(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Un(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Un(t)}function cs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Xo(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var sn=Math.random().toString(36).slice(2),Dt="__reactFiber$"+sn,Xn="__reactProps$"+sn,Qt="__reactContainer$"+sn,Na="__reactEvents$"+sn,m0="__reactListeners$"+sn,x0="__reactHandles$"+sn;function Ps(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qt]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xo(e);e!==null;){if(n=e[Dt])return n;e=Xo(e)}return t}e=n,n=e.parentNode}return null}function Zn(e){return e=e[Dt]||e[Qt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function nn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(c(33))}function Kr(e){return e[Xn]||null}var ka=[],rn=-1;function ds(e){return{current:e}}function Ue(e){0>rn||(e.current=ka[rn],ka[rn]=null,rn--)}function De(e,t){rn++,ka[rn]=e.current,e.current=t}var us={},rt=ds(us),dt=ds(!1),Ms=us;function ln(e,t){var n=e.type.contextTypes;if(!n)return us;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},a;for(a in n)l[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ut(e){return e=e.childContextTypes,e!=null}function Yr(){Ue(dt),Ue(rt)}function Zo(e,t,n){if(rt.current!==us)throw Error(c(168));De(rt,t),De(dt,n)}function ec(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(c(108,be(e)||"Unknown",l));return z({},n,r)}function Jr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||us,Ms=rt.current,De(rt,e),De(dt,dt.current),!0}function tc(e,t,n){var r=e.stateNode;if(!r)throw Error(c(169));n?(e=ec(e,t,Ms),r.__reactInternalMemoizedMergedChildContext=e,Ue(dt),Ue(rt),De(rt,e)):Ue(dt),De(dt,n)}var qt=null,Xr=!1,Sa=!1;function sc(e){qt===null?qt=[e]:qt.push(e)}function f0(e){Xr=!0,sc(e)}function ps(){if(!Sa&&qt!==null){Sa=!0;var e=0,t=Re;try{var n=qt;for(Re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}qt=null,Xr=!1}catch(l){throw qt!==null&&(qt=qt.slice(e+1)),no(Ql,ps),l}finally{Re=t,Sa=!1}}return null}var an=[],on=0,Zr=null,el=0,jt=[],Nt=0,$s=null,Kt=1,Yt="";function Is(e,t){an[on++]=el,an[on++]=Zr,Zr=e,el=t}function nc(e,t,n){jt[Nt++]=Kt,jt[Nt++]=Yt,jt[Nt++]=$s,$s=e;var r=Kt;e=Yt;var l=32-Tt(r)-1;r&=~(1<<l),n+=1;var a=32-Tt(t)+l;if(30<a){var o=l-l%5;a=(r&(1<<o)-1).toString(32),r>>=o,l-=o,Kt=1<<32-Tt(t)+l|n<<l|r,Yt=a+e}else Kt=1<<a|n<<l|r,Yt=e}function Ca(e){e.return!==null&&(Is(e,1),nc(e,1,0))}function _a(e){for(;e===Zr;)Zr=an[--on],an[on]=null,el=an[--on],an[on]=null;for(;e===$s;)$s=jt[--Nt],jt[Nt]=null,Yt=jt[--Nt],jt[Nt]=null,Kt=jt[--Nt],jt[Nt]=null}var yt=null,wt=null,Ve=!1,Mt=null;function rc(e,t){var n=_t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function lc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yt=e,wt=cs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yt=e,wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=$s!==null?{id:Kt,overflow:Yt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=_t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yt=e,wt=null,!0):!1;default:return!1}}function Ea(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ta(e){if(Ve){var t=wt;if(t){var n=t;if(!lc(e,t)){if(Ea(e))throw Error(c(418));t=cs(n.nextSibling);var r=yt;t&&lc(e,t)?rc(r,n):(e.flags=e.flags&-4097|2,Ve=!1,yt=e)}}else{if(Ea(e))throw Error(c(418));e.flags=e.flags&-4097|2,Ve=!1,yt=e}}}function ac(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yt=e}function tl(e){if(e!==yt)return!1;if(!Ve)return ac(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wa(e.type,e.memoizedProps)),t&&(t=wt)){if(Ea(e))throw ic(),Error(c(418));for(;t;)rc(e,t),t=cs(t.nextSibling)}if(ac(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){wt=cs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=yt?cs(e.stateNode.nextSibling):null;return!0}function ic(){for(var e=wt;e;)e=cs(e.nextSibling)}function cn(){wt=yt=null,Ve=!1}function Pa(e){Mt===null?Mt=[e]:Mt.push(e)}var h0=Y.ReactCurrentBatchConfig;function er(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(c(309));var r=n.stateNode}if(!r)throw Error(c(147,e));var l=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var u=l.refs;o===null?delete u[a]:u[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(c(284));if(!n._owner)throw Error(c(290,e))}return e}function sl(e,t){throw e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function oc(e){var t=e._init;return t(e._payload)}function cc(e){function t(v,x){if(e){var y=v.deletions;y===null?(v.deletions=[x],v.flags|=16):y.push(x)}}function n(v,x){if(!e)return null;for(;x!==null;)t(v,x),x=x.sibling;return null}function r(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function l(v,x){return v=ws(v,x),v.index=0,v.sibling=null,v}function a(v,x,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<x?(v.flags|=2,x):y):(v.flags|=2,x)):(v.flags|=1048576,x)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function u(v,x,y,W){return x===null||x.tag!==6?(x=bi(y,v.mode,W),x.return=v,x):(x=l(x,y),x.return=v,x)}function m(v,x,y,W){var xe=y.type;return xe===Ee?F(v,x,y.props.children,W,y.key):x!==null&&(x.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ue&&oc(xe)===x.type)?(W=l(x,y.props),W.ref=er(v,x,y),W.return=v,W):(W=Cl(y.type,y.key,y.props,null,v.mode,W),W.ref=er(v,x,y),W.return=v,W)}function N(v,x,y,W){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=ji(y,v.mode,W),x.return=v,x):(x=l(x,y.children||[]),x.return=v,x)}function F(v,x,y,W,xe){return x===null||x.tag!==7?(x=Us(y,v.mode,W,xe),x.return=v,x):(x=l(x,y),x.return=v,x)}function U(v,x,y){if(typeof x=="string"&&x!==""||typeof x=="number")return x=bi(""+x,v.mode,y),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case oe:return y=Cl(x.type,x.key,x.props,null,v.mode,y),y.ref=er(v,null,x),y.return=v,y;case X:return x=ji(x,v.mode,y),x.return=v,x;case ue:var W=x._init;return U(v,W(x._payload),y)}if(Rt(x)||P(x))return x=Us(x,v.mode,y,null),x.return=v,x;sl(v,x)}return null}function D(v,x,y,W){var xe=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return xe!==null?null:u(v,x,""+y,W);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case oe:return y.key===xe?m(v,x,y,W):null;case X:return y.key===xe?N(v,x,y,W):null;case ue:return xe=y._init,D(v,x,xe(y._payload),W)}if(Rt(y)||P(y))return xe!==null?null:F(v,x,y,W,null);sl(v,y)}return null}function te(v,x,y,W,xe){if(typeof W=="string"&&W!==""||typeof W=="number")return v=v.get(y)||null,u(x,v,""+W,xe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case oe:return v=v.get(W.key===null?y:W.key)||null,m(x,v,W,xe);case X:return v=v.get(W.key===null?y:W.key)||null,N(x,v,W,xe);case ue:var ye=W._init;return te(v,x,y,ye(W._payload),xe)}if(Rt(W)||P(W))return v=v.get(y)||null,F(x,v,W,xe,null);sl(x,W)}return null}function ce(v,x,y,W){for(var xe=null,ye=null,we=x,je=x=0,et=null;we!==null&&je<y.length;je++){we.index>je?(et=we,we=null):et=we.sibling;var Ae=D(v,we,y[je],W);if(Ae===null){we===null&&(we=et);break}e&&we&&Ae.alternate===null&&t(v,we),x=a(Ae,x,je),ye===null?xe=Ae:ye.sibling=Ae,ye=Ae,we=et}if(je===y.length)return n(v,we),Ve&&Is(v,je),xe;if(we===null){for(;je<y.length;je++)we=U(v,y[je],W),we!==null&&(x=a(we,x,je),ye===null?xe=we:ye.sibling=we,ye=we);return Ve&&Is(v,je),xe}for(we=r(v,we);je<y.length;je++)et=te(we,v,je,y[je],W),et!==null&&(e&&et.alternate!==null&&we.delete(et.key===null?je:et.key),x=a(et,x,je),ye===null?xe=et:ye.sibling=et,ye=et);return e&&we.forEach(function(bs){return t(v,bs)}),Ve&&Is(v,je),xe}function me(v,x,y,W){var xe=P(y);if(typeof xe!="function")throw Error(c(150));if(y=xe.call(y),y==null)throw Error(c(151));for(var ye=xe=null,we=x,je=x=0,et=null,Ae=y.next();we!==null&&!Ae.done;je++,Ae=y.next()){we.index>je?(et=we,we=null):et=we.sibling;var bs=D(v,we,Ae.value,W);if(bs===null){we===null&&(we=et);break}e&&we&&bs.alternate===null&&t(v,we),x=a(bs,x,je),ye===null?xe=bs:ye.sibling=bs,ye=bs,we=et}if(Ae.done)return n(v,we),Ve&&Is(v,je),xe;if(we===null){for(;!Ae.done;je++,Ae=y.next())Ae=U(v,Ae.value,W),Ae!==null&&(x=a(Ae,x,je),ye===null?xe=Ae:ye.sibling=Ae,ye=Ae);return Ve&&Is(v,je),xe}for(we=r(v,we);!Ae.done;je++,Ae=y.next())Ae=te(we,v,je,Ae.value,W),Ae!==null&&(e&&Ae.alternate!==null&&we.delete(Ae.key===null?je:Ae.key),x=a(Ae,x,je),ye===null?xe=Ae:ye.sibling=Ae,ye=Ae);return e&&we.forEach(function(K0){return t(v,K0)}),Ve&&Is(v,je),xe}function Qe(v,x,y,W){if(typeof y=="object"&&y!==null&&y.type===Ee&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case oe:e:{for(var xe=y.key,ye=x;ye!==null;){if(ye.key===xe){if(xe=y.type,xe===Ee){if(ye.tag===7){n(v,ye.sibling),x=l(ye,y.props.children),x.return=v,v=x;break e}}else if(ye.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ue&&oc(xe)===ye.type){n(v,ye.sibling),x=l(ye,y.props),x.ref=er(v,ye,y),x.return=v,v=x;break e}n(v,ye);break}else t(v,ye);ye=ye.sibling}y.type===Ee?(x=Us(y.props.children,v.mode,W,y.key),x.return=v,v=x):(W=Cl(y.type,y.key,y.props,null,v.mode,W),W.ref=er(v,x,y),W.return=v,v=W)}return o(v);case X:e:{for(ye=y.key;x!==null;){if(x.key===ye)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(v,x.sibling),x=l(x,y.children||[]),x.return=v,v=x;break e}else{n(v,x);break}else t(v,x);x=x.sibling}x=ji(y,v.mode,W),x.return=v,v=x}return o(v);case ue:return ye=y._init,Qe(v,x,ye(y._payload),W)}if(Rt(y))return ce(v,x,y,W);if(P(y))return me(v,x,y,W);sl(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(v,x.sibling),x=l(x,y),x.return=v,v=x):(n(v,x),x=bi(y,v.mode,W),x.return=v,v=x),o(v)):n(v,x)}return Qe}var dn=cc(!0),dc=cc(!1),nl=ds(null),rl=null,un=null,Ma=null;function $a(){Ma=un=rl=null}function Ia(e){var t=nl.current;Ue(nl),e._currentValue=t}function Aa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pn(e,t){rl=e,Ma=un=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(pt=!0),e.firstContext=null)}function kt(e){var t=e._currentValue;if(Ma!==e)if(e={context:e,memoizedValue:t,next:null},un===null){if(rl===null)throw Error(c(308));un=e,rl.dependencies={lanes:0,firstContext:e}}else un=un.next=e;return t}var As=null;function La(e){As===null?As=[e]:As.push(e)}function uc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,La(t)):(n.next=l.next,l.next=n),t.interleaved=n,Jt(e,r)}function Jt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ms=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ie&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Jt(e,n)}return l=r.interleaved,l===null?(t.next=t,La(r)):(t.next=l.next,l.next=t),r.interleaved=t,Jt(e,n)}function ll(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}function mc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?l=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?l=a=t:a=a.next=t}else l=a=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function al(e,t,n,r){var l=e.updateQueue;ms=!1;var a=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var m=u,N=m.next;m.next=null,o===null?a=N:o.next=N,o=m;var F=e.alternate;F!==null&&(F=F.updateQueue,u=F.lastBaseUpdate,u!==o&&(u===null?F.firstBaseUpdate=N:u.next=N,F.lastBaseUpdate=m))}if(a!==null){var U=l.baseState;o=0,F=N=m=null,u=a;do{var D=u.lane,te=u.eventTime;if((r&D)===D){F!==null&&(F=F.next={eventTime:te,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var ce=e,me=u;switch(D=t,te=n,me.tag){case 1:if(ce=me.payload,typeof ce=="function"){U=ce.call(te,U,D);break e}U=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=me.payload,D=typeof ce=="function"?ce.call(te,U,D):ce,D==null)break e;U=z({},U,D);break e;case 2:ms=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,D=l.effects,D===null?l.effects=[u]:D.push(u))}else te={eventTime:te,lane:D,tag:u.tag,payload:u.payload,callback:u.callback,next:null},F===null?(N=F=te,m=U):F=F.next=te,o|=D;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;D=u,u=D.next,D.next=null,l.lastBaseUpdate=D,l.shared.pending=null}}while(!0);if(F===null&&(m=U),l.baseState=m,l.firstBaseUpdate=N,l.lastBaseUpdate=F,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else a===null&&(l.shared.lanes=0);zs|=o,e.lanes=o,e.memoizedState=U}}function xc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(c(191,l));l.call(r)}}}var tr={},Ft=ds(tr),sr=ds(tr),nr=ds(tr);function Ls(e){if(e===tr)throw Error(c(174));return e}function za(e,t){switch(De(nr,t),De(sr,e),De(Ft,tr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gs(t,e)}Ue(Ft),De(Ft,t)}function mn(){Ue(Ft),Ue(sr),Ue(nr)}function fc(e){Ls(nr.current);var t=Ls(Ft.current),n=Gs(t,e.type);t!==n&&(De(sr,e),De(Ft,n))}function Oa(e){sr.current===e&&(Ue(Ft),Ue(sr))}var He=ds(0);function il(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Da=[];function Fa(){for(var e=0;e<Da.length;e++)Da[e]._workInProgressVersionPrimary=null;Da.length=0}var ol=Y.ReactCurrentDispatcher,Ua=Y.ReactCurrentBatchConfig,Rs=0,We=null,Ke=null,Xe=null,cl=!1,rr=!1,lr=0,g0=0;function lt(){throw Error(c(321))}function Va(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function Ha(e,t,n,r,l,a){if(Rs=a,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ol.current=e===null||e.memoizedState===null?b0:j0,e=n(r,l),rr){a=0;do{if(rr=!1,lr=0,25<=a)throw Error(c(301));a+=1,Xe=Ke=null,t.updateQueue=null,ol.current=N0,e=n(r,l)}while(rr)}if(ol.current=pl,t=Ke!==null&&Ke.next!==null,Rs=0,Xe=Ke=We=null,cl=!1,t)throw Error(c(300));return e}function Wa(){var e=lr!==0;return lr=0,e}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?We.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function St(){if(Ke===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=Xe===null?We.memoizedState:Xe.next;if(t!==null)Xe=t,Ke=e;else{if(e===null)throw Error(c(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},Xe===null?We.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function ar(e,t){return typeof t=="function"?t(e):t}function Ba(e){var t=St(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var r=Ke,l=r.baseQueue,a=n.pending;if(a!==null){if(l!==null){var o=l.next;l.next=a.next,a.next=o}r.baseQueue=l=a,n.pending=null}if(l!==null){a=l.next,r=r.baseState;var u=o=null,m=null,N=a;do{var F=N.lane;if((Rs&F)===F)m!==null&&(m=m.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),r=N.hasEagerState?N.eagerState:e(r,N.action);else{var U={lane:F,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};m===null?(u=m=U,o=r):m=m.next=U,We.lanes|=F,zs|=F}N=N.next}while(N!==null&&N!==a);m===null?o=r:m.next=u,Pt(r,t.memoizedState)||(pt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=m,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do a=l.lane,We.lanes|=a,zs|=a,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ga(e){var t=St(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,a=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do a=e(a,o.action),o=o.next;while(o!==l);Pt(a,t.memoizedState)||(pt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function hc(){}function gc(e,t){var n=We,r=St(),l=t(),a=!Pt(r.memoizedState,l);if(a&&(r.memoizedState=l,pt=!0),r=r.queue,Qa(wc.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,ir(9,yc.bind(null,n,r,l,t),void 0,null),Ze===null)throw Error(c(349));(Rs&30)!==0||vc(n,t,l)}return l}function vc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function yc(e,t,n,r){t.value=n,t.getSnapshot=r,bc(t)&&jc(e)}function wc(e,t,n){return n(function(){bc(t)&&jc(e)})}function bc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function jc(e){var t=Jt(e,1);t!==null&&Lt(t,e,1,-1)}function Nc(e){var t=Ut();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:e},t.queue=e,e=e.dispatch=w0.bind(null,We,e),[t.memoizedState,e]}function ir(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function kc(){return St().memoizedState}function dl(e,t,n,r){var l=Ut();We.flags|=e,l.memoizedState=ir(1|t,n,void 0,r===void 0?null:r)}function ul(e,t,n,r){var l=St();r=r===void 0?null:r;var a=void 0;if(Ke!==null){var o=Ke.memoizedState;if(a=o.destroy,r!==null&&Va(r,o.deps)){l.memoizedState=ir(t,n,a,r);return}}We.flags|=e,l.memoizedState=ir(1|t,n,a,r)}function Sc(e,t){return dl(8390656,8,e,t)}function Qa(e,t){return ul(2048,8,e,t)}function Cc(e,t){return ul(4,2,e,t)}function _c(e,t){return ul(4,4,e,t)}function Ec(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tc(e,t,n){return n=n!=null?n.concat([e]):null,ul(4,4,Ec.bind(null,t,e),n)}function qa(){}function Pc(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Va(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mc(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Va(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $c(e,t,n){return(Rs&21)===0?(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n):(Pt(n,t)||(n=io(),We.lanes|=n,zs|=n,e.baseState=!0),t)}function v0(e,t){var n=Re;Re=n!==0&&4>n?n:4,e(!0);var r=Ua.transition;Ua.transition={};try{e(!1),t()}finally{Re=n,Ua.transition=r}}function Ic(){return St().memoizedState}function y0(e,t,n){var r=vs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ac(e))Lc(t,n);else if(n=uc(e,t,n,r),n!==null){var l=ct();Lt(n,e,r,l),Rc(n,t,r)}}function w0(e,t,n){var r=vs(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ac(e))Lc(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,u=a(o,n);if(l.hasEagerState=!0,l.eagerState=u,Pt(u,o)){var m=t.interleaved;m===null?(l.next=l,La(t)):(l.next=m.next,m.next=l),t.interleaved=l;return}}catch{}finally{}n=uc(e,t,l,r),n!==null&&(l=ct(),Lt(n,e,r,l),Rc(n,t,r))}}function Ac(e){var t=e.alternate;return e===We||t!==null&&t===We}function Lc(e,t){rr=cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}var pl={readContext:kt,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},b0={readContext:kt,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dl(4194308,4,Ec.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return dl(4,2,e,t)},useMemo:function(e,t){var n=Ut();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ut();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=y0.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:Nc,useDebugValue:qa,useDeferredValue:function(e){return Ut().memoizedState=e},useTransition:function(){var e=Nc(!1),t=e[0];return e=v0.bind(null,e[1]),Ut().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,l=Ut();if(Ve){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ze===null)throw Error(c(349));(Rs&30)!==0||vc(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,Sc(wc.bind(null,r,a,e),[e]),r.flags|=2048,ir(9,yc.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ut(),t=Ze.identifierPrefix;if(Ve){var n=Yt,r=Kt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=g0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},j0={readContext:kt,useCallback:Pc,useContext:kt,useEffect:Qa,useImperativeHandle:Tc,useInsertionEffect:Cc,useLayoutEffect:_c,useMemo:Mc,useReducer:Ba,useRef:kc,useState:function(){return Ba(ar)},useDebugValue:qa,useDeferredValue:function(e){var t=St();return $c(t,Ke.memoizedState,e)},useTransition:function(){var e=Ba(ar)[0],t=St().memoizedState;return[e,t]},useMutableSource:hc,useSyncExternalStore:gc,useId:Ic,unstable_isNewReconciler:!1},N0={readContext:kt,useCallback:Pc,useContext:kt,useEffect:Qa,useImperativeHandle:Tc,useInsertionEffect:Cc,useLayoutEffect:_c,useMemo:Mc,useReducer:Ga,useRef:kc,useState:function(){return Ga(ar)},useDebugValue:qa,useDeferredValue:function(e){var t=St();return Ke===null?t.memoizedState=e:$c(t,Ke.memoizedState,e)},useTransition:function(){var e=Ga(ar)[0],t=St().memoizedState;return[e,t]},useMutableSource:hc,useSyncExternalStore:gc,useId:Ic,unstable_isNewReconciler:!1};function $t(e,t){if(e&&e.defaultProps){t=z({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ka(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ml={isMounted:function(e){return(e=e._reactInternals)?Ts(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ct(),l=vs(e),a=Xt(r,l);a.payload=t,n!=null&&(a.callback=n),t=xs(e,a,l),t!==null&&(Lt(t,e,l,r),ll(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ct(),l=vs(e),a=Xt(r,l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=xs(e,a,l),t!==null&&(Lt(t,e,l,r),ll(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),r=vs(e),l=Xt(n,r);l.tag=2,t!=null&&(l.callback=t),t=xs(e,l,r),t!==null&&(Lt(t,e,r,n),ll(t,e,r))}};function zc(e,t,n,r,l,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Qn(n,r)||!Qn(l,a):!0}function Oc(e,t,n){var r=!1,l=us,a=t.contextType;return typeof a=="object"&&a!==null?a=kt(a):(l=ut(t)?Ms:rt.current,r=t.contextTypes,a=(r=r!=null)?ln(e,l):us),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ml,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function Dc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ml.enqueueReplaceState(t,t.state,null)}function Ya(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ra(e);var a=t.contextType;typeof a=="object"&&a!==null?l.context=kt(a):(a=ut(t)?Ms:rt.current,l.context=ln(e,a)),l.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Ka(e,t,a,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&ml.enqueueReplaceState(l,l.state,null),al(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function xn(e,t){try{var n="",r=t;do n+=de(r),r=r.return;while(r);var l=n}catch(a){l=`
|
|
39
|
+
Error generating stack: `+a.message+`
|
|
40
|
+
`+a.stack}return{value:e,source:t,stack:l,digest:null}}function Ja(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var k0=typeof WeakMap=="function"?WeakMap:Map;function Fc(e,t,n){n=Xt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){wl||(wl=!0,mi=r),Xa(e,t)},n}function Uc(e,t,n){n=Xt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Xa(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Xa(e,t),typeof r!="function"&&(hs===null?hs=new Set([this]):hs.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Vc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new k0;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=O0.bind(null,e,t,n),t.then(e,e))}function Hc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wc(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xt(-1,1),t.tag=2,xs(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var S0=Y.ReactCurrentOwner,pt=!1;function ot(e,t,n,r){t.child=e===null?dc(t,null,n,r):dn(t,e.child,n,r)}function Bc(e,t,n,r,l){n=n.render;var a=t.ref;return pn(t,l),r=Ha(e,t,n,r,a,l),n=Wa(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zt(e,t,l)):(Ve&&n&&Ca(t),t.flags|=1,ot(e,t,r,l),t.child)}function Gc(e,t,n,r,l){if(e===null){var a=n.type;return typeof a=="function"&&!wi(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Qc(e,t,a,r,l)):(e=Cl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&l)===0){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Qn,n(o,r)&&e.ref===t.ref)return Zt(e,t,l)}return t.flags|=1,e=ws(a,r),e.ref=t.ref,e.return=t,t.child=e}function Qc(e,t,n,r,l){if(e!==null){var a=e.memoizedProps;if(Qn(a,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=a,(e.lanes&l)!==0)(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,Zt(e,t,l)}return Za(e,t,n,r,l)}function qc(e,t,n){var r=t.pendingProps,l=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(hn,bt),bt|=n;else{if((n&1073741824)===0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(hn,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,De(hn,bt),bt|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,De(hn,bt),bt|=r;return ot(e,t,l,n),t.child}function Kc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Za(e,t,n,r,l){var a=ut(n)?Ms:rt.current;return a=ln(t,a),pn(t,l),n=Ha(e,t,n,r,a,l),r=Wa(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zt(e,t,l)):(Ve&&r&&Ca(t),t.flags|=1,ot(e,t,n,l),t.child)}function Yc(e,t,n,r,l){if(ut(n)){var a=!0;Jr(t)}else a=!1;if(pn(t,l),t.stateNode===null)fl(e,t),Oc(t,n,r),Ya(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var m=o.context,N=n.contextType;typeof N=="object"&&N!==null?N=kt(N):(N=ut(n)?Ms:rt.current,N=ln(t,N));var F=n.getDerivedStateFromProps,U=typeof F=="function"||typeof o.getSnapshotBeforeUpdate=="function";U||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||m!==N)&&Dc(t,o,r,N),ms=!1;var D=t.memoizedState;o.state=D,al(t,r,o,l),m=t.memoizedState,u!==r||D!==m||dt.current||ms?(typeof F=="function"&&(Ka(t,n,F,r),m=t.memoizedState),(u=ms||zc(t,n,u,r,D,m,N))?(U||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=N,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,pc(e,t),u=t.memoizedProps,N=t.type===t.elementType?u:$t(t.type,u),o.props=N,U=t.pendingProps,D=o.context,m=n.contextType,typeof m=="object"&&m!==null?m=kt(m):(m=ut(n)?Ms:rt.current,m=ln(t,m));var te=n.getDerivedStateFromProps;(F=typeof te=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==U||D!==m)&&Dc(t,o,r,m),ms=!1,D=t.memoizedState,o.state=D,al(t,r,o,l);var ce=t.memoizedState;u!==U||D!==ce||dt.current||ms?(typeof te=="function"&&(Ka(t,n,te,r),ce=t.memoizedState),(N=ms||zc(t,n,N,r,D,ce,m)||!1)?(F||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,ce,m),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,ce,m)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=ce),o.props=r,o.state=ce,o.context=m,r=N):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),r=!1)}return ei(e,t,n,r,a,l)}function ei(e,t,n,r,l,a){Kc(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&tc(t,n,!1),Zt(e,t,a);r=t.stateNode,S0.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=dn(t,e.child,null,a),t.child=dn(t,null,u,a)):ot(e,t,u,a),t.memoizedState=r.state,l&&tc(t,n,!0),t.child}function Jc(e){var t=e.stateNode;t.pendingContext?Zo(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Zo(e,t.context,!1),za(e,t.containerInfo)}function Xc(e,t,n,r,l){return cn(),Pa(l),t.flags|=256,ot(e,t,n,r),t.child}var ti={dehydrated:null,treeContext:null,retryLane:0};function si(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zc(e,t,n){var r=t.pendingProps,l=He.current,a=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),De(He,l&1),e===null)return Ta(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},(r&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=o):a=_l(o,r,0,null),e=Us(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=si(n),t.memoizedState=ti,e):ni(t,o));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return C0(e,t,o,r,u,l,n);if(a){a=r.fallback,o=t.mode,l=e.child,u=l.sibling;var m={mode:"hidden",children:r.children};return(o&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=m,t.deletions=null):(r=ws(l,m),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?a=ws(u,a):(a=Us(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?si(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ti,r}return a=e.child,e=a.sibling,r=ws(a,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ni(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xl(e,t,n,r){return r!==null&&Pa(r),dn(t,e.child,null,n),e=ni(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function C0(e,t,n,r,l,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Ja(Error(c(422))),xl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,l=t.mode,r=_l({mode:"visible",children:r.children},l,0,null),a=Us(a,l,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!==0&&dn(t,e.child,null,o),t.child.memoizedState=si(o),t.memoizedState=ti,a);if((t.mode&1)===0)return xl(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,a=Error(c(419)),r=Ja(a,r,void 0),xl(e,t,o,r)}if(u=(o&e.childLanes)!==0,pt||u){if(r=Ze,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|o))!==0?0:l,l!==0&&l!==a.retryLane&&(a.retryLane=l,Jt(e,l),Lt(r,e,l,-1))}return yi(),r=Ja(Error(c(421))),xl(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=D0.bind(null,e),l._reactRetry=t,null):(e=a.treeContext,wt=cs(l.nextSibling),yt=t,Ve=!0,Mt=null,e!==null&&(jt[Nt++]=Kt,jt[Nt++]=Yt,jt[Nt++]=$s,Kt=e.id,Yt=e.overflow,$s=t),t=ni(t,r.children),t.flags|=4096,t)}function ed(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Aa(e.return,t,n)}function ri(e,t,n,r,l){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function td(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(ot(e,t,r.children,n),r=He.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ed(e,n,t);else if(e.tag===19)ed(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(He,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&il(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ri(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&il(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ri(t,!0,n,null,a);break;case"together":ri(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zs|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=ws(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ws(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _0(e,t,n){switch(t.tag){case 3:Jc(t),cn();break;case 5:fc(t);break;case 1:ut(t.type)&&Jr(t);break;case 4:za(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;De(nl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(He,He.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Zc(e,t,n):(De(He,He.current&1),e=Zt(e,t,n),e!==null?e.sibling:null);De(He,He.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return td(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),De(He,He.current),r)break;return null;case 22:case 23:return t.lanes=0,qc(e,t,n)}return Zt(e,t,n)}var sd,li,nd,rd;sd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},li=function(){},nd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Ls(Ft.current);var a=null;switch(n){case"input":l=S(e,l),r=S(e,r),a=[];break;case"select":l=z({},l,{value:void 0}),r=z({},r,{value:void 0}),a=[];break;case"textarea":l=Et(e,l),r=Et(e,r),a=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=qr)}En(n,r);var o;n=null;for(N in l)if(!r.hasOwnProperty(N)&&l.hasOwnProperty(N)&&l[N]!=null)if(N==="style"){var u=l[N];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(g.hasOwnProperty(N)?a||(a=[]):(a=a||[]).push(N,null));for(N in r){var m=r[N];if(u=l!=null?l[N]:void 0,r.hasOwnProperty(N)&&m!==u&&(m!=null||u!=null))if(N==="style")if(u){for(o in u)!u.hasOwnProperty(o)||m&&m.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in m)m.hasOwnProperty(o)&&u[o]!==m[o]&&(n||(n={}),n[o]=m[o])}else n||(a||(a=[]),a.push(N,n)),n=m;else N==="dangerouslySetInnerHTML"?(m=m?m.__html:void 0,u=u?u.__html:void 0,m!=null&&u!==m&&(a=a||[]).push(N,m)):N==="children"?typeof m!="string"&&typeof m!="number"||(a=a||[]).push(N,""+m):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(g.hasOwnProperty(N)?(m!=null&&N==="onScroll"&&Fe("scroll",e),a||u===m||(a=[])):(a=a||[]).push(N,m))}n&&(a=a||[]).push("style",n);var N=a;(t.updateQueue=N)&&(t.flags|=4)}},rd=function(e,t,n,r){n!==r&&(t.flags|=4)};function or(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function E0(e,t,n){var r=t.pendingProps;switch(_a(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return ut(t.type)&&Yr(),at(t),null;case 3:return r=t.stateNode,mn(),Ue(dt),Ue(rt),Fa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mt!==null&&(hi(Mt),Mt=null))),li(e,t),at(t),null;case 5:Oa(t);var l=Ls(nr.current);if(n=t.type,e!==null&&t.stateNode!=null)nd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(c(166));return at(t),null}if(e=Ls(Ft.current),tl(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Dt]=t,r[Xn]=a,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(l=0;l<Kn.length;l++)Fe(Kn[l],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":k(r,a),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fe("invalid",r);break;case"textarea":Wt(r,a),Fe("invalid",r)}En(n,a),l=null;for(var o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="children"?typeof u=="string"?r.textContent!==u&&(a.suppressHydrationWarning!==!0&&Qr(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(a.suppressHydrationWarning!==!0&&Qr(r.textContent,u,e),l=["children",""+u]):g.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&Fe("scroll",r)}switch(n){case"input":ze(r),gt(r,a,!0);break;case"textarea":ze(r),Sn(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=qr)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kr(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Dt]=t,e[Xn]=r,sd(e,t,!1,!1),t.stateNode=e;e:{switch(o=Qs(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),l=r;break;case"iframe":case"object":case"embed":Fe("load",e),l=r;break;case"video":case"audio":for(l=0;l<Kn.length;l++)Fe(Kn[l],e);l=r;break;case"source":Fe("error",e),l=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),l=r;break;case"details":Fe("toggle",e),l=r;break;case"input":k(e,r),l=S(e,r),Fe("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=z({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":Wt(e,r),l=Et(e,r),Fe("invalid",e);break;default:l=r}En(n,l),u=l;for(a in u)if(u.hasOwnProperty(a)){var m=u[a];a==="style"?Sr(e,m):a==="dangerouslySetInnerHTML"?(m=m?m.__html:void 0,m!=null&&Cn(e,m)):a==="children"?typeof m=="string"?(n!=="textarea"||m!=="")&&Cs(e,m):typeof m=="number"&&Cs(e,""+m):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(g.hasOwnProperty(a)?m!=null&&a==="onScroll"&&Fe("scroll",e):m!=null&&ae(e,a,m,o))}switch(n){case"input":ze(e),gt(e,r,!1);break;case"textarea":ze(e),Sn(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ve(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Le(e,!!r.multiple,a,!1):r.defaultValue!=null&&Le(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return at(t),null;case 6:if(e&&t.stateNode!=null)rd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(c(166));if(n=Ls(nr.current),Ls(Ft.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Dt]=t,(a=r.nodeValue!==n)&&(e=yt,e!==null))switch(e.tag){case 3:Qr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qr(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Dt]=t,t.stateNode=r}return at(t),null;case 13:if(Ue(He),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&wt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ic(),cn(),t.flags|=98560,a=!1;else if(a=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Dt]=t}else cn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),a=!1}else Mt!==null&&(hi(Mt),Mt=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(He.current&1)!==0?Ye===0&&(Ye=3):yi())),t.updateQueue!==null&&(t.flags|=4),at(t),null);case 4:return mn(),li(e,t),e===null&&Yn(t.stateNode.containerInfo),at(t),null;case 10:return Ia(t.type._context),at(t),null;case 17:return ut(t.type)&&Yr(),at(t),null;case 19:if(Ue(He),a=t.memoizedState,a===null)return at(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)or(a,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=il(e),o!==null){for(t.flags|=128,or(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(He,He.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ge()>gn&&(t.flags|=128,r=!0,or(a,!1),t.lanes=4194304)}else{if(!r)if(e=il(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ve)return at(t),null}else 2*Ge()-a.renderingStartTime>gn&&n!==1073741824&&(t.flags|=128,r=!0,or(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ge(),t.sibling=null,n=He.current,De(He,r?n&1|2:n&1),t):(at(t),null);case 22:case 23:return vi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(bt&1073741824)!==0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),null;case 24:return null;case 25:return null}throw Error(c(156,t.tag))}function T0(e,t){switch(_a(t),t.tag){case 1:return ut(t.type)&&Yr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mn(),Ue(dt),Ue(rt),Fa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oa(t),null;case 13:if(Ue(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));cn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(He),null;case 4:return mn(),null;case 10:return Ia(t.type._context),null;case 22:case 23:return vi(),null;case 24:return null;default:return null}}var hl=!1,it=!1,P0=typeof WeakSet=="function"?WeakSet:Set,ie=null;function fn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Be(e,t,r)}else n.current=null}function ai(e,t,n){try{n()}catch(r){Be(e,t,r)}}var ld=!1;function M0(e,t){if(va=Rr,e=zo(),da(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,u=-1,m=-1,N=0,F=0,U=e,D=null;t:for(;;){for(var te;U!==n||l!==0&&U.nodeType!==3||(u=o+l),U!==a||r!==0&&U.nodeType!==3||(m=o+r),U.nodeType===3&&(o+=U.nodeValue.length),(te=U.firstChild)!==null;)D=U,U=te;for(;;){if(U===e)break t;if(D===n&&++N===l&&(u=o),D===a&&++F===r&&(m=o),(te=U.nextSibling)!==null)break;U=D,D=U.parentNode}U=te}n=u===-1||m===-1?null:{start:u,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(ya={focusedElem:e,selectionRange:n},Rr=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var ce=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ce!==null){var me=ce.memoizedProps,Qe=ce.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?me:$t(t.type,me),Qe);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(c(163))}}catch(W){Be(t,t.return,W)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return ce=ld,ld=!1,ce}function cr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,a!==void 0&&ai(t,n,a)}l=l.next}while(l!==r)}}function gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ii(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ad(e){var t=e.alternate;t!==null&&(e.alternate=null,ad(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dt],delete t[Xn],delete t[Na],delete t[m0],delete t[x0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function id(e){return e.tag===5||e.tag===3||e.tag===4}function od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||id(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function oi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qr));else if(r!==4&&(e=e.child,e!==null))for(oi(e,t,n),e=e.sibling;e!==null;)oi(e,t,n),e=e.sibling}function ci(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ci(e,t,n),e=e.sibling;e!==null;)ci(e,t,n),e=e.sibling}var st=null,It=!1;function fs(e,t,n){for(n=n.child;n!==null;)cd(e,t,n),n=n.sibling}function cd(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Pr,n)}catch{}switch(n.tag){case 5:it||fn(n,t);case 6:var r=st,l=It;st=null,fs(e,t,n),st=r,It=l,st!==null&&(It?(e=st,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(It?(e=st,n=n.stateNode,e.nodeType===8?ja(e.parentNode,n):e.nodeType===1&&ja(e,n),Un(e)):ja(st,n.stateNode));break;case 4:r=st,l=It,st=n.stateNode.containerInfo,It=!0,fs(e,t,n),st=r,It=l;break;case 0:case 11:case 14:case 15:if(!it&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var a=l,o=a.destroy;a=a.tag,o!==void 0&&((a&2)!==0||(a&4)!==0)&&ai(n,t,o),l=l.next}while(l!==r)}fs(e,t,n);break;case 1:if(!it&&(fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Be(n,t,u)}fs(e,t,n);break;case 21:fs(e,t,n);break;case 22:n.mode&1?(it=(r=it)||n.memoizedState!==null,fs(e,t,n),it=r):fs(e,t,n);break;default:fs(e,t,n)}}function dd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new P0),t.forEach(function(r){var l=F0.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function At(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var a=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:st=u.stateNode,It=!1;break e;case 3:st=u.stateNode.containerInfo,It=!0;break e;case 4:st=u.stateNode.containerInfo,It=!0;break e}u=u.return}if(st===null)throw Error(c(160));cd(a,o,l),st=null,It=!1;var m=l.alternate;m!==null&&(m.return=null),l.return=null}catch(N){Be(l,t,N)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ud(t,e),t=t.sibling}function ud(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(t,e),Vt(e),r&4){try{cr(3,e,e.return),gl(3,e)}catch(me){Be(e,e.return,me)}try{cr(5,e,e.return)}catch(me){Be(e,e.return,me)}}break;case 1:At(t,e),Vt(e),r&512&&n!==null&&fn(n,n.return);break;case 5:if(At(t,e),Vt(e),r&512&&n!==null&&fn(n,n.return),e.flags&32){var l=e.stateNode;try{Cs(l,"")}catch(me){Be(e,e.return,me)}}if(r&4&&(l=e.stateNode,l!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,u=e.type,m=e.updateQueue;if(e.updateQueue=null,m!==null)try{u==="input"&&a.type==="radio"&&a.name!=null&&V(l,a),Qs(u,o);var N=Qs(u,a);for(o=0;o<m.length;o+=2){var F=m[o],U=m[o+1];F==="style"?Sr(l,U):F==="dangerouslySetInnerHTML"?Cn(l,U):F==="children"?Cs(l,U):ae(l,F,U,N)}switch(u){case"input":Se(l,a);break;case"textarea":Nr(l,a);break;case"select":var D=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!a.multiple;var te=a.value;te!=null?Le(l,!!a.multiple,te,!1):D!==!!a.multiple&&(a.defaultValue!=null?Le(l,!!a.multiple,a.defaultValue,!0):Le(l,!!a.multiple,a.multiple?[]:"",!1))}l[Xn]=a}catch(me){Be(e,e.return,me)}}break;case 6:if(At(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(c(162));l=e.stateNode,a=e.memoizedProps;try{l.nodeValue=a}catch(me){Be(e,e.return,me)}}break;case 3:if(At(t,e),Vt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Un(t.containerInfo)}catch(me){Be(e,e.return,me)}break;case 4:At(t,e),Vt(e);break;case 13:At(t,e),Vt(e),l=e.child,l.flags&8192&&(a=l.memoizedState!==null,l.stateNode.isHidden=a,!a||l.alternate!==null&&l.alternate.memoizedState!==null||(pi=Ge())),r&4&&dd(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(it=(N=it)||F,At(t,e),it=N):At(t,e),Vt(e),r&8192){if(N=e.memoizedState!==null,(e.stateNode.isHidden=N)&&!F&&(e.mode&1)!==0)for(ie=e,F=e.child;F!==null;){for(U=ie=F;ie!==null;){switch(D=ie,te=D.child,D.tag){case 0:case 11:case 14:case 15:cr(4,D,D.return);break;case 1:fn(D,D.return);var ce=D.stateNode;if(typeof ce.componentWillUnmount=="function"){r=D,n=D.return;try{t=r,ce.props=t.memoizedProps,ce.state=t.memoizedState,ce.componentWillUnmount()}catch(me){Be(r,n,me)}}break;case 5:fn(D,D.return);break;case 22:if(D.memoizedState!==null){xd(U);continue}}te!==null?(te.return=D,ie=te):xd(U)}F=F.sibling}e:for(F=null,U=e;;){if(U.tag===5){if(F===null){F=U;try{l=U.stateNode,N?(a=l.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(u=U.stateNode,m=U.memoizedProps.style,o=m!=null&&m.hasOwnProperty("display")?m.display:null,u.style.display=_n("display",o))}catch(me){Be(e,e.return,me)}}}else if(U.tag===6){if(F===null)try{U.stateNode.nodeValue=N?"":U.memoizedProps}catch(me){Be(e,e.return,me)}}else if((U.tag!==22&&U.tag!==23||U.memoizedState===null||U===e)&&U.child!==null){U.child.return=U,U=U.child;continue}if(U===e)break e;for(;U.sibling===null;){if(U.return===null||U.return===e)break e;F===U&&(F=null),U=U.return}F===U&&(F=null),U.sibling.return=U.return,U=U.sibling}}break;case 19:At(t,e),Vt(e),r&4&&dd(e);break;case 21:break;default:At(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(id(n)){var r=n;break e}n=n.return}throw Error(c(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Cs(l,""),r.flags&=-33);var a=od(e);ci(e,a,l);break;case 3:case 4:var o=r.stateNode.containerInfo,u=od(e);oi(e,u,o);break;default:throw Error(c(161))}}catch(m){Be(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $0(e,t,n){ie=e,pd(e)}function pd(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var l=ie,a=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||hl;if(!o){var u=l.alternate,m=u!==null&&u.memoizedState!==null||it;u=hl;var N=it;if(hl=o,(it=m)&&!N)for(ie=l;ie!==null;)o=ie,m=o.child,o.tag===22&&o.memoizedState!==null?fd(l):m!==null?(m.return=o,ie=m):fd(l);for(;a!==null;)ie=a,pd(a),a=a.sibling;ie=l,hl=u,it=N}md(e)}else(l.subtreeFlags&8772)!==0&&a!==null?(a.return=l,ie=a):md(e)}}function md(e){for(;ie!==null;){var t=ie;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:it||gl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!it)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:$t(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&xc(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xc(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var m=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":m.autoFocus&&n.focus();break;case"img":m.src&&(n.src=m.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var N=t.alternate;if(N!==null){var F=N.memoizedState;if(F!==null){var U=F.dehydrated;U!==null&&Un(U)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(c(163))}it||t.flags&512&&ii(t)}catch(D){Be(t,t.return,D)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function xd(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function fd(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gl(4,t)}catch(m){Be(t,n,m)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(m){Be(t,l,m)}}var a=t.return;try{ii(t)}catch(m){Be(t,a,m)}break;case 5:var o=t.return;try{ii(t)}catch(m){Be(t,o,m)}}}catch(m){Be(t,t.return,m)}if(t===e){ie=null;break}var u=t.sibling;if(u!==null){u.return=t.return,ie=u;break}ie=t.return}}var I0=Math.ceil,vl=Y.ReactCurrentDispatcher,di=Y.ReactCurrentOwner,Ct=Y.ReactCurrentBatchConfig,Ie=0,Ze=null,qe=null,nt=0,bt=0,hn=ds(0),Ye=0,dr=null,zs=0,yl=0,ui=0,ur=null,mt=null,pi=0,gn=1/0,es=null,wl=!1,mi=null,hs=null,bl=!1,gs=null,jl=0,pr=0,xi=null,Nl=-1,kl=0;function ct(){return(Ie&6)!==0?Ge():Nl!==-1?Nl:Nl=Ge()}function vs(e){return(e.mode&1)===0?1:(Ie&2)!==0&&nt!==0?nt&-nt:h0.transition!==null?(kl===0&&(kl=io()),kl):(e=Re,e!==0||(e=window.event,e=e===void 0?16:go(e.type)),e)}function Lt(e,t,n,r){if(50<pr)throw pr=0,xi=null,Error(c(185));Rn(e,n,r),((Ie&2)===0||e!==Ze)&&(e===Ze&&((Ie&2)===0&&(yl|=n),Ye===4&&ys(e,nt)),xt(e,r),n===1&&Ie===0&&(t.mode&1)===0&&(gn=Ge()+500,Xr&&ps()))}function xt(e,t){var n=e.callbackNode;hu(e,t);var r=Ir(e,e===Ze?nt:0);if(r===0)n!==null&&ro(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ro(n),t===1)e.tag===0?f0(gd.bind(null,e)):sc(gd.bind(null,e)),u0(function(){(Ie&6)===0&&ps()}),n=null;else{switch(oo(r)){case 1:n=Ql;break;case 4:n=lo;break;case 16:n=Tr;break;case 536870912:n=ao;break;default:n=Tr}n=Sd(n,hd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function hd(e,t){if(Nl=-1,kl=0,(Ie&6)!==0)throw Error(c(327));var n=e.callbackNode;if(vn()&&e.callbackNode!==n)return null;var r=Ir(e,e===Ze?nt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Sl(e,r);else{t=r;var l=Ie;Ie|=2;var a=yd();(Ze!==e||nt!==t)&&(es=null,gn=Ge()+500,Ds(e,t));do try{R0();break}catch(u){vd(e,u)}while(!0);$a(),vl.current=a,Ie=l,qe!==null?t=0:(Ze=null,nt=0,t=Ye)}if(t!==0){if(t===2&&(l=ql(e),l!==0&&(r=l,t=fi(e,l))),t===1)throw n=dr,Ds(e,0),ys(e,r),xt(e,Ge()),n;if(t===6)ys(e,r);else{if(l=e.current.alternate,(r&30)===0&&!A0(l)&&(t=Sl(e,r),t===2&&(a=ql(e),a!==0&&(r=a,t=fi(e,a))),t===1))throw n=dr,Ds(e,0),ys(e,r),xt(e,Ge()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(c(345));case 2:Fs(e,mt,es);break;case 3:if(ys(e,r),(r&130023424)===r&&(t=pi+500-Ge(),10<t)){if(Ir(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ct(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=ba(Fs.bind(null,e,mt,es),t);break}Fs(e,mt,es);break;case 4:if(ys(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Tt(r);a=1<<o,o=t[o],o>l&&(l=o),r&=~a}if(r=l,r=Ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I0(r/1960))-r,10<r){e.timeoutHandle=ba(Fs.bind(null,e,mt,es),r);break}Fs(e,mt,es);break;case 5:Fs(e,mt,es);break;default:throw Error(c(329))}}}return xt(e,Ge()),e.callbackNode===n?hd.bind(null,e):null}function fi(e,t){var n=ur;return e.current.memoizedState.isDehydrated&&(Ds(e,t).flags|=256),e=Sl(e,t),e!==2&&(t=mt,mt=n,t!==null&&hi(t)),e}function hi(e){mt===null?mt=e:mt.push.apply(mt,e)}function A0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],a=l.getSnapshot;l=l.value;try{if(!Pt(a(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ys(e,t){for(t&=~ui,t&=~yl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function gd(e){if((Ie&6)!==0)throw Error(c(327));vn();var t=Ir(e,0);if((t&1)===0)return xt(e,Ge()),null;var n=Sl(e,t);if(e.tag!==0&&n===2){var r=ql(e);r!==0&&(t=r,n=fi(e,r))}if(n===1)throw n=dr,Ds(e,0),ys(e,t),xt(e,Ge()),n;if(n===6)throw Error(c(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fs(e,mt,es),xt(e,Ge()),null}function gi(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(gn=Ge()+500,Xr&&ps())}}function Os(e){gs!==null&&gs.tag===0&&(Ie&6)===0&&vn();var t=Ie;Ie|=1;var n=Ct.transition,r=Re;try{if(Ct.transition=null,Re=1,e)return e()}finally{Re=r,Ct.transition=n,Ie=t,(Ie&6)===0&&ps()}}function vi(){bt=hn.current,Ue(hn)}function Ds(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,d0(n)),qe!==null)for(n=qe.return;n!==null;){var r=n;switch(_a(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yr();break;case 3:mn(),Ue(dt),Ue(rt),Fa();break;case 5:Oa(r);break;case 4:mn();break;case 13:Ue(He);break;case 19:Ue(He);break;case 10:Ia(r.type._context);break;case 22:case 23:vi()}n=n.return}if(Ze=e,qe=e=ws(e.current,null),nt=bt=t,Ye=0,dr=null,ui=yl=zs=0,mt=ur=null,As!==null){for(t=0;t<As.length;t++)if(n=As[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=l,r.next=o}n.pending=r}As=null}return e}function vd(e,t){do{var n=qe;try{if($a(),ol.current=pl,cl){for(var r=We.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}cl=!1}if(Rs=0,Xe=Ke=We=null,rr=!1,lr=0,di.current=null,n===null||n.return===null){Ye=1,dr=t,qe=null;break}e:{var a=e,o=n.return,u=n,m=t;if(t=nt,u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){var N=m,F=u,U=F.tag;if((F.mode&1)===0&&(U===0||U===11||U===15)){var D=F.alternate;D?(F.updateQueue=D.updateQueue,F.memoizedState=D.memoizedState,F.lanes=D.lanes):(F.updateQueue=null,F.memoizedState=null)}var te=Hc(o);if(te!==null){te.flags&=-257,Wc(te,o,u,a,t),te.mode&1&&Vc(a,N,t),t=te,m=N;var ce=t.updateQueue;if(ce===null){var me=new Set;me.add(m),t.updateQueue=me}else ce.add(m);break e}else{if((t&1)===0){Vc(a,N,t),yi();break e}m=Error(c(426))}}else if(Ve&&u.mode&1){var Qe=Hc(o);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),Wc(Qe,o,u,a,t),Pa(xn(m,u));break e}}a=m=xn(m,u),Ye!==4&&(Ye=2),ur===null?ur=[a]:ur.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=Fc(a,m,t);mc(a,v);break e;case 1:u=m;var x=a.type,y=a.stateNode;if((a.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(hs===null||!hs.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var W=Uc(a,u,t);mc(a,W);break e}}a=a.return}while(a!==null)}bd(n)}catch(xe){t=xe,qe===n&&n!==null&&(qe=n=n.return);continue}break}while(!0)}function yd(){var e=vl.current;return vl.current=pl,e===null?pl:e}function yi(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),Ze===null||(zs&268435455)===0&&(yl&268435455)===0||ys(Ze,nt)}function Sl(e,t){var n=Ie;Ie|=2;var r=yd();(Ze!==e||nt!==t)&&(es=null,Ds(e,t));do try{L0();break}catch(l){vd(e,l)}while(!0);if($a(),Ie=n,vl.current=r,qe!==null)throw Error(c(261));return Ze=null,nt=0,Ye}function L0(){for(;qe!==null;)wd(qe)}function R0(){for(;qe!==null&&!iu();)wd(qe)}function wd(e){var t=kd(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?bd(e):qe=t,di.current=null}function bd(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=E0(n,t,bt),n!==null){qe=n;return}}else{if(n=T0(n,t),n!==null){n.flags&=32767,qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ye=6,qe=null;return}}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);Ye===0&&(Ye=5)}function Fs(e,t,n){var r=Re,l=Ct.transition;try{Ct.transition=null,Re=1,z0(e,t,n,r)}finally{Ct.transition=l,Re=r}return null}function z0(e,t,n,r){do vn();while(gs!==null);if((Ie&6)!==0)throw Error(c(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(c(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(gu(e,a),e===Ze&&(qe=Ze=null,nt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||bl||(bl=!0,Sd(Tr,function(){return vn(),null})),a=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||a){a=Ct.transition,Ct.transition=null;var o=Re;Re=1;var u=Ie;Ie|=4,di.current=null,M0(e,n),ud(n,e),n0(ya),Rr=!!va,ya=va=null,e.current=n,$0(n),ou(),Ie=u,Re=o,Ct.transition=a}else e.current=n;if(bl&&(bl=!1,gs=e,jl=l),a=e.pendingLanes,a===0&&(hs=null),uu(n.stateNode),xt(e,Ge()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(wl)throw wl=!1,e=mi,mi=null,e;return(jl&1)!==0&&e.tag!==0&&vn(),a=e.pendingLanes,(a&1)!==0?e===xi?pr++:(pr=0,xi=e):pr=0,ps(),null}function vn(){if(gs!==null){var e=oo(jl),t=Ct.transition,n=Re;try{if(Ct.transition=null,Re=16>e?16:e,gs===null)var r=!1;else{if(e=gs,gs=null,jl=0,(Ie&6)!==0)throw Error(c(331));var l=Ie;for(Ie|=4,ie=e.current;ie!==null;){var a=ie,o=a.child;if((ie.flags&16)!==0){var u=a.deletions;if(u!==null){for(var m=0;m<u.length;m++){var N=u[m];for(ie=N;ie!==null;){var F=ie;switch(F.tag){case 0:case 11:case 15:cr(8,F,a)}var U=F.child;if(U!==null)U.return=F,ie=U;else for(;ie!==null;){F=ie;var D=F.sibling,te=F.return;if(ad(F),F===N){ie=null;break}if(D!==null){D.return=te,ie=D;break}ie=te}}}var ce=a.alternate;if(ce!==null){var me=ce.child;if(me!==null){ce.child=null;do{var Qe=me.sibling;me.sibling=null,me=Qe}while(me!==null)}}ie=a}}if((a.subtreeFlags&2064)!==0&&o!==null)o.return=a,ie=o;else e:for(;ie!==null;){if(a=ie,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:cr(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,ie=v;break e}ie=a.return}}var x=e.current;for(ie=x;ie!==null;){o=ie;var y=o.child;if((o.subtreeFlags&2064)!==0&&y!==null)y.return=o,ie=y;else e:for(o=x;ie!==null;){if(u=ie,(u.flags&2048)!==0)try{switch(u.tag){case 0:case 11:case 15:gl(9,u)}}catch(xe){Be(u,u.return,xe)}if(u===o){ie=null;break e}var W=u.sibling;if(W!==null){W.return=u.return,ie=W;break e}ie=u.return}}if(Ie=l,ps(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Pr,e)}catch{}r=!0}return r}finally{Re=n,Ct.transition=t}}return!1}function jd(e,t,n){t=xn(n,t),t=Fc(e,t,1),e=xs(e,t,1),t=ct(),e!==null&&(Rn(e,1,t),xt(e,t))}function Be(e,t,n){if(e.tag===3)jd(e,e,n);else for(;t!==null;){if(t.tag===3){jd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hs===null||!hs.has(r))){e=xn(n,e),e=Uc(t,e,1),t=xs(t,e,1),e=ct(),t!==null&&(Rn(t,1,e),xt(t,e));break}}t=t.return}}function O0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,Ze===e&&(nt&n)===n&&(Ye===4||Ye===3&&(nt&130023424)===nt&&500>Ge()-pi?Ds(e,0):ui|=n),xt(e,t)}function Nd(e,t){t===0&&((e.mode&1)===0?t=1:(t=$r,$r<<=1,($r&130023424)===0&&($r=4194304)));var n=ct();e=Jt(e,t),e!==null&&(Rn(e,t,n),xt(e,n))}function D0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nd(e,n)}function F0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(c(314))}r!==null&&r.delete(t),Nd(e,n)}var kd;kd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)pt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return pt=!1,_0(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,Ve&&(t.flags&1048576)!==0&&nc(t,el,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fl(e,t),e=t.pendingProps;var l=ln(t,rt.current);pn(t,n),l=Ha(null,t,r,e,l,n);var a=Wa();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ut(r)?(a=!0,Jr(t)):a=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ra(t),l.updater=ml,t.stateNode=l,l._reactInternals=t,Ya(t,r,e,n),t=ei(null,t,r,!0,a,n)):(t.tag=0,Ve&&a&&Ca(t),ot(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=V0(r),e=$t(r,e),l){case 0:t=Za(null,t,r,e,n);break e;case 1:t=Yc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Gc(null,t,r,$t(r.type,e),n);break e}throw Error(c(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$t(r,l),Za(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$t(r,l),Yc(e,t,r,l,n);case 3:e:{if(Jc(t),e===null)throw Error(c(387));r=t.pendingProps,a=t.memoizedState,l=a.element,pc(e,t),al(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){l=xn(Error(c(423)),t),t=Xc(e,t,r,n,l);break e}else if(r!==l){l=xn(Error(c(424)),t),t=Xc(e,t,r,n,l);break e}else for(wt=cs(t.stateNode.containerInfo.firstChild),yt=t,Ve=!0,Mt=null,n=dc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cn(),r===l){t=Zt(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return fc(t),e===null&&Ta(t),r=t.type,l=t.pendingProps,a=e!==null?e.memoizedProps:null,o=l.children,wa(r,l)?o=null:a!==null&&wa(r,a)&&(t.flags|=32),Kc(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&Ta(t),null;case 13:return Zc(e,t,n);case 4:return za(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dn(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$t(r,l),Bc(e,t,r,l,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,a=t.memoizedProps,o=l.value,De(nl,r._currentValue),r._currentValue=o,a!==null)if(Pt(a.value,o)){if(a.children===l.children&&!dt.current){t=Zt(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){o=a.child;for(var m=u.firstContext;m!==null;){if(m.context===r){if(a.tag===1){m=Xt(-1,n&-n),m.tag=2;var N=a.updateQueue;if(N!==null){N=N.shared;var F=N.pending;F===null?m.next=m:(m.next=F.next,F.next=m),N.pending=m}}a.lanes|=n,m=a.alternate,m!==null&&(m.lanes|=n),Aa(a.return,n,t),u.lanes|=n;break}m=m.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(c(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Aa(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}ot(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,pn(t,n),l=kt(l),r=r(l),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,l=$t(r,t.pendingProps),l=$t(r.type,l),Gc(e,t,r,l,n);case 15:return Qc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$t(r,l),fl(e,t),t.tag=1,ut(r)?(e=!0,Jr(t)):e=!1,pn(t,n),Oc(t,r,l),Ya(t,r,l,n),ei(null,t,r,!0,e,n);case 19:return td(e,t,n);case 22:return qc(e,t,n)}throw Error(c(156,t.tag))};function Sd(e,t){return no(e,t)}function U0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,n,r){return new U0(e,t,n,r)}function wi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function V0(e){if(typeof e=="function")return wi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$e)return 11;if(e===ee)return 14}return 2}function ws(e,t){var n=e.alternate;return n===null?(n=_t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cl(e,t,n,r,l,a){var o=2;if(r=e,typeof e=="function")wi(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ee:return Us(n.children,l,a,t);case B:o=8,l|=8;break;case Ce:return e=_t(12,n,t,l|2),e.elementType=Ce,e.lanes=a,e;case ke:return e=_t(13,n,t,l),e.elementType=ke,e.lanes=a,e;case G:return e=_t(19,n,t,l),e.elementType=G,e.lanes=a,e;case w:return _l(n,l,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Te:o=10;break e;case Me:o=9;break e;case $e:o=11;break e;case ee:o=14;break e;case ue:o=16,r=null;break e}throw Error(c(130,e==null?e:typeof e,""))}return t=_t(o,n,t,l),t.elementType=e,t.type=r,t.lanes=a,t}function Us(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=_t(22,e,r,t),e.elementType=w,e.lanes=n,e.stateNode={isHidden:!1},e}function bi(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function ji(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function H0(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kl(0),this.expirationTimes=Kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ni(e,t,n,r,l,a,o,u,m){return e=new H0(e,t,n,u,m),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_t(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function W0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cd(e){if(!e)return us;e=e._reactInternals;e:{if(Ts(e)!==e||e.tag!==1)throw Error(c(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(c(171))}if(e.tag===1){var n=e.type;if(ut(n))return ec(e,n,t)}return t}function _d(e,t,n,r,l,a,o,u,m){return e=Ni(n,r,!0,e,l,a,o,u,m),e.context=Cd(null),n=e.current,r=ct(),l=vs(n),a=Xt(r,l),a.callback=t??null,xs(n,a,l),e.current.lanes=l,Rn(e,l,r),xt(e,r),e}function El(e,t,n,r){var l=t.current,a=ct(),o=vs(l);return n=Cd(n),t.context===null?t.context=n:t.pendingContext=n,t=Xt(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xs(l,t,o),e!==null&&(Lt(e,l,o,a),ll(e,l,o)),o}function Tl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ed(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ki(e,t){Ed(e,t),(e=e.alternate)&&Ed(e,t)}function B0(){return null}var Td=typeof reportError=="function"?reportError:function(e){console.error(e)};function Si(e){this._internalRoot=e}Pl.prototype.render=Si.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));El(e,t,null,null)},Pl.prototype.unmount=Si.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Os(function(){El(null,e,null,null)}),t[Qt]=null}};function Pl(e){this._internalRoot=e}Pl.prototype.unstable_scheduleHydration=function(e){if(e){var t=po();e={blockedOn:null,target:e,priority:t};for(var n=0;n<as.length&&t!==0&&t<as[n].priority;n++);as.splice(n,0,e),n===0&&fo(e)}};function Ci(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ml(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Pd(){}function G0(e,t,n,r,l){if(l){if(typeof r=="function"){var a=r;r=function(){var N=Tl(o);a.call(N)}}var o=_d(t,r,e,0,null,!1,!1,"",Pd);return e._reactRootContainer=o,e[Qt]=o.current,Yn(e.nodeType===8?e.parentNode:e),Os(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var N=Tl(m);u.call(N)}}var m=Ni(e,0,!1,null,null,!1,!1,"",Pd);return e._reactRootContainer=m,e[Qt]=m.current,Yn(e.nodeType===8?e.parentNode:e),Os(function(){El(t,m,n,r)}),m}function $l(e,t,n,r,l){var a=n._reactRootContainer;if(a){var o=a;if(typeof l=="function"){var u=l;l=function(){var m=Tl(o);u.call(m)}}El(t,o,e,l)}else o=G0(n,t,e,l,r);return Tl(o)}co=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ln(t.pendingLanes);n!==0&&(Yl(t,n|1),xt(t,Ge()),(Ie&6)===0&&(gn=Ge()+500,ps()))}break;case 13:Os(function(){var r=Jt(e,1);if(r!==null){var l=ct();Lt(r,e,1,l)}}),ki(e,1)}},Jl=function(e){if(e.tag===13){var t=Jt(e,134217728);if(t!==null){var n=ct();Lt(t,e,134217728,n)}ki(e,134217728)}},uo=function(e){if(e.tag===13){var t=vs(e),n=Jt(e,t);if(n!==null){var r=ct();Lt(n,e,t,r)}ki(e,t)}},po=function(){return Re},mo=function(e,t){var n=Re;try{return Re=e,t()}finally{Re=n}},Mn=function(e,t,n){switch(t){case"input":if(Se(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Kr(r);if(!l)throw Error(c(90));le(r),Se(r,l)}}}break;case"textarea":Nr(e,n);break;case"select":t=n.value,t!=null&&Le(e,!!n.multiple,t,!1)}},_r=gi,Er=Os;var Q0={usingClientEntryPoint:!1,Events:[Zn,nn,Kr,Cr,Bt,gi]},mr={findFiberByHostInstance:Ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q0={bundleType:mr.bundleType,version:mr.version,rendererPackageName:mr.rendererPackageName,rendererConfig:mr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=to(e),e===null?null:e.stateNode},findFiberByHostInstance:mr.findFiberByHostInstance||B0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Il.isDisabled&&Il.supportsFiber)try{Pr=Il.inject(q0),Ot=Il}catch{}}return ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q0,ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ci(t))throw Error(c(200));return W0(e,t,null,n)},ft.createRoot=function(e,t){if(!Ci(e))throw Error(c(299));var n=!1,r="",l=Td;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Ni(e,1,!1,null,null,n,!1,r,l),e[Qt]=t.current,Yn(e.nodeType===8?e.parentNode:e),new Si(t)},ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=to(t),e=e===null?null:e.stateNode,e},ft.flushSync=function(e){return Os(e)},ft.hydrate=function(e,t,n){if(!Ml(t))throw Error(c(200));return $l(null,e,t,!0,n)},ft.hydrateRoot=function(e,t,n){if(!Ci(e))throw Error(c(405));var r=n!=null&&n.hydratedSources||null,l=!1,a="",o=Td;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=_d(t,null,e,1,n??null,l,!1,a,o),e[Qt]=t.current,Yn(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Pl(t)},ft.render=function(e,t,n){if(!Ml(t))throw Error(c(200));return $l(null,e,t,!1,n)},ft.unmountComponentAtNode=function(e){if(!Ml(e))throw Error(c(40));return e._reactRootContainer?(Os(function(){$l(null,null,e,!1,function(){e._reactRootContainer=null,e[Qt]=null})}),!0):!1},ft.unstable_batchedUpdates=gi,ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ml(n))throw Error(c(200));if(e==null||e._reactInternals===void 0)throw Error(c(38));return $l(e,t,n,!1,r)},ft.version="18.3.1-next-f1338f8080-20240426",ft}var Od;function rp(){if(Od)return Ti.exports;Od=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(d){console.error(d)}}return i(),Ti.exports=np(),Ti.exports}var Dd;function lp(){if(Dd)return Al;Dd=1;var i=rp();return Al.createRoot=i.createRoot,Al.hydrateRoot=i.hydrateRoot,Al}var ap=lp();const ip=Bd(ap),re="/api",O={async getHealth(){return(await fetch(`${re}/health`)).json()},async getProjects(){return(await fetch(`${re}/projects`)).json()},async getProjectDirectories(i){const d=i?`?path=${encodeURIComponent(i)}`:"",c=await fetch(`${re}/project-directories${d}`);if(!c.ok)throw new Error((await c.json()).error||"Unable to read directory");return c.json()},async createProject(i){const d=await fetch(`${re}/projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!d.ok)throw new Error((await d.json()).error||"Unable to register project");return d.json()},async getAgents(){return(await fetch(`${re}/agents`)).json()},async saveAgent(i){return(await fetch(`${re}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json()},async getSkills(){return(await fetch(`${re}/skills`)).json()},async saveSkill(i){return(await fetch(`${re}/skills`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json()},async getTasks(i){const d=i?`${re}/tasks?projectId=${i}`:`${re}/tasks`;return(await fetch(d)).json()},async saveTask(i){const d=await fetch(`${re}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!d.ok)throw new Error((await d.json()).error||"Unable to create task");return d.json()},async updateTask(i,d){const c=await fetch(`${re}/tasks/${i}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)});if(!c.ok)throw new Error((await c.json()).error||"Unable to update task");return c.json()},async executeTask(i){const d=await fetch(`${re}/tasks/${i}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!d.ok)throw new Error((await d.json()).error||"Unable to execute task");return d.json()},async cancelTask(i){const d=await fetch(`${re}/tasks/${i}/cancel`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!d.ok)throw new Error((await d.json()).error||"Unable to cancel task");return d.json()},async retryTask(i){const d=await fetch(`${re}/tasks/${i}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!d.ok)throw new Error((await d.json()).error||"Unable to retry task");return d.json()},async getAgentQuestions(){return(await fetch(`${re}/agent-questions`)).json()},async answerAgentQuestion(i,d){return(await fetch(`${re}/agent-question/${i}/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answer:d})})).json()},async archiveTask(i){return(await fetch(`${re}/tasks/${i}/archive`,{method:"POST"})).json()},async unarchiveTask(i){return(await fetch(`${re}/tasks/${i}/unarchive`,{method:"POST"})).json()},async approveProposedTask(i){const d=await fetch(`${re}/tasks/${i}/approve`,{method:"POST"});if(!d.ok)throw new Error((await d.json()).error||"Unable to approve proposed task");return d.json()},async reviewAgainTask(i,d){const c=await fetch(`${re}/tasks/${i}/review-again`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:d||""})});if(!c.ok)throw new Error((await c.json()).error||"Unable to re-design task");return c.json()},async deleteTask(i){return(await fetch(`${re}/tasks/${i}`,{method:"DELETE"})).json()},async getArchivedTasks(i){const d=`${re}/tasks?includeArchived=true${i?`&projectId=${i}`:""}`;return(await(await fetch(d)).json()).filter(b=>b.archived)},async getPrompts(i){const d=i?`${re}/prompts?projectId=${i}`:`${re}/prompts`;return(await fetch(d)).json()},async approvePrompt(i){return(await fetch(`${re}/prompts/${i}/approve`,{method:"POST"})).json()},async rejectPrompt(i){return(await fetch(`${re}/prompts/${i}/reject`,{method:"POST"})).json()},async getApprovals(i){const d=i?`${re}/approvals?projectId=${i}`:`${re}/approvals`;return(await fetch(d)).json()},async resolveApproval(i,d,c){return(await fetch(`${re}/approvals/${i}/resolve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:d,comments:c})})).json()},async getPermissionRequests(i,d){const c=new URLSearchParams;i&&c.set("projectId",i),d&&c.set("status",d);const b=c.toString();return(await fetch(`${re}/permissions${b?`?${b}`:""}`)).json()},async getPermissionAudit(i,d){const c=new URLSearchParams;i&&c.set("projectId",i),d&&c.set("taskId",d);const b=c.toString();return(await fetch(`${re}/permissions/audit${b?`?${b}`:""}`)).json()},async resolvePermission(i,d,c){const b=await fetch(`${re}/permissions/${i}/resolve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:d,...c})});if(!b.ok)throw new Error((await b.json()).error||"Unable to resolve permission request");return b.json()},async getModels(){return(await fetch(`${re}/models`)).json()},async setActiveModel(i,d){return(await fetch(`${re}/models/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,agentId:d})})).json()},async pullModel(i){return(await fetch(`${re}/models/pull`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i})})).json()},async getPullProgress(i){return(await fetch(`${re}/models/pull-progress?model=${encodeURIComponent(i)}`)).json()},async getPullProgressAll(){return(await fetch(`${re}/models/pull-progress`)).json()},async deleteModel(i){const d=await fetch(`${re}/models/${encodeURIComponent(i)}`,{method:"DELETE"});if(!d.ok)throw new Error((await d.json()).error||"Unable to delete model");return d.json()},async getSettings(){return(await fetch(`${re}/settings`)).json()},async updateSettings(i){return(await fetch(`${re}/settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json()},async sendChatMessage(i,d,c){return(await fetch(`${re}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:i,projectId:d,sessionId:c})})).json()},async sendChatMessageBackground(i,d,c){return(await fetch(`${re}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:i,projectId:d,sessionId:c,background:!0})})).json()},async getChatSessions(i){const d=i?`${re}/chat/sessions?projectId=${i}`:`${re}/chat/sessions`;return(await fetch(d)).json()},async createChatSession(i,d){return(await fetch(`${re}/chat/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:i,title:d})})).json()},async getChatMessages(i){return(await fetch(`${re}/chat/sessions/${i}/messages`)).json()},async summarizeSession(i){return(await fetch(`${re}/chat/summarize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:i})})).json()},async planReview(i){return(await fetch(`${re}/chat/plan-review`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:i})})).json()},async integrateProject(i){return(await fetch(`${re}/integrate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:i})})).json()},async promoteProject(i,d,c){return(await fetch(`${re}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:i,mode:d,featureSummary:c})})).json()},async getRecentEvents(){return(await fetch(`${re}/events`)).json()},async getAgentWorkspaces(){const i=await fetch(`${re}/agent-workspaces`);if(!i.ok)throw new Error("Unable to load agent workspaces");return i.json()},async getAgentWorkspace(i){const d=await fetch(`${re}/agent-workspaces/${encodeURIComponent(i)}`);if(!d.ok)throw new Error("Unable to load agent workspace");return d.json()},async renameChatSession(i,d){const c=await fetch(`${re}/chat/sessions/${i}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:d})});if(!c.ok)throw new Error((await c.json()).error||"Unable to rename session");return c.json()},async deleteChatSession(i){const d=await fetch(`${re}/chat/sessions/${i}`,{method:"DELETE"});if(!d.ok)throw new Error((await d.json()).error||"Unable to delete session");return d.json()},async getGitStatus(){return(await fetch(`${re}/git/status`)).json()},async getGitLog(){return(await fetch(`${re}/git/log`)).json()},async createGitCommit(i,d){const c=await fetch(`${re}/git/commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:i,includeAll:d})});if(!c.ok)throw new Error((await c.json()).error||"Unable to commit");return c.json()},async stageGitFiles(i,d){const c=await fetch(`${re}/git/stage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:i,action:d})});if(!c.ok)throw new Error((await c.json()).error||"Unable to update staging");return c.json()},async getGitDiff(){return(await fetch(`${re}/git/diff`)).json()},async pushGit(){const i=await fetch(`${re}/git/push`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!i.ok)throw new Error((await i.json()).error||"Unable to push");return i.json()},async runProjectTests(){const i=await fetch(`${re}/tests/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"});if(!i.ok)throw new Error((await i.json()).error||"Unable to run tests");return i.json()},async getUsageMonitor(i){const d=i?`${re}/monitor/usage?scope=${i}`:`${re}/monitor/usage`;return(await fetch(d)).json()},async getContextStatus(i,d){return(await fetch(`${re}/monitor/context/${i}/${encodeURIComponent(d)}`)).json()},async getTaskStream(i){return(await fetch(`${re}/tasks/${encodeURIComponent(i)}/stream`)).json()},async getSystemUsage(){return(await fetch(`${re}/monitor/system`)).json()}};class op{constructor(){xr(this,"socket",null);xr(this,"listeners",new Set);xr(this,"reconnectTimeout",null);xr(this,"url");const d=window.location.protocol==="https:"?"wss:":"ws:";this.url=`${d}//${window.location.host}/ws`}connect(){if(!(this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)))try{this.socket=new WebSocket(this.url),this.socket.onopen=()=>{},this.socket.onmessage=d=>{try{const c=JSON.parse(d.data);for(const b of this.listeners)b(c)}catch{}},this.socket.onclose=()=>{this.scheduleReconnect()},this.socket.onerror=()=>{var d;(d=this.socket)==null||d.close()}}catch{this.scheduleReconnect()}}scheduleReconnect(){this.reconnectTimeout||(this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,this.connect()},2e3))}subscribe(d){return this.listeners.add(d),(!this.socket||this.socket.readyState===WebSocket.CLOSED)&&this.connect(),()=>{this.listeners.delete(d)}}}const kn=new op;/**
|
|
41
|
+
* @license lucide-react v0.475.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const cp=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Qd=(...i)=>i.filter((d,c,b)=>!!d&&d.trim()!==""&&b.indexOf(d)===c).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.475.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var dp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
51
|
+
* @license lucide-react v0.475.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const up=f.forwardRef(({color:i="currentColor",size:d=24,strokeWidth:c=2,absoluteStrokeWidth:b,className:g="",children:h,iconNode:C,...j},$)=>f.createElement("svg",{ref:$,...dp,width:d,height:d,stroke:i,strokeWidth:b?Number(c)*24/Number(d):c,className:Qd("lucide",g),...j},[...C.map(([H,M])=>f.createElement(H,M)),...Array.isArray(h)?h:[h]]));/**
|
|
56
|
+
* @license lucide-react v0.475.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const q=(i,d)=>{const c=f.forwardRef(({className:b,...g},h)=>f.createElement(up,{ref:h,iconNode:d,className:Qd(`lucide-${cp(i)}`,b),...g}));return c.displayName=`${i}`,c};/**
|
|
61
|
+
* @license lucide-react v0.475.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const pp=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],bn=q("Activity",pp);/**
|
|
66
|
+
* @license lucide-react v0.475.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const mp=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],xp=q("ArchiveRestore",mp);/**
|
|
71
|
+
* @license lucide-react v0.475.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const fp=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],hr=q("Archive",fp);/**
|
|
76
|
+
* @license lucide-react v0.475.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const hp=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],gp=q("ArrowDown",hp);/**
|
|
81
|
+
* @license lucide-react v0.475.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const vp=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],yp=q("ArrowLeftRight",vp);/**
|
|
86
|
+
* @license lucide-react v0.475.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const wp=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],bp=q("ArrowLeft",wp);/**
|
|
91
|
+
* @license lucide-react v0.475.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const jp=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Np=q("ArrowUpRight",jp);/**
|
|
96
|
+
* @license lucide-react v0.475.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const kp=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Sp=q("ArrowUp",kp);/**
|
|
101
|
+
* @license lucide-react v0.475.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Cp=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],js=q("Bot",Cp);/**
|
|
106
|
+
* @license lucide-react v0.475.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const _p=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],wn=q("Brain",_p);/**
|
|
111
|
+
* @license lucide-react v0.475.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Ep=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Hs=q("Check",Ep);/**
|
|
116
|
+
* @license lucide-react v0.475.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Tp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fd=q("ChevronDown",Tp);/**
|
|
121
|
+
* @license lucide-react v0.475.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Pp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mp=q("ChevronRight",Pp);/**
|
|
126
|
+
* @license lucide-react v0.475.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const $p=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ip=q("ChevronUp",$p);/**
|
|
131
|
+
* @license lucide-react v0.475.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Ap=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qd=q("CircleAlert",Ap);/**
|
|
136
|
+
* @license lucide-react v0.475.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Lp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ht=q("CircleCheck",Lp);/**
|
|
141
|
+
* @license lucide-react v0.475.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Rp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],zp=q("CircleDot",Rp);/**
|
|
146
|
+
* @license lucide-react v0.475.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Op=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],jr=q("CircleX",Op);/**
|
|
151
|
+
* @license lucide-react v0.475.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Dp=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],Di=q("ClipboardList",Dp);/**
|
|
156
|
+
* @license lucide-react v0.475.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Fp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Qi=q("Clock",Fp);/**
|
|
161
|
+
* @license lucide-react v0.475.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Up=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Vp=q("Copy",Up);/**
|
|
166
|
+
* @license lucide-react v0.475.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Hp=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Ws=q("Cpu",Hp);/**
|
|
171
|
+
* @license lucide-react v0.475.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Wp=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Bp=q("Database",Wp);/**
|
|
176
|
+
* @license lucide-react v0.475.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Gp=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Fi=q("Download",Gp);/**
|
|
181
|
+
* @license lucide-react v0.475.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Qp=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],qp=q("Eye",Qp);/**
|
|
186
|
+
* @license lucide-react v0.475.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Kp=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],vr=q("FileCode2",Kp);/**
|
|
191
|
+
* @license lucide-react v0.475.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Yp=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],Ud=q("FileDiff",Yp);/**
|
|
196
|
+
* @license lucide-react v0.475.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Jp=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}]],Xp=q("FileMinus",Jp);/**
|
|
201
|
+
* @license lucide-react v0.475.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Zp=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],em=q("FileSearch",Zp);/**
|
|
206
|
+
* @license lucide-react v0.475.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const tm=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ui=q("FileText",tm);/**
|
|
211
|
+
* @license lucide-react v0.475.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const sm=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],nm=q("FlaskConical",sm);/**
|
|
216
|
+
* @license lucide-react v0.475.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const rm=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],yr=q("FolderGit2",rm);/**
|
|
221
|
+
* @license lucide-react v0.475.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const lm=[["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],am=q("FolderMinus",lm);/**
|
|
226
|
+
* @license lucide-react v0.475.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const im=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],qi=q("FolderOpen",im);/**
|
|
231
|
+
* @license lucide-react v0.475.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const om=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],cm=q("FolderPlus",om);/**
|
|
236
|
+
* @license lucide-react v0.475.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const dm=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],um=q("Folder",dm);/**
|
|
241
|
+
* @license lucide-react v0.475.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const pm=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Rl=q("Gauge",pm);/**
|
|
246
|
+
* @license lucide-react v0.475.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const mm=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Ki=q("GitBranch",mm);/**
|
|
251
|
+
* @license lucide-react v0.475.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const xm=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Vi=q("GitMerge",xm);/**
|
|
256
|
+
* @license lucide-react v0.475.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const fm=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],hm=q("HardDrive",fm);/**
|
|
261
|
+
* @license lucide-react v0.475.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const gm=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Yi=q("History",gm);/**
|
|
266
|
+
* @license lucide-react v0.475.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const vm=[["path",{d:"M6 5v11",key:"mdvv1e"}],["path",{d:"M12 5v6",key:"14ar3b"}],["path",{d:"M18 5v14",key:"7ji314"}]],zl=q("Kanban",vm);/**
|
|
271
|
+
* @license lucide-react v0.475.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const ym=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ol=q("Layers",ym);/**
|
|
276
|
+
* @license lucide-react v0.475.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const wm=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],bm=q("LayoutDashboard",wm);/**
|
|
281
|
+
* @license lucide-react v0.475.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const jm=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gr=q("LoaderCircle",jm);/**
|
|
286
|
+
* @license lucide-react v0.475.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const Nm=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Kd=q("Lock",Nm);/**
|
|
291
|
+
* @license lucide-react v0.475.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const km=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],Yd=q("Maximize2",km);/**
|
|
296
|
+
* @license lucide-react v0.475.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Sm=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],Ji=q("Megaphone",Sm);/**
|
|
301
|
+
* @license lucide-react v0.475.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const Cm=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Jd=q("MessageSquare",Cm);/**
|
|
306
|
+
* @license lucide-react v0.475.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const _m=[["path",{d:"M5 12h14",key:"1ays0h"}]],Em=q("Minus",_m);/**
|
|
311
|
+
* @license lucide-react v0.475.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Tm=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Pm=q("Network",Tm);/**
|
|
316
|
+
* @license lucide-react v0.475.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const Mm=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],$m=q("Package",Mm);/**
|
|
321
|
+
* @license lucide-react v0.475.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const Im=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Am=q("PanelRight",Im);/**
|
|
326
|
+
* @license lucide-react v0.475.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const Lm=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Rm=q("Pencil",Lm);/**
|
|
331
|
+
* @license lucide-react v0.475.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const zm=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],jn=q("Play",zm);/**
|
|
336
|
+
* @license lucide-react v0.475.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const Om=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dl=q("Plus",Om);/**
|
|
341
|
+
* @license lucide-react v0.475.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Dm=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Xd=q("RefreshCw",Dm);/**
|
|
346
|
+
* @license lucide-react v0.475.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const Fm=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Hi=q("RotateCcw",Fm);/**
|
|
351
|
+
* @license lucide-react v0.475.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const Um=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],wr=q("Save",Um);/**
|
|
356
|
+
* @license lucide-react v0.475.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const Vm=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Fl=q("Search",Vm);/**
|
|
361
|
+
* @license lucide-react v0.475.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const Hm=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Wm=q("Settings2",Hm);/**
|
|
366
|
+
* @license lucide-react v0.475.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const Bm=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Zd=q("Settings",Bm);/**
|
|
371
|
+
* @license lucide-react v0.475.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const Gm=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ul=q("ShieldAlert",Gm);/**
|
|
376
|
+
* @license lucide-react v0.475.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const Qm=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Nn=q("ShieldCheck",Qm);/**
|
|
381
|
+
* @license lucide-react v0.475.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const qm=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Km=q("Shield",qm);/**
|
|
386
|
+
* @license lucide-react v0.475.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const Ym=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],Jm=q("SlidersHorizontal",Ym);/**
|
|
391
|
+
* @license lucide-react v0.475.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const Xm=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],br=q("Sparkles",Xm);/**
|
|
396
|
+
* @license lucide-react v0.475.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const Zm=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],$i=q("SquareCheckBig",Zm);/**
|
|
401
|
+
* @license lucide-react v0.475.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const ex=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ii=q("Square",ex);/**
|
|
406
|
+
* @license lucide-react v0.475.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const tx=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],Xi=q("Terminal",tx);/**
|
|
411
|
+
* @license lucide-react v0.475.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const sx=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],nx=q("ThumbsDown",sx);/**
|
|
416
|
+
* @license lucide-react v0.475.0 - ISC
|
|
417
|
+
*
|
|
418
|
+
* This source code is licensed under the ISC license.
|
|
419
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
+
*/const rx=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],lx=q("ThumbsUp",rx);/**
|
|
421
|
+
* @license lucide-react v0.475.0 - ISC
|
|
422
|
+
*
|
|
423
|
+
* This source code is licensed under the ISC license.
|
|
424
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
+
*/const ax=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Ns=q("Trash2",ax);/**
|
|
426
|
+
* @license lucide-react v0.475.0 - ISC
|
|
427
|
+
*
|
|
428
|
+
* This source code is licensed under the ISC license.
|
|
429
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
+
*/const ix=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],eu=q("TriangleAlert",ix);/**
|
|
431
|
+
* @license lucide-react v0.475.0 - ISC
|
|
432
|
+
*
|
|
433
|
+
* This source code is licensed under the ISC license.
|
|
434
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
+
*/const ox=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],cx=q("Upload",ox);/**
|
|
436
|
+
* @license lucide-react v0.475.0 - ISC
|
|
437
|
+
*
|
|
438
|
+
* This source code is licensed under the ISC license.
|
|
439
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
+
*/const dx=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],tu=q("User",dx);/**
|
|
441
|
+
* @license lucide-react v0.475.0 - ISC
|
|
442
|
+
*
|
|
443
|
+
* This source code is licensed under the ISC license.
|
|
444
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
+
*/const ux=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Vl=q("Users",ux);/**
|
|
446
|
+
* @license lucide-react v0.475.0 - ISC
|
|
447
|
+
*
|
|
448
|
+
* This source code is licensed under the ISC license.
|
|
449
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
+
*/const px=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],mx=q("WandSparkles",px);/**
|
|
451
|
+
* @license lucide-react v0.475.0 - ISC
|
|
452
|
+
*
|
|
453
|
+
* This source code is licensed under the ISC license.
|
|
454
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
+
*/const xx=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],su=q("WifiOff",xx);/**
|
|
456
|
+
* @license lucide-react v0.475.0 - ISC
|
|
457
|
+
*
|
|
458
|
+
* This source code is licensed under the ISC license.
|
|
459
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
+
*/const fx=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],nu=q("Wifi",fx);/**
|
|
461
|
+
* @license lucide-react v0.475.0 - ISC
|
|
462
|
+
*
|
|
463
|
+
* This source code is licensed under the ISC license.
|
|
464
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
+
*/const hx=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Wi=q("Wrench",hx);/**
|
|
466
|
+
* @license lucide-react v0.475.0 - ISC
|
|
467
|
+
*
|
|
468
|
+
* This source code is licensed under the ISC license.
|
|
469
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
+
*/const gx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ks=q("X",gx);/**
|
|
471
|
+
* @license lucide-react v0.475.0 - ISC
|
|
472
|
+
*
|
|
473
|
+
* This source code is licensed under the ISC license.
|
|
474
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
475
|
+
*/const vx=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],yx=q("Zap",vx),wx=({activeView:i,onSelectView:d,pendingApprovalsCount:c,pendingPermissionsCount:b,runningTasksCount:g,chatProcessing:h=!1})=>{const C=[{id:"workspace",label:"AI Workspace",icon:Jd,badge:h?"working…":null,alert:h},{id:"dashboard",label:"Dashboard",icon:bm,badge:null},{id:"hierarchy",label:"Hierarchy",icon:Pm,badge:null},{id:"agent-workspaces",label:"Agent Workspaces",icon:js,badge:null},{id:"tasks",label:"Task Board",icon:zl,badge:g>0?`${g} run`:null},{id:"prompt-studio",label:"Prompt Studio",icon:vr,badge:null},{id:"monitor",label:"Execution Monitor",icon:bn,badge:null},{id:"approvals",label:"Approvals",icon:Nn,badge:c>0?`${c}`:null,alert:c>0},{id:"permissions",label:"Permissions",icon:Kd,badge:b>0?`${b}`:null,alert:b>0},{id:"agents",label:"Agent Registry",icon:Vl,badge:null},{id:"skills",label:"Skills Library",icon:br,badge:null},{id:"tech-stack",label:"Tech Stack",icon:Ol,badge:null},{id:"models",label:"Model Manager",icon:Ws,badge:null},{id:"git",label:"Git Workspace",icon:Ki,badge:null},{id:"promotion",label:"Promotion Center",icon:Ji,badge:null},{id:"settings",label:"Settings",icon:Zd,badge:null}];return s.jsxs("aside",{className:"w-64 bg-[#0d131f] border-r border-slate-800/80 flex flex-col shrink-0 select-none",children:[s.jsxs("div",{className:"h-16 px-5 border-b border-slate-800/80 flex items-center gap-3",children:[s.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-tr from-indigo-600 to-violet-500 flex items-center justify-center shadow-lg shadow-indigo-500/20",children:s.jsx(Ol,{className:"w-5 h-5 text-white"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"font-extrabold tracking-tight text-white flex items-center gap-1.5 text-base",children:["Vibe",s.jsx("span",{className:"text-indigo-400",children:"Pilot"})]}),s.jsx("div",{className:"text-[10px] uppercase font-semibold tracking-wider text-slate-500",children:"You lead. AI builds."})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-4 space-y-1",children:C.map(j=>{const $=j.icon,H=i===j.id;return s.jsxs("button",{onClick:()=>d(j.id),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-150 ${H?"bg-indigo-600/15 text-indigo-300 border border-indigo-500/30":"text-slate-400 hover:text-slate-200 hover:bg-slate-800/50 border border-transparent"}`,children:[s.jsx($,{className:`w-4 h-4 shrink-0 ${H?"text-indigo-400":"text-slate-400"}`}),s.jsx("span",{className:"flex-1 text-left truncate",children:j.label}),j.badge&&s.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full font-semibold ${j.alert?"bg-amber-500/20 text-amber-300 border border-amber-500/30 animate-pulse":"bg-slate-800 text-slate-300 border border-slate-700"}`,children:j.badge})]},j.id)})}),s.jsx("div",{className:"p-3 border-t border-slate-800/80 bg-slate-900/30",children:s.jsxs("div",{className:"text-xs text-slate-500 flex items-center justify-between",children:[s.jsx("span",{children:"Inference Provider"}),s.jsxs("span",{className:"text-indigo-400 font-semibold flex items-center gap-1",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400"})," Ollama v1"]})]})})]})},bx=({projects:i,selectedProject:d,onSelectProject:c,onAddProject:b,ollamaStatus:g,pendingQuestions:h=[],onAnswerQuestion:C,permissionRequests:j=[],onResolvePermission:$,approvals:H=[],onResolveApproval:M,proposedTasks:R=[],onApproveProposedTask:L,onOpenMonitor:ge})=>{const[Q,se]=f.useState(!1),[Z,I]=f.useState(!1),[ne,ae]=f.useState(!1),[Y,oe]=f.useState(null),[X,Ee]=f.useState({}),[B,Ce]=f.useState(null),[Te,Me]=f.useState([]),[$e,ke]=f.useState([]),G=f.useRef(null),ee=f.useRef(null),ue=j.filter(A=>A.status==="pending"),w=H.filter(A=>A.status==="pending"),E=h.length+ue.length+w.length+R.length;f.useEffect(()=>{const A=S=>{G.current&&!G.current.contains(S.target)&&I(!1),ee.current&&!ee.current.contains(S.target)&&ae(!1)};return(Z||ne)&&document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[Z,ne]),f.useEffect(()=>{O.getSystemUsage().then(Ce).catch(()=>{}),O.getUsageMonitor().then(V=>{Me(V.summaries||[]),ke(V.contexts||[])}).catch(()=>{});const S=setInterval(()=>{O.getSystemUsage().then(Ce).catch(()=>{}),ne&&O.getUsageMonitor().then(V=>{Me(V.summaries||[]),ke(V.contexts||[])}).catch(()=>{})},ne?2e3:5e3),k=kn.subscribe(V=>{V.type==="usage.summary"?Me(Se=>{const gt=Se.filter(Je=>!(Je.scope===V.summary.scope&&Je.instanceId===V.summary.instanceId));return[V.summary,...gt]}):V.type==="context.updated"&&ke(Se=>{const gt=Se.filter(Je=>!(Je.scope===V.status.scope&&Je.instanceId===V.status.instanceId));return[V.status,...gt]})});return()=>{clearInterval(S),k()}},[ne]);const P=Te.reduce((A,S)=>A+S.totalTokens,0),z=Te.reduce((A,S)=>A+S.totalCalls,0),[p,T]=f.useState(""),[fe,he]=f.useState(""),[de,pe]=f.useState([]),[be,ve]=f.useState(""),[Ne,Oe]=f.useState(!1),ze=async A=>{ve("");try{const S=await O.getProjectDirectories(A);T(S.path),he(S.parentPath),pe(S.directories)}catch(S){ve(S instanceof Error?S.message:"Unable to read directory")}};f.useEffect(()=>{Q&&!p&&ze(d==null?void 0:d.path)},[Q]);const le=async()=>{Oe(!0),ve("");try{await b(p),se(!1),T("")}catch(A){ve(A instanceof Error?A.message:"Unable to register project")}finally{Oe(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"h-16 border-b border-slate-800/80 bg-[#0d131f]/80 backdrop-blur-md px-6 flex items-center justify-between shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(yr,{className:"w-5 h-5 text-indigo-400 shrink-0"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs uppercase font-semibold text-slate-500",children:"Project:"}),s.jsx("select",{value:(d==null?void 0:d.id)||"",onChange:A=>{const S=i.find(k=>k.id===A.target.value);S&&c(S)},className:"bg-slate-900/90 text-sm font-semibold text-slate-200 border border-slate-700/80 rounded-lg px-3 py-1.5 focus:outline-none focus:border-indigo-500",children:i.map(A=>s.jsx("option",{value:A.id,children:A.name},A.id))}),s.jsxs("button",{onClick:()=>se(!0),className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-700/80 bg-slate-900/90 px-2.5 py-1.5 text-xs font-semibold text-slate-300 hover:border-indigo-500 hover:text-white",title:"Open a project directory",children:[s.jsx(qi,{className:"w-3.5 h-3.5"})," Open folder"]})]}),d&&s.jsx("div",{className:"hidden md:flex items-center gap-1.5 ml-2",children:d.detectedTechnologies.slice(0,4).map(A=>s.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-md bg-slate-800/80 text-slate-300 border border-slate-700/60 font-mono",children:A},A))})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",ref:ee,children:[s.jsxs("button",{onClick:()=>{ae(A=>!A),I(!1)},className:"flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-semibold border bg-slate-900/90 text-slate-300 border-slate-800 hover:border-indigo-500/50 transition-colors",title:"System CPU, RAM, GPU, Token & Context Usage Monitor",children:[s.jsx(Rl,{className:"w-3.5 h-3.5 text-indigo-400"}),s.jsx("span",{children:"Usage"}),B&&s.jsxs("span",{className:"hidden lg:inline text-[10px] font-mono text-slate-400",children:["CPU ",B.cpu.usagePercent,"% · RAM ",B.ram.usagePercent,"%",B.gpu.available&&B.gpu.usagePercent!==void 0?` · GPU ${B.gpu.usagePercent}%`:""]}),s.jsx(Fd,{className:"w-3 h-3 opacity-70"})]}),ne&&s.jsxs("div",{className:"absolute right-0 mt-2 w-96 max-h-[78vh] overflow-y-auto rounded-2xl border border-slate-700 bg-[#111927] shadow-2xl z-50 p-3.5 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 pb-2",children:[s.jsxs("span",{className:"text-xs font-bold text-white flex items-center gap-1.5",children:[s.jsx(Rl,{className:"w-3.5 h-3.5 text-indigo-400"})," Usage & System Monitor"]}),s.jsx("button",{onClick:()=>ae(!1),className:"text-slate-400 hover:text-white",children:s.jsx(ks,{className:"w-4 h-4"})})]}),B&&s.jsxs("div",{className:"space-y-2.5",children:[s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-2.5 space-y-1.5",children:[s.jsxs("div",{className:"flex justify-between text-[11px]",children:[s.jsxs("span",{className:"text-slate-400",children:["CPU (",B.cpu.cores," cores)"]}),s.jsxs("span",{className:"font-mono font-bold text-indigo-300",children:[B.cpu.usagePercent,"%"]})]}),s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${B.cpu.usagePercent>=90?"bg-rose-500":B.cpu.usagePercent>=70?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${B.cpu.usagePercent}%`}})})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-2.5 space-y-1.5",children:[s.jsxs("div",{className:"flex justify-between text-[11px]",children:[s.jsxs("span",{className:"text-slate-400",children:["RAM (",(B.ram.usedBytes/1024**3).toFixed(1)," / ",(B.ram.totalBytes/1024**3).toFixed(1)," GB)"]}),s.jsxs("span",{className:"font-mono font-bold text-emerald-300",children:[B.ram.usagePercent,"%"]})]}),s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${B.ram.usagePercent>=90?"bg-rose-500":B.ram.usagePercent>=75?"bg-amber-500":"bg-emerald-500"}`,style:{width:`${B.ram.usagePercent}%`}})})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-2.5 space-y-1.5",children:[s.jsxs("div",{className:"flex justify-between text-[11px]",children:[s.jsxs("span",{className:"text-slate-400 truncate pr-2",children:["GPU ",B.gpu.available&&B.gpu.name?`(${B.gpu.name})`:""]}),s.jsx("span",{className:"font-mono font-bold text-violet-300 shrink-0",children:B.gpu.available?B.gpu.usagePercent!==void 0?`${B.gpu.usagePercent}%`:"Active":"Unavailable"})]}),s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-violet-500 transition-all",style:{width:`${B.gpu.usagePercent??(B.gpu.vramUsedMb&&B.gpu.vramTotalMb?Math.min(100,Math.round(B.gpu.vramUsedMb/B.gpu.vramTotalMb*100)):B.gpu.available?100:0)}%`}})}),B.gpu.available&&B.gpu.vramUsedMb!==void 0&&s.jsxs("div",{className:"text-[10px] font-mono text-slate-500",children:["VRAM: ",B.gpu.vramUsedMb,B.gpu.vramTotalMb?` / ${B.gpu.vramTotalMb}`:""," MB",B.gpu.temperatureC!==void 0?` · ${B.gpu.temperatureC}°C`:""]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-2.5",children:[s.jsx("div",{className:"text-[10px] uppercase text-slate-500",children:"Inference Calls"}),s.jsx("div",{className:"text-sm font-bold font-mono text-white mt-0.5",children:z})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/70 p-2.5",children:[s.jsx("div",{className:"text-[10px] uppercase text-slate-500",children:"Total Tokens"}),s.jsx("div",{className:"text-sm font-bold font-mono text-indigo-300 mt-0.5",children:P.toLocaleString()})]})]}),$e.length>0&&s.jsxs("div",{className:"space-y-1.5 pt-1 border-t border-slate-800",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-semibold",children:"Active Contexts"}),s.jsx("div",{className:"space-y-1.5 max-h-36 overflow-y-auto",children:$e.slice(0,6).map(A=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/60 p-2 space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[s.jsxs("span",{className:"truncate text-slate-300",children:[s.jsxs("span",{className:"font-mono uppercase text-indigo-400 mr-1",children:["[",A.scope,"]"]}),A.label||A.instanceId]}),s.jsxs("span",{className:"font-mono font-bold text-slate-300 shrink-0 ml-2",children:[A.usagePercent,"%"]})]}),s.jsx("div",{className:"h-1 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full ${A.level==="critical"?"bg-rose-500":A.level==="warn"?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${A.usagePercent}%`}})})]},`${A.scope}:${A.instanceId}`))})]}),ge&&s.jsx("button",{onClick:()=>{ae(!1),ge()},className:"w-full py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-xs font-semibold text-indigo-300 transition-colors",children:"Open Full Monitor"})]})]}),s.jsxs("div",{className:"relative",ref:G,children:[s.jsxs("button",{onClick:()=>{I(A=>!A),ae(!1)},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-semibold border transition-colors ${E>0?"bg-amber-500/15 text-amber-300 border-amber-500/50 hover:bg-amber-500/25":"bg-slate-900/90 text-slate-300 border-slate-800 hover:border-slate-700"}`,title:"Pending approvals, agent questions, and permission requests",children:[s.jsx(Ul,{className:`w-3.5 h-3.5 ${E>0?"text-amber-400 animate-pulse":"text-slate-400"}`}),s.jsx("span",{children:"Approvals"}),E>0&&s.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-amber-500 text-slate-950 font-bold text-[10px] leading-none",children:E}),s.jsx(Fd,{className:"w-3 h-3 opacity-70"})]}),Z&&s.jsxs("div",{className:"absolute right-0 mt-2 w-96 max-h-[75vh] overflow-y-auto rounded-2xl border border-slate-700 bg-[#111927] shadow-2xl z-50 p-3 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 pb-2",children:[s.jsxs("span",{className:"text-xs font-bold text-white",children:["Action Required (",E,")"]}),s.jsx("button",{onClick:()=>I(!1),className:"text-slate-400 hover:text-white",children:s.jsx(ks,{className:"w-4 h-4"})})]}),E===0&&s.jsx("div",{className:"py-6 text-center text-xs text-slate-500",children:"All clear — no approvals needed right now."}),h.map(A=>s.jsxs("div",{className:"rounded-xl border border-sky-500/30 bg-sky-950/20 p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-sky-300",children:[s.jsx("span",{children:A.agentId}),s.jsx("span",{children:A.taskId.slice(-10)})]}),s.jsx("div",{className:"text-xs font-medium text-slate-100",children:A.question}),A.options&&A.options.length>0?s.jsx("div",{className:"flex flex-wrap gap-1.5",children:A.options.map(S=>s.jsx("button",{disabled:Y===A.id,onClick:async()=>{oe(A.id);try{await(C==null?void 0:C(A.id,S))}finally{oe(null)}},className:"px-2.5 py-1 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-[11px] font-semibold",children:S},S))}):s.jsxs("form",{className:"flex gap-1.5",onSubmit:async S=>{S.preventDefault();const k=(X[A.id]||"").trim();if(k){oe(A.id);try{await(C==null?void 0:C(A.id,k))}finally{oe(null)}}},children:[s.jsx("input",{value:X[A.id]||"",onChange:S=>Ee(k=>({...k,[A.id]:S.target.value})),placeholder:"Type response…",className:"flex-1 bg-slate-950 border border-slate-700 rounded-lg px-2 py-1 text-xs text-slate-200"}),s.jsx("button",{type:"submit",disabled:Y===A.id,className:"px-2.5 py-1 rounded-lg bg-indigo-600 text-white text-xs font-semibold",children:"Send"})]})]},A.id)),ue.map(A=>s.jsxs("div",{className:"rounded-xl border border-amber-500/30 bg-amber-950/20 p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-amber-300",children:[s.jsxs("span",{children:["Permission: ",A.operation]}),s.jsx("span",{children:A.agentId})]}),s.jsx("div",{className:"text-xs font-mono text-slate-200 break-all",children:A.targetPath}),s.jsx("div",{className:"text-[11px] text-slate-400",children:A.reason}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:["allow_once","allow_task","deny"].map(S=>s.jsx("button",{disabled:Y===A.id,onClick:async()=>{oe(A.id);try{await($==null?void 0:$(A.id,S))}finally{oe(null)}},className:`px-2 py-1 rounded-lg text-[11px] font-semibold disabled:opacity-50 ${S==="deny"?"bg-rose-600/80 hover:bg-rose-500 text-white":"bg-emerald-600/80 hover:bg-emerald-500 text-white"}`,children:S==="allow_once"?"Allow once":S==="allow_task"?"Allow task":"Deny"},S))})]},A.id)),w.map(A=>s.jsxs("div",{className:"rounded-xl border border-indigo-500/30 bg-indigo-950/20 p-3 space-y-2",children:[s.jsx("div",{className:"text-[10px] font-mono text-indigo-300 uppercase",children:A.actionType}),s.jsx("div",{className:"text-xs text-slate-200",children:A.summary}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{disabled:Y===A.id,onClick:async()=>{oe(A.id);try{await(M==null?void 0:M(A.id,"approved"))}finally{oe(null)}},className:"px-2.5 py-1 rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white text-[11px] font-semibold flex items-center gap-1",children:[s.jsx(ht,{className:"w-3 h-3"})," Approve"]}),s.jsxs("button",{disabled:Y===A.id,onClick:async()=>{oe(A.id);try{await(M==null?void 0:M(A.id,"rejected"))}finally{oe(null)}},className:"px-2.5 py-1 rounded-lg bg-rose-600 hover:bg-rose-500 text-white text-[11px] font-semibold flex items-center gap-1",children:[s.jsx(jr,{className:"w-3 h-3"})," Reject"]})]})]},A.id)),R.map(A=>s.jsxs("div",{className:"rounded-xl border border-emerald-500/30 bg-emerald-950/20 p-3 space-y-2",children:[s.jsx("div",{className:"text-[10px] font-mono text-emerald-300 uppercase",children:"Proposed Task"}),s.jsx("div",{className:"text-xs font-semibold text-slate-100",children:A.title}),s.jsxs("button",{disabled:Y===A.id,onClick:async()=>{oe(A.id);try{await(L==null?void 0:L(A.id))}finally{oe(null)}},className:"px-2.5 py-1 rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white text-[11px] font-semibold flex items-center gap-1",children:[s.jsx(ht,{className:"w-3 h-3"})," Approve task"]})]},A.id))]})]}),s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-slate-900/90 border border-slate-800 text-xs",children:[s.jsx(Ws,{className:"w-4 h-4 text-indigo-400 shrink-0"}),s.jsx("span",{className:"text-slate-400",children:"Model:"}),s.jsx("span",{className:"font-mono font-medium text-slate-200",children:(g==null?void 0:g.activeModel)||"qwen2.5-coder:latest"})]}),s.jsx("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold border ${g!=null&&g.online?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-rose-500/10 text-rose-400 border-rose-500/30"}`,title:g!=null&&g.online?`Connected to Ollama v${g.version||""}`:"Ollama is offline at localhost:11434",children:g!=null&&g.online?s.jsxs(s.Fragment,{children:[s.jsx(nu,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Ollama Online"})]}):s.jsxs(s.Fragment,{children:[s.jsx(su,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Ollama Offline"})]})})]})]}),Q&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/75 p-4",role:"dialog","aria-modal":"true","aria-label":"Open project folder",children:s.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-slate-700 bg-[#111927] shadow-2xl",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-5 py-4",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-semibold text-slate-100",children:"Open project folder"}),s.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Choose the directory where VibeCodePilot should work."})]}),s.jsx("button",{onClick:()=>se(!1),className:"rounded p-1 text-slate-400 hover:bg-slate-800 hover:text-white","aria-label":"Close",children:s.jsx(ks,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"p-5",children:[s.jsxs("form",{onSubmit:A=>{A.preventDefault(),ze(p)},className:"flex gap-2",children:[s.jsx("input",{value:p,onChange:A=>T(A.target.value),className:"min-w-0 flex-1 rounded-lg border border-slate-700 bg-slate-900 px-3 py-2 font-mono text-sm text-slate-200 focus:border-indigo-500 focus:outline-none","aria-label":"Directory path"}),s.jsx("button",{type:"submit",className:"rounded-lg bg-slate-800 px-3 text-sm font-medium text-slate-200 hover:bg-slate-700",children:"Go"})]}),s.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[s.jsxs("button",{onClick:()=>void ze(fe),disabled:!fe||fe===p,className:"inline-flex items-center gap-1 text-xs text-slate-400 hover:text-white disabled:cursor-not-allowed disabled:opacity-40",children:[s.jsx(Ip,{className:"w-4 h-4"})," Parent folder"]}),s.jsxs("span",{className:"text-xs text-slate-500",children:[de.length," folders"]})]}),s.jsxs("div",{className:"mt-3 h-64 overflow-y-auto rounded-lg border border-slate-800 bg-slate-950/40",children:[de.map(A=>s.jsxs("button",{onClick:()=>void ze(A.path),className:"flex w-full items-center gap-2 border-b border-slate-800/70 px-3 py-2 text-left text-sm text-slate-300 hover:bg-slate-800",children:[s.jsx(yr,{className:"w-4 h-4 shrink-0 text-indigo-400"}),A.name]},A.path)),!de.length&&s.jsx("p",{className:"p-4 text-sm text-slate-500",children:"No child folders found."})]}),be&&s.jsx("p",{className:"mt-3 text-sm text-rose-400",children:be})]}),s.jsxs("div",{className:"flex justify-end gap-3 border-t border-slate-800 px-5 py-4",children:[s.jsx("button",{onClick:()=>se(!1),className:"rounded-lg px-3 py-2 text-sm text-slate-400 hover:text-white",children:"Cancel"}),s.jsx("button",{onClick:()=>void le(),disabled:!p||Ne,className:"rounded-lg bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-500 disabled:cursor-not-allowed disabled:opacity-50",children:Ne?"Opening…":"Select this folder"})]})]})})]})},ts="VibeCodePilot.chat.sessionId",jx=({project:i,onSendMessage:d,onSendMessageBackground:c,backgroundBusy:b=!1,recentTasks:g,onExecuteTask:h,onSummarizeSession:C,onPlanReview:j,refreshToken:$=0,onProcessingChange:H})=>{const[M,R]=f.useState([]),[L,ge]=f.useState([]),[Q,se]=f.useState(()=>localStorage.getItem(ts)),[Z,I]=f.useState(!1),[ne,ae]=f.useState(""),[Y,oe]=f.useState(!1),[X,Ee]=f.useState(new Set),[B,Ce]=f.useState(null),[Te,Me]=f.useState(!1),[$e,ke]=f.useState(null),[G,ee]=f.useState(""),[ue,w]=f.useState(null),[E,P]=f.useState(null),[z,p]=f.useState(null),T=f.useRef(null);f.useEffect(()=>{H==null||H(Y||b)},[Y,b]),f.useEffect(()=>()=>H==null?void 0:H(!1),[]);const fe=`Welcome to **VibeCodePilot**. I am your Supervisor and engineering coordinator.
|
|
476
|
+
|
|
477
|
+
Current Project: **${(i==null?void 0:i.name)||"this workspace"}**
|
|
478
|
+
Detected Technologies: ${(i==null?void 0:i.detectedTechnologies.join(", "))||"detecting…"}
|
|
479
|
+
|
|
480
|
+
Tell me what you'd like to build, modify, or inspect. I will coordinate with the Planner and Prompter to design and execute your requirements.`,he=()=>{var S;return(S=T.current)==null?void 0:S.scrollIntoView({behavior:"smooth"})};f.useEffect(()=>{let S=!1;return(async()=>{let V=localStorage.getItem(ts);if(V){const Se=await O.getChatMessages(V).catch(()=>null);if(S)return;if(Se&&Se.session){R(Se.messages);return}localStorage.removeItem(ts),se(null),V=null}R(V?[]:[{id:"welcome",sender:"supervisor",text:fe,timestamp:new Date().toLocaleTimeString()}])})(),()=>{S=!0}},[i==null?void 0:i.id]),f.useEffect(()=>{Z&&O.getChatSessions(i==null?void 0:i.id).then(ge).catch(()=>ge([]))},[Z,i==null?void 0:i.id,Q]),f.useEffect(()=>{he()},[M,Y,ue==null?void 0:ue.text,ue==null?void 0:ue.thinking]),f.useEffect(()=>(Q?O.getContextStatus("chat",Q).then(P).catch(()=>{}):P(null),kn.subscribe(k=>{k.type==="planning.status"&&k.sessionId===Q?k.status==="clarification_required"?p({questions:k.questions||[],message:k.message}):p(null):k.type==="chat.stream.chunk"&&k.sessionId&&k.sessionId===Q&&!k.taskId?w(V=>{const Se=V&&V.sessionId===k.sessionId?V:{sessionId:k.sessionId,text:"",thinking:""};return{sessionId:Se.sessionId,text:Se.text+(k.chunk||""),thinking:Se.thinking+(k.thinkingChunk||"")}}):k.type==="chat.background.completed"&&k.sessionId===Q?w(null):k.type==="context.updated"&&k.status.scope==="chat"&&k.status.instanceId===Q&&P(k.status)})),[Q]),f.useEffect(()=>{!Q||$===0||O.getChatMessages(Q).then(S=>{S!=null&&S.session&&(R(S.messages),w(null))}).catch(()=>{})},[Q,$]);const de=async S=>{I(!1),Ce(null),p(null);const k=await O.getChatMessages(S).catch(()=>null);!k||!k.session||(se(S),localStorage.setItem(ts,S),R(k.messages))},pe=async(S,k)=>{if(ke(null),!!k.trim())try{await O.renameChatSession(S,k.trim());const V=await O.getChatSessions(i==null?void 0:i.id);ge(V)}catch(V){Ce(`Rename failed: ${V.message}`)}},be=async S=>{try{await O.deleteChatSession(S);const k=await O.getChatSessions(i==null?void 0:i.id);ge(k),S===Q&&(localStorage.removeItem(ts),se(null),R([{id:"welcome",sender:"supervisor",text:fe,timestamp:new Date().toLocaleTimeString()}]))}catch(k){Ce(`Delete failed: ${k.message}`)}},ve={status:Y?"Supervisor is working":b?"Working in background":"Ready",userMessages:M.filter(S=>S.sender==="user").length,supervisorMessages:M.filter(S=>S.sender==="supervisor").length,plansCreated:M.filter(S=>S.planCreated).length,tasksLinked:g.filter(S=>S.sessionId===Q).length,sessionStart:M.length>0?M[0].timestamp:null,lastActivity:M.length>0?M[M.length-1].timestamp:null},Ne=()=>{se(null),localStorage.removeItem(ts),I(!1),Ce(null),p(null),R([{id:"welcome",sender:"supervisor",text:fe,timestamp:new Date().toLocaleTimeString()}])},Oe=S=>{Ee(k=>{const V=new Set(k);return V.has(S)?V.delete(S):V.add(S),V})},ze=async S=>{var gt,Je,Rt;if(S.preventDefault(),!ne.trim()||Y||b)return;const k=ne.trim(),V=((Rt=(Je=(gt=S.nativeEvent)==null?void 0:gt.submitter)==null?void 0:Je.dataset)==null?void 0:Rt.mode)==="bg",Se=Q||`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;if(Q||(se(Se),localStorage.setItem(ts,Se)),ae(""),Ce(null),w({sessionId:Se,text:"",thinking:""}),R(Le=>[...Le,{id:`user-${Date.now()}`,sender:"user",text:k,timestamp:new Date().toLocaleTimeString()}]),V&&c){c(k,Se).then(Le=>{Le.sessionId&&Le.sessionId!==Se&&(se(Le.sessionId),localStorage.setItem(ts,Le.sessionId))}).catch(Le=>{w(null),Ce(`Background send failed: ${Le.message}`)});return}oe(!0);try{const Le=await d(k,Se);Le.sessionId&&Le.sessionId!==Se&&(se(Le.sessionId),localStorage.setItem(ts,Le.sessionId)),w(null),R(Et=>{var Wt;return[...Et,{id:`sup-${Date.now()}`,sender:"supervisor",text:Le.response||((Wt=Le.decision)==null?void 0:Wt.response)||"Request received and processed.",thinking:Le.thinking,planCreated:Le.planCreated,createdTasksCount:Le.createdTasksCount,timestamp:new Date().toLocaleTimeString()}]})}catch(Le){w(null),R(Et=>[...Et,{id:`err-${Date.now()}`,sender:"supervisor",text:`Error contacting Supervisor: ${Le.message}`,timestamp:new Date().toLocaleTimeString()}])}finally{oe(!1)}},le=async()=>{if(!Q){Ce("No active session to summarize yet — send a message first.");return}oe(!0),Ce(null);try{const{summary:S}=await C(Q);R(k=>[...k,{id:`summary-${Date.now()}`,sender:"supervisor",text:`**Session Summary**
|
|
481
|
+
|
|
482
|
+
${S}`,timestamp:new Date().toLocaleTimeString()}])}catch(S){Ce(`Summarize failed: ${S.message}`)}finally{oe(!1)}},A=async()=>{oe(!0),Ce(null);try{const S=await j();R(k=>[...k,{id:`plan-${Date.now()}`,sender:"supervisor",text:`**Quick Plan Review**
|
|
483
|
+
|
|
484
|
+
${S.review}`,timestamp:new Date().toLocaleTimeString()}])}catch(S){Ce(`Plan review failed: ${S.message}`)}finally{oe(!1)}};return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden",children:[s.jsxs("div",{className:"px-6 py-3 border-b border-slate-800/80 bg-slate-900/40 flex items-center justify-between text-xs text-slate-400",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(js,{className:"w-4 h-4 text-indigo-400"}),s.jsx("span",{children:"Conversational Supervisor Mode — One interface for all downstream specialists"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[E&&s.jsxs("div",{className:`px-2.5 py-1 rounded-lg border text-[11px] font-mono flex items-center gap-1.5 ${E.level==="critical"?"bg-rose-500/10 border-rose-500/40 text-rose-300":E.level==="warn"?"bg-amber-500/10 border-amber-500/40 text-amber-300":"bg-slate-900 border-slate-800 text-slate-300"}`,title:`Chat Context: ${E.usedTokens}/${E.contextLength} tokens (${E.model})`,children:[s.jsxs("span",{children:["Ctx: ",E.usagePercent,"%"]}),s.jsxs("span",{className:"text-slate-500",children:["(",E.usedTokens,"/",E.contextLength,")"]})]}),s.jsxs("button",{onClick:()=>Me(S=>!S),className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg font-medium text-[11px] transition-colors border ${Te?"bg-indigo-600/20 border-indigo-500/40 text-indigo-300":"bg-slate-800/80 border-transparent hover:bg-slate-700 text-slate-300"}`,title:"Session overview (real session data)",children:[s.jsx(Am,{className:"w-3.5 h-3.5"})," Overview"]}),s.jsxs("button",{onClick:()=>I(S=>!S),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-slate-800/80 hover:bg-slate-700 text-slate-300 font-medium text-[11px] transition-colors",title:"Conversation history",children:[s.jsx(Yi,{className:"w-3.5 h-3.5"})," History"]}),s.jsxs("button",{onClick:Ne,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg bg-indigo-600/80 hover:bg-indigo-500 text-white font-medium text-[11px] transition-colors",title:"Start a new session (the current one is kept in history)",children:[s.jsx(Dl,{className:"w-3.5 h-3.5"})," New Session"]}),s.jsx("span",{className:"font-mono text-slate-400 truncate max-w-xs",title:i==null?void 0:i.path,children:(i==null?void 0:i.path)||"workspace"})]})]}),Z&&s.jsxs("div",{className:"px-6 py-3 border-b border-slate-800/80 bg-slate-900/20 max-h-56 overflow-y-auto",children:[s.jsxs("div",{className:"text-[11px] font-semibold text-slate-400 mb-2 flex items-center gap-1.5",children:[s.jsx(Jd,{className:"w-3.5 h-3.5"})," Conversation history (",L.length,")"]}),L.length===0?s.jsx("div",{className:"text-xs text-slate-500 py-2",children:"No saved sessions yet."}):s.jsx("div",{className:"space-y-1",children:L.map(S=>s.jsxs("button",{onClick:()=>de(S.id),className:`w-full text-left px-3 py-2 rounded-lg text-xs flex items-center justify-between transition-colors ${S.id===Q?"bg-indigo-600/20 border border-indigo-500/40 text-indigo-200":"bg-slate-900/60 border border-slate-800 text-slate-300 hover:bg-slate-800"}`,children:[s.jsx("span",{className:"truncate flex-1",children:$e===S.id?s.jsx("input",{autoFocus:!0,value:G,onChange:k=>ee(k.target.value),onKeyDown:k=>{k.key==="Enter"&&pe(S.id,G),k.key==="Escape"&&ke(null)},className:"w-full bg-slate-950 border border-indigo-500/50 rounded px-2 py-1 text-xs text-slate-200 focus:outline-none"}):S.title}),$e===S.id?s.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[s.jsx("button",{onClick:()=>pe(S.id,G),className:"p-1 rounded hover:bg-emerald-600/30 text-emerald-400",title:"Save",children:s.jsx(Hs,{className:"w-3 h-3"})}),s.jsx("button",{onClick:()=>ke(null),className:"p-1 rounded hover:bg-slate-700 text-slate-400",title:"Cancel",children:s.jsx(ks,{className:"w-3 h-3"})})]}):s.jsxs("span",{className:"ml-2 flex items-center gap-0.5 shrink-0",children:[s.jsx("button",{onClick:k=>{k.stopPropagation(),ke(S.id),ee(S.title)},className:"p-1 rounded hover:bg-slate-700 text-slate-500 hover:text-indigo-400",title:"Rename session",children:s.jsx(Rm,{className:"w-3 h-3"})}),s.jsx("button",{onClick:k=>{k.stopPropagation(),window.confirm(`Delete session "${S.title}" and its messages?`)&&be(S.id)},className:"p-1 rounded hover:bg-slate-700 text-slate-500 hover:text-rose-400",title:"Delete session",children:s.jsx(Ns,{className:"w-3 h-3"})})]}),s.jsx("span",{className:"ml-1 text-[10px] text-slate-500 shrink-0",children:new Date(S.updatedAt).toLocaleString()})]},S.id))})]}),s.jsxs("div",{className:"px-6 py-2 border-b border-slate-800/60 bg-slate-900/20 flex items-center gap-2",children:[s.jsxs("span",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-wide flex items-center gap-1",children:[s.jsx(yx,{className:"w-3 h-3"})," Quick actions"]}),s.jsxs("button",{onClick:le,disabled:Y,className:"px-3 py-1.5 rounded-lg bg-slate-800/80 hover:bg-slate-700 disabled:opacity-50 text-slate-300 text-[11px] font-medium flex items-center gap-1.5 transition-colors",title:"Summarize the current session's conversation",children:[s.jsx(br,{className:"w-3.5 h-3.5 text-amber-400"})," Quick Summarise"]}),s.jsxs("button",{onClick:A,disabled:Y,className:"px-3 py-1.5 rounded-lg bg-slate-800/80 hover:bg-slate-700 disabled:opacity-50 text-slate-300 text-[11px] font-medium flex items-center gap-1.5 transition-colors",title:"Scan plan markdown files in the project, check completed vs. remaining items",children:[s.jsx(em,{className:"w-3.5 h-3.5 text-emerald-400"})," Quick Plan Review"]}),B&&s.jsx("span",{className:"text-[11px] text-amber-400 ml-2",children:B})]}),z&&s.jsxs("div",{className:"px-6 py-3 border-b border-amber-500/30 bg-amber-500/10",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-semibold text-amber-300 mb-2",children:[s.jsx(wn,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:"Planner waiting for your input — answer in the chat below (the original request is kept)"})]}),s.jsx("div",{className:"space-y-2 max-w-3xl",children:(z.questions||[]).map((S,k)=>s.jsxs("div",{className:"text-xs text-slate-200",children:[s.jsxs("span",{className:"font-semibold text-amber-200 mr-1",children:[k+1,"."]}),S.question,S.options&&S.options.length>0&&s.jsx("span",{className:"ml-2 inline-flex flex-wrap gap-1 align-middle",children:S.options.map(V=>s.jsx("button",{onClick:()=>ae(Se=>Se?`${Se}, ${V}`:V),className:"px-2 py-0.5 rounded-md bg-slate-900 border border-slate-700 text-[10px] font-medium text-slate-300 hover:border-amber-400 hover:text-amber-200",children:V},V))}),S.whyItMatters&&s.jsxs("span",{className:"ml-2 text-[10px] text-slate-500",children:["(",S.whyItMatters,")"]})]},S.id||k))})]}),s.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-4",children:[M.map(S=>s.jsxs("div",{className:`flex gap-3 max-w-3xl ${S.sender==="user"?"ml-auto flex-row-reverse":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 shadow-sm ${S.sender==="user"?"bg-indigo-500 text-white":"bg-slate-800 text-indigo-400 border border-slate-700/60"}`,children:S.sender==="user"?s.jsx(tu,{className:"w-4 h-4"}):s.jsx(js,{className:"w-4 h-4"})}),s.jsxs("div",{className:`p-4 rounded-2xl text-sm leading-relaxed shadow-sm ${S.sender==="user"?"bg-indigo-500 text-white rounded-2xl rounded-br-md":"bg-slate-900/90 border border-slate-800/80 text-slate-200 rounded-2xl rounded-bl-md"}`,children:[S.thinking&&s.jsxs("div",{className:"mb-3 rounded-lg bg-slate-950/70 border border-slate-800",children:[s.jsxs("button",{onClick:()=>Oe(S.id),className:"w-full flex items-center gap-2 px-3 py-2 text-[11px] font-medium text-slate-400 hover:text-slate-200",children:[s.jsx(wn,{className:"w-3.5 h-3.5 text-purple-400"}),s.jsx("span",{children:"Model reasoning"}),s.jsx("span",{className:"ml-auto",children:X.has(S.id)?"hide":"show"})]}),X.has(S.id)&&s.jsx("div",{className:"px-3 pb-3 text-xs text-slate-400 whitespace-pre-wrap border-t border-slate-800 pt-2 italic",children:S.thinking})]}),s.jsx("div",{className:"whitespace-pre-wrap",children:S.text}),S.planCreated&&s.jsxs("div",{className:"mt-4 p-3 rounded-lg bg-indigo-950/40 border border-indigo-500/30 text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2 font-semibold text-indigo-300 mb-2",children:[s.jsx(br,{className:"w-4 h-4 text-indigo-400"}),s.jsx("span",{children:"Plan ready for review"})]}),s.jsxs("p",{className:"text-slate-300 mb-3",children:[S.createdTasksCount," validated task(s) were generated from your request and queued on the Task Board as proposals. Review, edit or approve them there — the Prompter compiles each one only after you approve it."]}),s.jsx("div",{className:"space-y-1.5",children:g.slice(0,3).map(k=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-slate-900 border border-slate-800",children:[s.jsx("span",{className:"truncate flex-1 font-mono text-slate-300",children:k.title}),s.jsxs("button",{onClick:()=>h(k.id),className:"ml-2 px-2.5 py-1 rounded bg-indigo-600 hover:bg-indigo-500 text-white flex items-center gap-1 font-semibold text-[11px]",children:[s.jsx(jn,{className:"w-3 h-3"})," Execute in Worktree"]})]},k.id))})]}),s.jsx("div",{className:"mt-1.5 text-[10px] text-slate-500 text-right",children:S.timestamp})]})]},S.id)),ue&&(ue.text||ue.thinking)&&s.jsxs("div",{className:"flex gap-3 max-w-3xl",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-800 text-indigo-400 border border-slate-700/60 flex items-center justify-center shrink-0 shadow-sm",children:s.jsx(js,{className:"w-4 h-4 animate-pulse"})}),s.jsxs("div",{className:"p-4 rounded-2xl text-sm leading-relaxed shadow-sm bg-slate-900/90 border border-indigo-500/40 text-slate-200 rounded-bl-md",children:[ue.thinking&&s.jsxs("div",{className:"mb-3 rounded-lg bg-slate-950/70 border border-slate-800 px-3 py-2 text-xs text-slate-400 whitespace-pre-wrap italic",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-medium text-purple-300 mb-1",children:[s.jsx(wn,{className:"w-3.5 h-3.5"})," Thinking…"]}),ue.thinking]}),s.jsxs("div",{className:"whitespace-pre-wrap",children:[ue.text,s.jsx("span",{className:"inline-block w-1.5 h-4 ml-0.5 bg-indigo-400 animate-pulse align-middle"})]})]})]}),(Y||b)&&!(ue&&(ue.text||ue.thinking))&&s.jsxs("div",{className:"flex gap-3 max-w-xl",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-800 text-indigo-400 border border-slate-700/60 flex items-center justify-center shrink-0",children:s.jsx(js,{className:"w-4 h-4 animate-spin"})}),s.jsxs("div",{className:"p-4 rounded-2xl bg-slate-900/90 border border-slate-800/80 text-sm text-slate-400 flex items-center gap-2",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-400 animate-ping"}),"Supervisor is analyzing your request…"]})]}),s.jsx("div",{ref:T})]}),Te&&s.jsxs("aside",{className:"w-72 shrink-0 border-l border-slate-800/80 bg-slate-900/40 overflow-y-auto p-4 space-y-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-slate-500",children:"Session Overview"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Ht,{label:"Status",value:ve.status,accent:"text-amber-300"}),s.jsx(Ht,{label:"Session",value:Q?Q.slice(0,22)+"…":"not saved yet",mono:!0}),s.jsx(Ht,{label:"Your messages",value:String(ve.userMessages)}),s.jsx(Ht,{label:"Supervisor replies",value:String(ve.supervisorMessages)}),s.jsx(Ht,{label:"Plans created",value:String(ve.plansCreated),accent:"text-indigo-300"}),s.jsx(Ht,{label:"Linked tasks",value:String(ve.tasksLinked),accent:"text-emerald-300"}),s.jsx(Ht,{label:"Project",value:(i==null?void 0:i.name)||"—"}),s.jsx(Ht,{label:"Technologies",value:(i==null?void 0:i.detectedTechnologies.join(", "))||"—"}),s.jsx(Ht,{label:"Session start",value:ve.sessionStart?new Date(ve.sessionStart).toLocaleString():"—"}),s.jsx(Ht,{label:"Last activity",value:ve.lastActivity?new Date(ve.lastActivity).toLocaleString():"—"})]}),s.jsx("div",{className:"pt-3 border-t border-slate-800/70 text-[10px] text-slate-500",children:"All figures come from this session's real persisted messages and tasks."})]})]}),s.jsxs("form",{onSubmit:ze,className:"p-4 border-t border-slate-800/60 bg-slate-900/40",children:[s.jsxs("div",{className:"max-w-3xl mx-auto flex items-end gap-2 bg-slate-950/90 border border-slate-800 rounded-2xl px-3 py-2 focus-within:border-indigo-500/60 transition-colors shadow-lg shadow-black/20",children:[s.jsx("textarea",{value:ne,onChange:S=>ae(S.target.value),onKeyDown:S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),ze(S))},rows:1,placeholder:"Message the Supervisor… (Shift+Enter for a new line)",className:"flex-1 bg-transparent resize-none px-2 py-2 text-sm text-slate-200 placeholder-slate-500 focus:outline-none max-h-40"}),c&&s.jsx("button",{type:"submit","data-mode":"bg",disabled:Y||b||!ne.trim(),title:"Run in background — keep chatting while the AI works",className:"p-2.5 rounded-xl bg-slate-800 hover:bg-slate-700 disabled:opacity-40 text-slate-300 transition-all shrink-0",children:s.jsx(Ol,{className:"w-4 h-4"})}),s.jsx("button",{type:"submit",disabled:Y||b||!ne.trim(),title:"Send message",className:"p-2.5 rounded-xl bg-indigo-500 hover:bg-indigo-400 disabled:opacity-40 text-white transition-all shrink-0 shadow-md shadow-indigo-500/25",children:s.jsx(Sp,{className:"w-4 h-4"})})]}),b&&s.jsxs("div",{className:"max-w-3xl mx-auto mt-2 text-[11px] text-amber-300/90 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),"Working in the background — watch the hierarchy above for live progress."]})]})]})},Ht=({label:i,value:d,accent:c,mono:b})=>s.jsxs("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[s.jsx("span",{className:"text-slate-500 shrink-0",children:i}),s.jsx("span",{className:`${c||"text-slate-200"} ${b?"font-mono":""} truncate text-right`,title:d,children:d})]}),Nx=({projects:i,tasks:d,agents:c,approvals:b,ollamaStatus:g,onNavigate:h})=>{const C=d.filter(M=>M.status==="running"),j=d.filter(M=>M.status==="completed"),$=b.filter(M=>M.status==="pending"),H=[{label:"Active Projects",value:i.length,icon:yr,color:"text-indigo-400",view:"workspace"},{label:"Running Tasks",value:C.length,icon:zl,color:"text-amber-400",view:"tasks"},{label:"Completed Tasks",value:j.length,icon:ht,color:"text-emerald-400",view:"tasks"},{label:"Pending Approvals",value:$.length,icon:Nn,color:"text-rose-400",view:"approvals",alert:$.length>0},{label:"Registered Agents",value:c.length,icon:Vl,color:"text-violet-400",view:"agents"},{label:"Active Ollama Model",value:(g==null?void 0:g.activeModel)||"qwen2.5-coder",icon:Ws,color:"text-sky-400",view:"models",isMono:!0}];return s.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8 bg-[#0b0f17]",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold tracking-tight text-white",children:"Engineering Overview"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Real-time visibility into multi-agent orchestration, execution pipelines, and local inference."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:H.map((M,R)=>{const L=M.icon;return s.jsxs("div",{onClick:()=>h(M.view),className:"p-5 rounded-2xl bg-slate-900/60 border border-slate-800/80 hover:border-indigo-500/40 cursor-pointer transition-all duration-200 group",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:M.label}),s.jsx(L,{className:`w-5 h-5 ${M.color}`})]}),s.jsxs("div",{className:"mt-3 flex items-baseline justify-between",children:[s.jsx("span",{className:`text-2xl font-bold text-white ${M.isMono?"font-mono text-base truncate":""}`,children:M.value}),s.jsxs("span",{className:"text-xs text-indigo-400 opacity-0 group-hover:opacity-100 flex items-center gap-0.5 transition-opacity",children:["View ",s.jsx(Np,{className:"w-3.5 h-3.5"})]})]})]},R)})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h2",{className:"text-base font-semibold text-white flex items-center gap-2",children:[s.jsx(zl,{className:"w-4 h-4 text-indigo-400"})," Recent Development Tasks"]}),s.jsx("button",{onClick:()=>h("tasks"),className:"text-xs text-indigo-400 hover:text-indigo-300 font-semibold",children:"All Tasks →"})]}),s.jsx("div",{className:"space-y-3",children:d.length===0?s.jsx("p",{className:"text-xs text-slate-500 py-6 text-center",children:"No tasks currently queued. Submit requirements in AI Workspace."}):d.slice(-5).reverse().map(M=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950/70 border border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{className:"truncate flex-1 mr-3",children:[s.jsx("div",{className:"text-sm font-medium text-slate-200 truncate",children:M.title}),s.jsxs("div",{className:"text-[11px] text-slate-500 font-mono mt-0.5",children:["ID: ",M.id]})]}),s.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full font-semibold uppercase ${M.status==="completed"?"bg-emerald-500/20 text-emerald-400":M.status==="running"?"bg-amber-500/20 text-amber-400 animate-pulse":"bg-slate-800 text-slate-400"}`,children:M.status})]},M.id))})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h2",{className:"text-base font-semibold text-white flex items-center gap-2",children:[s.jsx(Nn,{className:"w-4 h-4 text-rose-400"})," Pending Approvals Gate"]}),s.jsx("button",{onClick:()=>h("approvals"),className:"text-xs text-indigo-400 hover:text-indigo-300 font-semibold",children:"All Approvals →"})]}),s.jsx("div",{className:"space-y-3",children:$.length===0?s.jsxs("div",{className:"py-8 text-center text-xs text-slate-500 flex flex-col items-center gap-2",children:[s.jsx(ht,{className:"w-8 h-8 text-emerald-500/40"}),s.jsx("span",{children:"Zero pending human approvals. System running safely."})]}):$.map(M=>s.jsxs("div",{className:"p-3.5 rounded-xl bg-slate-950/70 border border-amber-500/30 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:M.title}),s.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:M.description})]}),s.jsx("button",{onClick:()=>h("approvals"),className:"ml-3 px-3 py-1.5 rounded-lg bg-amber-500 hover:bg-amber-400 text-slate-950 font-bold text-xs shrink-0",children:"Review"})]},M.id))})]})]})]})},kx=({tasks:i,onExecuteTask:d,onSelectTask:c,onArchiveTask:b,onDeleteTask:g,onUnarchiveTask:h,archivedTasks:C=[],onCancelTask:j,onRetryTask:$,onCreateTask:H,onApproveProposedTask:M,onReviewAgainTask:R})=>{const[L,ge]=f.useState(!1),[Q,se]=f.useState(!1),[Z,I]=f.useState(""),[ne,ae]=f.useState(""),[Y,oe]=f.useState("medium"),[X,Ee]=f.useState(null),[B,Ce]=f.useState(new Set),[Te,Me]=f.useState(!1),$e=async()=>{if(!(!Z.trim()||!ne.trim()||!H))try{Ee(null),await H(Z.trim(),ne.trim(),Y),I(""),ae(""),oe("medium"),se(!1)}catch(P){Ee(P.message||"Unable to create task.")}},ke=(P,z)=>{z.stopPropagation(),Ce(p=>{const T=new Set(p);return T.has(P)?T.delete(P):T.add(P),T})},G=L?[...i,...C]:i,ee=G.length>0&&G.every(P=>B.has(P.id)),ue=()=>{Ce(P=>ee?new Set:new Set(G.map(z=>z.id)))},w=async P=>{const z=Array.from(B);if(!(z.length===0||Te)&&!(P==="delete"&&!window.confirm(`Permanently remove ${z.length} selected task(s)? This cannot be undone.`))){Me(!0);try{for(const p of z)P==="archive"?b&&await b(p):g&&await g(p);Ce(new Set)}finally{Me(!1)}}},E=[{id:"proposed",title:"Proposed Task / Plan",color:"border-fuchsia-500/50 text-fuchsia-300"},{id:"planned",title:"Planned",color:"border-slate-700 text-slate-300"},{id:"prompting",title:"Prompting",color:"border-violet-500/50 text-violet-300"},{id:"ready",title:"Ready",color:"border-indigo-500/50 text-indigo-300"},{id:"running",title:"Running in Worktree",color:"border-amber-500/50 text-amber-300"},{id:"blocked",title:"Blocked (Dependency/Conflict)",color:"border-rose-500/50 text-rose-300"},{id:"failed",title:"Failed",color:"border-rose-600/60 text-rose-300"},{id:"cancelled",title:"Cancelled",color:"border-slate-600 text-slate-400"},{id:"completed",title:"Completed",color:"border-emerald-500/50 text-emerald-300"}];return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden p-6 space-y-4",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-white",children:"Task Board"}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Dependency-aware task pipeline with Git worktree isolation and conflict prevention."})]}),s.jsxs("button",{onClick:()=>se(P=>!P),className:"ml-3 flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-indigo-600 hover:bg-indigo-500 text-xs text-white font-semibold",children:[s.jsx(Dl,{className:"w-3.5 h-3.5"})," New task"]}),s.jsxs("button",{onClick:ue,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-slate-900/80 border border-slate-800 hover:border-slate-600 text-xs text-slate-300 transition-colors",title:"Select all visible tasks",children:[ee?s.jsx($i,{className:"w-3.5 h-3.5 text-indigo-400"}):s.jsx(Ii,{className:"w-3.5 h-3.5"}),ee?"Deselect all":"Select all"]}),C.length>0&&s.jsxs("button",{onClick:()=>ge(P=>!P),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-slate-900/80 border border-slate-800 hover:border-slate-600 text-xs text-slate-300 transition-colors",children:[s.jsx(hr,{className:"w-3.5 h-3.5"}),L?"Hide archived":`Archived (${C.length})`]})]})}),Q&&s.jsxs("div",{className:"rounded-xl border border-indigo-500/40 bg-slate-900 p-4 grid gap-2",children:[s.jsx("input",{value:Z,onChange:P=>I(P.target.value),placeholder:"Task title",className:"bg-slate-950 border border-slate-700 rounded px-3 py-2 text-sm"}),s.jsx("textarea",{value:ne,onChange:P=>ae(P.target.value),placeholder:"Describe the outcome and constraints",className:"bg-slate-950 border border-slate-700 rounded px-3 py-2 text-sm min-h-20"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:Y,onChange:P=>oe(P.target.value),className:"bg-slate-950 border border-slate-700 rounded px-2 py-1 text-xs",children:[s.jsx("option",{value:"low",children:"Low"}),s.jsx("option",{value:"medium",children:"Medium"}),s.jsx("option",{value:"high",children:"High"}),s.jsx("option",{value:"critical",children:"Critical"})]}),s.jsx("button",{onClick:$e,className:"px-3 py-1.5 rounded bg-indigo-600 text-xs font-semibold",children:"Create task"}),X&&s.jsx("span",{className:"text-xs text-rose-300",children:X})]})]}),B.size>0&&s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-xl bg-indigo-950/60 border border-indigo-500/40",children:[s.jsxs("span",{className:"text-xs font-semibold text-indigo-200",children:[B.size," selected"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[b&&s.jsxs("button",{onClick:()=>w("archive"),disabled:Te,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 disabled:opacity-50 text-xs text-white font-semibold",children:[s.jsx(hr,{className:"w-3.5 h-3.5"})," Archive selected"]}),g&&s.jsxs("button",{onClick:()=>w("delete"),disabled:Te,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-rose-600 hover:bg-rose-500 disabled:opacity-50 text-xs text-white font-semibold",children:[s.jsx(Ns,{className:"w-3.5 h-3.5"})," Remove selected"]})]}),s.jsx("button",{onClick:()=>Ce(new Set),disabled:Te,className:"ml-auto text-xs text-slate-400 hover:text-slate-200 disabled:opacity-50",children:"Clear selection"})]}),s.jsx("div",{className:"flex-1 flex gap-4 overflow-x-auto pb-4",children:E.map(P=>{const z=i.filter(p=>p.status===P.id);return s.jsxs("div",{className:"w-72 shrink-0 flex flex-col rounded-2xl bg-slate-900/60 border border-slate-800/80 overflow-hidden",children:[s.jsxs("div",{className:`px-4 py-3 border-b ${P.color} bg-slate-900/90 flex items-center justify-between`,children:[s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:P.title}),s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-slate-800 font-mono font-semibold",children:z.length})]}),s.jsx("div",{className:"flex-1 p-3 overflow-y-auto space-y-3",children:z.length===0?s.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-slate-600 italic",children:"No tasks"}):z.map(p=>{var T,fe,he,de;return s.jsxs("div",{onClick:()=>c==null?void 0:c(p),className:`p-3.5 rounded-xl bg-slate-950/90 border cursor-pointer transition-all duration-150 space-y-2 group ${B.has(p.id)?"border-indigo-500 ring-1 ring-indigo-500/40":"border-slate-800 hover:border-indigo-500/50"}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"text-xs font-semibold text-slate-200 line-clamp-2 flex-1",children:[p.title,s.jsx("span",{className:`ml-2 text-[9px] uppercase ${p.priority==="critical"?"text-rose-300":p.priority==="high"?"text-amber-300":"text-slate-500"}`,children:p.priority||"medium"})]}),s.jsx("button",{onClick:pe=>ke(p.id,pe),title:B.has(p.id)?"Deselect task":"Select task",className:"shrink-0 mt-0.5 text-slate-600 hover:text-indigo-400 transition-colors",children:B.has(p.id)?s.jsx($i,{className:"w-4 h-4 text-indigo-400"}):s.jsx(Ii,{className:"w-4 h-4"})})]}),s.jsx("div",{className:"text-[11px] text-slate-400 line-clamp-2",children:p.description}),(T=p.executionLogs)!=null&&T.length||(fe=p.statusHistory)!=null&&fe.length?s.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[((he=p.executionLogs)==null?void 0:he.length)||0," log(s) · ",((de=p.statusHistory)==null?void 0:de.length)||0," transition(s)"]}):null,p.scope.affectedFiles.length>0&&s.jsx("div",{className:"text-[10px] text-slate-500 font-mono truncate",children:p.scope.affectedFiles.slice(0,2).join(", ")}),s.jsxs("div",{className:"pt-2 border-t border-slate-800/80 flex items-center justify-between",children:[s.jsx("span",{className:"text-[10px] text-indigo-400 font-mono truncate max-w-[120px]",children:p.assignedAgentId}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[p.status==="proposed"&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:pe=>{pe.stopPropagation(),M==null||M(p.id)},title:"Plan looks right — approve and move to Planned",className:"px-2 py-1 rounded bg-emerald-600 hover:bg-emerald-500 text-white font-semibold text-[10px] flex items-center gap-1 shadow-sm",children:[s.jsx(ht,{className:"w-2.5 h-2.5"})," Approve"]}),s.jsxs("button",{onClick:pe=>{pe.stopPropagation();const be=window.prompt("What should the Planner change in this proposed task?","");be!==null&&(R==null||R(p.id,be))},title:"Not right — send it back to the Planner to redesign this same task",className:"px-2 py-1 rounded bg-slate-800 hover:bg-slate-700 text-slate-200 font-semibold text-[10px] flex items-center gap-1",children:[s.jsx(Hi,{className:"w-2.5 h-2.5"})," Review again"]})]}),(p.status==="ready"||p.status==="planned")&&s.jsxs("button",{onClick:pe=>{pe.stopPropagation(),d(p.id)},className:"px-2 py-1 rounded bg-indigo-600 hover:bg-indigo-500 text-white font-semibold text-[10px] flex items-center gap-1 shadow-sm",children:[s.jsx(jn,{className:"w-2.5 h-2.5"})," Execute"]}),p.status==="running"&&s.jsxs("button",{onClick:pe=>{pe.stopPropagation(),j==null||j(p.id)},className:"text-[10px] text-amber-400 font-semibold animate-pulse flex items-center gap-1",title:"Cancel task",children:[s.jsx(jr,{className:"w-3 h-3"})," Cancel"]}),p.status==="completed"&&s.jsxs("span",{className:"text-[10px] text-emerald-400 font-semibold flex items-center gap-1",children:[s.jsx(ht,{className:"w-3 h-3"})," Done"]}),(p.status==="failed"||p.status==="blocked"||p.status==="cancelled")&&s.jsxs("button",{onClick:pe=>{pe.stopPropagation(),$==null||$(p.id)},className:"px-2 py-1 rounded bg-slate-800 hover:bg-slate-700 text-slate-200 font-semibold text-[10px] flex items-center gap-1",title:"Queue task for retry",children:[s.jsx(Hi,{className:"w-2.5 h-2.5"})," Retry"]}),(b||g)&&s.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[b&&s.jsx("button",{onClick:pe=>{pe.stopPropagation(),b(p.id)},title:"Archive this task",className:"p-1 rounded hover:bg-slate-800 text-slate-500 hover:text-amber-400 transition-colors",children:s.jsx(hr,{className:"w-3.5 h-3.5"})}),g&&s.jsx("button",{onClick:pe=>{pe.stopPropagation(),window.confirm(`Remove task "${p.title}" permanently?`)&&g(p.id)},title:"Remove this task",className:"p-1 rounded hover:bg-slate-800 text-slate-500 hover:text-rose-400 transition-colors",children:s.jsx(Ns,{className:"w-3.5 h-3.5"})})]})]})]})]},p.id)})})]},P.id)})}),L&&C.length>0&&s.jsxs("div",{className:"rounded-2xl bg-slate-900/60 border border-slate-800/80 p-4",children:[s.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-slate-500 mb-3 flex items-center gap-1.5",children:[s.jsx(hr,{className:"w-3.5 h-3.5"})," Archived tasks"]}),s.jsx("div",{className:"space-y-2 max-h-56 overflow-y-auto",children:C.map(P=>s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-xl bg-slate-950/80 border border-slate-800",children:[s.jsxs("div",{className:"min-w-0 flex items-center gap-2",children:[s.jsx("button",{onClick:z=>ke(P.id,z),title:B.has(P.id)?"Deselect task":"Select task",className:"text-slate-600 hover:text-indigo-400 transition-colors shrink-0",children:B.has(P.id)?s.jsx($i,{className:"w-4 h-4 text-indigo-400"}):s.jsx(Ii,{className:"w-4 h-4"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-slate-300 truncate",children:P.title}),s.jsxs("div",{className:"text-[10px] text-slate-500",children:[P.status," · ",new Date(P.updatedAt).toLocaleString()]})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 ml-3",children:[h&&s.jsx("button",{onClick:()=>h(P.id),title:"Restore task",className:"p-1.5 rounded hover:bg-slate-800 text-slate-400 hover:text-emerald-400 transition-colors",children:s.jsx(xp,{className:"w-3.5 h-3.5"})}),g&&s.jsx("button",{onClick:()=>{window.confirm(`Remove task "${P.title}" permanently?`)&&g(P.id)},title:"Remove permanently",className:"p-1.5 rounded hover:bg-slate-800 text-slate-400 hover:text-rose-400 transition-colors",children:s.jsx(Ns,{className:"w-3.5 h-3.5"})})]})]},P.id))})]})]})},yn=i=>(i||[]).join(`
|
|
485
|
+
`),Ai=i=>i.split(`
|
|
486
|
+
`).map(d=>d.trim()).filter(Boolean),Sx=({task:i,agentIds:d,allTasks:c,pendingQuestions:b=[],onAnswerQuestion:g,permissionRequests:h=[],onResolvePermission:C,onClose:j,onSave:$,onApprove:H,onExecute:M,onCancel:R,onRetry:L,onArchive:ge,onDelete:Q})=>{var S;const[se,Z]=f.useState(null),[I,ne]=f.useState({}),[ae,Y]=f.useState(i.title),[oe,X]=f.useState(i.description),[Ee,B]=f.useState(i.priority??"medium"),[Ce,Te]=f.useState(i.assignedAgentId),[Me,$e]=f.useState(yn((S=i.scope)==null?void 0:S.affectedFiles)),[ke,G]=f.useState(yn(i.relatedFiles)),[ee,ue]=f.useState(i.dependencies||[]),[w,E]=f.useState(yn(i.acceptanceCriteria)),[P,z]=f.useState(!1),[p,T]=f.useState(null),[fe,he]=f.useState(null),[de,pe]=f.useState(null),[be,ve]=f.useState([]),[Ne,Oe]=f.useState(null);f.useEffect(()=>{var k;Y(i.title),X(i.description),B(i.priority??"medium"),Te(i.assignedAgentId),$e(yn((k=i.scope)==null?void 0:k.affectedFiles)),G(yn(i.relatedFiles)),ue(i.dependencies||[]),E(yn(i.acceptanceCriteria)),T(null),he(null),pe(null),ve([]),O.getContextStatus("task",i.id).then(Oe).catch(()=>Oe(null)),O.getTaskStream(i.id).then(V=>{V!=null&&V.stream&&pe({text:V.stream.text||"",thinking:V.stream.thinking||"",stage:V.stream.stage,done:V.stream.done}),Array.isArray(V==null?void 0:V.activities)&&V.activities.length>0&&ve(V.activities)}).catch(()=>{})},[i.id]),f.useEffect(()=>kn.subscribe(V=>{V.type==="chat.stream.chunk"&&V.taskId===i.id?pe(Se=>{const gt=Se&&(Se.stage!==V.stage||Se.done),Je=!Se||gt?{text:"",thinking:"",stage:V.stage}:Se;return{text:Je.text+(V.chunk||""),thinking:Je.thinking+(V.thinkingChunk||""),stage:V.stage||Je.stage,done:!!V.done}}):V.type==="execution.activity"&&V.taskId===i.id?ve(Se=>[...Se.slice(-19),{state:V.state,message:V.message,timestamp:V.timestamp}]):V.type==="context.updated"&&V.status.scope==="task"&&V.status.instanceId===i.id&&Oe(V.status)}),[i.id]);const ze=!["running","completed","failed","cancelled"].includes(i.status),le=async()=>{if(!ae.trim()){T("Title is required.");return}if(!oe.trim()){T("Description is required.");return}try{z(!0),T(null),await $(i.id,{title:ae.trim(),description:oe.trim(),priority:Ee,assignedAgentId:Ce,scope:{affectedFiles:Ai(Me)},relatedFiles:Ai(ke),dependencies:ee,acceptanceCriteria:Ai(w)}),he(new Date().toLocaleTimeString())}catch(k){T(k.message||"Unable to save task.")}finally{z(!1)}},A=k=>{ue(V=>V.includes(k)?V.filter(Se=>Se!==k):[...V,k])};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-6",onClick:j,children:s.jsxs("div",{className:"w-full max-w-2xl max-h-full overflow-y-auto rounded-2xl border border-slate-700 bg-[#0d1220] p-5 space-y-4",onClick:k=>k.stopPropagation(),children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-mono",children:[i.id," · ",i.status]}),s.jsx("input",{value:ae,onChange:k=>Y(k.target.value),disabled:!ze,className:"mt-1 w-full bg-transparent text-lg font-bold text-white outline-none disabled:text-slate-300 border-b border-transparent focus:border-indigo-500"})]}),s.jsx("button",{onClick:j,className:"p-1.5 rounded-lg hover:bg-slate-800 text-slate-400 hover:text-white",children:s.jsx(ks,{className:"w-4 h-4"})})]}),s.jsx("textarea",{value:oe,onChange:k=>X(k.target.value),disabled:!ze,placeholder:"Describe the outcome and constraints",className:"w-full bg-slate-950 border border-slate-700 rounded-lg px-3 py-2 text-sm text-slate-200 min-h-20 disabled:opacity-60"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("label",{className:"text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Priority"}),s.jsxs("select",{value:Ee,onChange:k=>B(k.target.value),disabled:!ze,className:"w-full bg-slate-950 border border-slate-700 rounded px-2 py-1.5 text-xs",children:[s.jsx("option",{value:"low",children:"Low"}),s.jsx("option",{value:"medium",children:"Medium"}),s.jsx("option",{value:"high",children:"High"}),s.jsx("option",{value:"critical",children:"Critical"})]})]}),s.jsxs("label",{className:"text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Assigned agent"}),s.jsx("select",{value:Ce,onChange:k=>Te(k.target.value),disabled:!ze,className:"w-full bg-slate-950 border border-slate-700 rounded px-2 py-1.5 text-xs font-mono",children:[...new Set([i.assignedAgentId,...d])].map(k=>s.jsx("option",{value:k,children:k},k))})]})]}),s.jsxs("label",{className:"block text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Affected files (one per path, relative to project root)"}),s.jsx("textarea",{value:Me,onChange:k=>$e(k.target.value),disabled:!ze,placeholder:`src/index.ts
|
|
487
|
+
src/utils/http.ts`,className:"w-full bg-slate-950 border border-slate-700 rounded px-3 py-2 text-xs font-mono min-h-16"})]}),s.jsxs("label",{className:"block text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Related files (reference material, not edited)"}),s.jsx("textarea",{value:ke,onChange:k=>G(k.target.value),disabled:!ze,className:"w-full bg-slate-950 border border-slate-700 rounded px-3 py-2 text-xs font-mono min-h-16"})]}),s.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Dependencies (must complete before this task can run)"}),s.jsxs("div",{className:"max-h-28 overflow-y-auto rounded border border-slate-800 bg-slate-950/60 p-2 space-y-1",children:[c.filter(k=>k.id!==i.id&&!k.archived).map(k=>s.jsxs("label",{className:"flex items-center gap-2 text-[11px] text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:ee.includes(k.id),onChange:()=>A(k.id),disabled:!ze,className:"accent-indigo-500"}),s.jsx("span",{className:"truncate",children:k.title}),s.jsx("span",{className:"text-slate-600 font-mono",children:k.status})]},k.id)),c.filter(k=>k.id!==i.id&&!k.archived).length===0&&s.jsx("div",{className:"text-[11px] text-slate-600 italic",children:"No other tasks available."})]})]}),s.jsxs("label",{className:"block text-xs text-slate-400 space-y-1",children:[s.jsx("span",{children:"Acceptance criteria (one per line)"}),s.jsx("textarea",{value:w,onChange:k=>E(k.target.value),disabled:!ze,placeholder:`File exists and compiles
|
|
488
|
+
Behaviour matches description`,className:"w-full bg-slate-950 border border-slate-700 rounded px-3 py-2 text-xs min-h-16"})]}),(b.length>0||h.length>0)&&s.jsxs("div",{className:"rounded-xl border border-amber-500/40 bg-amber-950/20 p-3.5 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold text-amber-300",children:[s.jsx(Ul,{className:"w-4 h-4 text-amber-400 animate-pulse"}),s.jsxs("span",{children:["Approval Required (",b.length+h.length,")"]})]}),b.map(k=>s.jsxs("div",{className:"rounded-lg border border-sky-500/30 bg-slate-950/80 p-3 space-y-2",children:[s.jsx("div",{className:"text-xs font-medium text-slate-100",children:k.question}),k.options&&k.options.length>0?s.jsx("div",{className:"flex flex-wrap gap-1.5",children:k.options.map(V=>s.jsx("button",{disabled:se===k.id,onClick:async()=>{Z(k.id);try{await(g==null?void 0:g(k.id,V))}finally{Z(null)}},className:"px-2.5 py-1 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-[11px] font-semibold",children:V},V))}):s.jsxs("form",{className:"flex gap-1.5",onSubmit:async V=>{V.preventDefault();const Se=(I[k.id]||"").trim();if(Se){Z(k.id);try{await(g==null?void 0:g(k.id,Se))}finally{Z(null)}}},children:[s.jsx("input",{value:I[k.id]||"",onChange:V=>ne(Se=>({...Se,[k.id]:V.target.value})),placeholder:"Type response…",className:"flex-1 bg-slate-900 border border-slate-700 rounded-lg px-2 py-1 text-xs text-slate-200"}),s.jsx("button",{type:"submit",disabled:se===k.id,className:"px-2.5 py-1 rounded-lg bg-indigo-600 text-white text-xs font-semibold",children:"Send"})]})]},k.id)),h.map(k=>s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-slate-950/80 p-3 space-y-2",children:[s.jsxs("div",{className:"text-[11px] font-mono text-amber-300",children:[k.operation,": ",k.targetPath]}),s.jsx("div",{className:"text-[11px] text-slate-400",children:k.reason}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:["allow_once","allow_task","deny"].map(V=>s.jsx("button",{disabled:se===k.id,onClick:async()=>{Z(k.id);try{await(C==null?void 0:C(k.id,V))}finally{Z(null)}},className:`px-2.5 py-1 rounded-lg text-[11px] font-semibold disabled:opacity-50 ${V==="deny"?"bg-rose-600/80 hover:bg-rose-500 text-white":"bg-emerald-600/80 hover:bg-emerald-500 text-white"}`,children:V==="allow_once"?"Allow once":V==="allow_task"?"Allow task":"Deny"},V))})]},k.id))]}),Ne&&Ne.usedTokens>0&&s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/70 p-3 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono",children:[s.jsxs("span",{className:"uppercase tracking-wider text-slate-400",children:["Agent Context Monitor (",Ne.model,")"]}),s.jsxs("span",{className:Ne.level==="critical"?"text-rose-400 font-bold":Ne.level==="warn"?"text-amber-400 font-bold":"text-emerald-400 font-bold",children:[Ne.usagePercent,"% · ",Ne.usedTokens.toLocaleString()," / ",Ne.contextLength.toLocaleString()," tok"]})]}),s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${Ne.level==="critical"?"bg-rose-500":Ne.level==="warn"?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${Ne.usagePercent}%`}})})]}),(i.status==="running"||de||be.length>0)&&s.jsxs("div",{className:"rounded-lg border border-indigo-500/40 bg-slate-950 p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-indigo-300",children:[s.jsx(bn,{className:"w-3 h-3"}),s.jsx("span",{children:i.status==="running"&&!(de!=null&&de.done)?`Live execution stream${de!=null&&de.stage?` (${de.stage})`:""}`:"Execution stream"}),i.status==="running"&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-indigo-400 animate-ping"})]}),be.length>0&&s.jsx("div",{className:"space-y-0.5 max-h-24 overflow-y-auto",children:be.map((k,V)=>s.jsxs("div",{className:"text-[10px] font-mono text-slate-400",children:[new Date(k.timestamp).toLocaleTimeString()," — ",s.jsx("span",{className:"text-indigo-300 uppercase",children:k.state}),": ",k.message]},V))}),(de==null?void 0:de.thinking)&&s.jsx("div",{className:"text-[11px] text-purple-300/80 bg-slate-900/70 border border-slate-800 rounded p-2 whitespace-pre-wrap italic max-h-32 overflow-y-auto",children:de.thinking}),(de==null?void 0:de.text)&&s.jsxs("pre",{className:"text-[11px] text-slate-200 font-mono whitespace-pre-wrap max-h-48 overflow-y-auto border-t border-slate-800 pt-2",children:[de.text,!de.done&&s.jsx("span",{className:"inline-block w-1.5 h-3.5 ml-0.5 bg-indigo-400 animate-pulse align-middle"})]})]}),i.completionSummary&&s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/60 p-3 text-[11px] text-slate-300",children:[s.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Result summary"}),s.jsx("div",{className:"mt-1 whitespace-pre-wrap",children:i.completionSummary})]}),p&&s.jsx("div",{className:"text-xs text-rose-400",children:p}),fe&&!p&&s.jsxs("div",{className:"text-xs text-emerald-400",children:["Saved at ",fe,"."]}),s.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[i.status==="proposed"&&H&&s.jsxs("button",{onClick:()=>H(i.id),className:"px-3 py-1.5 rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(jn,{className:"w-3 h-3"})," Approve task"]}),ze&&(i.status==="planned"||i.status==="ready")&&M&&s.jsxs("button",{onClick:()=>M(i.id),className:"px-3 py-1.5 rounded-lg bg-indigo-600 hover:bg-indigo-500 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(jn,{className:"w-3 h-3"})," Execute"]}),i.status==="running"&&R&&s.jsxs("button",{onClick:()=>R(i.id),className:"px-3 py-1.5 rounded-lg bg-amber-600/80 hover:bg-amber-500 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(jr,{className:"w-3 h-3"})," Cancel execution"]}),["failed","blocked","cancelled"].includes(i.status)&&L&&s.jsxs("button",{onClick:()=>L(i.id),className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(Hi,{className:"w-3 h-3"})," Retry"]}),ge&&!i.archived&&s.jsxs("button",{onClick:()=>ge(i.id),className:"px-3 py-1.5 rounded-lg bg-slate-900 border border-slate-700 hover:border-amber-500 text-slate-300 text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(hr,{className:"w-3 h-3"})," Archive"]}),Q&&s.jsxs("button",{onClick:()=>{window.confirm(`Remove task "${i.title}" permanently?`)&&Q(i.id)},className:"px-3 py-1.5 rounded-lg bg-slate-900 border border-slate-700 hover:border-rose-500 text-slate-300 text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(Ns,{className:"w-3 h-3"})," Delete"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[ze&&s.jsxs("button",{onClick:le,disabled:P,className:"px-3 py-1.5 rounded-lg bg-emerald-600 hover:bg-emerald-500 disabled:opacity-50 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(wr,{className:"w-3 h-3"})," ",P?"Saving…":"Save changes"]}),s.jsx("button",{onClick:j,className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-semibold",children:"Close"})]})]})]})})},Cx=({prompts:i,onApprovePrompt:d,onRejectPrompt:c})=>{var C;const[b,g]=f.useState(((C=i[0])==null?void 0:C.id)||""),h=i.find(j=>j.id===b)||i[0];return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(vr,{className:"w-5 h-5 text-indigo-400"})," Prompt Studio (Prompter Layer)"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Inspect, validate, and edit specialized implementation prompts compiled for development agents."})]}),s.jsxs("div",{className:"flex-1 flex gap-6 overflow-hidden",children:[s.jsxs("div",{className:"w-80 shrink-0 rounded-2xl bg-slate-900/60 border border-slate-800/80 flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 font-semibold text-xs text-slate-300 uppercase tracking-wider",children:["Compiled Prompts (",i.length,")"]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:i.length===0?s.jsx("div",{className:"py-12 text-center text-xs text-slate-500 italic",children:"No prompts generated yet."}):i.map(j=>s.jsxs("div",{onClick:()=>g(j.id),className:`p-3 rounded-xl border cursor-pointer transition-all ${(h==null?void 0:h.id)===j.id?"bg-indigo-600/15 border-indigo-500/50 text-white":"bg-slate-950/70 border-slate-800 text-slate-300 hover:border-slate-700"}`,children:[s.jsx("div",{className:"text-xs font-semibold truncate",children:j.taskObjective||j.id}),s.jsxs("div",{className:"flex items-center justify-between mt-2 text-[10px]",children:[s.jsx("span",{className:"font-mono text-indigo-400",children:j.assignedAgentId}),s.jsx("span",{className:`px-2 py-0.5 rounded-full font-semibold uppercase ${j.isApproved?"bg-emerald-500/20 text-emerald-400":"bg-amber-500/20 text-amber-400"}`,children:j.status})]})]},j.id))})]}),h?s.jsxs("div",{className:"flex-1 flex flex-col rounded-2xl bg-slate-900/60 border border-slate-800/80 overflow-hidden",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between bg-slate-900/90",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-bold text-white",children:h.taskObjective}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400 mt-1",children:[s.jsxs("span",{children:["Specialist: ",s.jsx("strong",{className:"text-indigo-400 font-mono",children:h.assignedAgentId})]}),s.jsx("span",{children:"·"}),s.jsxs("span",{children:["Skills: ",s.jsx("strong",{className:"text-slate-300 font-mono",children:h.loadedSkills.join(", ")||"Default"})]})]})]}),s.jsx("div",{className:"flex items-center gap-3",children:h.isApproved?s.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400 font-semibold px-3 py-1.5 rounded-lg bg-emerald-500/10 border border-emerald-500/30",children:[s.jsx(ht,{className:"w-4 h-4"})," Approved for Dispatch"]}):s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>d(h.id),className:"px-3 py-1.5 rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(lx,{className:"w-3.5 h-3.5"})," Approve"]}),s.jsxs("button",{onClick:()=>c(h.id),className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-rose-900/50 text-slate-300 hover:text-rose-300 text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(nx,{className:"w-3.5 h-3.5"})," Reject"]})]})})]}),s.jsxs("div",{className:"px-6 py-2.5 bg-slate-950 border-b border-slate-800 flex items-center justify-between text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nn,{className:"w-4 h-4 text-emerald-400"}),s.jsx("span",{className:"text-slate-300 font-medium",children:"Validation:"}),s.jsx("span",{className:"text-emerald-400 font-semibold",children:"Passed Scope & Contract Verification"})]}),s.jsxs("div",{className:"text-[11px] text-slate-500 font-mono",children:["Prompt ID: ",h.id]})]}),s.jsx("div",{className:"flex-1 p-6 overflow-y-auto",children:s.jsx("pre",{className:"p-4 rounded-xl bg-slate-950 border border-slate-800 text-xs text-slate-300 font-mono whitespace-pre-wrap leading-relaxed",children:h.fullPromptText})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-slate-500 text-sm",children:"Select a prompt to inspect."})]})]})},_x={task:i=>i.startsWith("task."),tool:i=>i.includes("tool"),approval:i=>i.includes("approval"),permission:i=>i.includes("permission."),error:i=>i.includes("error")||i.includes("failed")||i.includes("expired"),chat:i=>i.startsWith("chat."),agent:i=>i.startsWith("agent.")||i==="hierarchy.stage"||i==="execution.activity"},Ex=({events:i,onClear:d})=>{const[c,b]=f.useState("events"),[g,h]=f.useState("all"),[C,j]=f.useState(""),[$,H]=f.useState([]),[M,R]=f.useState([]),[L,ge]=f.useState(null);f.useEffect(()=>{O.getUsageMonitor().then(ae=>{H(ae.summaries||[]),R(ae.contexts||[])}).catch(()=>{}),O.getSystemUsage().then(ge).catch(()=>{});const I=setInterval(()=>{O.getSystemUsage().then(ge).catch(()=>{})},2e3),ne=kn.subscribe(ae=>{ae.type==="usage.summary"?H(Y=>{const oe=Y.filter(X=>!(X.scope===ae.summary.scope&&X.instanceId===ae.summary.instanceId));return[ae.summary,...oe]}):ae.type==="context.updated"&&R(Y=>{const oe=Y.filter(X=>!(X.scope===ae.status.scope&&X.instanceId===ae.status.instanceId));return[ae.status,...oe]})});return()=>{clearInterval(I),ne()}},[]);const Q=f.useMemo(()=>$.reduce((I,ne)=>({calls:I.calls+ne.totalCalls,prompt:I.prompt+ne.totalPromptTokens,completion:I.completion+ne.totalCompletionTokens,tokens:I.tokens+ne.totalTokens,durationMs:I.durationMs+ne.totalDurationMs}),{calls:0,prompt:0,completion:0,tokens:0,durationMs:0}),[$]),se=f.useMemo(()=>{const I=C.toLowerCase();return i.filter(ne=>g==="all"||_x[g](ne.type)?I?JSON.stringify(ne).toLowerCase().includes(I):!0:!1)},[i,g,C]),Z=()=>{const I=se.map(oe=>`${oe.timestamp} [${oe.type}] ${JSON.stringify(oe)}`),ne=new Blob([I.join(`
|
|
489
|
+
`)],{type:"text/plain"}),ae=URL.createObjectURL(ne),Y=document.createElement("a");Y.href=ae,Y.download=`VibeCodePilot-events-${new Date().toISOString().slice(0,19).replace(/[:T]/g,"-")}.log`,Y.click(),URL.revokeObjectURL(ae)};return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(bn,{className:"w-5 h-5 text-indigo-400"})," Execution Monitor"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Live streaming audit log of multi-agent activities, tool execution events, and state transitions."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex rounded-lg bg-slate-900 border border-slate-800 p-0.5 mr-2",children:[s.jsx("button",{onClick:()=>b("events"),className:`px-3 py-1.5 rounded-md text-xs font-semibold transition-colors ${c==="events"?"bg-indigo-600 text-white":"text-slate-400 hover:text-slate-200"}`,children:"Live Events"}),s.jsxs("button",{onClick:()=>b("usage"),className:`px-3 py-1.5 rounded-md text-xs font-semibold flex items-center gap-1.5 transition-colors ${c==="usage"?"bg-indigo-600 text-white":"text-slate-400 hover:text-slate-200"}`,children:[s.jsx(Rl,{className:"w-3.5 h-3.5"})," Usage & Context (",$.length,")"]})]}),s.jsxs("button",{onClick:Z,disabled:se.length===0,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 text-xs font-medium hover:border-indigo-500/40 disabled:opacity-40",title:"Export filtered events to a .log file",children:[s.jsx(Fi,{className:"w-3.5 h-3.5"})," Export"]}),d&&s.jsxs("button",{onClick:d,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 text-xs font-medium hover:border-rose-500/40",title:"Clear the displayed events (server history is retained)",children:[s.jsx(Ns,{className:"w-3.5 h-3.5"})," Clear display"]})]})]}),c==="usage"?s.jsxs("div",{className:"flex-1 overflow-y-auto space-y-5 min-h-0",children:[L&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] uppercase tracking-wider text-slate-400",children:[s.jsxs("span",{children:["CPU Usage (",L.cpu.cores," cores)"]}),s.jsxs("span",{className:"font-mono font-bold text-indigo-300",children:[L.cpu.usagePercent,"%"]})]}),s.jsx("div",{className:"h-2 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${L.cpu.usagePercent>=90?"bg-rose-500":L.cpu.usagePercent>=70?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${L.cpu.usagePercent}%`}})}),s.jsx("div",{className:"text-[10px] font-mono text-slate-500 truncate",title:L.cpu.model,children:L.cpu.model})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] uppercase tracking-wider text-slate-400",children:[s.jsx("span",{children:"RAM Usage"}),s.jsxs("span",{className:"font-mono font-bold text-emerald-300",children:[L.ram.usagePercent,"%"]})]}),s.jsx("div",{className:"h-2 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${L.ram.usagePercent>=90?"bg-rose-500":L.ram.usagePercent>=75?"bg-amber-500":"bg-emerald-500"}`,style:{width:`${L.ram.usagePercent}%`}})}),s.jsxs("div",{className:"text-[10px] font-mono text-slate-500",children:[(L.ram.usedBytes/1024**3).toFixed(1)," GB / ",(L.ram.totalBytes/1024**3).toFixed(1)," GB"]})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] uppercase tracking-wider text-slate-400",children:[s.jsx("span",{children:"GPU Usage"}),s.jsx("span",{className:"font-mono font-bold text-violet-300",children:L.gpu.available?L.gpu.usagePercent!==void 0?`${L.gpu.usagePercent}%`:"Active":"Unavailable"})]}),s.jsx("div",{className:"h-2 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-violet-500 transition-all",style:{width:`${L.gpu.usagePercent??(L.gpu.vramUsedMb&&L.gpu.vramTotalMb?Math.min(100,Math.round(L.gpu.vramUsedMb/L.gpu.vramTotalMb*100)):L.gpu.available?100:0)}%`}})}),s.jsx("div",{className:"text-[10px] font-mono text-slate-500 truncate",children:L.gpu.available?`${L.gpu.name||"GPU"}${L.gpu.vramUsedMb!==void 0?` · ${L.gpu.vramUsedMb}${L.gpu.vramTotalMb?`/${L.gpu.vramTotalMb}`:""} MB VRAM`:""}${L.gpu.temperatureC!==void 0?` · ${L.gpu.temperatureC}°C`:""}`:"No nvidia-smi or active Ollama VRAM telemetry detected"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Total Inference Calls"}),s.jsx("div",{className:"text-2xl font-bold text-white mt-1 font-mono",children:Q.calls})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Total Tokens"}),s.jsx("div",{className:"text-2xl font-bold text-indigo-300 mt-1 font-mono",children:Q.tokens.toLocaleString()}),s.jsxs("div",{className:"text-[10px] text-slate-500 font-mono mt-0.5",children:[Q.prompt.toLocaleString()," in · ",Q.completion.toLocaleString()," out"]})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Active Contexts"}),s.jsx("div",{className:"text-2xl font-bold text-emerald-300 mt-1 font-mono",children:M.length})]}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Total Inference Time"}),s.jsxs("div",{className:"text-2xl font-bold text-slate-200 mt-1 font-mono",children:[(Q.durationMs/1e3).toFixed(1),"s"]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400 flex items-center gap-1.5",children:[s.jsx(Ws,{className:"w-3.5 h-3.5 text-indigo-400"})," Context Windows (Chat & Task Agents)"]}),M.length===0?s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-900/40 p-6 text-center text-xs text-slate-500",children:"No context usage recorded yet. Send a chat message or execute a task to monitor context occupancy."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:M.map(I=>s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-3.5 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"text-[10px] uppercase font-mono px-1.5 py-0.5 rounded bg-slate-800 text-indigo-300 mr-2",children:I.scope}),s.jsx("span",{className:"text-xs font-semibold text-white truncate",children:I.label||I.instanceId})]}),s.jsxs("span",{className:`text-[11px] font-mono font-bold ${I.level==="critical"?"text-rose-400":I.level==="warn"?"text-amber-400":"text-emerald-400"}`,children:[I.usagePercent,"%"]})]}),s.jsx("div",{className:"h-2 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${I.level==="critical"?"bg-rose-500":I.level==="warn"?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${I.usagePercent}%`}})}),s.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-slate-500",children:[s.jsxs("span",{children:[I.usedTokens.toLocaleString()," / ",I.contextLength.toLocaleString()," tokens"]}),s.jsx("span",{children:I.model})]})]},`${I.scope}:${I.instanceId}`))})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Usage Breakdown"}),s.jsx("div",{className:"space-y-2",children:$.map(I=>s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/60 p-3.5 flex flex-wrap items-center justify-between gap-3 text-xs",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"text-[10px] uppercase font-mono px-1.5 py-0.5 rounded bg-slate-800 text-indigo-300 mr-2",children:I.scope}),s.jsx("span",{className:"font-semibold text-white",children:I.label||I.instanceId})]}),s.jsxs("div",{className:"flex items-center gap-4 text-[11px] font-mono text-slate-400",children:[s.jsxs("span",{children:[I.totalCalls," calls"]}),s.jsxs("span",{className:"text-indigo-300",children:[I.totalTokens.toLocaleString()," tok"]}),s.jsxs("span",{children:[(I.totalDurationMs/1e3).toFixed(1),"s"]})]})]},`${I.scope}:${I.instanceId}`))})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[["all","task","tool","agent","approval","permission","chat","error"].map(I=>s.jsx("button",{onClick:()=>h(I),className:`px-3 py-1.5 rounded-lg text-[11px] font-semibold capitalize transition-colors ${g===I?"bg-indigo-600 text-white":"bg-slate-900 border border-slate-800 text-slate-400 hover:text-slate-200"}`,children:I},I)),s.jsxs("div",{className:"relative ml-auto",children:[s.jsx(Fl,{className:"w-3.5 h-3.5 text-slate-500 absolute left-2.5 top-2.5"}),s.jsx("input",{value:C,onChange:I=>j(I.target.value),placeholder:"Search events…",className:"w-64 bg-slate-950 border border-slate-800 rounded-lg pl-8 pr-3 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"})]}),s.jsxs("span",{className:"text-[11px] font-mono text-slate-500",children:[se.length,"/",i.length," events"]})]}),s.jsxs("div",{className:"flex-1 rounded-2xl bg-slate-950/90 border border-slate-800/80 p-4 overflow-hidden flex flex-col min-h-0",children:[s.jsx("div",{className:"flex items-center justify-between pb-3 border-b border-slate-800 text-xs text-slate-400",children:s.jsxs("div",{className:"flex items-center gap-2 font-mono",children:[s.jsx(Xi,{className:"w-4 h-4 text-emerald-400"}),s.jsx("span",{children:"VibeCodePilot Real-Time Bus (WebSocket)"})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto pt-3 space-y-2 font-mono text-xs min-h-0",children:se.length===0?s.jsx("div",{className:"py-20 text-center text-slate-600 italic",children:"Listening for live events..."}):se.map((I,ne)=>{let ae="bg-slate-800 text-slate-300",Y=s.jsx(bn,{className:"w-3.5 h-3.5"});return I.type.includes("task")?(ae="bg-indigo-950 text-indigo-300 border border-indigo-800/50",Y=s.jsx(jn,{className:"w-3.5 h-3.5 text-indigo-400"})):I.type.includes("tool")?(ae="bg-amber-950 text-amber-300 border border-amber-800/50",Y=s.jsx(Wi,{className:"w-3.5 h-3.5 text-amber-400"})):I.type.includes("approval")||I.type.includes("permission")?(ae="bg-rose-950 text-rose-300 border border-rose-800/50",Y=s.jsx(qd,{className:"w-3.5 h-3.5 text-rose-400"})):(I.type.includes("completed")||I.type.includes("done"))&&(ae="bg-emerald-950 text-emerald-300 border border-emerald-800/50",Y=s.jsx(ht,{className:"w-3.5 h-3.5 text-emerald-400"})),s.jsxs("div",{className:"p-2.5 rounded-lg bg-slate-900/60 border border-slate-800/60 flex items-start gap-3",children:[s.jsx("div",{className:"mt-0.5",children:Y}),s.jsxs("div",{className:"flex-1 space-y-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded font-semibold uppercase ${ae}`,children:I.type}),s.jsx("span",{className:"text-[10px] text-slate-500",children:new Date(I.timestamp).toLocaleTimeString()})]}),s.jsx("div",{className:"text-slate-300 text-xs break-all whitespace-pre-wrap",children:JSON.stringify(I,null,2)})]})]},ne)})})]})]})]})},Tx=({agents:i,onUpdateAgentModel:d})=>s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Vl,{className:"w-5 h-5 text-indigo-400"})," Agent Registry"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Dynamic technology specialists and architectural agents configured with independent skills and permissions."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:i.map(c=>s.jsxs("div",{className:"p-5 rounded-2xl bg-slate-900/60 border border-slate-800/80 flex flex-col justify-between space-y-4 hover:border-indigo-500/40 transition-all duration-200",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[10px] font-bold font-mono uppercase px-2 py-0.5 rounded bg-indigo-950 text-indigo-300 border border-indigo-800/40",children:c.role}),s.jsx("span",{className:"text-xs text-slate-500 font-mono",children:c.id})]}),s.jsx("h2",{className:"text-base font-bold text-white mt-2",children:c.name}),s.jsx("p",{className:"text-xs text-slate-400 mt-1 leading-relaxed",children:c.description}),s.jsxs("div",{className:"mt-3",children:[s.jsx("span",{className:"text-[10px] uppercase font-semibold text-slate-500",children:"Assigned Skills:"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:c.skills.map(b=>s.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-md bg-slate-800 text-slate-300 font-mono",children:b},b))})]}),s.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-2 text-[11px]",children:[s.jsxs("div",{className:"p-2 rounded bg-slate-950 border border-slate-800",children:[s.jsx("div",{className:"text-slate-500 font-semibold uppercase text-[9px]",children:"Permissions"}),s.jsxs("div",{className:"text-slate-300 mt-1 space-y-0.5",children:[s.jsxs("div",{children:["Read: ",c.permissions.readFiles?"yes":"no"]}),s.jsxs("div",{children:["Write: ",c.permissions.writeFiles?"yes":"no"]}),s.jsxs("div",{children:["Git: ",c.permissions.gitOperations?"yes":"no"]})]})]}),s.jsxs("div",{className:"p-2 rounded bg-slate-950 border border-slate-800",children:[s.jsxs("div",{className:"text-slate-500 font-semibold uppercase text-[9px]",children:["Tools (",c.tools.length,")"]}),s.jsx("div",{className:"text-slate-400 mt-1 truncate",children:c.tools.join(", ")})]})]})]}),s.jsxs("div",{className:"pt-3 border-t border-slate-800/80 flex items-center justify-between text-xs",children:[s.jsxs("span",{className:"text-slate-400 flex items-center gap-1 font-mono",children:[s.jsx(Ws,{className:"w-3.5 h-3.5 text-indigo-400"})," ",c.modelConfig.model]}),s.jsx("button",{onClick:()=>{const b=prompt(`Set model for ${c.name}:`,c.modelConfig.model);b&&d(c.id,b)},className:"text-[11px] text-indigo-400 hover:text-indigo-300 font-semibold",children:"Override Model"})]})]},c.id))})]}),Px=({skills:i})=>{const[d,c]=f.useState("all"),[b,g]=f.useState(""),h=["all","backend","frontend","database","ai-ml","infrastructure"],C=i.filter(j=>{const $=d==="all"||j.category.toLowerCase()===d.toLowerCase(),H=j.name.toLowerCase().includes(b.toLowerCase())||j.description.toLowerCase().includes(b.toLowerCase())||j.compatibleTechnologies.some(M=>M.toLowerCase().includes(b.toLowerCase()));return $&&H});return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(br,{className:"w-5 h-5 text-indigo-400"})," Skills Library"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Modular, reusable, versioned developer skills loaded dynamically into specialist execution prompts."})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-center justify-between",children:[s.jsx("div",{className:"flex gap-1.5 p-1 bg-slate-900/90 rounded-xl border border-slate-800",children:h.map(j=>s.jsx("button",{onClick:()=>c(j),className:`px-3 py-1.5 rounded-lg text-xs font-semibold capitalize transition-all ${d===j?"bg-indigo-600 text-white shadow-sm":"text-slate-400 hover:text-slate-200"}`,children:j},j))}),s.jsxs("div",{className:"relative w-full sm:w-64",children:[s.jsx(Fl,{className:"w-4 h-4 text-slate-500 absolute left-3 top-2.5"}),s.jsx("input",{type:"text",placeholder:"Search skills or tech...",value:b,onChange:j=>g(j.target.value),className:"w-full bg-slate-950 border border-slate-800 rounded-xl pl-9 pr-4 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:C.map(j=>s.jsxs("div",{className:"p-5 rounded-2xl bg-slate-900/60 border border-slate-800/80 flex flex-col justify-between space-y-4 hover:border-indigo-500/40 transition-all duration-200",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[10px] font-bold font-mono uppercase px-2 py-0.5 rounded bg-slate-800 text-slate-300",children:j.category}),s.jsxs("span",{className:"text-[10px] text-slate-500 font-mono",children:["v",j.version]})]}),s.jsx("h2",{className:"text-base font-bold text-white mt-2",children:j.name}),s.jsx("p",{className:"text-xs text-slate-400 mt-1 leading-relaxed",children:j.description}),s.jsxs("div",{className:"mt-3",children:[s.jsx("span",{className:"text-[10px] uppercase font-semibold text-slate-500",children:"Compatible Tech:"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:j.compatibleTechnologies.map($=>s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded bg-slate-950 border border-slate-800 text-indigo-300 font-mono",children:$},$))})]})]}),s.jsx("div",{className:"pt-3 border-t border-slate-800/80",children:s.jsxs("details",{className:"text-xs text-slate-400 cursor-pointer",children:[s.jsx("summary",{className:"font-semibold text-indigo-400 hover:text-indigo-300 select-none",children:"View Skill Directives"}),s.jsx("p",{className:"mt-2 text-slate-300 text-[11px] bg-slate-950 p-3 rounded-lg border border-slate-800 font-mono whitespace-pre-wrap leading-relaxed",children:j.instructions})]})})]},j.id))})]})},Mx=({project:i,onUpdateProject:d})=>{const[c,b]=f.useState((i==null?void 0:i.detectedTechnologies)||[]),[g,h]=f.useState(""),[C,j]=f.useState(!1),$=()=>{!g.trim()||c.includes(g.trim())||(b([...c,g.trim()]),h(""))},H=R=>{b(c.filter(L=>L!==R))},M=()=>{if(!i)return;const R={...i,detectedTechnologies:c,updatedAt:new Date().toISOString()};d(R),j(!0),setTimeout(()=>j(!1),2e3)};return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Ol,{className:"w-5 h-5 text-indigo-400"})," Technology Stack Intelligence"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Automatic repository inspection, detected languages, frameworks, and skill mapping."})]}),s.jsxs("div",{className:"max-w-2xl p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 font-semibold uppercase",children:"Active Repository"}),s.jsxs("div",{className:"text-sm font-bold text-white mt-1 flex items-center gap-2",children:[s.jsx(um,{className:"w-4 h-4 text-indigo-400"})," ",i==null?void 0:i.name," (",i==null?void 0:i.path,")"]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-400 font-semibold mb-2",children:"Detected Technologies & Frameworks:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(R=>s.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-lg bg-indigo-950/60 text-indigo-200 border border-indigo-700/50 text-xs font-mono font-medium",children:[s.jsx("span",{children:R}),s.jsx("button",{onClick:()=>H(R),className:"text-slate-400 hover:text-rose-400 font-bold ml-1",children:"×"})]},R))})]}),s.jsxs("div",{className:"flex gap-2 pt-2 border-t border-slate-800",children:[s.jsx("input",{type:"text",placeholder:"Add technology (e.g. Redis, PyTorch, GraphQL)...",value:g,onChange:R=>h(R.target.value),className:"flex-1 bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-xs text-slate-200 focus:outline-none focus:border-indigo-500"}),s.jsxs("button",{onClick:$,className:"px-4 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-white text-xs font-semibold flex items-center gap-1",children:[s.jsx(Dl,{className:"w-3.5 h-3.5"})," Add"]})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 flex items-center justify-between",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Technology tags dictate which skills the Prompter injects into specialist prompts."}),s.jsxs("button",{onClick:M,className:"px-5 py-2.5 rounded-xl bg-indigo-600 hover:bg-indigo-500 text-white font-semibold text-xs flex items-center gap-2 shadow-lg shadow-indigo-600/20",children:[C?s.jsx(ht,{className:"w-4 h-4 text-white"}):s.jsx(wr,{className:"w-4 h-4"}),s.jsx("span",{children:C?"Saved Profile":"Save Stack Profile"})]})]})]})]})},Vd=[{value:"auto",label:"Auto"},{value:"off",label:"Off"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],Vs=i=>{if(i==null)return"";const d=i/(1024*1024*1024);return d>=1?`${d.toFixed(2)} GB`:`${(i/(1024*1024)).toFixed(0)} MB`},$x={pulling:"text-amber-300 bg-amber-500/10 border-amber-500/30",verifying:"text-sky-300 bg-sky-500/10 border-sky-500/30",success:"text-emerald-300 bg-emerald-500/10 border-emerald-500/30",error:"text-rose-300 bg-rose-500/10 border-rose-500/30"},Ix=({status:i,settings:d,onSetActiveModel:c,onPullModel:b,onSaveSettings:g,onModelsChanged:h})=>{var ue;const[C,j]=f.useState(""),[$,H]=f.useState(!1),[M,R]=f.useState([]),[L,ge]=f.useState(""),[Q,se]=f.useState(null),[Z,I]=f.useState(!1),[ne,ae]=f.useState(null),[Y,oe]=f.useState(!1),X=(d==null?void 0:d.stream)??!0,Ee=(d==null?void 0:d.modelThinkingLevels)||{},B=(ue=i==null?void 0:i.installedModels)==null?void 0:ue.find(w=>w.name===(i==null?void 0:i.activeModel)),Ce=async()=>{if(!(!g||Y)){oe(!0);try{await g({stream:!X})}finally{oe(!1)}}},Te=async(w,E)=>{if(!(!g||Y)){oe(!0);try{const P={...Ee};E==="auto"?delete P[w]:P[w]=E,await g({modelThinkingLevels:P})}finally{oe(!1)}}},Me=M.filter(w=>w.status==="pulling"||w.status==="verifying").length;f.useEffect(()=>{let w=!1;const E=async()=>{try{const z=await O.getPullProgressAll();!w&&(z!=null&&z.pulls)&&R(z.pulls)}catch{}};E();const P=setInterval(E,Me>0?800:5e3);return()=>{w=!0,clearInterval(P)}},[Me]);const $e=async()=>{if(Q){I(!0),ae(null);try{await O.deleteModel(Q),se(null),h==null||h()}catch(w){ae(w.message||"Deletion failed.")}finally{I(!1)}}},ke=async w=>{w.preventDefault();const E=C.trim();if(E){H(!0);try{b(E),R(P=>[{model:E,status:"pulling",message:"Contacting Ollama registry…",percentage:0,startedAt:new Date().toISOString(),updatedAt:new Date().toISOString()},...P.filter(z=>z.model!==E)])}finally{H(!1),j("")}}},G=f.useMemo(()=>{const w=L.trim().toLowerCase();return w?((i==null?void 0:i.installedModels)||[]).filter(E=>E.name.toLowerCase().includes(w)||(E.family||"").toLowerCase().includes(w)||(E.parameter_size||"").toLowerCase().includes(w)):(i==null?void 0:i.installedModels)||[]},[i==null?void 0:i.installedModels,L]),ee=[{name:"qwen2.5-coder:latest",role:"Coding Specialist (Recommended)"},{name:"qwen2.5-coder:7b",role:"Fast Coding Specialist"},{name:"llama3.2:latest",role:"Supervisor & Architectural Planner"},{name:"deepseek-r1:latest",role:"Reasoning & Planning Specialist"},{name:"mistral:latest",role:"General Purpose & Copywriting"}];return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Ws,{className:"w-5 h-5 text-indigo-400"})," Model Manager (Ollama Infrastructure)"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Local model discovery, weights management, and centralized inference concurrency control."})]}),s.jsxs("div",{className:`p-5 rounded-2xl border flex items-center justify-between ${i!=null&&i.online?"bg-emerald-950/20 border-emerald-500/30 text-emerald-300":"bg-rose-950/20 border-rose-500/30 text-rose-300"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[i!=null&&i.online?s.jsx(nu,{className:"w-6 h-6 text-emerald-400"}):s.jsx(su,{className:"w-6 h-6 text-rose-400"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-bold text-sm text-white",children:i!=null&&i.online?`Connected to local Ollama daemon (v${i.version||"0.4"})`:"Ollama Daemon Not Reachable"}),s.jsxs("div",{className:"text-xs opacity-80 mt-0.5 font-mono",children:["Endpoint: ",(i==null?void 0:i.endpoint)||"http://localhost:11434"]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs text-slate-400 uppercase font-semibold",children:"Active Concurrency Limit"}),s.jsx("div",{className:"text-sm font-bold text-white font-mono",children:"1 request (Anti-VRAM Thrashing)"})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(Jm,{className:"w-4 h-4 text-indigo-400"})," Inference Settings"]}),Y&&s.jsxs("span",{className:"text-[11px] text-slate-400 flex items-center gap-1.5",children:[s.jsx(gr,{className:"w-3 h-3 animate-spin"})," Saving…"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl bg-slate-950/70 border border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-semibold text-white",children:"Stream Responses"}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:"Receive tokens incrementally from Ollama instead of waiting for the full completion."})]}),s.jsx("button",{type:"button",role:"switch","aria-checked":X,disabled:!g||Y,onClick:Ce,className:`relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none disabled:opacity-50 ${X?"bg-indigo-600":"bg-slate-700"}`,children:s.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow transition duration-200 ease-in-out ${X?"translate-x-5":"translate-x-0"}`})})]}),s.jsxs("div",{className:"p-4 rounded-xl bg-slate-950/70 border border-slate-800 flex flex-col justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"text-xs font-semibold text-white flex items-center gap-1.5",children:[s.jsx(wn,{className:"w-3.5 h-3.5 text-indigo-400"}),s.jsx("span",{children:"Thinking Level"}),(i==null?void 0:i.activeModel)&&s.jsxs("span",{className:"text-[10px] font-mono text-slate-400",children:["(",i.activeModel,")"]})]}),(B==null?void 0:B.supportsThinking)&&s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-indigo-500/15 border border-indigo-500/30 text-indigo-300 font-semibold",children:"Supported"})]}),B!=null&&B.supportsThinking?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"inline-flex rounded-lg bg-slate-900 border border-slate-800 p-0.5 gap-0.5",children:Vd.map(w=>{const P=(Ee[B.name]||"auto")===w.value;return s.jsx("button",{type:"button",disabled:!g||Y,onClick:()=>Te(B.name,w.value),className:`px-2.5 py-1 rounded-md text-[11px] font-semibold transition-colors ${P?"bg-indigo-600 text-white":"text-slate-400 hover:text-slate-200 hover:bg-slate-800/70"}`,children:w.label},w.value)})}),s.jsx("div",{className:"text-[10px] text-slate-500",children:B.thinkingMode==="levels"?"Controls reasoning effort (low / medium / high) or disables thinking.":"Auto uses model default; Off disables thinking; Low / Medium / High enable reasoning."})]}):s.jsx("div",{className:"text-[11px] text-slate-500",children:i!=null&&i.activeModel?`${i.activeModel} does not expose thinking capability.`:"Select a thinking-capable model to configure thinking level."})]})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(Fi,{className:"w-4 h-4 text-indigo-400"})," Pull Model from Ollama Registry"]}),s.jsxs("form",{onSubmit:ke,className:"flex gap-3",children:[s.jsx("input",{type:"text",placeholder:"e.g. qwen2.5-coder:latest, deepseek-r1:7b...",value:C,onChange:w=>j(w.target.value),className:"flex-1 bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"}),s.jsxs("button",{type:"submit",disabled:$||!C.trim(),className:"px-5 py-2.5 rounded-xl bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white font-semibold text-xs flex items-center gap-2 shadow-lg shadow-indigo-600/20",children:[s.jsx(Fi,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:$?"Starting…":"Pull Model"})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[s.jsx("span",{className:"text-slate-500 text-[11px]",children:"Recommended:"}),ee.map(w=>s.jsxs("button",{type:"button",title:w.role,onClick:()=>b(w.name),className:"text-[11px] px-2 py-0.5 rounded bg-slate-800 hover:bg-slate-700 text-indigo-300 font-mono",children:["+ ",w.name]},w.name))]}),M.length>0&&s.jsx("div",{className:"space-y-2 pt-1",children:M.slice(0,6).map(w=>{const E=$x[w.status],P=w.status==="pulling"||w.status==="verifying";return s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950/80 border border-slate-800 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[P&&s.jsx(gr,{className:"w-3.5 h-3.5 animate-spin text-amber-400 shrink-0"}),w.status==="success"&&s.jsx(ht,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}),w.status==="error"&&s.jsx(jr,{className:"w-3.5 h-3.5 text-rose-400 shrink-0"}),s.jsx("span",{className:"text-xs font-mono font-semibold text-slate-200 truncate",children:w.model}),s.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full border font-semibold uppercase shrink-0 ${E}`,children:w.status==="pulling"?"Downloading":w.status==="verifying"?"Verifying digest":w.status})]}),s.jsxs("span",{className:`text-[11px] font-mono shrink-0 ${P?"text-amber-300":w.status==="success"?"text-emerald-300":"text-rose-300"}`,children:[w.percentage,"%"]})]}),P&&s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-300 ${w.status==="verifying"?"bg-sky-500":"bg-amber-500"}`,style:{width:`${Math.max(2,w.percentage)}%`}})}),s.jsxs("div",{className:"text-[10px] font-mono text-slate-500 flex items-center justify-between gap-3",children:[s.jsx("span",{className:"truncate",title:w.message,children:w.message}),s.jsxs("span",{className:"flex items-center gap-2 shrink-0",children:[w.speed&&P&&s.jsx("span",{className:"text-sky-300",title:w.averageBytesPerSecond?`Average: ${Vs(w.averageBytesPerSecond)}/s`:void 0,children:w.speed}),w.completed!=null&&w.total!=null&&w.total>0&&s.jsxs("span",{children:[Vs(w.completed)," / ",Vs(w.total)]})]})]}),w.status==="error"&&w.error&&s.jsx("div",{className:"text-[10px] text-rose-400 font-mono break-all",children:w.error}),w.status==="success"&&s.jsxs("div",{className:"text-[10px] text-emerald-400/80",children:["Completed ",new Date(w.updatedAt).toLocaleTimeString(),w.speed?` — averaged ${Vs(w.averageBytesPerSecond)}/s`:""," — now selectable in the installed list below."]})]},w.model)})})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2 shrink-0",children:[s.jsx(hm,{className:"w-4 h-4 text-indigo-400"})," Installed Local Models",L.trim()&&s.jsxs("span",{className:"text-slate-500 font-normal",children:["— ",G.length," match(es)"]})]}),s.jsxs("div",{className:"relative w-64",children:[s.jsx(Fl,{className:"w-3.5 h-3.5 text-slate-500 absolute left-2.5 top-2.5"}),s.jsx("input",{value:L,onChange:w=>ge(w.target.value),placeholder:"Search models…",className:"w-full bg-slate-950 border border-slate-800 rounded-lg pl-8 pr-3 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"})]})]}),!(i!=null&&i.installedModels)||i.installedModels.length===0?s.jsx("div",{className:"py-8 text-center text-xs text-slate-500",children:i!=null&&i.online?"No models installed yet. Enter a model name above to download.":"Ollama is offline. Start `ollama serve` in your terminal to view installed models."}):G.length===0?s.jsxs("div",{className:"py-8 text-center text-xs text-slate-500",children:['No models match "',L,'".']}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:G.map(w=>{const E=i.activeModel===w.name,P=M.some(p=>p.model===w.name&&(p.status==="pulling"||p.status==="verifying")),z=Ee[w.name]||"auto";return s.jsxs("div",{className:`p-4 rounded-xl border flex flex-col gap-3 transition-all ${E?"bg-indigo-600/15 border-indigo-500/50":"bg-slate-950/70 border-slate-800 hover:border-slate-700"}`,children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:"text-sm font-bold text-white font-mono truncate",children:w.name}),w.supportsThinking&&s.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-indigo-500/15 border border-indigo-500/30 text-indigo-300 font-semibold flex items-center gap-1 shrink-0",children:[s.jsx(wn,{className:"w-2.5 h-2.5"})," Thinking"]})]}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[w.family||"Model"," · ",w.parameter_size||"N/A"," · ",Vs(w.size),w.quantization_level&&` · ${w.quantization_level}`]})]}),s.jsxs("div",{className:"shrink-0 flex items-center gap-1.5",children:[P?s.jsxs("span",{className:"text-xs text-amber-300 font-semibold px-2.5 py-1 rounded bg-amber-500/10 border border-amber-500/30 flex items-center gap-1",children:[s.jsx(gr,{className:"w-3.5 h-3.5 animate-spin"})," Pulling"]}):s.jsxs(s.Fragment,{children:[!E&&s.jsx("button",{onClick:()=>c(w.name),className:"text-xs px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-indigo-600 text-white font-semibold transition-colors",children:"Set Default"}),s.jsx("button",{onClick:()=>{se(w.name),ae(null)},title:`Remove ${w.name} (${Vs(w.size)}) from disk`,className:"p-1.5 rounded-lg bg-slate-800 hover:bg-rose-600 text-slate-400 hover:text-white transition-colors",children:s.jsx(Ns,{className:"w-3.5 h-3.5"})})]}),E&&s.jsxs("span",{className:"text-xs text-emerald-400 font-semibold px-2.5 py-1 rounded bg-emerald-500/10 border border-emerald-500/30 flex items-center gap-1",children:[s.jsx(ht,{className:"w-3.5 h-3.5"})," Active"]})]})]}),w.supportsThinking&&s.jsxs("div",{className:"flex items-center justify-between gap-2 pt-2 border-t border-slate-800/80",children:[s.jsxs("span",{className:"text-[11px] text-slate-400 flex items-center gap-1",children:[s.jsx(wn,{className:"w-3 h-3 text-indigo-400"})," Thinking level"]}),s.jsx("div",{className:"inline-flex rounded-lg bg-slate-900 border border-slate-800 p-0.5 gap-0.5",children:Vd.map(p=>{const T=z===p.value;return s.jsx("button",{type:"button",disabled:!g||Y,onClick:()=>Te(w.name,p.value),className:`px-2 py-0.5 rounded-md text-[10px] font-semibold transition-colors ${T?"bg-indigo-600 text-white":"text-slate-400 hover:text-slate-200 hover:bg-slate-800/70"}`,children:p.label},p.value)})})]})]},w.name)})})]}),Q&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-6",onClick:()=>!Z&&se(null),children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-rose-500/40 bg-[#0d1220] p-5 space-y-4",onClick:w=>w.stopPropagation(),children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-rose-500/15 border border-rose-500/30 flex items-center justify-center shrink-0",children:s.jsx(eu,{className:"w-5 h-5 text-rose-400"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-base font-bold text-white",children:"Remove model"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"This permanently deletes the model weights from your local Ollama store. You would need to pull it again to use it."})]})]}),s.jsxs("div",{className:"rounded-xl bg-slate-950/80 border border-slate-800 p-3",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:"Model"}),s.jsx("div",{className:"text-sm font-mono font-semibold text-slate-200 mt-0.5",children:Q}),(()=>{var E;const w=(E=i==null?void 0:i.installedModels)==null?void 0:E.find(P=>P.name===Q);return w?s.jsxs("div",{className:"text-[11px] text-slate-500 mt-1",children:[w.family||"Model"," · ",w.parameter_size||"N/A"," · ",Vs(w.size)," will be freed"]}):null})()]}),(i==null?void 0:i.activeModel)===Q&&s.jsx("div",{className:"text-[11px] text-amber-300 bg-amber-500/10 border border-amber-500/30 rounded-lg px-3 py-2",children:"This is the currently active model. The default selection will reset to another installed model after removal."}),ne&&s.jsx("div",{className:"text-[11px] text-rose-400 bg-rose-950/30 border border-rose-500/30 rounded-lg px-3 py-2 break-all",children:ne}),s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[s.jsx("button",{onClick:()=>se(null),disabled:Z,className:"px-4 py-2 rounded-lg bg-slate-800 hover:bg-slate-700 disabled:opacity-50 text-slate-200 text-xs font-semibold",children:"Cancel"}),s.jsxs("button",{onClick:$e,disabled:Z,className:"px-4 py-2 rounded-lg bg-rose-600 hover:bg-rose-500 disabled:opacity-50 text-white text-xs font-semibold flex items-center gap-1.5",children:[Z?s.jsx(gr,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(Ns,{className:"w-3.5 h-3.5"}),Z?"Removing…":"Remove model"]})]})]})})]})};function Ax(i){const d=[];let c=0,b=0;for(const g of i.split(`
|
|
490
|
+
`)){if(g.startsWith("diff --git")||g.startsWith("index ")||g.startsWith("new file mode")||g.startsWith("deleted file mode"))continue;const h=g.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(h){c=parseInt(h[1],10),b=parseInt(h[2],10),d.push({type:"hunk",text:g});continue}if(!(g.startsWith("+++")||g.startsWith("---"))){if(g.startsWith("+")){d.push({type:"add",text:g.slice(1),newNo:b++});continue}if(g.startsWith("-")){d.push({type:"del",text:g.slice(1),oldNo:c++});continue}g.startsWith("\\")||d.push({type:"ctx",text:g.replace(/^ /,""),oldNo:c++,newNo:b++})}}return d}const Lx=({open:i,onClose:d})=>{const[c,b]=f.useState(null),[g,h]=f.useState(!1),[C,j]=f.useState(null),[$,H]=f.useState(new Set);f.useEffect(()=>{i&&(h(!0),O.getGitDiff().then(R=>{var L;b(R),j(((L=R.files[0])==null?void 0:L.path)||null)}).catch(()=>b({available:!1,reason:"Failed to load diff",files:[]})).finally(()=>h(!1)))},[i]),f.useEffect(()=>{const R=L=>{L.key==="Escape"&&d()};return i&&window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[i,d]);const M=f.useMemo(()=>c==null?void 0:c.files.find(R=>R.path===C),[c,C]);return i?s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-8",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:d}),s.jsxs("div",{className:"relative w-full max-w-5xl max-h-[85vh] flex flex-col rounded-2xl bg-[#0e1420] border border-slate-700/60 shadow-2xl shadow-black/60 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-slate-800 bg-slate-900/60 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-500/15 border border-indigo-500/30 flex items-center justify-center",children:s.jsx(Ud,{className:"w-4 h-4 text-indigo-400"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-white",children:"Code Changes"}),c!=null&&c.files.length?s.jsxs("p",{className:"text-[11px] text-slate-400",children:[c.files.length," file",c.files.length===1?"":"s"," changed"]}):null]})]}),s.jsx("button",{onClick:d,className:"p-2 rounded-lg hover:bg-slate-800 text-slate-400 hover:text-white transition-colors",title:"Close (Esc)",children:s.jsx(ks,{className:"w-4 h-4"})})]}),g?s.jsxs("div",{className:"flex-1 flex items-center justify-center text-slate-400 text-sm gap-2",children:[s.jsx(gr,{className:"w-5 h-5 animate-spin"})," Comparing changes…"]}):c!=null&&c.available?c.files.length===0?s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-slate-500 gap-2 p-8",children:[s.jsx(Hs,{className:"w-8 h-8 text-emerald-400/70"}),s.jsx("p",{className:"text-sm",children:"No code changes since the last commit — the working tree is clean."})]}):s.jsxs("div",{className:"flex-1 flex min-h-0",children:[s.jsx("div",{className:"w-64 shrink-0 border-r border-slate-800 bg-slate-950/50 overflow-y-auto p-2",children:c.files.map(R=>{const L=Ud;return s.jsxs("button",{onClick:()=>j(R.path),className:`w-full text-left px-2.5 py-2 rounded-lg mb-0.5 flex items-start gap-2 transition-colors ${R.path===C?"bg-indigo-600/20 border border-indigo-500/40":"hover:bg-slate-800/70 border border-transparent"}`,children:[s.jsx(L,{className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-amber-400"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"text-[11px] font-medium text-slate-200 truncate",title:R.path,children:R.path.split("/").pop()}),s.jsx("div",{className:"text-[10px] text-slate-500 truncate",children:R.path})]})]},R.path)})}),s.jsx("div",{className:"flex-1 overflow-auto bg-[#0a0e16]",children:M?s.jsxs("div",{children:[s.jsxs("div",{className:"sticky top-0 z-10 px-4 py-2 bg-slate-900/90 backdrop-blur border-b border-slate-800 flex items-center gap-2 text-[11px] font-mono text-slate-300",children:[s.jsx(qi,{className:"w-3.5 h-3.5 text-slate-500 shrink-0"}),s.jsx("span",{className:"truncate",children:M.path})]}),s.jsx("div",{className:"font-mono text-[11.5px] leading-5 py-2",children:Ax(M.patch).map((R,L)=>s.jsxs("div",{className:`flex ${R.type==="add"?"bg-emerald-500/10":R.type==="del"?"bg-rose-500/10":R.type==="hunk"?"bg-slate-800/60 text-indigo-300":""}`,children:[s.jsx("span",{className:"w-12 shrink-0 text-right pr-2 text-slate-600 select-none",children:R.oldNo??""}),s.jsx("span",{className:"w-12 shrink-0 text-right pr-2 text-slate-600 select-none border-r border-slate-800/60 mr-2",children:R.newNo??""}),s.jsx("span",{className:`shrink-0 w-4 select-none ${R.type==="add"?"text-emerald-400":R.type==="del"?"text-rose-400":"text-slate-600"}`,children:R.type==="add"?"+":R.type==="del"?"−":" "}),s.jsx("pre",{className:"whitespace-pre-wrap break-all pr-4 text-slate-300",children:R.text||" "})]},L))})]}):s.jsx("div",{className:"h-full flex items-center justify-center text-slate-500 text-xs",children:"Select a file to view its changes."})})]}):s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-slate-500 gap-2 p-8",children:[s.jsx(qd,{className:"w-8 h-8 text-amber-400/70"}),s.jsx("p",{className:"text-sm",children:(c==null?void 0:c.reason)||"Diff unavailable."})]})]})]}):null},Rx=({project:i,tasks:d,onTriggerIntegration:c})=>{var Oe,ze;const[b,g]=f.useState(!1),[h,C]=f.useState(null),[j,$]=f.useState(null),[H,M]=f.useState(null),[R,L]=f.useState(!1),[ge,Q]=f.useState(""),[se,Z]=f.useState(!0),[I,ne]=f.useState(!1),[ae,Y]=f.useState(!1),[oe,X]=f.useState(null),[Ee,B]=f.useState("ok"),[Ce,Te]=f.useState(!1),[Me,$e]=f.useState(null),[ke,G]=f.useState(null),[ee,ue]=f.useState(null),[w,E]=f.useState(!1),P=async()=>{if(i){L(!0);try{const[le,A]=await Promise.all([O.getGitStatus(),O.getGitLog()]);$(le),M(A)}catch{}finally{L(!1)}}};f.useEffect(()=>{P()},[i==null?void 0:i.id]);const z=async()=>{if(i){g(!0);try{const le=await c(i.id);C(le)}catch(le){B("err"),X(`Integration failed: ${le.message}`)}finally{g(!1)}}},p=async()=>{if(ge.trim()){ne(!0),X(null);try{await O.createGitCommit(ge.trim(),se),Q(""),B("ok"),X("Commit created."),await P()}catch(le){B("err"),X(le.message)}finally{ne(!1)}}},T=async(le,A)=>{X(null);try{await O.stageGitFiles(le,A),await P()}catch(S){B("err"),X(S.message)}},fe=async()=>{Y(!0),X(null);try{await O.pushGit(),B("ok"),X("Pushed to remote.")}catch(le){B("err"),X(le.message)}finally{Y(!1)}},he=async()=>{Te(!0),$e(null);try{const le=await O.runProjectTests();$e(le)}catch(le){$e({success:!1,stderr:le.message})}finally{Te(!1)}},de=async()=>{var le;E(!0);try{const A=await O.getGitDiff();G(A),ue(((le=A.files[0])==null?void 0:le.path)||null)}catch{G({available:!1,reason:"Failed to load diff",files:[]})}},pe=d.filter(le=>le.status==="completed"),be=d.filter(le=>le.status==="running"),ve=[...(j==null?void 0:j.staged)||[],...(j==null?void 0:j.modified)||[],...(j==null?void 0:j.untracked)||[]],Ne=({path:le,staged:A})=>s.jsxs("div",{className:"text-[11px] font-mono text-slate-300 truncate flex items-center gap-1.5 group",children:[s.jsx(Ui,{className:"w-3 h-3 text-slate-500 shrink-0"}),s.jsx("span",{className:"truncate flex-1",title:le,children:le}),s.jsx("button",{onClick:()=>T([le],A?"unstage":"stage"),title:A?"Unstage file":"Stage file",className:"opacity-0 group-hover:opacity-100 shrink-0 p-0.5 rounded text-slate-400 hover:text-white hover:bg-slate-800",children:A?s.jsx(Em,{className:"w-3 h-3"}):s.jsx(Dl,{className:"w-3 h-3"})})]});return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Ki,{className:"w-5 h-5 text-indigo-400"})," Git Workspace & Branch Isolation"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Repository status, change inspection, staging, commit creation, push, and Integration Agent."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:de,disabled:!(j!=null&&j.available),className:"p-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 hover:text-white disabled:opacity-40",title:"View file changes",children:s.jsx(qp,{className:"w-4 h-4"})}),s.jsx("button",{onClick:P,disabled:R,className:"p-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 hover:text-white disabled:opacity-50",children:s.jsx(Xd,{className:`w-4 h-4 ${R?"animate-spin":""}`})})]})]}),oe&&s.jsx("div",{className:`text-xs px-3 py-2 rounded-lg border ${Ee==="ok"?"text-emerald-300 border-emerald-500/30 bg-emerald-950/20":"text-rose-300 border-rose-500/30 bg-rose-950/20"}`,children:oe}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(yr,{className:"w-4 h-4 text-indigo-400"})," Repository Status ",j!=null&&j.available?`— ${j.branch}`:""]}),s.jsxs("div",{className:"flex items-center gap-2",children:[ve.length>0&&s.jsx("button",{onClick:()=>T([],"stage"),className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 text-[11px] font-semibold",children:"Stage all"}),(((Oe=j==null?void 0:j.staged)==null?void 0:Oe.length)||0)>0&&s.jsx("button",{onClick:()=>T([],"unstage"),className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 text-[11px] font-semibold",children:"Unstage all"})]})]}),j!=null&&j.available?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[{title:"Modified (unstaged)",items:j.modified||[],tone:"amber"},{title:"Staged",items:j.staged||[],tone:"emerald"},{title:"Untracked",items:j.untracked||[],tone:"slate"}].map(le=>s.jsxs("div",{className:`rounded-xl border p-3 ${le.tone==="amber"?"bg-amber-950/20 border-amber-500/30":le.tone==="emerald"?"bg-emerald-950/20 border-emerald-500/30":"bg-slate-950/70 border-slate-800"}`,children:[s.jsxs("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-slate-400 mb-2",children:[le.title," (",le.items.length,")"]}),s.jsx("div",{className:"space-y-1 max-h-40 overflow-y-auto",children:le.items.length===0?s.jsx("div",{className:"text-[11px] text-slate-600 italic",children:"None"}):le.items.map(A=>s.jsx(Ne,{path:A.path,staged:le.tone==="emerald"},A.path))})]},le.title))}):s.jsx("div",{className:"text-xs text-slate-500 py-2",children:(j==null?void 0:j.reason)||"Loading repository status…"})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-3",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(wr,{className:"w-4 h-4 text-indigo-400"})," Commit & Push"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{value:ge,onChange:le=>Q(le.target.value),onKeyDown:le=>{le.key==="Enter"&&p()},placeholder:"Commit message…",className:"flex-1 bg-slate-950 border border-slate-800 rounded-lg px-3 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"}),s.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-slate-400 whitespace-nowrap",children:[s.jsx("input",{type:"checkbox",checked:se,onChange:le=>Z(le.target.checked),className:"accent-indigo-500"}),"Stage all changes"]}),s.jsxs("button",{onClick:p,disabled:I||!ge.trim(),className:"px-4 py-2 rounded-lg bg-emerald-600 hover:bg-emerald-500 disabled:opacity-40 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(wr,{className:"w-3.5 h-3.5"})," ",I?"Committing…":"Commit"]}),s.jsxs("button",{onClick:fe,disabled:ae,className:"px-4 py-2 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-40 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(cx,{className:"w-3.5 h-3.5"})," ",ae?"Pushing…":"Push"]})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(nm,{className:"w-4 h-4 text-indigo-400"})," Run Project Tests"]}),s.jsxs("button",{onClick:he,disabled:Ce,className:"px-4 py-2 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-40 text-white text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(jn,{className:"w-3.5 h-3.5"})," ",Ce?"Running…":"Run tests"]})]}),Me&&s.jsx("div",{className:`rounded-xl border p-3 text-[11px] font-mono whitespace-pre-wrap max-h-64 overflow-y-auto ${Me.success?"bg-emerald-950/20 border-emerald-500/30 text-emerald-200":"bg-rose-950/20 border-rose-500/30 text-rose-200"}`,children:`$ ${Me.command}
|
|
491
|
+
exit: ${Me.exitCode} · ${Me.durationMs}ms
|
|
492
|
+
|
|
493
|
+
${Me.stdout||""}${Me.stderr||""}`})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-indigo-950/30 border border-indigo-500/30 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-base font-bold text-white flex items-center gap-2",children:[s.jsx(Vi,{className:"w-5 h-5 text-indigo-400"})," Integration Agent (Layer 5)"]}),s.jsx("p",{className:"text-xs text-slate-300 mt-1 max-w-xl",children:"Integrates completed development branches into protected branch `main`. Runs automated conflict detection, builds changelogs, and submits merge requests for human authorization."}),s.jsxs("div",{className:"mt-2 text-xs font-mono text-indigo-300",children:[pe.length," completed task contributions ready for integration.",be.length>0&&s.jsxs("span",{className:"text-amber-300",children:[" · ",be.length," running"]})]})]}),s.jsxs("button",{onClick:z,disabled:b||pe.length===0,className:"px-5 py-2.5 rounded-xl bg-indigo-600 hover:bg-indigo-500 disabled:opacity-40 text-white font-semibold text-xs flex items-center gap-2 shadow-lg shadow-indigo-600/20 shrink-0",children:[s.jsx(Vi,{className:"w-4 h-4"}),s.jsx("span",{children:b?"Integrating Contributions...":"Run Integration Agent"})]})]}),h&&s.jsxs("div",{className:"p-5 rounded-2xl bg-slate-900/80 border border-emerald-500/30 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-emerald-400 font-bold text-sm",children:[s.jsx(ht,{className:"w-4 h-4"})," Integration Successfully Executed"]}),s.jsx("div",{className:"text-xs font-mono text-slate-300 whitespace-pre-wrap bg-slate-950 p-4 rounded-xl border border-slate-800",children:(ze=h.result)==null?void 0:ze.changelogSummary}),h.approvalRequest&&s.jsxs("div",{className:"text-xs text-amber-300 font-semibold p-2 rounded bg-amber-500/10 border border-amber-500/20",children:["A protected-branch merge approval request (",h.approvalRequest.id,") has been created in the Approvals queue."]})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(Yi,{className:"w-4 h-4 text-indigo-400"})," Commit History"]}),H!=null&&H.available?s.jsx("div",{className:"space-y-2 max-h-72 overflow-y-auto",children:H.commits.map(le=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950/70 border border-slate-800 flex items-center gap-3",children:[s.jsx("span",{className:"text-[10px] font-mono text-amber-300 shrink-0",children:le.short}),s.jsx("span",{className:"text-xs text-slate-200 truncate flex-1",children:le.message}),s.jsx("span",{className:"text-[10px] text-slate-500 shrink-0",children:le.author}),s.jsx("span",{className:"text-[10px] text-slate-600 shrink-0",children:new Date(le.date).toLocaleString()})]},le.hash))}):s.jsx("div",{className:"text-xs text-slate-500 py-2",children:(H==null?void 0:H.reason)||"Loading commit history…"})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-white flex items-center gap-2",children:[s.jsx(yr,{className:"w-4 h-4 text-indigo-400"})," Active Execution Contexts"]}),d.length===0?s.jsx("div",{className:"py-8 text-center text-xs text-slate-500",children:"No active execution contexts."}):s.jsx("div",{className:"space-y-2",children:d.map(le=>s.jsxs("div",{className:"p-3.5 rounded-xl bg-slate-950/70 border border-slate-800 flex items-center justify-between text-xs",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-semibold text-slate-200",children:le.title}),s.jsxs("div",{className:"font-mono text-[11px] text-slate-400 flex items-center gap-3",children:[s.jsxs("span",{children:["Branch: ",s.jsx("strong",{className:"text-indigo-400",children:le.gitBranch||`VibeCodePilot/task-${le.id}`})]}),s.jsxs("span",{children:["Path: ",s.jsx("strong",{className:"text-slate-300",children:le.worktreePath||"in-place (project root)"})]})]})]}),s.jsx("span",{className:`text-[10px] px-2.5 py-0.5 rounded-full font-semibold uppercase ${le.status==="completed"?"bg-emerald-500/20 text-emerald-400":le.status==="running"?"bg-amber-500/20 text-amber-400 animate-pulse":"bg-slate-800 text-slate-400"}`,children:le.status})]},le.id))})]}),s.jsx(Lx,{open:w,onClose:()=>E(!1)})]})},zx=({approvals:i,onResolveApproval:d})=>{const c=i.filter(g=>g.status==="pending"),b=i.filter(g=>g.status!=="pending");return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Nn,{className:"w-5 h-5 text-indigo-400"})," Human Approval Gates"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Strict authorization boundary: Protected-branch merges, external publishing, and sensitive actions require explicit human sign-off."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-slate-300 uppercase tracking-wider",children:["Pending Authorizations (",c.length,")"]}),c.length===0?s.jsx("div",{className:"p-8 rounded-2xl bg-slate-900/40 border border-slate-800 text-center text-xs text-slate-500",children:"All operations cleared. No actions currently blocked by human gates."}):s.jsx("div",{className:"space-y-3",children:c.map(g=>s.jsxs("div",{className:"p-5 rounded-2xl bg-slate-900/80 border border-amber-500/40 space-y-3 shadow-lg shadow-amber-500/5",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded bg-amber-500/20 text-amber-300 border border-amber-500/30",children:g.actionType}),s.jsx("h3",{className:"text-base font-bold text-white mt-1.5",children:g.title}),s.jsx("p",{className:"text-xs text-slate-300 mt-1",children:g.description})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>d(g.id,"approved","Authorized by operator via Dashboard"),className:"px-4 py-2 rounded-xl bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs flex items-center gap-1.5 shadow-md shadow-emerald-600/20",children:[s.jsx(Hs,{className:"w-4 h-4"})," Approve Action"]}),s.jsxs("button",{onClick:()=>d(g.id,"rejected","Rejected by operator"),className:"px-4 py-2 rounded-xl bg-slate-800 hover:bg-rose-900/50 text-slate-300 hover:text-rose-300 font-semibold text-xs flex items-center gap-1.5",children:[s.jsx(ks,{className:"w-4 h-4"})," Reject"]})]})]}),s.jsx("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 text-[11px] font-mono text-slate-400",children:JSON.stringify(g.payload,null,2)}),s.jsxs("div",{className:"flex items-center justify-between text-[10px] text-slate-500 pt-1",children:[s.jsxs("span",{children:["Requested by: ",s.jsx("strong",{className:"text-indigo-400 font-mono",children:g.requestedBy})]}),s.jsx("span",{children:new Date(g.createdAt).toLocaleString()})]})]},g.id))})]}),b.length>0&&s.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[s.jsxs("h2",{className:"text-sm font-bold text-slate-400 uppercase tracking-wider",children:["Resolved Audit History (",b.length,")"]}),s.jsx("div",{className:"space-y-2",children:b.map(g=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-900/40 border border-slate-800/60 flex items-center justify-between text-xs text-slate-400",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-slate-300",children:g.title}),s.jsxs("span",{className:"text-[10px] text-slate-500 ml-2",children:["(",g.comments||"No comments",")"]})]}),s.jsx("span",{className:`text-[10px] font-bold uppercase px-2 py-0.5 rounded ${g.status==="approved"?"bg-emerald-500/20 text-emerald-400":"bg-rose-500/20 text-rose-400"}`,children:g.status})]},g.id))})]})]})},Hd={low:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",medium:"bg-amber-500/15 text-amber-300 border-amber-500/30",high:"bg-orange-500/15 text-orange-300 border-orange-500/30",critical:"bg-rose-500/15 text-rose-300 border-rose-500/30"},Ox={"file.create":vr,"file.modify":vr,"file.delete":Xp,"directory.create":cm,"directory.delete":am,"shell.execute":Xi,"package.install":$m,"database.migrate":Bp,"config.modify":Wm,"git.operate":Ki},Dx=({requests:i,audit:d,onResolve:c,onRefresh:b})=>{const g=i.filter(C=>C.status==="pending"),h=i.filter(C=>C.status!=="pending");return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Ul,{className:"w-5 h-5 text-amber-400"})," Execution Permissions"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Operations outside the Planner-approved task scope pause execution until you decide. Hard security restrictions can never be approved."})]}),s.jsx("button",{onClick:b,className:"px-3 py-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-xs text-slate-300 border border-slate-700",children:"Refresh"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-slate-300 uppercase tracking-wider",children:["Pending Approval (",g.length,")"]}),g.length===0?s.jsx("div",{className:"p-8 rounded-2xl bg-slate-900/40 border border-slate-800 text-center text-xs text-slate-500",children:"No paused executions. Agents are running inside their approved scope."}):s.jsx("div",{className:"space-y-4",children:g.map(C=>{const j=Ox[C.operation]||Kd,$=!C.approvalCapable;return s.jsxs("div",{className:"p-5 rounded-2xl bg-slate-900/80 border border-amber-500/40 space-y-3 shadow-lg shadow-amber-500/5 animate-pulse-soft",children:[s.jsx("div",{className:"flex items-start justify-between gap-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-9 h-9 rounded-xl bg-amber-500/15 border border-amber-500/30 flex items-center justify-center shrink-0",children:s.jsx(j,{className:"w-4 h-4 text-amber-300"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded bg-amber-500/20 text-amber-300 border border-amber-500/30",children:C.operation}),s.jsxs("span",{className:`text-[10px] font-bold uppercase px-2 py-0.5 rounded border ${Hd[C.riskLevel]||Hd.medium}`,children:["risk: ",C.riskLevel]}),s.jsx("span",{className:"text-[10px] font-mono text-slate-500 px-2 py-0.5 rounded bg-slate-800 border border-slate-700",children:"WAITING_FOR_PERMISSION"}),!C.approvalCapable&&s.jsx("span",{className:"text-[10px] font-bold uppercase px-2 py-0.5 rounded bg-rose-500/20 text-rose-300 border border-rose-500/30",children:"hard restriction"})]}),s.jsx("h3",{className:"text-base font-bold text-white mt-1.5",children:C.title}),s.jsx("p",{className:"text-xs text-slate-300 mt-1",children:C.reason})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800",children:[s.jsx("div",{className:"text-[10px] uppercase font-bold text-slate-500 tracking-wider mb-1",children:"Target"}),s.jsx("div",{className:"text-[11px] font-mono text-slate-300 break-all",children:C.targetPath||C.detail||C.requestedScope}),C.detail&&C.targetPath&&s.jsx("div",{className:"text-[10px] font-mono text-slate-500 mt-1 break-all",children:C.detail})]}),s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800",children:[s.jsx("div",{className:"text-[10px] uppercase font-bold text-slate-500 tracking-wider mb-1",children:"Planned vs requested scope"}),s.jsxs("div",{className:"text-[11px] font-mono text-emerald-400/80 break-all",children:["Planned: ",C.plannedScope.join(", ")||"(entire workspace)"]}),s.jsxs("div",{className:"text-[11px] font-mono text-amber-400/80 break-all mt-0.5",children:["Requested: ",C.requestedScope]})]})]}),s.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-slate-500 font-mono",children:[s.jsxs("span",{children:["Task: ",s.jsx("span",{className:"text-indigo-400",children:C.taskId})]}),s.jsxs("span",{children:["Agent: ",s.jsx("span",{className:"text-indigo-400",children:C.agentId})]}),s.jsxs("span",{children:["Requested: ",new Date(C.requestedAt).toLocaleTimeString()]}),C.expiresAt&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Qi,{className:"w-3 h-3"})," expires ",new Date(C.expiresAt).toLocaleTimeString()]}),C.hardRestriction&&s.jsxs("span",{className:"flex items-center gap-1 text-rose-300",children:[s.jsx(eu,{className:"w-3 h-3"})," ",C.hardRestriction]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[s.jsxs("button",{disabled:$,onClick:()=>c(C.id,"allow_once"),className:`px-4 py-2 rounded-xl font-bold text-xs flex items-center gap-1.5 ${$?"bg-slate-800 text-slate-600 cursor-not-allowed":"bg-emerald-600 hover:bg-emerald-500 text-white shadow-md shadow-emerald-600/20"}`,children:[s.jsx(Hs,{className:"w-4 h-4"})," Allow Once"]}),s.jsxs("button",{disabled:$,onClick:()=>c(C.id,"allow_current_task"),className:`px-4 py-2 rounded-xl font-bold text-xs flex items-center gap-1.5 ${$?"bg-slate-800 text-slate-600 cursor-not-allowed":"bg-teal-600 hover:bg-teal-500 text-white shadow-md shadow-teal-600/20"}`,children:[s.jsx(Hs,{className:"w-4 h-4"})," Allow Current Task"]}),s.jsxs("button",{disabled:$,onClick:()=>c(C.id,"allow_current_session"),className:`px-4 py-2 rounded-xl font-bold text-xs flex items-center gap-1.5 ${$?"bg-slate-800 text-slate-600 cursor-not-allowed":"bg-sky-600 hover:bg-sky-500 text-white shadow-md shadow-sky-600/20"}`,children:[s.jsx(Hs,{className:"w-4 h-4"})," Allow Current Session"]}),s.jsxs("button",{onClick:()=>c(C.id,"deny"),className:"px-4 py-2 rounded-xl bg-slate-800 hover:bg-rose-900/50 text-slate-300 hover:text-rose-300 font-semibold text-xs flex items-center gap-1.5",children:[s.jsx(ks,{className:"w-4 h-4"})," Deny"]})]})]},C.id)})})]}),h.length>0&&s.jsxs("div",{className:"space-y-3 pt-4 border-t border-slate-800",children:[s.jsxs("h2",{className:"text-sm font-bold text-slate-400 uppercase tracking-wider",children:["Resolved (",h.length,")"]}),s.jsx("div",{className:"space-y-2",children:h.slice(0,30).map(C=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-900/40 border border-slate-800/60 flex items-center justify-between text-xs text-slate-400",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-mono text-[10px] px-1.5 py-0.5 rounded bg-slate-800 border border-slate-700 mr-2",children:C.operation}),s.jsx("span",{className:"font-semibold text-slate-300",children:C.targetPath||C.detail||C.requestedScope}),C.executionResult&&s.jsxs("span",{className:"text-[10px] text-slate-500 ml-2",children:["— ",C.executionResult]})]}),s.jsxs("span",{className:`text-[10px] font-bold uppercase px-2 py-0.5 rounded ${C.status==="approved"?"bg-emerald-500/20 text-emerald-400":C.status==="rejected"?"bg-rose-500/20 text-rose-400":"bg-slate-500/20 text-slate-400"}`,children:[C.status,C.decision?` · ${C.decision}`:""]})]},C.id))})]}),d.length>0&&s.jsxs("div",{className:"space-y-3 pt-4 border-t border-slate-800",children:[s.jsxs("h2",{className:"text-sm font-bold text-slate-400 uppercase tracking-wider",children:["Audit Log (",d.length,")"]}),s.jsx("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 max-h-72 overflow-y-auto",children:s.jsxs("table",{className:"w-full text-[10px] font-mono text-slate-400",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-slate-500 uppercase tracking-wider text-left",children:[s.jsx("th",{className:"pb-2 pr-3",children:"Request"}),s.jsx("th",{className:"pb-2 pr-3",children:"Decision"}),s.jsx("th",{className:"pb-2 pr-3",children:"Operation"}),s.jsx("th",{className:"pb-2 pr-3",children:"Target"}),s.jsx("th",{className:"pb-2 pr-3",children:"Task"}),s.jsx("th",{className:"pb-2",children:"Result"})]})}),s.jsx("tbody",{children:d.slice(0,50).map((C,j)=>s.jsxs("tr",{className:"border-t border-slate-800/60",children:[s.jsx("td",{className:"py-1.5 pr-3 text-slate-500",children:C.permissionRequestId.slice(0,12)}),s.jsx("td",{className:`py-1.5 pr-3 ${C.userDecision==="deny"?"text-rose-400":"text-emerald-400"}`,children:C.userDecision||"—"}),s.jsx("td",{className:"py-1.5 pr-3",children:C.requestedOperation}),s.jsx("td",{className:"py-1.5 pr-3 text-slate-300 break-all max-w-xs",children:C.targetResource}),s.jsx("td",{className:"py-1.5 pr-3 text-indigo-400",children:C.taskId.slice(0,12)}),s.jsx("td",{className:"py-1.5 text-slate-500",children:C.executionResult||"—"})]},`${C.permissionRequestId}-${j}`))})]})})]})]})},Fx=({project:i,onGeneratePromotion:d})=>{var se,Z,I,ne,ae,Y,oe;const[c,b]=f.useState("launch"),[g,h]=f.useState("Production release with isolated Git worktrees and local Ollama inference."),[C,j]=f.useState(!1),[$,H]=f.useState(null),[M,R]=f.useState(!1),L=[{id:"launch",name:"Launch Mode",desc:"Product launch campaigns for Hacker News, Product Hunt & X."},{id:"release",name:"Release Mode",desc:"Feature changelogs, release announcements & upgrade notices."},{id:"showcase",name:"Showcase Mode",desc:"Architecture deep dives, engineering case studies & tech spotlights."},{id:"growth",name:"Growth Mode",desc:"Developer outreach, community growth experiments & discussion hooks."},{id:"content",name:"Content Mode",desc:"Educational posts, tips, and developer social media content."}],ge=async X=>{if(X.preventDefault(),!!i){j(!0);try{const Ee=await d(i.id,c,g);H(Ee)}catch(Ee){alert(`Promotion generation failed: ${Ee.message}`)}finally{j(!1)}}},Q=()=>{var X;(X=$==null?void 0:$.promotion)!=null&&X.body&&(navigator.clipboard.writeText($.promotion.body),R(!0),setTimeout(()=>R(!1),2e3))};return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Ji,{className:"w-5 h-5 text-indigo-400"})," Promotion Center (Promoter Layer)"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Generate factually verified marketing, launch announcements, showcase case studies, and social copy."})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-4",children:[s.jsx("h2",{className:"text-sm font-bold text-white",children:"Campaign Directives"}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400 font-semibold mb-2 block",children:"Operating Mode:"}),s.jsx("div",{className:"space-y-2",children:L.map(X=>s.jsxs("div",{onClick:()=>b(X.id),className:`p-3 rounded-xl border cursor-pointer transition-all ${c===X.id?"bg-indigo-600/15 border-indigo-500/50 text-white":"bg-slate-950/70 border-slate-800 text-slate-300 hover:border-slate-700"}`,children:[s.jsx("div",{className:"text-xs font-bold",children:X.name}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:X.desc})]},X.id))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400 font-semibold mb-1 block",children:"Verified Feature Summary:"}),s.jsx("textarea",{rows:4,value:g,onChange:X=>h(X.target.value),className:"w-full bg-slate-950 border border-slate-800 rounded-xl p-3 text-xs text-slate-200 focus:outline-none focus:border-indigo-500"})]}),s.jsxs("button",{onClick:ge,disabled:C,className:"w-full py-3 rounded-xl bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white font-bold text-xs flex items-center justify-center gap-2 shadow-lg shadow-indigo-600/20",children:[s.jsx(br,{className:"w-4 h-4"}),s.jsx("span",{children:C?"Promoter Agent Formulating Campaign...":"Generate Promotional Campaign"})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 flex flex-col justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-sm font-bold text-white",children:"Generated Content & Strategy"}),$&&s.jsxs("button",{onClick:Q,className:"text-xs text-indigo-400 hover:text-indigo-300 flex items-center gap-1 font-semibold",children:[M?s.jsx(Hs,{className:"w-3.5 h-3.5"}):s.jsx(Vp,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:M?"Copied":"Copy Text"})]})]}),$?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 text-xs",children:[s.jsx("div",{className:"text-indigo-400 font-bold text-sm mb-1",children:(se=$.promotion)==null?void 0:se.title}),s.jsxs("div",{className:"text-[11px] text-slate-400",children:["Target Audience: ",(Z=$.promotion)==null?void 0:Z.targetAudience]}),s.jsxs("div",{className:"text-[11px] text-slate-400",children:["Channels: ",(ne=(I=$.promotion)==null?void 0:I.channels)==null?void 0:ne.join(", ")]})]}),s.jsx("div",{className:"p-4 rounded-xl bg-slate-950 border border-slate-800 text-xs text-slate-300 whitespace-pre-wrap font-sans max-h-72 overflow-y-auto leading-relaxed",children:(ae=$.promotion)==null?void 0:ae.body}),s.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 text-xs",children:[s.jsx("span",{className:"text-[10px] uppercase font-bold text-slate-500 block mb-1",children:"Recommended Assets:"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:(oe=(Y=$.promotion)==null?void 0:Y.assetSuggestions)==null?void 0:oe.map(X=>s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded bg-slate-800 text-slate-300 font-mono",children:X},X))})]})]}):s.jsx("div",{className:"py-24 text-center text-xs text-slate-500 italic",children:'Select an operating mode and click "Generate Promotional Campaign" to review factual marketing content.'})]}),$&&s.jsxs("div",{className:"mt-4 p-3 rounded-xl bg-amber-500/10 border border-amber-500/20 text-xs text-amber-300 flex items-center gap-2",children:[s.jsx(Nn,{className:"w-4 h-4 text-amber-400 shrink-0"}),s.jsx("span",{children:"Publishing is gated: A formal approval request has been queued in Approvals."})]})]})]})]})},Ux=({settings:i,onSaveSettings:d})=>{const[c,b]=f.useState({ollamaEndpoint:(i==null?void 0:i.ollamaEndpoint)||"http://localhost:11434",defaultModel:(i==null?void 0:i.defaultModel)||"gemma4:12b",maxConcurrentInferences:(i==null?void 0:i.maxConcurrentInferences)||1,autoApproveRoutinePrompts:(i==null?void 0:i.autoApproveRoutinePrompts)??!0,requireApprovalForProtectedMerge:(i==null?void 0:i.requireApprovalForProtectedMerge)??!0,requireApprovalForPublishing:(i==null?void 0:i.requireApprovalForPublishing)??!0,defaultProjectDirectory:(i==null?void 0:i.defaultProjectDirectory)||"./data/projects"}),[g,h]=f.useState(!1),C=j=>{j.preventDefault(),d(c),h(!0),setTimeout(()=>h(!1),2e3)};return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-y-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(Zd,{className:"w-5 h-5 text-indigo-400"})," Platform Configuration"]}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Local inference parameters, concurrency throttling, and security permission gates."})]}),s.jsxs("form",{onSubmit:C,className:"max-w-2xl p-6 rounded-2xl bg-slate-900/60 border border-slate-800/80 space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-sm font-bold text-indigo-400 uppercase tracking-wider flex items-center gap-2",children:[s.jsx(Ws,{className:"w-4 h-4"})," Ollama Local Inference Gateway"]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-300 font-semibold block mb-1",children:"Ollama API Endpoint:"}),s.jsx("input",{type:"text",value:c.ollamaEndpoint,onChange:j=>b({...c,ollamaEndpoint:j.target.value}),className:"w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-xs text-slate-200 font-mono focus:outline-none focus:border-indigo-500"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-300 font-semibold block mb-1",children:"Default Model:"}),s.jsx("input",{type:"text",value:c.defaultModel,onChange:j=>b({...c,defaultModel:j.target.value}),className:"w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-xs text-slate-200 font-mono focus:outline-none focus:border-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-300 font-semibold block mb-1",children:"Max Inference Concurrency:"}),s.jsx("input",{type:"number",min:"1",max:"4",value:c.maxConcurrentInferences,onChange:j=>b({...c,maxConcurrentInferences:parseInt(j.target.value)||1}),className:"w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-xs text-slate-200 font-mono focus:outline-none focus:border-indigo-500"}),s.jsx("span",{className:"text-[10px] text-slate-500 mt-1 block",children:"Default 1 avoids GPU VRAM thrashing on local hardware."})]})]})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[s.jsxs("h2",{className:"text-sm font-bold text-amber-400 uppercase tracking-wider flex items-center gap-2",children:[s.jsx(Km,{className:"w-4 h-4"})," Safety & Permission Gates"]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer text-xs text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:c.requireApprovalForProtectedMerge,onChange:j=>b({...c,requireApprovalForProtectedMerge:j.target.checked}),className:"rounded bg-slate-950 border-slate-800 text-indigo-600 focus:ring-0"}),s.jsx("span",{children:"Require explicit human approval for merges into protected branch (main)"})]}),s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer text-xs text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:c.requireApprovalForPublishing,onChange:j=>b({...c,requireApprovalForPublishing:j.target.checked}),className:"rounded bg-slate-950 border-slate-800 text-indigo-600 focus:ring-0"}),s.jsx("span",{children:"Require human approval for external publishing & promotional campaigns"})]}),s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer text-xs text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:c.autoApproveRoutinePrompts,onChange:j=>b({...c,autoApproveRoutinePrompts:j.target.checked}),className:"rounded bg-slate-950 border-slate-800 text-indigo-600 focus:ring-0"}),s.jsx("span",{children:"Auto-approve routine developer prompts (valid within scope)"})]})]})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 flex justify-end",children:s.jsxs("button",{type:"submit",className:"px-6 py-2.5 rounded-xl bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs flex items-center gap-2 shadow-lg shadow-indigo-600/20",children:[g?s.jsx(ht,{className:"w-4 h-4"}):s.jsx(wr,{className:"w-4 h-4"}),s.jsx("span",{children:g?"Settings Saved":"Save Configuration"})]})})]})]})},Wd=[{level:"Stakeholder",bodies:[{id:"user",title:"User (Client / Stakeholder)",department:"Leadership",icon:tu,roleSummary:"Sets goals, asks questions, approves plans and out-of-scope permissions.",receivesFrom:["Supervisor (answers, plans, summaries)","Specialist Agents (permission & review prompts)"],communicatesWith:["Supervisor"]}]},{level:"Executive Coordination",bodies:[{id:"supervisor",agentId:"agent-supervisor",stageKey:"supervisor",title:"Supervisor",department:"Project Management",icon:js,roleSummary:"Front-door coordinator. Analyzes every user message first—answers directly or routes to the right body.",receivesFrom:["User"],communicatesWith:["User","Planner","Prompter","Integration Agent","Promoter Agent"]}]},{level:"Planning, Prompting & Operations",bodies:[{id:"planner",agentId:"agent-planner",stageKey:"planner",title:"Planner",department:"System Architecture",icon:mx,roleSummary:"Inspects the codebase and breaks development goals into atomic, dependency-ordered tasks.",receivesFrom:["Supervisor (development goals)"],communicatesWith:["Supervisor (task proposals)","Scheduler (queued tasks)"]},{id:"prompter",agentId:"agent-prompter",stageKey:"prompter",title:"Prompter",department:"Prompt Engineering",icon:vr,roleSummary:"Compiles skill-enriched, context-grounded instructions for each approved task.",receivesFrom:["Supervisor (approved tasks)"],communicatesWith:["Specialist Agents (compiled prompts)"]},{id:"scheduler",stageKey:"scheduler",title:"Task Scheduler",department:"Operations",icon:zl,roleSummary:"Manages task readiness, dependency order, and dispatches execution to specialist agents.",receivesFrom:["Planner (task graph)"],communicatesWith:["Specialist Agents (task dispatch & status)"]}]},{level:"Engineering & Execution",bodies:[{id:"specialists",agentId:"specialist-dynamic",title:"Specialist Agents",department:"Engineering Team",icon:Vl,roleSummary:"Executes assigned tasks in project scope, edits files, and runs automated validation.",receivesFrom:["Task Scheduler (assigned tasks)","Prompter (compiled instructions)"],communicatesWith:["User (out-of-scope permissions)","Integration Agent (completed work)","Supervisor (completion status)"]}]},{level:"Release & Delivery",bodies:[{id:"integration",agentId:"agent-integration",stageKey:"integration",title:"Integration Agent",department:"Release Engineering",icon:Vi,roleSummary:"Merges completed work, validates builds, and prepares integration approvals.",receivesFrom:["Specialist Agents (completed tasks)","Supervisor"],communicatesWith:["Supervisor","User (approval requests)"]},{id:"promoter",agentId:"agent-promoter",stageKey:"promotion",title:"Promoter Agent",department:"Developer Relations",icon:Ji,roleSummary:"Generates release notes, changelogs, and feature announcements from completed work.",receivesFrom:["Supervisor","Integration Agent"],communicatesWith:["Supervisor","User (drafted announcements)"]}]}],Vx=({stages:i,activities:d,agents:c=[],backgroundBusy:b,onOpenWorkspace:g})=>{const h=Object.values(d).filter($=>!["done","failed"].includes($.state)),C=c.filter($=>!["agent-supervisor","agent-planner","agent-prompter","agent-integration","agent-promoter"].includes($.id)),j=$=>{var H;return!!($.stageKey&&((H=i[$.stageKey])==null?void 0:H.status)==="active"||$.agentId&&h.some(M=>M.agentId===$.agentId)||$.id==="specialists"&&h.some(M=>!M.agentId.startsWith("agent-")))};return s.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-[#0b0f17]",children:s.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-white",children:"Organization Hierarchy"}),s.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Company communication structure — which body reports to, delegates to, and communicates with whom."})]}),b&&s.jsx("span",{className:"text-[10px] font-semibold text-amber-300 bg-amber-500/10 border border-amber-500/30 px-2.5 py-1 rounded-full animate-pulse",children:"Active coordination"})]}),s.jsx("div",{className:"space-y-4",children:Wd.map(($,H)=>s.jsxs(Gd.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-slate-500",children:$.level}),s.jsx("div",{className:`grid gap-4 ${$.bodies.length===1?"grid-cols-1 max-w-xl mx-auto":$.bodies.length===2?"grid-cols-1 md:grid-cols-2":"grid-cols-1 md:grid-cols-3"}`,children:$.bodies.map(M=>{const R=M.icon,L=j(M);return s.jsxs("div",{className:`rounded-2xl border p-4 transition-all ${L?"bg-indigo-500/10 border-indigo-500/50 shadow-lg shadow-indigo-500/10":"bg-slate-900/60 border-slate-800/80"}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:`w-9 h-9 rounded-xl border flex items-center justify-center shrink-0 ${L?"bg-indigo-600/20 border-indigo-400 text-indigo-300":"bg-slate-950 border-slate-800 text-slate-300"}`,children:s.jsx(R,{className:"w-4 h-4"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-sm font-bold text-white truncate flex items-center gap-2",children:[M.title,L&&s.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-400 animate-ping shrink-0"})]}),s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:M.department})]})]}),g&&M.agentId&&s.jsxs("button",{onClick:()=>g(M.agentId),className:"px-2 py-1 rounded-lg bg-slate-950/80 border border-slate-700 hover:border-indigo-500/50 text-[10px] font-semibold text-slate-300 hover:text-indigo-300 flex items-center gap-1 shrink-0",title:`Open ${M.title} workspace`,children:[s.jsx(Yd,{className:"w-3 h-3"})," Workspace"]})]}),s.jsx("p",{className:"text-xs text-slate-400 mb-3 leading-relaxed",children:M.roleSummary}),s.jsxs("div",{className:"space-y-2 pt-2.5 border-t border-slate-800/80 text-[11px]",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-slate-500 font-semibold",children:"Receives from: "}),s.jsx("span",{className:"text-slate-300",children:M.receivesFrom.join(" · ")})]}),s.jsxs("div",{className:"flex items-start gap-1.5",children:[s.jsx(yp,{className:"w-3.5 h-3.5 text-indigo-400 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-slate-500 font-semibold",children:"Communicates with: "}),s.jsx("span",{className:"text-indigo-300",children:M.communicatesWith.join(" · ")})]})]}),M.id==="specialists"&&C.length>0&&s.jsx("div",{className:"pt-1 flex flex-wrap gap-1.5",children:C.map(ge=>s.jsx("button",{onClick:()=>g==null?void 0:g(ge.id),className:"px-2 py-0.5 rounded-full bg-slate-950 border border-slate-800 hover:border-indigo-500/40 text-[10px] font-mono text-slate-300",children:ge.name},ge.id))})]})]},M.id)})})]}),H<Wd.length-1&&s.jsx("div",{className:"flex justify-center",children:s.jsxs("div",{className:"flex flex-col items-center text-slate-600",children:[s.jsx("div",{className:"w-px h-3 bg-slate-800"}),s.jsx(gp,{className:"w-4 h-4 text-slate-600"})]})})]},$.level))})]})})};function Hx(i,d){try{localStorage.setItem(i,JSON.stringify(d))}catch{}}function Wx(i){try{const d=localStorage.getItem(i);return d?JSON.parse(d):null}catch{return null}}const ru={working:{classes:"bg-amber-500/10 border-amber-500/40 text-amber-300",label:"Working"},waiting_user:{classes:"bg-sky-500/10 border-sky-500/40 text-sky-300",label:"Waiting for you"},completed:{classes:"bg-emerald-500/10 border-emerald-500/40 text-emerald-300",label:"Completed"},failed:{classes:"bg-rose-500/10 border-rose-500/40 text-rose-300",label:"Failed"},idle:{classes:"bg-slate-950/60 border-slate-800 text-slate-500",label:"Idle"}},Bx=["live","instructions","context","tools","files","logs","metrics","history"],Gx={live:"Live Output",instructions:"Instructions",context:"Context",tools:"Tool Operations",files:"Files & Artifacts",logs:"Execution Logs",metrics:"Metrics",history:"History"},lu=i=>i==null?"—":i<1e3?`${i}ms`:`${(i/1e3).toFixed(1)}s`,Li="VibeCodePilot.workspaceAgentId",Qx=({initialAgentId:i=null,pendingQuestions:d=[],onAnswerQuestion:c,permissionRequests:b=[],onResolvePermission:g})=>{const[h,C]=f.useState([]),[j,$]=f.useState(()=>{if(i)return i;try{return localStorage.getItem(Li)}catch{return null}}),H=G=>{$(G);try{G?localStorage.setItem(Li,G):localStorage.removeItem(Li)}catch{}},[M,R]=f.useState({}),[L,ge]=f.useState({}),[Q,se]=f.useState(!1),[Z,I]=f.useState(null),[ne,ae]=f.useState(""),[Y,oe]=f.useState("all"),[X,Ee]=f.useState(!0),[B,Ce]=f.useState("live"),Te=f.useCallback(async()=>{const G=Wx("agentWorkspaces");G&&C(G),se(!0),I(null);try{const ee=await O.getAgentWorkspaces();C(ee),Hx("agentWorkspaces",ee)}catch(ee){I(ee.message||"Unable to load agent workspaces")}finally{se(!1)}},[]);f.useEffect(()=>{Te()},[Te]),f.useEffect(()=>{i&&H(i)},[i]),f.useEffect(()=>{if(!X)return;const G=setInterval(Te,5e3);return()=>clearInterval(G)},[X,Te]),f.useEffect(()=>{O.getUsageMonitor("task").then(G=>{const ee={};for(const ue of G.contexts||[])ee[ue.instanceId]=ue;ge(ee)}).catch(()=>{})},[]),f.useEffect(()=>kn.subscribe(ee=>{if(ee.type==="context.updated"&&ee.status.scope==="task")ge(ue=>({...ue,[ee.status.instanceId]:ee.status}));else if(ee.type==="chat.stream.chunk"&&ee.agentId){const ue=ee.agentId;R(w=>{const E=w[ue],P=E&&(E.stage!==ee.stage||E.taskId!==ee.taskId||E.done),z=!E||P?{text:"",thinking:"",stage:ee.stage,taskId:ee.taskId,updatedAt:ee.timestamp}:E;return{...w,[ue]:{text:z.text+(ee.chunk||""),thinking:z.thinking+(ee.thinkingChunk||""),stage:ee.stage||z.stage,taskId:ee.taskId||z.taskId,done:!!ee.done,updatedAt:ee.timestamp}}})}else(ee.type==="execution.activity"||ee.type==="task.status"||ee.type==="tool.executed"||ee.type==="agent.started")&&Te()}),[Te]);const Me=f.useMemo(()=>{const G=ne.toLowerCase();return h.filter(ee=>(Y==="all"||ee.status===Y)&&(!G||ee.name.toLowerCase().includes(G)||ee.agentId.toLowerCase().includes(G)||ee.role.toLowerCase().includes(G)))},[h,ne,Y]),$e=h.find(G=>G.agentId===j)||null,ke=f.useMemo(()=>{const G=h.filter(w=>w.status==="working").length,ee=h.filter(w=>w.status==="completed").length,ue=h.reduce((w,E)=>w+E.metrics.tasksTotal,0);return{agents:h.length,active:G,completed:ee,totalTasks:ue}},[h]);return $e?s.jsx(qx,{snapshot:$e,liveStream:M[$e.agentId],taskContexts:L,pendingQuestions:d.filter(G=>G.agentId===$e.agentId),onAnswerQuestion:c,permissionRequests:b.filter(G=>G.agentId===$e.agentId&&G.status==="pending"),onResolvePermission:g,onBack:()=>H(null),autoRefresh:X,onToggleAutoRefresh:()=>Ee(G=>!G),tab:B,onTabChange:Ce}):s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden",children:[s.jsxs("div",{className:"px-6 py-4 border-b border-slate-800/80 flex items-center justify-between shrink-0",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[s.jsx(js,{className:"w-5 h-5 text-indigo-400"})," Agent Workspaces"]}),s.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[ke.agents," agents · ",ke.active," working · ",ke.completed," completed · ",ke.totalTasks," tasks observed"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Fl,{className:"w-3.5 h-3.5 text-slate-500 absolute left-2.5 top-2.5"}),s.jsx("input",{value:ne,onChange:G=>ae(G.target.value),placeholder:"Search agents…",className:"w-48 bg-slate-950 border border-slate-800 rounded-lg pl-8 pr-3 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-indigo-500"})]}),s.jsxs("select",{value:Y,onChange:G=>oe(G.target.value),className:"bg-slate-950 border border-slate-800 rounded-lg px-2 py-2 text-xs text-slate-300",children:[s.jsx("option",{value:"all",children:"All statuses"}),s.jsx("option",{value:"working",children:"Working"}),s.jsx("option",{value:"waiting_user",children:"Waiting for user"}),s.jsx("option",{value:"completed",children:"Completed"}),s.jsx("option",{value:"failed",children:"Failed"}),s.jsx("option",{value:"idle",children:"Idle"})]}),s.jsx("button",{onClick:()=>Ee(G=>!G),className:`px-3 py-2 rounded-lg text-xs font-medium border transition-colors ${X?"bg-indigo-600/20 border-indigo-500/40 text-indigo-300":"bg-slate-900 border-slate-800 text-slate-400"}`,title:"Toggle auto-refresh (5s)",children:X?"Auto-refresh on":"Auto-refresh off"}),s.jsx("button",{onClick:Te,disabled:Q,className:"p-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-300 hover:text-white disabled:opacity-50",title:"Refresh now",children:s.jsx(Xd,{className:`w-4 h-4 ${Q?"animate-spin":""}`})})]})]}),Z&&s.jsx("div",{className:"mx-6 mt-4 px-4 py-3 rounded-xl bg-rose-950/30 border border-rose-500/30 text-rose-300 text-xs",children:Z}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:Me.length===0&&!Q?s.jsx("div",{className:"py-20 text-center text-slate-600 italic text-sm",children:"No agent workspaces match your filters. Agents appear here as they are registered and execute tasks."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:Me.map(G=>{const ee=ru[G.status],ue=G.assignedTasks.find(w=>w.id===G.currentTaskId);return s.jsxs("button",{onClick:()=>{H(G.agentId),Ce("live")},className:`text-left p-4 rounded-2xl border bg-slate-900/60 hover:border-indigo-500/50 transition-all space-y-3 ${ee.classes}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-bold text-white truncate",children:G.name}),s.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:[G.role," · ",G.modelConfig.model]})]}),s.jsx(Yd,{className:"w-3.5 h-3.5 text-slate-600 shrink-0"})]}),s.jsx("span",{className:`inline-block text-[10px] font-semibold px-2 py-0.5 rounded-full border ${ee.classes}`,children:ee.label}),s.jsx("div",{className:"text-[11px] text-slate-400 truncate",children:G.statusLabel}),ue&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between text-[10px] text-slate-500 mb-1",children:[s.jsx("span",{className:"truncate",children:ue.title}),s.jsxs("span",{children:[ue.progressPercent,"%"]})]}),s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all duration-500",style:{width:`${ue.progressPercent}%`}})})]}),s.jsxs("div",{className:"flex items-center gap-3 pt-2 border-t border-slate-800/70 text-[10px] text-slate-500 font-mono",children:[s.jsxs("span",{children:[G.metrics.tasksTotal," tasks"]}),s.jsxs("span",{className:"text-emerald-400",children:[G.metrics.tasksCompleted," done"]}),G.metrics.tasksFailed>0&&s.jsxs("span",{className:"text-rose-400",children:[G.metrics.tasksFailed," failed"]}),G.metrics.avgDurationMs!=null&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Qi,{className:"w-3 h-3"}),lu(G.metrics.avgDurationMs)]}),s.jsxs("span",{className:"ml-auto",children:[G.activity.length," events"]})]})]},G.agentId)})})})]})},qx=({snapshot:i,liveStream:d,taskContexts:c,pendingQuestions:b=[],onAnswerQuestion:g,permissionRequests:h=[],onResolvePermission:C,onBack:j,autoRefresh:$,onToggleAutoRefresh:H,tab:M,onTabChange:R})=>{const[L,ge]=f.useState(null),Q=i,se=ru[Q.status],Z=Q.assignedTasks.find(I=>I.id===Q.currentTaskId);return s.jsxs("div",{className:"flex-1 flex flex-col h-full bg-[#0b0f17] overflow-hidden",children:[s.jsxs("div",{className:"px-6 py-4 border-b border-slate-800/80 shrink-0 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("button",{onClick:j,className:"p-2 rounded-lg bg-slate-900 border border-slate-800 text-slate-400 hover:text-white shrink-0",title:"Back to workspace grid",children:s.jsx(bp,{className:"w-4 h-4"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-lg font-bold text-white truncate flex items-center gap-2",children:[s.jsx(js,{className:"w-5 h-5 text-indigo-400 shrink-0"})," ",Q.name]}),s.jsxs("div",{className:"text-[11px] text-slate-500 font-mono truncate",children:[Q.agentId," · ",Q.role," · ",Q.provider," / ",Q.modelConfig.model]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsx("span",{className:`text-[10px] font-semibold px-2.5 py-1 rounded-full border ${se.classes}`,children:se.label}),s.jsx("button",{onClick:H,className:`px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${$?"bg-indigo-600/20 border-indigo-500/40 text-indigo-300":"bg-slate-900 border-slate-800 text-slate-400"}`,children:$?"Auto-refresh on":"Auto-refresh off"})]})]}),s.jsx("div",{className:"text-xs text-slate-400",children:Q.description||Q.statusLabel})]}),Z&&s.jsxs("div",{className:"px-6 py-3 border-b border-slate-800/80 bg-slate-900/30 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs mb-1.5",children:[s.jsxs("span",{className:"text-slate-300 font-semibold truncate",children:["Current task: ",Z.title]}),s.jsxs("span",{className:"text-indigo-300 font-mono",children:[Z.progressPercent,"%"]})]}),s.jsx("div",{className:"h-2 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all duration-500",style:{width:`${Z.progressPercent}%`}})})]}),(b.length>0||h.length>0)&&s.jsxs("div",{className:"px-6 py-3 border-b border-amber-500/30 bg-amber-950/20 shrink-0 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold text-amber-300",children:[s.jsx(Ul,{className:"w-4 h-4 text-amber-400 animate-pulse"}),s.jsxs("span",{children:["Action Required (",b.length+h.length,")"]})]}),b.map(I=>s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-sky-500/30 bg-slate-950/70 px-3 py-2",children:[s.jsx("span",{className:"text-xs text-slate-200",children:I.question}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:(I.options||["Approve and execute"]).map(ne=>s.jsx("button",{disabled:L===I.id,onClick:async()=>{ge(I.id);try{await(g==null?void 0:g(I.id,ne))}finally{ge(null)}},className:"px-2.5 py-1 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-[11px] font-semibold",children:ne},ne))})]},I.id)),h.map(I=>s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-amber-500/30 bg-slate-950/70 px-3 py-2",children:[s.jsxs("span",{className:"text-[11px] font-mono text-amber-200",children:[I.operation,": ",I.targetPath]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:["allow_once","allow_task","deny"].map(ne=>s.jsx("button",{disabled:L===I.id,onClick:async()=>{ge(I.id);try{await(C==null?void 0:C(I.id,ne))}finally{ge(null)}},className:`px-2.5 py-1 rounded-lg text-[11px] font-semibold disabled:opacity-50 ${ne==="deny"?"bg-rose-600/80 hover:bg-rose-500 text-white":"bg-emerald-600/80 hover:bg-emerald-500 text-white"}`,children:ne==="allow_once"?"Allow once":ne==="allow_task"?"Allow task":"Deny"},ne))})]},I.id))]}),s.jsx("div",{className:"px-6 border-b border-slate-800/80 flex items-center gap-1 overflow-x-auto shrink-0",children:Bx.map(I=>s.jsx("button",{onClick:()=>R(I),className:`px-3 py-2.5 text-xs font-semibold border-b-2 transition-colors whitespace-nowrap ${M===I?"border-indigo-500 text-indigo-300":"border-transparent text-slate-500 hover:text-slate-300"}`,children:Gx[I]},I))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[M==="live"&&s.jsx(Kx,{snapshot:Q,liveStream:d}),M==="instructions"&&s.jsx(Yx,{snapshot:Q}),M==="context"&&s.jsx(Jx,{snapshot:Q,taskContexts:c}),M==="tools"&&s.jsx(Xx,{snapshot:Q}),M==="files"&&s.jsx(Zx,{snapshot:Q}),M==="logs"&&s.jsx(ef,{snapshot:Q}),M==="metrics"&&s.jsx(tf,{snapshot:Q}),M==="history"&&s.jsx(sf,{snapshot:Q})]})]})},Bs=({icon:i,text:d})=>s.jsxs("div",{className:"py-16 text-center text-slate-600 italic text-xs flex flex-col items-center gap-2",children:[i,d]}),Kx=({snapshot:i,liveStream:d})=>{const c=!!(d&&(d.text||d.thinking));return i.activity.length===0&&!c?s.jsx(Bs,{icon:s.jsx(bn,{className:"w-5 h-5"}),text:"No live activity yet. This agent starts producing output when a task is assigned and executed."}):s.jsxs("div",{className:"space-y-3",children:[c&&d&&s.jsxs("div",{className:"p-3.5 rounded-xl bg-slate-950 border border-indigo-500/40 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-mono text-indigo-300",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${d.done?"bg-emerald-400":"bg-indigo-400 animate-ping"}`}),s.jsx("span",{className:"uppercase font-semibold",children:d.done?"Latest stream output":`Streaming (${d.stage||"output"})…`}),s.jsx("span",{className:"ml-auto text-slate-500",children:new Date(d.updatedAt).toLocaleTimeString()})]}),d.thinking&&s.jsx("div",{className:"text-[11px] text-purple-300/80 bg-slate-900/70 border border-slate-800 rounded-lg p-2 whitespace-pre-wrap italic max-h-40 overflow-y-auto",children:d.thinking}),d.text&&s.jsxs("pre",{className:"text-xs text-slate-200 font-mono whitespace-pre-wrap max-h-64 overflow-y-auto",children:[d.text,!d.done&&s.jsx("span",{className:"inline-block w-1.5 h-3.5 ml-0.5 bg-indigo-400 animate-pulse align-middle"})]})]}),i.activity.map((b,g)=>s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl bg-slate-900/60 border border-slate-800/70",children:[s.jsx(zp,{className:`w-3.5 h-3.5 mt-0.5 shrink-0 ${b.state==="failed"?"text-rose-400":b.state==="done"?"text-emerald-400":"text-amber-400"}`}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-mono text-slate-500",children:[s.jsx("span",{children:new Date(b.timestamp).toLocaleTimeString()}),s.jsx("span",{className:"uppercase text-indigo-300 font-semibold",children:b.state})]}),s.jsx("div",{className:"text-xs text-slate-300 mt-0.5 whitespace-pre-wrap",children:b.message})]})]},g))]})},Yx=({snapshot:i})=>i.instructions.length===0?s.jsx(Bs,{icon:s.jsx(Di,{className:"w-5 h-5"}),text:"No compiled instructions yet. Instructions appear after the Prompter compiles a specialist prompt for an assigned task."}):s.jsx("div",{className:"space-y-4",children:i.instructions.map(d=>s.jsxs("details",{className:"rounded-xl bg-slate-900/60 border border-slate-800/70 overflow-hidden",children:[s.jsxs("summary",{className:"px-4 py-3 cursor-pointer text-xs font-semibold text-indigo-300 hover:text-indigo-200 flex items-center gap-2",children:[s.jsx(Di,{className:"w-3.5 h-3.5"})," Prompt for task ",d.taskId.slice(-14)," — ",new Date(d.createdAt).toLocaleString()]}),s.jsx("pre",{className:"px-4 pb-4 pt-2 text-[11px] text-slate-300 whitespace-pre-wrap font-mono max-h-96 overflow-y-auto border-t border-slate-800",children:d.fullPromptText})]},d.promptId))}),Jx=({snapshot:i,taskContexts:d})=>i.assignedTasks.length===0?s.jsx(Bs,{icon:s.jsx(qi,{className:"w-5 h-5"}),text:"No task context yet."}):s.jsx("div",{className:"space-y-3",children:i.assignedTasks.map(c=>{const b=d[c.id];return s.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/60 border border-slate-800/70 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("div",{className:"text-xs font-semibold text-white",children:c.title}),b&&s.jsxs("span",{className:`text-[10px] font-mono font-semibold ${b.level==="critical"?"text-rose-400":b.level==="warn"?"text-amber-400":"text-emerald-400"}`,children:["Ctx: ",b.usagePercent,"% (",b.usedTokens.toLocaleString(),"/",b.contextLength.toLocaleString(),")"]})]}),b&&s.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${b.level==="critical"?"bg-rose-500":b.level==="warn"?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${b.usagePercent}%`}})}),s.jsx("div",{className:"text-[11px] text-slate-400 whitespace-pre-wrap",children:c.description||"(no description)"}),s.jsxs("div",{className:"text-[10px] font-mono text-slate-500",children:["Status: ",c.status," · Started: ",c.startedAt?new Date(c.startedAt).toLocaleString():"—"," · Completed: ",c.completedAt?new Date(c.completedAt).toLocaleString():"—"]})]},c.id)})}),Xx=({snapshot:i})=>i.toolOperations.length===0?s.jsx(Bs,{icon:s.jsx(Wi,{className:"w-5 h-5"}),text:"No tool operations recorded yet."}):s.jsx("div",{className:"space-y-2 font-mono text-[11px]",children:i.toolOperations.map((d,c)=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-900/60 border border-slate-800/70 flex items-start gap-3",children:[s.jsx(Wi,{className:"w-3.5 h-3.5 text-amber-400 shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"text-slate-200 break-all",children:d.tool}),d.result&&s.jsxs("div",{className:"text-slate-500 mt-0.5 break-all",children:["→ ",d.result]})]}),s.jsx("span",{className:"text-slate-600 shrink-0",children:new Date(d.timestamp).toLocaleTimeString()})]},c))}),Zx=({snapshot:i})=>i.artifacts.length===0?s.jsx(Bs,{icon:s.jsx(Ui,{className:"w-5 h-5"}),text:"No files created or modified by this agent yet."}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:i.artifacts.map(d=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-900/60 border border-slate-800/70 flex items-center gap-2",children:[s.jsx(Ui,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}),s.jsx("span",{className:"text-xs font-mono text-slate-300 truncate",children:d})]},d))}),ef=({snapshot:i})=>i.logs.length===0?s.jsx(Bs,{icon:s.jsx(Xi,{className:"w-5 h-5"}),text:"No execution logs yet."}):s.jsx("div",{className:"space-y-1 font-mono text-[11px]",children:i.logs.map((d,c)=>s.jsxs("div",{className:`flex items-start gap-2 px-3 py-1.5 rounded-lg ${d.level==="error"?"bg-rose-950/20 text-rose-300":"bg-slate-900/50 text-slate-400"}`,children:[s.jsx("span",{className:"text-slate-600 shrink-0",children:new Date(d.timestamp).toLocaleTimeString()}),s.jsx("span",{className:"break-all",children:d.message})]},c))}),tf=({snapshot:i})=>{const d=i.metrics,c=[{label:"Tasks assigned",value:d.tasksTotal,icon:s.jsx(Di,{className:"w-4 h-4 text-indigo-400"})},{label:"Completed",value:d.tasksCompleted,icon:s.jsx(ht,{className:"w-4 h-4 text-emerald-400"})},{label:"Failed / cancelled",value:d.tasksFailed,icon:s.jsx(jr,{className:"w-4 h-4 text-rose-400"})},{label:"Success rate",value:`${d.successRate}%`,icon:s.jsx(Rl,{className:"w-4 h-4 text-amber-400"})},{label:"Avg duration",value:lu(d.avgDurationMs),icon:s.jsx(Qi,{className:"w-4 h-4 text-sky-400"})},{label:"Events observed",value:d.eventsObserved,icon:s.jsx(bn,{className:"w-4 h-4 text-violet-400"})}];return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:c.map(b=>s.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/60 border border-slate-800/70",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[10px] uppercase tracking-wider text-slate-500",children:[b.icon," ",b.label]}),s.jsx("div",{className:"text-lg font-bold text-white mt-1",children:b.value})]},b.label))}),s.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/40 border border-slate-800/70 text-[11px] text-slate-400 flex items-start gap-2",children:[s.jsx(Mp,{className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-slate-600"}),d.tokensNote]})]})},sf=({snapshot:i})=>i.history.length===0?s.jsx(Bs,{icon:s.jsx(Yi,{className:"w-5 h-5"}),text:"No previous execution sessions yet."}):s.jsx("div",{className:"space-y-2",children:i.history.map(d=>s.jsxs("div",{className:"p-3 rounded-xl bg-slate-900/60 border border-slate-800/70",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-200 truncate",children:d.title}),s.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase shrink-0 ${d.status==="completed"?"bg-emerald-500/10 text-emerald-300 border border-emerald-500/30":"bg-rose-500/10 text-rose-300 border border-rose-500/30"}`,children:d.status})]}),d.summary&&s.jsx("div",{className:"text-[11px] text-slate-400 mt-1 whitespace-pre-wrap",children:d.summary}),s.jsxs("div",{className:"text-[10px] font-mono text-slate-600 mt-1",children:[d.startedAt?new Date(d.startedAt).toLocaleString():"—"," → ",d.completedAt?new Date(d.completedAt).toLocaleString():"—"]})]},d.taskId))}),Bi=["workspace","dashboard","hierarchy","agent-workspaces","tasks","prompt-studio","monitor","agents","skills","tech-stack","models","git","approvals","permissions","promotion","settings"],Ll="VibeCodePilot.activeView",Ri="VibeCodePilot.selectedProjectId",zi="VibeCodePilot.workspaceAgentId",Oi="VibeCodePilot.editorTaskId";function nf(){try{const i=window.location.hash.replace(/^#\/?/,"").split("?")[0];if(Bi.includes(i))return i;const d=localStorage.getItem(Ll);if(d&&Bi.includes(d))return d}catch{}return"workspace"}const rf=()=>{const[i,d]=f.useState(nf),c=_=>{d(_);try{localStorage.setItem(Ll,_);const J=`#/${_}`;window.location.hash!==J&&window.history.replaceState(null,"",J)}catch{}};f.useEffect(()=>{try{localStorage.setItem(Ll,i);const J=`#/${i}`;window.location.hash!==J&&window.history.replaceState(null,"",J)}catch{}const _=()=>{const J=window.location.hash.replace(/^#\/?/,"").split("?")[0];if(Bi.includes(J)){d(J);try{localStorage.setItem(Ll,J)}catch{}}};return window.addEventListener("hashchange",_),()=>window.removeEventListener("hashchange",_)},[]);const[b,g]=f.useState([]),[h,C]=f.useState(),j=_=>{C(_);try{_!=null&&_.id?localStorage.setItem(Ri,_.id):localStorage.removeItem(Ri)}catch{}},[$,H]=f.useState([]),[M,R]=f.useState([]),[L,ge]=f.useState([]),[Q,se]=f.useState([]),[Z,I]=f.useState([]),[ne,ae]=f.useState([]),[Y,oe]=f.useState(),[X,Ee]=f.useState(),[B,Ce]=f.useState({}),[Te,Me]=f.useState(!1),[$e,ke]=f.useState([]),[G,ee]=f.useState({}),[ue,w]=f.useState([]),[E,P]=f.useState(!1),[z,p]=f.useState(0),[T,fe]=f.useState(()=>{try{return localStorage.getItem(Oi)}catch{return null}}),he=_=>{fe(_);try{_?localStorage.setItem(Oi,_):localStorage.removeItem(Oi)}catch{}},[de,pe]=f.useState(!1),[be,ve]=f.useState([]),[Ne,Oe]=f.useState([]),[ze,le]=f.useState(()=>{try{return localStorage.getItem(zi)}catch{return null}}),A=_=>{le(_);try{_?localStorage.setItem(zi,_):localStorage.removeItem(zi)}catch{}},S=async()=>{try{const[_,J]=await Promise.all([O.getPermissionRequests(),O.getPermissionAudit()]);ve(_),Oe(J)}catch{}},k=async(_,J)=>{const K=be.find(_e=>_e.id===_);try{await O.resolvePermission(_,J,{projectId:K==null?void 0:K.projectId,taskId:K==null?void 0:K.taskId,sessionId:K==null?void 0:K.sessionId})}finally{await S(),O.getTasks().then(H).catch(()=>{})}},V=async _=>{const J=await O.createProject({path:_});g(K=>K.some(_e=>_e.id===J.id)?K:[...K,J]),j(J),H(await O.getTasks(J.id))},Se=async()=>{try{const[_,J,K,_e,tt,Gt,qs,Ks,In]=await Promise.all([O.getProjects(),O.getAgents(),O.getSkills(),O.getTasks(),O.getPrompts(),O.getApprovals(),O.getModels(),O.getSettings(),O.getRecentEvents()]);if(g(_),_.length>0&&!h){let An=null;try{An=localStorage.getItem(Ri)}catch{}const Bl=An?_.find(Gl=>Gl.id===An):void 0;j(Bl||_[0])}ge(J),se(K),H(_e),R(tt),I(Gt),oe(qs),Ee(Ks),ae(In)}catch(_){console.warn("Initial data load error:",_)}};f.useEffect(()=>{Se(),Nr(),S(),O.getAgentQuestions().then(w).catch(()=>{});const _=kn.subscribe(K=>{if(ae(_e=>[K,..._e]),K.type==="chat.message.created")p(_e=>_e+1);else if(K.type.startsWith("task."))O.getTasks().then(H);else if(K.type.startsWith("prompt."))O.getPrompts().then(R);else if(K.type.startsWith("approval."))O.getApprovals().then(I);else if(K.type.startsWith("model."))O.getModels().then(oe);else if(K.type==="hierarchy.stage")Ce(_e=>({..._e,[K.stage]:{stage:K.stage,status:K.status,detail:K.detail,timestamp:K.timestamp}}));else if(K.type==="execution.activity")ee(_e=>({..._e,[K.activityId]:{taskId:K.taskId,agentId:K.agentId,activityId:K.activityId,state:K.state,message:K.message,updatedAt:K.timestamp,history:K.history}})),K.state==="waiting-user"&&O.getAgentQuestions().then(w).catch(()=>{});else if(K.type==="agent.question"||K.type==="agent.question.resolved"){if(K.type==="agent.question"&&K.questionId){const _e=K;w(tt=>tt.some(Gt=>Gt.id===_e.questionId)?tt:[...tt,{id:_e.questionId,taskId:_e.taskId,agentId:_e.agentId,question:_e.question,options:_e.options,askedAt:_e.timestamp}])}O.getAgentQuestions().then(w).catch(()=>{})}else K.type.startsWith("permission.")?(S(),K.type==="permission.resolved"&&O.getTasks().then(H).catch(()=>{})):K.type==="chat.background.started"?(Me(!0),Ce({})):K.type==="chat.background.completed"&&(Me(!1),O.getTasks().then(H),p(_e=>_e+1))}),J=setInterval(()=>{O.getAgentQuestions().then(w).catch(()=>{}),S()},3e3);return()=>{clearInterval(J),_()}},[]);const gt=async(_,J)=>{const K=await O.sendChatMessage(_,h==null?void 0:h.id,J),[_e,tt]=await Promise.all([O.getTasks(h==null?void 0:h.id),O.getPrompts(h==null?void 0:h.id)]);return H(_e),R(tt),K},Je=async(_,J)=>{const K=await O.sendChatMessageBackground(_,h==null?void 0:h.id,J);return Me(!0),K},Rt=async _=>O.summarizeSession(_),Le=async()=>O.planReview(h==null?void 0:h.id),Et=async _=>{H(J=>J.map(K=>K.id===_?{...K,status:"running"}:K));try{await O.executeTask(_);const J=await O.getTasks(h==null?void 0:h.id);H(J)}catch{O.getTasks(h==null?void 0:h.id).then(H)}},Wt=async(_,J)=>{await O.answerAgentQuestion(_,J),w(await O.getAgentQuestions())},Nr=async()=>{O.getArchivedTasks().then(ke).catch(()=>ke([]))},Sn=async _=>{await O.archiveTask(_);const[J,K]=await Promise.all([O.getTasks(h==null?void 0:h.id),O.getArchivedTasks()]);H(J),ke(K)},kr=async _=>{await O.unarchiveTask(_);const[J,K]=await Promise.all([O.getTasks(h==null?void 0:h.id),O.getArchivedTasks()]);H(J),ke(K)},Gs=async _=>{await O.deleteTask(_);const[J,K]=await Promise.all([O.getTasks(h==null?void 0:h.id),O.getArchivedTasks()]);H(J),ke(K)},Ss=async _=>{await O.cancelTask(_),H(await O.getTasks(h==null?void 0:h.id))},Cn=async _=>{await O.retryTask(_),H(await O.getTasks(h==null?void 0:h.id))},Cs=async(_,J,K)=>{if(!h)throw new Error("Select a project before creating a task.");await O.saveTask({id:"",projectId:h.id,title:_,description:J,priority:K,assignedAgentId:"specialist-dynamic",requiredSkills:[],scope:{affectedFiles:[]},dependencies:[],acceptanceCriteria:[],status:"planned",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),H(await O.getTasks(h.id))},_s=async _=>{await O.approvePrompt(_);const J=await O.getPrompts(h==null?void 0:h.id);R(J)},Hl=async _=>{await O.rejectPrompt(_);const J=await O.getPrompts(h==null?void 0:h.id);R(J)},_n=async(_,J,K)=>{await O.resolveApproval(_,J,K);const _e=await O.getApprovals(h==null?void 0:h.id);I(_e)},Sr=async _=>{await O.setActiveModel(_);const J=await O.getModels();oe(J)},Wl=async(_,J)=>{await O.setActiveModel(J,_);const K=await O.getAgents();ge(K)},En=async _=>{await O.pullModel(_)},Qs=async _=>{const J=await O.updateSettings(_);Ee(J)},Tn=async _=>{const J=await O.integrateProject(_),K=await O.getApprovals(_);return I(K),J},Pn=async(_,J,K)=>{const _e=await O.promoteProject(_,J,K),tt=await O.getApprovals(_);return I(tt),_e},Mn=async(_,J)=>{const K=await O.updateTask(_,J);H(_e=>_e.map(tt=>tt.id===_?K:tt))},zt=async _=>{const J=await O.approveProposedTask(_);H(K=>K.map(_e=>_e.id===_?J:_e))},ss=async(_,J)=>{const K=await O.reviewAgainTask(_,J);H(_e=>_e.map(tt=>tt.id===_?K:tt))},Es=$.find(_=>_.id===T)||$e.find(_=>_.id===T)||null,Cr=async()=>{const[_,J]=await Promise.all([O.getTasks(h==null?void 0:h.id),O.getArchivedTasks()]);H(_),ke(J)},Bt=async _=>{await _(),await Cr()},_r=Z.filter(_=>_.status==="pending").length,Er=$.filter(_=>_.status==="running").length,$n=be.filter(_=>_.status==="pending").length;return s.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-[#0b0f17]",children:[s.jsx(wx,{activeView:i,onSelectView:c,pendingApprovalsCount:_r,pendingPermissionsCount:$n,runningTasksCount:Er,chatProcessing:de}),s.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[s.jsx(bx,{projects:b,selectedProject:h,onSelectProject:j,onAddProject:V,ollamaStatus:Y,pendingQuestions:ue,onAnswerQuestion:Wt,permissionRequests:be,onResolvePermission:k,approvals:Z,onResolveApproval:_n,proposedTasks:$.filter(_=>_.status==="proposed"),onApproveProposedTask:zt,onOpenMonitor:()=>c("monitor")}),s.jsxs("main",{className:"flex-1 overflow-hidden flex flex-col",children:[i==="workspace"&&s.jsx(jx,{project:h,onSendMessage:gt,onSendMessageBackground:Je,backgroundBusy:Te,recentTasks:$,onExecuteTask:Et,onSummarizeSession:Rt,onPlanReview:Le,refreshToken:z,onProcessingChange:pe}),i==="hierarchy"&&s.jsx(Vx,{stages:B,activities:G,agents:L,backgroundBusy:Te,onOpenWorkspace:_=>{A(_),c("agent-workspaces")}}),i==="agent-workspaces"&&s.jsx(Qx,{initialAgentId:ze,pendingQuestions:ue,onAnswerQuestion:Wt,permissionRequests:be,onResolvePermission:k}),i==="dashboard"&&s.jsx(Nx,{projects:b,tasks:$,agents:L,approvals:Z,ollamaStatus:Y,onNavigate:c}),i==="tasks"&&s.jsx(kx,{tasks:$,archivedTasks:$e,onExecuteTask:Et,onArchiveTask:Sn,onUnarchiveTask:kr,onDeleteTask:Gs,onCancelTask:Ss,onRetryTask:Cn,onCreateTask:Cs,onApproveProposedTask:zt,onReviewAgainTask:ss,onSelectTask:_=>he(_.id)}),i==="prompt-studio"&&s.jsx(Cx,{prompts:M,onApprovePrompt:_s,onRejectPrompt:Hl}),i==="monitor"&&s.jsx(Ex,{events:ne,onClear:()=>ae([])}),i==="agents"&&s.jsx(Tx,{agents:L,onUpdateAgentModel:Wl}),i==="skills"&&s.jsx(Px,{skills:Q}),i==="tech-stack"&&s.jsx(Mx,{project:h,onUpdateProject:_=>{j(_),g(b.map(J=>J.id===_.id?_:J))}}),i==="models"&&s.jsx(Ix,{status:Y,settings:X,onSetActiveModel:Sr,onPullModel:En,onSaveSettings:Qs,onModelsChanged:()=>O.getModels().then(oe).catch(()=>{})}),i==="git"&&s.jsx(Rx,{project:h,tasks:$,onTriggerIntegration:Tn}),i==="approvals"&&s.jsx(zx,{approvals:Z,onResolveApproval:_n}),i==="permissions"&&s.jsx(Dx,{requests:be,audit:Ne,onResolve:k,onRefresh:S}),i==="promotion"&&s.jsx(Fx,{project:h,onGeneratePromotion:Pn}),i==="settings"&&s.jsx(Ux,{settings:X,onSaveSettings:Qs})]}),Es&&s.jsx(Sx,{task:Es,agentIds:L.map(_=>_.id),allTasks:$,pendingQuestions:ue.filter(_=>_.taskId===Es.id),onAnswerQuestion:Wt,permissionRequests:be.filter(_=>_.taskId===Es.id&&_.status==="pending"),onResolvePermission:k,onClose:()=>he(null),onSave:Mn,onApprove:_=>Bt(()=>zt(_)).catch(()=>{}),onExecute:_=>Bt(()=>Et(_)).catch(()=>{}),onCancel:_=>Bt(()=>Ss(_)).catch(()=>{}),onRetry:_=>Bt(()=>Cn(_)).catch(()=>{}),onArchive:_=>Bt(()=>Sn(_)).catch(()=>{}),onDelete:_=>Bt(()=>Gs(_)).then(()=>he(null)).catch(()=>{})})]})]})};ip.createRoot(document.getElementById("root")).render(s.jsx(Gd.StrictMode,{children:s.jsx(rf,{})}));
|