@bpinhosilva/agent-orchestrator 1.0.0-alpha.21 → 1.0.0-alpha.22
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/CHANGELOG.md +7 -0
- package/dist/ui/assets/AgentFleet-CC0h_Ar0.js +1 -0
- package/dist/ui/assets/AgentFleet-CC0h_Ar0.js.map +1 -0
- package/dist/ui/assets/ConfirmDialog-mRH8i_xK.js +10 -0
- package/dist/ui/assets/ConfirmDialog-mRH8i_xK.js.map +1 -0
- package/dist/ui/assets/InitialsAvatar-0mIRaTK8.js +1 -0
- package/dist/ui/assets/InitialsAvatar-0mIRaTK8.js.map +1 -0
- package/dist/ui/assets/MarkdownField-flCuU7w3.js +1 -0
- package/dist/ui/assets/MarkdownField-flCuU7w3.js.map +1 -0
- package/dist/ui/assets/ProjectDetail-CY-VSV2D.js +1 -0
- package/dist/ui/assets/ProjectDetail-CY-VSV2D.js.map +1 -0
- package/dist/ui/assets/Providers-C9_lxOG1.js +1 -0
- package/dist/ui/assets/Providers-C9_lxOG1.js.map +1 -0
- package/dist/ui/assets/Scheduler-Du2cIGfB.js +1 -0
- package/dist/ui/assets/Scheduler-Du2cIGfB.js.map +1 -0
- package/dist/ui/assets/TaskDetail-BdQJCVo3.js +1 -0
- package/dist/ui/assets/TaskDetail-BdQJCVo3.js.map +1 -0
- package/dist/ui/assets/TaskManager-CWDh69pf.js +8 -0
- package/dist/ui/assets/TaskManager-CWDh69pf.js.map +1 -0
- package/dist/ui/assets/{activity-CYFCUKYz.js → activity-CIlCK2jL.js} +1 -1
- package/dist/ui/assets/activity-CIlCK2jL.js.map +1 -0
- package/dist/ui/assets/{brain-D1LPqnhA.js → brain-_N041Xks.js} +1 -1
- package/dist/ui/assets/brain-_N041Xks.js.map +1 -0
- package/dist/ui/assets/check-DgCfni6J.js +1 -0
- package/dist/ui/assets/check-DgCfni6J.js.map +1 -0
- package/dist/ui/assets/clock-C0d1RzP_.js +1 -0
- package/dist/ui/assets/clock-C0d1RzP_.js.map +1 -0
- package/dist/ui/assets/cn-i-5ItZGU.js +1 -0
- package/dist/ui/assets/cn-i-5ItZGU.js.map +1 -0
- package/dist/ui/assets/{eye-DSoNYXlu.js → eye-RB18-re_.js} +1 -1
- package/dist/ui/assets/eye-RB18-re_.js.map +1 -0
- package/dist/ui/assets/index-CCsHBe__.css +1 -0
- package/dist/ui/assets/index-yzhzS93F.js +2 -0
- package/dist/ui/assets/index-yzhzS93F.js.map +1 -0
- package/dist/ui/assets/{layers-BQR0gbW3.js → layers-D5ECV506.js} +1 -1
- package/dist/ui/assets/layers-D5ECV506.js.map +1 -0
- package/dist/ui/assets/providers-BMRq_pkm.js +1 -0
- package/dist/ui/assets/providers-BMRq_pkm.js.map +1 -0
- package/dist/ui/assets/rolldown-runtime-COnpUsM8.js +1 -0
- package/dist/ui/assets/{send-Cgv_rLex.js → send-BA7-sXzg.js} +1 -1
- package/dist/ui/assets/send-BA7-sXzg.js.map +1 -0
- package/dist/ui/assets/{shield-check-02qtz3Au.js → shield-check-D7JIluse.js} +1 -1
- package/dist/ui/assets/shield-check-D7JIluse.js.map +1 -0
- package/dist/ui/assets/{sparkles-cO3r5TCU.js → sparkles-CCXaTT3H.js} +1 -1
- package/dist/ui/assets/sparkles-CCXaTT3H.js.map +1 -0
- package/dist/ui/assets/{tasks-BZ0wO0e9.js → tasks-DEHCZk48.js} +1 -1
- package/dist/ui/assets/tasks-DEHCZk48.js.map +1 -0
- package/dist/ui/assets/{trash-2-7e8TY3SJ.js → trash-2-BNP4kC5c.js} +1 -1
- package/dist/ui/assets/trash-2-BNP4kC5c.js.map +1 -0
- package/dist/ui/assets/{trending-up-Dh3I3BnW.js → trending-up-DBTQIgW8.js} +1 -1
- package/dist/ui/assets/trending-up-DBTQIgW8.js.map +1 -0
- package/dist/ui/assets/useNotification-DK-pV16c.js +6 -0
- package/dist/ui/assets/useNotification-DK-pV16c.js.map +1 -0
- package/dist/ui/assets/{user-sikuVJBW.js → user-Cp55HCCi.js} +1 -1
- package/dist/ui/assets/user-Cp55HCCi.js.map +1 -0
- package/dist/ui/assets/vendor-dnd-CxfOy4-Z.js +5 -0
- package/dist/ui/assets/vendor-dnd-CxfOy4-Z.js.map +1 -0
- package/dist/ui/assets/vendor-forms-HC2wK6B9.js +39 -0
- package/dist/ui/assets/vendor-forms-HC2wK6B9.js.map +1 -0
- package/dist/ui/assets/vendor-markdown-Dl_1qnne.js +29 -0
- package/dist/ui/assets/vendor-markdown-Dl_1qnne.js.map +1 -0
- package/dist/ui/assets/vendor-motion-CkXYvnuI.js +9 -0
- package/dist/ui/assets/vendor-motion-CkXYvnuI.js.map +1 -0
- package/dist/ui/assets/vendor-query-DQlZ8h7P.js +1 -0
- package/dist/ui/assets/vendor-query-DQlZ8h7P.js.map +1 -0
- package/dist/ui/assets/vendor-react-CiDbU5Ns.js +11 -0
- package/dist/ui/assets/vendor-react-CiDbU5Ns.js.map +1 -0
- package/dist/ui/assets/{zap-CFqyHdPJ.js → zap-D1sST66b.js} +1 -1
- package/dist/ui/assets/zap-D1sST66b.js.map +1 -0
- package/dist/ui/index.html +9 -4
- package/package.json +1 -1
- package/dist/ui/assets/AgentFleet-CQIXvils.js +0 -6
- package/dist/ui/assets/ConfirmDialog-nQ8F6FEz.js +0 -1
- package/dist/ui/assets/MarkdownField-BvkVHJZh.js +0 -29
- package/dist/ui/assets/ProjectDetail-CZ-tFtQo.js +0 -1
- package/dist/ui/assets/Providers-C61nXOPZ.js +0 -1
- package/dist/ui/assets/Scheduler-BwWeFfsh.js +0 -1
- package/dist/ui/assets/TaskDetail-BKQ3Vgnu.js +0 -1
- package/dist/ui/assets/TaskManager-CCOnj4Gq.js +0 -16
- package/dist/ui/assets/check-BZcW41Vk.js +0 -1
- package/dist/ui/assets/clock-vIUNSAVw.js +0 -1
- package/dist/ui/assets/file-text-DyBkf5PF.js +0 -1
- package/dist/ui/assets/index-BX3YIi49.css +0 -1
- package/dist/ui/assets/index-Ctbpa_Ei.js +0 -20
- package/dist/ui/assets/providers-C3SQm75E.js +0 -1
- package/dist/ui/assets/useNotification-nXJIHD_q.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{g as t}from"./vendor-dnd-CxfOy4-Z.js";import{i as n,n as r,t as i}from"./vendor-query-DQlZ8h7P.js";import{r as a}from"./vendor-markdown-Dl_1qnne.js";import{o,t as s}from"./useNotification-DK-pV16c.js";import{t as c}from"./activity-CIlCK2jL.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./providers-BMRq_pkm.js";import{n as h,t as g}from"./zap-D1sST66b.js";import{t as _}from"./clock-C0d1RzP_.js";import{i as v,n as y,r as b,t as x}from"./trending-up-DBTQIgW8.js";import{t as S}from"./eye-RB18-re_.js";import{t as C}from"./trash-2-BNP4kC5c.js";import{n as w,t as T}from"./vendor-motion-CkXYvnuI.js";import{d as E,l as D,p as O,s as k}from"./index-yzhzS93F.js";import{t as A}from"./cn-i-5ItZGU.js";var j=o(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),M=o(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),N=o(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),P=e(t(),1),F={all:[`providers`],models:e=>[`providers`,e,`models`]},I=()=>r({queryKey:F.all,queryFn:async()=>(await m.findAll()).data}),L=e=>r({queryKey:e?F.models(e):[`providers`,`unselected`,`models`],queryFn:async()=>{if(!e)return[];let t=await m.findModels(e);return Array.isArray(t.data)?t.data:[]},enabled:!!e}),R=e=>{let t=n(),{notifyApiError:r}=s();return i({mutationFn:async({providerName:e,models:t})=>{let n=(await m.create({name:e.trim()})).data,r=t.map(e=>e.trim()).filter(Boolean);return r.length>0&&await Promise.all(r.map(e=>d.create({name:e,providerId:n.id}))),n},onSuccess:async n=>{await Promise.all([t.invalidateQueries({queryKey:F.all}),t.invalidateQueries({queryKey:F.models(n.id)})]),e?.onSuccess?.(n)},onError:e=>{r(e,`Registration Failed`)}})},z=e=>{let t=n(),{notifyApiError:r}=s();return i({mutationFn:async({providerId:e,models:t})=>{let n=t.map(e=>e.trim()).filter(Boolean);await Promise.all(n.map(t=>d.create({name:t,providerId:e})))},onSuccess:async(n,r)=>{await t.invalidateQueries({queryKey:F.models(r.providerId)}),e?.onSuccess?.()},onError:e=>{r(e,`Registration Failed`)}})},B=a(),V=({isOpen:e,onClose:t,onCreated:n,providerId:r,providerName:i})=>{let[a,o]=(0,P.useState)([``]),s=z({onSuccess:()=>{n(),o([``]),t()}});(0,P.useEffect)(()=>{let n=e=>{e.key===`Escape`&&!s.isPending&&t()};return e&&window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[s.isPending,e,t]);let c=(0,P.useMemo)(()=>a.some(e=>e.trim().length>0),[a]),l=a.length>1,u=()=>o(e=>[...e,``]),d=(e,t)=>{o(n=>{let r=[...n];return r[e]=t,r})},f=e=>{l&&o(t=>t.filter((t,n)=>n!==e))},p=()=>{s.isPending||t()},m=async e=>{e.preventDefault(),!(!r||!c)&&await s.mutateAsync({providerId:r,models:a})};return(0,B.jsx)(w,{children:e&&(0,B.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-center justify-center p-4 text-white`,children:[(0,B.jsx)(T.button,{type:`button`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:p,disabled:s.isPending,"aria-label":`Close create model modal`,className:`absolute inset-0 bg-background/80 backdrop-blur-md disabled:cursor-not-allowed`}),(0,B.jsxs)(T.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`create-model-title`,initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:`relative w-full max-w-lg bg-surface-container-low/90 backdrop-blur-2xl rounded-2xl shadow-[0_0_50px_-12px_rgba(78,222,163,0.1)] overflow-hidden border border-outline-variant/20`,children:[(0,B.jsxs)(`div`,{className:`px-8 pt-8 pb-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center`,children:(0,B.jsx)(v,{size:18,className:`text-primary`})}),(0,B.jsx)(`h2`,{id:`create-model-title`,className:`text-xl font-headline font-bold text-on-surface tracking-tight`,children:`Expand Provider Fleets`})]}),(0,B.jsx)(`button`,{type:`button`,onClick:p,disabled:s.isPending,"aria-label":`Close create model modal`,title:`Close`,className:`p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/40 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,B.jsx)(k,{size:18})})]}),(0,B.jsxs)(`p`,{className:`text-xs text-on-surface-variant font-medium opacity-60`,children:[`Registering new registry variants for `,(0,B.jsx)(`span`,{className:`text-primary font-bold`,children:i})]})]}),(0,B.jsxs)(`form`,{onSubmit:m,children:[(0,B.jsxs)(`div`,{className:`px-8 py-4 space-y-6`,children:[(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`label`,{className:`block text-[10px] font-black text-primary tracking-[0.2em] uppercase`,children:`Model Identifiers`}),(0,B.jsx)(`span`,{className:`text-[10px] text-on-surface-variant/40 italic font-medium`,children:`Batch register endpoints`})]}),(0,B.jsx)(`div`,{className:`space-y-3 max-h-[300px] overflow-y-auto pr-2 scrollbar-none custom-scrollbar`,children:a.map((e,t)=>(0,B.jsxs)(T.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:`flex gap-2 group`,children:[(0,B.jsx)(`div`,{className:`relative flex-1 bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all`,children:(0,B.jsx)(`input`,{autoFocus:t===a.length-1,type:`text`,value:e,onChange:e=>d(t,e.target.value),placeholder:`e.g., gpt-4o-2024-05-13`,disabled:s.isPending,className:`w-full bg-transparent border-none rounded-lg px-4 py-3 text-sm focus:outline-none text-white placeholder:text-on-surface-variant/20 disabled:opacity-60`,"aria-label":`Model identifier ${t+1}`})}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>f(t),disabled:!l||s.isPending,"aria-label":`Remove model identifier ${t+1}`,title:l?`Remove model identifier`:`At least one model input is kept visible`,className:A(`w-12 h-12 flex items-center justify-center transition-colors bg-surface-container-highest/10 rounded-xl`,l?`text-on-surface-variant/20 hover:text-error hover:bg-error/10`:`text-on-surface-variant/10 cursor-not-allowed opacity-50`,s.isPending&&`cursor-not-allowed opacity-50`),children:(0,B.jsx)(C,{size:18})})]},t))}),(0,B.jsxs)(`button`,{type:`button`,onClick:u,disabled:s.isPending,className:`w-full py-4 border-2 border-dashed border-primary/20 rounded-xl flex items-center justify-center gap-3 text-on-surface-variant/40 hover:border-primary/40 hover:text-primary transition-all group font-bold text-[10px] uppercase tracking-widest bg-primary/5 hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed`,"aria-label":`Add model identifier`,children:[(0,B.jsx)(E,{size:16,className:`group-hover:scale-110 transition-transform`}),`Register New Target variant`]})]}),(0,B.jsxs)(`div`,{className:`bg-primary/5 p-5 rounded-2xl flex gap-4 border border-primary/5 transition-all group relative overflow-hidden`,children:[(0,B.jsx)(`div`,{className:`absolute top-0 right-0 w-24 h-24 bg-primary/5 blur-2xl rounded-full -mr-10 -mt-10 pointer-events-none`}),(0,B.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center shrink-0`,children:(0,B.jsx)(g,{size:18,className:`text-primary`})}),(0,B.jsxs)(`p`,{className:`text-[11px] text-on-surface-variant/80 leading-relaxed font-medium`,children:[`Batch models registered here will be synchronized with the`,` `,(0,B.jsx)(`span`,{className:`text-primary font-bold`,children:`Orchestrator Registry`}),` for global accessibility.`]})]})]}),(0,B.jsxs)(`div`,{className:`px-8 py-8 flex items-center justify-end gap-6 bg-gradient-to-t from-surface-container-lowest/50 to-transparent`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:p,disabled:s.isPending,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/40 hover:text-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:`Cancel`}),(0,B.jsx)(`button`,{type:`submit`,disabled:s.isPending||!c||!r,className:`bg-primary px-8 py-3.5 rounded-xl text-on-primary text-[10px] font-black uppercase tracking-[0.2em] shadow-lg shadow-primary/20 hover:scale-[1.05] active:scale-95 transition-all disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed flex items-center gap-2`,children:s.isPending?(0,B.jsx)(`span`,{className:`w-4 h-4 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(E,{size:16}),`Append Provider Fleets`]})})]})]}),(0,B.jsx)(`div`,{className:`absolute -bottom-16 -right-16 w-48 h-48 bg-primary/10 blur-[60px] rounded-full pointer-events-none`}),(0,B.jsx)(`div`,{className:`absolute top-0 right-0 w-32 h-1 bg-gradient-to-l from-secondary/40 to-transparent`})]})]})})},H=({isOpen:e,onClose:t,onCreated:n})=>{let{notifyError:r}=s(),[i,a]=(0,P.useState)(``),[o,c]=(0,P.useState)([``]),l=R({onSuccess:e=>{n?.(e.id),a(``),c([``]),t()}});(0,P.useEffect)(()=>{let n=e=>{e.key===`Escape`&&!l.isPending&&t()};return e&&window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,l.isPending]);let u=o.length>1,d=i.trim().length>0,p=(0,P.useMemo)(()=>o.filter(e=>e.trim().length>0).length,[o]),m=()=>c(e=>[...e,``]),h=(e,t)=>{c(n=>{let r=[...n];return r[e]=t,r})},g=e=>{u&&c(t=>t.filter((t,n)=>n!==e))},_=()=>{l.isPending||t()},v=async e=>{if(e.preventDefault(),!d){r(`Validation Error`,`Please enter a provider name`);return}await l.mutateAsync({providerName:i,models:o})};return(0,B.jsx)(w,{children:e&&(0,B.jsxs)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center p-4`,children:[(0,B.jsx)(T.button,{type:`button`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:_,disabled:l.isPending,"aria-label":`Close register provider modal`,className:`absolute inset-0 bg-background/80 backdrop-blur-md disabled:cursor-not-allowed`}),(0,B.jsxs)(T.div,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`register-provider-title`,initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:`relative w-full max-w-lg bg-surface-container-low/90 backdrop-blur-2xl rounded-2xl shadow-[0_0_50px_-12px_rgba(173,198,255,0.2)] overflow-hidden border border-outline-variant/20`,children:[(0,B.jsxs)(`div`,{className:`px-8 pt-8 pb-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center`,children:(0,B.jsx)(f,{size:18,className:`text-primary`})}),(0,B.jsx)(`h2`,{id:`register-provider-title`,className:`text-xl font-headline font-bold text-on-surface tracking-tight`,children:`Register Provider`})]}),(0,B.jsx)(`button`,{type:`button`,onClick:_,disabled:l.isPending,"aria-label":`Close register provider modal`,title:`Close`,className:`p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/40 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,B.jsx)(k,{size:18})})]}),(0,B.jsx)(`p`,{className:`text-xs text-on-surface-variant font-medium opacity-60`,children:`Onboard a new computational gateway to your agentic ecosystem.`})]}),(0,B.jsxs)(`form`,{onSubmit:v,children:[(0,B.jsxs)(`div`,{className:`px-8 py-4 space-y-6`,children:[(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(`label`,{className:`block text-[10px] font-black text-primary tracking-[0.2em] uppercase`,htmlFor:`provider-name-input`,children:`Provider Name`}),(0,B.jsx)(`div`,{className:`bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all`,children:(0,B.jsx)(`input`,{id:`provider-name-input`,type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`e.g., OpenAI`,disabled:l.isPending,className:`w-full bg-transparent border-none rounded-lg px-4 py-3 text-sm focus:outline-none text-white placeholder:text-on-surface-variant/20 disabled:opacity-60`})})]}),(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`label`,{className:`block text-[10px] font-black text-primary tracking-[0.2em] uppercase`,children:`Model Variants`}),(0,B.jsx)(`span`,{className:`text-[10px] text-on-surface-variant/40 italic font-medium`,children:p>0?`${p} pending`:`Define available endpoints`})]}),(0,B.jsx)(`div`,{className:`space-y-3 max-h-[200px] overflow-y-auto pr-2 scrollbar-hide`,children:o.map((e,t)=>(0,B.jsxs)(T.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:`flex gap-2 group`,children:[(0,B.jsx)(`div`,{className:`relative flex-1 bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/5 focus-within:ring-secondary/40 transition-all`,children:(0,B.jsx)(`input`,{type:`text`,value:e,onChange:e=>h(t,e.target.value),placeholder:`gpt-4o`,disabled:l.isPending,className:`w-full bg-transparent border-none rounded-lg px-4 py-2.5 text-xs text-white focus:outline-none placeholder:text-on-surface-variant/20 disabled:opacity-60`,"aria-label":`Model variant ${t+1}`})}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>g(t),disabled:!u||l.isPending,"aria-label":`Remove model variant ${t+1}`,title:u?`Remove model variant`:`At least one model input is kept visible`,className:A(`w-10 h-10 flex items-center justify-center transition-colors bg-surface-container-highest/10 rounded-xl`,u?`text-on-surface-variant/20 hover:text-error hover:bg-error/10`:`text-on-surface-variant/10 cursor-not-allowed opacity-50`,l.isPending&&`cursor-not-allowed opacity-50`),children:(0,B.jsx)(C,{size:16})})]},t))}),(0,B.jsxs)(`button`,{type:`button`,onClick:m,disabled:l.isPending,className:`w-full py-3 border-2 border-dashed border-outline-variant/10 rounded-xl flex items-center justify-center gap-2 text-on-surface-variant/40 hover:border-primary/40 hover:text-primary transition-all group font-bold text-[10px] uppercase tracking-widest disabled:opacity-50 disabled:cursor-not-allowed`,"aria-label":`Add model variant`,children:[(0,B.jsx)(E,{size:14,className:`group-hover:scale-110 transition-transform`}),`Add model variant`]})]}),(0,B.jsxs)(`div`,{className:`bg-tertiary-container/10 p-5 rounded-2xl flex gap-4 border border-tertiary/5 relative overflow-hidden group`,children:[(0,B.jsx)(`div`,{className:`absolute top-0 right-0 w-24 h-24 bg-tertiary/5 blur-2xl rounded-full -mr-10 -mt-10`}),(0,B.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-tertiary/10 flex items-center justify-center shrink-0`,children:(0,B.jsx)(O,{size:18,className:`text-tertiary`})}),(0,B.jsxs)(`p`,{className:`text-[11px] text-on-surface-variant/80 leading-relaxed font-medium`,children:[`Once registered, these models will be available in the`,` `,(0,B.jsx)(`span`,{className:`text-tertiary font-bold`,children:`Orchestration Canvas`}),` for node deployment and agent personality mapping.`]})]})]}),(0,B.jsxs)(`div`,{className:`px-8 py-8 flex items-center justify-end gap-6 bg-gradient-to-t from-surface-container-lowest/50 to-transparent`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:_,disabled:l.isPending,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/40 hover:text-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:`Cancel`}),(0,B.jsx)(`button`,{type:`submit`,disabled:l.isPending||!d,className:`bg-primary px-8 py-3 rounded-xl text-on-primary text-[10px] font-black uppercase tracking-[0.2em] shadow-lg shadow-primary/20 hover:scale-[1.05] active:scale-95 transition-all disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed flex items-center gap-2`,children:l.isPending?(0,B.jsx)(`span`,{className:`w-3 h-3 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(y,{size:14}),`Register Provider`]})})]})]}),(0,B.jsx)(`div`,{className:`absolute -bottom-16 -left-16 w-48 h-48 bg-primary/10 blur-[60px] rounded-full pointer-events-none`}),(0,B.jsx)(`div`,{className:`absolute top-0 right-0 w-32 h-1 bg-gradient-to-l from-secondary/40 to-transparent`})]})]})})},U=[{label:`Latency`,value:`182ms`,color:`text-tertiary`,bar:`bg-tertiary`,width:`75%`},{label:`Success Rate`,value:`99.9%`,color:`text-secondary`,bar:`bg-secondary`,width:`99%`},{label:`Uptime`,value:`30d 12h`,color:`text-primary`,bar:`bg-primary`,width:`100%`}],W=e=>e.includes(`Gemini`)?`https://generativelanguage.googleapis.com/v1beta`:`https://api.openai.com/v1`,G=({label:e})=>(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":e,title:e,className:`text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50`,children:(0,B.jsx)(l,{size:16,className:`pointer-events-none`})}),K=({provider:e,models:t,isLoadingModels:n,isRefreshing:r,onRefresh:i,onOpenCreateModel:a})=>e?(0,B.jsxs)(`div`,{className:`bg-surface-container-low rounded-3xl overflow-hidden ring-1 ring-outline-variant/10 shadow-2xl animate-in fade-in zoom-in-95 duration-500`,children:[(0,B.jsxs)(`div`,{className:`p-10 relative overflow-hidden`,children:[(0,B.jsx)(`div`,{className:`absolute top-0 right-0 w-[500px] h-full bg-gradient-to-l from-primary/5 to-transparent pointer-events-none`}),(0,B.jsxs)(`div`,{className:`flex flex-col md:flex-row items-start justify-between gap-8 relative z-10`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,B.jsx)(`div`,{className:`w-20 h-20 bg-surface rounded-2xl flex items-center justify-center ring-1 ring-primary/20 shadow-inner group transition-all duration-500 hover:ring-primary/40`,children:(0,B.jsx)(j,{size:40,className:`text-primary group-hover:scale-110 transition-transform`})}),(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`h2`,{className:`text-3xl font-headline font-black text-white tracking-tight`,children:e.name}),(0,B.jsx)(`div`,{className:`flex gap-2`,children:(0,B.jsx)(`span`,{className:`px-2.5 py-0.5 bg-secondary/10 text-secondary text-[9px] font-black uppercase tracking-widest rounded ring-1 ring-secondary/20 font-headline`,children:`Primary`})})]}),(0,B.jsx)(`p`,{className:`text-on-surface-variant/60 text-sm mt-2`,children:e.description||`Infrastructure gateway for agentic cognition & reasoning.`})]})]}),(0,B.jsxs)(`div`,{className:`flex gap-3`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:i,disabled:r,"aria-label":`Refresh ${e.name} data`,title:`Refresh ${e.name} data`,className:`p-2.5 rounded-xl bg-surface-container-high text-on-surface-variant hover:text-white hover:bg-surface-container-highest transition-all ring-1 ring-outline-variant/10 disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,B.jsx)(M,{size:18,className:A(r&&`animate-spin`)})}),(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`More provider actions unavailable`,title:`More provider actions unavailable`,className:`p-2.5 rounded-xl bg-surface-container-high text-on-surface-variant/40 transition-all ring-1 ring-outline-variant/10 disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,B.jsx)(u,{size:18})})]})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-10 mt-12 relative z-10`,children:U.map(e=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`p`,{className:`text-[10px] text-on-surface-variant/40 uppercase tracking-[0.2em] font-black mb-2`,children:e.label}),(0,B.jsx)(`p`,{className:A(`text-2xl font-headline font-black`,e.color),children:e.value}),(0,B.jsx)(`div`,{className:`w-full bg-surface-container-highest/30 h-1.5 rounded-full mt-3 overflow-hidden`,children:(0,B.jsx)(`div`,{className:A(`h-full rounded-full transition-all duration-1000 delay-300`,e.bar),style:{width:e.width}})})]},e.label))})]}),(0,B.jsx)(`div`,{className:`p-10 border-t border-outline-variant/5`,children:(0,B.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-10`,children:[(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsx)(`label`,{className:`block text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/40`,children:`Endpoint URL`}),(0,B.jsxs)(`div`,{className:`relative group`,children:[(0,B.jsx)(`input`,{readOnly:!0,value:W(e.name),className:`w-full bg-surface-container-highest/20 border-none rounded-xl text-xs font-mono py-4 px-5 text-primary focus:ring-1 focus:ring-primary h-12`,"aria-label":`${e.name} endpoint URL`}),(0,B.jsx)(`div`,{className:`absolute right-4 top-1/2 -translate-y-1/2`,children:(0,B.jsx)(G,{label:`Copy endpoint URL unavailable`})})]})]}),(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsx)(`label`,{className:`block text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/40`,children:`Management API Key`}),(0,B.jsxs)(`div`,{className:`relative group`,children:[(0,B.jsx)(`input`,{type:`password`,value:`********************************`,readOnly:!0,className:`w-full bg-surface-container-highest/20 rounded-xl text-xs font-mono py-4 px-14 text-white focus:ring-1 focus:ring-primary h-12 ring-0 outline-none`,"aria-label":`${e.name} management API key`}),(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Reveal API key unavailable`,title:`Reveal API key unavailable`,className:`absolute left-4 top-1/2 -translate-y-1/2 text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50`,children:(0,B.jsx)(S,{size:16})}),(0,B.jsxs)(`div`,{className:`absolute right-4 top-1/2 -translate-y-1/2 flex gap-2`,children:[(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Rotate API key unavailable`,title:`Rotate API key unavailable`,className:`text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50`,children:(0,B.jsx)(N,{size:16})}),(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Copy API key unavailable`,title:`Copy API key unavailable`,className:`text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50`,children:(0,B.jsx)(l,{size:16})})]})]})]})]})}),(0,B.jsxs)(`div`,{className:`p-10 border-t border-outline-variant/5`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-8`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`h3`,{className:`font-headline font-black text-lg text-white`,children:`Registered Models`}),(0,B.jsxs)(`span`,{className:`px-2 py-0.5 rounded bg-surface-container-high text-[10px] font-bold text-on-surface-variant`,children:[t.length,` Models`]})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:a,disabled:!e.id,className:`text-[10px] font-black uppercase tracking-widest text-primary hover:text-primary/70 transition-colors flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed`,"aria-label":`Register models for ${e.name}`,children:[(0,B.jsx)(`div`,{className:`w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center`,children:(0,B.jsx)(E,{size:12})}),`Register New Model`]})]}),(0,B.jsx)(`div`,{className:`rounded-2xl border border-outline-variant/5 overflow-hidden`,children:(0,B.jsxs)(`table`,{className:`w-full text-left text-xs border-collapse`,children:[(0,B.jsx)(`thead`,{children:(0,B.jsxs)(`tr`,{className:`bg-surface-container-high/30 text-on-surface-variant/40 font-black uppercase tracking-[0.2em]`,children:[(0,B.jsx)(`th`,{className:`py-5 px-6`,children:`Model ID`}),(0,B.jsx)(`th`,{className:`py-5 px-6`,children:`Capabilities`}),(0,B.jsx)(`th`,{className:`py-5 px-6 text-right`,children:`Status`}),(0,B.jsx)(`th`,{className:`py-5 px-6 w-12 text-center`,children:`Action`})]})}),(0,B.jsx)(`tbody`,{className:`divide-y divide-outline-variant/5`,children:n?(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:4,className:`py-20 text-center`,children:(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center space-y-4 opacity-40`,children:[(0,B.jsx)(`div`,{className:`w-8 h-8 border-2 border-primary/20 border-t-primary rounded-full animate-spin`}),(0,B.jsx)(`p`,{className:`text-[10px] uppercase font-black tracking-widest text-primary animate-pulse`,children:`Hydrating Model Registry...`})]})})}):t.length>0?t.map(e=>(0,B.jsxs)(`tr`,{className:`group hover:bg-primary/5 transition-all`,children:[(0,B.jsx)(`td`,{className:`py-5 px-6 font-mono text-on-surface font-medium`,children:e.name}),(0,B.jsx)(`td`,{className:`py-5 px-6`,children:(0,B.jsx)(`div`,{className:`flex gap-2`,children:[`TEXT`,`VISION`].map(e=>(0,B.jsx)(`span`,{className:`px-2 py-0.5 bg-tertiary/10 text-tertiary rounded-[4px] text-[8px] font-black tracking-tight`,children:e},e))})}),(0,B.jsx)(`td`,{className:`py-5 px-6 text-right`,children:(0,B.jsx)(`span`,{className:`inline-flex items-center px-2 py-1 rounded font-black text-[8px] uppercase tracking-widest bg-secondary/10 text-secondary`,children:`Active`})}),(0,B.jsx)(`td`,{className:`py-5 px-6 text-center`,children:(0,B.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Model actions unavailable`,title:`Model actions unavailable`,className:`text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50`,children:(0,B.jsx)(u,{size:14})})})]},e.id)):(0,B.jsx)(`tr`,{children:(0,B.jsx)(`td`,{colSpan:4,className:`py-12 text-center text-on-surface-variant/20 italic font-medium`,children:`No models registered for this provider gate.`})})})]})})]}),(0,B.jsxs)(`div`,{className:`p-8 border-t border-outline-variant/5 bg-surface-container-lowest/20 flex items-center gap-3 text-on-surface-variant/60 text-[11px] font-medium`,children:[(0,B.jsx)(_,{size:14,className:`text-tertiary`}),`Model registry updates propagate automatically after provider and model mutations.`]})]}):(0,B.jsxs)(`div`,{className:`h-[600px] bg-surface-container-low/50 rounded-3xl border border-dashed border-outline-variant/10 flex flex-col items-center justify-center text-on-surface-variant gap-4 opacity-40`,children:[(0,B.jsx)(`div`,{className:`w-20 h-20 rounded-2xl bg-surface-container flex items-center justify-center shadow-inner`,children:(0,B.jsx)(j,{size:40,className:`text-primary/50`})}),(0,B.jsxs)(`div`,{className:`text-center`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-headline font-black text-white uppercase tracking-widest mb-1`,children:`Infrastructure Hub`}),(0,B.jsx)(`p`,{className:`text-[10px] font-medium opacity-60`,children:`Select a provider on the left to view active node details.`})]})]}),q=({providers:e,selectedProviderId:t,selectedProviderModelCount:n,isLoading:r,onSelect:i})=>r&&e.length===0?(0,B.jsx)(`div`,{className:`space-y-3`,"aria-live":`polite`,children:Array.from({length:3}).map((e,t)=>(0,B.jsx)(`div`,{className:`h-28 rounded-2xl border border-outline-variant/10 bg-surface-container-low animate-pulse`},t))}):e.length===0?(0,B.jsxs)(`div`,{className:`p-8 border-2 border-dashed border-outline-variant/10 rounded-2xl flex flex-col items-center justify-center text-center opacity-40`,children:[(0,B.jsx)(D,{size:24,className:`mb-4`}),(0,B.jsxs)(`span`,{className:`text-[10px] font-bold uppercase tracking-widest leading-relaxed`,children:[`No providers registered yet.`,(0,B.jsx)(`br`,{}),`Establish logical gateways in the infrastructure hub.`]})]}):(0,B.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>{let r=t===e.id,a=r?`${n} Models Active`:`Select to inspect`;return(0,B.jsxs)(`button`,{type:`button`,onClick:()=>i(e.id),className:A(`w-full p-5 rounded-2xl border text-left transition-all duration-300 group`,r?`bg-surface-container-high border-secondary/20 shadow-lg shadow-secondary/5 ring-1 ring-secondary/10 text-white`:`bg-surface-container-low border-transparent hover:bg-surface-container-high/50 text-on-surface-variant`),"aria-pressed":r,"aria-label":`Select provider ${e.name}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,B.jsx)(`div`,{className:A(`w-10 h-10 rounded-xl bg-surface-container-highest flex items-center justify-center transition-colors`,r?`text-primary`:`text-on-surface-variant`),children:(0,B.jsx)(b,{size:20})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{className:A(`font-bold text-sm block transition-colors`,r?`text-white`:`group-hover:text-white`),children:e.name}),(0,B.jsx)(`span`,{className:`text-[9px] font-bold text-on-surface-variant/40 uppercase tracking-widest leading-none mt-1 block`,children:a})]})]}),(0,B.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-secondary animate-pulse shadow-[0_0_10px_rgba(78,222,163,0.5)]`})]}),(0,B.jsx)(`div`,{className:`flex justify-start`,children:(0,B.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-widest text-secondary`,children:`Healthy`})})]},e.id)})}),J=()=>{let[e,t]=(0,P.useState)(!1),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),{data:o=[],isPending:s,isFetching:c,refetch:l}=I(),u=o.find(e=>e.id===i)?.id??o[0]?.id??null,d=L(u),f=(0,P.useMemo)(()=>o.find(e=>e.id===u)??null,[o,u]),p=(0,P.useCallback)(async()=>{await Promise.all([l(),u?d.refetch():Promise.resolve(void 0)])},[d,l,u]);return{providers:o,selectedProvider:f,selectedProviderId:u,setSelectedProviderId:a,models:d.data??[],isLoadingProviders:s,isFetchingProviders:c,isLoadingModels:d.isPending||d.isFetching,isRegisterProviderModalOpen:e,setIsRegisterProviderModalOpen:t,isCreateModelModalOpen:n,setIsCreateModelModalOpen:r,refreshProviders:p}},Y=()=>{let{providers:e,selectedProvider:t,selectedProviderId:n,setSelectedProviderId:r,models:i,isLoadingProviders:a,isFetchingProviders:o,isLoadingModels:s,isRegisterProviderModalOpen:l,setIsRegisterProviderModalOpen:u,isCreateModelModalOpen:d,setIsCreateModelModalOpen:f,refreshProviders:m}=J();return(0,B.jsxs)(`div`,{className:`space-y-10 animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[(0,B.jsx)(`header`,{children:(0,B.jsxs)(`div`,{className:`flex flex-col md:flex-row md:items-end justify-between gap-6`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`nav`,{className:`flex items-center gap-2 mb-2 text-[10px] uppercase tracking-widest text-primary font-bold`,children:[(0,B.jsx)(`span`,{className:`opacity-60`,children:`Infrastructure`}),(0,B.jsx)(h,{size:12,className:`opacity-40`}),(0,B.jsx)(`span`,{children:`Model Providers`})]}),(0,B.jsx)(`h1`,{className:`text-4xl font-extrabold font-headline tracking-tighter text-white`,children:`Provider Core`}),(0,B.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-1`,children:`Manage global LLM integrations and endpoint health.`})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>{m()},disabled:o,className:`px-5 py-2.5 bg-surface-container-high text-on-surface rounded-lg text-xs font-bold uppercase tracking-widest hover:bg-surface-container-highest transition-all ring-1 ring-outline-variant/10 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed`,"aria-label":`Refresh provider status`,children:[(0,B.jsx)(M,{size:14,className:A(o&&`animate-spin`)}),o?`Refreshing...`:`Refresh Status`]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),className:`px-6 py-2.5 bg-primary text-on-primary rounded-lg text-xs font-bold uppercase tracking-widest shadow-lg shadow-primary/20 hover:scale-[1.02] active:scale-[0.98] transition-all flex items-center gap-2`,"aria-label":`Open register provider modal`,children:[(0,B.jsx)(E,{size:16}),`Register Provider`]})]})]})}),(0,B.jsxs)(`section`,{className:`grid grid-cols-1 md:grid-cols-4 gap-6`,children:[(0,B.jsxs)(`div`,{className:`md:col-span-2 bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-2xl relative overflow-hidden group`,children:[(0,B.jsx)(`div`,{className:`absolute top-0 right-0 p-6 opacity-[0.03] group-hover:opacity-10 transition-opacity`,children:(0,B.jsx)(c,{size:80,strokeWidth:1})}),(0,B.jsx)(`h3`,{className:`text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50 mb-6`,children:`Total Request Volume`}),(0,B.jsxs)(`div`,{className:`flex items-end gap-5`,children:[(0,B.jsx)(`span`,{className:`text-5xl font-headline font-black text-white tracking-tighter`,children:`2.4M`}),(0,B.jsxs)(`span`,{className:`text-secondary text-xs font-bold mb-2 flex items-center gap-1 bg-secondary/10 px-2 py-0.5 rounded-full`,children:[(0,B.jsx)(x,{size:14}),` +12%`]})]}),(0,B.jsx)(`div`,{className:`mt-8 flex gap-1.5 h-12 items-end opacity-40`,children:[30,50,20,70,40,90,60,45,80,55,30,40].map((e,t)=>(0,B.jsx)(`div`,{className:`w-full bg-secondary rounded-t-sm transition-all duration-1000`,style:{height:`${e}%`,opacity:(t+1)/12}},t))})]}),(0,B.jsxs)(`div`,{className:`bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-xl flex flex-col justify-between group hover:border-secondary/20 transition-all`,children:[(0,B.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-secondary/10 flex items-center justify-center text-secondary mb-4 group-hover:scale-110 transition-transform`,children:(0,B.jsx)(c,{size:20})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:`text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50`,children:`Global Uptime`}),(0,B.jsxs)(`div`,{className:`mt-2`,children:[(0,B.jsx)(`span`,{className:`text-3xl font-headline font-black text-secondary`,children:`99.98%`}),(0,B.jsx)(`p`,{className:`text-[9px] text-on-surface-variant/40 mt-1 uppercase font-bold tracking-widest`,children:`Aggregated Network Score`})]})]})]}),(0,B.jsxs)(`div`,{className:`bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-xl flex flex-col justify-between group hover:border-tertiary/20 transition-all`,children:[(0,B.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-tertiary/10 flex items-center justify-center text-tertiary mb-4 group-hover:scale-110 transition-transform`,children:(0,B.jsx)(_,{size:20})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:`text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50`,children:`Avg. Latency`}),(0,B.jsxs)(`div`,{className:`mt-2`,children:[(0,B.jsx)(`span`,{className:`text-3xl font-headline font-black text-tertiary`,children:`342ms`}),(0,B.jsx)(`p`,{className:`text-[9px] text-on-surface-variant/40 mt-1 uppercase font-bold tracking-widest`,children:`P95 Response Time`})]})]})]})]}),(0,B.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-12 gap-8`,children:[(0,B.jsxs)(`div`,{className:`lg:col-span-4 space-y-5`,children:[(0,B.jsxs)(`h2`,{className:`text-[10px] font-black uppercase tracking-[0.3em] text-on-surface-variant/40 flex items-center gap-3`,children:[(0,B.jsx)(D,{size:14,className:`text-primary`}),` Active Providers`]}),(0,B.jsx)(q,{providers:e,selectedProviderId:n,selectedProviderModelCount:n===t?.id?i.length:0,isLoading:a,onSelect:r})]}),(0,B.jsxs)(`div`,{className:`lg:col-span-8 space-y-8`,children:[(0,B.jsx)(K,{provider:t,models:i,isLoadingModels:s,isRefreshing:o,onRefresh:()=>{m()},onOpenCreateModel:()=>f(!0)}),(0,B.jsxs)(`div`,{className:`bg-surface-container-lowest border border-outline-variant/10 rounded-2xl p-8 shadow-2xl relative overflow-hidden group`,children:[(0,B.jsx)(`div`,{className:`absolute top-4 right-4 text-on-surface-variant/5 italic text-[10px] font-mono select-none`,children:`SYSTEM_STREAM_L09`}),(0,B.jsxs)(`div`,{className:`flex justify-between items-center mb-6 border-b border-outline-variant/5 pb-5`,children:[(0,B.jsxs)(`span`,{className:`flex items-center gap-3 uppercase tracking-[0.2em] font-black text-[10px] text-tertiary`,children:[(0,B.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-secondary animate-pulse shadow-[0_0_10px_rgba(78,222,163,0.5)]`}),`Live System Event Stream`]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1 rounded-full bg-surface-container-high text-[9px] font-bold text-on-surface-variant/60`,children:[(0,B.jsx)(p,{size:12}),(0,B.jsx)(`span`,{children:`FILTER: gemini-1.5-*`})]})]}),(0,B.jsxs)(`div`,{className:`space-y-2 font-mono text-[11px] leading-relaxed`,children:[(0,B.jsxs)(`p`,{className:`flex gap-4`,children:[(0,B.jsx)(`span`,{className:`text-on-surface-variant/30`,children:`[14:22:01]`}),` `,(0,B.jsx)(`span`,{className:`text-primary font-bold`,children:`INFO`}),` `,(0,B.jsx)(`span`,{className:`text-on-surface-variant/80 font-medium`,children:`Node connected: gemini-1.5-pro-instance-09`})]}),(0,B.jsxs)(`p`,{className:`flex gap-4`,children:[(0,B.jsx)(`span`,{className:`text-on-surface-variant/30`,children:`[14:22:05]`}),` `,(0,B.jsx)(`span`,{className:`text-secondary font-bold`,children:`TRANS`}),` `,(0,B.jsx)(`span`,{className:`text-on-surface-variant/80 font-medium`,children:`Request successful: UUID-4421-AX (Lat: 154ms)`})]}),(0,B.jsxs)(`p`,{className:`flex gap-4`,children:[(0,B.jsx)(`span`,{className:`text-on-surface-variant/30`,children:`[14:23:12]`}),` `,(0,B.jsx)(`span`,{className:`text-secondary font-bold`,children:`TRANS`}),` `,(0,B.jsx)(`span`,{className:`text-on-surface-variant/80 font-medium`,children:`Request successful: UUID-9901-BL (Lat: 162ms)`})]}),(0,B.jsxs)(`p`,{className:`flex gap-4`,children:[(0,B.jsx)(`span`,{className:`text-on-surface-variant/30`,children:`[14:24:45]`}),` `,(0,B.jsx)(`span`,{className:`text-tertiary font-bold`,children:`WARN`}),` `,(0,B.jsx)(`span`,{className:`text-on-surface-variant/80 font-medium`,children:`Rate limit approach: gemini-1.5-flash (88% quota)`})]}),(0,B.jsxs)(`p`,{className:`flex gap-4`,children:[(0,B.jsx)(`span`,{className:`text-on-surface-variant/30`,children:`[14:25:00]`}),` `,(0,B.jsx)(`span`,{className:`text-primary font-bold`,children:`INFO`}),` `,(0,B.jsx)(`span`,{className:`text-on-surface-variant/80 font-medium`,children:`Health check passed for all 2 providers.`})]})]})]})]})]}),(0,B.jsx)(`div`,{className:`fixed bottom-8 right-8 z-[100] animate-in slide-in-from-right-10 duration-500`,children:(0,B.jsxs)(`div`,{className:`bg-[#131b2e]/60 backdrop-blur-xl rounded-full px-4 py-2 flex items-center gap-3 ring-1 ring-white/10 shadow-2xl shadow-black/50 overflow-hidden group`,children:[(0,B.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-r from-secondary/10 via-primary/5 to-tertiary/10 opacity-50 group-hover:opacity-100 transition-opacity`}),(0,B.jsxs)(`div`,{className:`flex -space-x-1.5 relative z-10`,children:[(0,B.jsx)(`div`,{className:`w-4 h-4 rounded-full bg-secondary shadow-[0_0_8px_rgba(78,222,163,0.5)]`}),(0,B.jsx)(`div`,{className:`w-4 h-4 rounded-full bg-primary shadow-[0_0_8px_rgba(173,198,255,0.5)]`}),(0,B.jsx)(`div`,{className:`w-4 h-4 rounded-full bg-tertiary shadow-[0_0_8px_rgba(221,183,255,0.5)]`})]}),(0,B.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-white/50 relative z-10`,children:`System Synchronized`})]})}),(0,B.jsx)(H,{isOpen:l,onClose:()=>u(!1),onCreated:e=>{r(e),u(!1)}}),(0,B.jsx)(V,{isOpen:d,onClose:()=>f(!1),onCreated:()=>f(!1),providerId:t?.id??``,providerName:t?.name??``})]})};export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Providers-C9_lxOG1.js","names":["__iconNode","__iconNode"],"sources":["../../node_modules/lucide-react/dist/esm/icons/monitor.js","../../node_modules/lucide-react/dist/esm/icons/refresh-ccw.js","../../node_modules/lucide-react/dist/esm/icons/rotate-cw.js","../../src/hooks/providers/useProviderQueries.ts","../../src/components/CreateModelModal.tsx","../../src/components/RegisterProviderModal.tsx","../../src/components/providers/ProviderDetail.tsx","../../src/components/providers/ProviderList.tsx","../../src/hooks/providers/useProvidersPage.ts","../../src/pages/Providers.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"14\", x: \"2\", y: \"3\", rx: \"2\", key: \"48i651\" }],\n [\"line\", { x1: \"8\", x2: \"16\", y1: \"21\", y2: \"21\", key: \"1svkeh\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"17\", y2: \"21\", key: \"vw1qmm\" }]\n];\nconst Monitor = createLucideIcon(\"monitor\", __iconNode);\n\nexport { __iconNode, Monitor as default };\n//# sourceMappingURL=monitor.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\", key: \"14sxne\" }],\n [\"path\", { d: \"M3 3v5h5\", key: \"1xhq8a\" }],\n [\"path\", { d: \"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16\", key: \"1hlbsb\" }],\n [\"path\", { d: \"M16 16h5v5\", key: \"ccwih5\" }]\n];\nconst RefreshCcw = createLucideIcon(\"refresh-ccw\", __iconNode);\n\nexport { __iconNode, RefreshCcw as default };\n//# sourceMappingURL=refresh-ccw.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n];\nconst RotateCw = createLucideIcon(\"rotate-cw\", __iconNode);\n\nexport { __iconNode, RotateCw as default };\n//# sourceMappingURL=rotate-cw.js.map\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { modelsApi } from '../../api/models';\nimport { providersApi, type Provider } from '../../api/providers';\nimport { useNotification } from '../useNotification';\n\nexport const providerQueryKeys = {\n all: ['providers'] as const,\n models: (providerId: string) => ['providers', providerId, 'models'] as const,\n};\n\ninterface RegisterProviderInput {\n providerName: string;\n models: string[];\n}\n\ninterface CreateModelsInput {\n providerId: string;\n models: string[];\n}\n\nexport const useProvidersQuery = () =>\n useQuery({\n queryKey: providerQueryKeys.all,\n queryFn: async () => {\n const response = await providersApi.findAll();\n return response.data;\n },\n });\n\nexport const useProviderModelsQuery = (providerId: string | null) =>\n useQuery({\n queryKey: providerId\n ? providerQueryKeys.models(providerId)\n : ['providers', 'unselected', 'models'],\n queryFn: async () => {\n if (!providerId) {\n return [];\n }\n\n const response = await providersApi.findModels(providerId);\n return Array.isArray(response.data) ? response.data : [];\n },\n enabled: Boolean(providerId),\n });\n\nexport const useRegisterProviderMutation = (\n options?: {\n onSuccess?: (provider: Provider) => void;\n },\n) => {\n const queryClient = useQueryClient();\n const { notifyApiError } = useNotification();\n\n return useMutation({\n mutationFn: async ({ providerName, models }: RegisterProviderInput) => {\n const providerResponse = await providersApi.create({ name: providerName.trim() });\n const provider = providerResponse.data;\n const activeModels = models\n .map((model) => model.trim())\n .filter(Boolean);\n\n if (activeModels.length > 0) {\n await Promise.all(\n activeModels.map((name) => modelsApi.create({ name, providerId: provider.id })),\n );\n }\n\n return provider;\n },\n onSuccess: async (provider) => {\n await Promise.all([\n queryClient.invalidateQueries({ queryKey: providerQueryKeys.all }),\n queryClient.invalidateQueries({ queryKey: providerQueryKeys.models(provider.id) }),\n ]);\n options?.onSuccess?.(provider);\n },\n onError: (error) => {\n notifyApiError(error, 'Registration Failed');\n },\n });\n};\n\nexport const useCreateModelsMutation = (\n options?: {\n onSuccess?: () => void;\n },\n) => {\n const queryClient = useQueryClient();\n const { notifyApiError } = useNotification();\n\n return useMutation({\n mutationFn: async ({ providerId, models }: CreateModelsInput) => {\n const activeModels = models\n .map((model) => model.trim())\n .filter(Boolean);\n\n await Promise.all(\n activeModels.map((name) => modelsApi.create({ name, providerId })),\n );\n },\n onSuccess: async (_, variables) => {\n await queryClient.invalidateQueries({\n queryKey: providerQueryKeys.models(variables.providerId),\n });\n options?.onSuccess?.();\n },\n onError: (error) => {\n notifyApiError(error, 'Registration Failed');\n },\n });\n};\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { Cpu, Plus, Trash2, X, Zap } from 'lucide-react';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useCreateModelsMutation } from '../hooks/providers/useProviderQueries';\nimport { cn } from '../lib/cn';\n\ninterface CreateModelModalProps {\n isOpen: boolean;\n onClose: () => void;\n onCreated: () => void;\n providerId: string;\n providerName: string;\n}\n\nconst CreateModelModal: React.FC<CreateModelModalProps> = ({\n isOpen,\n onClose,\n onCreated,\n providerId,\n providerName,\n}) => {\n const [models, setModels] = useState<string[]>(['']);\n\n const createModelsMutation = useCreateModelsMutation({\n onSuccess: () => {\n onCreated();\n setModels(['']);\n onClose();\n },\n });\n\n useEffect(() => {\n const handleEsc = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && !createModelsMutation.isPending) {\n onClose();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleEsc);\n }\n\n return () => window.removeEventListener('keydown', handleEsc);\n }, [createModelsMutation.isPending, isOpen, onClose]);\n\n const hasActiveModels = useMemo(\n () => models.some((model) => model.trim().length > 0),\n [models],\n );\n const canRemoveModel = models.length > 1;\n\n const addModel = () => setModels((currentModels) => [...currentModels, '']);\n const updateModel = (index: number, value: string) => {\n setModels((currentModels) => {\n const nextModels = [...currentModels];\n nextModels[index] = value;\n return nextModels;\n });\n };\n const removeModel = (index: number) => {\n if (!canRemoveModel) {\n return;\n }\n\n setModels((currentModels) => currentModels.filter((_, modelIndex) => modelIndex !== index));\n };\n\n const handleClose = () => {\n if (createModelsMutation.isPending) {\n return;\n }\n\n onClose();\n };\n\n const handleSubmit = async (event: React.FormEvent) => {\n event.preventDefault();\n if (!providerId || !hasActiveModels) {\n return;\n }\n\n await createModelsMutation.mutateAsync({\n providerId,\n models,\n });\n };\n\n return (\n <AnimatePresence>\n {isOpen && (\n <div className=\"fixed inset-0 z-[70] flex items-center justify-center p-4 text-white\">\n <motion.button\n type=\"button\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n onClick={handleClose}\n disabled={createModelsMutation.isPending}\n aria-label=\"Close create model modal\"\n className=\"absolute inset-0 bg-background/80 backdrop-blur-md disabled:cursor-not-allowed\"\n />\n\n <motion.div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"create-model-title\"\n initial={{ opacity: 0, scale: 0.95, y: 20 }}\n animate={{ opacity: 1, scale: 1, y: 0 }}\n exit={{ opacity: 0, scale: 0.95, y: 20 }}\n className=\"relative w-full max-w-lg bg-surface-container-low/90 backdrop-blur-2xl rounded-2xl shadow-[0_0_50px_-12px_rgba(78,222,163,0.1)] overflow-hidden border border-outline-variant/20\"\n >\n <div className=\"px-8 pt-8 pb-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center\">\n <Cpu size={18} className=\"text-primary\" />\n </div>\n <h2 id=\"create-model-title\" className=\"text-xl font-headline font-bold text-on-surface tracking-tight\">\n Expand Provider Fleets\n </h2>\n </div>\n <button\n type=\"button\"\n onClick={handleClose}\n disabled={createModelsMutation.isPending}\n aria-label=\"Close create model modal\"\n title=\"Close\"\n className=\"p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/40 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <X size={18} />\n </button>\n </div>\n <p className=\"text-xs text-on-surface-variant font-medium opacity-60\">\n Registering new registry variants for <span className=\"text-primary font-bold\">{providerName}</span>\n </p>\n </div>\n\n <form onSubmit={handleSubmit}>\n <div className=\"px-8 py-4 space-y-6\">\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <label className=\"block text-[10px] font-black text-primary tracking-[0.2em] uppercase\">\n Model Identifiers\n </label>\n <span className=\"text-[10px] text-on-surface-variant/40 italic font-medium\">\n Batch register endpoints\n </span>\n </div>\n\n <div className=\"space-y-3 max-h-[300px] overflow-y-auto pr-2 scrollbar-none custom-scrollbar\">\n {models.map((model, index) => (\n <motion.div\n key={index}\n initial={{ opacity: 0, x: -10 }}\n animate={{ opacity: 1, x: 0 }}\n className=\"flex gap-2 group\"\n >\n <div className=\"relative flex-1 bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all\">\n <input\n autoFocus={index === models.length - 1}\n type=\"text\"\n value={model}\n onChange={(event) => updateModel(index, event.target.value)}\n placeholder=\"e.g., gpt-4o-2024-05-13\"\n disabled={createModelsMutation.isPending}\n className=\"w-full bg-transparent border-none rounded-lg px-4 py-3 text-sm focus:outline-none text-white placeholder:text-on-surface-variant/20 disabled:opacity-60\"\n aria-label={`Model identifier ${index + 1}`}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeModel(index)}\n disabled={!canRemoveModel || createModelsMutation.isPending}\n aria-label={`Remove model identifier ${index + 1}`}\n title={canRemoveModel ? 'Remove model identifier' : 'At least one model input is kept visible'}\n className={cn(\n 'w-12 h-12 flex items-center justify-center transition-colors bg-surface-container-highest/10 rounded-xl',\n canRemoveModel\n ? 'text-on-surface-variant/20 hover:text-error hover:bg-error/10'\n : 'text-on-surface-variant/10 cursor-not-allowed opacity-50',\n createModelsMutation.isPending && 'cursor-not-allowed opacity-50',\n )}\n >\n <Trash2 size={18} />\n </button>\n </motion.div>\n ))}\n </div>\n\n <button\n type=\"button\"\n onClick={addModel}\n disabled={createModelsMutation.isPending}\n className=\"w-full py-4 border-2 border-dashed border-primary/20 rounded-xl flex items-center justify-center gap-3 text-on-surface-variant/40 hover:border-primary/40 hover:text-primary transition-all group font-bold text-[10px] uppercase tracking-widest bg-primary/5 hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label=\"Add model identifier\"\n >\n <Plus size={16} className=\"group-hover:scale-110 transition-transform\" />\n Register New Target variant\n </button>\n </div>\n\n <div className=\"bg-primary/5 p-5 rounded-2xl flex gap-4 border border-primary/5 transition-all group relative overflow-hidden\">\n <div className=\"absolute top-0 right-0 w-24 h-24 bg-primary/5 blur-2xl rounded-full -mr-10 -mt-10 pointer-events-none\" />\n <div className=\"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center shrink-0\">\n <Zap size={18} className=\"text-primary\" />\n </div>\n <p className=\"text-[11px] text-on-surface-variant/80 leading-relaxed font-medium\">\n Batch models registered here will be synchronized with the{' '}\n <span className=\"text-primary font-bold\">Orchestrator Registry</span> for global accessibility.\n </p>\n </div>\n </div>\n\n <div className=\"px-8 py-8 flex items-center justify-end gap-6 bg-gradient-to-t from-surface-container-lowest/50 to-transparent\">\n <button\n type=\"button\"\n onClick={handleClose}\n disabled={createModelsMutation.isPending}\n className=\"text-[10px] font-black uppercase tracking-widest text-on-surface-variant/40 hover:text-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={createModelsMutation.isPending || !hasActiveModels || !providerId}\n className=\"bg-primary px-8 py-3.5 rounded-xl text-on-primary text-[10px] font-black uppercase tracking-[0.2em] shadow-lg shadow-primary/20 hover:scale-[1.05] active:scale-95 transition-all disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed flex items-center gap-2\"\n >\n {createModelsMutation.isPending ? (\n <span className=\"w-4 h-4 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin\" />\n ) : (\n <>\n <Plus size={16} />\n Append Provider Fleets\n </>\n )}\n </button>\n </div>\n </form>\n\n <div className=\"absolute -bottom-16 -right-16 w-48 h-48 bg-primary/10 blur-[60px] rounded-full pointer-events-none\" />\n <div className=\"absolute top-0 right-0 w-32 h-1 bg-gradient-to-l from-secondary/40 to-transparent\" />\n </motion.div>\n </div>\n )}\n </AnimatePresence>\n );\n};\n\nexport default CreateModelModal;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { Box, Info, Plus, Rocket, Trash2, X } from 'lucide-react';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useRegisterProviderMutation } from '../hooks/providers/useProviderQueries';\nimport { useNotification } from '../hooks/useNotification';\nimport { cn } from '../lib/cn';\n\ninterface RegisterProviderModalProps {\n isOpen: boolean;\n onClose: () => void;\n onCreated?: (providerId: string) => void;\n}\n\nconst RegisterProviderModal: React.FC<RegisterProviderModalProps> = ({\n isOpen,\n onClose,\n onCreated,\n}) => {\n const { notifyError } = useNotification();\n const [providerName, setProviderName] = useState('');\n const [models, setModels] = useState<string[]>(['']);\n\n const registerProviderMutation = useRegisterProviderMutation({\n onSuccess: (provider) => {\n onCreated?.(provider.id);\n setProviderName('');\n setModels(['']);\n onClose();\n },\n });\n\n useEffect(() => {\n const handleEsc = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && !registerProviderMutation.isPending) {\n onClose();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleEsc);\n }\n\n return () => window.removeEventListener('keydown', handleEsc);\n }, [isOpen, onClose, registerProviderMutation.isPending]);\n\n const canRemoveModel = models.length > 1;\n const hasProviderName = providerName.trim().length > 0;\n const activeModelCount = useMemo(\n () => models.filter((model) => model.trim().length > 0).length,\n [models],\n );\n\n const addModel = () => setModels((currentModels) => [...currentModels, '']);\n const updateModel = (index: number, value: string) => {\n setModels((currentModels) => {\n const nextModels = [...currentModels];\n nextModels[index] = value;\n return nextModels;\n });\n };\n const removeModel = (index: number) => {\n if (!canRemoveModel) {\n return;\n }\n\n setModels((currentModels) => currentModels.filter((_, modelIndex) => modelIndex !== index));\n };\n\n const handleClose = () => {\n if (registerProviderMutation.isPending) {\n return;\n }\n\n onClose();\n };\n\n const handleSubmit = async (event: React.FormEvent) => {\n event.preventDefault();\n\n if (!hasProviderName) {\n notifyError('Validation Error', 'Please enter a provider name');\n return;\n }\n\n await registerProviderMutation.mutateAsync({\n providerName,\n models,\n });\n };\n\n return (\n <AnimatePresence>\n {isOpen && (\n <div className=\"fixed inset-0 z-[60] flex items-center justify-center p-4\">\n <motion.button\n type=\"button\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n onClick={handleClose}\n disabled={registerProviderMutation.isPending}\n aria-label=\"Close register provider modal\"\n className=\"absolute inset-0 bg-background/80 backdrop-blur-md disabled:cursor-not-allowed\"\n />\n\n <motion.div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"register-provider-title\"\n initial={{ opacity: 0, scale: 0.95, y: 20 }}\n animate={{ opacity: 1, scale: 1, y: 0 }}\n exit={{ opacity: 0, scale: 0.95, y: 20 }}\n className=\"relative w-full max-w-lg bg-surface-container-low/90 backdrop-blur-2xl rounded-2xl shadow-[0_0_50px_-12px_rgba(173,198,255,0.2)] overflow-hidden border border-outline-variant/20\"\n >\n <div className=\"px-8 pt-8 pb-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center\">\n <Box size={18} className=\"text-primary\" />\n </div>\n <h2 id=\"register-provider-title\" className=\"text-xl font-headline font-bold text-on-surface tracking-tight\">\n Register Provider\n </h2>\n </div>\n <button\n type=\"button\"\n onClick={handleClose}\n disabled={registerProviderMutation.isPending}\n aria-label=\"Close register provider modal\"\n title=\"Close\"\n className=\"p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/40 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <X size={18} />\n </button>\n </div>\n <p className=\"text-xs text-on-surface-variant font-medium opacity-60\">\n Onboard a new computational gateway to your agentic ecosystem.\n </p>\n </div>\n\n <form onSubmit={handleSubmit}>\n <div className=\"px-8 py-4 space-y-6\">\n <div className=\"space-y-2\">\n <label className=\"block text-[10px] font-black text-primary tracking-[0.2em] uppercase\" htmlFor=\"provider-name-input\">\n Provider Name\n </label>\n <div className=\"bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all\">\n <input\n id=\"provider-name-input\"\n type=\"text\"\n value={providerName}\n onChange={(event) => setProviderName(event.target.value)}\n placeholder=\"e.g., OpenAI\"\n disabled={registerProviderMutation.isPending}\n className=\"w-full bg-transparent border-none rounded-lg px-4 py-3 text-sm focus:outline-none text-white placeholder:text-on-surface-variant/20 disabled:opacity-60\"\n />\n </div>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <label className=\"block text-[10px] font-black text-primary tracking-[0.2em] uppercase\">\n Model Variants\n </label>\n <span className=\"text-[10px] text-on-surface-variant/40 italic font-medium\">\n {activeModelCount > 0 ? `${activeModelCount} pending` : 'Define available endpoints'}\n </span>\n </div>\n\n <div className=\"space-y-3 max-h-[200px] overflow-y-auto pr-2 scrollbar-hide\">\n {models.map((model, index) => (\n <motion.div\n key={index}\n initial={{ opacity: 0, x: -10 }}\n animate={{ opacity: 1, x: 0 }}\n className=\"flex gap-2 group\"\n >\n <div className=\"relative flex-1 bg-surface-container-lowest/50 rounded-xl p-0.5 ring-1 ring-outline-variant/5 focus-within:ring-secondary/40 transition-all\">\n <input\n type=\"text\"\n value={model}\n onChange={(event) => updateModel(index, event.target.value)}\n placeholder=\"gpt-4o\"\n disabled={registerProviderMutation.isPending}\n className=\"w-full bg-transparent border-none rounded-lg px-4 py-2.5 text-xs text-white focus:outline-none placeholder:text-on-surface-variant/20 disabled:opacity-60\"\n aria-label={`Model variant ${index + 1}`}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeModel(index)}\n disabled={!canRemoveModel || registerProviderMutation.isPending}\n aria-label={`Remove model variant ${index + 1}`}\n title={canRemoveModel ? 'Remove model variant' : 'At least one model input is kept visible'}\n className={cn(\n 'w-10 h-10 flex items-center justify-center transition-colors bg-surface-container-highest/10 rounded-xl',\n canRemoveModel\n ? 'text-on-surface-variant/20 hover:text-error hover:bg-error/10'\n : 'text-on-surface-variant/10 cursor-not-allowed opacity-50',\n registerProviderMutation.isPending && 'cursor-not-allowed opacity-50',\n )}\n >\n <Trash2 size={16} />\n </button>\n </motion.div>\n ))}\n </div>\n\n <button\n type=\"button\"\n onClick={addModel}\n disabled={registerProviderMutation.isPending}\n className=\"w-full py-3 border-2 border-dashed border-outline-variant/10 rounded-xl flex items-center justify-center gap-2 text-on-surface-variant/40 hover:border-primary/40 hover:text-primary transition-all group font-bold text-[10px] uppercase tracking-widest disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label=\"Add model variant\"\n >\n <Plus size={14} className=\"group-hover:scale-110 transition-transform\" />\n Add model variant\n </button>\n </div>\n\n <div className=\"bg-tertiary-container/10 p-5 rounded-2xl flex gap-4 border border-tertiary/5 relative overflow-hidden group\">\n <div className=\"absolute top-0 right-0 w-24 h-24 bg-tertiary/5 blur-2xl rounded-full -mr-10 -mt-10\" />\n <div className=\"w-10 h-10 rounded-xl bg-tertiary/10 flex items-center justify-center shrink-0\">\n <Info size={18} className=\"text-tertiary\" />\n </div>\n <p className=\"text-[11px] text-on-surface-variant/80 leading-relaxed font-medium\">\n Once registered, these models will be available in the{' '}\n <span className=\"text-tertiary font-bold\">Orchestration Canvas</span> for node deployment and agent personality mapping.\n </p>\n </div>\n </div>\n\n <div className=\"px-8 py-8 flex items-center justify-end gap-6 bg-gradient-to-t from-surface-container-lowest/50 to-transparent\">\n <button\n type=\"button\"\n onClick={handleClose}\n disabled={registerProviderMutation.isPending}\n className=\"text-[10px] font-black uppercase tracking-widest text-on-surface-variant/40 hover:text-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={registerProviderMutation.isPending || !hasProviderName}\n className=\"bg-primary px-8 py-3 rounded-xl text-on-primary text-[10px] font-black uppercase tracking-[0.2em] shadow-lg shadow-primary/20 hover:scale-[1.05] active:scale-95 transition-all disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed flex items-center gap-2\"\n >\n {registerProviderMutation.isPending ? (\n <span className=\"w-3 h-3 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin\" />\n ) : (\n <>\n <Rocket size={14} />\n Register Provider\n </>\n )}\n </button>\n </div>\n </form>\n\n <div className=\"absolute -bottom-16 -left-16 w-48 h-48 bg-primary/10 blur-[60px] rounded-full pointer-events-none\" />\n <div className=\"absolute top-0 right-0 w-32 h-1 bg-gradient-to-l from-secondary/40 to-transparent\" />\n </motion.div>\n </div>\n )}\n </AnimatePresence>\n );\n};\n\nexport default RegisterProviderModal;\n","import {\n Clock,\n Copy,\n Eye,\n Monitor,\n MoreVertical,\n Plus,\n RefreshCcw,\n RotateCw,\n} from 'lucide-react';\nimport type { Model } from '../../api/models';\nimport type { Provider } from '../../api/providers';\nimport { cn } from '../../lib/cn';\n\ninterface ProviderDetailProps {\n provider: Provider | null;\n models: Model[];\n isLoadingModels: boolean;\n isRefreshing: boolean;\n onRefresh: () => void;\n onOpenCreateModel: () => void;\n}\n\nconst providerStats = [\n { label: 'Latency', value: '182ms', color: 'text-tertiary', bar: 'bg-tertiary', width: '75%' },\n { label: 'Success Rate', value: '99.9%', color: 'text-secondary', bar: 'bg-secondary', width: '99%' },\n { label: 'Uptime', value: '30d 12h', color: 'text-primary', bar: 'bg-primary', width: '100%' },\n] as const;\n\nconst endpointUrlForProvider = (providerName: string) =>\n providerName.includes('Gemini')\n ? 'https://generativelanguage.googleapis.com/v1beta'\n : 'https://api.openai.com/v1';\n\nconst PlaceholderIconButton = ({\n label,\n}: {\n label: string;\n}) => (\n <button\n type=\"button\"\n disabled\n aria-label={label}\n title={label}\n className=\"text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50\"\n >\n <Copy size={16} className=\"pointer-events-none\" />\n </button>\n);\n\nconst ProviderDetail = ({\n provider,\n models,\n isLoadingModels,\n isRefreshing,\n onRefresh,\n onOpenCreateModel,\n}: ProviderDetailProps) => {\n if (!provider) {\n return (\n <div className=\"h-[600px] bg-surface-container-low/50 rounded-3xl border border-dashed border-outline-variant/10 flex flex-col items-center justify-center text-on-surface-variant gap-4 opacity-40\">\n <div className=\"w-20 h-20 rounded-2xl bg-surface-container flex items-center justify-center shadow-inner\">\n <Monitor size={40} className=\"text-primary/50\" />\n </div>\n <div className=\"text-center\">\n <h3 className=\"text-sm font-headline font-black text-white uppercase tracking-widest mb-1\">\n Infrastructure Hub\n </h3>\n <p className=\"text-[10px] font-medium opacity-60\">\n Select a provider on the left to view active node details.\n </p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"bg-surface-container-low rounded-3xl overflow-hidden ring-1 ring-outline-variant/10 shadow-2xl animate-in fade-in zoom-in-95 duration-500\">\n <div className=\"p-10 relative overflow-hidden\">\n <div className=\"absolute top-0 right-0 w-[500px] h-full bg-gradient-to-l from-primary/5 to-transparent pointer-events-none\" />\n\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-8 relative z-10\">\n <div className=\"flex items-center gap-6\">\n <div className=\"w-20 h-20 bg-surface rounded-2xl flex items-center justify-center ring-1 ring-primary/20 shadow-inner group transition-all duration-500 hover:ring-primary/40\">\n <Monitor size={40} className=\"text-primary group-hover:scale-110 transition-transform\" />\n </div>\n <div>\n <div className=\"flex items-center gap-3\">\n <h2 className=\"text-3xl font-headline font-black text-white tracking-tight\">\n {provider.name}\n </h2>\n <div className=\"flex gap-2\">\n <span className=\"px-2.5 py-0.5 bg-secondary/10 text-secondary text-[9px] font-black uppercase tracking-widest rounded ring-1 ring-secondary/20 font-headline\">\n Primary\n </span>\n </div>\n </div>\n <p className=\"text-on-surface-variant/60 text-sm mt-2\">\n {provider.description || 'Infrastructure gateway for agentic cognition & reasoning.'}\n </p>\n </div>\n </div>\n <div className=\"flex gap-3\">\n <button\n type=\"button\"\n onClick={onRefresh}\n disabled={isRefreshing}\n aria-label={`Refresh ${provider.name} data`}\n title={`Refresh ${provider.name} data`}\n className=\"p-2.5 rounded-xl bg-surface-container-high text-on-surface-variant hover:text-white hover:bg-surface-container-highest transition-all ring-1 ring-outline-variant/10 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <RefreshCcw size={18} className={cn(isRefreshing && 'animate-spin')} />\n </button>\n <button\n type=\"button\"\n disabled\n aria-label=\"More provider actions unavailable\"\n title=\"More provider actions unavailable\"\n className=\"p-2.5 rounded-xl bg-surface-container-high text-on-surface-variant/40 transition-all ring-1 ring-outline-variant/10 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <MoreVertical size={18} />\n </button>\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-10 mt-12 relative z-10\">\n {providerStats.map((stat) => (\n <div key={stat.label}>\n <p className=\"text-[10px] text-on-surface-variant/40 uppercase tracking-[0.2em] font-black mb-2\">\n {stat.label}\n </p>\n <p className={cn('text-2xl font-headline font-black', stat.color)}>{stat.value}</p>\n <div className=\"w-full bg-surface-container-highest/30 h-1.5 rounded-full mt-3 overflow-hidden\">\n <div className={cn('h-full rounded-full transition-all duration-1000 delay-300', stat.bar)} style={{ width: stat.width }} />\n </div>\n </div>\n ))}\n </div>\n </div>\n\n <div className=\"p-10 border-t border-outline-variant/5\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-10\">\n <div className=\"space-y-4\">\n <label className=\"block text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/40\">\n Endpoint URL\n </label>\n <div className=\"relative group\">\n <input\n readOnly\n value={endpointUrlForProvider(provider.name)}\n className=\"w-full bg-surface-container-highest/20 border-none rounded-xl text-xs font-mono py-4 px-5 text-primary focus:ring-1 focus:ring-primary h-12\"\n aria-label={`${provider.name} endpoint URL`}\n />\n <div className=\"absolute right-4 top-1/2 -translate-y-1/2\">\n <PlaceholderIconButton label=\"Copy endpoint URL unavailable\" />\n </div>\n </div>\n </div>\n <div className=\"space-y-4\">\n <label className=\"block text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/40\">\n Management API Key\n </label>\n <div className=\"relative group\">\n <input\n type=\"password\"\n value=\"********************************\"\n readOnly\n className=\"w-full bg-surface-container-highest/20 rounded-xl text-xs font-mono py-4 px-14 text-white focus:ring-1 focus:ring-primary h-12 ring-0 outline-none\"\n aria-label={`${provider.name} management API key`}\n />\n <button\n type=\"button\"\n disabled\n aria-label=\"Reveal API key unavailable\"\n title=\"Reveal API key unavailable\"\n className=\"absolute left-4 top-1/2 -translate-y-1/2 text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50\"\n >\n <Eye size={16} />\n </button>\n <div className=\"absolute right-4 top-1/2 -translate-y-1/2 flex gap-2\">\n <button\n type=\"button\"\n disabled\n aria-label=\"Rotate API key unavailable\"\n title=\"Rotate API key unavailable\"\n className=\"text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50\"\n >\n <RotateCw size={16} />\n </button>\n <button\n type=\"button\"\n disabled\n aria-label=\"Copy API key unavailable\"\n title=\"Copy API key unavailable\"\n className=\"text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50\"\n >\n <Copy size={16} />\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div className=\"p-10 border-t border-outline-variant/5\">\n <div className=\"flex items-center justify-between mb-8\">\n <div className=\"flex items-center gap-3\">\n <h3 className=\"font-headline font-black text-lg text-white\">Registered Models</h3>\n <span className=\"px-2 py-0.5 rounded bg-surface-container-high text-[10px] font-bold text-on-surface-variant\">\n {models.length} Models\n </span>\n </div>\n <button\n type=\"button\"\n onClick={onOpenCreateModel}\n disabled={!provider.id}\n className=\"text-[10px] font-black uppercase tracking-widest text-primary hover:text-primary/70 transition-colors flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label={`Register models for ${provider.name}`}\n >\n <div className=\"w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center\">\n <Plus size={12} />\n </div>\n Register New Model\n </button>\n </div>\n\n <div className=\"rounded-2xl border border-outline-variant/5 overflow-hidden\">\n <table className=\"w-full text-left text-xs border-collapse\">\n <thead>\n <tr className=\"bg-surface-container-high/30 text-on-surface-variant/40 font-black uppercase tracking-[0.2em]\">\n <th className=\"py-5 px-6\">Model ID</th>\n <th className=\"py-5 px-6\">Capabilities</th>\n <th className=\"py-5 px-6 text-right\">Status</th>\n <th className=\"py-5 px-6 w-12 text-center\">Action</th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-outline-variant/5\">\n {isLoadingModels ? (\n <tr>\n <td colSpan={4} className=\"py-20 text-center\">\n <div className=\"flex flex-col items-center justify-center space-y-4 opacity-40\">\n <div className=\"w-8 h-8 border-2 border-primary/20 border-t-primary rounded-full animate-spin\" />\n <p className=\"text-[10px] uppercase font-black tracking-widest text-primary animate-pulse\">\n Hydrating Model Registry...\n </p>\n </div>\n </td>\n </tr>\n ) : models.length > 0 ? (\n models.map((model) => (\n <tr key={model.id} className=\"group hover:bg-primary/5 transition-all\">\n <td className=\"py-5 px-6 font-mono text-on-surface font-medium\">{model.name}</td>\n <td className=\"py-5 px-6\">\n <div className=\"flex gap-2\">\n {['TEXT', 'VISION'].map((capability) => (\n <span\n key={capability}\n className=\"px-2 py-0.5 bg-tertiary/10 text-tertiary rounded-[4px] text-[8px] font-black tracking-tight\"\n >\n {capability}\n </span>\n ))}\n </div>\n </td>\n <td className=\"py-5 px-6 text-right\">\n <span className=\"inline-flex items-center px-2 py-1 rounded font-black text-[8px] uppercase tracking-widest bg-secondary/10 text-secondary\">\n Active\n </span>\n </td>\n <td className=\"py-5 px-6 text-center\">\n <button\n type=\"button\"\n disabled\n aria-label=\"Model actions unavailable\"\n title=\"Model actions unavailable\"\n className=\"text-on-surface-variant/20 cursor-not-allowed transition-colors disabled:opacity-50\"\n >\n <MoreVertical size={14} />\n </button>\n </td>\n </tr>\n ))\n ) : (\n <tr>\n <td colSpan={4} className=\"py-12 text-center text-on-surface-variant/20 italic font-medium\">\n No models registered for this provider gate.\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n </div>\n\n <div className=\"p-8 border-t border-outline-variant/5 bg-surface-container-lowest/20 flex items-center gap-3 text-on-surface-variant/60 text-[11px] font-medium\">\n <Clock size={14} className=\"text-tertiary\" />\n Model registry updates propagate automatically after provider and model mutations.\n </div>\n </div>\n );\n};\n\nexport default ProviderDetail;\n","import { Database, Server } from 'lucide-react';\nimport type { Provider } from '../../api/providers';\nimport { cn } from '../../lib/cn';\n\ninterface ProviderListProps {\n providers: Provider[];\n selectedProviderId: string | null;\n selectedProviderModelCount: number;\n isLoading: boolean;\n onSelect: (providerId: string) => void;\n}\n\nconst ProviderList = ({\n providers,\n selectedProviderId,\n selectedProviderModelCount,\n isLoading,\n onSelect,\n}: ProviderListProps) => {\n if (isLoading && providers.length === 0) {\n return (\n <div className=\"space-y-3\" aria-live=\"polite\">\n {Array.from({ length: 3 }).map((_, index) => (\n <div\n key={index}\n className=\"h-28 rounded-2xl border border-outline-variant/10 bg-surface-container-low animate-pulse\"\n />\n ))}\n </div>\n );\n }\n\n if (providers.length === 0) {\n return (\n <div className=\"p-8 border-2 border-dashed border-outline-variant/10 rounded-2xl flex flex-col items-center justify-center text-center opacity-40\">\n <Server size={24} className=\"mb-4\" />\n <span className=\"text-[10px] font-bold uppercase tracking-widest leading-relaxed\">\n No providers registered yet.\n <br />\n Establish logical gateways in the infrastructure hub.\n </span>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-3\">\n {providers.map((provider) => {\n const isSelected = selectedProviderId === provider.id;\n const modelStatusText = isSelected\n ? `${selectedProviderModelCount} Models Active`\n : 'Select to inspect';\n\n return (\n <button\n key={provider.id}\n type=\"button\"\n onClick={() => onSelect(provider.id)}\n className={cn(\n 'w-full p-5 rounded-2xl border text-left transition-all duration-300 group',\n isSelected\n ? 'bg-surface-container-high border-secondary/20 shadow-lg shadow-secondary/5 ring-1 ring-secondary/10 text-white'\n : 'bg-surface-container-low border-transparent hover:bg-surface-container-high/50 text-on-surface-variant',\n )}\n aria-pressed={isSelected}\n aria-label={`Select provider ${provider.name}`}\n >\n <div className=\"flex items-center justify-between mb-4\">\n <div className=\"flex items-center gap-4\">\n <div\n className={cn(\n 'w-10 h-10 rounded-xl bg-surface-container-highest flex items-center justify-center transition-colors',\n isSelected ? 'text-primary' : 'text-on-surface-variant',\n )}\n >\n <Database size={20} />\n </div>\n <div>\n <span\n className={cn(\n 'font-bold text-sm block transition-colors',\n isSelected ? 'text-white' : 'group-hover:text-white',\n )}\n >\n {provider.name}\n </span>\n <span className=\"text-[9px] font-bold text-on-surface-variant/40 uppercase tracking-widest leading-none mt-1 block\">\n {modelStatusText}\n </span>\n </div>\n </div>\n <div className=\"w-1.5 h-1.5 rounded-full bg-secondary animate-pulse shadow-[0_0_10px_rgba(78,222,163,0.5)]\" />\n </div>\n <div className=\"flex justify-start\">\n <span className=\"text-[9px] font-black uppercase tracking-widest text-secondary\">\n Healthy\n </span>\n </div>\n </button>\n );\n })}\n </div>\n );\n};\n\nexport default ProviderList;\n","import { useCallback, useMemo, useState } from 'react';\nimport type { Provider } from '../../api/providers';\nimport { useProviderModelsQuery, useProvidersQuery } from './useProviderQueries';\n\nexport const useProvidersPage = () => {\n const [isRegisterProviderModalOpen, setIsRegisterProviderModalOpen] = useState(false);\n const [isCreateModelModalOpen, setIsCreateModelModalOpen] = useState(false);\n const [requestedProviderId, setRequestedProviderId] = useState<string | null>(null);\n\n const {\n data: providers = [],\n isPending: isLoadingProviders,\n isFetching: isFetchingProviders,\n refetch: refetchProviders,\n } = useProvidersQuery();\n const selectedProviderId =\n providers.find((provider) => provider.id === requestedProviderId)?.id ??\n providers[0]?.id ??\n null;\n const modelsQuery = useProviderModelsQuery(selectedProviderId);\n\n const selectedProvider = useMemo<Provider | null>(\n () => providers.find((provider) => provider.id === selectedProviderId) ?? null,\n [providers, selectedProviderId],\n );\n\n const refreshProviders = useCallback(async () => {\n await Promise.all([\n refetchProviders(),\n selectedProviderId ? modelsQuery.refetch() : Promise.resolve(undefined),\n ]);\n }, [modelsQuery, refetchProviders, selectedProviderId]);\n\n return {\n providers,\n selectedProvider,\n selectedProviderId,\n setSelectedProviderId: setRequestedProviderId,\n models: modelsQuery.data ?? [],\n isLoadingProviders,\n isFetchingProviders,\n isLoadingModels: modelsQuery.isPending || modelsQuery.isFetching,\n isRegisterProviderModalOpen,\n setIsRegisterProviderModalOpen,\n isCreateModelModalOpen,\n setIsCreateModelModalOpen,\n refreshProviders,\n };\n};\n","import {\n Activity,\n ChevronRight,\n Clock,\n Plus,\n RefreshCcw,\n Server,\n Terminal,\n TrendingUp,\n} from 'lucide-react';\nimport CreateModelModal from '../components/CreateModelModal';\nimport RegisterProviderModal from '../components/RegisterProviderModal';\nimport ProviderDetail from '../components/providers/ProviderDetail';\nimport ProviderList from '../components/providers/ProviderList';\nimport { useProvidersPage } from '../hooks/providers/useProvidersPage';\nimport { cn } from '../lib/cn';\n\nconst Providers = () => {\n const {\n providers,\n selectedProvider,\n selectedProviderId,\n setSelectedProviderId,\n models,\n isLoadingProviders,\n isFetchingProviders,\n isLoadingModels,\n isRegisterProviderModalOpen,\n setIsRegisterProviderModalOpen,\n isCreateModelModalOpen,\n setIsCreateModelModalOpen,\n refreshProviders,\n } = useProvidersPage();\n\n return (\n <div className=\"space-y-10 animate-in fade-in slide-in-from-bottom-4 duration-700\">\n <header>\n <div className=\"flex flex-col md:flex-row md:items-end justify-between gap-6\">\n <div>\n <nav className=\"flex items-center gap-2 mb-2 text-[10px] uppercase tracking-widest text-primary font-bold\">\n <span className=\"opacity-60\">Infrastructure</span>\n <ChevronRight size={12} className=\"opacity-40\" />\n <span>Model Providers</span>\n </nav>\n <h1 className=\"text-4xl font-extrabold font-headline tracking-tighter text-white\">\n Provider Core\n </h1>\n <p className=\"text-on-surface-variant text-sm mt-1\">\n Manage global LLM integrations and endpoint health.\n </p>\n </div>\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => {\n void refreshProviders();\n }}\n disabled={isFetchingProviders}\n className=\"px-5 py-2.5 bg-surface-container-high text-on-surface rounded-lg text-xs font-bold uppercase tracking-widest hover:bg-surface-container-highest transition-all ring-1 ring-outline-variant/10 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label=\"Refresh provider status\"\n >\n <RefreshCcw size={14} className={cn(isFetchingProviders && 'animate-spin')} />\n {isFetchingProviders ? 'Refreshing...' : 'Refresh Status'}\n </button>\n <button\n type=\"button\"\n onClick={() => setIsRegisterProviderModalOpen(true)}\n className=\"px-6 py-2.5 bg-primary text-on-primary rounded-lg text-xs font-bold uppercase tracking-widest shadow-lg shadow-primary/20 hover:scale-[1.02] active:scale-[0.98] transition-all flex items-center gap-2\"\n aria-label=\"Open register provider modal\"\n >\n <Plus size={16} />\n Register Provider\n </button>\n </div>\n </div>\n </header>\n\n <section className=\"grid grid-cols-1 md:grid-cols-4 gap-6\">\n <div className=\"md:col-span-2 bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-2xl relative overflow-hidden group\">\n <div className=\"absolute top-0 right-0 p-6 opacity-[0.03] group-hover:opacity-10 transition-opacity\">\n <Activity size={80} strokeWidth={1} />\n </div>\n <h3 className=\"text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50 mb-6\">\n Total Request Volume\n </h3>\n <div className=\"flex items-end gap-5\">\n <span className=\"text-5xl font-headline font-black text-white tracking-tighter\">2.4M</span>\n <span className=\"text-secondary text-xs font-bold mb-2 flex items-center gap-1 bg-secondary/10 px-2 py-0.5 rounded-full\">\n <TrendingUp size={14} /> +12%\n </span>\n </div>\n <div className=\"mt-8 flex gap-1.5 h-12 items-end opacity-40\">\n {[30, 50, 20, 70, 40, 90, 60, 45, 80, 55, 30, 40].map((height, index) => (\n <div\n key={index}\n className=\"w-full bg-secondary rounded-t-sm transition-all duration-1000\"\n style={{ height: `${height}%`, opacity: (index + 1) / 12 }}\n />\n ))}\n </div>\n </div>\n\n <div className=\"bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-xl flex flex-col justify-between group hover:border-secondary/20 transition-all\">\n <div className=\"w-10 h-10 rounded-xl bg-secondary/10 flex items-center justify-center text-secondary mb-4 group-hover:scale-110 transition-transform\">\n <Activity size={20} />\n </div>\n <div>\n <h3 className=\"text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50\">\n Global Uptime\n </h3>\n <div className=\"mt-2\">\n <span className=\"text-3xl font-headline font-black text-secondary\">99.98%</span>\n <p className=\"text-[9px] text-on-surface-variant/40 mt-1 uppercase font-bold tracking-widest\">\n Aggregated Network Score\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"bg-surface-container-low p-7 rounded-2xl border border-outline-variant/5 shadow-xl flex flex-col justify-between group hover:border-tertiary/20 transition-all\">\n <div className=\"w-10 h-10 rounded-xl bg-tertiary/10 flex items-center justify-center text-tertiary mb-4 group-hover:scale-110 transition-transform\">\n <Clock size={20} />\n </div>\n <div>\n <h3 className=\"text-[10px] uppercase tracking-[0.2em] font-black text-on-surface-variant/50\">\n Avg. Latency\n </h3>\n <div className=\"mt-2\">\n <span className=\"text-3xl font-headline font-black text-tertiary\">342ms</span>\n <p className=\"text-[9px] text-on-surface-variant/40 mt-1 uppercase font-bold tracking-widest\">\n P95 Response Time\n </p>\n </div>\n </div>\n </div>\n </section>\n\n <div className=\"grid grid-cols-1 lg:grid-cols-12 gap-8\">\n <div className=\"lg:col-span-4 space-y-5\">\n <h2 className=\"text-[10px] font-black uppercase tracking-[0.3em] text-on-surface-variant/40 flex items-center gap-3\">\n <Server size={14} className=\"text-primary\" /> Active Providers\n </h2>\n\n <ProviderList\n providers={providers}\n selectedProviderId={selectedProviderId}\n selectedProviderModelCount={selectedProviderId === selectedProvider?.id ? models.length : 0}\n isLoading={isLoadingProviders}\n onSelect={setSelectedProviderId}\n />\n </div>\n\n <div className=\"lg:col-span-8 space-y-8\">\n <ProviderDetail\n provider={selectedProvider}\n models={models}\n isLoadingModels={isLoadingModels}\n isRefreshing={isFetchingProviders}\n onRefresh={() => {\n void refreshProviders();\n }}\n onOpenCreateModel={() => setIsCreateModelModalOpen(true)}\n />\n\n <div className=\"bg-surface-container-lowest border border-outline-variant/10 rounded-2xl p-8 shadow-2xl relative overflow-hidden group\">\n <div className=\"absolute top-4 right-4 text-on-surface-variant/5 italic text-[10px] font-mono select-none\">\n SYSTEM_STREAM_L09\n </div>\n <div className=\"flex justify-between items-center mb-6 border-b border-outline-variant/5 pb-5\">\n <span className=\"flex items-center gap-3 uppercase tracking-[0.2em] font-black text-[10px] text-tertiary\">\n <span className=\"w-2 h-2 rounded-full bg-secondary animate-pulse shadow-[0_0_10px_rgba(78,222,163,0.5)]\" />\n Live System Event Stream\n </span>\n <div className=\"flex items-center gap-2 px-3 py-1 rounded-full bg-surface-container-high text-[9px] font-bold text-on-surface-variant/60\">\n <Terminal size={12} />\n <span>FILTER: gemini-1.5-*</span>\n </div>\n </div>\n <div className=\"space-y-2 font-mono text-[11px] leading-relaxed\">\n <p className=\"flex gap-4\">\n <span className=\"text-on-surface-variant/30\">[14:22:01]</span>{' '}\n <span className=\"text-primary font-bold\">INFO</span>{' '}\n <span className=\"text-on-surface-variant/80 font-medium\">\n Node connected: gemini-1.5-pro-instance-09\n </span>\n </p>\n <p className=\"flex gap-4\">\n <span className=\"text-on-surface-variant/30\">[14:22:05]</span>{' '}\n <span className=\"text-secondary font-bold\">TRANS</span>{' '}\n <span className=\"text-on-surface-variant/80 font-medium\">\n Request successful: UUID-4421-AX (Lat: 154ms)\n </span>\n </p>\n <p className=\"flex gap-4\">\n <span className=\"text-on-surface-variant/30\">[14:23:12]</span>{' '}\n <span className=\"text-secondary font-bold\">TRANS</span>{' '}\n <span className=\"text-on-surface-variant/80 font-medium\">\n Request successful: UUID-9901-BL (Lat: 162ms)\n </span>\n </p>\n <p className=\"flex gap-4\">\n <span className=\"text-on-surface-variant/30\">[14:24:45]</span>{' '}\n <span className=\"text-tertiary font-bold\">WARN</span>{' '}\n <span className=\"text-on-surface-variant/80 font-medium\">\n Rate limit approach: gemini-1.5-flash (88% quota)\n </span>\n </p>\n <p className=\"flex gap-4\">\n <span className=\"text-on-surface-variant/30\">[14:25:00]</span>{' '}\n <span className=\"text-primary font-bold\">INFO</span>{' '}\n <span className=\"text-on-surface-variant/80 font-medium\">\n Health check passed for all 2 providers.\n </span>\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <div className=\"fixed bottom-8 right-8 z-[100] animate-in slide-in-from-right-10 duration-500\">\n <div className=\"bg-[#131b2e]/60 backdrop-blur-xl rounded-full px-4 py-2 flex items-center gap-3 ring-1 ring-white/10 shadow-2xl shadow-black/50 overflow-hidden group\">\n <div className=\"absolute inset-0 bg-gradient-to-r from-secondary/10 via-primary/5 to-tertiary/10 opacity-50 group-hover:opacity-100 transition-opacity\" />\n <div className=\"flex -space-x-1.5 relative z-10\">\n <div className=\"w-4 h-4 rounded-full bg-secondary shadow-[0_0_8px_rgba(78,222,163,0.5)]\" />\n <div className=\"w-4 h-4 rounded-full bg-primary shadow-[0_0_8px_rgba(173,198,255,0.5)]\" />\n <div className=\"w-4 h-4 rounded-full bg-tertiary shadow-[0_0_8px_rgba(221,183,255,0.5)]\" />\n </div>\n <span className=\"text-[10px] font-black uppercase tracking-[0.2em] text-white/50 relative z-10\">\n System Synchronized\n </span>\n </div>\n </div>\n\n <RegisterProviderModal\n isOpen={isRegisterProviderModalOpen}\n onClose={() => setIsRegisterProviderModalOpen(false)}\n onCreated={(providerId) => {\n setSelectedProviderId(providerId);\n setIsRegisterProviderModalOpen(false);\n }}\n />\n\n <CreateModelModal\n isOpen={isCreateModelModalOpen}\n onClose={() => setIsCreateModelModalOpen(false)}\n onCreated={() => setIsCreateModelModalOpen(false)}\n providerId={selectedProvider?.id ?? ''}\n providerName={selectedProvider?.name ?? ''}\n />\n </div>\n );\n};\n\nexport default Providers;\n"],"x_google_ignoreList":[0,1,2],"mappings":"8vBAcA,IAAM,EAAU,EAAiB,UALd,CACjB,CAAC,OAAQ,CAAE,MAAO,KAAM,OAAQ,KAAM,EAAG,IAAK,EAAG,IAAK,GAAI,IAAK,IAAK,SAAU,CAAC,CAC/E,CAAC,OAAQ,CAAE,GAAI,IAAK,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,SAAU,CAAC,CAClE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,SAAU,CAAC,CACpE,CACsD,CCCjD,EAAa,EAAiB,cANjB,CACjB,CAAC,OAAQ,CAAE,EAAG,qDAAsD,IAAK,SAAU,CAAC,CACpF,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,SAAU,CAAC,CAC1C,CAAC,OAAQ,CAAE,EAAG,sDAAuD,IAAK,SAAU,CAAC,CACrF,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,SAAU,CAAC,CAC7C,CAC6D,CCFxD,EAAW,EAAiB,YAJf,CACjB,CAAC,OAAQ,CAAE,EAAG,oDAAqD,IAAK,SAAU,CAAC,CACnF,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,SAAU,CAAC,CAC7C,CACyD,YCR1D,EAAA,uDAeA,MAAA,EAAA,kCAKM,MAAA,EAAA,SAAA,EAAA,OAIN,EAAA,GAAA,EAAA,8E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,CAAA,CACL,IACJ,EAAA,EAAA,MAAC,IAAD,CAAG,UAAU,sBAAb,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sCAA6B,aAAiB,CAAA,CAAC,KAC/D,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,kCAAyB,OAAW,CAAA,CAAC,KACrD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,kDAAyC,2CAElD,CAAA,CACL,GACA,GACF,GACF,GACF,IAEN,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,0FACb,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,iKAAf,EACE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,yIAA2I,CAAA,EAC1J,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,2CAAf,EACE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,0EAA4E,CAAA,EAC3F,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,yEAA2E,CAAA,EAC1F,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,0EAA4E,CAAA,CACvF,IACN,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,yFAAgF,sBAEzF,CAAA,CACH,GACF,CAAA,EAEN,EAAA,EAAA,KAAC,EAAD,CACE,OAAQ,EACR,YAAe,EAA+B,GAAM,CACpD,UAAY,GAAe,CACzB,EAAsB,EAAW,CACjC,EAA+B,GAAM,EAEvC,CAAA,EAEF,EAAA,EAAA,KAAC,EAAD,CACE,OAAQ,EACR,YAAe,EAA0B,GAAM,CAC/C,cAAiB,EAA0B,GAAM,CACjD,WAAY,GAAkB,IAAM,GACpC,aAAc,GAAkB,MAAQ,GACxC,CAAA,CACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-COnpUsM8.js";import{g as n}from"./vendor-dnd-CxfOy4-Z.js";import{r}from"./vendor-markdown-Dl_1qnne.js";import{o as i,r as a,t as o}from"./useNotification-DK-pV16c.js";import{t as s}from"./activity-CIlCK2jL.js";import{t as c}from"./brain-_N041Xks.js";import{t as l}from"./clock-C0d1RzP_.js";import{n as u,t as d}from"./sparkles-CCXaTT3H.js";import{i as f,n as p,r as m,t as h}from"./trending-up-DBTQIgW8.js";import{t as g}from"./trash-2-BNP4kC5c.js";import{n as _,t as v}from"./vendor-motion-CkXYvnuI.js";import{d as y,g as b,h as x,n as S,s as C,u as w,v as T}from"./index-yzhzS93F.js";import{t as E}from"./tasks-DEHCZk48.js";var D=i(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),O=i(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),ee=i(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),k=i(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),A=i(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),j=i(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),M=i(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),N=i(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),P={ACTIVE:`active`,PAUSED:`paused`,ERROR:`error`},F={create:e=>a.post(`/recurrent-tasks`,e),findAll:()=>a.get(`/recurrent-tasks`),findOne:e=>a.get(`/recurrent-tasks/${e}`),update:(e,t)=>a.patch(`/recurrent-tasks/${e}`,t),delete:e=>a.delete(`/recurrent-tasks/${e}`)},I=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={949(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null;break}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},333(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0?!0:i,o=r.verbose,s=o===void 0?!1:o,c=r.dayOfWeekStartIndexZero,l=c===void 0?!0:c,u=r.monthStartIndexZero,d=u===void 0?!1:u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p===void 0?!1:p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields,v={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_===void 0?!1:_};return v.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,v).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{if(this.expressionParts=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero).parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var n=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),a=this.getMonthDescription(),o=this.getDayOfWeekDescription(),s=this.getYearDescription();t+=n+r+o+a+s,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a+=` `,a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l);break}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}else if(n==`*`&&this.expressionParts[5]!=`*`)return``;else t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)});break}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var s=null,c=e.indexOf(`/`)>-1,l=e.indexOf(`-`)>-1,u=e.indexOf(`,`)>-1;if(!e)s=``;else if(e===`*`)s=t;else if(!c&&!l&&!u)s=r.StringUtilities.format(o(e),n(e));else if(u){for(var d=e.split(`,`),f=``,p=0;p<d.length;p++)if(p>0&&d.length>2&&(f+=`,`,p<d.length-1&&(f+=` `)),p>0&&d.length>1&&(p==d.length-1||d.length==2)&&(f+=`${this.i18n.spaceAnd()} `),d[p].indexOf(`/`)>-1||d[p].indexOf(`-`)>-1){var m=d[p].indexOf(`-`)>-1&&d[p].indexOf(`/`)==-1,h=this.getSegmentDescription(d[p],t,n,i,m?this.i18n.commaX0ThroughX1:a,o);m&&(h=h.replace(`, `,``)),f+=h}else if(!c)f+=n(d[p]);else{var g=this.getSegmentDescription(d[p],t,n,i,a,o);g&&g.startsWith(`, `)&&(g=g.substring(2)),f+=g}s=c?f:r.StringUtilities.format(o(e),f)}else if(c){var d=e.split(`/`);if(s=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf(`-`)>-1){var _=this.generateRangeSegmentDescription(d[0],a,n);_.indexOf(`, `)!=0&&(s+=`, `),s+=_}else if(d[0].indexOf(`*`)==-1){var v=r.StringUtilities.format(o(d[0]),n(d[0]));v=v.replace(`, `,``),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),v)}}else l&&(s=this.generateRangeSegmentDescription(e,a,n));return s},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;n&&(l=`:${(`00`+n).substring(n.length)}`);var u=a.toString(),d=(`00`+u).substring(u.length),f=o.toString(),p=(`00`+f).substring(f.length),m=this.options.trimHoursLeadingZero?u:d;return`${c?s:``}${m}:${p}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,`__esModule`,{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},515(e,t){Object.defineProperty(t,`__esModule`,{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},823(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,`__esModule`,{value:!0}),e.toString=void 0;var t=n(333),i=n(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())})),L=e(n(),1),R=e(I(),1),z=r(),B=({isOpen:e,onClose:t,onSuccess:n,initialData:r})=>{let{notifyApiError:i,notifyError:a}=o(),[s,m]=(0,L.useState)(!1),[h,g]=(0,L.useState)([]),[y,w]=(0,L.useState)(!1),[D,k]=(0,L.useState)(!1),[A,j]=(0,L.useState)(``),[M,I]=(0,L.useState)(``),[B,V]=(0,L.useState)(``),[H,U]=(0,L.useState)(``),[W,G]=(0,L.useState)(E.MEDIUM),[K,q]=(0,L.useState)(null),[J,Y]=(0,L.useState)(!1),X=(()=>{try{return R.default.toString(B)}catch{return null}})(),Z=[{label:`Every 10s`,value:`*/10 * * * * *`},{label:`Every 15m`,value:`*/15 * * * *`},{label:`Hourly`,value:`0 * * * *`},{label:`Daily (12AM)`,value:`0 0 * * *`},{label:`Weekly (Sun)`,value:`0 0 * * 0`},{label:`Monthly (1st)`,value:`0 0 1 * *`}];(0,L.useEffect)(()=>{let n=e=>{e.key===`Escape`&&t()};return e?(window.addEventListener(`keydown`,n),te(),r&&(j(r.title),I(r.description),V(r.cronExpression),U(r.assignee.id),G(r.priority))):(j(``),I(``),V(``),U(``),G(E.MEDIUM),q(null),Y(!1)),()=>window.removeEventListener(`keydown`,n)},[e,r,t]);let te=async()=>{try{w(!0),g((await S.findAll()).data||[])}catch(e){console.error(`Failed to fetch agents:`,e)}finally{w(!1)}},Q=e=>{if(!e.trim())return q(`Cron expression is required`),!1;let t=e.trim().split(/\s+/);return t.length!==5&&t.length!==6?(q(`Invalid cron format (expected 5 or 6 fields)`),!1):(q(null),!0)},ne=async e=>{if(e.preventDefault(),!A||!M||!H||!B){let e=[];A||e.push(`title`),M||e.push(`description`),H||e.push(`assigneeId`),B||e.push(`cronExpression`),a(`Validation Error`,`Please fill in all required fields: ${e.join(`, `)}`);return}if(Q(B))try{m(!0),r?await F.update(r.id,{title:A,description:M,cronExpression:B,assigneeId:H,priority:W}):await F.create({title:A,description:M,cronExpression:B,assigneeId:H,priority:W,status:P.ACTIVE}),n(),t()}catch(e){console.error(`Failed to save recurrent task:`,e),i(e,`Operation Failed`)}finally{m(!1)}},re=e=>{switch(e){case E.CRITICAL:return`CRIT`;case E.HIGH:return`HIGH`;case E.MEDIUM:return`MED`;case E.LOW:return`LOW`;default:return`MED`}},$=h.find(e=>e.id===H);return e?(0,z.jsx)(_,{children:(0,z.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-background/60 backdrop-blur-md flex items-center justify-center p-4 overflow-y-auto`,children:(0,z.jsxs)(v.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:`glass-panel w-full max-w-2xl rounded-xl overflow-hidden shadow-2xl glow-primary flex flex-col my-8`,"data-testid":`recurrent-task-modal`,onClick:e=>e.stopPropagation(),children:[(0,z.jsxs)(`div`,{className:`p-6 pb-0 flex justify-between items-start`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-2xl font-headline font-extrabold text-primary tracking-tight`,children:r?`Update Protocol`:`Deploy New Task`}),(0,z.jsx)(`p`,{className:`text-sm text-on-surface-variant mt-1`,children:r?`Modify the existing automated orchestration routine.`:`Configure an automated orchestration routine.`})]}),(0,z.jsx)(`button`,{onClick:t,className:`text-on-surface-variant hover:text-on-surface transition-colors p-1`,children:(0,z.jsx)(C,{size:24})})]}),(0,z.jsxs)(`form`,{onSubmit:ne,className:`flex flex-col`,children:[(0,z.jsxs)(`div`,{className:`p-8 space-y-8 overflow-y-auto max-h-[70vh] custom-scrollbar`,children:[(0,z.jsxs)(`section`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-tertiary`,children:[(0,z.jsx)(O,{size:16}),(0,z.jsx)(`h3`,{className:`text-xs font-bold uppercase tracking-widest font-headline`,children:`Task Identity`})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 gap-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-on-surface-variant px-1`,children:`Task Name`}),(0,z.jsx)(`input`,{type:`text`,className:`w-full bg-surface-container-lowest border-none rounded-lg p-3 text-on-surface placeholder:text-outline-variant focus:ring-1 focus:ring-tertiary transition-all`,placeholder:`e.g., Daily Market Sweep`,value:A,onChange:e=>j(e.target.value)})]}),(0,z.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-on-surface-variant px-1`,children:`Description`}),(0,z.jsx)(`textarea`,{className:`w-full bg-surface-container-lowest border-none rounded-lg p-3 text-on-surface placeholder:text-outline-variant focus:ring-1 focus:ring-tertiary transition-all`,placeholder:`Briefly describe the objective of this task...`,rows:2,value:M,onChange:e=>I(e.target.value)})]})]})]}),(0,z.jsxs)(`section`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-primary`,children:[(0,z.jsx)(T,{size:16}),(0,z.jsx)(`h3`,{className:`text-xs font-bold uppercase tracking-widest font-headline`,children:`Agent Fleet`})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsxs)(`div`,{className:`flex items-center bg-surface-container-lowest rounded-lg p-3 cursor-pointer hover:bg-surface-container-high transition-colors ring-1 ring-outline-variant/10 focus-within:ring-primary/40`,onClick:()=>k(!D),role:`combobox`,"aria-expanded":D,"data-testid":`agent-select`,children:[(0,z.jsx)(`div`,{className:`w-8 h-8 rounded bg-primary/20 flex items-center justify-center mr-3`,children:(0,z.jsx)(c,{size:16,className:`text-primary`})}),(0,z.jsxs)(`div`,{className:`flex-1`,children:[(0,z.jsx)(`div`,{className:`text-sm font-semibold text-on-surface`,children:$?$.name:`Select Intelligence Core`}),(0,z.jsx)(`div`,{className:`text-xs text-on-surface-variant`,children:$?$.role||`Active Agent`:`Choose an active agent for execution`})]}),(0,z.jsx)(b,{size:20,className:`text-outline transition-transform ${D?`rotate-180`:``}`})]}),(0,z.jsx)(_,{children:D&&(0,z.jsx)(v.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:`absolute top-full left-0 w-full mt-2 bg-surface-container-highest rounded-lg shadow-xl p-2 z-50 border border-outline-variant/20 max-h-60 overflow-y-auto custom-scrollbar`,"data-testid":`agent-dropdown`,children:y?(0,z.jsx)(`div`,{className:`p-4 text-center text-xs text-on-surface-variant animate-pulse`,children:`Scanning fleet...`}):h.length===0?(0,z.jsx)(`div`,{className:`p-4 text-center text-xs text-on-surface-variant`,children:`No active agents found.`}):h.map(e=>(0,z.jsxs)(`div`,{className:`p-3 hover:bg-surface-container-low rounded cursor-pointer flex items-center gap-3 transition-colors group`,onClick:()=>{U(e.id),k(!1)},"data-testid":`agent-option-${e.id}`,children:[(0,z.jsx)(`div`,{className:`w-8 h-8 rounded bg-surface-container-high flex items-center justify-center group-hover:bg-primary/20 transition-colors`,children:(0,z.jsx)(f,{size:14,className:`text-secondary group-hover:text-primary`})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`text-sm font-bold text-on-surface group-hover:text-primary transition-colors`,children:e.name}),(0,z.jsxs)(`div`,{className:`text-[10px] text-secondary`,children:[e.status||`Active`,` • `,e.role||`Core`]})]})]},e.id))})}),(0,z.jsxs)(`select`,{className:`sr-only`,value:H,onChange:e=>U(e.target.value),children:[(0,z.jsx)(`option`,{value:``,children:`Select Agent`}),h.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,z.jsxs)(`section`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-secondary`,children:[(0,z.jsx)(l,{size:16}),(0,z.jsx)(`h3`,{className:`text-xs font-bold uppercase tracking-widest font-headline`,children:`Scheduling Protocol`})]}),(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,z.jsxs)(`div`,{className:`relative flex-1`,children:[(0,z.jsx)(`input`,{required:!0,className:`w-full bg-surface-container-lowest border-none rounded-lg p-3 font-mono text-sm text-secondary focus:ring-1 transition-all pr-10 ${K?`ring-1 ring-error`:`focus:ring-secondary`}`,type:`text`,value:B,onChange:e=>{V(e.target.value),K&&Q(e.target.value)},onBlur:e=>Q(e.target.value),placeholder:`e.g. 0 0 * * *`}),(0,z.jsx)(u,{size:16,className:`absolute right-3 top-3.5 text-outline-variant`})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>Y(!J),className:`p-3 rounded-lg border transition-all ${J?`bg-secondary/20 border-secondary text-secondary shadow-[0_0_10px_rgba(78,222,163,0.2)]`:`bg-surface-container-lowest border-outline-variant/10 text-on-surface-variant hover:text-secondary hover:border-secondary/30`}`,title:`Open Cron Wizard`,children:(0,z.jsx)(N,{size:18})})]}),(0,z.jsx)(_,{children:J&&(0,z.jsx)(v.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},className:`overflow-hidden bg-surface-container-highest/30 rounded-xl border border-secondary/10`,children:(0,z.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-secondary/60`,children:[(0,z.jsx)(d,{size:12}),`Temporal Presets`]}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:Z.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>{V(e.value),q(null)},className:`px-3 py-1.5 rounded-full text-[10px] font-bold border transition-all ${B===e.value?`bg-secondary text-on-secondary border-secondary shadow-lg shadow-secondary/20`:`bg-surface-container-lowest border-outline-variant/10 text-on-surface-variant hover:border-secondary/40 hover:text-secondary`}`,children:e.label},e.value))})]})})}),X&&!K&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] text-secondary font-medium bg-secondary/5 px-3 py-2 rounded-lg border border-secondary/10 animate-in fade-in slide-in-from-left-2`,children:[(0,z.jsx)(ee,{size:14,className:`shrink-0`}),(0,z.jsx)(`span`,{children:X})]}),(0,z.jsx)(`div`,{className:`px-1 py-1`,children:(0,z.jsxs)(`p`,{className:`text-[9px] text-on-surface-variant/40 font-mono uppercase tracking-[0.1em] flex gap-2`,children:[(0,z.jsx)(`span`,{className:`text-secondary/60 opacity-60 font-black`,children:`[Sec]`}),(0,z.jsx)(`span`,{children:`Min`}),(0,z.jsx)(`span`,{children:`Hour`}),(0,z.jsx)(`span`,{children:`Dom`}),(0,z.jsx)(`span`,{children:`Mon`}),(0,z.jsx)(`span`,{children:`Dow`})]})}),K&&(0,z.jsxs)(`p`,{className:`text-[10px] text-error px-1 flex items-center gap-1.5 font-medium`,children:[(0,z.jsx)(x,{size:12}),K]})]})]}),(0,z.jsxs)(`section`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-error`,children:[(0,z.jsx)(x,{size:16}),(0,z.jsx)(`h3`,{className:`text-xs font-bold uppercase tracking-widest font-headline`,children:`Execution Priority`})]}),(0,z.jsx)(`div`,{className:`flex bg-surface-container-lowest p-1 rounded-lg`,children:[E.LOW,E.MEDIUM,E.HIGH,E.CRITICAL].map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>G(e),className:`flex-1 py-2 text-[10px] font-bold rounded transition-all ${W===e?e===E.CRITICAL?`bg-error/20 text-error`:`bg-surface-container-high text-primary`:`text-on-surface-variant hover:text-on-surface`}`,children:re(e)},e))})]})]}),(0,z.jsxs)(`section`,{className:`bg-surface-container-low p-5 rounded-xl border border-outline-variant/10`,children:[(0,z.jsxs)(`div`,{className:`flex justify-between items-center mb-4`,children:[(0,z.jsx)(`h4`,{className:`text-xs font-bold font-headline text-on-surface-variant tracking-wide`,children:`Deployment Preview`}),(0,z.jsx)(`span`,{className:`text-[10px] bg-secondary-container/30 text-secondary px-2 py-0.5 rounded-full font-bold uppercase`,children:`System Cluster 0-A`})]}),(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between text-xs p-2 bg-surface-container-high/50 rounded-lg`,children:[(0,z.jsx)(`span`,{className:`text-on-surface font-medium italic`,children:`Logic integrity check passed`}),(0,z.jsx)(`span`,{className:`text-secondary font-bold`,children:`READY`})]}),(0,z.jsxs)(`div`,{className:`text-[10px] text-on-surface-variant leading-relaxed`,children:[`This task will be registered in the Alpha-Centauri cluster and executed by `,(0,z.jsx)(`span`,{className:`text-primary`,children:$?.name||`an assigned agent`}),` according to the provided temporal sequence.`]})]})]})]}),(0,z.jsxs)(`div`,{className:`p-6 bg-surface-container-low/50 flex justify-end items-center gap-4 sticky bottom-0 border-t border-outline-variant/10`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:t,className:`px-6 py-2.5 text-sm font-bold text-on-surface-variant hover:text-on-surface transition-all active:scale-95`,children:`Cancel`}),(0,z.jsxs)(`button`,{type:`submit`,disabled:s,className:`px-8 py-2.5 text-sm font-bold bg-primary text-on-primary rounded-lg shadow-lg hover:shadow-primary/20 transition-all active:scale-95 flex items-center gap-2 disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed group`,children:[s?(0,z.jsx)(`div`,{className:`w-4 h-4 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,z.jsx)(p,{size:16,className:`group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform`}),r?`Update Task`:`Create Task`]})]})]})]})})}):null},V=()=>{let{notifySuccess:e,notifyApiError:t}=o(),[n,r]=(0,L.useState)([]),[i,a]=(0,L.useState)(!0),[c,l]=(0,L.useState)(!1),[u,f]=(0,L.useState)(void 0),p=(0,L.useCallback)(async()=>{try{a(!0),r((await F.findAll()).data)}catch(e){t(e,`Error fetching recurrent tasks`)}finally{a(!1)}},[t]);(0,L.useEffect)(()=>{p()},[p]);let _=async(n,r)=>{if(window.confirm(`Are you sure you want to delete the recurrent protocol "${r}"? This action cannot be undone.`))try{await F.delete(n),e(`Protocol Terminated`,`The task "${r}" has been removed from the fleet.`),p()}catch(e){t(e,`Error deleting task`)}},b=()=>{f(void 0),l(!0)},x=e=>{f(e),l(!0)},S=async n=>{let r=n.status===P.ACTIVE?P.PAUSED:P.ACTIVE;try{await F.update(n.id,{status:r}),e(`Protocol ${r===P.ACTIVE?`Resumed`:`Paused`}`,`Operation "${n.title}" has been ${r===P.ACTIVE?`re-activated`:`suspended`}.`),p()}catch(e){t(e,`Failed to update protocol status`)}},C=[{label:`Active Schedules`,value:n.filter(e=>e.status===P.ACTIVE).length.toString(),change:`+12%`,icon:h,color:`text-secondary`,bg:`bg-secondary/10`},{label:`Success Rate`,value:`99.8%`,trend:99.8,icon:s,color:`text-primary`},{label:`Paused Agents`,value:n.filter(e=>e.status===P.PAUSED).length.toString(),subtext:`Awaiting manual audit`,icon:k,color:`text-on-surface-variant`},{label:`Critical Errors`,value:n.filter(e=>e.status===P.ERROR).length.toString(),subtext:`System integrity: nominal`,icon:D,color:`text-error`,bg:`bg-error/10`}];return(0,z.jsxs)(`div`,{className:`space-y-10 animate-in fade-in duration-700`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col md:flex-row justify-between items-start md:items-end gap-6`,children:[(0,z.jsxs)(v.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5},children:[(0,z.jsx)(`h2`,{className:`text-4xl font-headline font-extrabold text-white tracking-tight mb-2`,children:`Temporal Orchestration`}),(0,z.jsxs)(`p`,{className:`text-on-surface-variant font-body max-w-md`,children:[`Manage autonomous agent lifecycle schedules and recurrent operational flows within the `,(0,z.jsx)(`span`,{className:`text-primary font-bold`,children:`Alpha-Centauri`}),` cluster.`]})]}),(0,z.jsxs)(v.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:b,className:`px-6 py-3.5 bg-primary text-on-primary rounded-xl font-black text-xs uppercase tracking-widest flex items-center gap-2 shadow-lg shadow-primary/20 transition-all border border-primary-container/20 group hover:shadow-primary/40`,children:[(0,z.jsx)(y,{size:18,className:`group-hover:rotate-90 transition-transform duration-300`}),`New Scheduled Task`]})]}),(0,z.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6`,children:C.map((e,t)=>(0,z.jsxs)(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:t*.1},className:`bg-surface-container-low p-6 rounded-2xl border border-outline-variant/10 shadow-xl group hover:border-primary/20 transition-colors`,children:[(0,z.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 mb-1`,children:e.label}),(0,z.jsx)(`h3`,{className:`text-3xl font-headline font-black ${e.color}`,children:e.value}),e.change&&(0,z.jsxs)(`div`,{className:`mt-4 flex items-center text-[10px] font-black uppercase tracking-wider ${e.color} ${e.bg} px-2.5 py-1 rounded-full w-fit`,children:[(0,z.jsx)(e.icon,{size:12,className:`mr-1.5`}),e.change,` vs last month`]}),e.trend!==void 0&&(0,z.jsx)(`div`,{className:`mt-4 w-full bg-surface-container-highest h-1.5 rounded-full overflow-hidden`,children:(0,z.jsx)(v.div,{initial:{width:0},animate:{width:`${e.trend}%`},transition:{duration:1,delay:.5},className:`bg-primary h-full shadow-[0_0_12px_rgba(173,198,255,0.6)]`})}),e.subtext&&(0,z.jsx)(`p`,{className:`mt-4 text-[11px] text-on-surface-variant/50 font-medium italic`,children:e.subtext})]},t))}),(0,z.jsxs)(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:`bg-surface-container-low rounded-2xl overflow-hidden border border-outline-variant/10 shadow-2xl`,children:[(0,z.jsxs)(`div`,{className:`px-8 py-5 flex flex-col md:flex-row justify-between items-center gap-4 bg-surface-container-high/30 border-b border-outline-variant/10`,children:[(0,z.jsx)(`h4`,{className:`font-headline font-bold text-lg text-white`,children:`Recurrent Protocols`}),(0,z.jsxs)(`div`,{className:`flex gap-6`,children:[(0,z.jsxs)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-secondary shadow-[0_0_8px_rgba(78,222,163,0.4)]`}),` Active`]}),(0,z.jsxs)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-on-surface-variant/40`}),` Paused`]}),(0,z.jsxs)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-error shadow-[0_0_8px_rgba(255,180,171,0.4)]`}),` Error`]})]})]}),(0,z.jsx)(`div`,{className:`divide-y divide-outline-variant/10`,children:i?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-20 space-y-4`,children:[(0,z.jsx)(j,{className:`text-primary animate-spin`,size:40}),(0,z.jsx)(`p`,{className:`text-on-surface-variant font-mono text-xs uppercase tracking-widest animate-pulse`,children:`Synchronizing Fleet States...`})]}):n.length===0?(0,z.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-20 space-y-6 text-center`,children:[(0,z.jsx)(`div`,{className:`w-16 h-16 rounded-full bg-surface-container-highest flex items-center justify-center text-on-surface-variant`,children:(0,z.jsx)(m,{size:32})}),(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`h5`,{className:`text-xl font-headline font-bold text-white`,children:`No active protocols detected`}),(0,z.jsx)(`p`,{className:`text-on-surface-variant max-w-sm font-body`,children:`Deployment requested: Initiating autonomous routines requires manual configuration.`})]}),(0,z.jsx)(`button`,{onClick:b,className:`px-4 py-2 border border-primary/30 text-primary rounded-lg text-[10px] font-black uppercase tracking-widest hover:bg-primary/5 transition-colors`,children:`Initiate First Sequence`})]}):n.map(e=>(0,z.jsx)(`div`,{className:`px-8 py-6 hover:bg-surface-container-high/20 transition-all group`,children:(0,z.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-[auto_1fr_160px_160px_160px_220px] items-center gap-10`,children:[(0,z.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-surface-container-highest flex items-center justify-center border border-outline-variant/20 group-hover:border-primary/30 transition-colors shadow-inner`,children:(0,z.jsx)(s,{className:e.status===P.ERROR?`text-error`:`text-primary`,size:24})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h5`,{className:`text-xl font-headline font-black text-white mb-2 group-hover:text-primary transition-colors tracking-tight cursor-pointer`,onClick:()=>x(e),children:e.title}),(0,z.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 bg-surface-container-highest px-3 py-1.5 rounded-lg text-[10px] font-black uppercase tracking-widest text-on-surface-variant border border-outline-variant/10 shadow-sm`,children:[(0,z.jsx)(T,{size:12}),e.assignee?.name||`Unassigned`]})})]}),(0,z.jsxs)(`div`,{className:`hidden lg:block`,children:[(0,z.jsx)(`p`,{className:`text-[9px] font-black uppercase tracking-[0.2em] text-on-surface-variant/40 mb-2`,children:`Cycle Pattern`}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(`p`,{className:`font-mono text-xs text-tertiary font-bold tracking-widest`,children:e.cronExpression}),(0,z.jsx)(`p`,{className:`text-[10px] text-on-surface-variant/60 font-medium uppercase tracking-tighter italic`,children:`Recurrent Loop`})]})]}),(0,z.jsxs)(`div`,{className:`hidden lg:block`,children:[(0,z.jsx)(`p`,{className:`text-[9px] font-black uppercase tracking-[0.2em] text-on-surface-variant/40 mb-2`,children:`Last Execution`}),(0,z.jsx)(`p`,{className:`text-sm font-bold tracking-tight text-white/90`,children:e.lastRun?new Date(e.lastRun).toLocaleString():(0,z.jsx)(`span`,{className:`text-on-surface-variant/40 italic`,children:`Never executed`})})]}),(0,z.jsxs)(`div`,{className:`hidden lg:block`,children:[(0,z.jsx)(`p`,{className:`text-[9px] font-black uppercase tracking-[0.2em] text-on-surface-variant/40 mb-2`,children:`Deployed`}),(0,z.jsx)(`p`,{className:`text-sm font-bold text-on-surface tracking-tight`,children:new Date(e.createdAt).toLocaleDateString()})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-end relative h-full`,children:[(0,z.jsx)(`div`,{className:`flex items-center gap-4 group-hover:opacity-0 transition-opacity`,children:(0,z.jsx)(`span`,{className:`px-4 py-1.5 rounded-full text-[10px] font-black uppercase tracking-widest border transition-all ${e.status===P.ACTIVE?`bg-secondary/10 text-secondary border-secondary/20 shadow-[0_0_15px_rgba(78,222,163,0.1)]`:e.status===P.PAUSED?`bg-surface-container-highest text-on-surface-variant/60 border-outline-variant/20`:`bg-error/10 text-error border-error/20 shadow-[0_0_15px_rgba(255,180,171,0.1)]`}`,children:e.status})}),(0,z.jsxs)(`div`,{className:`absolute right-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-all translate-x-2 group-hover:translate-x-0`,children:[(0,z.jsx)(`button`,{className:`p-3 transition-colors ${e.status===P.ACTIVE?`text-secondary hover:text-secondary/80`:`text-on-surface-variant hover:text-secondary`}`,title:e.status===P.ACTIVE?`Pause Protocol`:`Resume Protocol`,onClick:()=>S(e),children:e.status===P.ACTIVE?(0,z.jsx)(k,{size:20}):(0,z.jsx)(A,{size:20})}),(0,z.jsx)(`button`,{className:`p-3 text-on-surface-variant hover:text-primary transition-colors`,title:`Edit`,onClick:()=>x(e),children:(0,z.jsx)(M,{size:20})}),(0,z.jsx)(`button`,{className:`p-3 text-on-surface-variant hover:text-error transition-colors`,title:`Delete`,onClick:()=>_(e.id,e.title),children:(0,z.jsx)(g,{size:20})})]})]})]})},e.id))})]}),(0,z.jsxs)(v.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{delay:.6},className:`p-8 rounded-3xl bg-gradient-to-br from-tertiary/10 via-surface-container-low to-surface-container-low border border-tertiary/20 relative overflow-hidden group`,children:[(0,z.jsxs)(`div`,{className:`relative z-10 flex flex-col md:flex-row gap-8 items-start md:items-center`,children:[(0,z.jsx)(`div`,{className:`w-16 h-16 bg-tertiary/10 rounded-2xl border border-tertiary/20 flex items-center justify-center text-tertiary shadow-xl group-hover:scale-110 transition-transform duration-500`,children:(0,z.jsx)(d,{size:32})}),(0,z.jsxs)(`div`,{className:`flex-1 space-y-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`text-xl font-headline font-black text-tertiary mb-2 uppercase tracking-tight`,children:`Orchestrator Intelligence Insight`}),(0,z.jsxs)(`p`,{className:`text-on-surface-variant leading-relaxed max-w-4xl font-body italic text-base`,children:[`"Scheduling patterns suggest a resource collision likely at `,(0,z.jsx)(`span`,{className:`text-tertiary font-bold`,children:`03:00 UTC`}),` between 'Daily Market Sweep' and the 'Primary Indexer'. I recommend shifting the Market Sweep forward by 15 minutes to optimize throughput by 12.4%."`]})]}),(0,z.jsxs)(`div`,{className:`flex gap-4`,children:[(0,z.jsx)(`button`,{className:`px-6 py-2.5 bg-tertiary text-on-tertiary rounded-xl font-black text-xs uppercase tracking-widest hover:opacity-90 shadow-lg shadow-tertiary/20 transition-all`,children:`Apply Optimization`}),(0,z.jsx)(`button`,{className:`px-6 py-2.5 border border-tertiary/30 text-tertiary rounded-xl font-black text-xs uppercase tracking-widest hover:bg-tertiary/5 transition-colors`,children:`Dismiss`})]})]})]}),(0,z.jsx)(`div`,{className:`absolute -right-20 -bottom-20 w-80 h-80 bg-tertiary/5 blur-[100px] rounded-full group-hover:bg-tertiary/10 transition-colors duration-1000`})]}),(0,z.jsxs)(v.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.8},className:`fixed bottom-8 right-8 w-80 bg-surface-container-highest/60 backdrop-blur-2xl p-6 rounded-2xl shadow-[0_32px_64px_rgba(0,0,0,0.5)] border border-outline-variant/20 z-10`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between mb-6`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full bg-secondary animate-pulse shadow-[0_0_8px_rgba(78,222,163,0.6)]`}),(0,z.jsx)(`span`,{className:`text-[10px] font-black font-headline uppercase tracking-[0.2em] text-secondary`,children:`Real-time Stream`})]}),(0,z.jsx)(`button`,{className:`text-on-surface-variant hover:text-white transition-colors`,children:(0,z.jsx)(w,{size:14})})]}),(0,z.jsx)(`div`,{className:`space-y-4`,children:[{time:`09:42:11`,msg:`started execution sweep`,node:`Oracle-v2`,nodeColor:`text-primary`},{time:`09:41:00`,msg:`verified task queue (12 tasks)`,node:`Cron-Engine`,nodeColor:`text-on-surface`},{time:`09:30:00`,msg:`archived 400 records`,node:`Log-Service`,nodeColor:`text-secondary`}].map((e,t)=>(0,z.jsxs)(`div`,{className:`flex gap-4 text-xs font-medium`,children:[(0,z.jsx)(`span`,{className:`text-on-surface-variant/40 font-mono tracking-tighter shrink-0`,children:e.time}),(0,z.jsxs)(`p`,{className:`text-on-surface-variant/80`,children:[(0,z.jsx)(`span`,{className:`${e.nodeColor} font-black`,children:e.node}),` `,e.msg]})]},t))}),(0,z.jsx)(`button`,{className:`w-full mt-8 py-3 bg-surface-container/40 border border-outline-variant/10 rounded-xl text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 hover:bg-surface-container-high hover:text-white transition-all`,children:`Expand Log Manifest`})]}),(0,z.jsx)(B,{isOpen:c,onClose:()=>l(!1),onSuccess:()=>{l(!1),p()},initialData:u})]})};export{V as default};
|