adam-agent-server 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App-3OBJDI2C.js +9 -0
- package/dist/adam-tools-4LZYFB6J.js +1 -0
- package/dist/{approval-handler-JYIS2PKQ.js → approval-handler-RIJO3OBO.js} +1 -1
- package/dist/audit-manager-6FFPXID3.js +1 -0
- package/dist/bree-engine-2NOTIBAZ.js +1 -0
- package/dist/{channels-WZOYE4O4.js → channels-LUJ7GTSP.js} +1 -1
- package/dist/channels-TSZLEU3L.js +1 -0
- package/dist/{chunk-PMHNW5IL.js → chunk-4LSIHSCO.js} +1 -1
- package/dist/{chunk-KVSO3KGZ.js → chunk-4MJF77RD.js} +54 -5
- package/dist/{chunk-BIIP363C.js → chunk-4NW2DNDZ.js} +1 -1
- package/dist/{chunk-OEKM2W3K.js → chunk-6NUHSHS5.js} +1 -1
- package/dist/{chunk-IHP7JV6J.js → chunk-72VLUJ2S.js} +1 -1
- package/dist/chunk-7CJGPCSJ.js +49 -0
- package/dist/{chunk-KLQOILIJ.js → chunk-7IXLL673.js} +1 -1
- package/dist/{chunk-SBX3HMDA.js → chunk-7K4AQBDD.js} +1 -1
- package/dist/{chunk-GMCIKDTC.js → chunk-AKPLOO2V.js} +1 -1
- package/dist/{chunk-AJVN3KPM.js → chunk-AZBNUSM2.js} +1 -1
- package/dist/{chunk-SWPXG2CY.js → chunk-CLHSPXZ6.js} +1 -1
- package/dist/{chunk-KKLZIXBN.js → chunk-DBUEHITK.js} +2 -2
- package/dist/chunk-GSMC3VUM.js +1 -0
- package/dist/{chunk-EJVUUIAV.js → chunk-HFN7Y3IM.js} +1 -1
- package/dist/{chunk-6DXNXLYG.js → chunk-IKUBP3SY.js} +1 -1
- package/dist/{chunk-4TCP2AT7.js → chunk-IZGTTLTG.js} +1 -1
- package/dist/chunk-JZNBFZ7W.js +7 -0
- package/dist/{chunk-6YURWVQG.js → chunk-NDP6LWXX.js} +1 -1
- package/dist/{chunk-CDVIT7L5.js → chunk-NLD7WK3R.js} +1 -1
- package/dist/{chunk-OFOVSC72.js → chunk-NUTUI5KM.js} +1 -1
- package/dist/{chunk-B4WHT7DX.js → chunk-OTH4M5L3.js} +1 -1
- package/dist/{chunk-GUQAIWCQ.js → chunk-P6KWAGAY.js} +1 -1
- package/dist/chunk-PVYEGQEG.js +83 -0
- package/dist/{chunk-Z5ET7WW2.js → chunk-T33BLZV2.js} +1 -1
- package/dist/{chunk-2HN2TSP6.js → chunk-TCHBOWQ5.js} +1 -1
- package/dist/{chunk-RPTHFQX7.js → chunk-TKDT7EQO.js} +1 -1
- package/dist/{chunk-ZM6YED5F.js → chunk-UQJZU3R5.js} +1 -1
- package/dist/{chunk-7LBDLAUQ.js → chunk-WKS7QVIX.js} +1 -1
- package/dist/{chunk-EGS6U3V5.js → chunk-WTRM5VO7.js} +2 -2
- package/dist/chunk-XTHP5JMO.js +10 -0
- package/dist/chunk-YHVFZB6Q.js +1 -0
- package/dist/{chunk-QN6BEJF5.js → chunk-YPOTHL7X.js} +1 -1
- package/dist/chunk-ZKMDHQJY.js +104 -0
- package/dist/{chunk-AR2IZMM2.js → chunk-ZQYKT5UY.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{config-EI3SCA4W.js → config-HR4MBTIS.js} +1 -1
- package/dist/config-XMQS2NPT.js +1 -0
- package/dist/{db-4NY7ZOS2.js → db-6KUGCGVR.js} +1 -1
- package/dist/{delivery-log-SC2ULFCK.js → delivery-log-7DJJTPXL.js} +1 -1
- package/dist/engine-HJUE6I4I.js +1 -0
- package/dist/{evolution-audit-KUBXFUHI.js → evolution-audit-I2ITWAEC.js} +1 -1
- package/dist/{external-api-A4JXX4ZE.js → external-api-7XV2PXPC.js} +1 -1
- package/dist/index.js +12 -11
- package/dist/{learner-B6XVQKBF.js → learner-CBPQZ3HL.js} +1 -1
- package/dist/{memories-FQCRKMK6.js → memories-HBBW44MG.js} +1 -1
- package/dist/{memory-extractor-FUOJ5D77.js → memory-extractor-XO2HJ22Y.js} +2 -2
- package/dist/memory-service-HIFTKEW2.js +1 -0
- package/dist/outbound-gateway-GGFMU5JW.js +1 -0
- package/dist/role-presets-W452Y3RV.js +1 -0
- package/dist/{roles-3UTFKSHI.js → roles-NYGWZMQI.js} +1 -1
- package/dist/{runtime-B2DP3JNB.js → runtime-VDBZZ4KG.js} +1 -1
- package/dist/{session-manager-Z6MIYRD3.js → session-manager-JICVE4CO.js} +1 -1
- package/dist/{task-templates-PSP7GOJJ.js → task-templates-NC7XIZIC.js} +1 -1
- package/dist/workflow-executor-QN4KP7B4.js +1 -0
- package/package.json +1 -1
- package/web/dist/assets/{ChannelDetail-eWtIGhAd.js → ChannelDetail-DX4QnE8j.js} +1 -1
- package/web/dist/assets/{Channels-2veauYsm.js → Channels-EXkNOQpB.js} +1 -1
- package/web/dist/assets/{Chat-Bha4vXwT.js → Chat-Da-mCR0c.js} +1 -1
- package/web/dist/assets/{Dashboard-cDHpOWnY.js → Dashboard-Bq6sEDdP.js} +1 -1
- package/web/dist/assets/{EnvVarEditor-CaCpNT3y.js → EnvVarEditor-CNxXpVbD.js} +1 -1
- package/web/dist/assets/{Evolution-Ao-gdHbS.js → Evolution-DPdmbooj.js} +1 -1
- package/web/dist/assets/{GoalDetail-CX2i9A5a.js → GoalDetail-BamCfVzS.js} +1 -1
- package/web/dist/assets/{Goals-DdM0tFus.js → Goals-CHPEg0RK.js} +1 -1
- package/web/dist/assets/{Logs-DJhpDtCA.js → Logs-BHkBvH0T.js} +1 -1
- package/web/dist/assets/{Memories-CYN99g2T.js → Memories-BY2pJhVd.js} +1 -1
- package/web/dist/assets/{Plugins-gcMpBdyq.js → Plugins-C5xLM0BU.js} +1 -1
- package/web/dist/assets/{RoleDetail-s7u-Shk3.js → RoleDetail-Dnp-W14x.js} +1 -1
- package/web/dist/assets/{Roles-CCy1H7PY.js → Roles-BVOVoHvc.js} +1 -1
- package/web/dist/assets/Settings-eBHvn6s_.js +1 -0
- package/web/dist/assets/{Strategies-CO4LwZjS.js → Strategies-BbFbLKBJ.js} +1 -1
- package/web/dist/assets/{Switch-CTAIxUd_.js → Switch-Q-inggPs.js} +1 -1
- package/web/dist/assets/{TaskDetail-DEg_oUwx.js → TaskDetail-BEjZ1gco.js} +1 -1
- package/web/dist/assets/Work-CF2iLs8i.js +1 -0
- package/web/dist/assets/{index-rvaixveh.js → index-CaHdOfAc.js} +2 -2
- package/web/dist/assets/index-D0SvKqKc.css +2 -0
- package/web/dist/index.html +2 -2
- package/dist/App-RIYRYLKD.js +0 -9
- package/dist/adam-tools-V22LRDCP.js +0 -1
- package/dist/audit-manager-QDFDBK4E.js +0 -1
- package/dist/bree-engine-EKZFCS4Q.js +0 -1
- package/dist/channels-WMCY4QC3.js +0 -1
- package/dist/chunk-6HD6NYIB.js +0 -1
- package/dist/chunk-ITUBFUJQ.js +0 -67
- package/dist/chunk-IZWULGUS.js +0 -83
- package/dist/chunk-JNRCXAW3.js +0 -49
- package/dist/chunk-W3554FQ7.js +0 -7
- package/dist/config-7HYICF5P.js +0 -1
- package/dist/engine-5RJ7NJSM.js +0 -1
- package/dist/memory-service-ANR67OPY.js +0 -1
- package/dist/outbound-gateway-6FQRWYFF.js +0 -1
- package/dist/role-presets-LRP6P5O2.js +0 -1
- package/web/dist/assets/Settings-JbgBxBeo.js +0 -1
- package/web/dist/assets/Work-BpKK_uXA.js +0 -1
- package/web/dist/assets/index-CaocwyO8.css +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as t}from"./vendor-icons-CkI4-NxL.js";import{t as n}from"./vendor-react-DLRtONKt.js";import{n as r}from"./dist-HyCSN_hp.js";import{S as i,_ as a,b as o,h as s,x as c,y as l}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as t}from"./vendor-icons-CkI4-NxL.js";import{t as n}from"./vendor-react-DLRtONKt.js";import{n as r}from"./dist-HyCSN_hp.js";import{S as i,_ as a,b as o,h as s,x as c,y as l}from"./index-CaHdOfAc.js";var u=e(t(),1);function d(e){let t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function f(e){let[t,n]=u.useState(void 0);return l(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var p=n(),m=`Switch`,[h,g]=i(m),[_,v]=h(m),y=u.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:l,required:d,disabled:f,value:h=`on`,onCheckedChange:g,form:v,...y}=e,[b,x]=u.useState(null),S=c(t,e=>x(e)),T=u.useRef(!1),E=b?v||!!b.closest(`form`):!0,[D,O]=a({prop:i,defaultProp:l??!1,onChange:g,caller:m});return(0,p.jsxs)(_,{scope:n,checked:D,disabled:f,children:[(0,p.jsx)(s.button,{type:`button`,role:`switch`,"aria-checked":D,"aria-required":d,"data-state":w(D),"data-disabled":f?``:void 0,disabled:f,value:h,...y,ref:S,onClick:o(e.onClick,e=>{O(e=>!e),E&&(T.current=e.isPropagationStopped(),T.current||e.stopPropagation())})}),E&&(0,p.jsx)(C,{control:b,bubbles:!T.current,name:r,value:h,checked:D,required:d,disabled:f,form:v,style:{transform:`translateX(-100%)`}})]})});y.displayName=m;var b=`SwitchThumb`,x=u.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=v(b,n);return(0,p.jsx)(s.span,{"data-state":w(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});x.displayName=b;var S=`SwitchBubbleInput`,C=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=u.useRef(null),s=c(o,a),l=d(n),m=f(t);return u.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(l!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[l,n,r]),(0,p.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...m,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});C.displayName=S;function w(e){return e?`checked`:`unchecked`}var T=y,E=x,D=u.forwardRef(({className:e,...t},n)=>(0,p.jsx)(T,{className:r(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-900 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-slate-700`,e),...t,ref:n,children:(0,p.jsx)(E,{className:r(`pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`)})}));D.displayName=T.displayName;export{D as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{$ as t,B as n,H as r,M as i,N as a,U as o,i as s,nt as c}from"./vendor-icons-CkI4-NxL.js";import{d as l,r as u,t as d}from"./vendor-react-DLRtONKt.js";import{i as f,r as p}from"./dist-HyCSN_hp.js";import{f as m,n as h,t as g}from"./index-rvaixveh.js";import{n as _,r as v,t as y}from"./Card-4mOZntHG.js";import{a as b,n as x,r as S,t as C}from"./format-DvtQjPZn.js";var w=e(c(),1),T=d(),E={reasoning:`bg-blue-500`,tool_call:`bg-blue-400`,tool_result:`bg-green-500`,approval_request:`bg-yellow-500`,approval_response:`bg-yellow-400`,permission_denied:`bg-orange-500`,error:`bg-red-500`,plugin_error:`bg-red-600`};function D({logs:e}){let[t,n]=(0,w.useState)(new Set);return e.length===0?(0,T.jsx)(`p`,{className:`text-sm text-slate-500`,children:`No execution steps yet.`}):(0,T.jsx)(`div`,{className:`space-y-0`,children:e.map((r,i)=>{let a=i>0?e[i-1].timestamp:null,o=a?r.timestamp-a:null,s=r.type===`plugin_error`,c=t.has(i)?r.content:r.content.length>200?r.content.slice(0,200)+`...`:r.content;return(0,T.jsxs)(`div`,{className:`flex gap-3`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,T.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full mt-1.5 flex-shrink-0 ${E[r.type]??`bg-slate-500`} ${s?`ring-2 ring-red-400`:``}`}),i<e.length-1&&(0,T.jsx)(`div`,{className:`w-0.5 flex-1 bg-slate-700 mt-0.5`})]}),(0,T.jsxs)(`div`,{className:`flex-1 pb-4 ${s?`border border-red-500/40 rounded-md bg-red-950/10 p-2`:``}`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,r.index]}),(0,T.jsx)(`span`,{className:`text-sm font-medium text-slate-200`,children:r.toolName??r.type}),s&&(0,T.jsx)(g,{variant:`destructive`,children:`Plugin Error`}),(0,T.jsx)(`span`,{className:`text-xs text-slate-500`,children:b(r.timestamp)}),o!=null&&o>0&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-600`,children:[`+`,o,`ms`]}),r.truncated&&(0,T.jsx)(g,{variant:`outline`,children:`truncated`})]}),c&&(0,T.jsx)(`button`,{className:`mt-1 text-xs text-slate-400 hover:text-slate-300 text-left w-full font-mono`,onClick:()=>{n(e=>{let t=new Set(e);return t.has(i)?t.delete(i):t.add(i),t})},children:c})]})]},r.id)})})}function O(){let{id:e}=l(),[c,d]=(0,w.useState)(null),[b,E]=(0,w.useState)([]),[O,j]=(0,w.useState)([]),[M,N]=(0,w.useState)([]),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(null),[R,z]=(0,w.useState)(!1);(0,w.useEffect)(()=>{if(!e)return;let t=async()=>{try{d((await p(`/tasks/${e}`)).task),L(null)}catch(e){L(e instanceof Error?e.message:`Failed to load task`)}};t(),p(`/tasks/${e}/plan`).then(e=>E(e.plans)).catch(()=>E([])),p(`/tasks/${e}/logs?limit=200`).then(e=>j(e.logs)).catch(()=>j([])),f(e).then(e=>N(e)).catch(()=>N([]));let n=setInterval(t,3e3);return()=>clearInterval(n)},[e]),(0,w.useEffect)(()=>{if(!c?.roleId||!e)return;let t=!1;return p(`/roles/${c.roleId}/scores?limit=100`).then(n=>{t||F(n.scores.find(t=>t.taskId===e)??null)}).catch(()=>{t||F(null)}),()=>{t=!0}},[c?.roleId,e]);let B=async()=>{if(e){z(!0);try{await p(`/tasks/${e}/cancel`,{method:`POST`}),d(e=>e&&{...e,status:`cancelled`})}finally{z(!1)}}};if(I)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-red-400`,children:I})]});if(!c)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-slate-500`,children:`Loading...`})]});let V=[`running`,`queued`,`pending`,`paused`].includes(c.status);return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),V&&(0,T.jsxs)(m,{variant:`destructive`,size:`sm`,onClick:()=>void B(),disabled:R,children:[(0,T.jsx)(o,{size:14}),R?`Cancelling...`:`Cancel Task`]})]}),(0,T.jsx)(y,{children:(0,T.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,T.jsx)(g,{variant:h(c.status),children:c.status}),(0,T.jsx)(`span`,{className:`font-mono text-xs text-slate-500`,children:c.id})]}),(0,T.jsx)(`p`,{className:`text-sm text-slate-200 whitespace-pre-wrap`,children:c.prompt})]})})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:r,label:`Created`,value:x(c.createdAt)}),(0,T.jsx)(A,{icon:r,label:`Duration`,value:c.totalDurationMs?S(c.totalDurationMs):c.startedAt?S(Date.now()-c.startedAt):`—`}),(0,T.jsx)(A,{icon:n,label:`Cost`,value:c.costUsd==null?`—`:C(c.costUsd)}),(0,T.jsx)(A,{icon:a,label:`Turns`,value:String(c.numTurns??`—`)})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:s,label:`Role`,value:c.roleId??`—`,mono:!0}),(0,T.jsx)(A,{icon:i,label:`Parent`,value:c.parentId??`—`,mono:!0}),c.templateId?(0,T.jsxs)(u,{to:`/work`,className:`block`,children:[(0,T.jsx)(A,{icon:i,label:`Template`,value:c.templateId,mono:!0}),(0,T.jsx)(`span`,{className:`mt-0.5 block text-xs text-blue-400 hover:text-blue-300`,children:`View in Automations →`})]}):(0,T.jsx)(A,{icon:i,label:`Template`,value:`—`,mono:!0}),c.sourceSessionId&&(0,T.jsx)(A,{icon:a,label:`Source Session`,value:c.sourceSessionId.slice(0,8),mono:!0})]}),(c.deliverTo||c.reportTo)&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Delivery Targets`})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[c.deliverTo&&c.deliverTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Output`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.deliverTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`d-${t}`))})]}),c.reportTo&&c.reportTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Status Reports`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.reportTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`r-${t}`))})]})]})]}),P&&(c.status===`completed`||c.status===`failed`)&&(0,T.jsx)(k,{score:P}),c.tokenUsage&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Token Usage`})}),(0,T.jsxs)(`div`,{className:`flex gap-6 text-sm`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Input:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.input.toLocaleString()})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Output:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.output.toLocaleString()})]})]})]}),b.length>0&&(()=>{let e=b[0],t=e.plan.overallRisk===`high`?`destructive`:e.plan.overallRisk===`medium`?`warning`:`secondary`;return(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(v,{children:`Execution Plan`}),(0,T.jsxs)(g,{variant:t,children:[e.plan.overallRisk.toUpperCase(),` RISK`]}),(0,T.jsx)(g,{variant:`outline`,children:e.status})]})}),(0,T.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,e.plan.steps.length,`)`]}),(0,T.jsx)(`div`,{className:`space-y-2`,children:e.plan.steps.map(e=>(0,T.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,T.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,T.jsx)(g,{variant:e.riskLevel===`high`?`destructive`:e.riskLevel===`medium`?`warning`:`secondary`,children:e.riskLevel})]}),(0,T.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]}),e.expectedOutput&&(0,T.jsxs)(`div`,{className:`mt-0.5 text-xs text-slate-500`,children:[`Expected: `,e.expectedOutput]})]},e.index))}),Object.keys(e.plan.requiredPermissions).length>0&&(0,T.jsxs)(`div`,{className:`mt-2`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(e.plan.requiredPermissions).map(e=>(0,T.jsx)(g,{variant:`secondary`,children:e},e))})]}),e.deviationReport&&(0,T.jsxs)(`div`,{className:`mt-3 rounded-md border border-amber-900/50 bg-amber-950/20 p-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-amber-400 mb-2`,children:`Deviation Report`}),(0,T.jsxs)(`div`,{className:`text-xs text-slate-400 mb-2`,children:[`Planned: `,e.deviationReport.stepsPlanned,` | Executed: `,e.deviationReport.stepsExecuted,` | Accuracy: `,(e.deviationReport.overallAccuracy*100).toFixed(0),`%`]}),e.deviationReport.deviations.length>0&&(0,T.jsx)(`div`,{className:`space-y-1`,children:e.deviationReport.deviations.map((e,t)=>(0,T.jsxs)(`div`,{className:`text-xs`,children:[(0,T.jsxs)(`span`,{className:`text-amber-400 font-mono`,children:[`[`,e.deviationType,`]`]}),(0,T.jsxs)(`span`,{className:`text-slate-400`,children:[` Step `,e.stepIndex,`: `]}),(0,T.jsx)(`span`,{className:`text-slate-300`,children:e.actual})]},t))})]}),e.learnedRules&&e.learnedRules.length>0&&(0,T.jsxs)(`div`,{className:`mt-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-2`,children:`Learned Rules`}),(0,T.jsx)(`ul`,{className:`space-y-1`,children:e.learnedRules.map((e,t)=>(0,T.jsxs)(`li`,{className:`text-xs text-slate-400 flex items-start gap-1.5`,children:[(0,T.jsx)(`span`,{className:`text-blue-400 mt-0.5`,children:`*`}),e]},t))})]})]})})(),O.length>0&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(v,{children:[`Execution Timeline (`,O.length,` steps)`]})}),(0,T.jsx)(D,{logs:O})]}),c.result&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Result`})}),(0,T.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-slate-800 p-3 font-mono text-xs text-slate-300`,children:c.result})]}),c.error&&(()=>{let e=[`plugin`,`--plugin-dir`,`failed to load plugin`],t=c.error.toLowerCase(),n=e.some(e=>t.includes(e)),r=n?c.error.split(`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{$ as t,B as n,H as r,M as i,N as a,U as o,i as s,nt as c}from"./vendor-icons-CkI4-NxL.js";import{d as l,r as u,t as d}from"./vendor-react-DLRtONKt.js";import{i as f,r as p}from"./dist-HyCSN_hp.js";import{f as m,n as h,t as g}from"./index-CaHdOfAc.js";import{n as _,r as v,t as y}from"./Card-4mOZntHG.js";import{a as b,n as x,r as S,t as C}from"./format-DvtQjPZn.js";var w=e(c(),1),T=d(),E={reasoning:`bg-blue-500`,tool_call:`bg-blue-400`,tool_result:`bg-green-500`,approval_request:`bg-yellow-500`,approval_response:`bg-yellow-400`,permission_denied:`bg-orange-500`,error:`bg-red-500`,plugin_error:`bg-red-600`};function D({logs:e}){let[t,n]=(0,w.useState)(new Set);return e.length===0?(0,T.jsx)(`p`,{className:`text-sm text-slate-500`,children:`No execution steps yet.`}):(0,T.jsx)(`div`,{className:`space-y-0`,children:e.map((r,i)=>{let a=i>0?e[i-1].timestamp:null,o=a?r.timestamp-a:null,s=r.type===`plugin_error`,c=t.has(i)?r.content:r.content.length>200?r.content.slice(0,200)+`...`:r.content;return(0,T.jsxs)(`div`,{className:`flex gap-3`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,T.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full mt-1.5 flex-shrink-0 ${E[r.type]??`bg-slate-500`} ${s?`ring-2 ring-red-400`:``}`}),i<e.length-1&&(0,T.jsx)(`div`,{className:`w-0.5 flex-1 bg-slate-700 mt-0.5`})]}),(0,T.jsxs)(`div`,{className:`flex-1 pb-4 ${s?`border border-red-500/40 rounded-md bg-red-950/10 p-2`:``}`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,r.index]}),(0,T.jsx)(`span`,{className:`text-sm font-medium text-slate-200`,children:r.toolName??r.type}),s&&(0,T.jsx)(g,{variant:`destructive`,children:`Plugin Error`}),(0,T.jsx)(`span`,{className:`text-xs text-slate-500`,children:b(r.timestamp)}),o!=null&&o>0&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-600`,children:[`+`,o,`ms`]}),r.truncated&&(0,T.jsx)(g,{variant:`outline`,children:`truncated`})]}),c&&(0,T.jsx)(`button`,{className:`mt-1 text-xs text-slate-400 hover:text-slate-300 text-left w-full font-mono`,onClick:()=>{n(e=>{let t=new Set(e);return t.has(i)?t.delete(i):t.add(i),t})},children:c})]})]},r.id)})})}function O(){let{id:e}=l(),[c,d]=(0,w.useState)(null),[b,E]=(0,w.useState)([]),[O,j]=(0,w.useState)([]),[M,N]=(0,w.useState)([]),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(null),[R,z]=(0,w.useState)(!1);(0,w.useEffect)(()=>{if(!e)return;let t=async()=>{try{d((await p(`/tasks/${e}`)).task),L(null)}catch(e){L(e instanceof Error?e.message:`Failed to load task`)}};t(),p(`/tasks/${e}/plan`).then(e=>E(e.plans)).catch(()=>E([])),p(`/tasks/${e}/logs?limit=200`).then(e=>j(e.logs)).catch(()=>j([])),f(e).then(e=>N(e)).catch(()=>N([]));let n=setInterval(t,3e3);return()=>clearInterval(n)},[e]),(0,w.useEffect)(()=>{if(!c?.roleId||!e)return;let t=!1;return p(`/roles/${c.roleId}/scores?limit=100`).then(n=>{t||F(n.scores.find(t=>t.taskId===e)??null)}).catch(()=>{t||F(null)}),()=>{t=!0}},[c?.roleId,e]);let B=async()=>{if(e){z(!0);try{await p(`/tasks/${e}/cancel`,{method:`POST`}),d(e=>e&&{...e,status:`cancelled`})}finally{z(!1)}}};if(I)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-red-400`,children:I})]});if(!c)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-slate-500`,children:`Loading...`})]});let V=[`running`,`queued`,`pending`,`paused`].includes(c.status);return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),V&&(0,T.jsxs)(m,{variant:`destructive`,size:`sm`,onClick:()=>void B(),disabled:R,children:[(0,T.jsx)(o,{size:14}),R?`Cancelling...`:`Cancel Task`]})]}),(0,T.jsx)(y,{children:(0,T.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,T.jsx)(g,{variant:h(c.status),children:c.status}),(0,T.jsx)(`span`,{className:`font-mono text-xs text-slate-500`,children:c.id})]}),(0,T.jsx)(`p`,{className:`text-sm text-slate-200 whitespace-pre-wrap`,children:c.prompt})]})})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:r,label:`Created`,value:x(c.createdAt)}),(0,T.jsx)(A,{icon:r,label:`Duration`,value:c.totalDurationMs?S(c.totalDurationMs):c.startedAt?S(Date.now()-c.startedAt):`—`}),(0,T.jsx)(A,{icon:n,label:`Cost`,value:c.costUsd==null?`—`:C(c.costUsd)}),(0,T.jsx)(A,{icon:a,label:`Turns`,value:String(c.numTurns??`—`)})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:s,label:`Role`,value:c.roleId??`—`,mono:!0}),(0,T.jsx)(A,{icon:i,label:`Parent`,value:c.parentId??`—`,mono:!0}),c.templateId?(0,T.jsxs)(u,{to:`/work`,className:`block`,children:[(0,T.jsx)(A,{icon:i,label:`Template`,value:c.templateId,mono:!0}),(0,T.jsx)(`span`,{className:`mt-0.5 block text-xs text-blue-400 hover:text-blue-300`,children:`View in Automations →`})]}):(0,T.jsx)(A,{icon:i,label:`Template`,value:`—`,mono:!0}),c.sourceSessionId&&(0,T.jsx)(A,{icon:a,label:`Source Session`,value:c.sourceSessionId.slice(0,8),mono:!0})]}),(c.deliverTo||c.reportTo)&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Delivery Targets`})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[c.deliverTo&&c.deliverTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Output`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.deliverTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`d-${t}`))})]}),c.reportTo&&c.reportTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Status Reports`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.reportTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`r-${t}`))})]})]})]}),P&&(c.status===`completed`||c.status===`failed`)&&(0,T.jsx)(k,{score:P}),c.tokenUsage&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Token Usage`})}),(0,T.jsxs)(`div`,{className:`flex gap-6 text-sm`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Input:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.input.toLocaleString()})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Output:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.output.toLocaleString()})]})]})]}),b.length>0&&(()=>{let e=b[0],t=e.plan.overallRisk===`high`?`destructive`:e.plan.overallRisk===`medium`?`warning`:`secondary`;return(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(v,{children:`Execution Plan`}),(0,T.jsxs)(g,{variant:t,children:[e.plan.overallRisk.toUpperCase(),` RISK`]}),(0,T.jsx)(g,{variant:`outline`,children:e.status})]})}),(0,T.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,e.plan.steps.length,`)`]}),(0,T.jsx)(`div`,{className:`space-y-2`,children:e.plan.steps.map(e=>(0,T.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,T.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,T.jsx)(g,{variant:e.riskLevel===`high`?`destructive`:e.riskLevel===`medium`?`warning`:`secondary`,children:e.riskLevel})]}),(0,T.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]}),e.expectedOutput&&(0,T.jsxs)(`div`,{className:`mt-0.5 text-xs text-slate-500`,children:[`Expected: `,e.expectedOutput]})]},e.index))}),Object.keys(e.plan.requiredPermissions).length>0&&(0,T.jsxs)(`div`,{className:`mt-2`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(e.plan.requiredPermissions).map(e=>(0,T.jsx)(g,{variant:`secondary`,children:e},e))})]}),e.deviationReport&&(0,T.jsxs)(`div`,{className:`mt-3 rounded-md border border-amber-900/50 bg-amber-950/20 p-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-amber-400 mb-2`,children:`Deviation Report`}),(0,T.jsxs)(`div`,{className:`text-xs text-slate-400 mb-2`,children:[`Planned: `,e.deviationReport.stepsPlanned,` | Executed: `,e.deviationReport.stepsExecuted,` | Accuracy: `,(e.deviationReport.overallAccuracy*100).toFixed(0),`%`]}),e.deviationReport.deviations.length>0&&(0,T.jsx)(`div`,{className:`space-y-1`,children:e.deviationReport.deviations.map((e,t)=>(0,T.jsxs)(`div`,{className:`text-xs`,children:[(0,T.jsxs)(`span`,{className:`text-amber-400 font-mono`,children:[`[`,e.deviationType,`]`]}),(0,T.jsxs)(`span`,{className:`text-slate-400`,children:[` Step `,e.stepIndex,`: `]}),(0,T.jsx)(`span`,{className:`text-slate-300`,children:e.actual})]},t))})]}),e.learnedRules&&e.learnedRules.length>0&&(0,T.jsxs)(`div`,{className:`mt-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-2`,children:`Learned Rules`}),(0,T.jsx)(`ul`,{className:`space-y-1`,children:e.learnedRules.map((e,t)=>(0,T.jsxs)(`li`,{className:`text-xs text-slate-400 flex items-start gap-1.5`,children:[(0,T.jsx)(`span`,{className:`text-blue-400 mt-0.5`,children:`*`}),e]},t))})]})]})})(),O.length>0&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(v,{children:[`Execution Timeline (`,O.length,` steps)`]})}),(0,T.jsx)(D,{logs:O})]}),c.result&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Result`})}),(0,T.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-slate-800 p-3 font-mono text-xs text-slate-300`,children:c.result})]}),c.error&&(()=>{let e=[`plugin`,`--plugin-dir`,`failed to load plugin`],t=c.error.toLowerCase(),n=e.some(e=>t.includes(e)),r=n?c.error.split(`
|
|
2
2
|
`).find(t=>e.some(e=>t.toLowerCase().includes(e))):null;return(0,T.jsxs)(y,{className:n?`border-red-500`:``,children:[(0,T.jsx)(_,{children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(v,{children:`Error`}),n&&(0,T.jsx)(g,{variant:`warning`,children:`Plugin Issue`})]})}),n&&r&&(0,T.jsx)(`div`,{className:`mb-2 rounded bg-amber-950/30 px-2 py-1 text-xs text-amber-400`,children:r}),(0,T.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-red-950/30 p-3 font-mono text-xs text-red-400`,children:c.error})]})})(),M.length>0&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(v,{children:[`Delivery Status (`,M.length,`)`]})}),(0,T.jsx)(`div`,{className:`space-y-2`,children:M.map(e=>{let t=e.status===`delivered`?`default`:e.status===`pending`?`secondary`:`destructive`,n=e.target.type===`webhook`?e.target.webhookUrl:e.target.type===`channel`?`channel ${e.target.channelId.slice(0,8)}`:`session ${e.target.sessionId?.slice(0,8)}`;return(0,T.jsxs)(`div`,{className:`flex items-start gap-3 text-sm`,children:[(0,T.jsx)(g,{variant:t,className:`mt-0.5 shrink-0`,children:e.status}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-slate-400`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono truncate`,children:n}),e.messageType&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-600`,children:[`(`,e.messageType,`)`]})]}),e.error&&(0,T.jsx)(`p`,{className:`text-xs text-red-400 mt-0.5`,children:e.error}),(0,T.jsxs)(`p`,{className:`text-xs text-slate-600 mt-0.5`,children:[x(e.createdAt),e.deliveredAt&&` \u2192 ${x(e.deliveredAt)}`]})]})]},e.id)})})]})]})}function k({score:e}){let t=[{label:`Task Success`,value:e.scores.taskSuccess,weight:`30%`},{label:`Plan Accuracy`,value:e.scores.planAccuracy,weight:`25%`},{label:`Permission Compliance`,value:e.scores.permissionCompliance,weight:`25%`},{label:`Efficiency`,value:e.scores.efficiency,weight:`20%`}];return(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Quality Score`})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[t.map(e=>(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`mb-1 flex items-center justify-between text-xs`,children:[(0,T.jsxs)(`span`,{className:`text-slate-400`,children:[e.label,` `,(0,T.jsxs)(`span`,{className:`text-slate-600`,children:[`(`,e.weight,`)`]})]}),(0,T.jsxs)(`span`,{className:`font-mono text-slate-300`,children:[(e.value*100).toFixed(0),`%`]})]}),(0,T.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-slate-800`,children:(0,T.jsx)(`div`,{className:`h-full rounded-full ${e.value<.4?`bg-red-500`:`bg-blue-600`}`,style:{width:`${e.value*100}%`}})})]},e.label)),(0,T.jsxs)(`div`,{className:`mt-2 flex items-center justify-between border-t border-slate-800 pt-2`,children:[(0,T.jsx)(`span`,{className:`text-sm text-slate-300`,children:`Weighted Score`}),(0,T.jsxs)(`span`,{className:`font-mono text-sm font-semibold text-slate-100`,children:[(e.scores.weighted*100).toFixed(0),`%`]})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`span`,{className:`text-sm text-slate-300`,children:`EMA (after this task)`}),(0,T.jsxs)(`span`,{className:`font-mono text-sm font-semibold ${e.emaScore<.4?`text-red-400`:`text-emerald-400`}`,children:[(e.emaScore*100).toFixed(0),`%`]})]})]})]})}function A({icon:e,label:t,value:n,mono:r}){return(0,T.jsxs)(y,{className:`flex flex-col gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5 text-slate-500`,children:[(0,T.jsx)(e,{size:12}),(0,T.jsx)(`span`,{className:`text-xs`,children:t})]}),(0,T.jsx)(`span`,{className:`text-sm text-slate-200 truncate ${r?`font-mono text-xs`:``}`,children:n})]})}export{O as TaskDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{I as t,J as n,S as r,U as i,X as a,Y as o,h as s,k as c,nt as l,o as u,v as d,x as f}from"./vendor-icons-CkI4-NxL.js";import{r as p,t as m}from"./vendor-react-DLRtONKt.js";import{n as h,r as g}from"./dist-HyCSN_hp.js";import{C as _,S as v,_ as y,a as b,b as x,c as S,f as C,g as w,h as T,i as E,l as D,m as O,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe,v as k,w as A,x as j}from"./index-CaHdOfAc.js";import{t as M}from"./Card-4mOZntHG.js";import{a as se,o as ce,t as le}from"./format-DvtQjPZn.js";import{t as ue}from"./EmptyState-BlgMMAr-.js";import{a as de,i as N,n as fe,o as pe,r as P,t as me}from"./Table-BxbnOSbq.js";import{Goals as he,t as ge}from"./Goals-CHPEg0RK.js";import{t as _e}from"./Switch-Q-inggPs.js";var F=e(l(),1),I=m();function ve(e){let t=e+`CollectionProvider`,[n,r]=v(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=F.useRef(null),a=F.useRef(new Map).current;return(0,I.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=w(s),l=F.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,I.jsx)(c,{ref:j(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=w(u),p=F.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=F.useRef(null),s=j(t,o),c=a(u,n);return F.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,I.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return F.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var ye=F.createContext(void 0);function be(e){let t=F.useContext(ye);return e||t||`ltr`}var L=`rovingFocusGroup.onEntryFocus`,xe={bubbles:!1,cancelable:!0},R=`RovingFocusGroup`,[z,B,Se]=ve(R),[Ce,we]=v(R,[Se]),[V,Te]=Ce(R),H=F.forwardRef((e,t)=>(0,I.jsx)(z.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(z.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Ee,{...e,ref:t})})}));H.displayName=R;var Ee=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=F.useRef(null),p=j(t,f),m=be(a),[h,g]=y({prop:o,defaultProp:s??null,onChange:c,caller:R}),[_,v]=F.useState(!1),b=O(l),S=B(n),C=F.useRef(!1),[w,E]=F.useState(0);return F.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(L,b),()=>e.removeEventListener(L,b)},[b]),(0,I.jsx)(V,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:F.useCallback(e=>g(e),[g]),onItemShiftTab:F.useCallback(()=>v(!0),[]),onFocusableItemAdd:F.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:F.useCallback(()=>E(e=>e-1),[]),children:(0,I.jsx)(T.div,{tabIndex:_||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:x(e.onMouseDown,()=>{C.current=!0}),onFocus:x(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(L,xe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);ke([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:x(e.onBlur,()=>v(!1))})})}),U=`RovingFocusGroupItem`,De=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=k(),l=a||c,u=Te(U,n),d=u.currentTabStopId===l,f=B(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return F.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(z.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(T.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:x(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:x(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:x(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Oe(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Ae(n,r+1):n.slice(r+1)}setTimeout(()=>ke(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});De.displayName=U;var W={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function G(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Oe(e,t,n){let r=G(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return W[r]}function ke(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ae(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var je=H,K=De,q=`Tabs`,[J,Me]=v(q,[we]),Y=we(),[Ne,X]=J(q),Pe=F.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=be(s),[d,f]=y({prop:r,onChange:i,defaultProp:a??``,caller:q});return(0,I.jsx)(Ne,{scope:n,baseId:k(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(T.div,{dir:u,"data-orientation":o,...l,ref:t})})});Pe.displayName=q;var Z=`TabsList`,Fe=F.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=X(Z,n),o=Y(n);return(0,I.jsx)(je,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(T.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Fe.displayName=Z;var Ie=`TabsTrigger`,Q=F.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=X(Ie,n),s=Y(n),c=ze(o.baseId,r),l=Be(o.baseId,r),u=r===o.value;return(0,I.jsx)(K,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(T.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:x(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:x(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:x(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Q.displayName=Ie;var Le=`TabsContent`,Re=F.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=X(Le,n),c=ze(s.baseId,r),l=Be(s.baseId,r),u=r===s.value,d=F.useRef(u);return F.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(ne,{present:i||u,children:({present:n})=>(0,I.jsx)(T.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});Re.displayName=Le;function ze(e,t){return`${e}-trigger-${t}`}function Be(e,t){return`${e}-content-${t}`}var Ve=Pe,He=Fe,Ue=Q,We=Re,Ge=Ve,Ke=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(He,{ref:n,className:h(`inline-flex h-9 items-center justify-center rounded-lg bg-slate-800/50 p-1 text-slate-400`,e),...t}));Ke.displayName=He.displayName;var qe=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(Ue,{ref:n,className:h(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-slate-950 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-slate-900 data-[state=active]:text-slate-100 data-[state=active]:shadow`,e),...t}));qe.displayName=Ue.displayName;var Je=F.forwardRef(({className:e,...t},n)=>(0,I.jsx)(We,{ref:n,className:h(`mt-2 ring-offset-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`,e),...t}));Je.displayName=We.displayName;var Ye=[{label:`All`,value:`all`},{label:`Running`,value:`running`},{label:`Pending`,value:`pending`},{label:`Completed`,value:`completed`},{label:`Failed`,value:`failed`},{label:`Cancelled`,value:`cancelled`}],$=new Set([`pending`,`queued`,`running`,`paused`]);function Xe(){let e=_(e=>e.tasks),t=_(e=>e.fetchTasks),[n,r]=(0,F.useState)(`all`),[o,l]=(0,F.useState)(!1),[u,f]=(0,F.useState)(``),[m,h]=(0,F.useState)(!1),[v,y]=(0,F.useState)(new Set),[b,x]=(0,F.useState)(!1);(0,F.useEffect)(()=>{let e=n===`all`?void 0:n;t(e);let r=setInterval(()=>void t(e),5e3);return()=>clearInterval(r)},[t,n]),(0,F.useEffect)(()=>{y(new Set)},[n]);let S=async()=>{if(u.trim()){h(!0);try{await g(`/tasks`,{method:`POST`,body:JSON.stringify({prompt:u.trim()})}),f(``),l(!1),t(n===`all`?void 0:n)}finally{h(!1)}}},w=e=>{y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},T=()=>{let e=D.filter(e=>$.has(e.status)).map(e=>e.id);y(new Set(e))},E=async()=>{if(v.size!==0){x(!0);try{await g(`/tasks/batch-cancel`,{method:`POST`,body:JSON.stringify({taskIds:Array.from(v)})}),y(new Set),t(n===`all`?void 0:n)}finally{x(!1)}}},D=[...e].sort((e,t)=>t.createdAt-e.createdAt),O=Array.from(v).filter(t=>{let n=e.find(e=>e.id===t);return n&&$.has(n.status)});return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Tasks`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[v.size>0&&(0,I.jsxs)(C,{variant:`destructive`,size:`sm`,onClick:()=>void E(),disabled:b||O.length===0,children:[(0,I.jsx)(i,{size:14}),b?`Cancelling...`:`Cancel ${O.length} task${O.length===1?``:`s`}`]}),(0,I.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>void t(n===`all`?void 0:n),children:(0,I.jsx)(s,{size:14})}),(0,I.jsxs)(C,{size:`sm`,onClick:()=>l(!o),children:[(0,I.jsx)(d,{size:14}),`New Task`]})]})]}),o&&(0,I.jsxs)(M,{className:`flex gap-2`,children:[(0,I.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Enter task prompt...`,value:u,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Enter`&&S()}}),(0,I.jsx)(C,{onClick:()=>void S(),disabled:m||!u.trim(),children:m?`Creating...`:`Create`}),(0,I.jsx)(C,{variant:`ghost`,onClick:()=>l(!1),children:`Cancel`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`flex gap-1.5`,children:Ye.map(e=>(0,I.jsx)(`button`,{onClick:()=>r(e.value),className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${n===e.value?`bg-slate-800 text-slate-100`:`text-slate-500 hover:text-slate-300`}`,children:e.label},e.value))}),D.some(e=>$.has(e.status))&&(0,I.jsx)(`button`,{onClick:T,className:`text-xs text-slate-500 hover:text-slate-300`,children:`Select all cancellable`}),v.size>0&&(0,I.jsxs)(`button`,{onClick:()=>y(new Set),className:`text-xs text-slate-500 hover:text-slate-300`,children:[`Clear selection (`,v.size,`)`]})]}),(0,I.jsx)(M,{padding:!1,children:D.length===0?(0,I.jsx)(ue,{icon:(0,I.jsx)(c,{size:32}),title:`No tasks found`,description:n===`all`?`Create a task to get started`:`No tasks with status "${n}"`}):(0,I.jsxs)(me,{children:[(0,I.jsx)(de,{children:(0,I.jsxs)(pe,{children:[(0,I.jsx)(N,{className:`w-8`,children:(0,I.jsx)(`button`,{onClick:()=>{v.size>0&&v.size===D.filter(e=>$.has(e.status)).length?y(new Set):T()},className:`flex h-4 w-4 items-center justify-center rounded border transition-colors ${v.size>0&&v.size===D.filter(e=>$.has(e.status)).length?`border-blue-600 bg-blue-600 text-white`:`border-slate-600 bg-transparent hover:border-slate-400`}`,children:v.size>0&&v.size===D.filter(e=>$.has(e.status)).length&&(0,I.jsx)(a,{size:12})})}),(0,I.jsx)(N,{children:`ID`}),(0,I.jsx)(N,{children:`Prompt`}),(0,I.jsx)(N,{children:`Status`}),(0,I.jsx)(N,{children:`Role`}),(0,I.jsx)(N,{children:`Cost`}),(0,I.jsx)(N,{children:`Created`})]})}),(0,I.jsx)(fe,{children:D.map(e=>(0,I.jsxs)(pe,{className:v.has(e.id)?`bg-slate-800/50`:``,children:[(0,I.jsx)(P,{children:$.has(e.status)?(0,I.jsx)(`button`,{onClick:()=>w(e.id),className:`flex h-4 w-4 items-center justify-center rounded border transition-colors ${v.has(e.id)?`border-blue-600 bg-blue-600 text-white`:`border-slate-600 bg-transparent hover:border-slate-400`}`,children:v.has(e.id)&&(0,I.jsx)(a,{size:12})}):(0,I.jsx)(`span`,{className:`inline-block w-4`})}),(0,I.jsx)(P,{children:(0,I.jsx)(p,{to:`/tasks/${e.id}`,className:`font-mono text-xs text-blue-400 hover:text-blue-300`,children:e.id.slice(0,8)})}),(0,I.jsx)(P,{children:ce(e.prompt,80)}),(0,I.jsx)(P,{children:(0,I.jsx)(ae,{variant:ee(e.status),children:e.status})}),(0,I.jsx)(P,{children:(0,I.jsx)(`span`,{className:`font-mono text-xs text-slate-500`,children:e.roleId?e.roleId.slice(0,12):`—`})}),(0,I.jsx)(P,{className:`font-mono text-xs`,children:e.costUsd==null?`—`:le(e.costUsd)}),(0,I.jsx)(P,{className:`text-xs text-slate-500`,children:se(e.createdAt)})]},e.id))})]})})]})}function Ze(e){return`step-${e+1}`}function Qe(){let e=_(e=>e.templates),i=_(e=>e.fetchTemplates),a=_(e=>e.goals),c=_(e=>e.fetchGoals),l=_(e=>e.roles),p=_(e=>e.fetchRoles),[m,h]=(0,F.useState)(!1),[v,y]=(0,F.useState)(``),[x,w]=(0,F.useState)(`manual`),[T,O]=(0,F.useState)(``),[ee,ne]=(0,F.useState)(``),[k,j]=(0,F.useState)([{id:`step-1`,prompt:``}]),[ce,le]=(0,F.useState)(!1),[he,ve]=(0,F.useState)(!1),[ye,be]=(0,F.useState)(null),[L,xe]=(0,F.useState)(null),[R,z]=(0,F.useState)(null),[B,Se]=(0,F.useState)(null),[Ce,we]=(0,F.useState)(``),[V,Te]=(0,F.useState)(`manual`),[H,Ee]=(0,F.useState)(``),[U,De]=(0,F.useState)(``),[W,G]=(0,F.useState)([]),[Oe,ke]=(0,F.useState)(!1),[Ae,je]=(0,F.useState)(!1),[K,q]=(0,F.useState)(`prompt`),[J,Me]=(0,F.useState)([]),[Y,Ne]=(0,F.useState)([]),[X,Pe]=(0,F.useState)([]),[Z,Fe]=(0,F.useState)(null),[Ie,Q]=(0,F.useState)([]),[Le,Re]=(0,F.useState)(!1),ze=(0,F.useCallback)(async e=>{Re(!0);try{let t=await g(`/workflow-executions?templateId=${e}&limit=5`);Q(await Promise.all(t.executions.map(async e=>{try{let t=await g(`/workflow-executions/${e.id}`);return{...t.execution,stepTasks:t.stepTasks}}catch{return{...e,stepTasks:[]}}})))}catch{Q([])}finally{Re(!1)}},[]),Be=(0,F.useCallback)(e=>{Z===e?(Fe(null),Q([])):(Fe(e),ze(e))},[Z,ze]);(0,F.useEffect)(()=>{i(),c(),p()},[i,c,p]);let Ve=async()=>{if(v.trim()&&!(K===`prompt`&&k.every(e=>!e.prompt.trim()))&&!(K===`goal`&&J.length===0)){ve(!0);try{let e={name:v.trim(),trigger:{type:x,...x===`cron`&&T?{cron:T}:{},...x===`once`&&ee?{runAt:new Date(ee).toISOString()}:{}},enabled:!0,...Y.length>0?{deliverTo:Y}:{},...ce?{config:{continueOnError:!0}}:{}};K===`prompt`?e.steps=k.filter(e=>e.prompt.trim()).map((e,t)=>({id:e.id||Ze(t),prompt:e.prompt.trim(),...e.roleId?{roleId:e.roleId}:{},...e.dependsOn&&e.dependsOn.length>0?{dependsOn:e.dependsOn}:{},...e.config&&(e.config.timeout!==void 0||e.config.maxTurns!==void 0)?{config:e.config}:{}})):(e.goalIds=J,e.steps=[]),await g(`/task-templates`,{method:`POST`,body:JSON.stringify(e)}),y(``),j([{id:`step-1`,prompt:``}]),O(``),ne(``),Me([]),Ne([]),h(!1),i()}finally{ve(!1)}}},He=async t=>{let n=e.find(e=>e.id===t);be(t);try{await g(`/task-templates/${t}/run`,{method:`POST`}),A.success(`Triggered: ${n?.name??t}`)}catch(e){let t=e instanceof Error?e.message:`Failed to trigger template`;A.error(`Trigger failed: ${t}`)}finally{be(null)}},Ue=async t=>{let n=e.find(e=>e.id===t);try{await g(`/task-templates/${t}`,{method:`DELETE`}),A.success(`Deleted: ${n?.name??t}`),i()}catch(e){let t=e instanceof Error?e.message:`Failed to delete template`;A.error(`Delete failed: ${t}`)}},We=async t=>{let n=e.find(e=>e.id===t);if(!n)return;if(n.trigger.type!==`cron`&&n.trigger.type!==`event`&&n.trigger.type!==`once`){A.error(`Toggle not applicable for manual triggers`);return}let r=!n.enabled;try{await g(`/task-templates/${t}`,{method:`PATCH`,body:JSON.stringify({enabled:r})}),A.success(`${n.name} ${r?`enabled`:`disabled`}`),i()}catch(e){let t=e instanceof Error?e.message:`Failed to toggle template`;A.error(`Toggle failed: ${t}`)}},Ge=e=>{Se(e.id),we(e.name),Te(e.trigger.type),Ee(e.trigger.cron??``),De(e.trigger.runAt?new Date(e.trigger.runAt).toISOString().slice(0,16):``),G(e.steps.map(e=>({id:e.id,prompt:e.prompt,roleId:e.roleId,dependsOn:e.dependsOn,config:e.config}))),ke(e.config?.continueOnError??!1),Pe(e.deliverTo??[])},Ke=async()=>{if(!(!B||!Ce.trim()||W.every(e=>!e.prompt.trim()))){je(!0);try{await g(`/task-templates/${B}`,{method:`PATCH`,body:JSON.stringify({name:Ce.trim(),trigger:{type:V,...V===`cron`&&H?{cron:H}:{},...V===`once`&&U?{runAt:new Date(U).toISOString()}:{}},steps:W.filter(e=>e.prompt.trim()).map((e,t)=>({id:e.id||Ze(t),prompt:e.prompt.trim(),...e.roleId?{roleId:e.roleId}:{},...e.dependsOn&&e.dependsOn.length>0?{dependsOn:e.dependsOn}:{},...e.config&&(e.config.timeout!==void 0||e.config.maxTurns!==void 0)?{config:e.config}:{}})),enabled:e.find(e=>e.id===B)?.enabled??!0,...Oe?{config:{continueOnError:!0}}:{config:{}},deliverTo:X.length>0?X:void 0})}),Se(null),i(),A.success(`Template updated`)}catch(e){let t=e instanceof Error?e.message:`Failed to update template`;A.error(t)}finally{je(!1)}}},qe=e.find(e=>e.id===L),Je=e.find(e=>e.id===R);return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Automations`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:(0,I.jsx)(s,{size:14})}),(0,I.jsxs)(C,{size:`sm`,onClick:()=>h(!m),children:[(0,I.jsx)(d,{size:14}),`New Automation`]})]})]}),m&&(0,I.jsxs)(M,{className:`space-y-3`,children:[(0,I.jsx)(`input`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Template name`,value:v,onChange:e=>y(e.target.value)}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(`select`,{className:`rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:x,onChange:e=>w(e.target.value),children:[(0,I.jsx)(`option`,{value:`manual`,children:`Manual`}),(0,I.jsx)(`option`,{value:`cron`,children:`Cron`}),(0,I.jsx)(`option`,{value:`event`,children:`Event`}),(0,I.jsx)(`option`,{value:`once`,children:`Once`})]}),x===`cron`&&(0,I.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Cron expression (e.g. */5 * * * *)`,value:T,onChange:e=>O(e.target.value)}),x===`once`&&(0,I.jsx)(`input`,{type:`datetime-local`,className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:ee,onChange:e=>ne(e.target.value)})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,I.jsx)(`span`,{className:`text-xs text-slate-400`,children:`Action type:`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>q(`prompt`),className:`rounded px-2 py-1 text-xs ${K===`prompt`?`bg-blue-600 text-white`:`bg-slate-800 text-slate-400 hover:text-slate-300`}`,children:`Custom Prompt`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>q(`goal`),className:`rounded px-2 py-1 text-xs ${K===`goal`?`bg-blue-600 text-white`:`bg-slate-800 text-slate-400 hover:text-slate-300`}`,children:`Goal Reference`})]})]}),K===`prompt`?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`text-xs text-slate-400`,children:`Steps`}),(0,I.jsxs)(C,{variant:`ghost`,size:`sm`,onClick:()=>j([...k,{id:Ze(k.length),prompt:``}]),children:[(0,I.jsx)(d,{size:12}),` Add Step`]})]}),k.map((e,t)=>(0,I.jsxs)(`div`,{className:`rounded-md border border-slate-700 p-2 space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-mono text-slate-500`,children:e.id}),(0,I.jsxs)(`select`,{className:`flex-1 rounded border border-slate-700 bg-slate-800 px-2 py-1 text-xs text-slate-200`,value:e.roleId??``,onChange:n=>{let r=[...k];r[t]={...e,roleId:n.target.value||void 0},j(r)},children:[(0,I.jsx)(`option`,{value:``,children:`Role (template default)`}),l.filter(e=>e.source!==`system`).map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),k.length>1&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>j(k.filter((e,n)=>n!==t)),className:`text-red-400 hover:text-red-300`,children:(0,I.jsx)(u,{size:12})})]}),(0,I.jsx)(`textarea`,{className:`w-full rounded border border-slate-700 bg-slate-800 px-2 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Step ${t+1} prompt${t>0?` (use {{`+k[t-1].id+`.result}} for prev output)`:``}`,rows:2,value:e.prompt,onChange:n=>{let r=[...k];r[t]={...e,prompt:n.target.value},j(r)}}),t>0&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`span`,{className:`text-[10px] text-slate-500`,children:`depends on:`}),k.slice(0,t).map(n=>(0,I.jsx)(`button`,{type:`button`,onClick:()=>{let r=e.dependsOn??[],i=[...k];i[t]={...e,dependsOn:r.includes(n.id)?r.filter(e=>e!==n.id):[...r,n.id]},j(i)},className:`rounded px-1.5 py-0.5 text-[10px] ${(e.dependsOn??[]).includes(n.id)?`bg-blue-600 text-white`:`bg-slate-800 text-slate-500 hover:text-slate-300`}`,children:n.id},n.id))]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`label`,{className:`flex items-center gap-1 text-[10px] text-slate-500`,children:[`timeout(s):`,(0,I.jsx)(`input`,{type:`number`,min:0,placeholder:`default`,className:`w-20 rounded border border-slate-700 bg-slate-800 px-1.5 py-0.5 text-xs text-slate-200`,value:e.config?.timeout??``,onChange:n=>{let r=[...k],i=n.target.value===``?void 0:Number(n.target.value);r[t]={...e,config:{...e.config,timeout:i}},j(r)}})]}),(0,I.jsxs)(`label`,{className:`flex items-center gap-1 text-[10px] text-slate-500`,children:[`max turns:`,(0,I.jsx)(`input`,{type:`number`,min:0,placeholder:`default`,className:`w-20 rounded border border-slate-700 bg-slate-800 px-1.5 py-0.5 text-xs text-slate-200`,value:e.config?.maxTurns??``,onChange:n=>{let r=[...k],i=n.target.value===``?void 0:Number(n.target.value);r[t]={...e,config:{...e.config,maxTurns:i}},j(r)}})]})]})]},e.id))]}):(0,I.jsx)(`div`,{className:`space-y-1`,children:a.length===0?(0,I.jsx)(`p`,{className:`text-xs text-slate-500`,children:`No goals available`}):a.map(e=>(0,I.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-slate-300 hover:text-slate-100 cursor-pointer`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:J.includes(e.id),onChange:t=>{t.target.checked?Me([...J,e.id]):Me(J.filter(t=>t!==e.id))},className:`rounded border-slate-600 bg-slate-800`}),(0,I.jsx)(`span`,{className:`truncate`,children:e.name}),(0,I.jsx)(ae,{variant:`muted`,className:`text-[10px]`,children:e.status})]},e.id))}),k.length>1&&(0,I.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-slate-300 cursor-pointer`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:ce,onChange:e=>le(e.target.checked),className:`rounded border-slate-600 bg-slate-800`}),`Continue on error (skip failed step dependents, run independent steps)`]}),(0,I.jsx)(ge,{value:Y,onChange:Ne}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(C,{onClick:()=>void Ve(),disabled:he||!v.trim()||K===`prompt`&&k.every(e=>!e.prompt.trim())||K===`goal`&&J.length===0,children:he?`Creating...`:`Create`}),(0,I.jsx)(C,{variant:`ghost`,onClick:()=>h(!1),children:`Cancel`})]})]}),B!==null&&(0,I.jsxs)(M,{className:`space-y-3`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-slate-200`,children:`Edit Automation`}),(0,I.jsx)(`input`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Template name`,value:Ce,onChange:e=>we(e.target.value)}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(`select`,{className:`rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:V,onChange:e=>Te(e.target.value),children:[(0,I.jsx)(`option`,{value:`manual`,children:`Manual`}),(0,I.jsx)(`option`,{value:`cron`,children:`Cron`}),(0,I.jsx)(`option`,{value:`event`,children:`Event`}),(0,I.jsx)(`option`,{value:`once`,children:`Once`})]}),V===`cron`&&(0,I.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Cron expression`,value:H,onChange:e=>Ee(e.target.value)}),V===`once`&&(0,I.jsx)(`input`,{type:`datetime-local`,className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:U,onChange:e=>De(e.target.value)})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`text-xs text-slate-400`,children:`Steps`}),(0,I.jsxs)(C,{variant:`ghost`,size:`sm`,onClick:()=>G([...W,{id:Ze(W.length),prompt:``}]),children:[(0,I.jsx)(d,{size:12}),` Add Step`]})]}),W.map((e,t)=>(0,I.jsxs)(`div`,{className:`rounded-md border border-slate-700 p-2 space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[10px] font-mono text-slate-500`,children:e.id}),(0,I.jsxs)(`select`,{className:`flex-1 rounded border border-slate-700 bg-slate-800 px-2 py-1 text-xs text-slate-200`,value:e.roleId??``,onChange:n=>{let r=[...W];r[t]={...e,roleId:n.target.value||void 0},G(r)},children:[(0,I.jsx)(`option`,{value:``,children:`Role (template default)`}),l.filter(e=>e.source!==`system`).map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),W.length>1&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>G(W.filter((e,n)=>n!==t)),className:`text-red-400 hover:text-red-300`,children:(0,I.jsx)(u,{size:12})})]}),(0,I.jsx)(`textarea`,{className:`w-full rounded border border-slate-700 bg-slate-800 px-2 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Step ${t+1} prompt`,rows:2,value:e.prompt,onChange:n=>{let r=[...W];r[t]={...e,prompt:n.target.value},G(r)}}),t>0&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`span`,{className:`text-[10px] text-slate-500`,children:`depends on:`}),W.slice(0,t).map(n=>(0,I.jsx)(`button`,{type:`button`,onClick:()=>{let r=e.dependsOn??[],i=[...W];i[t]={...e,dependsOn:r.includes(n.id)?r.filter(e=>e!==n.id):[...r,n.id]},G(i)},className:`rounded px-1.5 py-0.5 text-[10px] ${(e.dependsOn??[]).includes(n.id)?`bg-blue-600 text-white`:`bg-slate-800 text-slate-500 hover:text-slate-300`}`,children:n.id},n.id))]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`label`,{className:`flex items-center gap-1 text-[10px] text-slate-500`,children:[`timeout(s):`,(0,I.jsx)(`input`,{type:`number`,min:0,placeholder:`default`,className:`w-20 rounded border border-slate-700 bg-slate-800 px-1.5 py-0.5 text-xs text-slate-200`,value:e.config?.timeout??``,onChange:n=>{let r=[...W],i=n.target.value===``?void 0:Number(n.target.value);r[t]={...e,config:{...e.config,timeout:i}},G(r)}})]}),(0,I.jsxs)(`label`,{className:`flex items-center gap-1 text-[10px] text-slate-500`,children:[`max turns:`,(0,I.jsx)(`input`,{type:`number`,min:0,placeholder:`default`,className:`w-20 rounded border border-slate-700 bg-slate-800 px-1.5 py-0.5 text-xs text-slate-200`,value:e.config?.maxTurns??``,onChange:n=>{let r=[...W],i=n.target.value===``?void 0:Number(n.target.value);r[t]={...e,config:{...e.config,maxTurns:i}},G(r)}})]})]})]},e.id))]}),W.length>1&&(0,I.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-slate-300 cursor-pointer`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:Oe,onChange:e=>ke(e.target.checked),className:`rounded border-slate-600 bg-slate-800`}),`Continue on error`]}),(0,I.jsx)(ge,{value:X,onChange:Pe}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(C,{onClick:()=>void Ke(),disabled:Ae||!Ce.trim()||W.every(e=>!e.prompt.trim()),children:Ae?`Saving...`:`Save`}),(0,I.jsx)(C,{variant:`ghost`,onClick:()=>Se(null),children:`Cancel`})]})]}),(0,I.jsx)(M,{padding:!1,children:e.length===0?(0,I.jsx)(ue,{icon:(0,I.jsx)(t,{size:32}),title:`No automations`,description:`Create an automation to run recurring tasks`}):(0,I.jsxs)(me,{children:[(0,I.jsx)(de,{children:(0,I.jsxs)(pe,{children:[(0,I.jsx)(N,{children:`Name`}),(0,I.jsx)(N,{children:`Trigger`}),(0,I.jsx)(N,{children:`Schedule`}),(0,I.jsx)(N,{children:`Steps`}),(0,I.jsx)(N,{children:`Enabled`}),(0,I.jsx)(N,{children:`Created`}),(0,I.jsx)(N,{children:`Webhook URL`}),(0,I.jsx)(N,{children:`Actions`})]})}),(0,I.jsx)(fe,{children:e.map(e=>(0,I.jsxs)(F.Fragment,{children:[(0,I.jsxs)(pe,{children:[(0,I.jsx)(P,{className:`font-medium text-slate-200`,children:(0,I.jsxs)(`button`,{type:`button`,onClick:()=>Be(e.id),className:`flex items-center gap-1 hover:text-blue-400 transition-colors`,children:[Z===e.id?(0,I.jsx)(o,{size:12}):(0,I.jsx)(n,{size:12}),e.name]})}),(0,I.jsx)(P,{children:(0,I.jsx)(ae,{variant:e.trigger.type===`cron`?`info`:e.trigger.type===`event`?`warning`:(e.trigger.type,`muted`),children:e.trigger.type})}),(0,I.jsx)(P,{className:`font-mono text-xs`,children:e.trigger.type===`once`&&e.trigger.runAt?new Date(e.trigger.runAt).toLocaleString():e.trigger.cron??`—`}),(0,I.jsx)(P,{className:`font-mono text-xs`,children:e.goalIds&&e.goalIds.length>0?`Goals: ${e.goalIds.length}`:(()=>{let t=new Set(e.steps.filter(e=>e.roleId).map(e=>e.roleId));return t.size>0?`${e.steps.length} steps / ${t.size} roles`:String(e.steps.length)})()}),(0,I.jsx)(P,{children:e.trigger.type!==`cron`&&e.trigger.type!==`event`&&e.trigger.type!==`once`?(0,I.jsx)(`span`,{className:`text-xs text-slate-500`,children:`—`}):(0,I.jsx)(_e,{checked:e.enabled,onCheckedChange:()=>void We(e.id),"aria-label":`Toggle ${e.name}`})}),(0,I.jsx)(P,{className:`text-xs text-slate-500`,children:e.createdAt?se(e.createdAt):`—`}),(0,I.jsx)(P,{className:`font-mono text-xs text-slate-400`,children:e.enabled?`POST /webhooks/${e.id}`:`—`}),(0,I.jsx)(P,{children:(0,I.jsxs)(`div`,{className:`flex gap-1`,children:[(0,I.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>Ge(e),title:`Edit`,children:(0,I.jsx)(r,{size:12})}),(0,I.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>xe(e.id),disabled:ye===e.id,title:`Run now`,children:(0,I.jsx)(f,{size:12})}),(0,I.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>z(e.id),title:`Delete`,children:(0,I.jsx)(u,{size:12,className:`text-red-400`})})]})})]}),Z===e.id&&(0,I.jsx)(pe,{children:(0,I.jsxs)(P,{colSpan:8,className:`bg-slate-900/50 p-3`,children:[(0,I.jsx)(`div`,{className:`text-xs text-slate-400 mb-2 font-medium`,children:`Recent Executions`}),Le?(0,I.jsx)(`div`,{className:`text-xs text-slate-500`,children:`Loading...`}):Ie.length===0?(0,I.jsx)(`div`,{className:`text-xs text-slate-500`,children:`No executions yet`}):(0,I.jsx)(`div`,{className:`space-y-1.5`,children:Ie.map(t=>{let n=Object.entries(t.stepStatuses),r=n.filter(([,e])=>e.status===`completed`).length,i=n.filter(([,e])=>e.status===`failed`).length,a=n.filter(([,e])=>e.status===`skipped`).length,o=n.filter(([,e])=>e.status===`cancelled`).length,s=n.length,c=new Map(t.stepTasks.filter(e=>e.stepId).map(e=>[e.stepId,e])),u=[...e.steps.map(e=>e.id),...Object.keys(t.stepStatuses).filter(t=>!e.steps.some(e=>e.id===t))];return(0,I.jsxs)(`div`,{className:`rounded border border-slate-800 bg-slate-950/50 p-2.5 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,I.jsx)(ae,{variant:t.status===`completed`?`success`:t.status===`failed`?`destructive`:t.status===`partial`?`warning`:t.status===`cancelled`?`secondary`:`muted`,children:t.status}),(0,I.jsx)(`span`,{className:`text-slate-500`,children:new Date(t.startedAt).toLocaleString()}),s>0&&(0,I.jsxs)(`span`,{className:`text-slate-400`,children:[r,`/`,s,` steps`,i>0&&(0,I.jsxs)(`span`,{className:`text-red-400 ml-1`,children:[i,` failed`]}),a>0&&(0,I.jsxs)(`span`,{className:`text-yellow-400 ml-1`,children:[a,` skipped`]}),o>0&&(0,I.jsxs)(`span`,{className:`text-slate-300 ml-1`,children:[o,` cancelled`]})]}),t.completedAt&&(0,I.jsxs)(`span`,{className:`text-slate-500`,children:[Math.round((t.completedAt-t.startedAt)/1e3),`s`]}),(0,I.jsx)(`span`,{className:`font-mono text-slate-600 truncate max-w-[120px]`,children:t.id.slice(0,8)})]}),(0,I.jsx)(`div`,{className:`space-y-1.5`,children:u.map(n=>{let r=t.stepStatuses[n];if(!r)return null;let i=e.steps.find(e=>e.id===n),a=c.get(n),o=a?.roleId??r.roleId??i?.roleId,s=l.find(e=>e.id===o)?.name??o,u=a?.error??r.error??a?.result??r.result;return(0,I.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto_auto] gap-2 rounded bg-slate-900/60 px-2 py-1.5 text-xs`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`font-mono text-slate-300`,children:n}),s&&(0,I.jsxs)(`span`,{className:`text-yellow-300`,children:[`@`,s]}),i?.dependsOn&&i.dependsOn.length>0&&(0,I.jsxs)(`span`,{className:`text-slate-500`,children:[`after `,i.dependsOn.join(`, `)]})]}),u&&(0,I.jsx)(`div`,{className:`mt-1 truncate ${r.status===`failed`?`text-red-300`:r.status===`skipped`?`text-yellow-300`:r.status===`cancelled`?`text-slate-300`:`text-slate-400`}`,children:u})]}),(0,I.jsx)(ae,{variant:r.status===`completed`?`success`:r.status===`failed`?`destructive`:r.status===`skipped`?`warning`:r.status===`cancelled`?`secondary`:`muted`,children:r.status}),(0,I.jsxs)(`div`,{className:`text-right text-slate-500`,children:[a?.completedAt&&(0,I.jsxs)(`div`,{children:[Math.max(0,Math.round((a.completedAt-a.createdAt)/1e3)),`s`]}),a?.id&&(0,I.jsx)(`div`,{className:`font-mono`,children:a.id.slice(0,8)})]})]},`${t.id}-${n}`)})})]},t.id)})})]})})]},e.id))})]})}),(0,I.jsx)(re,{open:L!==null,onOpenChange:e=>{e||xe(null)},children:(0,I.jsxs)(te,{children:[(0,I.jsxs)(D,{children:[(0,I.jsx)(oe,{children:`Run Template`}),(0,I.jsxs)(ie,{children:[`Run “`,qe?.name,`” now? This will execute the template immediately.`]})]}),(0,I.jsxs)(S,{children:[(0,I.jsx)(b,{children:`Cancel`}),(0,I.jsx)(E,{onClick:()=>{L&&He(L),xe(null)},children:`Run Now`})]})]})}),(0,I.jsx)(re,{open:R!==null,onOpenChange:e=>{e||z(null)},children:(0,I.jsxs)(te,{children:[(0,I.jsxs)(D,{children:[(0,I.jsx)(oe,{children:`Delete Template`}),(0,I.jsxs)(ie,{children:[`Delete “`,Je?.name,`”? This action cannot be undone.`]})]}),(0,I.jsxs)(S,{children:[(0,I.jsx)(b,{children:`Cancel`}),(0,I.jsx)(E,{className:`bg-red-600 hover:bg-red-500`,onClick:()=>{R&&Ue(R),z(null)},children:`Delete`})]})]})})]})}function $e(){return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Work`}),(0,I.jsxs)(Ge,{defaultValue:`tasks`,children:[(0,I.jsxs)(Ke,{children:[(0,I.jsx)(qe,{value:`tasks`,children:`Tasks`}),(0,I.jsx)(qe,{value:`automations`,children:`Automations`}),(0,I.jsx)(qe,{value:`goals`,children:`Goals`})]}),(0,I.jsx)(Je,{value:`tasks`,children:(0,I.jsx)(Xe,{})}),(0,I.jsx)(Je,{value:`automations`,children:(0,I.jsx)(Qe,{})}),(0,I.jsx)(Je,{value:`goals`,children:(0,I.jsx)(he,{})})]})]})}export{$e as Work};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-Bq6sEDdP.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-react-DLRtONKt.js","assets/vendor-icons-CkI4-NxL.js","assets/Card-4mOZntHG.js","assets/dist-HyCSN_hp.js","assets/Table-BxbnOSbq.js","assets/format-DvtQjPZn.js","assets/Chat-Da-mCR0c.js","assets/vendor-state-B_-GdGNJ.js","assets/Work-CF2iLs8i.js","assets/Switch-Q-inggPs.js","assets/EmptyState-BlgMMAr-.js","assets/Goals-CHPEg0RK.js","assets/TaskDetail-BEjZ1gco.js","assets/Plugins-C5xLM0BU.js","assets/Strategies-BbFbLKBJ.js","assets/Logs-BHkBvH0T.js","assets/Settings-eBHvn6s_.js","assets/EnvVarEditor-CNxXpVbD.js","assets/Memories-BY2pJhVd.js","assets/Evolution-DPdmbooj.js","assets/Channels-EXkNOQpB.js","assets/GoalDetail-BamCfVzS.js","assets/ChannelDetail-DX4QnE8j.js","assets/Roles-BVOVoHvc.js","assets/RoleDetail-Dnp-W14x.js","assets/NotFound-CSjhzSGa.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,E as n,F as r,Q as i,T as a,W as o,_ as s,g as c,j as l,k as u,n as d,nt as f,r as p,s as m,t as h,u as g}from"./vendor-icons-CkI4-NxL.js";import{a as _,c as v,f as y,i as b,m as x,n as S,o as C,p as w,s as ee,t as T}from"./vendor-react-DLRtONKt.js";import{a as te,n as E,r as D,t as O}from"./dist-HyCSN_hp.js";import{t as ne}from"./vendor-state-B_-GdGNJ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var k=w(),A=e(f(),1),j=T(),re=class extends A.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[ErrorBoundary] Uncaught error:`,e,t.componentStack)}render(){return this.state.hasError?(0,j.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-slate-950 p-6`,children:(0,j.jsxs)(`div`,{className:`w-full max-w-md rounded-lg border border-slate-800 bg-slate-900 p-8 text-center`,children:[(0,j.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10`,children:(0,j.jsx)(`svg`,{className:`h-6 w-6 text-red-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,j.jsx)(`h1`,{className:`mb-2 text-lg font-semibold text-slate-100`,children:`Something went wrong`}),(0,j.jsx)(`p`,{className:`mb-6 text-sm text-slate-400`,children:`An unexpected error occurred. Try reloading the page.`}),this.state.error&&(0,j.jsx)(`pre`,{className:`mb-6 max-h-32 overflow-auto rounded bg-slate-950 p-3 text-left text-xs text-red-400`,children:this.state.error.message}),(0,j.jsx)(`button`,{onClick:()=>window.location.reload(),className:`rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-slate-900`,children:`Reload`})]})}):this.props.children}},M=[{to:`/`,icon:l,label:`Dashboard`},{to:`/chat`,icon:a,label:`Chat`},{to:`/work`,icon:u,label:`Work`},{to:`/roles`,icon:o,label:`Roles`},{to:`/strategies`,icon:t,label:`Strategies`},{to:`/channels`,icon:c,label:`Channels`},{to:`/memories`,icon:i,label:`Memories`},{to:`/evolution`,icon:r,label:`Evolution`},{to:`/plugins`,icon:s,label:`Plugins`},{to:`/logs`,icon:m,label:`Logs`},{to:`/settings`,icon:g,label:`Settings`}];function N({onNavigate:e}){return(0,j.jsxs)(`aside`,{className:`flex h-full w-60 flex-col border-r border-slate-800 bg-slate-950`,children:[(0,j.jsxs)(`div`,{className:`flex h-14 items-center gap-2.5 border-b border-slate-800 px-5`,children:[(0,j.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-blue-600 text-xs font-bold text-white`,children:`A`}),(0,j.jsx)(`span`,{className:`text-sm font-semibold text-slate-100 tracking-wide`,children:`Adam`}),(0,j.jsx)(`span`,{className:`ml-auto rounded bg-slate-800 px-1.5 py-0.5 font-mono text-[10px] text-slate-500`,children:`v2.0`})]}),(0,j.jsx)(`nav`,{role:`navigation`,"aria-label":`Main navigation`,className:`flex-1 space-y-0.5 px-3 py-4`,children:M.map(({to:t,icon:n,label:r})=>(0,j.jsx)(b,{to:t,end:t===`/`,onClick:e,className:({isActive:e})=>te(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950`,e?`bg-slate-800 text-slate-100`:`text-slate-400 hover:bg-slate-900 hover:text-slate-200`),children:({isActive:e})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(n,{size:16}),r,e&&(0,j.jsx)(`span`,{className:`sr-only`,children:`(current page)`})]})},t))})]})}var ie=e(x(),1);function ae(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var oe=e=>{switch(e){case`success`:return le;case`info`:return de;case`warning`:return ue;case`error`:return fe;default:return null}},se=Array(12).fill(0),ce=({visible:e,className:t})=>A.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},A.createElement(`div`,{className:`sonner-spinner`},se.map((e,t)=>A.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),le=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ue=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),de=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),fe=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),pe=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},A.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),A.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),me=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},P=1,F=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:P++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],A.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(he(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||P++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},I=(e,t)=>{let n=t?.id||P++;return F.addToast({title:e,...t,id:n}),n},he=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ge=Object.assign(I,{success:F.success,info:F.info,warning:F.warning,error:F.error,custom:F.custom,message:F.message,promise:F.promise,dismiss:F.dismiss,loading:F.loading},{getHistory:()=>F.toasts,getToasts:()=>F.getActiveToasts()});ae(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function _e(e){return e.label!==void 0}var L=3,R=`24px`,ve=`16px`,ye=4e3,be=356,xe=14,Se=45,Ce=200;function z(...e){return e.filter(Boolean).join(` `)}function we(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Te=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:ee=`Close toast`}=e,[T,te]=A.useState(null),[E,D]=A.useState(null),[O,ne]=A.useState(!1),[k,j]=A.useState(!1),[re,M]=A.useState(!1),[N,ie]=A.useState(!1),[ae,se]=A.useState(!1),[le,ue]=A.useState(0),[de,fe]=A.useState(0),P=A.useRef(n.duration||y||ye),F=A.useRef(null),I=A.useRef(null),he=c===0,ge=c+1<=o,L=n.type,R=n.dismissible!==!1,ve=n.className||``,be=n.descriptionClassName||``,xe=A.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Te=A.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Ee=A.useMemo(()=>n.duration||y||ye,[n.duration,y]),De=A.useRef(0),B=A.useRef(0),Oe=A.useRef(0),V=A.useRef(null),[H,ke]=b.split(`-`),Ae=A.useMemo(()=>s.reduce((e,t,n)=>n>=xe?e:e+t.height,0),[s,xe]),je=me(),Me=n.invert||t,Ne=L===`loading`;B.current=A.useMemo(()=>xe*x+Ae,[xe,Ae]),A.useEffect(()=>{P.current=Ee},[Ee]),A.useEffect(()=>{ne(!0)},[]),A.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return fe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),A.useLayoutEffect(()=>{if(!O)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,fe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[O,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let U=A.useCallback(()=>{j(!0),ue(B.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ce)},[n,d,a,B]);A.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||je?(()=>{if(Oe.current<De.current){let e=new Date().getTime()-De.current;P.current-=e}Oe.current=new Date().getTime()})():P.current!==1/0&&(De.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),U()},P.current)),()=>clearTimeout(e)},[u,i,n,L,je,U]),A.useEffect(()=>{n.delete&&(U(),n.onDismiss==null||n.onDismiss.call(n,n))},[U,n.delete]);function Pe(){return w?.loading?A.createElement(`div`,{className:z(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},w.loading):A.createElement(ce,{className:z(C?.loader,n?.classNames?.loader),visible:L===`loading`})}let W=n.icon||w?.[L]||oe(L);return A.createElement(`li`,{tabIndex:0,ref:I,className:z(_,ve,C?.toast,n?.classNames?.toast,C?.default,C?.[L],n?.classNames?.[L]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":O,"data-promise":!!n.promise,"data-swiped":ae,"data-removed":k,"data-visible":ge,"data-y-position":H,"data-x-position":ke,"data-index":c,"data-front":he,"data-swiping":re,"data-dismissible":R,"data-type":L,"data-invert":Me,"data-swipe-out":N,"data-swipe-direction":E,"data-expanded":!!(u||S&&O),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${k?le:B.current}px`,"--initial-height":S?`auto`:`${de}px`,...m,...n.style},onDragEnd:()=>{M(!1),te(null),V.current=null},onPointerDown:e=>{e.button!==2&&(Ne||!R||(F.current=new Date,ue(B.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(M(!0),V.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(N||!R)return;V.current=null;let e=Number(I.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-F.current?.getTime(),i=T===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Se||a>.11){ue(B.current),n.onDismiss==null||n.onDismiss.call(n,n),D(T===`x`?e>0?`right`:`left`:t>0?`down`:`up`),U(),ie(!0);return}else{var o,s;(o=I.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=I.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}se(!1),M(!1),te(null)},onPointerMove:t=>{var n,r;if(!V.current||!R||window.getSelection()?.toString().length>0)return;let i=t.clientY-V.current.y,a=t.clientX-V.current.x,o=e.swipeDirections??we(b);!T&&(Math.abs(a)>1||Math.abs(i)>1)&&te(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(T===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(T===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&se(!0),(n=I.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=I.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Te&&!n.jsx&&L!==`loading`?A.createElement(`button`,{"aria-label":ee,"data-disabled":Ne,"data-close-button":!0,onClick:Ne||!R?()=>{}:()=>{U(),n.onDismiss==null||n.onDismiss.call(n,n)},className:z(C?.closeButton,n?.classNames?.closeButton)},w?.close??pe):null,(L||n.icon||n.promise)&&n.icon!==null&&(w?.[L]!==null||n.icon)?A.createElement(`div`,{"data-icon":``,className:z(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Pe():null,n.type===`loading`?null:W):null,A.createElement(`div`,{"data-content":``,className:z(C?.content,n?.classNames?.content)},A.createElement(`div`,{"data-title":``,className:z(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?A.createElement(`div`,{"data-description":``,className:z(v,be,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),A.isValidElement(n.cancel)?n.cancel:n.cancel&&_e(n.cancel)?A.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{_e(n.cancel)&&R&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),U())},className:z(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,A.isValidElement(n.action)?n.action:n.action&&_e(n.action)?A.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{_e(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&U())},className:z(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Ee(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function De(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ve:R;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var B=A.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=L,toastOptions:g,dir:_=Ee(),gap:v=xe,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=A.useState([]),C=A.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=A.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[ee,T]=A.useState([]),[te,E]=A.useState(!1),[D,O]=A.useState(!1),[ne,k]=A.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=A.useRef(null),re=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=A.useRef(null),N=A.useRef(!1),ae=A.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||F.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return A.useEffect(()=>F.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ie.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),A.useEffect(()=>{if(d!==`system`){k(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?k(`dark`):k(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{k(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{k(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),A.useEffect(()=>{x.length<=1&&E(!1)},[x]),A.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;E(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&E(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),A.useEffect(()=>{if(j.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,N.current=!1)}},[j.current]),A.createElement(`section`,{ref:t,"aria-label":`${b} ${re}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?A.createElement(`ol`,{key:t,dir:_===`auto`?Ee():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ne,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${ee[0]?.height||0}px`,"--width":`${be}px`,"--gap":`${v}px`,...m,...De(l,u)},onBlur:e=>{N.current&&!e.currentTarget.contains(e.relatedTarget)&&(N.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.current||(N.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{D||E(!1)},onDragEnd:()=>E(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||O(!0)},onPointerUp:()=>O(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>A.createElement(Te,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:D,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ae,toasts:C.filter(e=>e.position==n.position),heights:ee.filter(e=>e.position==n.position),setHeights:T,expandByDefault:o,gap:v,expanded:te,swipeDirections:e.swipeDirections}))):null}))}),Oe=({...e})=>(0,j.jsx)(B,{theme:`dark`,className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-slate-900 group-[.toaster]:text-slate-200 group-[.toaster]:border-slate-800 group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-slate-400`,actionButton:`group-[.toast]:bg-blue-600 group-[.toast]:text-white`,cancelButton:`group-[.toast]:bg-slate-800 group-[.toast]:text-slate-200`}},...e}),V=500,H=ne((e,t)=>({tasks:[],goals:[],strategies:[],templates:[],readiness:null,stats:{activeTasks:0,queuedTasks:0,totalCostToday:0},logs:[],configVersion:0,pendingPlanApproval:null,planTimeoutNotice:null,roles:[],executionPool:{active:0,max:5,queued:0},deliveryLog:[],wsConnected:!1,_ws:null,_wsReconnectDelay:1e3,fetchTasks:async t=>{let n=new URLSearchParams({limit:`100`});t&&n.set(`status`,t),e({tasks:(await D(`/tasks?${n}`)).tasks})},fetchGoals:async()=>{e({goals:(await D(`/goals`)).goals})},updateGoal:async(t,n)=>{let r=await D(`/goals/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return e(e=>({goals:e.goals.map(e=>e.id===t?r.goal:e)})),r.goal},deleteGoal:async t=>{await D(`/goals/${t}`,{method:`DELETE`}),e(e=>({goals:e.goals.filter(e=>e.id!==t)}))},fetchStrategies:async()=>{e({strategies:(await D(`/strategies`)).strategies})},fetchTemplates:async()=>{e({templates:(await D(`/task-templates`)).templates})},fetchExecutionPool:async()=>{try{e({executionPool:(await D(`/stats`)).executionPool})}catch{}},fetchReadiness:async()=>{try{e({readiness:await(await fetch(`/readyz`)).json()})}catch{e({readiness:{status:`not_ready`,checks:{database:!1,config:!1}}})}},connectWebSocket:()=>{let n=t()._ws;if(n&&n.readyState<=1)return;let r=window.location.protocol===`https:`?`wss:`:`ws:`,i=localStorage.getItem(`adam_api_key`),a=new URL(`${r}//${window.location.host}/events`);i&&a.searchParams.set(`api_key`,i);let o=new WebSocket(a.toString());o.onopen=()=>{e({wsConnected:!0,_ws:o,_wsReconnectDelay:1e3})},o.onclose=()=>{let n=t()._wsReconnectDelay;e({wsConnected:!1,_ws:null,_wsReconnectDelay:Math.min(n*2,1e4)}),setTimeout(()=>{t().connectWebSocket()},n)},o.onerror=()=>{o.close()},o.onmessage=n=>{try{ke(JSON.parse(n.data),e,t)}catch{}},e({_ws:o})},disconnectWebSocket:()=>{let n=t()._ws;n&&(n.close(),e({_ws:null,wsConnected:!1}))},addLog:t=>{e(e=>({logs:[...e.logs.slice(-(V-1)),t]}))},addDeliveryLogEntry:t=>{e(e=>({deliveryLog:[t,...e.deliveryLog].slice(0,100)}))},approvePlan:async(t,n,r)=>{await D(`/tasks/${t}/approve-plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({planId:n,decision:`allow`,approvalType:r})}),e({pendingPlanApproval:null})},denyPlan:async(t,n,r)=>{await D(`/tasks/${t}/approve-plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({planId:n,decision:`deny`,reason:r??`rejected by user`})}),e({pendingPlanApproval:null})},clearPlanTimeoutNotice:()=>{e({planTimeoutNotice:null})},fetchRoles:async()=>{let{roles:t}=await D(`/roles`);e({roles:t})},createRole:async t=>{let n=await D(`/roles`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});return e(e=>({roles:[...e.roles,n.role]})),n.role},updateRole:async(t,n)=>{let r=await D(`/roles/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return e(e=>({roles:e.roles.map(e=>e.id===t?{...e,...r.role}:e)})),r.role},deleteRole:async t=>{await D(`/roles/${t}`,{method:`DELETE`}),e(e=>({roles:e.roles.filter(e=>e.id!==t)}))}}));function ke(e,t,n){switch(e.type){case`task_status_change`:t(t=>({tasks:t.tasks.map(t=>t.id===e.taskId?{...t,status:e.newStatus}:t)}));break;case`stats_update`:t(()=>({stats:{activeTasks:e.activeTasks,queuedTasks:e.queuedTasks,totalCostToday:e.totalCostToday}}));break;case`log_event`:n().addLog(e);break;case`goal_status_change`:t(t=>({goals:t.goals.map(t=>t.id===e.goalId?{...t,status:e.newStatus}:t)}));break;case`config_changed`:t(e=>({configVersion:e.configVersion+1}));break;case`execution_slot_change`:t(()=>({executionPool:{active:e.active,max:e.max,queued:e.queued}}));break;case`plan_approval_request`:t(()=>({pendingPlanApproval:{taskId:e.taskId,planId:e.planId,plan:e.plan}}));break;case`plan_approval_decision`:n().pendingPlanApproval?.planId===e.planId&&t(()=>({pendingPlanApproval:null}));break;case`delivery_status_change`:n().addDeliveryLogEntry(e);break}}function Ae(){let[e,t]=(0,A.useState)(!1),r=H(e=>e.wsConnected),i=H(e=>e.connectWebSocket),a=H(e=>e.fetchReadiness);(0,A.useEffect)(()=>{i(),a();let e=setInterval(a,3e4);return()=>clearInterval(e)},[i,a]);let o=(0,A.useCallback)(()=>t(!1),[]);return(0,j.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-slate-950`,children:[(0,j.jsx)(`a`,{href:`#main-content`,className:`sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-blue-600 focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-white focus:outline-none`,children:`Skip to content`}),(0,j.jsx)(`div`,{className:`hidden lg:block`,children:(0,j.jsx)(N,{})}),e&&(0,j.jsxs)(`div`,{className:`fixed inset-0 z-40 lg:hidden`,children:[(0,j.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:o}),(0,j.jsx)(`div`,{className:`relative z-50 h-full w-60`,children:(0,j.jsx)(N,{onNavigate:o})})]}),(0,j.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,j.jsxs)(`header`,{className:`flex h-14 items-center gap-3 border-b border-slate-800 px-4`,children:[(0,j.jsx)(`button`,{className:`lg:hidden text-slate-400 hover:text-slate-200`,onClick:()=>t(!e),"aria-label":e?`Close menu`:`Open menu`,children:e?(0,j.jsx)(h,{size:20}):(0,j.jsx)(n,{size:20})}),(0,j.jsx)(`div`,{className:`flex-1`}),(0,j.jsx)(`div`,{className:`flex items-center gap-1.5 text-xs`,"aria-live":`polite`,children:r?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d,{size:14,className:`text-emerald-500`}),(0,j.jsx)(`span`,{className:`text-emerald-400`,children:`Connected`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(p,{size:14,className:`text-red-500`}),(0,j.jsx)(`span`,{className:`text-red-400`,children:`Disconnected`})]})})]}),(0,j.jsx)(`main`,{id:`main-content`,role:`main`,className:`flex-1 overflow-y-auto p-4 lg:p-6`,children:(0,j.jsx)(_,{})})]}),(0,j.jsx)(Oe,{position:`bottom-center`})]})}function je(e,t){let n=A.createContext(t),r=e=>{let{children:t,...r}=e,i=A.useMemo(()=>r,Object.values(r));return(0,j.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=A.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Me(e,t=[]){let n=[];function r(t,r){let i=A.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=A.useMemo(()=>o,Object.values(o));return(0,j.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=A.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>A.createContext(e));return function(n){let r=n?.[e]||t;return A.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ne(i,...t)]}function Ne(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function U(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Pe(...e){return t=>{let n=!1,r=e.map(e=>{let r=U(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():U(e[t],null)}}}}function W(...e){return A.useCallback(Pe(...e),e)}typeof window<`u`&&window.document&&window.document.createElement;function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var K=globalThis?.document?A.useLayoutEffect:()=>{},Fe=A.useId||(()=>void 0),Ie=0;function Le(e){let[t,n]=A.useState(Fe());return K(()=>{e||n(e=>e??String(Ie++))},[e]),e||(t?`radix-${t}`:``)}var Re=A.useInsertionEffect||K;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Be({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=A.useRef(e!==void 0);A.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,A.useCallback(t=>{if(s){let n=Ve(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Be({defaultProp:e,onChange:t}){let[n,r]=A.useState(e),i=A.useRef(n),a=A.useRef(t);return Re(()=>{a.current=t},[t]),A.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Ve(e){return typeof e==`function`}function He(e){let t=Ue(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e,a=A.Children.toArray(r),o=a.find(Ke);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Ue(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(A.isValidElement(n)){let e=Je(n),i=qe(r,n.props);return n.type!==A.Fragment&&(i.ref=t?Pe(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var We=Symbol(`radix.slottable`);function Ge(e){let t=({children:e})=>(0,j.jsx)(j.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=We,t}function Ke(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===We}function qe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Je(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=He(`Primitive.${t}`),r=A.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,j.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ye(e,t){e&&ie.flushSync(()=>e.dispatchEvent(t))}function Xe(e){let t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ze(e,t=globalThis?.document){let n=Xe(e);A.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Qe=`DismissableLayer`,$e=`dismissableLayer.update`,et=`dismissableLayer.pointerDownOutside`,tt=`dismissableLayer.focusOutside`,nt,rt=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),it=A.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=A.useContext(rt),[u,d]=A.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=A.useState({}),m=W(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=st(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=ct(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ze(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),A.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nt)}},[u,f,n,l]),A.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lt())},[u,l]),A.useEffect(()=>{let e=()=>p({});return document.addEventListener($e,e),()=>document.removeEventListener($e,e)},[]),(0,j.jsx)(q.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,S.onFocusCapture),onBlurCapture:G(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,x.onPointerDownCapture)})});it.displayName=Qe;var at=`DismissableLayerBranch`,ot=A.forwardRef((e,t)=>{let n=A.useContext(rt),r=A.useRef(null),i=W(t,r);return A.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,j.jsx)(q.div,{...e,ref:i})});ot.displayName=at;function st(e,t=globalThis?.document){let n=Xe(e),r=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ut(et,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ct(e,t=globalThis?.document){let n=Xe(e),r=A.useRef(!1);return A.useEffect(()=>{let e=e=>{e.target&&!r.current&&ut(tt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lt(){let e=new CustomEvent($e);document.dispatchEvent(e)}function ut(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ye(i,a):i.dispatchEvent(a)}var dt=`focusScope.autoFocusOnMount`,ft=`focusScope.autoFocusOnUnmount`,pt={bubbles:!1,cancelable:!0},mt=`FocusScope`,ht=A.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=A.useState(null),l=Xe(i),u=Xe(a),d=A.useRef(null),f=W(t,e=>c(e)),p=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:J(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||J(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&J(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),A.useEffect(()=>{if(s){St.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dt,pt);s.addEventListener(dt,l),s.dispatchEvent(t),t.defaultPrevented||(gt(Tt(vt(s)),{select:!0}),document.activeElement===e&&J(s))}return()=>{s.removeEventListener(dt,l),setTimeout(()=>{let t=new CustomEvent(ft,pt);s.addEventListener(ft,u),s.dispatchEvent(t),t.defaultPrevented||J(e??document.body,{select:!0}),s.removeEventListener(ft,u),St.remove(p)},0)}}},[s,l,u,p]);let m=A.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_t(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&J(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&J(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,j.jsx)(q.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});ht.displayName=mt;function gt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(J(r,{select:t}),document.activeElement!==n)return}function _t(e){let t=vt(e);return[yt(t,e),yt(t.reverse(),e)]}function vt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yt(e,t){for(let n of e)if(!bt(n,{upTo:t}))return n}function bt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function xt(e){return e instanceof HTMLInputElement&&`select`in e}function J(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xt(e)&&t&&e.select()}}var St=Ct();function Ct(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=wt(e,t),e.unshift(t)},remove(t){e=wt(e,t),e[0]?.resume()}}}function wt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Tt(e){return e.filter(e=>e.tagName!==`A`)}var Et=`Portal`,Dt=A.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=A.useState(!1);K(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ie.createPortal((0,j.jsx)(q.div,{...r,ref:t}),o):null});Dt.displayName=Et;function Ot(e,t){return A.useReducer((e,n)=>t[e][n]??e,e)}var kt=e=>{let{present:t,children:n}=e,r=At(t),i=typeof n==`function`?n({present:r.isPresent}):A.Children.only(n),a=W(r.ref,Mt(i));return typeof n==`function`||r.isPresent?A.cloneElement(i,{ref:a}):null};kt.displayName=`Presence`;function At(e){let[t,n]=A.useState(),r=A.useRef(null),i=A.useRef(e),a=A.useRef(`none`),[o,s]=Ot(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return A.useEffect(()=>{let e=jt(r.current);a.current=o===`mounted`?e:`none`},[o]),K(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=jt(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),K(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=jt(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=jt(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:A.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function jt(e){return e?.animationName||`none`}function Mt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nt=0;function Pt(){A.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Ft()),document.body.insertAdjacentElement(`beforeend`,e[1]??Ft()),Nt++,()=>{Nt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Nt--}},[])}function Ft(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Y.apply(this,arguments)};function It(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Lt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rt=`right-scroll-bar-position`,zt=`width-before-scroll-bar`,Bt=`with-scroll-bars-hidden`,Vt=`--removed-body-scroll-bar-size`;function Ht(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ut(e,t){var n=(0,A.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Wt=typeof window<`u`?A.useLayoutEffect:A.useEffect,Gt=new WeakMap;function Kt(e,t){var n=Ut(t||null,function(t){return e.forEach(function(e){return Ht(e,t)})});return Wt(function(){var t=Gt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ht(e,null)}),i.forEach(function(e){r.has(e)||Ht(e,a)})}Gt.set(n,e)},[e]),n}function qt(e){return e}function Jt(e,t){t===void 0&&(t=qt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Yt(e){e===void 0&&(e={});var t=Jt(null);return t.options=Y({async:!0,ssr:!1},e),t}var Xt=function(e){var t=e.sideCar,n=It(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return A.createElement(r,Y({},n))};Xt.isSideCarExport=!0;function Zt(e,t){return e.useMedium(t),Xt}var Qt=Yt(),$t=function(){},en=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:$t,onWheelCapture:$t,onTouchMoveCapture:$t}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=It(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Kt([n,t]),C=Y(Y({},b),i);return A.createElement(A.Fragment,null,u&&A.createElement(x,{sideCar:Qt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?A.cloneElement(A.Children.only(s),Y(Y({},C),{ref:S})):A.createElement(v,Y({},C,{className:c,ref:S}),s))});en.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},en.classNames={fullWidth:zt,zeroRight:Rt};var tn,nn=function(){if(tn)return tn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nn();return t&&e.setAttribute(`nonce`,t),e}function an(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function on(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var sn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rn())&&(an(t,n),on(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cn=function(){var e=sn();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ln=function(){var e=cn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},un={left:0,top:0,right:0,gap:0},dn=function(e){return parseInt(e||``,10)||0},fn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[dn(n),dn(r),dn(i)]},pn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return un;var t=fn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mn=ln(),hn=`data-scroll-locked`,gn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
3
|
.${Bt} {
|
|
4
4
|
overflow: hidden ${r};
|
|
@@ -49,4 +49,4 @@ You can add a description to the \`${Xr}\` by passing a \`${ri}\` component as a
|
|
|
49
49
|
|
|
50
50
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Xr}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
51
51
|
|
|
52
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},ui=Ur,di=Gr,fi=qr,pi=Yr,mi=ei,hi=oi,gi=ci,_i=ni,vi=ii,yi=Symbol.for(`react.lazy`),bi=A.use;function xi(e){return typeof e==`object`&&!!e&&`then`in e}function Si(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===yi&&`_payload`in e&&xi(e._payload)}function Ci(e){let t=Ti(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e;Si(r)&&typeof bi==`function`&&(r=bi(r._payload));let a=A.Children.toArray(r),o=a.find(Di);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var wi=Ci(`Slot`);function Ti(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(Si(n)&&typeof bi==`function`&&(n=bi(n._payload)),A.isValidElement(n)){let e=ki(n),i=Oi(r,n.props);return n.type!==A.Fragment&&(i.ref=t?Pe(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ei=Symbol(`radix.slottable`);function Di(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ei}function Oi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ki(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ai=O(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-blue-600 text-white hover:bg-blue-500 active:bg-blue-700`,secondary:`bg-slate-800 text-slate-200 hover:bg-slate-700 active:bg-slate-600 border border-slate-700`,destructive:`bg-red-600 text-white hover:bg-red-500 active:bg-red-700`,ghost:`text-slate-400 hover:text-slate-200 hover:bg-slate-800`,outline:`border border-slate-700 bg-transparent text-slate-200 hover:bg-slate-800 hover:text-slate-100`,link:`text-blue-500 underline-offset-4 hover:underline`},size:{default:`px-3.5 py-1.5`,sm:`px-2.5 py-1 text-xs`,lg:`px-5 py-2`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`default`}}),ji=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,j.jsx)(r?wi:`button`,{className:E(Ai({variant:t,size:n,className:e})),ref:a,...i}));ji.displayName=`Button`;var Mi=ui,Ni=di,Pi=fi,Fi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(pi,{ref:n,className:E(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Fi.displayName=pi.displayName;var Ii=A.forwardRef(({className:e,...t},n)=>(0,j.jsxs)(Pi,{children:[(0,j.jsx)(Fi,{}),(0,j.jsx)(mi,{ref:n,className:E(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-800 bg-slate-900 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));Ii.displayName=mi.displayName;var Li=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});Li.displayName=`AlertDialogHeader`;var Ri=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Ri.displayName=`AlertDialogFooter`;var zi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(_i,{ref:n,className:E(`text-lg font-semibold text-slate-100`,e),...t}));zi.displayName=_i.displayName;var Bi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(vi,{ref:n,className:E(`text-sm text-slate-400`,e),...t}));Bi.displayName=vi.displayName;var Vi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(hi,{ref:n,className:E(Ai(),e),...t}));Vi.displayName=hi.displayName;var Hi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(gi,{ref:n,className:E(Ai({variant:`ghost`}),`mt-2 sm:mt-0`,e),...t}));Hi.displayName=gi.displayName;var Ui=O(`inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`,{variants:{variant:{default:`bg-slate-700 text-slate-200`,secondary:`bg-slate-800 text-slate-400`,destructive:`bg-red-900/50 text-red-400 border border-red-800`,outline:`border border-slate-700 text-slate-300`,success:`bg-emerald-900/50 text-emerald-400 border border-emerald-800`,warning:`bg-amber-900/50 text-amber-400 border border-amber-800`,info:`bg-blue-900/50 text-blue-400 border border-blue-800`,muted:`bg-slate-800 text-slate-500`}},defaultVariants:{variant:`default`}});function Wi({className:e,variant:t=`default`,...n}){return(0,j.jsx)(`span`,{className:E(Ui({variant:t}),e),...n})}function Gi(e){switch(e){case`completed`:case`ready`:case`idle`:return`success`;case`running`:case`busy`:case`executing`:case`planning`:case`evaluating`:case`replanning`:return`info`;case`pending`:case`queued`:case`paused`:case`degraded`:return`warning`;case`failed`:case`cancelled`:case`dead`:case`not_ready`:return`destructive`;default:return`muted`}}var Ki=300;function qi(e){return e===`high`?`destructive`:e===`medium`?`outline`:`secondary`}function Ji(){let e=H(e=>e.pendingPlanApproval),t=H(e=>e.approvePlan),n=H(e=>e.denyPlan),r=H(e=>e.planTimeoutNotice),i=H(e=>e.clearPlanTimeoutNotice),[a,o]=(0,A.useState)(Ki),[s,c]=(0,A.useState)(!1);(0,A.useEffect)(()=>{if(!e){o(Ki),c(!1);return}let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),0):e-1)},1e3);return()=>clearInterval(t)},[e?.planId]),(0,A.useEffect)(()=>{a===0&&e&&!s&&(c(!0),n(e.taskId,e.planId,`timeout`).catch(()=>{}))},[a,e,s,n]);let l=async n=>{if(e){c(!0);try{await t(e.taskId,e.planId,n)}catch{c(!1)}}},u=async()=>{if(e){c(!0);try{await n(e.taskId,e.planId)}catch{c(!1)}}},d=e?.plan;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Mi,{open:!!e,children:(0,j.jsxs)(Ii,{className:`max-w-2xl max-h-[80vh] overflow-y-auto`,children:[(0,j.jsxs)(Li,{children:[(0,j.jsxs)(zi,{className:`flex items-center gap-2`,children:[`Execution Plan — Approval Required`,d&&(0,j.jsxs)(Wi,{variant:qi(d.overallRisk),children:[d.overallRisk.toUpperCase(),` RISK`]})]}),(0,j.jsxs)(Bi,{className:`text-xs text-slate-400`,children:[`Plan `,e?.planId,` | Task `,e?.taskId,` | `,a,`s remaining`]})]}),d&&(0,j.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,d.steps.length,`)`]}),(0,j.jsx)(`div`,{className:`space-y-2`,children:d.steps.map(e=>(0,j.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,j.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,j.jsx)(Wi,{variant:qi(e.riskLevel),children:e.riskLevel})]}),(0,j.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]})]},e.index))})]}),Object.keys(d.requiredPermissions).length>0&&(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(d.requiredPermissions).map(e=>(0,j.jsx)(Wi,{variant:`secondary`,children:e},e))})]})]}),(0,j.jsxs)(Ri,{children:[(0,j.jsx)(ji,{variant:`destructive`,onClick:u,disabled:s,children:`Deny`}),(0,j.jsx)(ji,{variant:`outline`,onClick:()=>l(`permanent`),disabled:s,children:`Allow Permanent`}),(0,j.jsx)(ji,{onClick:()=>l(`once`),disabled:s,children:`Allow Once`})]})]})}),r&&(0,j.jsxs)(`div`,{className:`fixed bottom-4 right-4 z-50 rounded-md border border-amber-700 bg-amber-950 px-4 py-2 text-sm text-amber-200 shadow-lg`,children:[r,(0,j.jsx)(`button`,{className:`ml-3 text-amber-400 hover:text-amber-200`,onClick:i,children:`Dismiss`})]})]})}function $(e){return(0,A.lazy)(()=>e().catch(e=>{let t=`chunk-reload-`+window.location.pathname;if(!sessionStorage.getItem(t))return sessionStorage.setItem(t,`1`),window.location.reload(),new Promise(()=>{});throw sessionStorage.removeItem(t),e}))}var Yi=$(()=>y(()=>import(`./Dashboard-cDHpOWnY.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Xi=$(()=>y(()=>import(`./Chat-Bha4vXwT.js`).then(e=>({default:e.Chat})),__vite__mapDeps([8,1,2,3,5,9,7]))),Zi=$(()=>y(()=>import(`./Work-BpKK_uXA.js`).then(e=>({default:e.Work})),__vite__mapDeps([10,1,2,3,11,5,4,12,13,7,6]))),Qi=$(()=>y(()=>import(`./TaskDetail-DEg_oUwx.js`).then(e=>({default:e.TaskDetail})),__vite__mapDeps([14,1,2,3,5,4,7]))),$i=$(()=>y(()=>import(`./Plugins-gcMpBdyq.js`).then(e=>({default:e.Plugins})),__vite__mapDeps([15,1,2,3,5,4,12,6,7]))),ea=$(()=>y(()=>import(`./Strategies-CO4LwZjS.js`).then(e=>({default:e.Strategies})),__vite__mapDeps([16,1,2,3,4,5,12,6,7]))),ta=$(()=>y(()=>import(`./Goals-DdM0tFus.js`).then(e=>({default:e.Goals})),__vite__mapDeps([13,1,2,3,5,4,12,7]))),na=$(()=>y(()=>import(`./Logs-DJhpDtCA.js`).then(e=>({default:e.Logs})),__vite__mapDeps([17,1,2,3,4,5,12]))),ra=$(()=>y(()=>import(`./Settings-JbgBxBeo.js`).then(e=>({default:e.Settings})),__vite__mapDeps([18,1,2,3,5,19,4,12,7]))),ia=$(()=>y(()=>import(`./Memories-CYN99g2T.js`).then(e=>({default:e.Memories})),__vite__mapDeps([20,1,2,3,5,4,12,7]))),aa=$(()=>y(()=>import(`./Evolution-Ao-gdHbS.js`).then(e=>({default:e.Evolution})),__vite__mapDeps([21,1,2,3,5,4,12,7]))),oa=$(()=>y(()=>import(`./Channels-2veauYsm.js`).then(e=>({default:e.Channels})),__vite__mapDeps([22,1,2,3,5,4,12]))),sa=$(()=>y(()=>import(`./GoalDetail-CX2i9A5a.js`).then(e=>({default:e.GoalDetail})),__vite__mapDeps([23,1,2,3,5,4,7]))),ca=$(()=>y(()=>import(`./ChannelDetail-eWtIGhAd.js`).then(e=>({default:e.ChannelDetail})),__vite__mapDeps([24,1,2,3,5,4,7]))),la=$(()=>y(()=>import(`./Roles-CCy1H7PY.js`).then(e=>({default:e.Roles})),__vite__mapDeps([25,1,2,3,4,5,12,6,7]))),ua=$(()=>y(()=>import(`./RoleDetail-s7u-Shk3.js`).then(e=>({default:e.RoleDetail})),__vite__mapDeps([26,1,2,3,11,5,19,4,6,7]))),da=$(()=>y(()=>import(`./NotFound-CSjhzSGa.js`),__vite__mapDeps([27,2,1,3])));function fa(){return(0,j.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,j.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-slate-700 border-t-blue-500`})})}function pa(){return(0,j.jsxs)(A.Suspense,{fallback:(0,j.jsx)(fa,{}),children:[(0,j.jsx)(ee,{children:(0,j.jsxs)(C,{element:(0,j.jsx)(Ae,{}),children:[(0,j.jsx)(C,{index:!0,element:(0,j.jsx)(Yi,{})}),(0,j.jsx)(C,{path:`chat`,element:(0,j.jsx)(Xi,{})}),(0,j.jsx)(C,{path:`work`,element:(0,j.jsx)(Zi,{})}),(0,j.jsx)(C,{path:`tasks/:id`,element:(0,j.jsx)(Qi,{})}),(0,j.jsx)(C,{path:`plugins`,element:(0,j.jsx)($i,{})}),(0,j.jsx)(C,{path:`roles`,element:(0,j.jsx)(la,{})}),(0,j.jsx)(C,{path:`roles/:id`,element:(0,j.jsx)(ua,{})}),(0,j.jsx)(C,{path:`channels`,element:(0,j.jsx)(oa,{})}),(0,j.jsx)(C,{path:`channels/:id`,element:(0,j.jsx)(ca,{})}),(0,j.jsx)(C,{path:`strategies`,element:(0,j.jsx)(ea,{})}),(0,j.jsx)(C,{path:`goals`,element:(0,j.jsx)(ta,{})}),(0,j.jsx)(C,{path:`goals/:id`,element:(0,j.jsx)(sa,{})}),(0,j.jsx)(C,{path:`logs`,element:(0,j.jsx)(na,{})}),(0,j.jsx)(C,{path:`settings`,element:(0,j.jsx)(ra,{})}),(0,j.jsx)(C,{path:`memories`,element:(0,j.jsx)(ia,{})}),(0,j.jsx)(C,{path:`evolution`,element:(0,j.jsx)(aa,{})}),(0,j.jsx)(C,{path:`*`,element:(0,j.jsx)(da,{})})]})}),(0,j.jsx)(Ji,{})]})}var ma=v([{path:`*`,element:(0,j.jsx)(pa,{})}],{basename:`/ui`});(0,k.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(A.StrictMode,{children:(0,j.jsx)(re,{children:(0,j.jsx)(S,{router:ma})})}));export{H as C,Me as S,ze as _,Hi as a,G as b,Ri as c,Ni as d,ji as f,He as g,q as h,Vi as i,Li as l,Xe as m,Gi as n,Ii as o,kt as p,Mi as r,Bi as s,Wi as t,zi as u,Le as v,ge as w,W as x,K as y};
|
|
52
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},ui=Ur,di=Gr,fi=qr,pi=Yr,mi=ei,hi=oi,gi=ci,_i=ni,vi=ii,yi=Symbol.for(`react.lazy`),bi=A.use;function xi(e){return typeof e==`object`&&!!e&&`then`in e}function Si(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===yi&&`_payload`in e&&xi(e._payload)}function Ci(e){let t=Ti(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e;Si(r)&&typeof bi==`function`&&(r=bi(r._payload));let a=A.Children.toArray(r),o=a.find(Di);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var wi=Ci(`Slot`);function Ti(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(Si(n)&&typeof bi==`function`&&(n=bi(n._payload)),A.isValidElement(n)){let e=ki(n),i=Oi(r,n.props);return n.type!==A.Fragment&&(i.ref=t?Pe(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ei=Symbol(`radix.slottable`);function Di(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ei}function Oi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ki(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ai=O(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-blue-600 text-white hover:bg-blue-500 active:bg-blue-700`,secondary:`bg-slate-800 text-slate-200 hover:bg-slate-700 active:bg-slate-600 border border-slate-700`,destructive:`bg-red-600 text-white hover:bg-red-500 active:bg-red-700`,ghost:`text-slate-400 hover:text-slate-200 hover:bg-slate-800`,outline:`border border-slate-700 bg-transparent text-slate-200 hover:bg-slate-800 hover:text-slate-100`,link:`text-blue-500 underline-offset-4 hover:underline`},size:{default:`px-3.5 py-1.5`,sm:`px-2.5 py-1 text-xs`,lg:`px-5 py-2`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`default`}}),ji=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,j.jsx)(r?wi:`button`,{className:E(Ai({variant:t,size:n,className:e})),ref:a,...i}));ji.displayName=`Button`;var Mi=ui,Ni=di,Pi=fi,Fi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(pi,{ref:n,className:E(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Fi.displayName=pi.displayName;var Ii=A.forwardRef(({className:e,...t},n)=>(0,j.jsxs)(Pi,{children:[(0,j.jsx)(Fi,{}),(0,j.jsx)(mi,{ref:n,className:E(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-800 bg-slate-900 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));Ii.displayName=mi.displayName;var Li=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});Li.displayName=`AlertDialogHeader`;var Ri=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Ri.displayName=`AlertDialogFooter`;var zi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(_i,{ref:n,className:E(`text-lg font-semibold text-slate-100`,e),...t}));zi.displayName=_i.displayName;var Bi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(vi,{ref:n,className:E(`text-sm text-slate-400`,e),...t}));Bi.displayName=vi.displayName;var Vi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(hi,{ref:n,className:E(Ai(),e),...t}));Vi.displayName=hi.displayName;var Hi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(gi,{ref:n,className:E(Ai({variant:`ghost`}),`mt-2 sm:mt-0`,e),...t}));Hi.displayName=gi.displayName;var Ui=O(`inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`,{variants:{variant:{default:`bg-slate-700 text-slate-200`,secondary:`bg-slate-800 text-slate-400`,destructive:`bg-red-900/50 text-red-400 border border-red-800`,outline:`border border-slate-700 text-slate-300`,success:`bg-emerald-900/50 text-emerald-400 border border-emerald-800`,warning:`bg-amber-900/50 text-amber-400 border border-amber-800`,info:`bg-blue-900/50 text-blue-400 border border-blue-800`,muted:`bg-slate-800 text-slate-500`}},defaultVariants:{variant:`default`}});function Wi({className:e,variant:t=`default`,...n}){return(0,j.jsx)(`span`,{className:E(Ui({variant:t}),e),...n})}function Gi(e){switch(e){case`completed`:case`ready`:case`idle`:return`success`;case`running`:case`busy`:case`executing`:case`planning`:case`evaluating`:case`replanning`:return`info`;case`pending`:case`queued`:case`paused`:case`degraded`:return`warning`;case`failed`:case`cancelled`:case`dead`:case`not_ready`:return`destructive`;default:return`muted`}}var Ki=300;function qi(e){return e===`high`?`destructive`:e===`medium`?`outline`:`secondary`}function Ji(){let e=H(e=>e.pendingPlanApproval),t=H(e=>e.approvePlan),n=H(e=>e.denyPlan),r=H(e=>e.planTimeoutNotice),i=H(e=>e.clearPlanTimeoutNotice),[a,o]=(0,A.useState)(Ki),[s,c]=(0,A.useState)(!1);(0,A.useEffect)(()=>{if(!e){o(Ki),c(!1);return}let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),0):e-1)},1e3);return()=>clearInterval(t)},[e?.planId]),(0,A.useEffect)(()=>{a===0&&e&&!s&&(c(!0),n(e.taskId,e.planId,`timeout`).catch(()=>{}))},[a,e,s,n]);let l=async n=>{if(e){c(!0);try{await t(e.taskId,e.planId,n)}catch{c(!1)}}},u=async()=>{if(e){c(!0);try{await n(e.taskId,e.planId)}catch{c(!1)}}},d=e?.plan;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Mi,{open:!!e,children:(0,j.jsxs)(Ii,{className:`max-w-2xl max-h-[80vh] overflow-y-auto`,children:[(0,j.jsxs)(Li,{children:[(0,j.jsxs)(zi,{className:`flex items-center gap-2`,children:[`Execution Plan — Approval Required`,d&&(0,j.jsxs)(Wi,{variant:qi(d.overallRisk),children:[d.overallRisk.toUpperCase(),` RISK`]})]}),(0,j.jsxs)(Bi,{className:`text-xs text-slate-400`,children:[`Plan `,e?.planId,` | Task `,e?.taskId,` | `,a,`s remaining`]})]}),d&&(0,j.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,d.steps.length,`)`]}),(0,j.jsx)(`div`,{className:`space-y-2`,children:d.steps.map(e=>(0,j.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,j.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,j.jsx)(Wi,{variant:qi(e.riskLevel),children:e.riskLevel})]}),(0,j.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]})]},e.index))})]}),Object.keys(d.requiredPermissions).length>0&&(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(d.requiredPermissions).map(e=>(0,j.jsx)(Wi,{variant:`secondary`,children:e},e))})]})]}),(0,j.jsxs)(Ri,{children:[(0,j.jsx)(ji,{variant:`destructive`,onClick:u,disabled:s,children:`Deny`}),(0,j.jsx)(ji,{variant:`outline`,onClick:()=>l(`permanent`),disabled:s,children:`Allow Permanent`}),(0,j.jsx)(ji,{onClick:()=>l(`once`),disabled:s,children:`Allow Once`})]})]})}),r&&(0,j.jsxs)(`div`,{className:`fixed bottom-4 right-4 z-50 rounded-md border border-amber-700 bg-amber-950 px-4 py-2 text-sm text-amber-200 shadow-lg`,children:[r,(0,j.jsx)(`button`,{className:`ml-3 text-amber-400 hover:text-amber-200`,onClick:i,children:`Dismiss`})]})]})}function $(e){return(0,A.lazy)(()=>e().catch(e=>{let t=`chunk-reload-`+window.location.pathname;if(!sessionStorage.getItem(t))return sessionStorage.setItem(t,`1`),window.location.reload(),new Promise(()=>{});throw sessionStorage.removeItem(t),e}))}var Yi=$(()=>y(()=>import(`./Dashboard-Bq6sEDdP.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Xi=$(()=>y(()=>import(`./Chat-Da-mCR0c.js`).then(e=>({default:e.Chat})),__vite__mapDeps([8,1,2,3,5,9,7]))),Zi=$(()=>y(()=>import(`./Work-CF2iLs8i.js`).then(e=>({default:e.Work})),__vite__mapDeps([10,1,2,3,11,5,4,12,13,7,6]))),Qi=$(()=>y(()=>import(`./TaskDetail-BEjZ1gco.js`).then(e=>({default:e.TaskDetail})),__vite__mapDeps([14,1,2,3,5,4,7]))),$i=$(()=>y(()=>import(`./Plugins-C5xLM0BU.js`).then(e=>({default:e.Plugins})),__vite__mapDeps([15,1,2,3,5,4,12,6,7]))),ea=$(()=>y(()=>import(`./Strategies-BbFbLKBJ.js`).then(e=>({default:e.Strategies})),__vite__mapDeps([16,1,2,3,4,5,12,6,7]))),ta=$(()=>y(()=>import(`./Goals-CHPEg0RK.js`).then(e=>({default:e.Goals})),__vite__mapDeps([13,1,2,3,5,4,12,7]))),na=$(()=>y(()=>import(`./Logs-BHkBvH0T.js`).then(e=>({default:e.Logs})),__vite__mapDeps([17,1,2,3,4,5,12]))),ra=$(()=>y(()=>import(`./Settings-eBHvn6s_.js`).then(e=>({default:e.Settings})),__vite__mapDeps([18,1,2,3,5,19,4,12,7]))),ia=$(()=>y(()=>import(`./Memories-BY2pJhVd.js`).then(e=>({default:e.Memories})),__vite__mapDeps([20,1,2,3,5,4,12,7]))),aa=$(()=>y(()=>import(`./Evolution-DPdmbooj.js`).then(e=>({default:e.Evolution})),__vite__mapDeps([21,1,2,3,5,4,12,7]))),oa=$(()=>y(()=>import(`./Channels-EXkNOQpB.js`).then(e=>({default:e.Channels})),__vite__mapDeps([22,1,2,3,5,4,12]))),sa=$(()=>y(()=>import(`./GoalDetail-BamCfVzS.js`).then(e=>({default:e.GoalDetail})),__vite__mapDeps([23,1,2,3,5,4,7]))),ca=$(()=>y(()=>import(`./ChannelDetail-DX4QnE8j.js`).then(e=>({default:e.ChannelDetail})),__vite__mapDeps([24,1,2,3,5,4,7]))),la=$(()=>y(()=>import(`./Roles-BVOVoHvc.js`).then(e=>({default:e.Roles})),__vite__mapDeps([25,1,2,3,4,5,12,6,7]))),ua=$(()=>y(()=>import(`./RoleDetail-Dnp-W14x.js`).then(e=>({default:e.RoleDetail})),__vite__mapDeps([26,1,2,3,11,5,19,4,6,7]))),da=$(()=>y(()=>import(`./NotFound-CSjhzSGa.js`),__vite__mapDeps([27,2,1,3])));function fa(){return(0,j.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,j.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-slate-700 border-t-blue-500`})})}function pa(){return(0,j.jsxs)(A.Suspense,{fallback:(0,j.jsx)(fa,{}),children:[(0,j.jsx)(ee,{children:(0,j.jsxs)(C,{element:(0,j.jsx)(Ae,{}),children:[(0,j.jsx)(C,{index:!0,element:(0,j.jsx)(Yi,{})}),(0,j.jsx)(C,{path:`chat`,element:(0,j.jsx)(Xi,{})}),(0,j.jsx)(C,{path:`work`,element:(0,j.jsx)(Zi,{})}),(0,j.jsx)(C,{path:`tasks/:id`,element:(0,j.jsx)(Qi,{})}),(0,j.jsx)(C,{path:`plugins`,element:(0,j.jsx)($i,{})}),(0,j.jsx)(C,{path:`roles`,element:(0,j.jsx)(la,{})}),(0,j.jsx)(C,{path:`roles/:id`,element:(0,j.jsx)(ua,{})}),(0,j.jsx)(C,{path:`channels`,element:(0,j.jsx)(oa,{})}),(0,j.jsx)(C,{path:`channels/:id`,element:(0,j.jsx)(ca,{})}),(0,j.jsx)(C,{path:`strategies`,element:(0,j.jsx)(ea,{})}),(0,j.jsx)(C,{path:`goals`,element:(0,j.jsx)(ta,{})}),(0,j.jsx)(C,{path:`goals/:id`,element:(0,j.jsx)(sa,{})}),(0,j.jsx)(C,{path:`logs`,element:(0,j.jsx)(na,{})}),(0,j.jsx)(C,{path:`settings`,element:(0,j.jsx)(ra,{})}),(0,j.jsx)(C,{path:`memories`,element:(0,j.jsx)(ia,{})}),(0,j.jsx)(C,{path:`evolution`,element:(0,j.jsx)(aa,{})}),(0,j.jsx)(C,{path:`*`,element:(0,j.jsx)(da,{})})]})}),(0,j.jsx)(Ji,{})]})}var ma=v([{path:`*`,element:(0,j.jsx)(pa,{})}],{basename:`/ui`});(0,k.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(A.StrictMode,{children:(0,j.jsx)(re,{children:(0,j.jsx)(S,{router:ma})})}));export{H as C,Me as S,ze as _,Hi as a,G as b,Ri as c,Ni as d,ji as f,He as g,q as h,Vi as i,Li as l,Xe as m,Gi as n,Ii as o,kt as p,Mi as r,Bi as s,Wi as t,zi as u,Le as v,ge as w,W as x,K as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-400:oklch(77.7% .152 181.912);--color-cyan-400:oklch(78.9% .154 211.53);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-\[50\%\]{top:50%}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[calc\(100vh-280px\)\]{max-height:calc(100vh - 280px)}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-28{width:calc(var(--spacing) * 28)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[80\%\]{max-width:80%}.max-w-\[120px\]{max-width:120px}.max-w-\[180px\]{max-width:180px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[140px\]{min-width:140px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-800\/50>:not(:last-child)){border-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){:where(.divide-slate-800\/50>:not(:last-child)){border-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-amber-700{border-color:var(--color-amber-700)}.border-amber-800{border-color:var(--color-amber-800)}.border-amber-900\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-blue-800{border-color:var(--color-blue-800)}.border-blue-800\/50{border-color:#193cb880}@supports (color:color-mix(in lab, red, red)){.border-blue-800\/50{border-color:color-mix(in oklab, var(--color-blue-800) 50%, transparent)}}.border-emerald-800{border-color:var(--color-emerald-800)}.border-green-600{border-color:var(--color-green-600)}.border-green-800{border-color:var(--color-green-800)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.border-red-500\/40{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.border-red-800{border-color:var(--color-red-800)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-yellow-600{border-color:var(--color-yellow-600)}.border-yellow-800{border-color:var(--color-yellow-800)}.border-t-blue-500{border-top-color:var(--color-blue-500)}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-amber-950{background-color:var(--color-amber-950)}.bg-amber-950\/20{background-color:#46190133}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/20{background-color:color-mix(in oklab, var(--color-amber-950) 20%, transparent)}}.bg-amber-950\/30{background-color:#4619014d}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/30{background-color:color-mix(in oklab, var(--color-amber-950) 30%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-900\/30{background-color:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.bg-blue-900\/30{background-color:color-mix(in oklab, var(--color-blue-900) 30%, transparent)}}.bg-blue-900\/50{background-color:#1c398e80}@supports (color:color-mix(in lab, red, red)){.bg-blue-900\/50{background-color:color-mix(in oklab, var(--color-blue-900) 50%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-900\/50{background-color:#004e3b80}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/50{background-color:color-mix(in oklab, var(--color-emerald-900) 50%, transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-950{background-color:var(--color-green-950)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-red-900\/50{background-color:#82181a80}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/50{background-color:color-mix(in oklab, var(--color-red-900) 50%, transparent)}}.bg-red-950{background-color:var(--color-red-950)}.bg-red-950\/10{background-color:#4608091a}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/10{background-color:color-mix(in oklab, var(--color-red-950) 10%, transparent)}}.bg-red-950\/30{background-color:#4608094d}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/30{background-color:color-mix(in oklab, var(--color-red-950) 30%, transparent)}}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/30{background-color:#1d293d4d}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/30{background-color:color-mix(in oklab, var(--color-slate-800) 30%, transparent)}}.bg-slate-800\/50{background-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/50{background-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-900\/60{background-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/60{background-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-slate-950\/50{background-color:#02061880}@supports (color:color-mix(in lab, red, red)){.bg-slate-950\/50{background-color:color-mix(in oklab, var(--color-slate-950) 50%, transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-950{background-color:var(--color-yellow-950)}.bg-yellow-950\/50{background-color:#43200480}@supports (color:color-mix(in lab, red, red)){.bg-yellow-950\/50{background-color:color-mix(in oklab, var(--color-yellow-950) 50%, transparent)}}.fill-current{fill:currentColor}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-blue-200\/60{color:#bedbff99}@supports (color:color-mix(in lab, red, red)){.text-blue-200\/60{color:color-mix(in oklab, var(--color-blue-200) 60%, transparent)}}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-teal-400{color:var(--color-teal-400)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.placeholder-slate-600::placeholder{color:var(--color-slate-600)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-red-400{--tw-ring-color:var(--color-red-400)}.ring-offset-slate-950{--tw-ring-offset-color:var(--color-slate-950)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.duration-200{animation-duration:.2s}.fade-in-0{--tw-enter-opacity:0}.paused{animation-play-state:paused}.running{animation-play-state:running}.slide-in-from-left-1\/2{--tw-enter-translate-x:-50%}.slide-in-from-top-\[48\%\]{--tw-enter-translate-y:-48%}.slide-out-to-left-1\/2{--tw-exit-translate-x:-50%}.slide-out-to-top-\[48\%\]{--tw-exit-translate-y:-48%}.zoom-in-95{--tw-enter-scale:.95}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\/install\:block:is(:where(.group\/install):hover *){display:block}}.group-\[\.toast\]\:bg-blue-600:is(:where(.group).toast *){background-color:var(--color-blue-600)}.group-\[\.toast\]\:bg-slate-800:is(:where(.group).toast *){background-color:var(--color-slate-800)}.group-\[\.toast\]\:text-slate-200:is(:where(.group).toast *){color:var(--color-slate-200)}.group-\[\.toast\]\:text-slate-400:is(:where(.group).toast *){color:var(--color-slate-400)}.group-\[\.toast\]\:text-white:is(:where(.group).toast *){color:var(--color-white)}.group-\[\.toaster\]\:border-slate-800:is(:where(.group).toaster *){border-color:var(--color-slate-800)}.group-\[\.toaster\]\:bg-slate-900:is(:where(.group).toaster *){background-color:var(--color-slate-900)}.group-\[\.toaster\]\:text-slate-200:is(:where(.group).toaster *){color:var(--color-slate-200)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.placeholder\:text-slate-600::placeholder{color:var(--color-slate-600)}@media (hover:hover){.hover\:border-slate-400:hover{border-color:var(--color-slate-400)}.hover\:border-slate-600:hover{border-color:var(--color-slate-600)}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-green-900:hover{background-color:var(--color-green-900)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:bg-slate-800\/30:hover{background-color:#1d293d4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-slate-800\/30:hover{background-color:color-mix(in oklab, var(--color-slate-800) 30%, transparent)}}.hover\:bg-slate-800\/50:hover{background-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){.hover\:bg-slate-800\/50:hover{background-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-yellow-900:hover{background-color:var(--color-yellow-900)}.hover\:text-amber-200:hover{color:var(--color-amber-200)}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-400:hover{color:var(--color-amber-400)}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-blue-400:hover{color:var(--color-blue-400)}.hover\:text-emerald-400:hover{color:var(--color-emerald-400)}.hover\:text-green-300:hover{color:var(--color-green-300)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-100:hover{color:var(--color-slate-100)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-slate-300:hover{color:var(--color-slate-300)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:fixed:focus{position:fixed}.focus\:top-4:focus{top:calc(var(--spacing) * 4)}.focus\:left-4:focus{left:calc(var(--spacing) * 4)}.focus\:z-50:focus{z-index:50}.focus\:rounded-md:focus{border-radius:calc(var(--radius) * .8)}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:bg-blue-600:focus{background-color:var(--color-blue-600)}.focus\:bg-slate-800:focus{background-color:var(--color-slate-800)}.focus\:px-4:focus{padding-inline:calc(var(--spacing) * 4)}.focus\:py-2:focus{padding-block:calc(var(--spacing) * 2)}.focus\:text-sm:focus{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.focus\:font-medium:focus{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.focus\:text-slate-100:focus{color:var(--color-slate-100)}.focus\:text-white:focus{color:var(--color-white)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-slate-900:focus{--tw-ring-offset-color:var(--color-slate-900)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-slate-900:focus-visible{--tw-ring-offset-color:var(--color-slate-900)}.focus-visible\:ring-offset-slate-950:focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-blue-700:active{background-color:var(--color-blue-700)}.active\:bg-red-700:active{background-color:var(--color-red-700)}.active\:bg-slate-600:active{background-color:var(--color-slate-600)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:bg-slate-900[data-state=active]{background-color:var(--color-slate-900)}.data-\[state\=active\]\:text-slate-100[data-state=active]{color:var(--color-slate-100)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-blue-600[data-state=checked]{background-color:var(--color-blue-600)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:bg-slate-800[data-state=open]{background-color:var(--color-slate-800)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-slate-700[data-state=unchecked]{background-color:var(--color-slate-700)}@media (width>=40rem){.sm\:mt-0{margin-top:calc(var(--spacing) * 0)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=64rem){.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:p-6{padding:calc(var(--spacing) * 6)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-slate-700);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-slate-600)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0), var(--tw-enter-translate-y,0), 0) scale3d(var(--tw-enter-scale,1), var(--tw-enter-scale,1), var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0), var(--tw-exit-translate-y,0), 0) scale3d(var(--tw-exit-scale,1), var(--tw-exit-scale,1), var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}
|
package/web/dist/index.html
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Adam</title>
|
|
8
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ui/assets/index-CaHdOfAc.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-icons-CkI4-NxL.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-react-DLRtONKt.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/ui/assets/dist-HyCSN_hp.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-state-B_-GdGNJ.js">
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/ui/assets/index-
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/ui/assets/index-D0SvKqKc.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="bg-slate-950 text-slate-100">
|
|
17
17
|
<div id="root"></div>
|