apteva 0.4.17 → 0.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActivityPage.9a1qg4bp.js +3 -0
- package/dist/ApiDocsPage.rfpf7ws1.js +4 -0
- package/dist/App.1nmg2h01.js +4 -0
- package/dist/App.5qw2dtxs.js +4 -0
- package/dist/App.6nc5acvk.js +4 -0
- package/dist/App.7vzbaz56.js +4 -0
- package/dist/App.8rfz30p1.js +4 -0
- package/dist/App.amwp54wf.js +4 -0
- package/dist/App.e4202qb4.js +267 -0
- package/dist/App.errxz2q4.js +4 -0
- package/dist/App.f8qsyhpr.js +4 -0
- package/dist/App.g8vq68n0.js +20 -0
- package/dist/App.kfyrnznw.js +13 -0
- package/dist/{App.mq6jqare.js → App.p02f4ret.js} +1 -1
- package/dist/App.p93mmyqw.js +4 -0
- package/dist/App.qmg33p02.js +4 -0
- package/dist/App.sdsc0258.js +4 -0
- package/dist/ConnectionsPage.7zqba1r0.js +3 -0
- package/dist/McpPage.kf2g327t.js +3 -0
- package/dist/SettingsPage.472c15ep.js +3 -0
- package/dist/SkillsPage.xdxnh68a.js +3 -0
- package/dist/TasksPage.7g0b8xwc.js +3 -0
- package/dist/TelemetryPage.pr7rbz4r.js +3 -0
- package/dist/TestsPage.zhc6rqjm.js +3 -0
- package/dist/apteva-kit.css +1 -1
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -4
- package/src/auth/middleware.ts +2 -0
- package/src/channels/index.ts +40 -0
- package/src/channels/telegram.ts +306 -0
- package/src/db.ts +342 -11
- package/src/integrations/agentdojo.ts +1 -1
- package/src/mcp-handler.ts +31 -24
- package/src/mcp-platform.ts +41 -1
- package/src/providers.ts +22 -9
- package/src/routes/api/agent-utils.ts +38 -2
- package/src/routes/api/agents.ts +65 -2
- package/src/routes/api/channels.ts +182 -0
- package/src/routes/api/integrations.ts +13 -5
- package/src/routes/api/mcp.ts +27 -9
- package/src/routes/api/projects.ts +19 -2
- package/src/routes/api/system.ts +26 -12
- package/src/routes/api/telemetry.ts +30 -0
- package/src/routes/api/triggers.ts +478 -0
- package/src/routes/api/webhooks.ts +171 -0
- package/src/routes/api.ts +7 -1
- package/src/routes/static.ts +12 -3
- package/src/server.ts +43 -6
- package/src/triggers/agentdojo.ts +253 -0
- package/src/triggers/composio.ts +264 -0
- package/src/triggers/index.ts +71 -0
- package/src/tui/AgentList.tsx +145 -0
- package/src/tui/App.tsx +102 -0
- package/src/tui/Login.tsx +104 -0
- package/src/tui/api.ts +72 -0
- package/src/tui/index.tsx +7 -0
- package/src/web/App.tsx +18 -11
- package/src/web/components/agents/AgentCard.tsx +14 -7
- package/src/web/components/agents/AgentPanel.tsx +94 -137
- package/src/web/components/common/Icons.tsx +16 -0
- package/src/web/components/common/index.ts +1 -0
- package/src/web/components/connections/ConnectionsPage.tsx +54 -0
- package/src/web/components/connections/IntegrationsTab.tsx +144 -0
- package/src/web/components/connections/OverviewTab.tsx +137 -0
- package/src/web/components/connections/TriggersTab.tsx +1169 -0
- package/src/web/components/index.ts +1 -0
- package/src/web/components/layout/Header.tsx +196 -4
- package/src/web/components/layout/Sidebar.tsx +7 -1
- package/src/web/components/mcp/IntegrationsPanel.tsx +19 -3
- package/src/web/components/settings/SettingsPage.tsx +364 -2
- package/src/web/components/tasks/TasksPage.tsx +2 -2
- package/src/web/components/tests/TestsPage.tsx +1 -2
- package/src/web/context/TelemetryContext.tsx +14 -1
- package/src/web/context/index.ts +1 -1
- package/src/web/hooks/useAgents.ts +15 -11
- package/src/web/types.ts +1 -1
- package/dist/App.fq4xbpcz.js +0 -228
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{P}from"./App.7vzbaz56.js";import{Q as N,T as Qq,U as c,W as o,aa as E,da as u}from"./App.g8vq68n0.js";var K=N(Qq(),1);var z=N(c(),1);function i(W){let H=W.category==="LLM",X=W.category==="TOOL",M=W.level==="error",$=W.data?.input_tokens||0,Z=W.data?.output_tokens||0;return{llm_calls:H?1:0,tool_calls:X?1:0,errors:M?1:0,input_tokens:$,output_tokens:Z}}function _q(){let{events:W,statusChangeCounter:H}=o(),{currentProjectId:X,currentProject:M}=u(),{authFetch:$}=E(),[Z,l]=K.useState(null),[C,v]=K.useState([]),[I,d]=K.useState([]),[r,h]=K.useState(!0),[Y,p]=K.useState({level:"",agent_id:""}),[k,n]=K.useState(new Set(["DATABASE"])),[R,a]=K.useState([]),[S,s]=K.useState(null),T=K.useRef(new Set),[t,m]=K.useState(new Set),f=K.useRef(new Set);K.useEffect(()=>{(async()=>{try{let G=await(await $("/api/agents")).json();a(G.agents||[])}catch(B){console.error("Failed to fetch agents:",B)}})()},[$]);let w=K.useMemo(()=>{if(X===null)return R;if(X==="unassigned")return R.filter((q)=>!q.projectId);return R.filter((q)=>q.projectId===X)},[R,X]),V=K.useMemo(()=>new Set(w.map((q)=>q.id)),[w]),g=async()=>{h(!0);try{let q=X==="unassigned"?"null":X||"",B=new URLSearchParams;if(q)B.set("project_id",q);let Q=await(await $(`/api/telemetry/stats${B.toString()?`?${B}`:""}`)).json();l(Q.stats);let J=new URLSearchParams;if(Y.level)J.set("level",Y.level);if(Y.agent_id)J.set("agent_id",Y.agent_id);if(q)J.set("project_id",q);J.set("limit","100");let O=(await(await $(`/api/telemetry/events?${J}`)).json()).events||[];v(O),T.current=new Set(O.map((Kq)=>Kq.id));let b=new URLSearchParams;if(b.set("group_by","agent"),q)b.set("project_id",q);let Jq=await(await $(`/api/telemetry/usage?${b}`)).json();d(Jq.usage||[])}catch(q){console.error("Failed to fetch telemetry:",q)}h(!1)};K.useEffect(()=>{g()},[Y,X,$,H]);let U=K.useMemo(()=>{if(!Z)return null;let q=0,B=0,G=0,Q=0,J=0,A=0;for(let y of W)if(!T.current.has(y.id)){q++;let O=i(y);B+=O.llm_calls,G+=O.tool_calls,Q+=O.errors,J+=O.input_tokens,A+=O.output_tokens}return{total_events:Z.total_events+q,total_llm_calls:Z.total_llm_calls+B,total_tool_calls:Z.total_tool_calls+G,total_errors:Z.total_errors+Q,total_input_tokens:Z.total_input_tokens+J,total_output_tokens:Z.total_output_tokens+A}},[Z,W]),D=K.useMemo(()=>{let q=new Map;for(let B of I)q.set(B.agent_id,{...B});for(let B of W)if(!T.current.has(B.id)){let G=i(B),Q=q.get(B.agent_id);if(Q)Q.llm_calls+=G.llm_calls,Q.tool_calls+=G.tool_calls,Q.errors+=G.errors,Q.input_tokens+=G.input_tokens,Q.output_tokens+=G.output_tokens;else q.set(B.agent_id,{agent_id:B.agent_id,llm_calls:G.llm_calls,tool_calls:G.tool_calls,errors:G.errors,input_tokens:G.input_tokens,output_tokens:G.output_tokens})}return Array.from(q.values())},[I,W]),F=K.default.useMemo(()=>{let q=W;if(X!==null)q=q.filter((J)=>V.has(J.agent_id));if(Y.agent_id)q=q.filter((J)=>J.agent_id===Y.agent_id);if(k.size>0)q=q.filter((J)=>!k.has(J.category));if(Y.level)q=q.filter((J)=>J.level===Y.level);let B=C;if(k.size>0)B=B.filter((J)=>!k.has(J.category));let G=new Set(q.map((J)=>J.id)),Q=[...q];for(let J of B)if(!G.has(J.id))Q.push(J),G.add(J.id);return Q.sort((J,A)=>new Date(A.timestamp).getTime()-new Date(J.timestamp).getTime()),Q.slice(0,100)},[W,C,Y,k,X,V]);K.useEffect(()=>{let q=[];for(let B of W)if(!f.current.has(B.id))f.current.add(B.id),q.push(B.id);if(q.length>0)m((B)=>{let G=new Set(B);return q.forEach((Q)=>G.add(Q)),G}),setTimeout(()=>{m((B)=>{let G=new Set(B);return q.forEach((Q)=>G.delete(Q)),G})},5000)},[W]);let x=(q)=>{return R.find((G)=>G.id===q)?.name||q},_=(q)=>{if(q>=1e6)return(q/1e6).toFixed(1)+"M";if(q>=1000)return(q/1000).toFixed(1)+"K";return q.toString()},e={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},j={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},qq=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],zq=(q)=>{n((B)=>{let G=new Set(B);if(G.has(q))G.delete(q);else G.add(q);return G})},Bq=[{value:"",label:"All Agents"},...w.map((q)=>({value:q.id,label:q.name}))],Gq=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return z.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:z.jsxDEV("div",{children:[z.jsxDEV("div",{className:"mb-6",children:[z.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[M&&z.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:M.color}},void 0,!1,void 0,this),z.jsxDEV("h1",{className:"text-2xl font-semibold",children:X===null?"Telemetry":X==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${M?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U&&z.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[z.jsxDEV(L,{label:"Events",value:_(U.total_events)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"LLM Calls",value:_(U.total_llm_calls)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Tool Calls",value:_(U.total_tool_calls)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Errors",value:_(U.total_errors),color:"red"},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Input Tokens",value:_(U.total_input_tokens)},void 0,!1,void 0,this),z.jsxDEV(L,{label:"Output Tokens",value:_(U.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),D.length>0&&z.jsxDEV("div",{className:"mb-6",children:[z.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:z.jsxDEV("table",{className:"w-full text-sm",children:[z.jsxDEV("thead",{children:z.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[z.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),z.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("tbody",{children:D.map((q)=>z.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[z.jsxDEV("td",{className:"p-3 font-medium",children:x(q.agent_id)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.llm_calls)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.tool_calls)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.input_tokens)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:_(q.output_tokens)},void 0,!1,void 0,this),z.jsxDEV("td",{className:"p-3 text-right",children:q.errors>0?z.jsxDEV("span",{className:"text-red-400",children:q.errors},void 0,!1,void 0,this):z.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},q.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[z.jsxDEV("div",{className:"w-44",children:z.jsxDEV(P,{value:Y.agent_id,options:Bq,onChange:(q)=>p({...Y,agent_id:q}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:qq.map((q)=>{let B=k.has(q),G=j[q]||"bg-[#222] text-[#888] border-[#333]";return z.jsxDEV("button",{onClick:()=>zq(q),className:`px-2 py-0.5 rounded text-xs border transition-all ${B?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":G}`,children:q},q,!1,void 0,this)})},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("div",{className:"w-36",children:z.jsxDEV(P,{value:Y.level,options:Gq,onChange:(q)=>p({...Y,level:q}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:g,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[z.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[z.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),W.length>0&&z.jsxDEV("span",{className:"text-xs text-[#666]",children:[W.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r&&F.length===0?z.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):F.length===0?z.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):z.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:F.map((q)=>{let B=t.has(q.id);return z.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${B?"bg-green-500/5":""}`,style:{animation:B?"slideIn 0.3s ease-out":void 0},onClick:()=>s(S===q.id?null:q.id),children:z.jsxDEV("div",{className:"flex items-start gap-3",children:[z.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${j[q.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:q.category},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("span",{className:"font-medium text-sm",children:q.type},void 0,!1,void 0,this),z.jsxDEV("span",{className:`text-xs ${e[q.level]||"text-[#666]"}`,children:q.level},void 0,!1,void 0,this),q.duration_ms&&z.jsxDEV("span",{className:"text-xs text-[#555]",children:[q.duration_ms,"ms"]},void 0,!0,void 0,this),z.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${B?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[x(q.agent_id)," · ",new Date(q.timestamp).toLocaleString()]},void 0,!0,void 0,this),q.error&&z.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:q.error},void 0,!1,void 0,this),S===q.id&&q.data&&Object.keys(q.data).length>0&&z.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(q.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},q.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function L({label:W,value:H,color:X}){return z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[z.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:W},void 0,!1,void 0,this),z.jsxDEV("div",{className:`text-2xl font-semibold ${X==="red"?"text-red-400":""}`,children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}
|
|
2
|
+
export{_q as O};
|
|
3
|
+
|
|
4
|
+
//# debugId=228D7A9E65268BAC64756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{F as S,G as f,H as h,k as g,p as T}from"./App.sdsc0258.js";import{Q as M,T as u,U as I,X as C,aa as b,da as v}from"./App.g8vq68n0.js";var Y=M(u(),1);var q=M(I(),1);function j({onSelectAgent:z}){let{authFetch:Q}=b(),{currentProjectId:Z}=v(),[X,$]=Y.useState([]),[P,J]=Y.useState(!0),[U,G]=Y.useState("all"),[H,K]=Y.useState(null),[_,F]=Y.useState(!1),W=Y.useRef(null),{events:w}=C({category:"TASK"}),A=Y.useCallback(async()=>{try{let B=`/api/tasks?status=${U}`;if(Z!==null)B+=`&project_id=${encodeURIComponent(Z)}`;let R=await(await Q(B)).json();$(R.tasks||[])}catch(B){console.error("Failed to fetch tasks:",B)}finally{J(!1)}},[Q,U,Z]);Y.useEffect(()=>{A()},[A]),Y.useEffect(()=>{if(!w.length)return;let B=w[0];if(!B||B.id===W.current)return;let N=B.type;if(N==="task_created"||N==="task_updated"||N==="task_deleted")W.current=B.id,console.log("[TasksPage] Telemetry event:",N),A()},[w,A]);let p=Y.useCallback(async(B)=>{K(B),F(!0);try{let N=await Q(`/api/tasks/${B.agentId}/${B.id}`);if(console.log("[TasksPage] Fetch task response status:",N.status),N.ok){let R=await N.json();if(console.log("[TasksPage] Task data:",R),console.log("[TasksPage] Has trajectory:",!!R.task?.trajectory,"Length:",R.task?.trajectory?.length),R.task)K({...R.task,agentId:B.agentId,agentName:B.agentName})}else console.error("[TasksPage] Failed to fetch task:",N.status,await N.text())}catch(N){console.error("Failed to fetch task details:",N)}finally{F(!1)}},[Q]),O={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return q.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[q.jsxDEV("div",{className:`flex-1 p-4 md:p-6 overflow-auto ${H?"hidden md:block md:w-1/2 lg:w-2/3":""}`,children:q.jsxDEV("div",{className:"max-w-4xl",children:[q.jsxDEV("div",{className:"mb-6",children:[q.jsxDEV("div",{className:"mb-4",children:[q.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-1",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((B)=>q.jsxDEV("button",{onClick:()=>G(B.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${U===B.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:B.label},B.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P?q.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):X.length===0?q.jsxDEV("div",{className:"text-center py-12",children:[q.jsxDEV(T,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("div",{className:"space-y-3",children:X.map((B)=>q.jsxDEV("div",{onClick:()=>p(B),className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${H?.id===B.id&&H?.agentId===B.agentId?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[q.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[q.jsxDEV("div",{className:"flex-1",children:[q.jsxDEV("h3",{className:"font-medium",children:B.title},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[#666]",children:B.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${O[B.status]||O.pending}`,children:B.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B.description&&q.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:B.description},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[q.jsxDEV("span",{className:"flex items-center gap-1",children:[B.type==="recurring"?q.jsxDEV(S,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this):B.execute_at?q.jsxDEV(f,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this):q.jsxDEV(h,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this),B.type==="recurring"&&B.recurrence?m(B.recurrence):B.type]},void 0,!0,void 0,this),q.jsxDEV("span",{children:["Priority: ",B.priority]},void 0,!0,void 0,this),B.next_run&&q.jsxDEV("span",{className:"text-[#f97316]",children:L(B.next_run)},void 0,!1,void 0,this),!B.next_run&&B.execute_at&&q.jsxDEV("span",{className:"text-[#f97316]",children:L(B.execute_at)},void 0,!1,void 0,this),q.jsxDEV("span",{children:["Created: ",new Date(B.created_at).toLocaleDateString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${B.agentId}-${B.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H&&q.jsxDEV(l,{task:H,statusColors:O,onClose:()=>K(null),onSelectAgent:z,loading:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function l({task:z,statusColors:Q,onClose:Z,onSelectAgent:X,loading:$}){return q.jsxDEV("div",{className:"w-full md:w-1/2 lg:w-1/3 border-l border-[#1a1a1a] bg-[#0a0a0a] flex flex-col overflow-hidden",children:[q.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-[#1a1a1a]",children:[q.jsxDEV("h2",{className:"font-medium truncate pr-2",children:"Task Details"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:Z,className:"text-[#666] hover:text-[#e0e0e0] transition",children:q.jsxDEV(g,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[q.jsxDEV("h3",{className:"text-lg font-medium",children:z.title},void 0,!1,void 0,this),q.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium flex-shrink-0 ${Q[z.status]}`,children:z.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("button",{onClick:()=>X?.(z.agentId),className:"text-sm text-[#f97316] hover:underline",children:z.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.description&&q.jsxDEV("div",{children:[q.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-1",children:"Description"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[#888] whitespace-pre-wrap",children:z.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[q.jsxDEV("div",{children:[q.jsxDEV("span",{className:"text-[#666]",children:"Type"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"capitalize",children:z.type},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("span",{className:"text-[#666]",children:"Priority"},void 0,!1,void 0,this),q.jsxDEV("p",{children:z.priority},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("span",{className:"text-[#666]",children:"Source"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"capitalize",children:z.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.recurrence&&q.jsxDEV("div",{children:[q.jsxDEV("span",{className:"text-[#666]",children:"Recurrence"},void 0,!1,void 0,this),q.jsxDEV("p",{children:m(z.recurrence)},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[#444] mt-0.5 font-mono",children:z.recurrence},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"space-y-2 text-sm",children:[q.jsxDEV("div",{className:"flex justify-between",children:[q.jsxDEV("span",{className:"text-[#666]",children:"Created"},void 0,!1,void 0,this),q.jsxDEV("span",{children:new Date(z.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.execute_at&&q.jsxDEV("div",{className:"flex justify-between",children:[q.jsxDEV("span",{className:"text-[#666]",children:"Scheduled"},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-[#f97316]",children:L(z.execute_at)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.executed_at&&q.jsxDEV("div",{className:"flex justify-between",children:[q.jsxDEV("span",{className:"text-[#666]",children:"Started"},void 0,!1,void 0,this),q.jsxDEV("span",{children:new Date(z.executed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.completed_at&&q.jsxDEV("div",{className:"flex justify-between",children:[q.jsxDEV("span",{className:"text-[#666]",children:"Completed"},void 0,!1,void 0,this),q.jsxDEV("span",{children:new Date(z.completed_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.next_run&&q.jsxDEV("div",{className:"flex justify-between",children:[q.jsxDEV("span",{className:"text-[#666]",children:"Next Run"},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-[#f97316]",children:L(z.next_run)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.status==="failed"&&z.error&&q.jsxDEV("div",{className:"min-w-0",children:[q.jsxDEV("h4",{className:"text-xs text-red-400 uppercase tracking-wider mb-1",children:"Error"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/20 rounded p-3 overflow-x-auto",children:q.jsxDEV("pre",{className:"text-sm text-red-400 whitespace-pre-wrap break-words",children:z.error},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.status==="completed"&&z.result&&q.jsxDEV("div",{className:"min-w-0",children:[q.jsxDEV("h4",{className:"text-xs text-green-400 uppercase tracking-wider mb-1",children:"Result"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/20 rounded p-3 overflow-x-auto",children:q.jsxDEV("pre",{className:"text-sm text-green-400 whitespace-pre-wrap break-words",children:typeof z.result==="string"?z.result:JSON.stringify(z.result,null,2)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$&&!z.trajectory&&q.jsxDEV("div",{children:[q.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:"Trajectory"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[#555]",children:"Loading trajectory..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.trajectory&&z.trajectory.length>0&&q.jsxDEV("div",{children:[q.jsxDEV("h4",{className:"text-xs text-[#666] uppercase tracking-wider mb-2",children:["Trajectory (",z.trajectory.length," steps)"]},void 0,!0,void 0,this),q.jsxDEV(c,{trajectory:z.trajectory},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function c({trajectory:z}){let[Q,Z]=Y.useState(new Set),X=(J)=>{Z((U)=>{let G=new Set(U);if(G.has(J))G.delete(J);else G.add(J);return G})},$={user:{bg:"bg-blue-500/10",text:"text-blue-400",icon:"\uD83D\uDC64",label:"User"},assistant:{bg:"bg-purple-500/10",text:"text-purple-400",icon:"\uD83E\uDD16",label:"Assistant"}},P=(J)=>{let U=J.content;if(typeof U==="string"){let G=U.length>200,H=Q.has(J.id);return q.jsxDEV("div",{children:[q.jsxDEV("p",{className:`text-sm text-[#ccc] whitespace-pre-wrap break-words ${!H&&G?"line-clamp-4":""}`,children:U},void 0,!1,void 0,this),G&&q.jsxDEV("button",{onClick:()=>X(J.id),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:H?"Show less":"Show more..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return q.jsxDEV("div",{className:"space-y-2",children:U.map((G,H)=>{if(G.type==="tool_use"){let K=JSON.stringify(G.input,null,2),_=K.length>150,F=`${J.id}-${H}`,W=Q.has(F);return q.jsxDEV("div",{className:"bg-orange-500/10 border border-orange-500/20 rounded p-2",children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[q.jsxDEV("span",{className:"text-orange-400",children:"\uD83D\uDD27"},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-xs font-medium text-orange-400",children:"Tool Call"},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-xs text-[#888]",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto ${!W&&_?"line-clamp-3":""}`,children:K},void 0,!1,void 0,this),_&&q.jsxDEV("button",{onClick:()=>X(F),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:W?"Show less":"Show more..."},void 0,!1,void 0,this)]},H,!0,void 0,this)}if(G.type==="tool_result"){let K=G.is_error,_=`${J.id}-${H}`,F=Q.has(_),W=G.content.length>150;return q.jsxDEV("div",{className:`${K?"bg-red-500/10 border-red-500/20":"bg-teal-500/10 border-teal-500/20"} border rounded p-2`,children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[q.jsxDEV("span",{children:K?"❌":"\uD83D\uDCCB"},void 0,!1,void 0,this),q.jsxDEV("span",{className:`text-xs font-medium ${K?"text-red-400":"text-teal-400"}`,children:"Tool Result"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("pre",{className:`text-xs text-[#888] overflow-x-auto whitespace-pre-wrap break-words ${!F&&W?"line-clamp-3":""}`,children:G.content},void 0,!1,void 0,this),W&&q.jsxDEV("button",{onClick:()=>X(_),className:"text-xs text-[#666] hover:text-[#888] mt-1",children:F?"Show less":"Show more..."},void 0,!1,void 0,this)]},H,!0,void 0,this)}return null})},void 0,!1,void 0,this)};return q.jsxDEV("div",{className:"space-y-2",children:z.map((J)=>{let U=$[J.role]||$.assistant;return q.jsxDEV("div",{className:`${U.bg} border border-[#1a1a1a] rounded overflow-hidden p-3`,children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-2",children:[q.jsxDEV("span",{children:U.icon},void 0,!1,void 0,this),q.jsxDEV("span",{className:`text-xs font-medium ${U.text}`,children:U.label},void 0,!1,void 0,this),J.model&&q.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",J.model]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[#555]",children:["· ",new Date(J.created_at).toLocaleTimeString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),P(J)]},J.id,!0,void 0,this)})},void 0,!1,void 0,this)}var y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function m(z){try{let Q=z.trim().split(/\s+/);if(Q.length!==5)return z;let[Z,X,$,P,J]=Q;if(Z.startsWith("*/")&&X==="*"&&$==="*"&&P==="*"&&J==="*"){let G=parseInt(Z.slice(2));if(G===1)return"Every minute";return`Every ${G} minutes`}if(Z!=="*"&&!Z.includes("/")&&X==="*"&&$==="*"&&P==="*"&&J==="*")return"Every hour";if(X.startsWith("*/")&&$==="*"&&P==="*"&&J==="*"){let G=parseInt(X.slice(2));if(G===1)return"Every hour";return`Every ${G} hours`}let U=(G,H)=>{let K=parseInt(G),_=parseInt(H);if(isNaN(K))return"";let F=K>=12?"PM":"AM";return`${K===0?12:K>12?K-12:K}:${_.toString().padStart(2,"0")} ${F}`};if(X!=="*"&&!X.includes("/")&&$==="*"&&P==="*"){let G=U(X,Z);if(J==="*")return`Daily at ${G}`;let H=J.split(",").map((K)=>{let _=parseInt(K.trim());return y[_]||K});if(H.length===7)return`Daily at ${G}`;if(H.length===5&&!H.includes("Sat")&&!H.includes("Sun"))return`Weekdays at ${G}`;if(H.length===1)return`Weekly on ${H[0]} at ${G}`;return`${H.join(" & ")} at ${G}`}return z}catch{return z}}function L(z){let Q=new Date(z),Z=new Date,X=Q.getTime()-Z.getTime(),$=Math.abs(X),P=X>0,J=Math.floor($/60000),U=Math.floor($/3600000),G=Math.floor($/86400000),H=Q.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),K=Q.toDateString()===Z.toDateString(),_=new Date(Z);_.setDate(_.getDate()+1);let F=Q.toDateString()===_.toDateString(),W=new Date(Z);W.setDate(W.getDate()-1);let w=Q.toDateString()===W.toDateString();if(K){if(J<1)return P?"now":"just now";if(J<60)return P?`in ${J} min (${H})`:`${J} min ago`;return P?`in ${U}h (${H})`:`${U}h ago`}if(F)return`Tomorrow at ${H}`;if(w)return`Yesterday at ${H}`;if(G<7)return`${y[Q.getDay()]} at ${H}`;return Q.toLocaleDateString([],{month:"short",day:"numeric"})+` at ${H}`}
|
|
2
|
+
export{j as e,m as f,L as g};
|
|
3
|
+
|
|
4
|
+
//# debugId=70495ECA00A83B0164756E2164756E21
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var rW=Object.create;var{getPrototypeOf:aW,defineProperty:mW,getOwnPropertyNames:tW}=Object;var eW=Object.prototype.hasOwnProperty;var l=(G,q,J)=>{J=G!=null?rW(aW(G)):{};let R=q||!G||!G.__esModule?mW(J,"default",{value:G,enumerable:!0}):J;for(let k of tW(G))if(!eW.call(R,k))mW(R,k,{get:()=>G[k],enumerable:!0});return R};var fW=(G,q)=>()=>(q||G((q={exports:{}}).exports,q),q.exports);var DZ=((G)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(G,{get:(q,J)=>(typeof require<"u"?require:q)[J]}):G)(function(G){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+G+'" is not supported')});var UW=fW((WZ,RW)=>{(function(){function G(W,Z){Object.defineProperty(R.prototype,W,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Z[0],Z[1])}})}function q(W){if(W===null||typeof W!=="object")return null;return W=NW&&W[NW]||W["@@iterator"],typeof W==="function"?W:null}function J(W,Z){W=(W=W.constructor)&&(W.displayName||W.name)||"ReactClass";var X=W+"."+Z;PW[X]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Z,W),PW[X]=!0)}function R(W,Z,X){this.props=W,this.context=Z,this.refs=FW,this.updater=X||xW}function k(){}function S(W,Z,X){this.props=W,this.context=Z,this.refs=FW,this.updater=X||xW}function I(){}function j(W){return""+W}function g(W){try{j(W);var Z=!1}catch(Y){Z=!0}if(Z){Z=console;var X=Z.error,B=typeof Symbol==="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return X.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),j(W)}}function h(W){if(W==null)return null;if(typeof W==="function")return W.$$typeof===iW?null:W.displayName||W.name||null;if(typeof W==="string")return W;switch(W){case GW:return"Fragment";case U:return"Profiler";case M:return"StrictMode";case HW:return"Suspense";case A:return"SuspenseList";case DW:return"Activity"}if(typeof W==="object")switch(typeof W.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case OW:return"Portal";case m:return W.displayName||"Context";case N:return(W._context.displayName||"Context")+".Consumer";case o:var Z=W.render;return W=W.displayName,W||(W=Z.displayName||Z.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case c:return Z=W.displayName||null,Z!==null?Z:h(W.type)||"Memo";case n:Z=W._payload,W=W._init;try{return h(W(Z))}catch(X){}}return null}function i(W){if(W===GW)return"<>";if(typeof W==="object"&&W!==null&&W.$$typeof===n)return"<...>";try{var Z=h(W);return Z?"<"+Z+">":"<...>"}catch(X){return"<...>"}}function f(){var W=O.A;return W===null?null:W.getOwner()}function y(){return Error("react-stack-top-frame")}function s(W){if(LW.call(W,"key")){var Z=Object.getOwnPropertyDescriptor(W,"key").get;if(Z&&Z.isReactWarning)return!1}return W.key!==void 0}function _(W,Z){function X(){jW||(jW=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Z))}X.isReactWarning=!0,Object.defineProperty(W,"key",{get:X,configurable:!0})}function x(){var W=h(this.type);return vW[W]||(vW[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function E(W,Z,X,B,Y,D){var $=X.ref;return W={$$typeof:QW,type:W,key:Z,props:X,_owner:B},($!==void 0?$:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:x}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function d(W,Z){return Z=E(W.type,Z,W.props,W._owner,W._debugStack,W._debugTask),W._store&&(Z._store.validated=W._store.validated),Z}function b(W){T(W)?W._store&&(W._store.validated=1):typeof W==="object"&&W!==null&&W.$$typeof===n&&(W._payload.status==="fulfilled"?T(W._payload.value)&&W._payload.value._store&&(W._payload.value._store.validated=1):W._store&&(W._store.validated=1))}function T(W){return typeof W==="object"&&W!==null&&W.$$typeof===QW}function u(W){var Z={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(X){return Z[X]})}function v(W,Z){return typeof W==="object"&&W!==null&&W.key!=null?(g(W.key),u(""+W.key)):Z.toString(36)}function H(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status==="string"?W.then(I,I):(W.status="pending",W.then(function(Z){W.status==="pending"&&(W.status="fulfilled",W.value=Z)},function(Z){W.status==="pending"&&(W.status="rejected",W.reason=Z)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function Q(W,Z,X,B,Y){var D=typeof W;if(D==="undefined"||D==="boolean")W=null;var $=!1;if(W===null)$=!0;else switch(D){case"bigint":case"string":case"number":$=!0;break;case"object":switch(W.$$typeof){case QW:case OW:$=!0;break;case n:return $=W._init,Q($(W._payload),Z,X,B,Y)}}if($){$=W,Y=Y($);var F=B===""?"."+v($,0):B;return AW(Y)?(X="",F!=null&&(X=F.replace(SW,"$&/")+"/"),Q(Y,Z,X,"",function(r){return r})):Y!=null&&(T(Y)&&(Y.key!=null&&($&&$.key===Y.key||g(Y.key)),X=d(Y,X+(Y.key==null||$&&$.key===Y.key?"":(""+Y.key).replace(SW,"$&/")+"/")+F),B!==""&&$!=null&&T($)&&$.key==null&&$._store&&!$._store.validated&&(X._store.validated=2),Y=X),Z.push(Y)),1}if($=0,F=B===""?".":B+":",AW(W))for(var L=0;L<W.length;L++)B=W[L],D=F+v(B,L),$+=Q(B,Z,X,D,Y);else if(L=q(W),typeof L==="function")for(L===W.entries&&(CW||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),CW=!0),W=L.call(W),L=0;!(B=W.next()).done;)B=B.value,D=F+v(B,L++),$+=Q(B,Z,X,D,Y);else if(D==="object"){if(typeof W.then==="function")return Q(H(W),Z,X,B,Y);throw Z=String(W),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return $}function z(W,Z,X){if(W==null)return W;var B=[],Y=0;return Q(W,B,"","",function(D){return Z.call(X,D,Y++)}),B}function w(W){if(W._status===-1){var Z=W._ioInfo;Z!=null&&(Z.start=Z.end=performance.now()),Z=W._result;var X=Z();if(X.then(function(Y){if(W._status===0||W._status===-1){W._status=1,W._result=Y;var D=W._ioInfo;D!=null&&(D.end=performance.now()),X.status===void 0&&(X.status="fulfilled",X.value=Y)}},function(Y){if(W._status===0||W._status===-1){W._status=2,W._result=Y;var D=W._ioInfo;D!=null&&(D.end=performance.now()),X.status===void 0&&(X.status="rejected",X.reason=Y)}}),Z=W._ioInfo,Z!=null){Z.value=X;var B=X.displayName;typeof B==="string"&&(Z.name=B)}W._status===-1&&(W._status=0,W._result=X)}if(W._status===1)return Z=W._result,Z===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,Z),"default"in Z||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,Z),Z.default;throw W._result}function K(){var W=O.H;return W===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),W}function a(){O.asyncTransitions--}function t(W){if(JW===null)try{var Z=("require"+Math.random()).slice(0,7);JW=(RW&&RW[Z]).call(RW,"timers").setImmediate}catch(X){JW=function(B){kW===!1&&(kW=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Y=new MessageChannel;Y.port1.onmessage=B,Y.port2.postMessage(void 0)}}return JW(W)}function e(W){return 1<W.length&&typeof AggregateError==="function"?AggregateError(W):W[0]}function WW(W,Z){Z!==qW-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),qW=Z}function XW(W,Z,X){var B=O.actQueue;if(B!==null)if(B.length!==0)try{BW(B),t(function(){return XW(W,Z,X)});return}catch(Y){O.thrownErrors.push(Y)}else O.actQueue=null;0<O.thrownErrors.length?(B=e(O.thrownErrors),O.thrownErrors.length=0,X(B)):Z(W)}function BW(W){if(!VW){VW=!0;var Z=0;try{for(;Z<W.length;Z++){var X=W[Z];do{O.didUsePromise=!1;var B=X(!1);if(B!==null){if(O.didUsePromise){W[Z]=X,W.splice(0,Z);return}X=B}else break}while(1)}W.length=0}catch(Y){W.splice(0,Z+1),O.thrownErrors.push(Y)}finally{VW=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var QW=Symbol.for("react.transitional.element"),OW=Symbol.for("react.portal"),GW=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),m=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),HW=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),n=Symbol.for("react.lazy"),DW=Symbol.for("react.activity"),NW=Symbol.iterator,PW={},xW={isMounted:function(){return!1},enqueueForceUpdate:function(W){J(W,"forceUpdate")},enqueueReplaceState:function(W){J(W,"replaceState")},enqueueSetState:function(W){J(W,"setState")}},_W=Object.assign,FW={};Object.freeze(FW),R.prototype.isReactComponent={},R.prototype.setState=function(W,Z){if(typeof W!=="object"&&typeof W!=="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,Z,"setState")},R.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};var p={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for($W in p)p.hasOwnProperty($W)&&G($W,p[$W]);k.prototype=R.prototype,p=S.prototype=new k,p.constructor=S,_W(p,R.prototype),p.isPureReactComponent=!0;var AW=Array.isArray,iW=Symbol.for("react.client.reference"),O={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},LW=Object.prototype.hasOwnProperty,IW=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(W){return W()}};var jW,TW,vW={},oW=p.react_stack_bottom_frame.bind(p,y)(),cW=IW(i(y)),CW=!1,SW=/\/+/g,gW=typeof reportError==="function"?reportError:function(W){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W==="object"&&W!==null&&typeof W.message==="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(Z))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",W);return}console.error(W)},kW=!1,JW=null,qW=0,wW=!1,VW=!1,bW=typeof queueMicrotask==="function"?function(W){queueMicrotask(function(){return queueMicrotask(W)})}:t;p=Object.freeze({__proto__:null,c:function(W){return K().useMemoCache(W)}});var $W={map:z,forEach:function(W,Z,X){z(W,function(){Z.apply(this,arguments)},X)},count:function(W){var Z=0;return z(W,function(){Z++}),Z},toArray:function(W){return z(W,function(Z){return Z})||[]},only:function(W){if(!T(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};WZ.Activity=DW,WZ.Children=$W,WZ.Component=R,WZ.Fragment=GW,WZ.Profiler=U,WZ.PureComponent=S,WZ.StrictMode=M,WZ.Suspense=HW,WZ.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,WZ.__COMPILER_RUNTIME=p,WZ.act=function(W){var Z=O.actQueue,X=qW;qW++;var B=O.actQueue=Z!==null?Z:[],Y=!1;try{var D=W()}catch(L){O.thrownErrors.push(L)}if(0<O.thrownErrors.length)throw WW(Z,X),W=e(O.thrownErrors),O.thrownErrors.length=0,W;if(D!==null&&typeof D==="object"&&typeof D.then==="function"){var $=D;return bW(function(){Y||wW||(wW=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(L,r){Y=!0,$.then(function(YW){if(WW(Z,X),X===0){try{BW(B),t(function(){return XW(YW,L,r)})}catch(nW){O.thrownErrors.push(nW)}if(0<O.thrownErrors.length){var lW=e(O.thrownErrors);O.thrownErrors.length=0,r(lW)}}else L(YW)},function(YW){WW(Z,X),0<O.thrownErrors.length?(YW=e(O.thrownErrors),O.thrownErrors.length=0,r(YW)):r(YW)})}}}var F=D;if(WW(Z,X),X===0&&(BW(B),B.length!==0&&bW(function(){Y||wW||(wW=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),O.actQueue=null),0<O.thrownErrors.length)throw W=e(O.thrownErrors),O.thrownErrors.length=0,W;return{then:function(L,r){Y=!0,X===0?(O.actQueue=B,t(function(){return XW(F,L,r)})):L(F)}}},WZ.cache=function(W){return function(){return W.apply(null,arguments)}},WZ.cacheSignal=function(){return null},WZ.captureOwnerStack=function(){var W=O.getCurrentStack;return W===null?null:W()},WZ.cloneElement=function(W,Z,X){if(W===null||W===void 0)throw Error("The argument must be a React element, but you passed "+W+".");var B=_W({},W.props),Y=W.key,D=W._owner;if(Z!=null){var $;W:{if(LW.call(Z,"ref")&&($=Object.getOwnPropertyDescriptor(Z,"ref").get)&&$.isReactWarning){$=!1;break W}$=Z.ref!==void 0}$&&(D=f()),s(Z)&&(g(Z.key),Y=""+Z.key);for(F in Z)!LW.call(Z,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&Z.ref===void 0||(B[F]=Z[F])}var F=arguments.length-2;if(F===1)B.children=X;else if(1<F){$=Array(F);for(var L=0;L<F;L++)$[L]=arguments[L+2];B.children=$}B=E(W.type,Y,B,D,W._debugStack,W._debugTask);for(Y=2;Y<arguments.length;Y++)b(arguments[Y]);return B},WZ.createContext=function(W){return W={$$typeof:m,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:N,_context:W},W._currentRenderer=null,W._currentRenderer2=null,W},WZ.createElement=function(W,Z,X){for(var B=2;B<arguments.length;B++)b(arguments[B]);B={};var Y=null;if(Z!=null)for(L in TW||!("__self"in Z)||"key"in Z||(TW=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),s(Z)&&(g(Z.key),Y=""+Z.key),Z)LW.call(Z,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(B[L]=Z[L]);var D=arguments.length-2;if(D===1)B.children=X;else if(1<D){for(var $=Array(D),F=0;F<D;F++)$[F]=arguments[F+2];Object.freeze&&Object.freeze($),B.children=$}if(W&&W.defaultProps)for(L in D=W.defaultProps,D)B[L]===void 0&&(B[L]=D[L]);Y&&_(B,typeof W==="function"?W.displayName||W.name||"Unknown":W);var L=1e4>O.recentlyCreatedOwnerStacks++;return E(W,Y,B,f(),L?Error("react-stack-top-frame"):oW,L?IW(i(W)):cW)},WZ.createRef=function(){var W={current:null};return Object.seal(W),W},WZ.forwardRef=function(W){W!=null&&W.$$typeof===c?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof W!=="function"?console.error("forwardRef requires a render function but was given %s.",W===null?"null":typeof W):W.length!==0&&W.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",W.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),W!=null&&W.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Z={$$typeof:o,render:W},X;return Object.defineProperty(Z,"displayName",{enumerable:!1,configurable:!0,get:function(){return X},set:function(B){X=B,W.name||W.displayName||(Object.defineProperty(W,"name",{value:B}),W.displayName=B)}}),Z},WZ.isValidElement=T,WZ.lazy=function(W){W={_status:-1,_result:W};var Z={$$typeof:n,_payload:W,_init:w},X={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return W._ioInfo=X,Z._debugInfo=[{awaited:X}],Z},WZ.memo=function(W,Z){W==null&&console.error("memo: The first argument must be a component. Instead received: %s",W===null?"null":typeof W),Z={$$typeof:c,type:W,compare:Z===void 0?null:Z};var X;return Object.defineProperty(Z,"displayName",{enumerable:!1,configurable:!0,get:function(){return X},set:function(B){X=B,W.name||W.displayName||(Object.defineProperty(W,"name",{value:B}),W.displayName=B)}}),Z},WZ.startTransition=function(W){var Z=O.T,X={};X._updatedFibers=new Set,O.T=X;try{var B=W(),Y=O.S;Y!==null&&Y(X,B),typeof B==="object"&&B!==null&&typeof B.then==="function"&&(O.asyncTransitions++,B.then(a,a),B.then(I,gW))}catch(D){gW(D)}finally{Z===null&&X._updatedFibers&&(W=X._updatedFibers.size,X._updatedFibers.clear(),10<W&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Z!==null&&X.types!==null&&(Z.types!==null&&Z.types!==X.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),Z.types=X.types),O.T=Z}},WZ.unstable_useCacheRefresh=function(){return K().useCacheRefresh()},WZ.use=function(W){return K().use(W)},WZ.useActionState=function(W,Z,X){return K().useActionState(W,Z,X)},WZ.useCallback=function(W,Z){return K().useCallback(W,Z)},WZ.useContext=function(W){var Z=K();return W.$$typeof===N&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),Z.useContext(W)},WZ.useDebugValue=function(W,Z){return K().useDebugValue(W,Z)},WZ.useDeferredValue=function(W,Z){return K().useDeferredValue(W,Z)},WZ.useEffect=function(W,Z){return W==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useEffect(W,Z)},WZ.useEffectEvent=function(W){return K().useEffectEvent(W)},WZ.useId=function(){return K().useId()},WZ.useImperativeHandle=function(W,Z,X){return K().useImperativeHandle(W,Z,X)},WZ.useInsertionEffect=function(W,Z){return W==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useInsertionEffect(W,Z)},WZ.useLayoutEffect=function(W,Z){return W==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useLayoutEffect(W,Z)},WZ.useMemo=function(W,Z){return K().useMemo(W,Z)},WZ.useOptimistic=function(W,Z){return K().useOptimistic(W,Z)},WZ.useReducer=function(W,Z,X){return K().useReducer(W,Z,X)},WZ.useRef=function(W){return K().useRef(W)},WZ.useState=function(W){return K().useState(W)},WZ.useSyncExternalStore=function(W,Z,X){return K().useSyncExternalStore(W,Z,X)},WZ.useTransition=function(){return K().useTransition()},WZ.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var MW=fW((ZZ)=>{var ZW=l(UW());(function(){function G(M){if(M==null)return null;if(typeof M==="function")return M.$$typeof===K?null:M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case x:return"Fragment";case d:return"Profiler";case E:return"StrictMode";case v:return"Suspense";case H:return"SuspenseList";case w:return"Activity"}if(typeof M==="object")switch(typeof M.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case _:return"Portal";case T:return M.displayName||"Context";case b:return(M._context.displayName||"Context")+".Consumer";case u:var U=M.render;return M=M.displayName,M||(M=U.displayName||U.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case Q:return U=M.displayName||null,U!==null?U:G(M.type)||"Memo";case z:U=M._payload,M=M._init;try{return G(M(U))}catch(N){}}return null}function q(M){return""+M}function J(M){try{q(M);var U=!1}catch(o){U=!0}if(U){U=console;var N=U.error,m=typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return N.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",m),q(M)}}function R(M){if(M===x)return"<>";if(typeof M==="object"&&M!==null&&M.$$typeof===z)return"<...>";try{var U=G(M);return U?"<"+U+">":"<...>"}catch(N){return"<...>"}}function k(){var M=a.A;return M===null?null:M.getOwner()}function S(){return Error("react-stack-top-frame")}function I(M){if(t.call(M,"key")){var U=Object.getOwnPropertyDescriptor(M,"key").get;if(U&&U.isReactWarning)return!1}return M.key!==void 0}function j(M,U){function N(){XW||(XW=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}N.isReactWarning=!0,Object.defineProperty(M,"key",{get:N,configurable:!0})}function g(){var M=G(this.type);return BW[M]||(BW[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function h(M,U,N,m,o,HW){var A=N.ref;return M={$$typeof:s,type:M,key:U,props:N,_owner:m},(A!==void 0?A:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:g}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:HW}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function i(M,U,N,m,o,HW){var A=U.children;if(A!==void 0)if(m)if(e(A)){for(m=0;m<A.length;m++)f(A[m]);Object.freeze&&Object.freeze(A)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(A);if(t.call(U,"key")){A=G(M);var c=Object.keys(U).filter(function(DW){return DW!=="key"});m=0<c.length?"{key: someKey, "+c.join(": ..., ")+": ...}":"{key: someKey}",GW[A+m]||(c=0<c.length?"{"+c.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
14
|
+
let props = %s;
|
|
15
|
+
<%s {...props} />
|
|
16
|
+
React keys must be passed directly to JSX without using spread:
|
|
17
|
+
let props = %s;
|
|
18
|
+
<%s key={someKey} {...props} />`,m,A,c,A),GW[A+m]=!0)}if(A=null,N!==void 0&&(J(N),A=""+N),I(U)&&(J(U.key),A=""+U.key),"key"in U){N={};for(var n in U)n!=="key"&&(N[n]=U[n])}else N=U;return A&&j(N,typeof M==="function"?M.displayName||M.name||"Unknown":M),h(M,A,N,k(),o,HW)}function f(M){y(M)?M._store&&(M._store.validated=1):typeof M==="object"&&M!==null&&M.$$typeof===z&&(M._payload.status==="fulfilled"?y(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function y(M){return typeof M==="object"&&M!==null&&M.$$typeof===s}var s=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),T=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),K=Symbol.for("react.client.reference"),a=ZW.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,t=Object.prototype.hasOwnProperty,e=Array.isArray,WW=console.createTask?console.createTask:function(){return null};ZW={react_stack_bottom_frame:function(M){return M()}};var XW,BW={},QW=ZW.react_stack_bottom_frame.bind(ZW,S)(),OW=WW(R(S)),GW={};ZZ.Fragment=x,ZZ.jsxDEV=function(M,U,N,m){var o=1e4>a.recentlyCreatedOwnerStacks++;return i(M,U,N,m,o?Error("react-stack-top-frame"):QW,o?WW(R(M)):OW)}})()});var P=l(UW(),1),yW=l(MW(),1),hW=P.createContext(null),MZ=200;function XZ({children:G}){let[q,J]=P.useState(!1),[R,k]=P.useState([]),[S,I]=P.useState({}),[j,g]=P.useState({}),[h,i]=P.useState(0),[f,y]=P.useState(0),[s,_]=P.useState(0),x=P.useRef(null),E=P.useRef(null);P.useEffect(()=>{let T=setInterval(()=>{let u=Date.now();g((v)=>{let H={};for(let[Q,z]of Object.entries(v))if(z.expiresAt>u)H[Q]=z;return H})},500);return()=>clearInterval(T)},[]);let d=P.useCallback(()=>{if(x.current)x.current.close(),x.current=null;try{let T=new EventSource("/api/telemetry/stream");x.current=T,T.onopen=()=>{J(!0)},T.onmessage=(u)=>{if(!u.data||u.data.trim()==="")return;try{let v=JSON.parse(u.data);if(v.connected){J(!0);return}if(Array.isArray(v)){if(k((H)=>{return[...v,...H].slice(0,MZ)}),I((H)=>{let Q={...H};for(let z of v){let w=Q[z.agent_id];if(!w||new Date(z.timestamp)>new Date(w.timestamp))Q[z.agent_id]={timestamp:z.timestamp,category:z.category,type:z.type}}return Q}),g((H)=>{let Q={...H},z=Date.now()+3000;for(let w of v)Q[w.agent_id]={type:w.type,expiresAt:z};return Q}),v.some((H)=>H.category==="system"&&(H.type==="agent_started"||H.type==="agent_stopped")))i((H)=>H+1);if(v.some((H)=>H.category==="TASK"&&(H.type==="task_created"||H.type==="task_updated"||H.type==="task_deleted")))y((H)=>H+1);if(v.some((H)=>H.level==="error"||H.category==="ERROR"||H.category==="system"&&H.type==="agent_stopped"))_((H)=>H+1)}}catch{}},T.onerror=()=>{if(J(!1),T.close(),x.current=null,E.current)clearTimeout(E.current);E.current=setTimeout(d,2000)}}catch{if(J(!1),E.current)clearTimeout(E.current);E.current=setTimeout(d,2000)}},[]);P.useEffect(()=>{return d(),()=>{if(x.current)x.current.close();if(E.current)clearTimeout(E.current)}},[d]);let b=P.useCallback(()=>{k([])},[]);return yW.jsxDEV(hW.Provider,{value:{connected:q,events:R,lastActivityByAgent:S,activeAgents:j,statusChangeCounter:h,taskChangeCounter:f,notificationCounter:s,clearEvents:b},children:G},void 0,!1,void 0,this)}function zW(){let G=P.useContext(hW);if(!G)throw Error("useTelemetryContext must be used within TelemetryProvider");return G}function BZ(G){let{connected:q,events:J,lastActivityByAgent:R}=zW(),k=P.default.useMemo(()=>{let j=J;if(G?.agent_id)j=j.filter((g)=>g.agent_id===G.agent_id);if(G?.category)j=j.filter((g)=>g.category===G.category);if(G?.limit)j=j.slice(0,G.limit);return j},[J,G?.agent_id,G?.category,G?.limit]),S=G?.agent_id?R[G.agent_id]:void 0,I=P.default.useMemo(()=>{if(!S)return!1;let j=new Date(S.timestamp).getTime();return Date.now()-j<1e4},[S]);return{connected:q,events:k,lastActivity:S,isActive:I}}function GZ(G){let{activeAgents:q}=zW(),J=q[G];return{isActive:!!J,type:J?.type}}function HZ(){let{statusChangeCounter:G}=zW();return G}function YZ(){let{taskChangeCounter:G}=zW();return G}function zZ(){let{notificationCounter:G}=zW();return G}var V=l(UW(),1),sW=l(MW(),1),uW=V.createContext(null);function KW(){let G=V.useContext(uW);if(!G)throw Error("useAuth must be used within an AuthProvider");return G}function QZ({children:G}){let[q,J]=V.useState(null),[R,k]=V.useState(null),[S,I]=V.useState(!0),[j,g]=V.useState(null),[h,i]=V.useState(!1),f=V.useRef(null),y=V.useRef(!1),s=V.useRef(!1),_=V.useCallback((H)=>{f.current=H,k(H)},[]),x=V.useCallback(async()=>{if(y.current)return!1;y.current=!0;try{let H=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!H.ok)return!1;let Q=await H.json();_(Q.accessToken);let z=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${Q.accessToken}`}});if(z.ok){let w=await z.json();return J(w.user),!0}return!1}catch(H){return console.error("Token refresh failed:",H),!1}finally{y.current=!1}},[_]),E=V.useCallback(async()=>{try{let H=f.current,z=await(await fetch("/api/auth/check",{headers:H?{Authorization:`Bearer ${H}`}:{}})).json();if(g(z.hasUsers),i(z.isDev??!1),z.authenticated&&z.user)J(z.user);else if(J(null),z.hasUsers){if(!await x())_(null)}}catch(H){console.error("Auth check failed:",H),J(null),_(null)}finally{I(!1)}},[x,_]),d=V.useCallback(async(H,Q)=>{try{let z=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:H,password:Q})}),w=await z.json();if(!z.ok)return{success:!1,error:w.error||"Login failed"};return _(w.accessToken),J(w.user),g(!0),{success:!0}}catch(z){return console.error("Login failed:",z),{success:!1,error:"Login failed"}}},[_]),b=V.useCallback(async()=>{try{let H=f.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:H?{Authorization:`Bearer ${H}`}:{}})}catch(H){console.error("Logout failed:",H)}finally{J(null),_(null)}},[_]),T=V.useCallback(async(H,Q={})=>{let z=new Headers(Q.headers),w=f.current;if(w)z.set("Authorization",`Bearer ${w}`);return fetch(H,{...Q,headers:z})},[]),u=V.useCallback(async()=>{return x()},[x]);V.useEffect(()=>{if(s.current)return;s.current=!0,E()},[E]),V.useEffect(()=>{if(!R)return;let H=setInterval(()=>{x()},840000);return()=>clearInterval(H)},[R,x]);let v={user:q,isAuthenticated:!!q,isLoading:S,hasUsers:j,isDev:h,accessToken:R,login:d,logout:b,refreshToken:u,checkAuth:E,authFetch:T};return sW.jsxDEV(uW.Provider,{value:v,children:G},void 0,!1,void 0,this)}function $Z(){let{accessToken:G}=KW();return G?{Authorization:`Bearer ${G}`}:{}}var C=l(UW(),1);var pW=l(MW(),1),dW=C.createContext(null);function UZ(){let G=C.useContext(dW);if(!G)throw Error("useProjects must be used within a ProjectProvider");return G}var EW="apteva_current_project";function OZ({children:G}){let{authFetch:q,isAuthenticated:J,isLoading:R}=KW(),[k,S]=C.useState([]),[I,j]=C.useState(()=>{if(typeof window<"u")return localStorage.getItem(EW);return null}),[g,h]=C.useState(!0),[i,f]=C.useState(null),[y,s]=C.useState(0),[_,x]=C.useState(!1);C.useEffect(()=>{fetch("/api/features").then((Q)=>Q.json()).then((Q)=>{x(Q.projects===!0)}).catch(()=>{x(!1)})},[]);let E=C.useCallback((Q)=>{if(j(Q),typeof window<"u")if(Q===null)localStorage.removeItem(EW);else localStorage.setItem(EW,Q)},[]),d=k.find((Q)=>Q.id===I)||null,b=C.useCallback(async()=>{if(!_){S([]),h(!1);return}if(!J&&!R){S([]),h(!1);return}try{f(null);let Q=await q("/api/projects");if(!Q.ok)throw Error("Failed to fetch projects");let z=await Q.json();if(S(z.projects||[]),s(z.unassignedCount||0),I&&I!=="unassigned"&&!z.projects.find((w)=>w.id===I))E(null)}catch(Q){console.error("Failed to fetch projects:",Q),f("Failed to load projects")}finally{h(!1)}},[q,J,R,I,E,_]),T=C.useCallback(async(Q)=>{try{let z=await q("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!z.ok){let K=await z.json();throw Error(K.error||"Failed to create project")}let w=await z.json();return await b(),w.project}catch(z){return console.error("Failed to create project:",z),null}},[q,b]),u=C.useCallback(async(Q,z)=>{try{let w=await q(`/api/projects/${Q}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)});if(!w.ok){let a=await w.json();throw Error(a.error||"Failed to update project")}let K=await w.json();return await b(),K.project}catch(w){return console.error("Failed to update project:",w),null}},[q,b]),v=C.useCallback(async(Q)=>{try{let z=await q(`/api/projects/${Q}`,{method:"DELETE"});if(!z.ok){let w=await z.json();throw Error(w.error||"Failed to delete project")}if(I===Q)E(null);return await b(),!0}catch(z){return console.error("Failed to delete project:",z),!1}},[q,I,E,b]);C.useEffect(()=>{if(!R&&_)b()},[R,_,b]);let H={projects:k,currentProjectId:I,currentProject:d,isLoading:g,error:i,unassignedCount:y,projectsEnabled:_,setCurrentProjectId:E,createProject:T,updateProject:u,deleteProject:v,refreshProjects:b};return pW.jsxDEV(dW.Provider,{value:H,children:G},void 0,!1,void 0,this)}export{l as Q,fW as R,DZ as S,UW as T,MW as U,XZ as V,zW as W,BZ as X,GZ as Y,HZ as Z,YZ as _,zZ as $,KW as aa,QZ as ba,$Z as ca,UZ as da,OZ as ea};
|
|
19
|
+
|
|
20
|
+
//# debugId=F6D782D86F5E81FE64756E2164756E21
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{M as Oz,N as Wz}from"./App.p93mmyqw.js";import{P as j}from"./App.7vzbaz56.js";import{Q as n,T as Qz,U as zz,aa as Jz,da as Kz}from"./App.g8vq68n0.js";var W=n(Qz(),1);var z=n(zz(),1);function Rz(){let{authFetch:K}=Jz(),{projects:Z,currentProjectId:Y}=Kz(),[B,N]=W.useState([]),[y,M]=W.useState(!0),[X,U]=W.useState("installed"),[G,Q]=W.useState(!1),[C,H]=W.useState(!1),[v,T]=W.useState(null),{confirm:f,ConfirmDialog:w}=Oz(),{alert:P,AlertDialog:d}=Wz(),_=Z.length>0,[m,p]=W.useState(""),[h,Xz]=W.useState([]),[c,r]=W.useState(!1),[Yz,o]=W.useState(null),[a,i]=W.useState(""),[R,t]=W.useState([]),[I,u]=W.useState(!1),[V,b]=W.useState(null),[q,l]=W.useState(null),[e,S]=W.useState(null),[x,Zz]=W.useState(Y&&Y!=="unassigned"?Y:null),D=B.filter((J)=>{if(!Y)return!0;if(Y==="unassigned")return J.project_id===null;return J.project_id===null||J.project_id===Y}),F=async()=>{try{let O=await(await K("/api/skills")).json();N(O.skills||[])}catch(J){console.error("Failed to fetch skills:",J)}M(!1)},E=async(J)=>{r(!0);try{let O=J!==void 0?J:m,$=O?`/api/skills/marketplace/search?q=${encodeURIComponent(O)}`:"/api/skills/marketplace/featured",A=await(await K($)).json();Xz(A.skills||[])}catch(O){console.error("Failed to search marketplace:",O)}r(!1)};W.useEffect(()=>{F()},[K]),W.useEffect(()=>{if(X==="marketplace"&&h.length===0)E("")},[X]);let _z=async(J)=>{try{await K(`/api/skills/${J}/toggle`,{method:"POST"}),F()}catch(O){console.error("Failed to toggle skill:",O)}},$z=async(J)=>{if(!await f("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await K(`/api/skills/${J}`,{method:"DELETE"}),v?.id===J)T(null);F()}catch($){console.error("Failed to delete skill:",$)}},Bz=async(J)=>{o(J.id);try{let O=await K(`/api/skills/marketplace/${J.id}/install`,{method:"POST"}),$=await O.json();if(O.ok)await P(`Installed "${J.name}" successfully!`,{title:"Skill Installed"}),F(),U("installed");else await P($.error||"Failed to install skill",{title:"Installation Failed"})}catch(O){console.error("Failed to install skill:",O),await P("Failed to install skill",{title:"Error"})}o(null)},g=(J)=>B.some((O)=>O.name===J),s=async(J)=>{let O=J||a;if(!O.trim())return;let $="",L="";if(O.includes("github.com")){let A=O.match(/github\.com\/([^/]+)\/([^/]+)/);if(A)$=A[1],L=A[2].replace(/\.git$/,"")}else if(O.includes("/")){let A=O.split("/");$=A[0],L=A[1]}if(!$||!L){b("Invalid repo format. Use 'owner/repo' or GitHub URL");return}u(!0),b(null),t([]),l(null);try{let A=await K(`/api/skills/github/${$}/${L}`),k=await A.json();if(!A.ok){b(k.error||"Failed to fetch repository"),u(!1);return}t(k.skills||[]),l(k.repo||null)}catch(A){b("Failed to fetch repository")}u(!1)},Nz=async(J)=>{if(!q)return;S(J.name);try{let O=await K("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:q.owner,repo:q.repo,skillName:J.name,downloadUrl:J.downloadUrl,projectId:x})}),$=await O.json();if(O.ok)await P(`Installed "${J.name}" successfully!`,{title:"Skill Installed"}),F();else await P($.error||"Failed to install skill",{title:"Installation Failed",variant:"error"})}catch(O){await P("Failed to install skill",{title:"Error",variant:"error"})}S(null)},Uz=async()=>{if(!q||R.length===0)return;let J=R.filter((L)=>!g(L.name));if(J.length===0){await P("All skills are already installed",{title:"Info"});return}if(!await f(`Install ${J.length} skill(s) from ${q.owner}/${q.repo}?`,{confirmText:"Install All",title:"Install Skills"}))return;let $=0;for(let L of J){S(L.name);try{if((await K("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:q.owner,repo:q.repo,skillName:L.name,downloadUrl:L.downloadUrl,projectId:x})})).ok)$++}catch(A){}}S(null),F(),await P(`Installed ${$} of ${J.length} skills`,{title:"Installation Complete"})};return z.jsxDEV(z.Fragment,{children:[w,d,z.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:z.jsxDEV("div",{className:"max-w-6xl",children:[z.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[z.jsxDEV("div",{children:[z.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-[#666]",children:"Manage agent skills - instructions that teach agents how to perform tasks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="installed"&&z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("button",{onClick:()=>H(!0),className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:"Import"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>Q(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[z.jsxDEV("button",{onClick:()=>U("installed"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="installed"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:["Installed (",D.length,")"]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:()=>U("github"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="github"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse GitHub"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>U("marketplace"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="marketplace"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="installed"&&z.jsxDEV(z.Fragment,{children:y?z.jsxDEV("div",{className:"text-[#666]",children:"Loading skills..."},void 0,!1,void 0,this):B.length===0?z.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[z.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>U("marketplace"),className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Browse Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):D.length===0?z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-6 text-center",children:z.jsxDEV("p",{className:"text-[#666]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:D.map((J)=>{let O=_&&J.project_id?Z.find(($)=>$.id===J.project_id):null;return z.jsxDEV(Hz,{skill:J,project:O,onToggle:()=>_z(J.id),onDelete:()=>$z(J.id),onView:()=>T(J)},J.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),X==="github"&&z.jsxDEV("div",{className:"space-y-6",children:[z.jsxDEV("form",{onSubmit:(J)=>{J.preventDefault(),s()},className:"flex gap-2",children:[z.jsxDEV("input",{type:"text",value:a,onChange:(J)=>i(J.target.value),placeholder:"Enter GitHub repo (e.g., WordPress/agent-skills)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),z.jsxDEV("button",{type:"submit",disabled:I,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:I?"...":"Browse"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_&&R.length>0&&z.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] border border-[#222] rounded-lg",children:[z.jsxDEV("span",{className:"text-sm text-[#666]",children:"Install to:"},void 0,!1,void 0,this),z.jsxDEV(j,{value:x||"",onChange:(J)=>Zz(J||null),options:[{value:"",label:"Global (all projects)"},...Z.map((J)=>({value:J.id,label:J.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V&&z.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:V},void 0,!1,void 0,this),q&&R.length>0&&z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex items-center gap-3",children:[z.jsxDEV("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline font-medium",children:[q.owner,"/",q.repo]},void 0,!0,void 0,this),z.jsxDEV("span",{className:"text-sm text-[#666]",children:[R.length," skill",R.length!==1?"s":""," found"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R.some((J)=>!g(J.name))&&z.jsxDEV("button",{onClick:Uz,disabled:!!e,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded transition disabled:opacity-50",children:"Install All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I&&z.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Fetching skills from repository..."},void 0,!1,void 0,this),!I&&!q&&!V&&z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[z.jsxDEV("div",{className:"text-4xl mb-4",children:"\uD83D\uDCE6"},void 0,!1,void 0,this),z.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"Browse Skills from GitHub"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"Enter a GitHub repository to browse and install skills. Skills are markdown files with instructions that teach agents how to perform specific tasks."},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap gap-2 justify-center",children:[{label:"WordPress Skills",repo:"WordPress/agent-skills"}].map(({label:J,repo:O})=>z.jsxDEV("button",{onClick:()=>{i(O),s(O)},className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition",children:J},O,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!I&&q&&R.length===0&&z.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No skills found in this repository. Skills should be in subdirectories with a SKILL.md file."},void 0,!1,void 0,this),R.length>0&&z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:R.map((J)=>{let O=g(J.name),$=e===J.name;return z.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 transition ${O?"border-green-500/30":"border-[#1a1a1a] hover:border-[#333]"}`,children:z.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("h3",{className:"font-medium truncate",children:J.name},void 0,!1,void 0,this),O&&z.jsxDEV("span",{className:"text-xs text-green-400",children:"✓ Installed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:J.description||"No description"},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[z.jsxDEV("span",{children:[(J.size/1024).toFixed(1),"KB"]},void 0,!0,void 0,this),z.jsxDEV("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400",children:"GitHub"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex-shrink-0",children:O?z.jsxDEV("span",{className:"text-xs text-[#555] px-3 py-1.5",children:"Added"},void 0,!1,void 0,this):z.jsxDEV("button",{onClick:()=>Nz(J),disabled:$,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:$?"Installing...":"Install"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.name,!1,void 0,this)})},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:z.jsxDEV("p",{children:["Skills are sourced from GitHub repositories. Each skill should be in its own directory with a"," ",z.jsxDEV("code",{className:"text-[#888] bg-[#0a0a0a] px-1 rounded",children:"SKILL.md"},void 0,!1,void 0,this)," file containing instructions."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="marketplace"&&z.jsxDEV(z.Fragment,{children:[z.jsxDEV("div",{className:"mb-6",children:z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("input",{type:"text",value:m,onChange:(J)=>p(J.target.value),onKeyDown:(J)=>J.key==="Enter"&&E(),placeholder:"Search skills...",className:"flex-1 bg-[#111] border border-[#1a1a1a] rounded px-4 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>E(),disabled:c,className:"bg-[#1a1a1a] hover:bg-[#222] text-white px-4 py-2 rounded font-medium transition border border-[#333]",children:c?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),c?z.jsxDEV("div",{className:"text-[#666]",children:"Loading..."},void 0,!1,void 0,this):h.length===0?z.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[z.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm mt-1",children:"Try a different search term"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:h.map((J)=>z.jsxDEV(qz,{skill:J,installed:g(J.name),installing:Yz===J.id,onInstall:()=>Bz(J)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),G&&z.jsxDEV(Az,{authFetch:K,onClose:()=>Q(!1),onCreated:()=>{Q(!1),F()},projects:_?Z:void 0,defaultProjectId:Y&&Y!=="unassigned"?Y:null},void 0,!1,void 0,this),C&&z.jsxDEV(yz,{authFetch:K,onClose:()=>H(!1),onImported:()=>{H(!1),F()}},void 0,!1,void 0,this),v&&z.jsxDEV(Mz,{skill:v,authFetch:K,onClose:()=>T(null),onUpdated:()=>{T(null),F()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Hz({skill:K,project:Z,onToggle:Y,onDelete:B,onView:N}){let y={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[K.source],M=()=>{if(Z)return z.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${Z.color}20`,color:Z.color},children:Z.name},void 0,!1,void 0,this);if(K.project_id===null)return z.jsxDEV("span",{className:"text-xs text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return z.jsxDEV("div",{className:`bg-[#111] rounded-lg p-5 border transition cursor-pointer ${K.enabled?"border-[#1a1a1a]":"border-[#1a1a1a] opacity-60"} hover:border-[#333]`,onClick:N,children:[z.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:K.name},void 0,!1,void 0,this),M()]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-xs text-[#666] flex items-center gap-2 mt-0.5",children:[z.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${K.source==="skillsmp"?"bg-purple-500/20 text-purple-400":K.source==="github"?"bg-blue-500/20 text-blue-400":"bg-[#222] text-[#888]"}`,children:y},void 0,!1,void 0,this),K.metadata?.version&&z.jsxDEV("span",{children:["v",K.metadata.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:(X)=>{X.stopPropagation(),Y()},className:`w-10 h-5 rounded-full transition-colors relative ${K.enabled?"bg-[#f97316]":"bg-[#333]"}`,children:z.jsxDEV("span",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${K.enabled?"left-5":"left-0.5"}`},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:K.description},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[K.allowed_tools.slice(0,2).map((X)=>z.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:X},X,!1,void 0,this)),K.allowed_tools.length>2&&z.jsxDEV("span",{className:"text-xs text-[#666]",children:["+",K.allowed_tools.length-2]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:(X)=>{X.stopPropagation(),B()},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qz({skill:K,installed:Z,installing:Y,onInstall:B}){return z.jsxDEV("div",{className:"bg-[#111] rounded-lg p-5 border border-[#1a1a1a] hover:border-[#333] transition",children:[z.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:K.name},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[#666] mt-0.5",children:["by ",K.author," · v",K.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-1 text-yellow-500 text-sm",children:["★ ",K.rating.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[#888] line-clamp-2 mb-4",children:K.description},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:K.tags.slice(0,3).map((N)=>z.jsxDEV("span",{className:"text-xs bg-[#222] px-2 py-0.5 rounded text-[#666]",children:N},N,!1,void 0,this))},void 0,!1,void 0,this),Z?z.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):z.jsxDEV("button",{onClick:B,disabled:Y,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded text-sm font-medium transition",children:Y?"Installing...":"Install"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"mt-3 text-xs text-[#555]",children:[K.downloads.toLocaleString()," downloads"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Az({authFetch:K,onClose:Z,onCreated:Y,projects:B,defaultProjectId:N}){let[y,M]=W.useState(""),[X,U]=W.useState(""),[G,Q]=W.useState(""),[C,H]=W.useState(N||null),[v,T]=W.useState(!1),[f,w]=W.useState(null),P=B&&B.length>0,d=async()=>{if(!y||!X||!G){w("All fields are required");return}T(!0),w(null);try{let _={name:y,description:X,content:G,source:"local"};if(C)_.project_id=C;let m=await K("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)}),p=await m.json();if(!m.ok){w(p.error||"Failed to create skill"),T(!1);return}Y()}catch(_){w("Failed to create skill"),T(!1)}};return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Z,children:z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(_)=>_.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:z.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-6 space-y-4",children:[f&&z.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:f},void 0,!1,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Name"},void 0,!1,void 0,this),z.jsxDEV("input",{type:"text",value:y,onChange:(_)=>M(_.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-skill-name",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Lowercase letters, numbers, and hyphens only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Description"},void 0,!1,void 0,this),z.jsxDEV("input",{type:"text",value:X,onChange:(_)=>U(_.target.value),placeholder:"What this skill does and when to use it...",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Scope"},void 0,!1,void 0,this),z.jsxDEV(j,{value:C||"",onChange:(_)=>H(_||null),options:[{value:"",label:"Global (all projects)"},...B.map((_)=>({value:_.id,label:_.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Global skills are available to all agents. Project-scoped skills are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[#888] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),z.jsxDEV("textarea",{value:G,onChange:(_)=>Q(_.target.value),placeholder:`# Skill Instructions
|
|
2
|
+
|
|
3
|
+
Write detailed instructions here...`,rows:12,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[z.jsxDEV("button",{onClick:Z,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:d,disabled:v,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:v?"Creating...":"Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function yz({authFetch:K,onClose:Z,onImported:Y}){let[B,N]=W.useState(""),[y,M]=W.useState(!1),[X,U]=W.useState(null);return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Z,children:z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(Q)=>Q.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a]",children:[z.jsxDEV("h2",{className:"text-xl font-semibold",children:"Import Skill"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Paste the contents of a SKILL.md file"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 space-y-4",children:[X&&z.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:X},void 0,!1,void 0,this),z.jsxDEV("textarea",{value:B,onChange:(Q)=>N(Q.target.value),placeholder:`---
|
|
4
|
+
name: skill-name
|
|
5
|
+
description: What this skill does...
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Instructions
|
|
9
|
+
|
|
10
|
+
Your skill instructions here...`,rows:16,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-end gap-3",children:[z.jsxDEV("button",{onClick:Z,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:async()=>{if(!B.trim()){U("Paste SKILL.md content");return}M(!0),U(null);try{let Q=await K("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:B})}),C=await Q.json();if(!Q.ok){U(C.error||"Failed to import skill"),M(!1);return}Y()}catch(Q){U("Failed to import skill"),M(!1)}},disabled:y,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:y?"Importing...":"Import Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Mz({skill:K,authFetch:Z,onClose:Y,onUpdated:B}){let[N,y]=W.useState(!1),[M,X]=W.useState(K.content),[U,G]=W.useState(!1),Q=async()=>{G(!0);try{await Z(`/api/skills/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:M})}),B()}catch(H){console.error("Failed to save:",H)}G(!1)},C=async()=>{try{let v=await(await Z(`/api/skills/${K.id}/export`)).text(),T=new Blob([v],{type:"text/markdown"}),f=URL.createObjectURL(T),w=document.createElement("a");w.href=f,w.download=`${K.name}-SKILL.md`,w.click(),URL.revokeObjectURL(f)}catch(H){console.error("Failed to export:",H)}};return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Y,children:z.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(H)=>H.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[#1a1a1a] flex items-center justify-between",children:[z.jsxDEV("div",{children:[z.jsxDEV("h2",{className:"text-xl font-semibold",children:K.name},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm text-[#666] mt-0.5",children:K.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("button",{onClick:C,className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:"Export"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>y(!N),className:"text-sm text-[#888] hover:text-white transition px-3 py-1 rounded border border-[#333]",children:N?"View":"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6",children:N?z.jsxDEV("textarea",{value:M,onChange:(H)=>X(H.target.value),rows:20,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] font-mono text-sm"},void 0,!1,void 0,this):z.jsxDEV("pre",{className:"bg-[#0a0a0a] border border-[#222] rounded p-4 font-mono text-sm overflow-auto max-h-[60vh] whitespace-pre-wrap",children:K.content},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[#1a1a1a] flex justify-between",children:[z.jsxDEV("div",{className:"text-xs text-[#555]",children:K.source!=="local"&&K.source_url&&z.jsxDEV("a",{href:K.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"View source →"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex gap-3",children:[z.jsxDEV("button",{onClick:Y,className:"px-4 py-2 text-[#888] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),N&&z.jsxDEV("button",{onClick:Q,disabled:U,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:U?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}
|
|
11
|
+
export{Rz as J};
|
|
12
|
+
|
|
13
|
+
//# debugId=8006A7378C06918C64756E2164756E21
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{@keyframes blink{0%,to{opacity:1}50%{opacity:0}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-slideUp{animation:.2s ease-out slideUp}.apteva-scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none}.apteva-scrollbar-hidden::-webkit-scrollbar{display:none}.apteva-md{white-space:pre-wrap!important;color:inherit!important;word-wrap:break-word!important;overflow-wrap:break-word!important;font-size:.875rem!important;line-height:1.625!important}.apteva-md-h2{all:unset!important;display:block!important;margin-top:.75rem!important;margin-bottom:.25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-h3{all:unset!important;display:block!important;margin-top:.5rem!important;margin-bottom:.125rem!important;font-size:1rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-ul{all:unset!important;list-style-type:disc!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-ol{all:unset!important;list-style-type:decimal!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-li{all:unset!important;display:list-item!important;margin-bottom:.25rem!important;padding-left:.25rem!important}.apteva-tool-call{all:unset!important;display:flex!important;background-color:#8080801a!important;border:1px solid #80808033!important;border-radius:.5rem!important;align-items: center!important;gap:.5rem!important;margin:.5rem 0!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-call-dot{all:unset!important;display:block!important;border-radius:50%!important;flex-shrink:0!important;width:.5rem!important;height:.5rem!important}.apteva-tool-call-dot-running{animation:1s infinite blink!important;background-color:#3b82f6!important}.apteva-tool-call-dot-completed{background-color:#22c55e!important}.apteva-tool-call-dot-error{background-color:#ef4444!important}.apteva-tool-call-name{all:unset!important;color:inherit!important;font-family:ui-monospace,monospace!important}.apteva-tool-call-status{all:unset!important;color:#808080cc!important;margin-left:auto!important}.apteva-tool-call-status-completed{color:#22c55e!important}.apteva-tool-call-status-error{color:#ef4444!important}.apteva-md-table-wrapper{overflow-x:auto!important;margin:.75rem 0!important}.apteva-md-table{border-collapse:collapse!important;width:100%!important;font-size:.8125rem!important;line-height:1.4!important}.apteva-md-th{text-align:left!important;white-space:nowrap!important;border-bottom:2px solid #8080804d!important;padding:.5rem .75rem!important;font-weight:600!important}.apteva-md-td{border-bottom:1px solid #80808026!important;padding:.5rem .75rem!important}.apteva-md-table tbody tr:hover{background-color:#8080800d!important}.apteva-md-table tbody tr:last-child .apteva-md-td{border-bottom:none!important}.apteva-md-img{display:block!important;border-radius:.5rem!important;max-width:100%!important;height:auto!important;margin:.5rem 0!important}.apteva-md-link{color:#3b82f6!important;text-underline-offset:2px!important;text-decoration:underline!important}.apteva-md-link:hover{color:#2563eb!important}.apteva-md-inline-code{background-color:#80808026!important;border-radius:.25rem!important;padding:.125rem .375rem!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace!important;font-size:.8125rem!important}.apteva-typing-indicator{display:inline-flex!important;align-items: center!important;gap:2px!important}.apteva-typing-indicator span{opacity:.4!important;animation:1.4s infinite both apteva-typing-blink!important;background-color:currentColor!important;border-radius:50%!important;width:6px!important;height:6px!important}.apteva-typing-indicator span:nth-child(2){animation-delay:.2s!important}.apteva-typing-indicator span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-typing-blink{0%,80%,to{opacity:.4}40%{opacity:1}}.apteva-chat-header{all:unset!important;box-sizing:border-box!important;display:flex!important;justify-content:space-between!important;align-items: center!important;padding:.75rem 1rem!important}.apteva-chat-title{all:unset!important;color:#111827!important;display:block!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.4!important}@media (prefers-color-scheme:dark){.apteva-chat-title{color:#fff!important}}.dark .apteva-chat-title{color:#fff!important}.apteva-chat-status{all:unset!important;display:block!important;margin-top:.125rem!important;font-size:.75rem!important;line-height:1.4!important}.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#737373!important}.apteva-chat-status-tool{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#525252!important}.apteva-chat-status-tool{color:#60a5fa!important}}.dark .apteva-chat-status-ready,.dark .apteva-chat-status-thinking{color:#525252!important}.dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-message-list{box-sizing:border-box!important;display:block!important;overflow-y:auto!important;flex:1!important;padding:1rem!important}.apteva-message-row-user{display:flex!important;justify-content:flex-end!important;margin-bottom:.75rem!important}.apteva-message-row-assistant{display:flex!important;justify-content:flex-start!important;margin-bottom:.75rem!important}.apteva-message-bubble{box-sizing:border-box!important;display:block!important;border-radius:1rem!important;max-width:95%!important;padding:.625rem 1rem!important;font-size:.875rem!important;line-height:1.5!important}.apteva-message-user{color:#fff!important;background-color:#2563eb!important;border-bottom-right-radius:.375rem!important}.apteva-message-assistant{color:#0a0a0a!important;background-color:#fafafa!important;border-bottom-left-radius:.375rem!important}@media (prefers-color-scheme:dark){.apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}}.dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-message-content-user,.apteva-message-content-assistant{display:block!important}.apteva-message-text{white-space:pre-wrap!important;color:inherit!important;display:block!important;font-size:.875rem!important;line-height:1.625!important}.apteva-message-widgets{display:block!important;margin-top:.5rem!important}.apteva-message-timestamp{display:block!important;margin-top:.375rem!important;font-size:.75rem!important}.apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-message-timestamp-assistant{color:#737373!important}.apteva-message-segmented{display:flex!important;flex-direction:column!important;gap:.5rem!important;width:95%!important;max-width:95%!important}.apteva-message-segmented .apteva-message-bubble{width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important}.apteva-tool-call-standalone,.apteva-widget-standalone{display:block!important}.apteva-widget{color:#171717!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important;font-size:.875rem!important;line-height:1.5!important}.apteva-widget *{box-sizing:border-box!important}.apteva-widget-skeleton{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.apteva-widget-skeleton *{box-sizing:border-box!important}.apteva-widget-skeleton [class*=bg-neutral-200]{background-color:#e5e5e5!important}.apteva-widget-skeleton [class*=bg-neutral-100]{background-color:#f5f5f5!important}.apteva-widget-skeleton [class*=bg-neutral-300]{background-color:#d4d4d4!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}}.dark .apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.dark .apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.dark .apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.dark .apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}.apteva-widget>div{background-color:#fff!important}.apteva-widget h3,.apteva-widget h4{color:#171717!important}.apteva-widget p,.apteva-widget span{color:#525252!important}.apteva-widget>div[class*=border]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget{color:#fafafa!important}.apteva-widget>div{background-color:#171717!important}.apteva-widget h3,.apteva-widget h4{color:#fafafa!important}.apteva-widget p,.apteva-widget span{color:#a3a3a3!important}.apteva-widget>div[class*=border]{border-color:#262626!important}}.dark .apteva-widget{color:#fafafa!important}.dark .apteva-widget>div{background-color:#171717!important}.dark .apteva-widget h3,.dark .apteva-widget h4{color:#fafafa!important}.dark .apteva-widget p,.dark .apteva-widget span{color:#a3a3a3!important}.dark .apteva-widget>div[class*=border]{border-color:#262626!important}@media (prefers-color-scheme:dark){.apteva-message-timestamp-assistant{color:#525252!important}}.dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-tool-card{box-sizing:border-box!important;display:flex!important;border-style:solid!important;border-width:1px!important;border-radius:.75rem!important;align-items: center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}@media (prefers-color-scheme:dark){.apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}}.dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-icon{flex-shrink:0!important;width:1rem!important;height:1rem!important}.apteva-tool-icon-spin{animation:1s linear infinite apteva-spin!important}.apteva-tool-spinner-track{opacity:.25!important}.apteva-tool-spinner-fill{opacity:.75!important}.apteva-tool-label{font-size:inherit!important}.apteva-tool-label strong{font-weight:600!important}@keyframes apteva-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}@media (prefers-color-scheme:dark){.apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}}.dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}@keyframes apteva-pulse-glow{0%,to{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 8px 2px #fbbf2480}}.apteva-tool-receiving{animation:.4s ease-in-out apteva-pulse-glow!important}.apteva-tool-status-text{opacity:.7!important;font-weight:400!important}.apteva-tool-char-count{opacity:.6!important;font-variant-numeric:tabular-nums!important;font-size:.85em!important;font-weight:400!important}.apteva-tool-dots{display:inline-flex!important;margin-left:1px!important}.apteva-tool-dots span{opacity:.3!important;animation:1.4s ease-in-out infinite apteva-dot-pulse!important}.apteva-tool-dots span:first-child{animation-delay:0s!important}.apteva-tool-dots span:nth-child(2){animation-delay:.2s!important}.apteva-tool-dots span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-dot-pulse{0%,60%,to{opacity:.3}30%{opacity:1}}.apteva-tool-stream-separator{opacity:.5!important}.apteva-tool-stream-output{opacity:.85!important;white-space:nowrap!important;text-overflow:ellipsis!important;vertical-align:bottom!important;display:inline-block!important;overflow:hidden!important;max-width:300px!important;font-weight:400!important}.apteva-composer{display:grid!important;position:relative!important;background-color:#fff!important;border:2px solid #d4d4d4!important;border-radius:1rem!important;gap:.5rem .75rem!important;padding:.5rem .75rem!important;transition:all .3s!important}.apteva-composer textarea{color:#171717!important;background-color:#0000!important}.apteva-composer textarea::placeholder{color:#a3a3a3!important}button.apteva-composer-menu-btn{background:0 0!important;border:none!important}.apteva-composer-menu{background-color:#262626!important}.apteva-composer-menu button{color:#fff!important;background-color:#0000!important}.apteva-composer-menu button:hover{background-color:#404040!important}.apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border:1px solid #d4d4d4!important}.apteva-composer-send-btn svg{stroke:currentColor!important}.apteva-composer-stop-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#dc2626!important;display:flex!important;background-color:#fef2f2!important;border:1px solid #f87171!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important;margin:0!important;padding:0!important;transition:background-color .15s!important}.apteva-composer-stop-btn:hover{background-color:#fee2e2!important}.apteva-composer-stop-btn svg{fill:currentColor!important;width:14px!important;height:14px!important}@media (prefers-color-scheme:dark){.apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-composer textarea{color:#fafafa!important}.apteva-composer textarea::placeholder{color:#525252!important}button.apteva-composer-menu-btn{background:0 0!important}.apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}}.dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.dark .apteva-composer textarea{color:#fafafa!important}.dark .apteva-composer textarea::placeholder{color:#525252!important}.dark button.apteva-composer-menu-btn{background:0 0!important}.dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}.apteva-composer-textarea{-ms-overflow-style:none!important;scrollbar-width:none!important}.apteva-composer-textarea::-webkit-scrollbar{display:none!important}.apteva-chat{background-color:#fff!important}.apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-message-list{background-color:#f5f5f5!important}@media (prefers-color-scheme:dark){.apteva-chat{background-color:#0a0a0a!important}.apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-message-list{background-color:#0a0a0a!important}}.dark .apteva-chat{background-color:#0a0a0a!important}.dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.dark .apteva-message-list{background-color:#0a0a0a!important}@keyframes apteva-slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes apteva-highlight-fade{0%{background-color:#3b82f626}to{background-color:#0000}}.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade!important}.apteva-table-row-new td{background-color:#3b82f61a!important}.apteva-list-streaming,.apteva-table-streaming{border-top:1px dashed #8080804d!important}@media (prefers-color-scheme:dark){.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.apteva-table-row-new td{background-color:#3b82f626!important}}.dark .apteva-list-item-new,.dark .apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.dark .apteva-table-row-new td{background-color:#3b82f626!important}@keyframes apteva-highlight-fade-dark{0%{background-color:#3b82f633}to{background-color:#0000}}.apteva-chat-minimal{background-color:#0000!important}.apteva-chat-minimal .apteva-chat-header{background-color:#0000!important;border:none!important}.apteva-chat-minimal .apteva-message-list{background-color:#0000!important}.apteva-chat-minimal .apteva-composer{background-color:#0000!important;border:1px solid #80808033!important}.apteva-chat-minimal .apteva-message-assistant{background-color:#80808014!important}.apteva-chat-minimal .apteva-message-user{color:inherit!important;background-color:#3b82f626!important}.apteva-chat-terminal{background-color:#0a0a0a!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace!important}.apteva-chat-terminal *{font-family:inherit!important}.apteva-chat-terminal .apteva-chat-header{background-color:#0a0a0a!important;border-color:#1a1a1a!important}.apteva-chat-terminal .apteva-chat-title{color:#e0e0e0!important;font-size:.875rem!important}.apteva-chat-terminal .apteva-chat-status{color:#666!important}.apteva-chat-terminal .apteva-chat-status-tool{color:#f97316!important}.apteva-chat-terminal .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat-terminal .apteva-message-user{color:#e0e0e0!important;background-color:#1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-assistant{color:#e0e0e0!important;background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-timestamp{color:#444!important}.apteva-chat-terminal .apteva-message-timestamp-user{color:#666!important}.apteva-chat-terminal .apteva-composer{background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-composer textarea{color:#e0e0e0!important}.apteva-chat-terminal .apteva-composer textarea::placeholder{color:#666!important}.apteva-chat-terminal .apteva-composer-send-btn{color:#888!important;background-color:#1a1a1a!important;border-color:#333!important}.apteva-chat-terminal .apteva-composer-send-btn:hover{color:#f97316!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-stop-btn{color:#f97316!important;background-color:#f9731626!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-menu-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-menu-btn:hover{color:#f97316!important;background-color:#1a1a1a!important}.apteva-chat-terminal .apteva-tool-card-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-card-preparing{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-md-link{color:#f97316!important}.apteva-chat-terminal .apteva-md-link:hover{color:#fb923c!important}.apteva-chat-terminal .apteva-md-inline-code{color:#3b82f6!important;background-color:#1a1a1a!important}}
|
|
1
|
+
@layer components{@keyframes blink{0%,to{opacity:1}50%{opacity:0}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-slideUp{animation:.2s ease-out slideUp}.apteva-scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none}.apteva-scrollbar-hidden::-webkit-scrollbar{display:none}.apteva-md{white-space:pre-wrap!important;color:inherit!important;word-wrap:break-word!important;overflow-wrap:break-word!important;font-size:.875rem!important;line-height:1.625!important}.apteva-md-h2{all:unset!important;display:block!important;margin-top:.75rem!important;margin-bottom:.25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-h3{all:unset!important;display:block!important;margin-top:.5rem!important;margin-bottom:.125rem!important;font-size:1rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-ul{all:unset!important;list-style-type:disc!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-ol{all:unset!important;list-style-type:decimal!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-li{all:unset!important;display:list-item!important;margin-bottom:.25rem!important;padding-left:.25rem!important}.apteva-tool-call{all:unset!important;display:flex!important;background-color:#8080801a!important;border:1px solid #80808033!important;border-radius:.5rem!important;align-items: center!important;gap:.5rem!important;margin:.5rem 0!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-call-dot{all:unset!important;display:block!important;border-radius:50%!important;flex-shrink:0!important;width:.5rem!important;height:.5rem!important}.apteva-tool-call-dot-running{animation:1s infinite blink!important;background-color:#3b82f6!important}.apteva-tool-call-dot-completed{background-color:#22c55e!important}.apteva-tool-call-dot-error{background-color:#ef4444!important}.apteva-tool-call-name{all:unset!important;color:inherit!important;font-family:ui-monospace,monospace!important}.apteva-tool-call-status{all:unset!important;color:#808080cc!important;margin-left:auto!important}.apteva-tool-call-status-completed{color:#22c55e!important}.apteva-tool-call-status-error{color:#ef4444!important}.apteva-md-table-wrapper{overflow-x:auto!important;margin:.75rem 0!important}.apteva-md-table{border-collapse:collapse!important;width:100%!important;font-size:.8125rem!important;line-height:1.4!important}.apteva-md-th{text-align:left!important;white-space:nowrap!important;border-bottom:2px solid #8080804d!important;padding:.5rem .75rem!important;font-weight:600!important}.apteva-md-td{border-bottom:1px solid #80808026!important;padding:.5rem .75rem!important}.apteva-md-table tbody tr:hover{background-color:#8080800d!important}.apteva-md-table tbody tr:last-child .apteva-md-td{border-bottom:none!important}.apteva-md-img{display:block!important;border-radius:.5rem!important;max-width:100%!important;height:auto!important;margin:.5rem 0!important}.apteva-md-link{color:#3b82f6!important;text-underline-offset:2px!important;text-decoration:underline!important}.apteva-md-link:hover{color:#2563eb!important}.apteva-md-inline-code{background-color:#80808026!important;border-radius:.25rem!important;padding:.125rem .375rem!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace!important;font-size:.8125rem!important}.apteva-typing-indicator{display:inline-flex!important;align-items: center!important;gap:2px!important}.apteva-typing-indicator span{opacity:.4!important;animation:1.4s infinite both apteva-typing-blink!important;background-color:currentColor!important;border-radius:50%!important;width:6px!important;height:6px!important}.apteva-typing-indicator span:nth-child(2){animation-delay:.2s!important}.apteva-typing-indicator span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-typing-blink{0%,80%,to{opacity:.4}40%{opacity:1}}.apteva-chat-header{all:unset!important;box-sizing:border-box!important;display:flex!important;justify-content:space-between!important;align-items: center!important;padding:.75rem 1rem!important}.apteva-chat-title{all:unset!important;color:#111827!important;display:block!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.4!important}@media (prefers-color-scheme:dark){.apteva-chat-title{color:#fff!important}}.dark .apteva-chat-title{color:#fff!important}.apteva-chat-status{all:unset!important;display:block!important;margin-top:.125rem!important;font-size:.75rem!important;line-height:1.4!important}.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#737373!important}.apteva-chat-status-tool{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#525252!important}.apteva-chat-status-tool{color:#60a5fa!important}}.dark .apteva-chat-status-ready,.dark .apteva-chat-status-thinking{color:#525252!important}.dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-message-list{box-sizing:border-box!important;display:block!important;overflow-y:auto!important;flex:1!important;padding:1rem!important}.apteva-message-row-user{display:flex!important;justify-content:flex-end!important;margin-bottom:.75rem!important}.apteva-message-row-assistant{display:flex!important;justify-content:flex-start!important;margin-bottom:.75rem!important}.apteva-message-bubble{box-sizing:border-box!important;display:block!important;border-radius:1rem!important;max-width:95%!important;padding:.625rem 1rem!important;font-size:.875rem!important;line-height:1.5!important}.apteva-message-user{color:#fff!important;background-color:#2563eb!important;border-bottom-right-radius:.375rem!important}.apteva-message-assistant{color:#0a0a0a!important;background-color:#fafafa!important;border-bottom-left-radius:.375rem!important}@media (prefers-color-scheme:dark){.apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}}.dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-message-content-user,.apteva-message-content-assistant{display:block!important}.apteva-message-text{white-space:pre-wrap!important;color:inherit!important;display:block!important;font-size:.875rem!important;line-height:1.625!important}.apteva-message-widgets{display:block!important;margin-top:.5rem!important}.apteva-message-timestamp{display:block!important;margin-top:.375rem!important;font-size:.75rem!important}.apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-message-timestamp-assistant{color:#737373!important}.apteva-message-segmented{display:flex!important;flex-direction:column!important;gap:.5rem!important;width:95%!important;max-width:95%!important}.apteva-message-segmented .apteva-message-bubble{width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important}.apteva-tool-call-standalone,.apteva-widget-standalone{display:block!important}.apteva-widget{color:#171717!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important;font-size:.875rem!important;line-height:1.5!important}.apteva-widget *{box-sizing:border-box!important}.apteva-widget-skeleton{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.apteva-widget-skeleton *{box-sizing:border-box!important}.apteva-widget-skeleton [class*=bg-neutral-200]{background-color:#e5e5e5!important}.apteva-widget-skeleton [class*=bg-neutral-100]{background-color:#f5f5f5!important}.apteva-widget-skeleton [class*=bg-neutral-300]{background-color:#d4d4d4!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}}.dark .apteva-widget-skeleton [class*=bg-neutral-700]{background-color:#404040!important}.dark .apteva-widget-skeleton [class*=bg-neutral-800]{background-color:#262626!important}.dark .apteva-widget-skeleton [class*=bg-neutral-600]{background-color:#525252!important}.dark .apteva-widget-skeleton [class*=border-neutral]{border-color:#262626!important}.apteva-widget>div{background-color:#fff!important}.apteva-widget h3,.apteva-widget h4{color:#171717!important}.apteva-widget p,.apteva-widget span{color:#525252!important}.apteva-widget>div[class*=border]{border-color:#e5e5e5!important}@media (prefers-color-scheme:dark){.apteva-widget{color:#fafafa!important}.apteva-widget>div{background-color:#171717!important}.apteva-widget h3,.apteva-widget h4{color:#fafafa!important}.apteva-widget p,.apteva-widget span{color:#a3a3a3!important}.apteva-widget>div[class*=border]{border-color:#262626!important}}.dark .apteva-widget{color:#fafafa!important}.dark .apteva-widget>div{background-color:#171717!important}.dark .apteva-widget h3,.dark .apteva-widget h4{color:#fafafa!important}.dark .apteva-widget p,.dark .apteva-widget span{color:#a3a3a3!important}.dark .apteva-widget>div[class*=border]{border-color:#262626!important}@media (prefers-color-scheme:dark){.apteva-message-timestamp-assistant{color:#525252!important}}.dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-tool-card{box-sizing:border-box!important;display:flex!important;border-style:solid!important;border-width:1px!important;border-radius:.75rem!important;align-items: center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}@media (prefers-color-scheme:dark){.apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}}.dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-icon{flex-shrink:0!important;width:1rem!important;height:1rem!important}.apteva-tool-icon-spin{animation:1s linear infinite apteva-spin!important}.apteva-tool-spinner-track{opacity:.25!important}.apteva-tool-spinner-fill{opacity:.75!important}.apteva-tool-label{font-size:inherit!important}.apteva-tool-label strong{font-weight:600!important}@keyframes apteva-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}@media (prefers-color-scheme:dark){.apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}}.dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}@keyframes apteva-pulse-glow{0%,to{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 8px 2px #fbbf2480}}.apteva-tool-receiving{animation:.4s ease-in-out apteva-pulse-glow!important}.apteva-tool-status-text{opacity:.7!important;font-weight:400!important}.apteva-tool-char-count{opacity:.6!important;font-variant-numeric:tabular-nums!important;font-size:.85em!important;font-weight:400!important}.apteva-tool-dots{display:inline-flex!important;margin-left:1px!important}.apteva-tool-dots span{opacity:.3!important;animation:1.4s ease-in-out infinite apteva-dot-pulse!important}.apteva-tool-dots span:first-child{animation-delay:0s!important}.apteva-tool-dots span:nth-child(2){animation-delay:.2s!important}.apteva-tool-dots span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-dot-pulse{0%,60%,to{opacity:.3}30%{opacity:1}}.apteva-tool-stream-separator{opacity:.5!important}.apteva-tool-stream-output{opacity:.85!important;white-space:nowrap!important;text-overflow:ellipsis!important;vertical-align:bottom!important;display:inline-block!important;overflow:hidden!important;max-width:300px!important;font-weight:400!important}.apteva-composer{display:grid!important;position:relative!important;background-color:#fff!important;border:2px solid #d4d4d4!important;border-radius:1rem!important;gap:.5rem .75rem!important;padding:.5rem .75rem!important;transition:all .3s!important}.apteva-composer textarea{color:#171717!important;background-color:#0000!important}.apteva-composer textarea::placeholder{color:#a3a3a3!important}button.apteva-composer-menu-btn{background:0 0!important;border:none!important}.apteva-composer-menu{background-color:#262626!important}.apteva-composer-menu button{color:#fff!important;background-color:#0000!important}.apteva-composer-menu button:hover{background-color:#404040!important}.apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border:1px solid #d4d4d4!important}.apteva-composer-send-btn svg{stroke:currentColor!important}.apteva-composer-stop-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#dc2626!important;display:flex!important;background-color:#fef2f2!important;border:1px solid #f87171!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important;margin:0!important;padding:0!important;transition:background-color .15s!important}.apteva-composer-stop-btn:hover{background-color:#fee2e2!important}.apteva-composer-stop-btn svg{fill:currentColor!important;width:14px!important;height:14px!important}@media (prefers-color-scheme:dark){.apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-composer textarea{color:#fafafa!important}.apteva-composer textarea::placeholder{color:#525252!important}button.apteva-composer-menu-btn{background:0 0!important}.apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}}.dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.dark .apteva-composer textarea{color:#fafafa!important}.dark .apteva-composer textarea::placeholder{color:#525252!important}.dark button.apteva-composer-menu-btn{background:0 0!important}.dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}.apteva-file-preview{display:flex!important;flex-wrap:wrap!important;gap:.5rem!important;margin-bottom:.5rem!important}.apteva-file-item{all:unset!important;box-sizing:border-box!important;display:flex!important;position:relative!important;background-color:#f5f5f5!important;border:1px solid #e5e5e5!important;border-radius:.5rem!important;align-items: center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.apteva-file-item:hover .apteva-file-remove{opacity:1!important}.apteva-file-thumb{object-fit:cover!important;border-radius:.25rem!important;flex-shrink:0!important;width:2rem!important;height:2rem!important}.apteva-file-icon{color:#737373!important;display:flex!important;background-color:#e5e5e5!important;border-radius:.25rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important}.apteva-file-icon svg{width:1rem!important;height:1rem!important}.apteva-file-info{display:flex!important;flex-direction:column!important;min-width:0!important}.apteva-file-name{color:#404040!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important;max-width:120px!important;font-size:.75rem!important;font-weight:500!important}.apteva-file-size{color:#737373!important;font-size:.75rem!important}.apteva-file-remove{all:unset!important;box-sizing:border-box!important;color:#fff!important;opacity:0!important;cursor:pointer!important;display:flex!important;position:absolute!important;background-color:#737373!important;border-radius:50%!important;justify-content:center!important;align-items: center!important;width:1.25rem!important;height:1.25rem!important;transition:opacity .15s,background-color .15s!important;top:-.375rem!important;right:-.375rem!important}.apteva-file-remove:hover{background-color:#ef4444!important}.apteva-file-remove svg{width:.75rem!important;height:.75rem!important}.apteva-file-error{all:unset!important;box-sizing:border-box!important;z-index:20!important;position:absolute!important;background-color:#fef2f2!important;border:1px solid #fecaca!important;border-radius:.5rem!important;margin-bottom:.5rem!important;padding:.75rem!important;bottom:100%!important;left:1rem!important;right:1rem!important}.apteva-file-error-content{color:#b91c1c!important;display:flex!important;align-items: center!important;gap:.5rem!important;font-size:.875rem!important}.apteva-file-error-content svg{flex-shrink:0!important;width:1rem!important;height:1rem!important}@media (prefers-color-scheme:dark){.apteva-file-item{background-color:#262626!important;border-color:#404040!important}.apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.apteva-file-name{color:#d4d4d4!important}.apteva-file-size{color:#a3a3a3!important}.apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-file-error-content{color:#fca5a5!important}}.dark .apteva-file-item{background-color:#262626!important;border-color:#404040!important}.dark .apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.dark .apteva-file-name{color:#d4d4d4!important}.dark .apteva-file-size{color:#a3a3a3!important}.dark .apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-file-error-content{color:#fca5a5!important}.apteva-file-badges{display:flex!important;flex-shrink:0!important;align-items: center!important;gap:.25rem!important}.apteva-file-badge{all:unset!important;box-sizing:border-box!important;display:flex!important;position:relative!important;overflow:hidden!important;background-color:#f5f5f5!important;border-radius:.25rem!important;justify-content:center!important;align-items: center!important;width:1.5rem!important;height:1.5rem!important}.apteva-file-badge:hover .apteva-file-badge-remove{opacity:1!important}.apteva-file-badge-img{object-fit:cover!important;width:1.5rem!important;height:1.5rem!important}.apteva-file-badge-icon{color:#737373!important;font-size:.75rem!important}.apteva-file-badge-icon svg{width:1rem!important;height:1rem!important}.apteva-file-badge-remove{all:unset!important;box-sizing:border-box!important;opacity:0!important;cursor:pointer!important;display:flex!important;position:absolute!important;background-color:#00000080!important;justify-content:center!important;align-items: center!important;transition:opacity .15s!important;inset:0!important}.apteva-file-badge-remove svg{color:#fff!important;width:.75rem!important;height:.75rem!important}@media (prefers-color-scheme:dark){.apteva-file-badge{background-color:#262626!important}.apteva-file-badge-icon{color:#a3a3a3!important}}.dark .apteva-file-badge{background-color:#262626!important}.dark .apteva-file-badge-icon{color:#a3a3a3!important}.apteva-composer-textarea{-ms-overflow-style:none!important;scrollbar-width:none!important}.apteva-composer-textarea::-webkit-scrollbar{display:none!important}.apteva-chat{background-color:#fff!important}.apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-message-list{background-color:#f5f5f5!important}@media (prefers-color-scheme:dark){.apteva-chat{background-color:#0a0a0a!important}.apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-message-list{background-color:#0a0a0a!important}}.dark .apteva-chat{background-color:#0a0a0a!important}.dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.dark .apteva-message-list{background-color:#0a0a0a!important}@keyframes apteva-slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes apteva-highlight-fade{0%{background-color:#3b82f626}to{background-color:#0000}}.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade!important}.apteva-table-row-new td{background-color:#3b82f61a!important}.apteva-list-streaming,.apteva-table-streaming{border-top:1px dashed #8080804d!important}@media (prefers-color-scheme:dark){.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.apteva-table-row-new td{background-color:#3b82f626!important}}.dark .apteva-list-item-new,.dark .apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.dark .apteva-table-row-new td{background-color:#3b82f626!important}@keyframes apteva-highlight-fade-dark{0%{background-color:#3b82f633}to{background-color:#0000}}.apteva-chat-minimal{background-color:#0000!important}.apteva-chat-minimal .apteva-chat-header{background-color:#0000!important;border:none!important}.apteva-chat-minimal .apteva-message-list{background-color:#0000!important}.apteva-chat-minimal .apteva-composer{background-color:#0000!important;border:1px solid #80808033!important}.apteva-chat-minimal .apteva-message-assistant{background-color:#80808014!important}.apteva-chat-minimal .apteva-message-user{color:inherit!important;background-color:#3b82f626!important}.apteva-chat-terminal{background-color:#0a0a0a!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace!important}.apteva-chat-terminal *{font-family:inherit!important}.apteva-chat-terminal .apteva-chat-header{background-color:#0a0a0a!important;border-color:#1a1a1a!important}.apteva-chat-terminal .apteva-chat-title{color:#e0e0e0!important;font-size:.875rem!important}.apteva-chat-terminal .apteva-chat-status{color:#666!important}.apteva-chat-terminal .apteva-chat-status-tool{color:#f97316!important}.apteva-chat-terminal .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat-terminal .apteva-message-user{color:#e0e0e0!important;background-color:#1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-assistant{color:#e0e0e0!important;background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-timestamp{color:#444!important}.apteva-chat-terminal .apteva-message-timestamp-user{color:#666!important}.apteva-chat-terminal .apteva-composer{background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-composer textarea{color:#e0e0e0!important}.apteva-chat-terminal .apteva-composer textarea::placeholder{color:#666!important}.apteva-chat-terminal .apteva-composer-send-btn{color:#888!important;background-color:#1a1a1a!important;border-color:#333!important}.apteva-chat-terminal .apteva-composer-send-btn:hover{color:#f97316!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-stop-btn{color:#f97316!important;background-color:#f9731626!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-menu-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-menu-btn:hover{color:#f97316!important;background-color:#1a1a1a!important}.apteva-chat-terminal .apteva-tool-card-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-card-preparing{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-md-link{color:#f97316!important}.apteva-chat-terminal .apteva-md-link:hover{color:#fb923c!important}.apteva-chat-terminal .apteva-md-inline-code{color:#3b82f6!important;background-color:#1a1a1a!important}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Q as L,T as P,U as N}from"./App.g8vq68n0.js";var z=L(P(),1),w=L(N(),1);function U({children:q,onClose:y}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl lg:max-w-2xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:q},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Q({title:q,message:y,confirmText:F="Confirm",cancelText:B="Cancel",confirmVariant:G="danger",onConfirm:I,onCancel:J}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm",children:[q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex gap-2",children:[w.jsxDEV("button",{onClick:J,className:"flex-1 text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:B},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:I,className:`flex-1 text-sm text-white px-4 py-2 rounded transition ${G==="danger"?"bg-red-500 hover:bg-red-600":"bg-[#f97316] hover:bg-[#ea580c]"}`,children:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function R({title:q,message:y,buttonText:F="OK",variant:B="info",onClose:G}){let I={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},J={error:"✕",success:"✓",info:"ℹ"};return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[#111] border border-[#333] rounded-lg p-6 w-full max-w-sm text-center",children:[w.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${I[B]}`,children:w.jsxDEV("span",{className:"text-xl",children:J[B]},void 0,!1,void 0,this)},void 0,!1,void 0,this),q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[#ccc] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:G,className:"w-full text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] px-4 py-2 rounded transition",children:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function W(){let[q,y]=z.useState(null),F=z.useCallback((J,K={})=>{return new Promise((O)=>{y({message:J,options:K,resolve:O})})},[]),B=z.useCallback(()=>{q?.resolve(!0),y(null)},[q]),G=z.useCallback(()=>{q?.resolve(!1),y(null)},[q]),I=q?w.jsxDEV(Q,{title:q.options.title,message:q.message,confirmText:q.options.confirmText,cancelText:q.options.cancelText,confirmVariant:q.options.confirmVariant,onConfirm:B,onCancel:G},void 0,!1,void 0,this):null;return{confirm:F,ConfirmDialog:I}}function X(){let[q,y]=z.useState(null),F=z.useCallback((I,J={})=>{return new Promise((K)=>{y({message:I,options:J,resolve:K})})},[]),B=z.useCallback(()=>{q?.resolve(),y(null)},[q]),G=q?w.jsxDEV(R,{title:q.options.title,message:q.message,buttonText:q.options.buttonText,variant:q.options.variant,onClose:B},void 0,!1,void 0,this):null;return{alert:F,AlertDialog:G}}
|
|
2
|
+
export{U as L,W as M,X as N};
|
|
3
|
+
|
|
4
|
+
//# debugId=09CA02639775F39364756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{M as V}from"./App.p93mmyqw.js";import{P as D}from"./App.7vzbaz56.js";import{Q as P,T as Kk,U as v,X as i,aa as o,da as d}from"./App.g8vq68n0.js";var J=P(Kk(),1);var q=P(v(),1);function Yk(){let{authFetch:K}=o(),{currentProjectId:X}=d(),{confirm:j,ConfirmDialog:E}=V(),[$,x]=J.useState([]),[A,c]=J.useState([]),[a,u]=J.useState(!0),[r,Y]=J.useState(!1),[H,C]=J.useState(null),[T,Q]=J.useState(new Set),[F,R]=J.useState(!1),[y,I]=J.useState(null),[w,f]=J.useState(null),[S,U]=J.useState({}),[M,N]=J.useState(""),[b,L]=J.useState(""),[g,B]=J.useState(""),Z=X&&X!=="all"&&X!=="unassigned"?X:null,n=Z?A.filter((k)=>k.projectId===Z):A,{events:p}=i({category:"test",limit:50}),_=J.useRef(new Set);J.useEffect(()=>{for(let k of p){if(_.current.has(k.id))continue;_.current.add(k.id);let z=k.data?.test_case_id;if(!z)continue;if(k.type==="test_started")U((G)=>({...G,[z]:{phase:"starting"}})),Q((G)=>new Set(G).add(z));else if(k.type==="test_planning")U((G)=>({...G,[z]:{phase:"planning"}}));else if(k.type==="test_executing"){let G=k.data?.agent_name;U((O)=>({...O,[z]:{phase:"executing",detail:G}}))}else if(k.type==="test_judging")U((G)=>({...G,[z]:{phase:"judging"}}));else if(k.type==="test_completed")U((G)=>{let O={...G};return delete O[z],O}),Q((G)=>{let O=new Set(G);return O.delete(z),O}),W()}if(_.current.size>500)_.current=new Set([..._.current].slice(-200))},[p]);let W=async()=>{try{let k=Z?`?project_id=${Z}`:"",z=await K(`/api/tests${k}`);if(z.ok)x(await z.json())}catch{}u(!1)},s=async()=>{try{let k=await K("/api/agents");if(k.ok){let z=await k.json();c((z.agents||z).map((G)=>({id:G.id,name:G.name,status:G.status,provider:G.provider,model:G.model,projectId:G.projectId||null})))}}catch{}};J.useEffect(()=>{Promise.all([W(),s()])},[X]);let l=()=>{C(null),N(""),L(""),B(""),Y(!0)},t=(k)=>{C(k),N(k.name),L(k.behavior||""),B(k.agent_id||""),Y(!0)},e=async()=>{if(!M||!b)return;let k={name:M,behavior:b,agent_id:g||null,project_id:Z||void 0};if(H)await K(`/api/tests/${H.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});else await K("/api/tests",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});Y(!1),W()},kk=async(k)=>{if(!await j("Delete this test case? Run history will also be deleted."))return;await K(`/api/tests/${k}`,{method:"DELETE"}),W()},qk=async(k)=>{Q((z)=>new Set(z).add(k));try{await K(`/api/tests/${k}/run`,{method:"POST"}),await W()}catch{}Q((z)=>{let G=new Set(z);return G.delete(k),G}),U((z)=>{let G={...z};return delete G[k],G})},zk=async()=>{R(!0);try{let k=$.map((z)=>z.id);Q(new Set(k)),await K("/api/tests/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test_case_ids:k})}),await W()}catch{}Q(new Set),R(!1)},Gk=async(k)=>{try{let z=await K(`/api/tests/${k}/runs`);if(z.ok)I({testId:k,runs:await z.json()})}catch{}},h={starting:{label:"Starting",color:"bg-blue-900/50 text-blue-400 border-blue-500/30"},planning:{label:"Planning",color:"bg-purple-900/50 text-purple-400 border-purple-500/30"},executing:{label:"Executing",color:"bg-cyan-900/50 text-cyan-400 border-cyan-500/30"},judging:{label:"Judging",color:"bg-amber-900/50 text-amber-400 border-amber-500/30"}},m=(k)=>{return q.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${{passed:"bg-green-900/50 text-green-400",failed:"bg-red-900/50 text-red-400",error:"bg-yellow-900/50 text-yellow-400",running:"bg-blue-900/50 text-blue-400"}[k]||"bg-[#222] text-[#666]"}`,children:k.toUpperCase()},void 0,!1,void 0,this)},Jk=(k)=>{let z=S[k];if(!z)return null;let G=h[z.phase]||h.starting;return q.jsxDEV("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-medium border ${G.color} animate-pulse`,children:[q.jsxDEV("span",{className:"w-1.5 h-1.5 rounded-full bg-current"},void 0,!1,void 0,this),G.label,z.detail?` · ${z.detail}`:""]},void 0,!0,void 0,this)};return q.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[E,q.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[q.jsxDEV("div",{children:[q.jsxDEV("h1",{className:"text-xl font-bold",children:"Tests"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[#666] mt-1",children:"Describe behavior, AI handles the rest"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[$.length>0&&q.jsxDEV("button",{onClick:zk,disabled:F,className:"px-4 py-2 bg-[#1a1a1a] hover:bg-[#222] text-[#e0e0e0] rounded text-sm font-medium transition disabled:opacity-50",children:F?"Running...":"Run All"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-white rounded text-sm font-medium transition",children:"+ New Test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a?q.jsxDEV("div",{className:"text-[#666] text-sm",children:"Loading..."},void 0,!1,void 0,this):$.length===0?q.jsxDEV("div",{className:"text-center py-16",children:[q.jsxDEV("div",{className:"text-[#333] text-4xl mb-4",children:q.jsxDEV("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-[#666] mb-2",children:"No tests yet"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[#555] mb-4",children:"Describe what your agents should do and let AI verify it"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-white rounded text-sm font-medium transition",children:"Create your first test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("div",{className:"space-y-3",children:$.map((k)=>q.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:q.jsxDEV("div",{className:"flex items-start justify-between",children:[q.jsxDEV("div",{className:"flex-1 min-w-0",children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[q.jsxDEV("span",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),S[k.id]?Jk(k.id):k.last_run&&q.jsxDEV(q.Fragment,{children:[m(k.last_run.status),k.last_run.score!=null&&q.jsxDEV("span",{className:"text-xs text-[#888] font-mono",children:[k.last_run.score,"/10"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.behavior&&q.jsxDEV("p",{className:"text-xs text-[#888] mb-1.5 line-clamp-2",children:k.behavior},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-xs text-[#666] space-y-0.5",children:[q.jsxDEV("div",{children:["Agent:"," ",q.jsxDEV("span",{className:"text-[#888]",children:k.agent_name||(k.last_run?.selected_agent_name?`${k.last_run.selected_agent_name} (auto-selected)`:"Auto (AI picks)")},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[#888]",children:['"',k.last_run.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.input_message&&!k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[#888]",children:['"',k.input_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.last_run&&q.jsxDEV("div",{children:["Last run:"," ",q.jsxDEV("span",{className:"text-[#888]",children:[k.last_run.duration_ms?`${(k.last_run.duration_ms/1000).toFixed(1)}s`:"---",k.last_run.judge_reasoning&&` --- "${k.last_run.judge_reasoning.slice(0,80)}${k.last_run.judge_reasoning.length>80?"...":""}"`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex items-center gap-1 ml-3 shrink-0",children:[q.jsxDEV("button",{onClick:()=>Gk(k.id),className:"px-2 py-1 text-xs text-[#666] hover:text-[#888] hover:bg-[#1a1a1a] rounded transition",title:"View run history",children:"History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>qk(k.id),disabled:T.has(k.id),className:"px-3 py-1 text-xs bg-[#1a1a1a] hover:bg-[#222] text-[#e0e0e0] rounded transition disabled:opacity-50",children:T.has(k.id)?"Running...":"Run"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>t(k),className:"px-2 py-1 text-xs text-[#666] hover:text-[#888] hover:bg-[#1a1a1a] rounded transition",children:"Edit"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>kk(k.id),className:"px-2 py-1 text-xs text-[#666] hover:text-red-400 hover:bg-[#1a1a1a] rounded transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},k.id,!1,void 0,this))},void 0,!1,void 0,this),y&&q.jsxDEV("div",{className:"mt-6",children:[q.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[q.jsxDEV("h2",{className:"text-sm font-bold text-[#888]",children:"Run History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>{I(null),f(null)},className:"text-xs text-[#666] hover:text-[#888]",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.runs.length===0?q.jsxDEV("p",{className:"text-sm text-[#666]",children:"No runs yet"},void 0,!1,void 0,this):q.jsxDEV("div",{className:"space-y-2",children:y.runs.map((k)=>q.jsxDEV("div",{className:"bg-[#0d0d0d] border border-[#1a1a1a] rounded p-3",children:[q.jsxDEV("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>f(w===k.id?null:k.id),children:[q.jsxDEV("div",{className:"flex items-center gap-3",children:[m(k.status),q.jsxDEV("span",{className:"text-xs text-[#666]",children:k.duration_ms?`${(k.duration_ms/1000).toFixed(1)}s`:"---"},void 0,!1,void 0,this),k.score!=null&&q.jsxDEV("span",{className:"text-xs text-[#888] font-mono",children:[k.score,"/10"]},void 0,!0,void 0,this),k.selected_agent_name&&q.jsxDEV("span",{className:"text-xs text-[#555]",children:["Agent: ",k.selected_agent_name]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[#555]",children:new Date(k.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[#555]",children:w===k.id?"---":"+"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w===k.id&&q.jsxDEV("div",{className:"mt-3 space-y-2",children:[k.planner_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[#666] mb-1",children:"Planner:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[#aaa] bg-[#0a0a0a] p-2 rounded",children:[k.selected_agent_name&&q.jsxDEV("span",{className:"text-[#f97316]",children:k.selected_agent_name},void 0,!1,void 0,this),k.selected_agent_name&&" --- ",k.planner_reasoning]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.generated_message&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[#666] mb-1",children:"Generated Message:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[#aaa] bg-[#0a0a0a] p-2 rounded",children:['"',k.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.judge_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[#666] mb-1",children:"Judge:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[#aaa] bg-[#0a0a0a] p-2 rounded",children:k.judge_reasoning},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.error&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-red-400 mb-1",children:"Error:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-red-300 bg-[#0a0a0a] p-2 rounded",children:k.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.agent_response&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[#666] mb-1",children:"Agent Response (Thread):"},void 0,!1,void 0,this),q.jsxDEV("pre",{className:"text-xs text-[#888] bg-[#0a0a0a] p-2 rounded overflow-auto max-h-64",children:k.agent_response},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},k.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-50 flex items-center justify-center",onClick:()=>Y(!1),children:q.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg mx-4 p-6",onClick:(k)=>k.stopPropagation(),children:[q.jsxDEV("h2",{className:"text-lg font-bold mb-4",children:H?"Edit Test":"New Test"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"space-y-4",children:[q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),q.jsxDEV("input",{value:M,onChange:(k)=>N(k.target.value),placeholder:"e.g. Social Media Posting",className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[#666] mb-1",children:"Behavior"},void 0,!1,void 0,this),q.jsxDEV("textarea",{value:b,onChange:(k)=>L(k.target.value),placeholder:"Describe what should happen, e.g. 'When asked to post on social media, the agent creates a proper post with relevant hashtags and confirms it was published'",rows:3,className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316] resize-none"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"AI will generate the test message and evaluate results based on this"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[#666] mb-1",children:"Agent"},void 0,!1,void 0,this),q.jsxDEV(D,{value:g,onChange:B,placeholder:"Auto (AI picks the best agent)",options:n.map((k)=>({value:k.id,label:`${k.name} (${k.status})`}))},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Leave empty to let AI choose the right agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex justify-end gap-2 mt-6",children:[q.jsxDEV("button",{onClick:()=>Y(!1),className:"px-4 py-2 text-sm text-[#888] hover:text-[#e0e0e0] transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:e,disabled:!M||!b,className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-white rounded text-sm font-medium transition",children:H?"Save":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}
|
|
2
|
+
export{Yk as K};
|
|
3
|
+
|
|
4
|
+
//# debugId=DEEF9B76DDF5823464756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Q as n,U as e}from"./App.g8vq68n0.js";var o=n(e(),1);function t({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function i({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function a({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function s({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function c({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},void 0,!1,void 0,this),o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function l({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function u({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function h({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this),o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function d({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function k({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function p({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function v({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function L({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function M({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function m({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function g({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function f({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function w({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function I({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function C({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function W({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function P({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function B({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h5M20 20v-5h-5"},void 0,!1,void 0,this),o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.49 9A9 9 0 005.64 5.64L4 4m16 16l-1.64-1.64A9 9 0 013.51 15"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function N({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3"},void 0,!1,void 0,this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"9",strokeWidth:2},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function z({className:r="w-4 h-4"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"},void 0,!1,void 0,this),o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 14l2 2 4-4"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function H({className:r="w-5 h-5"}){return o.jsxDEV("svg",{className:r,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}
|
|
2
|
+
export{t as j,i as k,a as l,s as m,c as n,l as o,u as p,h as q,d as r,k as s,p as t,v as u,L as v,M as w,m as x,g as y,f as z,w as A,I as B,C,W as D,P as E,B as F,N as G,z as H,H as I};
|
|
3
|
+
|
|
4
|
+
//# debugId=F2E92FC161C8E1E964756E2164756E21
|