@usex/mikrotik-mcp 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -137,11 +137,11 @@ ${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:n
137
137
  }
138
138
  `).join(`
139
139
  `)}}):null}var m5=yJ;function h5({active:e,payload:t,className:n,indicator:r=`dot`,hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:d,labelKey:f}){let{config:p}=d5(),m=v.useMemo(()=>{if(i||!t?.length)return null;let[e]=t,n=`${f??e?.dataKey??e?.name??`value`}`,r=g5(p,e,n),a=!f&&typeof o==`string`?p[o]?.label??o:r?.label;return s?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:s(a,t)}):a?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:a}):null},[o,s,t,i,c,p,f]);if(!e||!t?.length)return null;let h=t.length===1&&r!==`dot`;return(0,K.jsxs)(`div`,{className:Y(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,n),children:[h?null:m,(0,K.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=`${d??e.name??e.dataKey??`value`}`,i=g5(p,e,n),o=u??e.payload?.fill??e.color;return(0,K.jsx)(`div`,{className:Y(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,r===`dot`&&`items-center`),children:l&&e?.value!==void 0&&e.name?l(e.value,e.name,e,t,e.payload):(0,K.jsxs)(K.Fragment,{children:[i?.icon?(0,K.jsx)(i.icon,{}):!a&&(0,K.jsx)(`div`,{className:Y(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":r===`dot`,"w-1":r===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":r===`dashed`,"my-0.5":h&&r===`dashed`}),style:{"--color-bg":o,"--color-border":o}}),(0,K.jsxs)(`div`,{className:Y(`flex flex-1 justify-between leading-none`,h?`items-end`:`items-center`),children:[(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[h?m:null,(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:i?.label??e.name})]}),e.value!=null&&(0,K.jsx)(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},t)})})]})}function g5(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var _5=e=>new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,hour12:!1}),v5={ok:{label:`ok`,color:`var(--chart-1)`},error:{label:`error`,color:`var(--destructive)`}};function y5({series:e}){return(0,K.jsx)(f5,{config:v5,className:`h-[200px] w-full`,children:(0,K.jsxs)($8,{data:e,margin:{top:8,right:8,left:-18,bottom:0},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`fillOk`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-ok)`,stopOpacity:.5}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-ok)`,stopOpacity:.04})]}),(0,K.jsxs)(`linearGradient`,{id:`fillErr`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-error)`,stopOpacity:.55}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-error)`,stopOpacity:.05})]})]}),(0,K.jsx)(s4,{vertical:!1,strokeDasharray:`3 3`}),(0,K.jsx)(E3,{dataKey:`t`,tickFormatter:_5,tick:{fontSize:10},tickLine:!1,axisLine:!1,minTickGap:48}),(0,K.jsx)(V3,{tick:{fontSize:10},tickLine:!1,axisLine:!1,width:34,allowDecimals:!1}),(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{labelFormatter:(e,t)=>{let n=t?.[0]?.payload?.t;return typeof n==`number`?_5(n):``}})}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`ok`,name:`ok`,stackId:`1`,stroke:`var(--color-ok)`,fill:`url(#fillOk)`,strokeWidth:2,isAnimationActive:!1}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`error`,name:`error`,stackId:`1`,stroke:`var(--color-error)`,fill:`url(#fillErr)`,strokeWidth:2,isAnimationActive:!1})]})})}function b5({segments:e,centerLabel:t=`calls`}){let n=e.filter(e=>e.value>0),r=e.reduce((e,t)=>e+t.value,0);return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3`,children:[(0,K.jsx)(f5,{config:Object.fromEntries(n.map(e=>[e.label,{label:e.label,color:e.color}])),className:`mx-auto aspect-square w-full max-w-[180px]`,children:(0,K.jsxs)(Z8,{children:[(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{hideLabel:!0})}),(0,K.jsx)(j$,{data:n,dataKey:`value`,nameKey:`label`,innerRadius:58,outerRadius:80,paddingAngle:2,strokeWidth:0,isAnimationActive:!1,children:n.map(e=>(0,K.jsx)(bJ,{fill:e.color},e.label))}),(0,K.jsx)(`text`,{x:`50%`,y:`47%`,textAnchor:`middle`,className:`fill-foreground`,fontSize:22,fontWeight:600,children:r.toLocaleString()}),(0,K.jsx)(`text`,{x:`50%`,y:`59%`,textAnchor:`middle`,className:`fill-muted-foreground`,fontSize:10,children:t})]})}),(0,K.jsx)(`div`,{className:`flex flex-wrap justify-center gap-x-3.5 gap-y-1.5 text-[11px] text-muted-foreground`,children:n.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`size-[9px] rounded-[3px]`,style:{background:e.color}}),e.label,` `,(0,K.jsx)(`b`,{className:`font-medium text-foreground`,children:e.value})]},e.label))})]})}function x5({values:e,color:t,unit:n,maxValue:r,id:i}){let a=e.filter(e=>e!=null);if(a.length===0)return(0,K.jsx)(`div`,{className:`px-1.5 py-3 text-center text-[11px] text-muted-foreground`,children:`no samples yet`});let o=e.map((e,t)=>({i:t,v:e})),s=a[a.length-1],c=`ma-${(i??t).replace(/[^a-z0-9]/gi,``)}`,l={v:{label:`value`,color:t}},u=Math.min(...a),d=Math.max(...a),f=Math.max(0,(n===`%`?10:0)-(d-u))/2,p=u-f,m=d+f,h=(m-p)*.15||1;return p=Math.max(0,p-h),m+=h,r!=null&&(m=Math.min(r,m)),m<=p&&(m=p+1),(0,K.jsxs)(`div`,{className:`relative w-full`,children:[(0,K.jsxs)(`span`,{className:`absolute right-0.5 top-0 z-10 text-[10px] font-semibold`,style:{color:t},children:[s.toFixed(n===`%`?0:1),n??``]}),(0,K.jsx)(f5,{config:l,className:`h-[46px] w-full`,children:(0,K.jsxs)($8,{data:o,margin:{top:4,right:2,left:2,bottom:0},children:[(0,K.jsx)(`defs`,{children:(0,K.jsxs)(`linearGradient`,{id:c,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-v)`,stopOpacity:.35}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-v)`,stopOpacity:0})]})}),(0,K.jsx)(V3,{hide:!0,domain:[p,m]}),(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{hideLabel:!0,formatter:e=>(0,K.jsxs)(`span`,{className:`font-mono tabular-nums text-foreground`,children:[typeof e==`number`?e.toLocaleString():String(e),n??``]})})}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`v`,stroke:`var(--color-v)`,fill:`url(#${c})`,strokeWidth:1.7,connectNulls:!1,isAnimationActive:!1,dot:!1})]})})]})}function S5({value:e,label:t,color:n}){let r=e!=null,i=r?Math.max(0,Math.min(100,e)):0;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,children:[(0,K.jsxs)(`div`,{className:`relative grid size-[72px] place-items-center`,children:[(0,K.jsx)(f5,{config:{value:{label:t,color:n}},className:`size-[72px]`,children:(0,K.jsxs)(s5,{data:[{name:t,value:i,fill:n}],innerRadius:`72%`,outerRadius:`100%`,startAngle:90,endAngle:-270,barSize:7,children:[(0,K.jsx)(DZ,{type:`number`,domain:[0,100],tick:!1,axisLine:!1}),(0,K.jsx)(A0,{dataKey:`value`,cornerRadius:4,background:{fill:`var(--muted)`},isAnimationActive:!1})]})}),(0,K.jsx)(`span`,{className:`pointer-events-none absolute inset-0 grid place-items-center text-[13px] font-bold`,style:{color:r?`var(--foreground)`:`var(--muted-foreground)`},children:r?`${Math.round(i)}%`:`n/a`})]}),(0,K.jsx)(`span`,{className:`text-[10px] tracking-[0.06em] text-muted-foreground`,children:t})]})}var C5=40,w5=30,T5=1e3,E5=`http://www.w3.org/2000/svg`,D5=e=>`${(e/1e6).toFixed(2)} Mbps`,O5=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:e>0?`${Math.round(e)}`:`0`;function k5({history:e}){let t=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),n=e=>8+e*504/Math.max(1,C5-1),r=e=>142-e/t*134,i=t=>e.map((e,i)=>`${n(i).toFixed(1)},${r(t(e)).toFixed(1)}`).join(` `),a=t=>{if(e.length<2)return``;let r=n(0).toFixed(1),a=n(e.length-1).toFixed(1);return`${r},${142 .toFixed(1)} ${i(t)} ${a},${142 .toFixed(1)}`};return(0,K.jsx)(`svg`,{className:`block h-[150px] w-full max-w-[520px] rounded-md border border-border bg-background`,viewBox:`0 0 520 150`,xmlns:E5,role:`img`,children:e.length>=2&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:a(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:a(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-2`,points:i(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-2`,points:i(e=>e.tx)})]})})}function A5({history:e}){let t=`block h-[18px] w-20 shrink-0 rounded-[3px] bg-muted/40`;if(e.length<2)return(0,K.jsx)(`svg`,{className:t,viewBox:`0 0 80 18`});let n=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),r=e=>1+e*78/Math.max(1,w5-1),i=e=>17-e/n*16,a=t=>e.map((e,n)=>`${r(n).toFixed(1)},${i(t(e)).toFixed(1)}`).join(` `),o=t=>{let n=r(0).toFixed(1),i=r(e.length-1).toFixed(1),o=17 .toFixed(1);return`${n},${o} ${a(t)} ${i},${o}`};return(0,K.jsxs)(`svg`,{className:t,viewBox:`0 0 80 18`,xmlns:E5,children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:o(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:o(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.tx)})]})}function j5({ip:e,deviceName:t,current:n,onSaved:r}){let[i,a]=(0,v.useState)(n.download),[o,s]=(0,v.useState)(n.upload),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null);(0,v.useEffect)(()=>{c||(a(n.download),s(n.upload))},[n.download,n.upload,c]);let m=(0,v.useCallback)(async(n,i)=>{d(!0),p(null);try{let a=await hc(`/api/clients/limits`,{ip:e,device:t,download:n,upload:i});p(a.message),a.ok&&(l(!1),r())}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1)}},[e,t,r]),h=!!(n.download||n.upload);return(0,K.jsxs)(`div`,{className:`mt-3.5 max-w-[520px] border-t border-border pt-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-[13px] font-semibold`,children:`Rate limits`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`current: ↓ `,n.download||`unlimited`,` · ↑ `,n.upload||`unlimited`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↓ Download`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`10M · blank = unlimited`,value:i,onChange:e=>{l(!0),a(e.target.value)}})]}),(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↑ Upload`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`2M · blank = unlimited`,value:o,onChange:e=>{l(!0),s(e.target.value)}})]}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:u,onClick:()=>void m(i,o),children:`Apply`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:u||!h,onClick:()=>{a(``),s(``),m(``,``)},children:`Remove`})]}),f&&(0,K.jsx)(`div`,{className:`mt-1.5 text-muted-foreground text-xs`,children:f})]})}function M5({device:e,deviceName:t,traffic:n}){let r=n!==void 0;return(0,K.jsxs)(`div`,{className:`mt-3.5 border-t border-border pt-3.5`,children:[(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-sm font-semibold`,children:e.host||e.comment||e.ip}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.ip||`no IP`,` · `,e.mac,` · `,e.iface||`?`,` · `,e.status]})]}),r?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-[18px] tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`font-semibold text-success`,children:[`↓ `,D5(n.rxRate)]}),(0,K.jsxs)(`span`,{className:`font-semibold text-warning`,children:[`↑ `,D5(n.txRate)]})]}),(0,K.jsx)(k5,{history:n.history}),(0,K.jsxs)(`div`,{className:`mt-2 text-muted-foreground text-xs tabular-nums`,children:[`total ↓ `,db(n.rxBytes),` · ↑ `,db(n.txBytes)]})]}):(0,K.jsxs)(Pb,{type:`secondary`,label:`No traffic yet`,children:[`No traffic seen for `,(0,K.jsx)(`code`,{children:e.ip}),` yet. Rates appear here as soon as the device sends or receives.`]}),e.ip&&(0,K.jsx)(j5,{ip:e.ip,deviceName:t,current:{download:n?.downloadLimit??``,upload:n?.uploadLimit??``},onSaved:()=>{}}),e.ip&&(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`Usage history · last 3 months`}),(0,K.jsx)(ix,{endpoint:`/api/usage/client?ip=${encodeURIComponent(e.ip)}${t?`&device=${encodeURIComponent(t)}`:``}&days=90`,days:90})]})]})}var N5={map:new Map,source:`accounting`};function P5(e,t){let n=new Set([...e.map.keys(),...Object.keys(t.hosts),...Object.keys(t.limits)]),r=new Map;for(let i of n){let n=t.hosts[i],a=n?.rxRate??0,o=n?.txRate??0,s=e.map.get(i),c=[...s?.history??[],{rx:a,tx:o}].slice(-30),l=t.limits[i];!l&&!c.some(e=>e.rx>0||e.tx>0)||r.set(i,{rxRate:a,txRate:o,rxBytes:n?.rxBytes??s?.rxBytes??0,txBytes:n?.txBytes??s?.txBytes??0,downloadLimit:l?.download??``,uploadLimit:l?.upload??``,history:c})}return{map:r,source:t.source,note:t.note}}function F5(e){let[t,n]=(0,v.useState)(N5);return(0,v.useEffect)(()=>{n(N5)},[e]),(0,v.useEffect)(()=>{if(!e)return;let t=!1,r=null,i=null,a=null,o=`traffic=${encodeURIComponent(e)}`,s=e=>{t||n(t=>P5(t,e))},c=()=>{if(t||a)return;let n=async()=>{try{s(await mc(`/api/clients/traffic-bulk?device=${encodeURIComponent(e)}`))}catch{}};n(),a=setInterval(()=>void n(),T5)},l=()=>{if(t)return;i=new EventSource(pc(`/api/sse?${o}`));let e=!1;i.onopen=()=>{e=!0},i.addEventListener(`traffic`,e=>{try{s(JSON.parse(e.data))}catch{}}),i.onerror=()=>{!e&&i&&(i.close(),i=null,c())}},u=()=>{if(t)return;let e=location.protocol===`https:`?`wss`:`ws`;r=new WebSocket(pc(`${e}://${location.host}/api/stream?${o}`));let n=!1;r.onopen=()=>{n=!0},r.onerror=()=>r?.close(),r.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`traffic`&&t.sample&&s(t.sample)}catch{}},r.onclose=()=>{t||(n?setTimeout(u,2e3):l())}};return u(),()=>{t=!0,r?.close(),i?.close(),a&&clearInterval(a)}},[e]),t}function I5(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),{map:g,source:_,note:y}=F5(n);(0,v.useEffect)(()=>{mc(`/api/devices`).then(e=>{t(e),r(t=>t||e.defaultDevice||e.devices[0]?.name||``)}).catch(()=>t({server:``,defaultDevice:``,devices:[]}))},[]);let b=(0,v.useCallback)(async()=>{try{let e=n?`?device=${encodeURIComponent(n)}`:``;a(await mc(`/api/clients${e}`)),d(null)}catch(e){d(e instanceof Error?e.message:String(e))}},[n]);(0,v.useEffect)(()=>{a(null),s(null),b();let e=setInterval(()=>void b(),15e3);return()=>clearInterval(e)},[b]);let x=(0,v.useCallback)(async(e,t,r)=>{l(t),d(null);try{let i=await hc(`/api/clients/${e}`,{mac:t,device:n,...r});i.view?a(i.view):await b(),i.ok||d(i.message)}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(null)}},[n,b]),S=(0,v.useCallback)((e,t)=>{s(e.mac),h({mac:e.mac,field:t,value:t===`ip`?e.ip:e.comment||e.host})},[]),C=(0,v.useCallback)(async()=>{if(!m)return;let e=m.value.trim();m.field===`ip`?e&&await x(`set-ip`,m.mac,{ip:e}):await x(`label`,m.mac,{label:e}),h(null)},[m,x]),w=(0,v.useMemo)(()=>{let e=i?.devices??[],t=f.trim().toLowerCase();return t?e.filter(e=>e.ip.toLowerCase().includes(t)||e.mac.toLowerCase().includes(t)||e.host.toLowerCase().includes(t)||e.comment.toLowerCase().includes(t)):e},[i,f]),T=(0,v.useMemo)(()=>i?.devices.find(e=>e.mac===o)??null,[i,o]),E=e?.devices??[],D=i?.counts;return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Connected clients`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[E.length>1&&(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Router`,options:E.map(e=>({value:e.name,label:`${e.name}${e.isDefault?` (default)`:``}`}))}),(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter IP / MAC / name…`,value:f,onChange:e=>p(e.target.value)}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void b(),children:`Refresh`})]}),children:[D&&(0,K.jsxs)(`div`,{className:`mb-2.5 text-muted-foreground text-xs`,children:[D.total,` total · `,D.static,` static · `,D.blocked,` blocked`]}),u&&(0,K.jsx)(Pb,{type:`error`,className:`mb-2.5`,children:u}),_===`none`&&y&&(0,K.jsxs)(Pb,{type:`warning`,label:`Traffic unavailable`,className:`mb-2.5`,children:[y,` The Traffic column needs per-host counters — `,(0,K.jsx)(`code`,{children:`/ip accounting`}),` `,`on RouterOS v6, or Kid Control on v7.`]}),i?w.length===0?(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(sl,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`No connected devices`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Nothing in this router's DHCP-lease or ARP table`,f?` matches the filter`:``,`.`]})]}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`IP`}),(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`MAC`}),(0,K.jsx)(Wy,{children:`Iface`}),(0,K.jsx)(Wy,{children:`Status`}),(0,K.jsx)(Wy,{children:`Traffic`}),(0,K.jsx)(Wy,{className:`text-right`,children:`Actions`})]})}),(0,K.jsx)(Hy,{children:w.map(e=>{let t=e.mac===o,n=c===e.mac,r=e.ip?g.get(e.ip):void 0,i=e.blocked&&`text-muted-foreground line-through`;return(0,K.jsxs)(Uy,{"data-state":t?`selected`:void 0,className:`cursor-pointer`,onClick:()=>s(t?null:e.mac),children:[(0,K.jsx)(Gy,{className:Y(`max-w-[120px] truncate`,i),children:e.ip||`—`}),(0,K.jsx)(Gy,{className:Y(`max-w-[200px] truncate`,i),children:e.host||e.comment||`(unknown)`}),(0,K.jsx)(Gy,{className:`font-mono text-[11.5px] text-muted-foreground`,children:e.mac}),(0,K.jsx)(Gy,{className:`text-muted-foreground text-[11px]`,children:e.iface||``}),(0,K.jsx)(Gy,{children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.static&&(0,K.jsx)(Lb,{type:`secondary`,children:`static`}),e.blocked?(0,K.jsx)(Lb,{type:`error`,children:`blocked`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.status})]})}),(0,K.jsx)(Gy,{children:r?(0,K.jsxs)(`span`,{className:`flex items-center gap-1 overflow-hidden tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-[48px] flex-col whitespace-nowrap leading-tight`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`↓`,O5(r.rxRate)]}),(0,K.jsxs)(`span`,{className:`text-warning`,children:[`↑`,O5(r.txRate)]})]}),(0,K.jsx)(A5,{history:r.history})]}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.ip?`—`:``})}),(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsxs)(`span`,{className:`flex justify-end gap-1.5`,children:[e.blocked?(0,K.jsx)(X,{size:`sm`,type:`success`,ghost:!0,loading:n,onClick:()=>void x(`allow`,e.mac),children:`Allow`}):(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,loading:n,onClick:()=>void x(`block`,e.mac),children:`Block`}),!e.static&&(0,K.jsx)(X,{size:`sm`,ghost:!0,loading:n,onClick:()=>void x(`pin`,e.mac),children:`Pin IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`ip`),children:`Set IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`label`),children:`Label`})]})})]},e.mac)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading connected devices…`}),m&&T?.mac===m.mac&&(0,K.jsxs)(`div`,{className:`mt-3.5 flex flex-wrap items-center gap-2 rounded-md border border-border bg-card px-3 py-2.5`,children:[(0,K.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[m.field===`ip`?`Reserve IP for`:`Label for`,` `,(0,K.jsx)(`b`,{children:T.host||T.mac}),`:`]}),(0,K.jsx)(Vb,{className:`w-[220px]`,autoFocus:!0,value:m.value,placeholder:m.field===`ip`?`e.g. 192.168.88.50`:`e.g. Ali phone`,onChange:e=>h({...m,value:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&C(),e.key===`Escape`&&h(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:c===m.mac,onClick:()=>void C(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>h(null),children:`Cancel`})]}),T&&(0,K.jsx)(M5,{device:T,deviceName:n,traffic:T.ip?g.get(T.ip):void 0})]})})}var L5=/("(?:\\.|[^"\\])*"(?:\s*:)?)|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g;function R5(e){let t=[],n=0,r=0;for(let i of e.matchAll(L5)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s;s=i[1]===void 0?i[2]===void 0?`text-chart-1`:`text-warning`:/:\s*$/.test(o)?`text-foreground`:`text-success`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var z5=new RegExp([/(;;;[^\n]*)/,/("(?:\\.|[^"\\])*")/,/([0-9A-Fa-f]{2}(?::[0-9A-Fa-f]{2}){5})/,/(\d{1,3}(?:\.\d{1,3}){3}(?:\/\d{1,2})?)/,/([A-Za-z.][\w.-]*)(?==)/,/\b(running|enabled|active|connected|established|reachable|bound|authorized|ok|up)\b/,/\b(disabled|invalid|inactive|stopped|unreachable|timeout|failure|failed|error|rejected|expired|down)\b/,/\b(yes|no|true|false)\b/,/\b(dynamic|slave|builtin|default|passthrough|complete)\b/,/(-?\d+(?:\.\d+)?)/].map(e=>e.source).join(`|`),`gi`);function B5(e){let t=[],n=0,r=0;for(let i of e.matchAll(z5)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s=`text-chart-1`;i[1]===void 0?i[2]===void 0?i[3]===void 0?i[4]===void 0?i[5]===void 0?i[6]===void 0?i[7]===void 0?i[8]===void 0?i[9]!==void 0&&(s=`text-muted-foreground`):s=`text-warning`:s=`text-destructive font-medium`:s=`text-success font-medium`:s=`text-foreground`:s=`text-chart-2`:s=`text-chart-5`:s=`text-success`:s=`text-muted-foreground italic`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var V5=`mt-pretty-input`;function H5(){try{return localStorage.getItem(V5)!==`0`}catch{return!0}}function U5(e){try{localStorage.setItem(V5,e?`1`:`0`)}catch{}}function W5(e,t){if(!t)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function G5({value:e,maxHeight:t}){let n=typeof e==`string`?e:JSON.stringify(e,null,2);return(0,K.jsx)(`pre`,{className:`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap text-muted-foreground`,style:t?{maxHeight:t}:void 0,children:R5(n)})}function K5(e){return e.startsWith(`+++`)||e.startsWith(`---`)?`file`:e.startsWith(`@@`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}var q5={add:`bg-success/10`,del:`bg-destructive/10`,hunk:`bg-muted/50`,file:``,ctx:``},J5={add:`text-success`,del:`text-destructive`,hunk:`text-brand`,file:`text-muted-foreground`,ctx:`text-muted-foreground/50`},Y5={add:`+`,del:`−`,ctx:``,hunk:``,file:``};function X5({unified:e,maxHeight:t}){let n=e.replace(/\n+$/,``).split(`
140
- `);return(0,K.jsx)(`pre`,{className:`text-muted-foreground m-0 overflow-auto rounded border border-border bg-background py-2 font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap`,style:t?{maxHeight:t}:void 0,children:n.map((e,t)=>{let n=K5(e),r=n===`hunk`||n===`file`,i=n===`add`||n===`del`||n===`ctx`?e.slice(1):e;return(0,K.jsxs)(`div`,{className:Y(`flex px-2`,q5[n]),children:[(0,K.jsx)(`span`,{className:Y(`w-3 shrink-0 select-none text-center`,J5[n]),children:Y5[n]}),(0,K.jsx)(`span`,{className:Y(`min-w-0 flex-1 break-words whitespace-pre-wrap`,r&&`text-muted-foreground/80`),children:r?e:R5(i)})]},t)})})}function Z5(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Q5(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function $5({onRestored:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(()=>{mc(`/api/config/history`).then(n).catch(()=>n({versions:[],bytes:0,retention:50}))},[]);(0,v.useEffect)(()=>h(),[h]);let g=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),_=async()=>{let e=(p??``).trim();m(null);let t=await g(`/api/config/history/checkpoint`,{label:e||void 0});i(t.ok?`Checkpoint saved${e?` · “${e}”`:``}`:`Failed: ${t.error}`),t.ok&&h()},y=async e=>{if(s===e){c(null),u(null);return}c(e),u(null);let t=await mc(`/api/config/history/diff?id=${encodeURIComponent(e)}`).catch(()=>null);u(t)},b=async t=>{f(null),o(!0);let n=await g(`/api/config/history/restore`,{id:t});o(!1),i(n.ok?`Restored ${t}${n.persisted===!1?` (applied live, not persisted)`:``}`:`Restore failed: ${n.error}`),n.ok&&(h(),e())},x=async e=>{let t=await g(`/api/config/history/delete`,{id:e});i(t.ok?`Version deleted`:`Failed: ${t.error}`),t.ok&&h()};return t?(0,K.jsxs)(K.Fragment,{children:[r&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:14},children:[p===null?(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(nl,{className:`size-4`}),onClick:()=>m(``),children:`Save checkpoint`}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)]`,autoFocus:!0,placeholder:`checkpoint name (e.g. pre-upgrade)`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_(),e.key===`Escape`&&m(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void _(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>m(null),children:`Cancel`})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[t.versions.length,` versions · `,Z5(t.bytes),` · auto-keep `,t.retention]})]}),t.versions.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`No versions yet — they appear here after each config change.`}):(0,K.jsx)(`ol`,{className:`m-0 grid list-none p-0 pl-1.5`,children:t.versions.map((e,t)=>{let n=e.drift.added+e.drift.removed;return(0,K.jsxs)(`li`,{className:`hover:bg-foreground/5 relative grid grid-cols-[24px_minmax(0,1fr)_auto] items-start gap-3 rounded-md px-2.5 py-3.5 transition-colors before:absolute before:top-[25px] before:bottom-0 before:left-[22px] before:w-px before:bg-border last:before:hidden`,children:[(0,K.jsx)(`span`,{className:Y(`relative z-[1] mt-1 justify-self-center rounded-full border-[2.5px]`,t===0?`border-brand bg-brand ring-brand/25 size-[14px] ring-4`:`border-border bg-card size-[13px]`),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-[9px] text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-[0.05em] uppercase`,e.kind===`checkpoint`?`border-warning/45 bg-warning/10 text-warning`:`border-border text-muted-foreground`),children:e.kind===`checkpoint`?`★ checkpoint`:`auto`}),e.label&&(0,K.jsx)(`span`,{className:`text-foreground font-semibold`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[11.5px]`,children:Q5(e.ts)}),t===0?(0,K.jsx)(`span`,{className:`text-brand font-mono text-[10px] font-semibold tracking-[0.05em] uppercase`,children:`latest`}):n===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11.5px]`,children:`identical to current`}):(0,K.jsxs)(`span`,{className:`inline-flex items-baseline gap-[7px] font-mono text-[11.5px]`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`+`,e.drift.added]}),(0,K.jsxs)(`span`,{className:`text-destructive`,children:[`−`,e.drift.removed]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:` vs current`})]})]}),s===e.id&&(0,K.jsx)(`div`,{className:`mt-2`,children:l?l.unified.trim()?(0,K.jsx)(X5,{unified:l.unified,maxHeight:280}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences from the current config.`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`computing diff…`})})]}),(0,K.jsxs)(`div`,{className:`mt-px inline-flex flex-none items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void y(e.id),children:s===e.id?`Hide`:`Diff`}),d===e.id?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,disabled:a,onClick:()=>void b(e.id),children:`Confirm restore`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>f(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,disabled:t===0,title:t===0?`This is the current config`:`Restore this version`,onClick:()=>f(e.id),children:`Restore`}),e.kind===`checkpoint`&&(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,icon:(0,K.jsx)(cl,{className:`size-4`}),title:`Delete`,onClick:()=>void x(e.id)})]})]},e.id)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading history…`})}function e7(e){if(!e)return[];let t=[],n=e=>e?Array.isArray(e.enum)?`enum`:e.type===`array`?`array<${n(e.items)}>`:Array.isArray(e.type)?e.type.join(` | `):e.type??(e.properties?`object`:`any`):`any`,r=(e,i,a,o)=>{let s=e.properties??{};for(let[e,c]of Object.entries(s)){let s=i?`${i}.${e}`:e,l=a||e;t.push({path:s,section:l,type:n(c),def:c.default===void 0?void 0:JSON.stringify(c.default),desc:c.description,enumv:Array.isArray(c.enum)?c.enum:void 0,required:o.has(e)}),c.properties&&r(c,s,l,new Set(c.required??[]));let u=c.additionalProperties;u?.properties&&r(u,`${s}.<name>`,l,new Set(u.required??[]));let d=c.items;d?.properties&&r(d,`${s}[]`,l,new Set(d.required??[]))}};return r(e,``,``,new Set(e.required??[])),t}function t7(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(t).catch(()=>{})},[]);let i=(0,v.useMemo)(()=>e7(e),[e]),a=n.trim().toLowerCase(),o=a?i.filter(e=>e.path.toLowerCase().includes(a)||(e.desc??``).toLowerCase().includes(a)):i,s=(0,v.useMemo)(()=>{let e=new Map;for(let t of o){let n=e.get(t.section)??[];n.push(t),e.set(t.section,n)}return[...e.entries()]},[o]);return e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:12},children:[(0,K.jsx)(Vb,{className:`w-[min(360px,60vw)]`,placeholder:`Search fields & descriptions…`,value:n,onChange:e=>r(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[o.length,` options`]})]}),s.length===0?(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[`No fields match “`,n,`”.`]}):(0,K.jsx)(`div`,{className:`grid gap-[18px]`,children:s.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`text-brand m-0 mb-2 font-mono text-[11px] tracking-[0.09em] uppercase`,children:e}),(0,K.jsx)(`div`,{className:`grid gap-2`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`border-border bg-muted/45 hover:border-brand/40 rounded-md border px-[13px] py-[11px] transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2.5`,children:[(0,K.jsx)(`code`,{className:`text-foreground font-mono text-[12.5px] font-medium`,children:e.path}),(0,K.jsx)(`span`,{className:`text-brand bg-brand/[0.13] rounded-full px-[7px] py-px font-mono text-[10.5px]`,children:e.type}),e.required&&(0,K.jsx)(`span`,{className:`text-destructive font-mono text-[10px] tracking-[0.05em] uppercase`,children:`required`}),e.def!==void 0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`default `,(0,K.jsx)(`code`,{className:`text-muted-foreground`,children:e.def})]})]}),e.desc&&(0,K.jsx)(`p`,{className:`text-muted-foreground mt-1.5 mb-0 text-[12.5px] leading-[1.5]`,children:e.desc}),e.enumv&&(0,K.jsx)(`div`,{className:`mt-[7px] flex flex-wrap gap-1.5`,children:e.enumv.map(e=>(0,K.jsx)(`code`,{className:`border-border text-muted-foreground rounded-md border px-[7px] py-px font-mono text-[11px]`,children:e},e))})]},e.path))})]},e))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading schema…`})}function n7({...e}){return(0,K.jsx)(cf,{"data-slot":`sheet`,...e})}function r7({...e}){return(0,K.jsx)(mf,{"data-slot":`sheet-portal`,...e})}function i7({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`sheet-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function a7({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,K.jsxs)(r7,{children:[(0,K.jsx)(i7,{}),(0,K.jsxs)(bf,{"data-slot":`sheet-content`,className:Y(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,K.jsxs)(kf,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,K.jsx)(cl,{className:`size-4`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function o7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-header`,className:Y(`flex flex-col gap-1.5 p-4`,e),...t})}function s7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-footer`,className:Y(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function c7({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`sheet-title`,className:Y(`font-semibold text-foreground`,e),...t})}function l7({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`sheet-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var u7=500;function d7({title:e,subtitle:t,onClose:n,footer:r,children:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=(0,v.useRef)(n);return c.current=n,(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>o(!0));return()=>{cancelAnimationFrame(e),s.current&&clearTimeout(s.current)}},[]),(0,K.jsx)(n7,{open:a,onOpenChange:(0,v.useCallback)(e=>{e||s.current||(o(!1),s.current=setTimeout(()=>c.current(),u7))},[]),children:(0,K.jsxs)(a7,{side:`right`,className:`w-full gap-0 sm:max-w-2xl`,children:[(0,K.jsxs)(o7,{className:`border-b`,children:[(0,K.jsx)(c7,{children:e}),t!=null&&(0,K.jsx)(l7,{children:t})]}),(0,K.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:i}),r!=null&&(0,K.jsx)(s7,{className:`border-t`,children:r})]})})}var f7=[{key:`host`,label:`Host / IP`,type:`text`,placeholder:`192.168.88.1`,help:`SSH host. Ignored when a MAC address is set (MAC-Telnet).`},{key:`port`,label:`SSH port`,type:`number`,placeholder:`22`},{key:`username`,label:`Username`,type:`text`,placeholder:`admin`},{key:`password`,label:`Password`,type:`password`,secret:!0},{key:`timeoutMs`,label:`Timeout (ms)`,type:`number`,placeholder:`10000`},{key:`description`,label:`Description`,type:`text`,placeholder:`Core router`,help:`Free-text label.`},{key:`keyFilename`,label:`SSH key file`,type:`text`,advanced:!0,help:`Path to a private-key file.`},{key:`privateKey`,label:`Private key (PEM)`,type:`password`,secret:!0,advanced:!0},{key:`keyPassphrase`,label:`Key passphrase`,type:`password`,secret:!0,advanced:!0},{key:`jumpVia`,label:`Jump via device`,type:`text`,advanced:!0,help:`Name of another device to use as an SSH bastion.`},{key:`mac`,label:`MAC address`,type:`text`,advanced:!0,help:`Set to reach the device over Layer-2 MAC-Telnet (no IP).`},{key:`sourceMac`,label:`Source MAC`,type:`text`,advanced:!0},{key:`macHost`,label:`MAC-Telnet host iface`,type:`text`,advanced:!0},{key:`macPort`,label:`MAC-Telnet port`,type:`number`,advanced:!0,placeholder:`20561`}],p7=[{id:`devices`,title:`Devices`,icon:`🖧`,kind:`deviceMap`,blurb:`MikroTik routers this server manages. Toggle a device off to hide it from the tools.`,fields:f7},{id:`mcp`,title:`MCP Server`,icon:`⚙️`,kind:`object`,path:`mcp`,blurb:`How the MCP server is exposed to the AI client.`,fields:[{key:`transport`,label:`Transport`,type:`select`,options:[`stdio`,`sse`,`streamable-http`]},{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`8000`},{key:`appViews`,label:`MCP App Views`,type:`bool`,help:`Expose rich App-view metadata to compatible clients.`},{key:`toolPageSize`,label:`Tool page size`,type:`number`,advanced:!0,help:`0 = no paging.`},{key:`allowedHosts`,label:`Allowed hosts`,type:`text`,advanced:!0,help:`Comma-separated.`},{key:`allowedOrigins`,label:`Allowed origins`,type:`text`,advanced:!0},{key:`corsOrigins`,label:`CORS origins`,type:`text`,advanced:!0}]},{id:`dashboard`,title:`Observability Dashboard`,icon:`📊`,kind:`object`,path:`dashboard`,enable:{key:`enabled`,label:`Dashboard`},blurb:`This web dashboard — records every tool call and serves the live UI.`,fields:[{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`9090`},{key:`token`,label:`Access token`,type:`password`,secret:!0,help:`Require this bearer token to view the dashboard.`},{key:`captureBody`,label:`Capture tool input/output`,type:`bool`},{key:`redactInput`,label:`Redact input bodies`,type:`bool`},{key:`dbPath`,label:`Database path`,type:`text`,advanced:!0},{key:`maxEvents`,label:`Max events kept`,type:`number`,advanced:!0},{key:`maxBodyBytes`,label:`Max body bytes`,type:`number`,advanced:!0}]},{id:`ssh`,title:`SSH Connection Pool`,icon:`🔌`,kind:`object`,path:`ssh`,enable:{key:`keepAlive`,label:`Keep-alive pooling`},blurb:`Reuse SSH connections across tool calls for lower latency.`,fields:[{key:`keepAliveInterval`,label:`Keep-alive interval (ms)`,type:`number`,placeholder:`10000`},{key:`idleTimeout`,label:`Idle timeout (ms)`,type:`number`,placeholder:`30000`}]},{id:`s3`,title:`S3 Backups`,icon:`☁️`,kind:`object`,path:`s3`,enable:{presence:!0,label:`S3 backups`},blurb:`Ship config backups to an S3-compatible bucket.`,fields:[{key:`bucket`,label:`Bucket`,type:`text`},{key:`region`,label:`Region`,type:`text`},{key:`endpoint`,label:`Endpoint`,type:`text`,placeholder:`https://s3.example.com`},{key:`accessKeyId`,label:`Access key ID`,type:`password`,secret:!0},{key:`secretAccessKey`,label:`Secret access key`,type:`password`,secret:!0},{key:`prefix`,label:`Key prefix`,type:`text`},{key:`sessionToken`,label:`Session token`,type:`password`,secret:!0,advanced:!0},{key:`presignExpiresIn`,label:`Presign expiry (s)`,type:`number`,advanced:!0,placeholder:`3600`}]},{id:`memory`,title:`Knowledge Memory`,icon:`🧠`,kind:`object`,path:`memory`,enable:{key:`enabled`,label:`Memory`},blurb:`Persistent knowledge graph the AI can read and write.`,fields:[{key:`dbPath`,label:`Database path`,type:`text`}]},{id:`modules`,title:`Tool Modules`,icon:`🧩`,kind:`modules`,blurb:`Curate which tool modules are exposed to the AI client.`,fields:[]},{id:`general`,title:`General`,icon:`🎛️`,kind:`object`,blurb:`Server-wide options.`,fields:[{key:`readOnly`,label:`Read-only mode`,type:`bool`,help:`Block all write/destructive tools.`},{key:`disableUpdateCheck`,label:`Disable update check`,type:`bool`},{key:`backupDir`,label:`Backup directory`,type:`text`,advanced:!0}]}];function m7({className:e,size:t=`default`,...n}){return(0,K.jsx)(z_,{"data-slot":`switch`,"data-size":t,className:Y(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,K.jsx)(V_,{"data-slot":`switch-thumb`,className:Y(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}var h7=`«redacted»`,g7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},_7=e=>Array.isArray(e)?e:[],v7=e=>[...new Set(e)],y7=e=>e==null?``:typeof e==`object`?JSON.stringify(e):String(e);function b7(e,t){return t.path?g7(e[t.path]):e}function x7(e,t,n,r){if(t.path){let i={...g7(e[t.path])};return r===void 0||r===``?delete i[n]:i[n]=r,{...e,[t.path]:i}}let i={...e};return r===void 0||r===``?delete i[n]:i[n]=r,i}function S7(e,t){return t.enable?t.enable.presence?e[t.path??``]!==void 0:b7(e,t)[t.enable.key??`enabled`]!==!1:!0}function C7({field:e,value:t,onChange:n}){let r=`f_${e.key}`,i=e.type===`bool`,a;return a=e.type===`bool`?(0,K.jsx)(m7,{checked:t===!0,onCheckedChange:n}):e.type===`select`?(0,K.jsx)(Gb,{value:y7(t??e.options?.[0]??``),onValueChange:n,options:(e.options??[]).map(e=>({value:e,label:e}))}):e.type===`number`?(0,K.jsx)(Vb,{id:r,type:`number`,placeholder:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value===``?void 0:Number(e.target.value))}):(0,K.jsx)(Vb,{id:r,type:e.type===`password`?`password`:`text`,placeholder:e.secret&&t===h7?`•••• unchanged`:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value)}),(0,K.jsxs)(`div`,{className:Y(`flex min-w-0`,i?`flex-row items-center justify-between gap-2.5`:`flex-col gap-1.5`),children:[(0,K.jsxs)(zy,{htmlFor:r,className:`text-muted-foreground text-xs font-semibold`,children:[e.label,e.secret&&(0,K.jsx)(`span`,{className:`text-warning text-[10px] font-semibold tracking-[0.04em] uppercase`,children:`secret`})]}),a,e.help&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.4]`,children:e.help})]})}function w7({fields:e,value:t,onField:n}){let[r,i]=(0,v.useState)(!1),a=e.filter(e=>!e.advanced),o=e.filter(e=>e.advanced);return(0,K.jsxs)(`div`,{className:`mt-1 grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-4 gap-y-3`,children:[a.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key)),o.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground col-span-full flex cursor-pointer items-center gap-1 border-0 bg-transparent py-1 text-left text-xs font-semibold`,onClick:()=>i(e=>!e),children:[r?(0,K.jsx)(Ac,{className:`size-3`}):(0,K.jsx)(jc,{className:`size-3`}),` `,`Advanced (`,o.length,`)`]}),r&&o.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key))]})]})}var T7={prefix:``,presignExpiresIn:3600};function E7(e,t){let n=b7(e,t),r=e=>n[e]!=null&&n[e]!==``?y7(n[e]):``,i=r(`host`)?`${r(`host`)}:${r(`port`)}`:``;return t.id===`mcp`?[r(`transport`),i].filter(Boolean).join(` · `):t.id===`dashboard`?[i,n.token?`token set`:`open`].filter(Boolean).join(` · `):t.id===`ssh`?`interval ${r(`keepAliveInterval`)||`?`}ms · idle ${r(`idleTimeout`)||`?`}ms`:t.id===`s3`?S7(e,t)?[r(`bucket`),r(`region`),r(`endpoint`)].filter(Boolean).join(` · `)||`not configured`:``:t.id===`memory`?r(`dbPath`):t.id===`general`?`${e.readOnly?`read-only`:`read-write`}${e.disableUpdateCheck?` · no update check`:``}`:``}function D7({cfg:e,onChange:t,section:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=S7(e,n),s=r=>{if(n.enable?.presence){if(r)t({...e,[n.path]:a.current??(n.id===`s3`?T7:{})});else{a.current=g7(e[n.path]);let r={...e};delete r[n.path],t(r),i(!1)}return}t(x7(e,n,n.enable.key??`enabled`,r))},c=E7(e,n);return(0,K.jsxs)(Kb,{className:Y(`px-4 py-3.5 transition-opacity`,!o&&`opacity-50`),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:n.icon}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:[n.title,n.enable&&(0,K.jsx)(Lb,{type:o?`success`:`secondary`,children:o?`active`:`off`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:c||n.blurb})]}),(0,K.jsx)(`span`,{className:`flex-1`}),n.enable&&(0,K.jsx)(m7,{checked:o,onCheckedChange:s,title:`${o?`Deactivate`:`Activate`} ${n.enable.label??n.title}`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>i(!0),disabled:n.enable?.presence&&!o,children:`Edit`})]}),r&&(0,K.jsxs)(d7,{title:`${n.icon} ${n.title}`,subtitle:n.blurb,onClose:()=>i(!1),children:[n.enable&&(0,K.jsxs)(`label`,{className:`border-border bg-muted text-foreground flex items-center gap-2.5 rounded-md border px-3 py-2.5 text-[13px] font-semibold`,children:[(0,K.jsx)(m7,{checked:o,onCheckedChange:s}),o?`Active`:`Inactive — enable ${n.enable.label??n.title}`]}),o?(0,K.jsx)(w7,{fields:n.fields,value:b7(e,n),onField:(r,i)=>t(x7(e,n,r,i))}):(0,K.jsx)(Pb,{type:`secondary`,label:!1,children:`This section is turned off. Toggle it on to edit its settings.`})]})]})}function O7({cfg:e,onChange:t,name:n,isNew:r,onClose:i}){let[a,o]=(0,v.useState)(n),s=g7(e.devices),c=g7(s[n]);return(0,K.jsxs)(d7,{title:r?`Add device`:`Device · ${n}`,subtitle:r?`New MikroTik router`:void 0,onClose:i,footer:(0,K.jsx)(X,{type:`success`,size:`sm`,onClick:i,children:`Done`}),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,K.jsx)(zy,{htmlFor:`dev_name`,className:`text-muted-foreground text-xs font-semibold`,children:`Name`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{id:`dev_name`,value:a,onChange:e=>o(e.target.value),placeholder:`core-router`}),!r&&a.trim()!==n&&(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>{let r=a.trim();if(!r||r===n||s[r])return;let o={...s,[r]:c};delete o[n],t({...e,devices:o}),i()},children:`Rename`})]})]}),(0,K.jsx)(w7,{fields:f7,value:c,onField:(r,i)=>{let a={...c};i===void 0||i===``?delete a[r]:a[r]=i,t({...e,devices:{...s,[n]:a}})}})]})}function k7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=g7(e.devices),s=Object.keys(o),c=y7(e.defaultDevice),l=()=>{let n=`device`,i=1,a=n;for(;o[a];)a=`${n}-${++i}`;t({...e,devices:{...o,[a]:{host:`192.168.88.1`,port:22,username:`admin`,password:``,timeoutMs:1e4}}}),r({name:a,isNew:!0})},u=(n,r)=>{t({...e,devices:{...o,[n]:{...g7(o[n]),disabled:r}}})},d=n=>{let r={...o};delete r[n];let i={...e,devices:r};c===n&&(i.defaultDevice=Object.keys(r)[0]??``),t(i),a(null)};return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🖧`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Devices`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[s.length,` device`,s.length===1?``:`s`,` · default: `,c||`—`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`Default`}),(0,K.jsx)(Gb,{value:c,onValueChange:n=>t({...e,defaultDevice:n}),options:s.map(e=>({value:e,label:e}))})]}),(0,K.jsx)(X,{size:`sm`,onClick:l,icon:(0,K.jsx)(Jc,{className:`size-4`}),children:`Add device`})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:[s.map(e=>{let t=g7(o[e]),n=t.disabled===!0,s=t.mac?y7(t.mac):`${y7(t.host)||`?`}:${y7(t.port)||`22`}`;return(0,K.jsxs)(`div`,{className:Y(`border-border bg-card hover:border-brand/40 flex flex-col gap-1.5 rounded-lg border px-[15px] py-3.5 transition-colors`,n&&`opacity-50 grayscale-[0.4]`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,n?`bg-muted-foreground/60`:`bg-success`)}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e}),c===e&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(m7,{checked:!n,onCheckedChange:t=>u(e,!t),title:n?`Enable device`:`Disable device`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:s}),t.description?(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:y7(t.description)}):null,(0,K.jsxs)(`div`,{className:`mt-auto flex gap-1.5 pt-1`,children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r({name:e,isNew:!1}),children:`Edit`}),i===e?(0,K.jsx)(X,{size:`sm`,type:`error`,onClick:()=>d(e),children:`Confirm?`}):(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,onClick:()=>a(e),children:`Remove`})]})]},e)}),s.length===0&&(0,K.jsxs)(Pb,{type:`secondary`,label:!1,children:[`No devices yet. Click `,(0,K.jsx)(`b`,{children:`Add device`}),` to configure your first router.`]})]}),n&&(0,K.jsx)(O7,{cfg:e,onChange:t,name:n.name,isNew:n.isNew,onClose:()=>r(null)})]})}function A7(e,t){let n=_7(e.disabledModules),r=_7(e.disabledGroups),i=_7(e.enabledModules),a=_7(e.enabledGroups);return n.includes(t.slug)||r.includes(t.group)?!1:i.length===0&&a.length===0?!0:i.includes(t.slug)||a.includes(t.group)}function j7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/modules`).then(e=>r(e.modules)).catch(()=>r([]))},[]);let o=g7(e.tools),s=(n,r)=>{let i=new Set(_7(o.enabledModules)),a=new Set(_7(o.disabledModules));r?(a.delete(n.slug),(_7(o.enabledModules).length>0||_7(o.enabledGroups).length>0)&&i.add(n.slug)):(i.delete(n.slug),a.add(n.slug)),t({...e,tools:{...o,enabledModules:v7([...i]),disabledModules:v7([...a])}})},c=(n??[]).filter(e=>{if(!i)return!0;let t=i.toLowerCase();return e.label.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)}),l=new Map;for(let e of c)l.set(e.group,[...l.get(e.group)??[],e]);let u=(n??[]).filter(e=>A7(o,e)).length;return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🧩`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Tool Modules`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[n?`${u}/${n.length} modules enabled`:`loading…`,` · applied on Save`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Vb,{placeholder:`Filter modules…`,value:i,onChange:e=>a(e.target.value),className:`max-w-[190px]`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(m7,{checked:g7(e.mcp).appViews===!0,onCheckedChange:n=>t({...e,mcp:{...g7(e.mcp),appViews:n}}),title:`MCP App Views`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`App Views`})]})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid max-h-[440px] gap-[18px] overflow-auto`,children:[[...l.entries()].map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground mt-2 mb-0.5 font-bold text-[11px] tracking-[0.05em] uppercase`,children:e}),t.map(e=>{let t=A7(o,e);return(0,K.jsxs)(`label`,{className:Y(`bg-muted hover:border-brand/40 flex cursor-pointer items-start gap-2.5 rounded-md border px-[11px] py-[9px] transition-colors select-none`,t?`border-brand/50 bg-brand/10`:`border-border`),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>s(e,!t),className:`accent-brand mt-0.5 cursor-pointer`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`text-foreground flex flex-wrap items-center gap-[7px] text-xs font-semibold`,children:[e.label,(0,K.jsx)(`code`,{className:`text-muted-foreground bg-background border-border rounded border px-1.5 py-px font-mono text-[10px]`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.35]`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground pt-px font-mono text-[10px] whitespace-nowrap`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]},e.slug)})]},e)),n&&c.length===0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`No modules match “`,i,`”.`]})]})]})}function M7({cfg:e,onChange:t}){return(0,K.jsx)(`div`,{className:`mt-1 grid gap-3.5`,children:p7.map(n=>n.kind===`deviceMap`?(0,K.jsx)(k7,{cfg:e,onChange:t},n.id):n.kind===`modules`?(0,K.jsx)(j7,{cfg:e,onChange:t},n.id):(0,K.jsx)(D7,{cfg:e,onChange:t,section:n},n.id))})}function N7(e){let t=new Set,n=new Set,r=e=>{if(!e||typeof e!=`object`)return;let i=e;if(i.properties&&typeof i.properties==`object`)for(let e of Object.keys(i.properties))t.add(e),r(i.properties[e]);if(Array.isArray(i.enum))for(let e of i.enum)typeof e==`string`&&n.add(e);for(let e of[`items`,`additionalProperties`,`anyOf`,`oneOf`,`allOf`]){let t=i[e];Array.isArray(t)?t.forEach(r):t&&typeof t==`object`&&r(t)}for(let e of[`$defs`,`definitions`,`patternProperties`]){let t=i[e];if(t&&typeof t==`object`)for(let e of Object.values(t))r(e)}};return r(e),{keys:[...t].sort(),enums:[...n.add(`true`).add(`false`)].sort()}}function P7(e,t){let n=t;for(;n>0&&/[A-Za-z0-9_.-]/.test(e[n-1]);)n--;let r=e.slice(n,t),i=n-1;for(;i>=0&&/\s/.test(e[i]);)i--;return{word:r,start:n,isValue:e[i]===`:`}}var F7=[[`revert in 30s`,3e4],[`revert in 60s`,6e4],[`revert in 2m`,12e4],[`no auto-revert`,0]];function I7({value:e,onChange:t,onJsonError:n}){let[r,i]=(0,v.useState)(()=>JSON.stringify(e,null,2)),[a,o]=(0,v.useState)({keys:[],enums:[]}),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(e=>o(N7(e))).catch(()=>{})},[]),(0,v.useEffect)(()=>{u.current!=null&&l.current&&(l.current.selectionStart=l.current.selectionEnd=u.current,u.current=null)});let p=(0,v.useRef)(t),m=(0,v.useRef)(n);p.current=t,m.current=n,(0,v.useEffect)(()=>{let e=setTimeout(()=>{try{let e=JSON.parse(r);m.current?.(null),p.current(e)}catch(e){m.current?.(e instanceof Error?e.message:String(e))}},300);return()=>clearTimeout(e)},[r]);let h=e=>{let{word:t,start:n,isValue:r}=P7(e.value,e.selectionStart);if(t.length<1){c(null);return}let i=(r?a.enums:a.keys).filter(e=>e.startsWith(t)&&e!==t).slice(0,8);if(!i.length){c(null);return}let o=e.value.slice(0,e.selectionStart).split(`
140
+ `);return(0,K.jsx)(`pre`,{className:`text-muted-foreground m-0 overflow-auto rounded border border-border bg-background py-2 font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap`,style:t?{maxHeight:t}:void 0,children:n.map((e,t)=>{let n=K5(e),r=n===`hunk`||n===`file`,i=n===`add`||n===`del`||n===`ctx`?e.slice(1):e;return(0,K.jsxs)(`div`,{className:Y(`flex px-2`,q5[n]),children:[(0,K.jsx)(`span`,{className:Y(`w-3 shrink-0 select-none text-center`,J5[n]),children:Y5[n]}),(0,K.jsx)(`span`,{className:Y(`min-w-0 flex-1 break-words whitespace-pre-wrap`,r&&`text-muted-foreground/80`),children:r?e:R5(i)})]},t)})})}function Z5(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Q5(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function $5({onRestored:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(()=>{mc(`/api/config/history`).then(n).catch(()=>n({versions:[],bytes:0,retention:50}))},[]);(0,v.useEffect)(()=>h(),[h]);let g=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),_=async()=>{let e=(p??``).trim();m(null);let t=await g(`/api/config/history/checkpoint`,{label:e||void 0});i(t.ok?`Checkpoint saved${e?` · “${e}”`:``}`:`Failed: ${t.error}`),t.ok&&h()},y=async e=>{if(s===e){c(null),u(null);return}c(e),u(null);let t=await mc(`/api/config/history/diff?id=${encodeURIComponent(e)}`).catch(()=>null);u(t)},b=async t=>{f(null),o(!0);let n=await g(`/api/config/history/restore`,{id:t});o(!1),i(n.ok?`Restored ${t}${n.persisted===!1?` (applied live, not persisted)`:``}`:`Restore failed: ${n.error}`),n.ok&&(h(),e())},x=async e=>{let t=await g(`/api/config/history/delete`,{id:e});i(t.ok?`Version deleted`:`Failed: ${t.error}`),t.ok&&h()};return t?(0,K.jsxs)(K.Fragment,{children:[r&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:14},children:[p===null?(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(nl,{className:`size-4`}),onClick:()=>m(``),children:`Save checkpoint`}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)]`,autoFocus:!0,placeholder:`checkpoint name (e.g. pre-upgrade)`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_(),e.key===`Escape`&&m(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void _(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>m(null),children:`Cancel`})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[t.versions.length,` versions · `,Z5(t.bytes),` · auto-keep `,t.retention]})]}),t.versions.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`No versions yet — they appear here after each config change.`}):(0,K.jsx)(`ol`,{className:`m-0 grid list-none p-0 pl-1.5`,children:t.versions.map((e,t)=>{let n=e.drift.added+e.drift.removed;return(0,K.jsxs)(`li`,{className:`hover:bg-foreground/5 relative grid grid-cols-[24px_minmax(0,1fr)_auto] items-start gap-3 rounded-md px-2.5 py-3.5 transition-colors before:absolute before:top-[25px] before:bottom-0 before:left-[22px] before:w-px before:bg-border last:before:hidden`,children:[(0,K.jsx)(`span`,{className:Y(`relative z-[1] mt-1 justify-self-center rounded-full border-[2.5px]`,t===0?`border-brand bg-brand ring-brand/25 size-[14px] ring-4`:`border-border bg-card size-[13px]`),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-[9px] text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-[0.05em] uppercase`,e.kind===`checkpoint`?`border-warning/45 bg-warning/10 text-warning`:`border-border text-muted-foreground`),children:e.kind===`checkpoint`?`★ checkpoint`:`auto`}),e.label&&(0,K.jsx)(`span`,{className:`text-foreground font-semibold`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[11.5px]`,children:Q5(e.ts)}),t===0?(0,K.jsx)(`span`,{className:`text-brand font-mono text-[10px] font-semibold tracking-[0.05em] uppercase`,children:`latest`}):n===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11.5px]`,children:`identical to current`}):(0,K.jsxs)(`span`,{className:`inline-flex items-baseline gap-[7px] font-mono text-[11.5px]`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`+`,e.drift.added]}),(0,K.jsxs)(`span`,{className:`text-destructive`,children:[`−`,e.drift.removed]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:` vs current`})]})]}),s===e.id&&(0,K.jsx)(`div`,{className:`mt-2`,children:l?l.unified.trim()?(0,K.jsx)(X5,{unified:l.unified,maxHeight:280}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences from the current config.`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`computing diff…`})})]}),(0,K.jsxs)(`div`,{className:`mt-px inline-flex flex-none items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void y(e.id),children:s===e.id?`Hide`:`Diff`}),d===e.id?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,disabled:a,onClick:()=>void b(e.id),children:`Confirm restore`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>f(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,disabled:t===0,title:t===0?`This is the current config`:`Restore this version`,onClick:()=>f(e.id),children:`Restore`}),e.kind===`checkpoint`&&(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,icon:(0,K.jsx)(cl,{className:`size-4`}),title:`Delete`,onClick:()=>void x(e.id)})]})]},e.id)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading history…`})}function e7(e){if(!e)return[];let t=[],n=e=>e?Array.isArray(e.enum)?`enum`:e.type===`array`?`array<${n(e.items)}>`:Array.isArray(e.type)?e.type.join(` | `):e.type??(e.properties?`object`:`any`):`any`,r=(e,i,a,o)=>{let s=e.properties??{};for(let[e,c]of Object.entries(s)){let s=i?`${i}.${e}`:e,l=a||e;t.push({path:s,section:l,type:n(c),def:c.default===void 0?void 0:JSON.stringify(c.default),desc:c.description,enumv:Array.isArray(c.enum)?c.enum:void 0,required:o.has(e)}),c.properties&&r(c,s,l,new Set(c.required??[]));let u=c.additionalProperties;u?.properties&&r(u,`${s}.<name>`,l,new Set(u.required??[]));let d=c.items;d?.properties&&r(d,`${s}[]`,l,new Set(d.required??[]))}};return r(e,``,``,new Set(e.required??[])),t}function t7(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(t).catch(()=>{})},[]);let i=(0,v.useMemo)(()=>e7(e),[e]),a=n.trim().toLowerCase(),o=a?i.filter(e=>e.path.toLowerCase().includes(a)||(e.desc??``).toLowerCase().includes(a)):i,s=(0,v.useMemo)(()=>{let e=new Map;for(let t of o){let n=e.get(t.section)??[];n.push(t),e.set(t.section,n)}return[...e.entries()]},[o]);return e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:12},children:[(0,K.jsx)(Vb,{className:`w-[min(360px,60vw)]`,placeholder:`Search fields & descriptions…`,value:n,onChange:e=>r(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[o.length,` options`]})]}),s.length===0?(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[`No fields match “`,n,`”.`]}):(0,K.jsx)(`div`,{className:`grid gap-[18px]`,children:s.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`text-brand m-0 mb-2 font-mono text-[11px] tracking-[0.09em] uppercase`,children:e}),(0,K.jsx)(`div`,{className:`grid gap-2`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`border-border bg-muted/45 hover:border-brand/40 rounded-md border px-[13px] py-[11px] transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2.5`,children:[(0,K.jsx)(`code`,{className:`text-foreground font-mono text-[12.5px] font-medium`,children:e.path}),(0,K.jsx)(`span`,{className:`text-brand bg-brand/[0.13] rounded-full px-[7px] py-px font-mono text-[10.5px]`,children:e.type}),e.required&&(0,K.jsx)(`span`,{className:`text-destructive font-mono text-[10px] tracking-[0.05em] uppercase`,children:`required`}),e.def!==void 0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`default `,(0,K.jsx)(`code`,{className:`text-muted-foreground`,children:e.def})]})]}),e.desc&&(0,K.jsx)(`p`,{className:`text-muted-foreground mt-1.5 mb-0 text-[12.5px] leading-[1.5]`,children:e.desc}),e.enumv&&(0,K.jsx)(`div`,{className:`mt-[7px] flex flex-wrap gap-1.5`,children:e.enumv.map(e=>(0,K.jsx)(`code`,{className:`border-border text-muted-foreground rounded-md border px-[7px] py-px font-mono text-[11px]`,children:e},e))})]},e.path))})]},e))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading schema…`})}function n7({...e}){return(0,K.jsx)(cf,{"data-slot":`sheet`,...e})}function r7({...e}){return(0,K.jsx)(mf,{"data-slot":`sheet-portal`,...e})}function i7({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`sheet-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function a7({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,K.jsxs)(r7,{children:[(0,K.jsx)(i7,{}),(0,K.jsxs)(bf,{"data-slot":`sheet-content`,className:Y(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,K.jsxs)(kf,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,K.jsx)(cl,{className:`size-4`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function o7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-header`,className:Y(`flex flex-col gap-1.5 p-4`,e),...t})}function s7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-footer`,className:Y(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function c7({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`sheet-title`,className:Y(`font-semibold text-foreground`,e),...t})}function l7({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`sheet-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var u7=500;function d7({title:e,subtitle:t,onClose:n,footer:r,children:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=(0,v.useRef)(n);return c.current=n,(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>o(!0));return()=>{cancelAnimationFrame(e),s.current&&clearTimeout(s.current)}},[]),(0,K.jsx)(n7,{open:a,onOpenChange:(0,v.useCallback)(e=>{e||s.current||(o(!1),s.current=setTimeout(()=>c.current(),u7))},[]),children:(0,K.jsxs)(a7,{side:`right`,className:`w-full gap-0 sm:max-w-2xl`,children:[(0,K.jsxs)(o7,{className:`border-b`,children:[(0,K.jsx)(c7,{children:e}),t!=null&&(0,K.jsx)(l7,{children:t})]}),(0,K.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:i}),r!=null&&(0,K.jsx)(s7,{className:`border-t`,children:r})]})})}var f7=[{key:`host`,label:`Host / IP`,type:`text`,placeholder:`192.168.88.1`,help:`SSH host. Ignored when a MAC address is set (MAC-Telnet).`},{key:`port`,label:`SSH port`,type:`number`,placeholder:`22`},{key:`username`,label:`Username`,type:`text`,placeholder:`admin`},{key:`password`,label:`Password`,type:`password`,secret:!0},{key:`timeoutMs`,label:`Timeout (ms)`,type:`number`,placeholder:`10000`},{key:`description`,label:`Description`,type:`text`,placeholder:`Core router`,help:`Free-text label.`},{key:`keyFilename`,label:`SSH key file`,type:`text`,advanced:!0,help:`Path to a private-key file.`},{key:`privateKey`,label:`Private key (PEM)`,type:`password`,secret:!0,advanced:!0},{key:`keyPassphrase`,label:`Key passphrase`,type:`password`,secret:!0,advanced:!0},{key:`jumpVia`,label:`Jump via device`,type:`text`,advanced:!0,help:`Name of another device to use as an SSH bastion.`},{key:`mac`,label:`MAC address`,type:`text`,advanced:!0,help:`Set to reach the device over Layer-2 MAC-Telnet (no IP).`},{key:`sourceMac`,label:`Source MAC`,type:`text`,advanced:!0},{key:`macHost`,label:`MAC-Telnet host iface`,type:`text`,advanced:!0},{key:`macPort`,label:`MAC-Telnet port`,type:`number`,advanced:!0,placeholder:`20561`}],p7=[{id:`devices`,title:`Devices`,icon:`🖧`,kind:`deviceMap`,blurb:`MikroTik routers this server manages. Toggle a device off to hide it from the tools.`,fields:f7},{id:`mcp`,title:`MCP Server`,icon:`⚙️`,kind:`object`,path:`mcp`,blurb:`How the MCP server is exposed to the AI client.`,fields:[{key:`transport`,label:`Transport`,type:`select`,options:[`stdio`,`sse`,`streamable-http`]},{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`8000`},{key:`appViews`,label:`MCP App Views`,type:`bool`,help:`Expose rich App-view metadata to compatible clients.`},{key:`toolPageSize`,label:`Tool page size`,type:`number`,advanced:!0,help:`0 = no paging.`},{key:`allowedHosts`,label:`Allowed hosts`,type:`text`,advanced:!0,help:`Comma-separated.`},{key:`allowedOrigins`,label:`Allowed origins`,type:`text`,advanced:!0},{key:`corsOrigins`,label:`CORS origins`,type:`text`,advanced:!0}]},{id:`dashboard`,title:`Observability Dashboard`,icon:`📊`,kind:`object`,path:`dashboard`,enable:{key:`enabled`,label:`Dashboard`},blurb:`This web dashboard — records every tool call and serves the live UI.`,fields:[{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`9090`},{key:`token`,label:`Access token`,type:`password`,secret:!0,help:`Require this bearer token to view the dashboard.`},{key:`captureBody`,label:`Capture tool input/output`,type:`bool`},{key:`redactInput`,label:`Redact input bodies`,type:`bool`},{key:`dbPath`,label:`Database path`,type:`text`,advanced:!0},{key:`maxEvents`,label:`Max events kept`,type:`number`,advanced:!0},{key:`maxBodyBytes`,label:`Max body bytes`,type:`number`,advanced:!0}]},{id:`ssh`,title:`SSH Connection Pool`,icon:`🔌`,kind:`object`,path:`ssh`,enable:{key:`keepAlive`,label:`Keep-alive pooling`},blurb:`Reuse SSH connections across tool calls for lower latency.`,fields:[{key:`keepAliveInterval`,label:`Keep-alive interval (ms)`,type:`number`,placeholder:`10000`},{key:`idleTimeout`,label:`Idle timeout (ms)`,type:`number`,placeholder:`30000`}]},{id:`s3`,title:`S3 Backups`,icon:`☁️`,kind:`object`,path:`s3`,enable:{presence:!0,label:`S3 backups`},blurb:`Ship config backups to an S3-compatible bucket.`,fields:[{key:`bucket`,label:`Bucket`,type:`text`},{key:`region`,label:`Region`,type:`text`},{key:`endpoint`,label:`Endpoint`,type:`text`,placeholder:`https://s3.example.com`},{key:`accessKeyId`,label:`Access key ID`,type:`password`,secret:!0},{key:`secretAccessKey`,label:`Secret access key`,type:`password`,secret:!0},{key:`prefix`,label:`Key prefix`,type:`text`},{key:`sessionToken`,label:`Session token`,type:`password`,secret:!0,advanced:!0},{key:`presignExpiresIn`,label:`Presign expiry (s)`,type:`number`,advanced:!0,placeholder:`3600`}]},{id:`memory`,title:`Knowledge Memory`,icon:`🧠`,kind:`object`,path:`memory`,enable:{key:`enabled`,label:`Memory`},blurb:`Persistent knowledge graph the AI can read and write.`,fields:[{key:`dbPath`,label:`Database path`,type:`text`}]},{id:`modules`,title:`Tool Modules`,icon:`🧩`,kind:`modules`,blurb:`Curate which tool modules are exposed to the AI client.`,fields:[]},{id:`general`,title:`General`,icon:`🎛️`,kind:`object`,blurb:`Server-wide options.`,fields:[{key:`readOnly`,label:`Read-only mode`,type:`bool`,help:`Block all write/destructive tools.`},{key:`disableUpdateCheck`,label:`Disable update check`,type:`bool`},{key:`backupDir`,label:`Backup directory`,type:`text`,advanced:!0}]}];function m7({className:e,size:t=`default`,...n}){return(0,K.jsx)(z_,{"data-slot":`switch`,"data-size":t,className:Y(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,K.jsx)(V_,{"data-slot":`switch-thumb`,className:Y(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}var h7=`«redacted»`,g7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},_7=e=>Array.isArray(e)?e:[],v7=e=>[...new Set(e)],y7=e=>e==null?``:typeof e==`object`?JSON.stringify(e):String(e);function b7(e,t){return t.path?g7(e[t.path]):e}function x7(e,t,n,r){if(t.path){let i={...g7(e[t.path])};return r===void 0||r===``?delete i[n]:i[n]=r,{...e,[t.path]:i}}let i={...e};return r===void 0||r===``?delete i[n]:i[n]=r,i}function S7(e,t){return t.enable?t.enable.presence?e[t.path??``]!==void 0:b7(e,t)[t.enable.key??`enabled`]!==!1:!0}function C7({field:e,value:t,onChange:n}){let r=`f_${e.key}`,i=e.type===`bool`,a;return a=e.type===`bool`?(0,K.jsx)(m7,{checked:t===!0,onCheckedChange:n}):e.type===`select`?(0,K.jsx)(Gb,{value:y7(t??e.options?.[0]??``),onValueChange:n,options:(e.options??[]).map(e=>({value:e,label:e}))}):e.type===`number`?(0,K.jsx)(Vb,{id:r,type:`number`,placeholder:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value===``?void 0:Number(e.target.value))}):(0,K.jsx)(Vb,{id:r,type:e.type===`password`?`password`:`text`,placeholder:e.secret&&t===h7?`•••• unchanged`:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value)}),(0,K.jsxs)(`div`,{className:Y(`flex min-w-0`,i?`flex-row items-center justify-between gap-2.5`:`flex-col gap-1.5`),children:[(0,K.jsxs)(zy,{htmlFor:r,className:`text-muted-foreground text-xs font-semibold`,children:[e.label,e.secret&&(0,K.jsx)(`span`,{className:`text-warning text-[10px] font-semibold tracking-[0.04em] uppercase`,children:`secret`})]}),a,e.help&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.4]`,children:e.help})]})}function w7({fields:e,value:t,onField:n}){let[r,i]=(0,v.useState)(!1),a=e.filter(e=>!e.advanced),o=e.filter(e=>e.advanced);return(0,K.jsxs)(`div`,{className:`mt-1 grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-4 gap-y-3`,children:[a.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key)),o.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground col-span-full flex cursor-pointer items-center gap-1 border-0 bg-transparent py-1 text-left text-xs font-semibold`,onClick:()=>i(e=>!e),children:[r?(0,K.jsx)(Ac,{className:`size-3`}):(0,K.jsx)(jc,{className:`size-3`}),` `,`Advanced (`,o.length,`)`]}),r&&o.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key))]})]})}var T7={prefix:``,presignExpiresIn:3600};function E7(e,t){let n=b7(e,t),r=e=>n[e]!=null&&n[e]!==``?y7(n[e]):``,i=r(`host`)?`${r(`host`)}:${r(`port`)}`:``;return t.id===`mcp`?[r(`transport`),i].filter(Boolean).join(` · `):t.id===`dashboard`?[i,n.token?`token set`:`open`].filter(Boolean).join(` · `):t.id===`ssh`?`interval ${r(`keepAliveInterval`)||`?`}ms · idle ${r(`idleTimeout`)||`?`}ms`:t.id===`s3`?S7(e,t)?[r(`bucket`),r(`region`),r(`endpoint`)].filter(Boolean).join(` · `)||`not configured`:``:t.id===`memory`?r(`dbPath`):t.id===`general`?`${e.readOnly?`read-only`:`read-write`}${e.disableUpdateCheck?` · no update check`:``}`:``}function D7({cfg:e,onChange:t,section:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=S7(e,n),s=r=>{if(n.enable?.presence){if(r)t({...e,[n.path]:a.current??(n.id===`s3`?T7:{})});else{a.current=g7(e[n.path]);let r={...e};delete r[n.path],t(r),i(!1)}return}t(x7(e,n,n.enable.key??`enabled`,r))},c=E7(e,n);return(0,K.jsxs)(Kb,{className:Y(`px-4 py-3.5 transition-opacity`,!o&&`opacity-50`),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:n.icon}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:[n.title,n.enable&&(0,K.jsx)(Lb,{type:o?`success`:`secondary`,children:o?`active`:`off`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:c||n.blurb})]}),(0,K.jsx)(`span`,{className:`flex-1`}),n.enable&&(0,K.jsx)(m7,{checked:o,onCheckedChange:s,title:`${o?`Deactivate`:`Activate`} ${n.enable.label??n.title}`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>i(!0),disabled:n.enable?.presence&&!o,children:`Edit`})]}),r&&(0,K.jsxs)(d7,{title:`${n.icon} ${n.title}`,subtitle:n.blurb,onClose:()=>i(!1),children:[n.enable&&(0,K.jsxs)(`label`,{className:`border-border bg-muted text-foreground flex items-center gap-2.5 rounded-md border px-3 py-2.5 text-[13px] font-semibold`,children:[(0,K.jsx)(m7,{checked:o,onCheckedChange:s}),o?`Active`:`Inactive — enable ${n.enable.label??n.title}`]}),o?(0,K.jsx)(w7,{fields:n.fields,value:b7(e,n),onField:(r,i)=>t(x7(e,n,r,i))}):(0,K.jsx)(Pb,{type:`secondary`,label:!1,children:`This section is turned off. Toggle it on to edit its settings.`})]})]})}function O7({cfg:e,onChange:t,name:n,isNew:r,onClose:i}){let[a,o]=(0,v.useState)(n),[s,c]=(0,v.useState)(null),l=g7(e.devices),u=g7(l[n]),d=(r,i)=>{let a={...u};i===void 0||i===``?delete a[r]:a[r]=i,t({...e,devices:{...l,[n]:a}})},f=()=>{let r=a.trim();if(r===n)return!0;if(!r)return c(`Name cannot be empty.`),!1;if(l[r])return c(`A device named "${r}" already exists.`),!1;let i={...l,[r]:u};return delete i[n],t({...e,devices:i}),!0},p=()=>{f()&&i()};return(0,K.jsxs)(d7,{title:r?`Add device`:`Device · ${n}`,subtitle:r?`New MikroTik router`:void 0,onClose:p,footer:(0,K.jsx)(X,{type:`success`,size:`sm`,onClick:p,children:`Done`}),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,K.jsx)(zy,{htmlFor:`dev_name`,className:`text-muted-foreground text-xs font-semibold`,children:`Name`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{id:`dev_name`,value:a,onChange:e=>{o(e.target.value),c(null)},placeholder:`core-router`}),!r&&a.trim()!==n&&(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>f(),children:`Rename`})]}),s&&(0,K.jsx)(`span`,{className:`text-destructive text-[11px]`,children:s})]}),(0,K.jsx)(w7,{fields:f7,value:u,onField:d})]})}function k7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=g7(e.devices),s=Object.keys(o),c=y7(e.defaultDevice),l=()=>{let n=`device`,i=1,a=n;for(;o[a];)a=`${n}-${++i}`;t({...e,devices:{...o,[a]:{host:`192.168.88.1`,port:22,username:`admin`,password:``,timeoutMs:1e4}}}),r({name:a,isNew:!0})},u=(n,r)=>{t({...e,devices:{...o,[n]:{...g7(o[n]),disabled:r}}})},d=n=>{let r={...o};delete r[n];let i={...e,devices:r};c===n&&(i.defaultDevice=Object.keys(r)[0]??``),t(i),a(null)};return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🖧`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Devices`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[s.length,` device`,s.length===1?``:`s`,` · default: `,c||`—`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`Default`}),(0,K.jsx)(Gb,{value:c,onValueChange:n=>t({...e,defaultDevice:n}),options:s.map(e=>({value:e,label:e}))})]}),(0,K.jsx)(X,{size:`sm`,onClick:l,icon:(0,K.jsx)(Jc,{className:`size-4`}),children:`Add device`})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:[s.map(e=>{let t=g7(o[e]),n=t.disabled===!0,s=t.mac?y7(t.mac):`${y7(t.host)||`?`}:${y7(t.port)||`22`}`;return(0,K.jsxs)(`div`,{className:Y(`border-border bg-card hover:border-brand/40 flex flex-col gap-1.5 rounded-lg border px-[15px] py-3.5 transition-colors`,n&&`opacity-50 grayscale-[0.4]`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,n?`bg-muted-foreground/60`:`bg-success`)}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e}),c===e&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(m7,{checked:!n,onCheckedChange:t=>u(e,!t),title:n?`Enable device`:`Disable device`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:s}),t.description?(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:y7(t.description)}):null,(0,K.jsxs)(`div`,{className:`mt-auto flex gap-1.5 pt-1`,children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r({name:e,isNew:!1}),children:`Edit`}),i===e?(0,K.jsx)(X,{size:`sm`,type:`error`,onClick:()=>d(e),children:`Confirm?`}):(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,onClick:()=>a(e),children:`Remove`})]})]},e)}),s.length===0&&(0,K.jsxs)(Pb,{type:`secondary`,label:!1,children:[`No devices yet. Click `,(0,K.jsx)(`b`,{children:`Add device`}),` to configure your first router.`]})]}),n&&(0,K.jsx)(O7,{cfg:e,onChange:t,name:n.name,isNew:n.isNew,onClose:()=>r(null)})]})}function A7(e,t){let n=_7(e.disabledModules),r=_7(e.disabledGroups),i=_7(e.enabledModules),a=_7(e.enabledGroups);return n.includes(t.slug)||r.includes(t.group)?!1:i.length===0&&a.length===0?!0:i.includes(t.slug)||a.includes(t.group)}function j7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/modules`).then(e=>r(e.modules)).catch(()=>r([]))},[]);let o=g7(e.tools),s=(n,r)=>{let i=new Set(_7(o.enabledModules)),a=new Set(_7(o.disabledModules));r?(a.delete(n.slug),(_7(o.enabledModules).length>0||_7(o.enabledGroups).length>0)&&i.add(n.slug)):(i.delete(n.slug),a.add(n.slug)),t({...e,tools:{...o,enabledModules:v7([...i]),disabledModules:v7([...a])}})},c=(n??[]).filter(e=>{if(!i)return!0;let t=i.toLowerCase();return e.label.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)}),l=new Map;for(let e of c)l.set(e.group,[...l.get(e.group)??[],e]);let u=(n??[]).filter(e=>A7(o,e)).length;return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🧩`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Tool Modules`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[n?`${u}/${n.length} modules enabled`:`loading…`,` · applied on Save`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Vb,{placeholder:`Filter modules…`,value:i,onChange:e=>a(e.target.value),className:`max-w-[190px]`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(m7,{checked:g7(e.mcp).appViews===!0,onCheckedChange:n=>t({...e,mcp:{...g7(e.mcp),appViews:n}}),title:`MCP App Views`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`App Views`})]})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid max-h-[440px] gap-[18px] overflow-auto`,children:[[...l.entries()].map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground mt-2 mb-0.5 font-bold text-[11px] tracking-[0.05em] uppercase`,children:e}),t.map(e=>{let t=A7(o,e);return(0,K.jsxs)(`label`,{className:Y(`bg-muted hover:border-brand/40 flex cursor-pointer items-start gap-2.5 rounded-md border px-[11px] py-[9px] transition-colors select-none`,t?`border-brand/50 bg-brand/10`:`border-border`),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>s(e,!t),className:`accent-brand mt-0.5 cursor-pointer`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`text-foreground flex flex-wrap items-center gap-[7px] text-xs font-semibold`,children:[e.label,(0,K.jsx)(`code`,{className:`text-muted-foreground bg-background border-border rounded border px-1.5 py-px font-mono text-[10px]`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.35]`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground pt-px font-mono text-[10px] whitespace-nowrap`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]},e.slug)})]},e)),n&&c.length===0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`No modules match “`,i,`”.`]})]})]})}function M7({cfg:e,onChange:t}){return(0,K.jsx)(`div`,{className:`mt-1 grid gap-3.5`,children:p7.map(n=>n.kind===`deviceMap`?(0,K.jsx)(k7,{cfg:e,onChange:t},n.id):n.kind===`modules`?(0,K.jsx)(j7,{cfg:e,onChange:t},n.id):(0,K.jsx)(D7,{cfg:e,onChange:t,section:n},n.id))})}function N7(e){let t=new Set,n=new Set,r=e=>{if(!e||typeof e!=`object`)return;let i=e;if(i.properties&&typeof i.properties==`object`)for(let e of Object.keys(i.properties))t.add(e),r(i.properties[e]);if(Array.isArray(i.enum))for(let e of i.enum)typeof e==`string`&&n.add(e);for(let e of[`items`,`additionalProperties`,`anyOf`,`oneOf`,`allOf`]){let t=i[e];Array.isArray(t)?t.forEach(r):t&&typeof t==`object`&&r(t)}for(let e of[`$defs`,`definitions`,`patternProperties`]){let t=i[e];if(t&&typeof t==`object`)for(let e of Object.values(t))r(e)}};return r(e),{keys:[...t].sort(),enums:[...n.add(`true`).add(`false`)].sort()}}function P7(e,t){let n=t;for(;n>0&&/[A-Za-z0-9_.-]/.test(e[n-1]);)n--;let r=e.slice(n,t),i=n-1;for(;i>=0&&/\s/.test(e[i]);)i--;return{word:r,start:n,isValue:e[i]===`:`}}var F7=[[`revert in 30s`,3e4],[`revert in 60s`,6e4],[`revert in 2m`,12e4],[`no auto-revert`,0]];function I7({value:e,onChange:t,onJsonError:n}){let[r,i]=(0,v.useState)(()=>JSON.stringify(e,null,2)),[a,o]=(0,v.useState)({keys:[],enums:[]}),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(e=>o(N7(e))).catch(()=>{})},[]),(0,v.useEffect)(()=>{u.current!=null&&l.current&&(l.current.selectionStart=l.current.selectionEnd=u.current,u.current=null)});let p=(0,v.useRef)(t),m=(0,v.useRef)(n);p.current=t,m.current=n,(0,v.useEffect)(()=>{let e=setTimeout(()=>{try{let e=JSON.parse(r);m.current?.(null),p.current(e)}catch(e){m.current?.(e instanceof Error?e.message:String(e))}},300);return()=>clearTimeout(e)},[r]);let h=e=>{let{word:t,start:n,isValue:r}=P7(e.value,e.selectionStart);if(t.length<1){c(null);return}let i=(r?a.enums:a.keys).filter(e=>e.startsWith(t)&&e!==t).slice(0,8);if(!i.length){c(null);return}let o=e.value.slice(0,e.selectionStart).split(`
141
141
  `),s=o[o.length-1].length,l=Math.min(12+s*7.22-e.scrollLeft,e.clientWidth-160),u=10+o.length*18-e.scrollTop+4;c({items:i,index:0,start:n,x:Math.max(4,l),y:u})},g=e=>{let t=l.current;if(!t||!s)return;let n=r.slice(0,s.start)+e+r.slice(t.selectionStart);u.current=s.start+e.length,i(n),c(null)},_=e=>{if(!s){e.key===` `&&e.ctrlKey&&(e.preventDefault(),h(e.currentTarget));return}e.key===`ArrowDown`?(e.preventDefault(),c({...s,index:(s.index+1)%s.items.length})):e.key===`ArrowUp`?(e.preventDefault(),c({...s,index:(s.index-1+s.items.length)%s.items.length})):e.key===`Enter`||e.key===`Tab`?(e.preventDefault(),g(s.items[s.index])):e.key===`Escape`&&c(null)},y=r.split(`
142
142
  `).length;return(0,K.jsxs)(`div`,{className:`border-border bg-background flex max-h-[420px] overflow-hidden rounded-md border`,children:[(0,K.jsx)(`pre`,{className:`bg-muted text-muted-foreground m-0 min-w-[38px] overflow-hidden px-2 py-2.5 text-right font-mono text-xs leading-[1.5] select-none`,"aria-hidden":`true`,ref:f,children:Array.from({length:y},(e,t)=>t+1).join(`
143
143
  `)}),(0,K.jsxs)(`div`,{className:`relative flex-1`,children:[(0,K.jsxs)(`pre`,{className:`text-muted-foreground pointer-events-none absolute inset-0 z-0 m-0 box-border overflow-hidden px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre [tab-size:2] [&_.j-bool]:text-chart-4 [&_.j-key]:text-chart-1 [&_.j-null]:text-muted-foreground [&_.j-num]:text-chart-3 [&_.j-str]:text-chart-2`,"aria-hidden":`true`,ref:d,children:[R5(r),`
144
- `]}),(0,K.jsx)(Fx,{ref:l,className:`caret-brand selection:bg-brand/35 relative z-[1] m-0 box-border h-[400px] min-h-0 w-full resize-y rounded-none border-0 bg-transparent px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre text-transparent shadow-none [field-sizing:fixed] [tab-size:2] outline-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,spellCheck:!1,wrap:`off`,value:r,onChange:e=>{i(e.target.value),h(e.currentTarget)},onKeyDown:_,onClick:()=>c(null),onScroll:e=>{let t=e.currentTarget;d.current&&(d.current.scrollTop=t.scrollTop,d.current.scrollLeft=t.scrollLeft),f.current&&(f.current.scrollTop=t.scrollTop)}}),s&&(0,K.jsx)(`div`,{className:`border-brand bg-card absolute z-[5] max-h-[184px] min-w-[150px] overflow-y-auto rounded-md border shadow-lg`,style:{left:s.x,top:s.y},children:s.items.map((e,t)=>(0,K.jsx)(`div`,{className:Y(`cursor-pointer px-[11px] py-[5px] font-mono text-xs`,t===s.index?`bg-brand/20 text-foreground`:`text-muted-foreground`),onMouseDown:t=>{t.preventDefault(),g(e)},children:e},e))})]})]})}var L7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{};function R7({initial:e,onClose:t,onReload:n}){let[r,i]=(0,v.useState)(()=>L7(e)),[a,o]=(0,v.useState)(`form`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)([]),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(6e4),[S,C]=(0,v.useState)(null);(0,v.useEffect)(()=>{let e=setTimeout(()=>{hc(`/api/config/validate`,r).then(e=>u(e.errors??[])).catch(()=>{})},350);return()=>clearTimeout(e)},[r]),(0,v.useEffect)(()=>{if(!h||_<=0)return;let e=setInterval(()=>y(e=>Math.max(0,e-1)),1e3);return()=>clearInterval(e)},[h,_]);let w=(0,v.useRef)(n);w.current=n,(0,v.useEffect)(()=>{h&&_===0&&(h.rollbackMs??0)>0&&(C(`Auto-reverted — changes were not confirmed in time.`),g(null),w.current())},[h,_]);let T=!s&&l.length===0,E=async()=>{let e=L7(r.devices);if(Object.keys(e).length===0)return;C(`Testing devices…`);let t={};for(let[n,r]of Object.entries(e)){let e=await hc(`/api/config/test-device`,{name:n,config:r}).catch(()=>({ok:!1}));t[n]=e.ok&&e.status?.reachable===!0?{ok:!0,label:`${Math.round(e.status.latencyMs??0)}ms · ${e.status.identity??`ok`}`}:{ok:!1,label:e.status?.error??e.errors?.[0]?.message??`unreachable`},f({...t})}C(null)},D=async()=>{m(await hc(`/api/config/preview`,r))},O=async()=>{C(`Saving…`);let e=await hc(`/api/config`,{config:r,rollbackMs:b});if(C(null),m(null),!e.ok){u(e.errors??[{path:`(root)`,message:`save rejected`}]);return}g(e),y(Math.round((e.rollbackMs??0)/1e3))},k=async()=>{h?.pendingId&&(await hc(`/api/config/keep`,{pendingId:h.pendingId}),g(null),C(`Changes kept.`),n())},A=async()=>{h?.pendingId&&(await hc(`/api/config/rollback`,{pendingId:h.pendingId}),g(null),C(`Reverted to the previous config.`),n())};return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`border-border bg-muted inline-flex gap-0.5 rounded-md border p-0.5`,children:[(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`form`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>{c(null),o(`form`)},children:[(0,K.jsx)(Bc,{className:`size-3.5`}),` Form`]}),(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`json`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>o(`json`),children:[(0,K.jsx)(Oc,{className:`size-3.5`}),` JSON`]})]}),(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,T?`border-success/40 bg-success/10 text-success`:`border-destructive/40 bg-destructive/10 text-destructive`),children:s?`invalid JSON`:l.length?`${l.length} schema issue(s)`:`valid ✓`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void E(),children:`Test devices`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void D(),disabled:!T,children:`Preview diff`}),(0,K.jsx)(Gb,{size:`sm`,value:String(b),onValueChange:e=>x(Number(e)),options:F7.map(([e,t])=>({value:String(t),label:e})),"aria-label":`Auto-revert window`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void O(),disabled:!T||!!h,children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:t,children:`Close`})]}),S&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:S}),h&&(0,K.jsxs)(`div`,{className:`border-warning/40 bg-warning/10 flex flex-wrap items-center gap-2 rounded-md border px-3 py-2.5 text-xs`,children:[(0,K.jsx)(`strong`,{children:`Applied.`}),` `,(h.rollbackMs??0)>0?(0,K.jsxs)(K.Fragment,{children:[`Reverting in `,(0,K.jsxs)(`span`,{className:`text-warning font-mono font-bold`,children:[_,`s`]}),` `,`unless you keep it.`]}):(0,K.jsx)(K.Fragment,{children:`Saved without an auto-revert window.`}),h.devicesChanged&&(0,K.jsxs)(`span`,{className:`text-warning text-[11px]`,children:[` `,`· device list changed — reconnect the MCP client to expose it to the model`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void k(),children:`Keep changes`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void A(),children:`Revert now`})]}),a===`form`?(0,K.jsx)(M7,{cfg:r,onChange:i}):(0,K.jsx)(I7,{value:r,onChange:e=>i(L7(e)),onJsonError:c}),Object.keys(d).length>0&&(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.entries(d).map(([e,t])=>(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,t.ok?`border-success/40 text-success`:`border-destructive/40 text-destructive`),children:[t.ok?`●`:`○`,` `,e,`: `,t.label]},e))}),(s||l.length>0)&&(0,K.jsx)(`div`,{className:`flex flex-col gap-[3px]`,children:s?(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[`JSON: `,s]}):l.slice(0,12).map((e,t)=>(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[(0,K.jsx)(`code`,{className:`text-warning`,children:e.path}),` — `,e.message]},t))}),p&&(0,K.jsxs)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[(0,K.jsxs)(`div`,{className:`bg-muted flex items-center gap-2 px-[13px] py-[9px] text-xs`,children:[(0,K.jsx)(`strong`,{children:`Diff vs current`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p.summary?.changed?`+${p.summary.added} / -${p.summary.removed}`:`no changes`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{className:`size-4`}),onClick:()=>m(null),"aria-label":`Close preview`})]}),(0,K.jsx)(`pre`,{className:`bg-background text-muted-foreground m-0 max-h-[320px] overflow-auto px-3 py-2.5 font-mono text-[11px] leading-[1.5]`,children:(p.unified||`(identical)`).split(`
144
+ `]}),(0,K.jsx)(Fx,{ref:l,className:`caret-brand selection:bg-brand/35 relative z-[1] m-0 box-border h-[400px] min-h-0 w-full resize-y rounded-none border-0 bg-transparent px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre text-transparent shadow-none [field-sizing:fixed] [tab-size:2] outline-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,spellCheck:!1,wrap:`off`,value:r,onChange:e=>{i(e.target.value),h(e.currentTarget)},onKeyDown:_,onClick:()=>c(null),onScroll:e=>{let t=e.currentTarget;d.current&&(d.current.scrollTop=t.scrollTop,d.current.scrollLeft=t.scrollLeft),f.current&&(f.current.scrollTop=t.scrollTop)}}),s&&(0,K.jsx)(`div`,{className:`border-brand bg-card absolute z-[5] max-h-[184px] min-w-[150px] overflow-y-auto rounded-md border shadow-lg`,style:{left:s.x,top:s.y},children:s.items.map((e,t)=>(0,K.jsx)(`div`,{className:Y(`cursor-pointer px-[11px] py-[5px] font-mono text-xs`,t===s.index?`bg-brand/20 text-foreground`:`text-muted-foreground`),onMouseDown:t=>{t.preventDefault(),g(e)},children:e},e))})]})]})}var L7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{};function R7({initial:e,onClose:t,onReload:n}){let[r,i]=(0,v.useState)(()=>L7(e)),[a,o]=(0,v.useState)(`form`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)([]),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(6e4),[S,C]=(0,v.useState)(null);(0,v.useEffect)(()=>{let e=setTimeout(()=>{hc(`/api/config/validate`,r).then(e=>u(e.errors??[])).catch(()=>{})},350);return()=>clearTimeout(e)},[r]),(0,v.useEffect)(()=>{if(!h||_<=0)return;let e=setInterval(()=>y(e=>Math.max(0,e-1)),1e3);return()=>clearInterval(e)},[h,_]);let w=(0,v.useRef)(n);w.current=n,(0,v.useEffect)(()=>{h&&_===0&&(h.rollbackMs??0)>0&&(C(`Auto-reverted — changes were not confirmed in time.`),g(null),w.current())},[h,_]);let T=!s&&l.length===0,E=async()=>{let e=L7(r.devices);if(Object.keys(e).length===0){C(`No devices configured to test — add one first.`);return}f({}),C(`Testing devices…`);let t={};for(let[n,r]of Object.entries(e)){let e=await hc(`/api/config/test-device`,{name:n,config:r}).catch(()=>({ok:!1}));t[n]=e.ok&&e.status?.reachable===!0?{ok:!0,label:`${Math.round(e.status.latencyMs??0)}ms · ${e.status.identity??`ok`}`}:{ok:!1,label:e.status?.error??e.errors?.[0]?.message??`unreachable`},f({...t})}C(null)},D=async()=>{m(await hc(`/api/config/preview`,r))},O=async()=>{C(`Saving…`);let e=await hc(`/api/config`,{config:r,rollbackMs:b});if(C(null),m(null),!e.ok){u(e.errors??[{path:`(root)`,message:`save rejected`}]);return}g(e),y(Math.round((e.rollbackMs??0)/1e3))},k=async()=>{h?.pendingId&&(await hc(`/api/config/keep`,{pendingId:h.pendingId}),g(null),C(`Changes kept.`),n())},A=async()=>{h?.pendingId&&(await hc(`/api/config/rollback`,{pendingId:h.pendingId}),g(null),C(`Reverted to the previous config.`),n())};return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`border-border bg-muted inline-flex gap-0.5 rounded-md border p-0.5`,children:[(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`form`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>{c(null),o(`form`)},children:[(0,K.jsx)(Bc,{className:`size-3.5`}),` Form`]}),(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`json`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>o(`json`),children:[(0,K.jsx)(Oc,{className:`size-3.5`}),` JSON`]})]}),(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,T?`border-success/40 bg-success/10 text-success`:`border-destructive/40 bg-destructive/10 text-destructive`),children:s?`invalid JSON`:l.length?`${l.length} schema issue(s)`:`valid ✓`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void E(),children:`Test devices`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void D(),disabled:!T,children:`Preview diff`}),(0,K.jsx)(Gb,{size:`sm`,value:String(b),onValueChange:e=>x(Number(e)),options:F7.map(([e,t])=>({value:String(t),label:e})),"aria-label":`Auto-revert window`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void O(),disabled:!T||!!h,children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:t,children:`Close`})]}),S&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:S}),h&&(0,K.jsxs)(`div`,{className:`border-warning/40 bg-warning/10 flex flex-wrap items-center gap-2 rounded-md border px-3 py-2.5 text-xs`,children:[(0,K.jsx)(`strong`,{children:`Applied.`}),` `,(h.rollbackMs??0)>0?(0,K.jsxs)(K.Fragment,{children:[`Reverting in `,(0,K.jsxs)(`span`,{className:`text-warning font-mono font-bold`,children:[_,`s`]}),` `,`unless you keep it.`]}):(0,K.jsx)(K.Fragment,{children:`Saved without an auto-revert window.`}),h.devicesChanged&&(0,K.jsxs)(`span`,{className:`text-warning text-[11px]`,children:[` `,`· device list changed — reconnect the MCP client to expose it to the model`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void k(),children:`Keep changes`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void A(),children:`Revert now`})]}),Object.keys(d).length>0&&(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.entries(d).map(([e,t])=>(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,t.ok?`border-success/40 text-success`:`border-destructive/40 text-destructive`),children:[t.ok?`●`:`○`,` `,e,`: `,t.label]},e))}),a===`form`?(0,K.jsx)(M7,{cfg:r,onChange:i}):(0,K.jsx)(I7,{value:r,onChange:e=>i(L7(e)),onJsonError:c}),(s||l.length>0)&&(0,K.jsx)(`div`,{className:`flex flex-col gap-[3px]`,children:s?(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[`JSON: `,s]}):l.slice(0,12).map((e,t)=>(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[(0,K.jsx)(`code`,{className:`text-warning`,children:e.path}),` — `,e.message]},t))}),p&&(0,K.jsxs)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[(0,K.jsxs)(`div`,{className:`bg-muted flex items-center gap-2 px-[13px] py-[9px] text-xs`,children:[(0,K.jsx)(`strong`,{children:`Diff vs current`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p.summary?.changed?`+${p.summary.added} / -${p.summary.removed}`:`no changes`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{className:`size-4`}),onClick:()=>m(null),"aria-label":`Close preview`})]}),(0,K.jsx)(`pre`,{className:`bg-background text-muted-foreground m-0 max-h-[320px] overflow-auto px-3 py-2.5 font-mono text-[11px] leading-[1.5]`,children:(p.unified||`(identical)`).split(`
145
145
  `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})]})]})}function z7({x:e,y:t,text:n,className:r,textClassName:i,padX:a=9,fontSize:o=9}){let s=(0,v.useRef)(null),[c,l]=(0,v.useState)(()=>n.length*o*.62);(0,v.useLayoutEffect)(()=>{let e=s.current?.getComputedTextLength();e&&e>0&&l(e)},[n,o]);let u=Math.round(c+a*2);return(0,K.jsxs)(`g`,{transform:`translate(${e.toFixed(1)},${t.toFixed(1)})`,children:[(0,K.jsx)(`rect`,{className:r,x:-u/2,y:-9,rx:9,width:u,height:18}),(0,K.jsx)(`text`,{ref:s,className:i,x:0,y:3.5,textAnchor:`middle`,fontSize:o,children:n})]})}function B7(e){return e.reachable===!0?{label:`online`,color:`var(--foreground)`}:e.reachable===!1?{label:`offline`,color:`var(--destructive)`}:{label:`checking…`,color:`var(--muted-foreground)`}}function V7(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)>>>0;return`hsl(${t%360} 70% 62%)`}function H7(e,t,n,r){let i=1-r;return{x:i*i*e.x+2*i*r*t.x+r*r*n.x,y:i*i*e.y+2*i*r*t.y+r*r*n.y}}function U7(e,t,n,r){let i=1-r,a=2*i*(t.x-e.x)+2*r*(n.x-t.x),o=2*i*(t.y-e.y)+2*r*(n.y-t.y);return Math.atan2(o,a)*180/Math.PI}var W7=`var(--foreground)`,G7=`var(--muted-foreground)`,K7=`var(--warning)`;function q7(e){return e.jumpVia?e.jumpVia:e.jumpHost?`${e.jumpHost.host}:${e.jumpHost.port}`:null}var J7=18,Y7=e=>e.length>J7?`${e.slice(0,J7-1)}…`:e,X7=e=>Math.max(23,Math.min(70,e.length*3.1+12));function Z7({payload:e,pulses:t}){let n=e.devices,r=Math.max(1,n.length),i=n.map(e=>{let t=Y7(e.name);return{d:e,label:t,r:X7(t)}}),a=Math.max(23,...i.map(e=>e.r)),o=r>1?(a+18)/Math.sin(Math.PI/r):0,s=Math.max(110+a,o,120),c=a+60,l=Math.max(700,Math.round((s+a+40)*2)),u=Math.round((s+c)*2),d=l/2,f=u/2,p={x:d,y:f},m=i.map((e,t)=>{let n=t/r*Math.PI*2-Math.PI/2+(r%2==0?Math.PI/r:0);return{...e,i:t,x:d+s*Math.cos(n),y:f+s*Math.sin(n)}});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`svg`,{className:`conn`,viewBox:`0 0 ${l} ${u}`,width:`100%`,height:u,preserveAspectRatio:`xMidYMid meet`,children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`radialGradient`,{id:`conn-hub`,cx:`0.5`,cy:`0.34`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.6`,stopColor:`color-mix(in srgb, var(--foreground) 70%, var(--muted-foreground))`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-orb`,cx:`0.5`,cy:`0.32`,r:`0.85`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--muted)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--card)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-burst`,cx:`0.5`,cy:`0.5`,r:`0.5`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:`color-mix(in srgb, var(--foreground) 80%, transparent)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`,stopOpacity:`0`})]}),(0,K.jsxs)(`linearGradient`,{id:`conn-tunnel-grad`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:K7,stopOpacity:`0.15`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:K7,stopOpacity:`0.95`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:K7,stopOpacity:`0.15`})]}),(0,K.jsxs)(`filter`,{id:`conn-tunnel-glow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,K.jsx)(`feGaussianBlur`,{stdDeviation:`3`,result:`b`}),(0,K.jsxs)(`feMerge`,{children:[(0,K.jsx)(`feMergeNode`,{in:`b`}),(0,K.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),[.5,.78,1].map((e,t)=>(0,K.jsx)(`circle`,{className:`conn-grid`,cx:d,cy:f,r:s*e},`g-${t}`)),[0,1,2].map(e=>(0,K.jsx)(`circle`,{className:`conn-sonar`,cx:d,cy:f,style:{animationDelay:`${e*1.1}s`}},`s-${e}`)),m.map(({d:e,i:n,x:r,y:i})=>{let a=B7(e.status),o=e.status.reachable===!0,s=e.status.reachable==null,c={x:r,y:i},l=(d+r)/2,u=(f+i)/2,m=r-d,h=i-f,g=Math.hypot(m,h)||1,_=-h/g,v=m/g,y={x:l+_*16,y:u+v*16},b={x:l-_*16,y:u-v*16},x=`M${d},${f} Q${y.x.toFixed(1)},${y.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,S=`M${d},${f} Q${b.x.toFixed(1)},${b.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,C=`M${d},${f} Q${l.toFixed(1)},${u.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,w=H7(p,y,c,.52),T=U7(p,y,c,.52),E=H7(p,b,c,.48),D=U7(p,b,c,.48)+180,O=t[e.name]??0;return(0,K.jsxs)(`g`,{children:[(0,K.jsx)(`path`,{id:`conn-cmd-${n}`,className:`conn-link`,d:x,stroke:o?W7:a.color,strokeOpacity:o?.5:.32,strokeDasharray:s?`2 8`:o?void 0:`6 7`}),(0,K.jsx)(`path`,{id:`conn-res-${n}`,className:`conn-link`,d:S,stroke:o?G7:a.color,strokeOpacity:o?.5:.18,strokeDasharray:o?void 0:`6 7`}),o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{className:`conn-flow`,d:x,stroke:`var(--foreground)`}),(0,K.jsx)(`circle`,{className:`conn-packet`,r:3.2,fill:`var(--foreground)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,repeatCount:`indefinite`,calcMode:`linear`,children:(0,K.jsx)(`mpath`,{href:`#conn-cmd-${n}`})})}),(0,K.jsx)(`rect`,{className:`conn-packet`,x:-2.6,y:-2.6,width:5.2,height:5.2,fill:`var(--muted-foreground)`,transform:`rotate(45)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,begin:`0.9s`,repeatCount:`indefinite`,calcMode:`linear`,keyPoints:`1;0`,keyTimes:`0;1`,children:(0,K.jsx)(`mpath`,{href:`#conn-res-${n}`})})}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--foreground)`,transform:`translate(${w.x.toFixed(1)},${w.y.toFixed(1)}) rotate(${T.toFixed(1)})`}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--muted-foreground)`,transform:`translate(${E.x.toFixed(1)},${E.y.toFixed(1)}) rotate(${D.toFixed(1)})`})]}),O>0&&(0,K.jsx)(`g`,{children:(0,K.jsxs)(`circle`,{r:6,fill:`url(#conn-burst)`,children:[(0,K.jsx)(`animateMotion`,{dur:`1.1s`,repeatCount:`1`,calcMode:`linear`,keyPoints:`0;1;0`,keyTimes:`0;0.5;1`,path:C}),(0,K.jsx)(`animate`,{attributeName:`opacity`,values:`0;1;1;0`,keyTimes:`0;0.1;0.85;1`,dur:`1.1s`,repeatCount:`1`,fill:`freeze`})]})},`burst-${e.name}-${O}`)]},`l-${e.name}`)}),m.map(e=>{let t=e.d.jumpVia,n=t?m.find(e=>e.d.name===t):void 0,r=!n&&e.d.jumpHost?e.d.jumpHost:void 0;if(!n&&!r)return null;let i={x:e.x,y:e.y},a=Math.hypot(e.x-d,e.y-f)||1,o=(e.x-d)/a,s=(e.y-f)/a,c=n?{x:n.x,y:n.y}:{x:e.x+o*(e.r+46),y:e.y+s*(e.r+46)},l=(c.x+i.x)/2,u=(c.y+i.y)/2,p=Math.hypot(l-d,u-f)||1,h=n?50:16,g={x:l+(l-d)/p*h,y:u+(u-f)/p*h},_=`M${c.x.toFixed(1)},${c.y.toFixed(1)} Q${g.x.toFixed(1)},${g.y.toFixed(1)} ${i.x.toFixed(1)},${i.y.toFixed(1)}`,v=q7(e.d)??``,y=H7(c,g,i,.5),b=`conn-tunnel-${e.i}`;return(0,K.jsxs)(`g`,{className:`conn-tunnel-g`,children:[(0,K.jsx)(`path`,{className:`conn-tunnel-halo`,d:_,stroke:K7}),(0,K.jsx)(`path`,{id:b,className:`conn-tunnel`,d:_,stroke:`url(#conn-tunnel-grad)`,filter:`url(#conn-tunnel-glow)`}),r&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{className:`conn-tunnel-sat`,cx:c.x,cy:c.y,r:11,fill:`var(--background)`,stroke:`var(--warning)`}),(0,K.jsx)(`text`,{x:c.x,y:c.y+3.5,textAnchor:`middle`,fontSize:11,children:`🛡️`})]}),(0,K.jsxs)(`text`,{className:`conn-tunnel-lock`,fontSize:13,textAnchor:`middle`,children:[`🔒`,(0,K.jsx)(`animateMotion`,{dur:`2.4s`,repeatCount:`indefinite`,calcMode:`linear`,rotate:`auto`,children:(0,K.jsx)(`mpath`,{href:`#${b}`})})]}),(0,K.jsx)(z7,{x:y.x,y:y.y,text:`⤳ via ${v}`,className:`conn-tunnel-badge`,textClassName:`conn-tunnel-badge-tx`})]},`jump-${e.d.name}`)}),(0,K.jsx)(`circle`,{className:`conn-hub-glow`,cx:d,cy:f,r:42}),(0,K.jsx)(`circle`,{className:`conn-hub-ring`,cx:d,cy:f,r:37}),(0,K.jsx)(`circle`,{cx:d,cy:f,r:29,fill:`url(#conn-hub)`,stroke:`var(--border)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:d,y:f-4,textAnchor:`middle`,fill:`var(--background)`,fontSize:12,fontWeight:700,children:`LLM`}),(0,K.jsx)(`text`,{x:d,y:f+8,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:8,fontWeight:600,children:`⇄ MCP`}),(0,K.jsx)(`text`,{x:d,y:f+18,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:7.5,fontWeight:600,children:`server`}),m.map(({d:e,x:t,y:n,r,label:i})=>{let a=B7(e.status),o=e.status.reachable===!0,s=o?`${e.status.latencyMs??`?`} ms`:a.label,c=V7(e.name);return(0,K.jsxs)(`g`,{className:`conn-node`,opacity:e.disabled?.35:1,children:[o&&(0,K.jsx)(`circle`,{className:`conn-node-halo`,cx:t,cy:n,r:r+1,stroke:c}),e.pool?.pooled&&(0,K.jsx)(`circle`,{cx:t,cy:n,r:r+5,fill:`none`,stroke:e.pool.inflight>0?`var(--chart-1)`:`var(--success)`,strokeWidth:1.5,strokeDasharray:e.pool.inflight>0?void 0:`4 4`,opacity:.5,className:e.pool.inflight>0?`conn-blink`:void 0}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`url(#conn-orb)`}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:c,opacity:.16}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`none`,stroke:c,strokeWidth:2.5}),(0,K.jsx)(`circle`,{className:o?`conn-blink`:void 0,cx:t+r*.7,cy:n-r*.7,r:4.5,fill:a.color,stroke:`var(--background)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:t,y:n+3.5,textAnchor:`middle`,fill:`var(--foreground)`,fontSize:10,fontWeight:600,children:i}),(0,K.jsx)(`text`,{x:t,y:n+r+14,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:9,children:e.address??e.host}),(0,K.jsx)(`text`,{x:t,y:n+r+26,textAnchor:`middle`,fill:a.color,fontSize:9,fontWeight:600,children:s})]},`n-${e.name}`)})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex flex-wrap justify-center gap-4 text-[11px] [&>span]:inline-flex [&>span]:items-center [&>span]:gap-1.5 [&_i]:inline-block [&_i]:size-2.5 [&_i]:rounded-[3px]`,children:[(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:W7}}),` command · LLM → device`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:G7}}),` response · device → LLM`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:W7}}),` live call (round-trip)`]}),e.devices.some(e=>q7(e))&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--warning)`}}),` 🔒 SSH jump tunnel (ProxyJump)`]}),e.devices.some(e=>e.pool?.pooled)&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--success)`}}),` pooled SSH connection`]})]})]})}function Q7({d:e,onToggle:t}){let n=B7(e.status),r=e.status.reachable===!0?`${n.label} · ${e.status.latencyMs??`?`}ms${e.status.version?` · v${e.status.version}`:``}`:e.status.reachable===!1?`${n.label}${e.status.error?` · ${e.status.error}`:``}`:n.label,i=V7(e.name);return(0,K.jsxs)(`div`,{className:Y(`bg-card grid gap-2 rounded-lg border px-[15px] py-3.5 transition-[transform,border-color] duration-300`,`hover:border-chart-2/35 hover:-translate-y-0.5`,e.disabled&&`opacity-50 grayscale-[0.4]`),style:{borderLeft:`3px solid ${i}`},"data-disabled":e.disabled?`1`:void 0,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`size-[9px] shrink-0 rounded-full`,style:{background:i},title:`device colour`}),(0,K.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),e.disabled&&(0,K.jsx)(Lb,{type:`warning`,children:`disabled`}),(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:n.color},title:n.label}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(`span`,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(m7,{checked:!e.disabled,onCheckedChange:()=>t?.(e.name,!e.disabled),title:e.disabled?`Enable device`:`Disable device`,"aria-label":e.disabled?`Enable device`:`Disable device`})}),(0,K.jsx)(Lb,{type:`secondary`,children:e.authMode})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground [&_b]:text-foreground grid grid-cols-[auto_1fr] gap-x-3 gap-y-[3px] text-[11px] [&_b]:font-medium [&_b]:break-words`,children:[(0,K.jsx)(`span`,{children:e.mac?`mac`:`host`}),(0,K.jsx)(`b`,{children:e.address??`${e.host}:${e.port}`}),(0,K.jsx)(`span`,{children:`user`}),(0,K.jsx)(`b`,{children:e.username}),(0,K.jsx)(`span`,{children:`status`}),(0,K.jsx)(`b`,{style:{color:n.color},children:r}),(0,K.jsx)(`span`,{children:`activity`}),(0,K.jsxs)(`b`,{children:[e.activity.calls,` calls · `,e.activity.errors,` err`,e.activity.avgMs?` · ${ub(e.activity.avgMs)} avg`:``]}),e.pool&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`pool`}),(0,K.jsx)(`b`,{className:e.pool.dead?`text-destructive`:e.pool.inflight>0?`text-chart-1`:e.pool.pooled?`text-success`:`text-muted-foreground`,children:e.pool.pooled?e.pool.inflight>0?`${e.pool.inflight} inflight`:`connected`:`—`})]}),e.description&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`note`}),(0,K.jsx)(`b`,{children:e.description})]})]}),q7(e)&&(0,K.jsxs)(`div`,{className:`border-warning/30 bg-warning/8 mt-2.5 mb-0.5 flex items-center gap-1.5 overflow-hidden rounded-[10px] border px-2.5 py-[7px] text-[10px]`,title:`Reached over SSH through the bastion ${q7(e)} (ProxyJump) — no port exposed on ${e.name}.`,children:[(0,K.jsxs)(`span`,{className:`border-warning/60 text-warning bg-background inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,children:[(0,K.jsx)(el,{className:`size-3`}),` `,q7(e),e.jumpVia?(0,K.jsx)(`i`,{className:`bg-warning text-background rounded-[4px] px-1 py-px text-[7px] tracking-[0.08em] uppercase not-italic`,children:`jump`}):null]}),(0,K.jsx)(`span`,{className:`jump-route__wire jump-route__wire--enc`,children:(0,K.jsx)(`span`,{className:`jump-route__lock`,"aria-hidden":!0,children:`🔒`})}),(0,K.jsxs)(`span`,{className:`bg-background text-foreground inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,style:{borderColor:i},title:e.name,children:[(0,K.jsx)(Xc,{className:`size-3`}),` `,e.name]})]})]})}var $7={READ:`text-success border-success/45 bg-success/10`,WRITE:`text-chart-1 border-chart-1/45 bg-chart-1/10`,WRITE_IDEMPOTENT:`text-chart-2 border-chart-2/45 bg-chart-2/10`,DESTRUCTIVE:`text-warning border-warning/45 bg-warning/10`,DANGEROUS:`text-destructive border-destructive/45 bg-destructive/10`},e9=`border-b border-border/60 px-3.5 py-[7px] text-xs [overflow-wrap:anywhere]`,t9=Y(e9,`bg-muted/40 text-muted-foreground`),n9=Y(e9,`text-foreground`),r9=`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,i9=`m-0 text-[11px] font-semibold tracking-wide text-muted-foreground uppercase`;function a9({event:e,onClose:t}){let[n,r]=(0,v.useState)(H5);return(0,K.jsx)(d7,{title:(0,K.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block rounded-full border px-2 py-px font-mono text-[10px] tracking-wide uppercase`,$7[e.risk]??`text-muted-foreground`),children:e.risk}),(0,K.jsx)(`span`,{className:`font-mono text-[15px]`,children:e.tool}),(0,K.jsx)(ib,{text:e.tool,icon:!0,title:`Copy tool name`})]}),onClose:t,children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-[minmax(120px,0.4fr)_1fr] overflow-hidden rounded-lg border border-border font-mono`,children:[(0,K.jsx)(`div`,{className:t9,children:`title`}),(0,K.jsx)(`div`,{className:n9,children:e.title}),e.reason&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:Y(e9,`bg-muted/40 text-warning`),children:`reason`}),(0,K.jsx)(`div`,{className:Y(e9,`text-foreground italic`),children:e.reason})]}),(0,K.jsx)(`div`,{className:t9,children:`time`}),(0,K.jsx)(`div`,{className:n9,children:new Date(e.ts).toLocaleString(void 0,{hour12:!1})}),(0,K.jsx)(`div`,{className:t9,children:`device`}),(0,K.jsx)(`div`,{className:n9,children:e.device??`—`}),(0,K.jsx)(`div`,{className:t9,children:`transport`}),(0,K.jsx)(`div`,{className:n9,children:e.transport??`—`}),(0,K.jsx)(`div`,{className:t9,children:`duration`}),(0,K.jsx)(`div`,{className:n9,children:ub(e.durationMs)}),(0,K.jsx)(`div`,{className:t9,children:`status`}),(0,K.jsx)(`div`,{className:n9,children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-success`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(`div`,{className:t9,children:`output size`}),(0,K.jsxs)(`div`,{className:n9,children:[db(e.outputBytes),e.truncated?` (truncated)`:``]}),(0,K.jsx)(`div`,{className:t9,children:`structured`}),(0,K.jsx)(`div`,{className:n9,children:e.hasStructured?`yes (renders an MCP App view)`:`no`})]}),e.error&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h2`,{className:i9,children:`ERROR`}),(0,K.jsx)(`pre`,{className:Y(r9,`text-destructive`),children:e.error})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:i9,children:`INPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),e.input&&(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>r(e=>{let t=!e;return U5(t),t}),title:n?`Showing pretty-printed JSON — click for raw`:`Showing raw JSON — click to pretty-print`,children:n?`✦ Pretty`:`{ } Raw`}),(0,K.jsx)(ib,{text:e.input,title:`Copy input JSON`})]}),e.input?(0,K.jsx)(G5,{value:W5(e.input,n)}):(0,K.jsx)(`pre`,{className:Y(r9,`text-muted-foreground`),children:`—`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:i9,children:`OUTPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(ib,{text:e.output,title:`Copy output`})]}),(0,K.jsx)(`pre`,{className:Y(r9,`text-muted-foreground`),children:e.output?B5(e.output):`—`})]})})}var o9=e=>e==null?`?`:db(e);function s9({d:e}){let t=e.status,n=e.history??[];return t.reachable===!0||n.length>0?(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex flex-col gap-2.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:B7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Lb,{type:t.version?`success`:`default`,children:t.version?`v${t.version}`:`—`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground -mt-1 font-mono text-[11px]`,children:[t.boardName??`router`,t.architecture?` · ${t.architecture}`:``,t.cpuCount?` · ${t.cpuCount} cpu`:``,t.uptime?` · up ${t.uptime}`:``]}),(0,K.jsxs)(`div`,{className:`flex justify-around gap-3.5`,children:[(0,K.jsx)(S5,{value:t.cpuLoad,label:`CPU`,color:hb.cpu}),(0,K.jsx)(S5,{value:t.memUsedPct,label:`MEM`,color:hb.mem}),(0,K.jsx)(S5,{value:t.hddUsedPct,label:`DISK`,color:hb.disk})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`CPU load`}),(0,K.jsx)(x5,{id:`${e.name}-cpu`,values:n.map(e=>e.cpuLoad),color:hb.cpu,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Memory used`}),(0,K.jsx)(x5,{id:`${e.name}-mem`,values:n.map(e=>e.memUsedPct),color:hb.mem,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Probe latency`}),(0,K.jsx)(x5,{id:`${e.name}-lat`,values:n.map(e=>e.latencyMs),color:hb.latency,unit:`ms`})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground font-mono text-[11px]`,children:[`RAM `,o9(t.totalMemory&&t.freeMemory?t.totalMemory-t.freeMemory:void 0),` /`,` `,o9(t.totalMemory),` · free disk `,o9(t.freeHdd)]})]}):(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex min-h-[120px] flex-col justify-center gap-1.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:B7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`})]}),(0,K.jsx)(`p`,{className:`text-muted-foreground m-0 text-[11px]`,children:t.reachable===!1?`Offline — ${t.error??`unreachable`}`:e.mac?`Waiting for the first MAC-Telnet probe (these run every few minutes to avoid contending with tool calls)…`:`Waiting for the first health probe…`})]})}function c9(e,t){let n=(0,v.useRef)(e),r=(0,v.useRef)(t);n.current=e,r.current=t,(0,v.useEffect)(()=>{let e=!1,t=null,i=null,a=()=>{e||(i=new EventSource(pc(`/api/sse`)),i.addEventListener(`hello`,()=>r.current(`sse`)),i.addEventListener(`tool`,e=>{try{n.current(JSON.parse(e.data))}catch{}}),i.onerror=()=>{i&&i.readyState===EventSource.CONNECTING&&r.current(`off`)})},o=()=>{if(e)return;let i=location.protocol===`https:`?`wss`:`ws`;t=new WebSocket(pc(`${i}://${location.host}/api/stream`));let s=!1;t.onopen=()=>{s=!0,r.current(`ws`)},t.onerror=()=>t?.close(),t.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`event`&&t.event&&n.current(t.event)}catch{}},t.onclose=()=>{e||(r.current(`off`),s?setTimeout(o,2e3):a())}};return o(),()=>{e=!0,t?.close(),i?.close()}},[])}function l9(e){(0,v.useLayoutEffect)(()=>{let t=e.current;if(!t||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;document.documentElement.classList.add(`js-motion`);let n=new WeakSet,r=e=>{n.has(e)||(n.add(e),zi.set(e,{opacity:0,y:26}),G.create({trigger:e,start:`top 90%`,once:!0,onEnter:()=>zi.to(e,{opacity:1,y:0,duration:.7,ease:`power3.out`})}))},i=e=>{for(let t of e.querySelectorAll(`.reveal`))r(t)};i(t);let a=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&(e.matches(`.reveal`)&&r(e),i(e))});a.observe(t,{childList:!0,subtree:!0});let o=setInterval(()=>G.refresh(),1200),s=setTimeout(()=>clearInterval(o),7e3);return()=>{a.disconnect(),clearInterval(o),clearTimeout(s);for(let e of G.getAll())e.kill();document.documentElement.classList.remove(`js-motion`)}},[e])}function u9(e){return new Date(e).toLocaleString()}function d9(e){let t=Date.now()-e;return t<6e4?`just now`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}var f9={"in-sync":`success`,drifted:`warning`,unknown:`secondary`,"no-baseline":`secondary`},p9={"in-sync":`In Sync`,drifted:`Drifted`,unknown:`Unknown`,"no-baseline":`No Baseline`};function m9({device:e,onDone:t}){let[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/drift/history/${encodeURIComponent(e)}?limit=20`).then(e=>{r(e.snapshots),e.snapshots.length>0&&a(e.snapshots[0].id)})},[e]);let f=async()=>{if(!i)return;l(!0),d(``);let n=await hc(`/api/drift/baseline`,{device:e,snapshotId:i,label:o||void 0});l(!1),n.ok?t():d(n.error??`Failed`)};return n.length===0?(0,K.jsx)(`div`,{className:`p-2`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No snapshots for this device. Capture one with capture_config_snapshot first.`})}):(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 p-2`,children:[(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Baseline snapshot`,className:`min-w-[200px] flex-1`,options:n.map(e=>({value:e.id,label:`${e.id} — ${u9(e.ts)} — ${e.lines} lines${e.label?` "${e.label}"`:``}`}))}),(0,K.jsx)(Vb,{placeholder:`Label (optional)`,value:o,onChange:e=>s(e.target.value),className:`w-40`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void f(),disabled:c||!i,children:c?`Setting...`:`Set as Baseline`}),u&&(0,K.jsx)(`span`,{className:`text-destructive text-xs`,children:u})]})}function h9({unified:e}){return e?(0,K.jsx)(`pre`,{className:`m-0 max-h-[500px] overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal`,children:e.split(`
146
146
  `).map((e,t)=>{let n=`text-muted-foreground`;return e.startsWith(`+`)?n=`text-success bg-success/10`:e.startsWith(`-`)?n=`text-destructive bg-destructive/10`:e.startsWith(`@@`)?n=`text-brand`:e.startsWith(`/`)&&(n=`text-warning`),(0,K.jsx)(`div`,{className:Y(`px-1`,n),children:e||`\xA0`},t)})}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences.`})}function g9({sections:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.added+e.removed),1);return(0,K.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.slice(0,15).map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`w-[220px] truncate text-[11px] text-foreground`,title:e.path,children:e.path}),(0,K.jsxs)(`div`,{className:`flex h-3.5 flex-1 overflow-hidden rounded-[3px] bg-muted`,children:[(0,K.jsx)(`div`,{className:`h-full bg-success`,style:{width:`${e.added/t*100}%`}}),(0,K.jsx)(`div`,{className:`h-full bg-destructive`,style:{width:`${e.removed/t*100}%`}})]}),(0,K.jsxs)(`span`,{className:`min-w-[60px] text-[11px] text-muted-foreground`,children:[`+`,e.added,` -`,e.removed]})]},e.path))})}function _9({attributions:e}){return e.length===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No config-related log entries found.`}):(0,K.jsx)(`div`,{className:`max-h-[250px] overflow-auto`,children:(0,K.jsxs)(By,{className:`text-[11px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`User`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Section`}),(0,K.jsx)(Wy,{children:`Log`})]})}),(0,K.jsx)(Hy,{children:e.map((e,t)=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap`,children:e.timestamp??`—`}),(0,K.jsx)(Gy,{children:e.user??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-px text-[10px]`,children:e.action??`?`})}),(0,K.jsx)(Gy,{className:`max-w-[160px] truncate`,title:e.section,children:e.section}),(0,K.jsx)(Gy,{className:`max-w-[300px] truncate text-muted-foreground`,title:e.logLine,children:e.logLine})]},t))})]})})}function v9({device:e,onClose:t,onChanged:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),l=(0,v.useCallback)(async()=>{o(!0),c(``);try{let t=await mc(`/api/drift/check/${encodeURIComponent(e)}`);`error`in t?c(t.error):i(t)}catch(e){c(e instanceof Error?e.message:String(e))}o(!1)},[e]),u=async()=>{(await hc(`/api/drift/baseline`,{device:e,snapshotId:r?.baselineId,label:`promoted`})).error||n()},d=async()=>{await gc(`/api/drift/baseline/${encodeURIComponent(e)}`,{}),n()};return(0,K.jsxs)(tb,{title:`${e} — Drift Detail`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void l(),disabled:a,children:a?`Checking...`:`Check Now`}),(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>void d(),children:`Remove Baseline`}),(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:t,children:`Close`})]}),children:[s&&(0,K.jsx)(`div`,{className:`text-destructive`,children:s}),r&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-6 border-b border-border py-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(zb,{type:r.identical?`success`:`warning`}),(0,K.jsx)(`strong`,{children:r.identical?`In Sync`:`Drifted`})]}),!r.identical&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{children:[`Score: `,(0,K.jsx)(`strong`,{children:r.score}),`/100`]}),(0,K.jsxs)(`div`,{className:`text-success`,children:[`+`,r.summary.added]}),(0,K.jsxs)(`div`,{className:`text-destructive`,children:[`-`,r.summary.removed]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[r.summary.unchanged,` unchanged`]}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void u(),children:`Promote as Baseline`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground ml-auto text-[11px]`,children:[`Checked: `,u9(r.capturedAt)]})]}),r.sections.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Sections with drift`}),(0,K.jsx)(g9,{sections:r.sections})]}),r.attributions.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Change attribution`}),(0,K.jsx)(_9,{attributions:r.attributions})]}),!r.identical&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Unified diff`}),(0,K.jsx)(h9,{unified:r.unified})]})]}),!r&&!a&&!s&&(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`Click "Check Now" to run a live drift check against the golden baseline.`})]})}function y9(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(``),u=(0,v.useCallback)(async()=>{try{let[e,n]=await Promise.all([mc(`/api/drift/status`),mc(`/api/drift/baselines`)]);t(e.devices),r(n.baselines),l(``)}catch(e){l(e instanceof Error?e.message:String(e))}},[]);if((0,v.useEffect)(()=>{u();let e=setInterval(()=>void u(),15e3);return()=>clearInterval(e)},[u]),c&&e.length===0)return(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:c})});let d=e.filter(e=>e.status!==`no-baseline`);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[(0,K.jsx)(nb,{k:`Devices`,v:String(e.length)}),(0,K.jsx)(nb,{k:`With Baseline`,v:String(d.length)}),(0,K.jsx)(nb,{k:`In Sync`,v:String(e.filter(e=>e.status===`in-sync`).length)}),(0,K.jsx)(nb,{k:`Drifted`,v:String(e.filter(e=>e.status===`drifted`).length)})]}),(0,K.jsx)(tb,{title:`Fleet Drift Overview`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:e.map(e=>(0,K.jsxs)(`div`,{onClick:()=>{e.status!==`no-baseline`&&a(e.device)},className:Y(`rounded-lg border bg-card p-4 transition-colors`,i===e.device?`border-brand`:`border-border`,e.status===`no-baseline`?`cursor-default`:`cursor-pointer hover:border-brand/40`),children:[(0,K.jsxs)(`div`,{className:`mb-2 flex justify-between`,children:[(0,K.jsx)(`strong`,{className:`text-sm`,children:e.device}),(0,K.jsx)(Lb,{type:f9[e.status],children:p9[e.status]})]}),e.baseline&&(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[(0,K.jsxs)(`div`,{children:[`Baseline: `,d9(e.baseline.setAt)]}),e.baseline.label&&(0,K.jsxs)(`div`,{children:[`Label: `,e.baseline.label]})]}),e.status===`no-baseline`&&(0,K.jsx)(X,{size:`sm`,className:`mt-2`,onClick:t=>{t.stopPropagation(),s(e.device)},children:`Set Baseline`})]},e.device))})}),o&&(0,K.jsx)(tb,{title:`Set baseline for ${o}`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>s(null),children:`Cancel`}),children:(0,K.jsx)(m9,{device:o,onDone:()=>{s(null),u()}})}),i&&(0,K.jsx)(v9,{device:i,onClose:()=>a(null),onChanged:()=>{a(null),u()}}),n.length>0&&(0,K.jsx)(tb,{title:`Baseline Manager`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Device`}),(0,K.jsx)(Wy,{children:`Snapshot ID`}),(0,K.jsx)(Wy,{children:`Set At`}),(0,K.jsx)(Wy,{children:`Set By`}),(0,K.jsx)(Wy,{children:`Label`}),(0,K.jsx)(Wy,{children:`Size`}),(0,K.jsx)(Wy,{children:`SHA`}),(0,K.jsx)(Wy,{})]})}),(0,K.jsx)(Hy,{children:n.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:(0,K.jsx)(`strong`,{children:e.device})}),(0,K.jsx)(Gy,{className:`font-mono text-[11px]`,children:e.snapshotId}),(0,K.jsx)(Gy,{title:u9(e.setAt),children:d9(e.setAt)}),(0,K.jsx)(Gy,{children:e.setBy}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.snapshot?`${e.snapshot.lines} lines / ${e.snapshot.bytes} bytes`:`deleted`}),(0,K.jsx)(Gy,{className:`font-mono text-[10px]`,children:e.snapshot?.sha?.slice(0,8)??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>{gc(`/api/drift/baseline/${encodeURIComponent(e.device)}`,{}).then(()=>void u())},children:`Remove`})})]},e.device))})]})})}),e.length===0&&!c&&(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`No devices configured. Add devices to start using Drift Guard.`})})]})}function b9(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)&2147483647;return t%360}var x9=[`var(--entity-1)`,`var(--entity-2)`,`var(--entity-3)`,`var(--entity-4)`,`var(--entity-5)`,`var(--entity-6)`,`var(--entity-7)`,`var(--entity-8)`,`var(--entity-9)`,`var(--entity-10)`];function S9(e){return x9[Math.abs(b9(e))%x9.length]}var C9={create_entity:`Created entity`,delete_entity:`Deleted entity`,create_relation:`Created relation`,delete_relation:`Deleted relation`,add_observation:`Added observations`,delete_observation:`Deleted observations`};function w9(e,t,n,r){let i=n/2,a=r/2,o=e.map((t,o)=>{let s=2*Math.PI*o/Math.max(e.length,1),c=Math.min(n,r)*.3;return{id:t.name,label:t.name,type:t.entityType,x:i+c*Math.cos(s),y:a+c*Math.sin(s),vx:0,vy:0,obsCount:t.observations.length}}),s=t.map(e=>({source:e.from,target:e.to,label:e.relationType})),c=new Map(o.map(e=>[e.id,e])),l=.005,u=.85;for(let e=0;e<200;e++){for(let e=0;e<o.length;e++)for(let t=e+1;t<o.length;t++){let n=o[e],r=o[t],i=n.x-r.x,a=n.y-r.y,s=Math.sqrt(i*i+a*a)||1,c=3e3/(s*s);i=i/s*c,a=a/s*c,n.vx+=i,n.vy+=a,r.vx-=i,r.vy-=a}for(let e of s){let t=c.get(e.source),n=c.get(e.target);if(!t||!n)continue;let r=n.x-t.x,i=n.y-t.y,a=r*l,o=i*l;t.vx+=a,t.vy+=o,n.vx-=a,n.vy-=o}for(let e of o)e.vx+=(i-e.x)*.001,e.vy+=(a-e.y)*.001;for(let e of o){e.vx*=u,e.vy*=u,e.x+=e.vx,e.y+=e.vy;let t=Math.max(40,e.label.length*2.7+16);e.x=Math.max(t,Math.min(n-t,e.x)),e.y=Math.max(30,Math.min(r-30,e.y))}}return{nodes:o,edges:s}}function T9({graph:e}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(null),i=(0,v.useMemo)(()=>w9(e.entities,e.relations,700,460),[e.entities,e.relations]),a=(0,v.useMemo)(()=>new Map(i.nodes.map(e=>[e.id,e])),[i.nodes]);return e.entities.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground flex items-center justify-center`,style:{height:460},children:(0,K.jsx)(`p`,{children:`No entities yet — create some via the MCP tools.`})}):(0,K.jsxs)(`svg`,{ref:t,viewBox:`0 0 700 460`,style:{width:`100%`,height:`auto`,maxHeight:460,display:`block`},children:[(0,K.jsx)(`defs`,{children:(0,K.jsx)(`marker`,{id:`mem-arrow`,viewBox:`0 0 10 6`,refX:`10`,refY:`3`,markerWidth:`8`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,K.jsx)(`path`,{d:`M0 0 L10 3 L0 6Z`,fill:`var(--muted-foreground)`})})}),i.edges.map((e,t)=>{let r=a.get(e.source),i=a.get(e.target);if(!r||!i)return null;let o=n!=null&&(e.source===n||e.target===n),s=n!=null&&!o,c=i.x-r.x,l=i.y-r.y,u=Math.sqrt(c*c+l*l)||1,d=e=>{let t=e.label.length*5.4,n=13+Math.min(e.obsCount,6);return Math.max(n,t/2+12)},f=d(r)+4,p=d(i)+4,m=r.x+c/u*f,h=r.y+l/u*f,g=i.x-c/u*p,_=i.y-l/u*p,v=(m+g)/2,y=(h+_)/2;return(0,K.jsxs)(`g`,{opacity:s?.15:1,children:[(0,K.jsx)(`line`,{x1:m,y1:h,x2:g,y2:_,stroke:o?`var(--foreground)`:`var(--border)`,strokeWidth:o?1.8:1,markerEnd:`url(#mem-arrow)`}),(0,K.jsx)(`text`,{x:v,y:y-5,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`8`,style:{pointerEvents:`none`},children:e.label})]},t)}),i.nodes.map(e=>{let t=e.id===n,i=n!=null&&!t,a=S9(e.type),o=e.label,s=o.length*5.4,c=13+Math.min(e.obsCount,6),l=Math.max(c,s/2+12),u=c;return(0,K.jsxs)(`g`,{opacity:i?.25:1,style:{cursor:`pointer`},onClick:()=>r(t?null:e.id),children:[(0,K.jsx)(`rect`,{x:e.x-l,y:e.y-c,width:l*2,height:c*2,rx:u,ry:u,fill:a,fillOpacity:.15,stroke:t?`var(--foreground)`:a,strokeWidth:t?2:1.2}),(0,K.jsx)(`text`,{x:e.x,y:e.y+1,textAnchor:`middle`,dominantBaseline:`central`,fill:`var(--foreground)`,fontSize:`9`,fontWeight:t?600:400,style:{pointerEvents:`none`},children:o}),(0,K.jsx)(`text`,{x:e.x,y:e.y+c+11,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`7`,style:{pointerEvents:`none`},children:e.type})]},e.id)})]})}function E9({entity:e,relations:t,onClose:n,onDelete:r}){let i=t.filter(t=>t.to===e.name),a=t.filter(t=>t.from===e.name);return(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-5`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[(0,K.jsxs)(`h3`,{className:`m-0 flex items-center font-mono text-[15px]`,children:[(0,K.jsx)(zb,{color:S9(e.entityType),className:`mr-2 size-2.5`}),e.name]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,onClick:r,title:`Delete entity`,children:`Delete`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,onClick:n,children:`Close`})]}),(0,K.jsxs)(`p`,{className:`mt-0 mb-2 text-xs text-muted-foreground`,children:[`Type: `,(0,K.jsx)(`strong`,{children:e.entityType}),` · Created:`,` `,new Date(e.createdAt).toLocaleString(),` · Updated:`,` `,new Date(e.updatedAt).toLocaleString()]}),e.observations.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:[`Observations (`,e.observations.length,`)`]}),(0,K.jsx)(`ul`,{className:`m-0 pl-[18px] text-[13px]`,children:e.observations.map((e,t)=>(0,K.jsx)(`li`,{className:`mb-0.5`,children:e},t))})]}),(a.length>0||i.length>0)&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:`Relations`}),(0,K.jsxs)(`div`,{className:`text-[13px]`,children:[a.map((e,t)=>(0,K.jsxs)(`div`,{children:[`→ `,(0,K.jsx)(`strong`,{children:e.relationType}),` → `,e.to]},`o${t}`)),i.map((e,t)=>(0,K.jsxs)(`div`,{children:[`← `,(0,K.jsx)(`strong`,{children:e.relationType}),` ← `,e.from]},`i${t}`))]})]})]})}function D9({activity:e}){return e.length===0?(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:`No activity yet.`}):(0,K.jsx)(`div`,{className:`max-h-[280px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Subject`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:C9[e.action]??e.action}),(0,K.jsx)(Gy,{className:`max-w-[260px] truncate`,children:e.subject})]},e.id))})]})})}function O9({config:e,onSaved:t}){let[n,r]=(0,v.useState)(e.dbPath),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``);(0,v.useEffect)(()=>{r(e.dbPath)},[e.dbPath]);let c=(0,v.useCallback)(async()=>{a(!0),s(``);try{let e=await hc(`/api/memory/config`,{dbPath:n});e.ok?(s(`Saved`),t()):s(e.error??`Failed`)}catch(e){s(String(e))}finally{a(!1)}},[n,t]);return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1 block text-xs text-muted-foreground`,children:`Database path`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,value:n,onChange:e=>r(e.target.value),className:`flex-1 text-[13px]`}),(0,K.jsx)(X,{size:`sm`,onClick:c,disabled:i||n===e.dbPath,children:i?`Saving…`:`Save`})]}),o&&(0,K.jsx)(`p`,{className:Y(`mt-1 text-xs`,o===`Saved`?`text-success`:`text-destructive`),children:o}),e.stats&&(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-3`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(e.stats.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(e.stats.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(e.stats.observations)})]})]})}function k9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),m=(0,v.useCallback)(async()=>{try{let[e,n,i,o]=await Promise.all([mc(`/api/memory/graph`),mc(`/api/memory/stats`),mc(`/api/memory/config`),mc(`/api/memory/activity?limit=50`)]);t(e),r(n),a(i),s(o),p(``)}catch(e){p(String(e))}},[]);(0,v.useEffect)(()=>{m();let e=setInterval(()=>void m(),1e4);return()=>clearInterval(e)},[m]);let h=(0,v.useCallback)(async()=>{if(!u.trim()){m();return}try{let e=await mc(`/api/memory/search?q=${encodeURIComponent(u)}`);t(e)}catch(e){p(String(e))}},[u,m]),g=(0,v.useCallback)(async e=>{await gc(`/api/memory/entities`,{names:[e]}),l(null),m()},[m]);return f&&!e?(0,K.jsx)(tb,{title:`Knowledge Graph`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:f})}):(0,K.jsxs)(K.Fragment,{children:[n&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(n.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(n.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(n.observations)}),(0,K.jsx)(nb,{k:`Entity types`,v:String(n.entityTypes.length)}),(0,K.jsx)(nb,{k:`Relation types`,v:String(n.relationTypes.length)})]}),(0,K.jsx)(tb,{title:`Knowledge Graph`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,placeholder:`Search entities…`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>e.key===`Enter`&&h(),className:`w-[200px] text-xs`}),(0,K.jsx)(X,{size:`sm`,onClick:h,children:`Search`}),u&&(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>{d(``),m()},children:`Clear`})]}),children:e&&(0,K.jsx)(T9,{graph:e})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[(0,K.jsx)(tb,{title:`Entities`,children:e&&e.entities.length>0?(0,K.jsx)(`div`,{className:`max-h-[360px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`Type`}),(0,K.jsx)(Wy,{children:`Obs`}),(0,K.jsx)(Wy,{children:`Created`})]})}),(0,K.jsx)(Hy,{children:e.entities.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":c?.name===e.name?`selected`:void 0,onClick:()=>l(e),children:[(0,K.jsxs)(Gy,{children:[(0,K.jsx)(zb,{color:S9(e.entityType),className:`mr-1.5`}),e.name]}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:e.entityType}),(0,K.jsx)(Gy,{children:e.observations.length}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:fb(e.createdAt)})]},e.name))})]})}):(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:e?`No entities.`:`Loading…`})}),c&&e?(0,K.jsx)(E9,{entity:c,relations:e.relations,onClose:()=>l(null),onDelete:()=>g(c.name)}):(0,K.jsx)(tb,{title:`Activity Log`,children:(0,K.jsx)(D9,{activity:o})})]}),n&&(n.entityTypes.length>0||n.relationTypes.length>0)&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[n.entityTypes.length>0&&(0,K.jsx)(tb,{title:`Entity Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.entityTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl px-2.5 py-0.5 text-xs`,style:{background:`${S9(e.type)}22`,border:`1px solid ${S9(e.type)}44`},children:[(0,K.jsx)(zb,{color:S9(e.type)}),e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})}),n.relationTypes.length>0&&(0,K.jsx)(tb,{title:`Relation Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.relationTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl border border-border bg-muted px-2.5 py-0.5 text-xs`,children:[e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})})]}),i&&(0,K.jsx)(tb,{title:`Memory Configuration`,className:`reveal`,children:(0,K.jsx)(O9,{config:i,onSaved:m})})]})}var A9=e=>Y(`flex items-start gap-2.5 rounded-md border px-[11px] py-[9px] cursor-pointer select-none transition-colors`,e?`border-brand/50 bg-brand/10`:`border-border bg-card hover:border-brand/35`);function j9({m:e,busy:t,onToggle:n}){return(0,K.jsxs)(`label`,{className:A9(e.enabled),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:e.enabled,disabled:t,onChange:()=>n(e.slug,!e.enabled)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:[e.label,(0,K.jsx)(`code`,{className:`rounded border border-border bg-background px-[5px] py-px font-mono text-[10px] text-muted-foreground`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`whitespace-nowrap pt-px font-mono text-[10px] text-muted-foreground`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]})}function M9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(new Set),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=(0,v.useCallback)(()=>{mc(`/api/modules`).then(e=>{t(e),e.appViews!==void 0&&l(e.appViews)}).catch(()=>a(`could not load modules`))},[]);(0,v.useEffect)(()=>f(),[f]);let p=e=>t(t=>t?{...t,...e}:e),m=(0,v.useCallback)(async(e,n)=>{r(t=>new Set(t).add(e)),t(t=>t&&{...t,modules:t.modules.map(t=>t.slug===e?{...t,enabled:n}:t)});let i=await hc(`/api/modules/toggle`,{slug:e,enabled:n}).catch(()=>({error:`request failed`}));if(r(t=>{let n=new Set(t);return n.delete(e),n}),i.error||i.ok===!1){a(i.error??`toggle failed`),f();return}p(i);let o=i.persisted?`saved to config`:`applied live (not saved)`,s=i.warning?` ⚠ ${i.warning}`:``;a(`${e} ${n?`enabled`:`disabled`} — ${o}. Reconnect the MCP client (or restart the server) for the tool list to update.${s}`)},[f]),h=(0,v.useCallback)(async(e,t)=>{for(let n of e)await m(n,t)},[m]),g=(0,v.useCallback)(async e=>{d(!0),l(e);let t=await hc(`/api/modules/app-views`,{enabled:e}).catch(()=>({error:`request failed`}));if(d(!1),`error`in t&&t.error){a(t.error),l(!e);return}`appViews`in t&&t.appViews!==void 0&&l(t.appViews);let n=`persisted`in t&&t.persisted?`saved to config`:`applied live (not saved)`,r=`warning`in t&&t.warning?` — ${t.warning}`:``;a(`App views ${e?`enabled`:`disabled`} — ${n}. Restart the server for the change to take effect.${r}`)},[]),_=(0,v.useMemo)(()=>{if(!e)return[];let t=o.trim().toLowerCase(),n=e=>!t||e.slug.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)||e.description.toLowerCase().includes(t),r=new Map;for(let t of e.modules){if(!n(t))continue;let e=r.get(t.group)??[];e.push(t),r.set(t.group,e)}return[...r.entries()].map(([e,t])=>({group:e,modules:t}))},[e,o]);if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading modules…`});let y=_.reduce((e,t)=>e+t.modules.length,0);return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Tool modules`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.enabledModules,`/`,e.total,` modules · `,e.enabledTools,`/`,e.totalTools,` `,`tools exposed`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:f,children:`Refresh`})]}),children:[(0,K.jsxs)(`label`,{className:Y(A9(c),`mb-2.5`),title:`Emit MCP App view metadata (_meta.ui) on read tools`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:c,disabled:u,onChange:()=>void g(!c)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsx)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:`MCP App Views`}),(0,K.jsxs)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:[`When on, read tools emit interactive table/detail widgets via `,(0,K.jsx)(`code`,{children:`_meta.ui`}),`. Disable to keep the LLM context lean. Requires server restart.`]})]})]}),(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-[5px]`,children:[`writes to: `,(0,K.jsx)(`code`,{children:e.source?.path??`config file`})]}),(0,K.jsx)(`span`,{className:`inline-flex items-center gap-[5px]`,children:e.hasAllowList?`allow-list active`:`all modules on by default`})]}),(0,K.jsxs)(`p`,{className:`mb-3 text-muted-foreground text-xs`,children:[`Toggle a module to expose or hide all of its tools. Disabling adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.disabledModules`}),` in your config file; enabling removes it (or adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.enabledModules`}),` when an allow-list is in force). Trimming the surface below ~150–200 tools makes every remaining tool reliably findable by the MCP client. The client must reconnect for changes to take effect.`]}),(0,K.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{placeholder:`Filter modules by name, slug, group or description…`,value:o,onChange:e=>s(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>!e.enabled).map(e=>e.slug),!0),children:`Enable all`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>e.enabled).map(e=>e.slug),!1),children:`Disable all`})]}),i&&(0,K.jsx)(`div`,{className:`mt-3 font-mono text-xs text-muted-foreground`,children:i}),y===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No modules match “`,o,`”.`]}):(0,K.jsx)(`div`,{className:`mt-3 flex flex-col gap-[18px]`,children:_.map(({group:e,modules:t})=>{let r=t.filter(e=>e.enabled).length,i=t.map(e=>e.slug);return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5 border-b border-border pb-1.5`,children:[(0,K.jsx)(`h3`,{className:`m-0 text-[13px] font-semibold text-foreground`,children:e}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[r,`/`,t.length,` on`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?!n.enabled:!1}),!0),children:`Enable group`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?n.enabled:!1}),!1),children:`Disable group`})]}),(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(min(100%,360px),1fr))] gap-2`,children:t.map(e=>(0,K.jsx)(j9,{m:e,busy:n.has(e.slug),onToggle:(e,t)=>void m(e,t)},e.slug))})]},e)})})]})})}var Tee={TCP:`var(--chart-1)`,UDP:`var(--chart-2)`,ICMP:`var(--chart-3)`,ICMPv6:`var(--chart-3)`,ARP:`var(--chart-4)`,IPv6:`var(--chart-5)`},N9=e=>e&&Tee[e]||`var(--muted-foreground)`;function Eee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>void mc(`/api/capture/packets?limit=150`).then(t).catch(()=>{});e();let n=setInterval(e,1500);return()=>clearInterval(n)},[]);let i=e?.stats,a=e?.packets??[],o=async()=>{r(!0),await hc(`/api/capture/stop`,{}).catch(()=>{}),r(!1)};if(!i||!i.running&&i.packets===0)return(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[13px] leading-relaxed`,children:[`No capture running. Start one with the`,` `,(0,K.jsx)(`code`,{className:`text-brand font-mono`,children:`start_packet_capture`}),` tool — point the device's TZSP stream at this host — and decoded packets stream in here live.`]});let s=Math.max(1,...Object.values(i.protocols));return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(zb,{color:i.running?`var(--success)`:`var(--muted-foreground)`,pulse:i.running}),(0,K.jsx)(`b`,{children:i.running?`capturing`:`stopped`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`UDP `,i.port]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(i.packets),` pkts · `,db(i.bytes)]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`a`,{className:`bg-card hover:bg-accent inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs whitespace-nowrap`,href:pc(`/api/capture/pcap`),download:`capture.pcap`,children:[(0,K.jsx)(Lc,{className:`size-3.5`}),` pcap`]}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,icon:(0,K.jsx)(tl,{className:`size-3.5`}),onClick:()=>void o(),disabled:n||!i.running,children:`Stop`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-[220px_1fr] gap-3 max-[720px]:grid-cols-1`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px] tracking-[0.05em] uppercase`,children:`Protocols`}),Object.entries(i.protocols).map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[52px_1fr_34px] items-center gap-1.5 font-mono text-[11px]`,children:[(0,K.jsx)(`span`,{style:{color:N9(e)},children:e}),(0,K.jsx)(`span`,{className:`bg-muted h-2 overflow-hidden rounded-full`,children:(0,K.jsx)(`i`,{className:`block h-full rounded-full`,style:{width:`${t/s*100}%`,background:N9(e)}})}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:t})]},e)),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-3 text-[11px] tracking-[0.05em] uppercase`,children:`Top talkers`}),i.topTalkers.length===0&&(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`—`}),i.topTalkers.map(e=>(0,K.jsxs)(`div`,{className:`text-muted-foreground flex justify-between font-mono text-[11px] [&>b]:text-foreground`,children:[(0,K.jsx)(`span`,{children:e.addr}),(0,K.jsx)(`b`,{children:e.count})]},e.addr))]}),(0,K.jsx)(`div`,{className:`bg-background h-[360px] overflow-y-auto rounded-md border font-mono text-[11px]/[1.6]`,children:a.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground p-2.5 text-[11px]`,children:`waiting for packets…`}):a.map((e,t)=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[90px_64px_48px_1fr] gap-2 overflow-hidden px-2.5 py-px whitespace-nowrap odd:bg-card/40`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(`span`,{className:`font-semibold`,style:{color:N9(e.protocol)},children:e.protocol??e.ethType}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:e.len}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-ellipsis`,children:e.info})]},t))})]})]})}function Dee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=(0,v.useCallback)(()=>{mc(`/api/s3/list`).then(t).catch(()=>t({configured:!1,objects:[]}))},[]);(0,v.useEffect)(()=>c(),[c]);let l=e=>{mc(`/api/s3/presign?key=${encodeURIComponent(e)}`).then(e=>{e.url?window.open(e.url,`_blank`,`noopener`):s(`could not generate download link`)}).catch(()=>s(`could not generate download link`))},u=async e=>{a(e);let t=await hc(`/api/s3/delete`,{key:e}).catch(()=>({error:`request failed`}));a(null),r(null),t.ok?(s(`Deleted ${e}`),c()):s(t.error??`delete failed`)};return e?e.configured?(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`S3 backups`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.target,` · `,e.objects.length,` object`,e.objects.length===1?``:`s`,e.truncated?` (truncated)`:``]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:c,children:`Refresh`})]}),children:[o&&(0,K.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:o}),e.objects.length===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No objects in the bucket. Upload one with the `,(0,K.jsx)(`code`,{children:`upload_backup_to_s3`}),` tool.`]}):(0,K.jsxs)(By,{className:`font-mono`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`key`}),(0,K.jsx)(Wy,{className:`text-right tabular-nums`,children:`size`}),(0,K.jsx)(Wy,{children:`modified`}),(0,K.jsx)(Wy,{className:`w-[200px]`,children:`actions`})]})}),(0,K.jsx)(Hy,{children:e.objects.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:e.key}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.size)}),(0,K.jsx)(Gy,{children:e.lastModified?new Date(e.lastModified).toLocaleString(void 0,{hour12:!1}):`—`}),(0,K.jsxs)(Gy,{className:`flex gap-1.5`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Lc,{}),onClick:()=>l(e.key),children:`Download`}),n===e.key?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,icon:(0,K.jsx)(kc,{}),disabled:i===e.key,onClick:()=>void u(e.key),children:`Confirm`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(il,{}),onClick:()=>r(e.key),children:`Delete`})]})]},e.key))})]})]})}):(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(Pc,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`S3 is not configured`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Add an `,(0,K.jsx)(`code`,{children:`s3`}),` block (bucket + credentials) to your config to manage backup objects here.`]})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading S3 objects…`})}function Oee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),u=(0,v.useCallback)(()=>{mc(`/api/snapshots`).then(e=>t(e.snapshots)).catch(()=>t([]))},[]);(0,v.useEffect)(()=>u(),[u]);let d=e=>{mc(`/api/snapshot/${encodeURIComponent(e)}`).then(s).catch(()=>{})},f=()=>{!n||!i||hc(`/api/snapshots/diff`,{from:n,to:i}).then(l).catch(()=>{})};if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading snapshots…`});if(e.length===0)return(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(zc,{className:`size-7 text-muted-foreground`}),(0,K.jsx)(`p`,{className:`font-semibold text-foreground`,children:`No config snapshots yet`}),(0,K.jsxs)(`p`,{className:`max-w-[460px] text-xs text-muted-foreground`,children:[`Capture one with the `,(0,K.jsx)(`code`,{children:`capture_config_snapshot`}),` tool — then time-travel diff any two here.`]})]});let p=e.map(e=>({value:e.id,label:`${e.device} · ${e.label??e.id} · ${fb(e.ts)}`}));return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Config snapshots`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(Zc,{}),onClick:u,children:`Refresh`}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Diff from snapshot`,options:[{value:``,label:`diff from…`},...p]}),(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Diff to snapshot`,options:[{value:``,label:`to…`},...p]}),(0,K.jsx)(X,{size:`sm`,onClick:f,disabled:!n||!i,children:`Diff →`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.length,` snapshots`]})]}),(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{className:`sticky top-0 z-10 bg-card`,children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`captured`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{children:`label`}),(0,K.jsx)(Wy,{children:`version`}),(0,K.jsx)(Wy,{className:`text-right`,children:`lines`}),(0,K.jsx)(Wy,{className:`text-right`,children:`size`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":o?.id===e.id?`selected`:void 0,onClick:()=>d(e.id),children:[(0,K.jsx)(Gy,{children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.device}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.rosVersion??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:e.lines}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.bytes)}),(0,K.jsx)(Gy,{className:`max-w-[320px] truncate text-muted-foreground`,children:`view export →`})]},e.id))})]})})]}),c&&(0,K.jsx)(tb,{title:`Time-travel diff`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:c.summary.changed?`+${c.summary.added} / -${c.summary.removed}`:`identical`}),children:(0,K.jsx)(`pre`,{className:`m-0 max-h-80 overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal text-muted-foreground`,children:(c.unified||`(identical)`).split(`
147
147
  `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})}),o&&(0,K.jsx)(tb,{title:`Snapshot · ${o.label??o.id}`,className:`reveal`,extra:(0,K.jsx)(X,{type:`secondary`,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:()=>s(null),children:`Close`}),children:(0,K.jsx)(`pre`,{className:`m-0 overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,style:{maxHeight:460},children:o.body||`(empty)`})})]})}function P9({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,K.jsx)(j_,{"data-slot":`separator`,decorative:n,orientation:t,className:Y(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var F9=` hub`;function I9(e){let t=e;for(;t>Math.PI;)t-=Math.PI*2;for(;t<-Math.PI;)t+=Math.PI*2;return t}function kee(e,t,n){let r=new Map,i=new Map;r.set(F9,{x:450,y:310});let a=e.length<=1?110:Math.min(170,96+e.length*7),o=a+(e.length<=1?190:155);e.forEach((t,n)=>{let o=e.length===1?-Math.PI/2:n/e.length*Math.PI*2-Math.PI/2;i.set(t.id,o),r.set(t.id,{x:450+a*Math.cos(o),y:310+a*Math.sin(o)})});let s=new Map,c=new Map;for(let e of t){let t=n.get(e.id)??``,r=i.get(t)??-Math.PI/2,a=s.get(t)??0;s.set(t,a+1),c.set(e.id,r+Math.ceil(a/2)*(a%2==0?1:-1)*.34)}for(let e=0;e<10;e++)for(let e of t){let r=0;for(let n of t){if(e.id===n.id)continue;let t=I9((c.get(e.id)??0)-(c.get(n.id)??0)),i=Math.abs(t)*o;i<1?r+=e.id<n.id?.02:-.02:i<120&&(r+=Math.sign(t)*2600/(i*i*o))}let a=I9((i.get(n.get(e.id)??``)??-Math.PI/2)-(c.get(e.id)??0));c.set(e.id,(c.get(e.id)??0)+r+a*.06)}for(let e of t){let t=c.get(e.id)??0;r.set(e.id,{x:450+o*Math.cos(t),y:310+o*Math.sin(t)})}return{pos:r,rInner:a,rOuter:o}}function L9(e,t){let n=2*Math.PI*e,r=Math.min(100,Math.max(0,t??0))/100*n;return`${r} ${n-r}`}function Aee(e,t=7){let n=t*Math.PI/180,r=e*Math.cos(n),i=e*Math.sin(n);return`M 450 310 L ${450+r} ${310-i} A ${e} ${e} 0 0 1 ${450+r} ${310+i} Z`}function R9(e){return e==null?`var(--muted-foreground)`:e>=85?`var(--destructive)`:e>=60?`var(--warning)`:`var(--chart-2)`}function jee(e){return e.reachable===!0?`var(--chart-2)`:e.reachable===!1?`var(--destructive)`:e.kind===`device`?`var(--muted-foreground)`:`var(--border)`}function Mee({topo:e,onOnboard:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)({x:0,y:0,k:1}),[f,p]=(0,v.useState)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`device`),[e.nodes]),_=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`neighbor`),[e.nodes]),y=(0,v.useMemo)(()=>{let t=new Map,n=new Set(_.map(e=>e.id));for(let r of e.edges)n.has(r.to)&&!t.has(r.to)&&t.set(r.to,r.from);return t},[e.edges,_]),{pos:b,rInner:x,rOuter:S}=(0,v.useMemo)(()=>kee(g,_,y),[g,_,y]),C=(0,v.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e])),[e.nodes]),w=n?C.get(n):null,T=(0,v.useMemo)(()=>{let t=new Map,n=(e,n)=>{t.has(e)||t.set(e,new Set([e])),t.get(e).add(n)};for(let e of g)n(e.id,F9),n(F9,e.id);for(let t of e.edges)n(t.from,t.to),n(t.to,t.from);return t},[e.edges,g]),E=o.trim().toLowerCase(),D=(0,v.useCallback)(e=>c&&!e.onboardable?!1:E?[e.label,e.id,e.ip,e.mac,e.board,e.identity].filter(e=>!!e).some(e=>e.toLowerCase().includes(E)):!0,[E,c]),O=i?T.get(i):null,k=e=>{if(O)return!O.has(e);if(e===` hub`)return!1;let t=C.get(e);return t?!D(t):!1},A=e=>{let t=h.current?.getBoundingClientRect();if(!t)return;let n=(e.clientX-t.left)/t.width*900,r=(e.clientY-t.top)/t.height*620;d(t=>{let i=Math.min(3,Math.max(.5,t.k*(e.deltaY<0?1.12:1/1.12))),a=i/t.k;return{k:i,x:n-(n-t.x)*a,y:r-(r-t.y)*a}})},j=e=>{m.current={px:e.clientX,py:e.clientY,ox:u.x,oy:u.y},p(!0)},M=e=>{let t=m.current,n=h.current?.getBoundingClientRect();if(!t||!n)return;let r=900/n.width*(e.clientX-t.px),i=620/n.height*(e.clientY-t.py);d(e=>({...e,x:t.ox+r,y:t.oy+i}))},N=()=>{m.current=null,p(!1)},P=e=>d(t=>{let n=Math.min(3,Math.max(.5,t.k*e)),r=n/t.k;return{k:n,x:450-(450-t.x)*r,y:310-(310-t.y)*r}}),F=g.map(e=>({from:F9,to:e.id,interface:void 0}));return(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`relative min-w-[200px] flex-1`,children:[(0,K.jsx)(Qc,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2`}),(0,K.jsx)(Vb,{className:`pl-8`,type:`search`,placeholder:`Filter by name, identity, IP, MAC or board…`,value:o,onChange:e=>s(e.target.value)})]}),(0,K.jsxs)(X,{size:`sm`,ghost:!0,type:c?`accent`:`default`,onClick:()=>l(e=>!e),title:`Dim everything except neighbours that can be onboarded`,icon:(0,K.jsx)(Yc,{}),children:[`Onboardable`,e.stats.onboardable>0?` (${e.stats.onboardable})`:``]}),(0,K.jsx)(P9,{orientation:`vertical`,className:`h-6`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1/1.25),"aria-label":`Zoom out`,icon:(0,K.jsx)(Hc,{})}),(0,K.jsxs)(`span`,{className:`text-muted-foreground w-11 text-center font-mono text-[11px] tabular-nums`,children:[Math.round(u.k*100),`%`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1.25),"aria-label":`Zoom in`,icon:(0,K.jsx)(Jc,{})}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>d({x:0,y:0,k:1}),title:`Reset view`,icon:(0,K.jsx)(Ic,{}),children:`Reset`})]}),(0,K.jsxs)(`div`,{className:`bg-card relative overflow-hidden rounded-xl border`,children:[(0,K.jsxs)(`svg`,{ref:h,viewBox:`0 0 900 620`,width:`100%`,height:560,preserveAspectRatio:`xMidYMid meet`,className:Y(`block w-full touch-none select-none`,f?`cursor-grabbing`:`cursor-grab`),onWheel:A,onPointerDown:j,onPointerMove:M,onPointerUp:N,onPointerLeave:N,onClick:()=>r(null),style:{background:`radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 62%)`},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`topo-beam`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--brand)`,stopOpacity:`0.3`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--brand)`,stopOpacity:`0`})]}),(0,K.jsxs)(`radialGradient`,{id:`topo-hub`,cx:`0.5`,cy:`0.35`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]})]}),(0,K.jsxs)(`g`,{transform:`translate(${u.x},${u.y}) scale(${u.k})`,children:[(0,K.jsx)(`g`,{className:`topo-ring`,children:[x,S,S+62].map(e=>(0,K.jsx)(`circle`,{cx:450,cy:310,r:e,fill:`none`,className:`stroke-border/70`,strokeDasharray:`2 8`},e))}),(0,K.jsx)(`g`,{className:`topo-sweep`,style:{transformOrigin:`450px 310px`},children:(0,K.jsx)(`path`,{d:Aee(S+62),fill:`url(#topo-beam)`})}),[...F,...e.edges].map((t,n)=>{let r=b.get(t.from),i=b.get(t.to);if(!r||!i)return null;let a=C.get(t.to)?.kind===`neighbor`,o=k(t.from)||k(t.to),s=-(i.y-r.y),c=i.x-r.x,l=Math.hypot(s,c)||1,u=a?16:8,d=(r.x+i.x)/2+s/l*u,f=(r.y+i.y)/2+c/l*u;return(0,K.jsx)(`path`,{d:`M ${r.x} ${r.y} Q ${d} ${f} ${i.x} ${i.y}`,fill:`none`,strokeWidth:a?1.2:1.6,strokeDasharray:a?`4 4`:`6 10`,className:Y(`transition-opacity`,a?`stroke-brand/55`:`topo-flow stroke-chart-2/70`,o&&`opacity-15`),children:(0,K.jsxs)(`title`,{children:[t.from===` hub`?e.server:t.from,` → `,t.to,t.interface?` (${t.interface})`:``]})},`e-${n}`)}),(0,K.jsxs)(`g`,{className:Y(`transition-opacity`,O&&!O.has(` hub`)&&`opacity-15`),onMouseEnter:()=>a(F9),onMouseLeave:()=>a(null),children:[(0,K.jsx)(`circle`,{cx:450,cy:310,r:40,className:`fill-brand/15`}),(0,K.jsx)(`circle`,{cx:450,cy:310,r:27,fill:`url(#topo-hub)`,className:`stroke-border`}),(0,K.jsx)($c,{x:441,y:295,width:18,height:18,className:`stroke-background pointer-events-none`}),(0,K.jsx)(`text`,{x:450,y:326,textAnchor:`middle`,className:`fill-background pointer-events-none font-mono text-[8px] font-bold`,children:`MCP`}),(0,K.jsx)(`text`,{x:450,y:368,textAnchor:`middle`,className:`fill-muted-foreground pointer-events-none font-mono text-[10px]`,children:e.server})]}),e.nodes.map(e=>{let t=b.get(e.id);if(!t)return null;let i=e.kind===`device`,o=n===e.id,s=k(e.id),c=jee(e),l=i?26:15;return(0,K.jsxs)(`g`,{transform:`translate(${t.x},${t.y})`,className:Y(`cursor-pointer transition-opacity`,s&&`opacity-15`),onMouseEnter:()=>a(e.id),onMouseLeave:()=>a(null),onClick:t=>{t.stopPropagation(),r(t=>t===e.id?null:e.id)},children:[o&&(0,K.jsx)(`circle`,{r:l+8,className:`topo-halo stroke-brand fill-none`,strokeWidth:2}),i?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{r:l+7,className:`stroke-border/60 fill-none`,strokeWidth:3}),(0,K.jsx)(`circle`,{r:l+7,fill:`none`,strokeWidth:3,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.cpuLoad)},strokeDasharray:L9(l+7,e.cpuLoad)}),(0,K.jsx)(`circle`,{r:l+2,className:`stroke-border/40 fill-none`,strokeWidth:2}),(0,K.jsx)(`circle`,{r:l+2,fill:`none`,strokeWidth:2,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.memUsedPct)},strokeDasharray:L9(l+2,e.memUsedPct)}),(0,K.jsx)(`circle`,{r:l-4,className:`fill-muted`,style:{stroke:c},strokeWidth:1.6}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:3,className:`fill-foreground pointer-events-none font-mono text-[9px] font-bold`,children:(e.label||e.id).slice(0,4).toUpperCase()})]}):(0,K.jsxs)(K.Fragment,{children:[e.onboardable&&(0,K.jsx)(`circle`,{r:l+5,className:`topo-pulse fill-brand/25`}),(0,K.jsx)(`rect`,{x:-l*.72,y:-l*.72,width:l*1.44,height:l*1.44,rx:3,transform:`rotate(45)`,className:`fill-card`,style:{stroke:c},strokeWidth:1.4,strokeDasharray:e.onboardable?`3 2`:void 0}),e.onboardable&&(0,K.jsx)(Jc,{x:-5,y:-5,width:10,height:10,className:`stroke-brand pointer-events-none`})]}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+(i?22:18),className:`fill-foreground pointer-events-none font-mono text-[10px]`,children:(e.label||e.id).slice(0,18)}),i&&(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+34,className:`fill-muted-foreground pointer-events-none font-mono text-[9px]`,children:e.ip||e.board||``})]},e.id)})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute top-3 left-3 flex flex-col gap-1 font-mono text-[10px]`,children:[(0,K.jsx)(`span`,{className:`text-foreground text-[11px] font-semibold`,children:`Layer-2 fabric`}),(0,K.jsxs)(`span`,{children:[e.stats.devices,` managed · `,e.stats.neighbors,` discovered`]}),e.stats.onboardable>0&&(0,K.jsxs)(`span`,{className:`text-brand`,children:[e.stats.onboardable,` awaiting onboard`]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute right-3 bottom-3 flex flex-col items-end gap-1 font-mono text-[10px]`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-chart-2 inline-block size-2 rounded-full`}),` online`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-destructive inline-block size-2 rounded-full`}),` offline`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`border-border inline-block size-2 rotate-45 border`}),` neighbour`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-brand/40 inline-block size-2 rounded-full`}),` onboardable`]})]})]}),w&&(0,K.jsx)(Nee,{node:w,onClose:()=>r(null),onOnboard:t})]})}function Nee({node:e,onClose:t,onOnboard:n}){let r=e.suggestedConfig?JSON.stringify({[e.suggestedConfig.name]:z9(e.suggestedConfig)},null,2):null,i=[[`identity`,e.identity],[`address`,e.ip],[`mac`,e.mac],[`board`,e.board],[`platform`,e.platform],[`version`,e.version],[`uptime`,e.uptime]].filter(e=>!!e[1]);return(0,K.jsxs)(`div`,{className:`bg-card rounded-xl border p-4`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`strong`,{className:`font-mono text-sm`,children:e.label||e.id}),(0,K.jsx)(xb,{variant:e.kind===`device`?`secondary`:`outline`,children:e.kind}),e.onboardable&&(0,K.jsx)(xb,{className:`bg-brand text-brand-foreground`,children:`onboardable`}),e.reachable===!1&&(0,K.jsx)(xb,{variant:`destructive`,children:`offline`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{ghost:!0,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:t,"aria-label":`Close`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 font-mono text-[11px]`,children:i.length===0?(0,K.jsx)(`span`,{children:`no details advertised`}):i.map(([e,t])=>(0,K.jsxs)(v.Fragment,{children:[(0,K.jsx)(`span`,{children:e}),(0,K.jsx)(`span`,{className:`text-foreground break-all`,children:t})]},e))}),e.kind===`device`&&(e.cpuLoad!=null||e.memUsedPct!=null)&&(0,K.jsxs)(`div`,{className:`mt-3 flex gap-4 font-mono text-[11px]`,children:[e.cpuLoad!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.cpuLoad)},children:[`cpu `,e.cpuLoad,`%`]}),e.memUsedPct!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.memUsedPct)},children:[`mem `,e.memUsedPct,`%`]})]}),r&&e.suggestedConfig&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(P9,{className:`my-3`}),(0,K.jsx)(`p`,{className:`text-muted-foreground mb-1.5 text-[11px]`,children:`Not managed yet — add this to your device config to onboard it:`}),(0,K.jsx)(`pre`,{className:`bg-background text-foreground m-0 mb-2 overflow-x-auto rounded-md border px-2.5 py-2 font-mono text-[11px]/[1.5] whitespace-pre`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(ib,{title:`Copy config stub`,label:`Copy config stub`,text:r}),n&&(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>n(e.suggestedConfig.name,z9(e.suggestedConfig)),children:`Add to config →`})]})]})]})}function z9(e){let t={port:e.port,username:e.username};return e.host&&(t.host=e.host),e.mac&&(t.mac=e.mac),t}function B9(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}function Pee(e){return!e||!e.pooled?`var(--muted-foreground)`:e.dead?`var(--destructive)`:e.inflight>0?`var(--chart-1)`:`var(--success)`}function Fee(e){return!e||!e.pooled?`no connection`:e.dead?`reconnecting`:e.inflight>0?`${e.inflight} inflight`:`ready`}function Iee({device:e}){let t=e.pool,n=!t||!t.pooled?`border-dashed opacity-60`:t.dead?`border-destructive/50`:t.inflight>0?`border-chart-1/50`:`border-success/35`,r=!!t&&t.pooled&&t.inflight>0,i=Pee(t),a=!t||!t.pooled?0:t.inflight>0?Math.min(8+t.inflight*15,100):100;return(0,K.jsxs)(`div`,{className:Y(`bg-card rounded-lg border px-3 py-2.5 transition-colors hover:border-muted-foreground/40`,n),children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:i}}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-xs font-semibold text-ellipsis whitespace-nowrap`,children:e.name}),(0,K.jsx)(`span`,{className:`ml-auto text-[10px] font-semibold tracking-[0.04em] uppercase`,style:{color:i},children:Fee(t)})]}),(0,K.jsxs)(`div`,{className:`bg-muted relative h-1.5 overflow-hidden rounded-[3px]`,children:[(0,K.jsx)(`div`,{className:Y(`h-full rounded-[3px] opacity-65 transition-[width] duration-[400ms]`,r&&`animate-pulse`),style:{width:`${a}%`,background:i}}),t&&t.pooled&&t.inflight>0&&(0,K.jsxs)(`span`,{className:`text-foreground absolute -top-px right-1 text-[8px] leading-[8px] font-bold [text-shadow:0_0_3px_rgba(0,0,0,0.6)]`,children:[t.inflight,` ch`]})]})]})}function V9({k:e,v:t,sub:n}){return(0,K.jsx)(nb,{k:e,v:t,sub:n,cls:`min-w-[100px]`})}function Lee({devices:e,poolPayload:t}){let n=e.filter(e=>e.pool!==null&&e.pool!==void 0);if(!(t?.enabled??n.length>0)&&n.length===0)return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground my-1 text-[13px]`,children:[`Connection pooling is disabled. Enable it with`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`--ssh-keep-alive true`}),` or`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`MIKROTIK_SSH__KEEP_ALIVE=true`}),` to keep persistent SSH connections across tool calls.`]})]});let r=t?.aggregate,i=t?.config;return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),r&&(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:[(0,K.jsx)(V9,{k:`Connections`,v:String(r.totalConnections)}),(0,K.jsx)(V9,{k:`Inflight`,v:String(r.totalInflight),sub:`channels`}),(0,K.jsx)(V9,{k:`Idle`,v:String(r.totalIdle)}),(0,K.jsx)(V9,{k:`Busy`,v:String(r.totalBusy)}),i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(V9,{k:`Keepalive`,v:B9(i.keepAliveInterval)}),(0,K.jsx)(V9,{k:`Idle timeout`,v:B9(i.idleTimeout)})]})]}),n.length>0&&(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2`,children:n.map(e=>(0,K.jsx)(Iee,{device:e},e.name))})]})}function Ree({...e}){return(0,K.jsx)(cf,{"data-slot":`dialog`,...e})}function zee({...e}){return(0,K.jsx)(mf,{"data-slot":`dialog-portal`,...e})}function Bee({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`dialog-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Vee({className:e,children:t,showCloseButton:n=!0,...r}){return(0,K.jsxs)(zee,{"data-slot":`dialog-portal`,children:[(0,K.jsx)(Bee,{}),(0,K.jsxs)(bf,{"data-slot":`dialog-content`,className:Y(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,K.jsxs)(kf,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,K.jsx)(cl,{}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Hee({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`dialog-header`,className:Y(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function Uee({className:e,showCloseButton:t=!1,children:n,...r}){return(0,K.jsxs)(`div`,{"data-slot":`dialog-footer`,className:Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,K.jsx)(kf,{asChild:!0,children:(0,K.jsx)(Xy,{variant:`outline`,children:`Close`})})]})}function Wee({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`dialog-title`,className:Y(`text-lg leading-none font-semibold`,e),...t})}function Gee({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`dialog-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var H9=` {0,3}`;function Kee(e){let t=e.replace(/\r\n?/g,`
@@ -152,10 +152,10 @@ ${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:n
152
152
  <li>`),t=t.replace(/((?:<li>.*<\/li>\n?)+)/g,e=>`<ul>${e.trimEnd()}</ul>`),t=t.replace(/<li>\[x\] (.+?)<\/li>/gi,`<li class="wn-task done"><span class="wn-check">&#10003;</span> $1</li>`),t=t.replace(/<li>\[ \] (.+?)<\/li>/g,`<li class="wn-task"><span class="wn-check">&#9744;</span> $1</li>`);let i=/^<\/?(h[2-5]|ul|ol|li|pre|blockquote|hr|div|table|img)/;return t=t.split(`
153
153
  `).map(e=>{let t=e.trim();return t?i.test(t)?t:`<p>${t}</p>`:``}).join(`
154
154
  `),t=t.replace(/%%CB(\d+)%%/g,(e,t)=>n[Number(t)]),t=t.replace(/%%IC(\d+)%%/g,(e,t)=>r[Number(t)]),t}var U9=`mt-whats-new-dismissed`,W9=`mt-whats-new-seen-version`;function qee(e){try{return localStorage.getItem(U9)===e}catch{return!1}}function Jee(e){try{localStorage.setItem(U9,e)}catch{}}function Yee(e){try{let t=localStorage.getItem(W9);return localStorage.setItem(W9,e),t!==null&&t!==e}catch{return!1}}var Xee=`text-[13px] leading-[1.7] text-muted-foreground [&_h2]:mt-[18px] [&_h2]:mb-1.5 [&_h2]:text-[17px] [&_h2]:font-bold [&_h2]:text-foreground [&_h3]:mt-[18px] [&_h3]:mb-1.5 [&_h3]:text-[15px] [&_h3]:font-bold [&_h3]:text-foreground [&_h4]:mt-[18px] [&_h4]:mb-1.5 [&_h4]:text-[14px] [&_h4]:font-bold [&_h4]:text-foreground [&_h5]:mt-[18px] [&_h5]:mb-1.5 [&_h5]:text-[14px] [&_h5]:font-bold [&_h5]:text-foreground [&_p]:my-[5px] [&_ul]:my-[5px] [&_ul]:list-disc [&_ul]:pl-[18px] [&_ol]:my-[5px] [&_ol]:list-decimal [&_ol]:pl-[22px] [&_li]:my-[3px] [&_li]:marker:text-brand [&_img]:my-1.5 [&_img]:max-w-full [&_img]:rounded-md [&_img]:border [&_img]:border-border [&_code]:rounded [&_code]:border [&_code]:border-border [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs [&_code]:text-brand [&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:border [&_pre]:border-border [&_pre]:bg-background [&_pre]:p-3 [&_pre_code]:border-0 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-muted-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_strong]:font-semibold [&_strong]:text-foreground [&_blockquote]:my-2 [&_blockquote]:border-l-[3px] [&_blockquote]:border-brand/40 [&_blockquote]:px-3.5 [&_blockquote]:py-1.5 [&_blockquote]:italic [&_hr]:my-3.5 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border [&_del]:text-muted-foreground [&_del]:opacity-60 [&_table]:w-full [&_table]:border-collapse [&_table]:font-mono [&_table]:text-xs [&_th]:border-b [&_th]:border-border [&_th]:bg-muted [&_th]:px-3 [&_th]:py-[7px] [&_th]:text-left [&_th]:text-[11px] [&_th]:font-semibold [&_th]:tracking-wide [&_th]:text-foreground [&_th]:uppercase [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:py-[7px] [&_td]:text-muted-foreground [&_.wn-table-wrap]:my-2.5 [&_.wn-table-wrap]:overflow-x-auto [&_.wn-table-wrap]:rounded-md [&_.wn-table-wrap]:border [&_.wn-table-wrap]:border-border [&_.wn-task]:-ml-[18px] [&_.wn-task]:list-none [&_.wn-check]:inline-block [&_.wn-check]:w-4 [&_.wn-task.done_.wn-check]:text-success`,Zee=600*1e3;function Qee(e){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e)return;let t=Yee(e),r=null,a=()=>{mc(`/api/releases/latest`).then(e=>{n(e);let a=r===null,o=r!==null&&e.version!==r;if(r=e.version,a&&t){setTimeout(()=>i(!0),1200);return}e.isNewer&&!qee(e.version)&&(a||o)&&setTimeout(()=>i(!0),a?1200:0)}).catch(()=>{})};a();let o=setInterval(a,Zee);return()=>clearInterval(o)},[e]);let a=(0,v.useCallback)(()=>{t?.isNewer&&Jee(t.version),i(!1)},[t]),o=(0,v.useCallback)(()=>i(!0),[]);return{release:t,showModal:r,showIndicator:t!==null&&t.isNewer,openModal:o,dismissRelease:a}}function $ee({release:e,onDismiss:t}){let n=new Date(e.publishedAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),r={__html:Kee(e.body)};return(0,K.jsx)(Ree,{open:!0,onOpenChange:e=>{e||t()},children:(0,K.jsxs)(Vee,{className:`max-h-[calc(100vh-80px)] gap-0 overflow-y-auto p-0 sm:max-w-[520px]`,children:[(0,K.jsxs)(Hee,{className:`items-center gap-4 px-8 pt-10 pb-6 text-center`,children:[(0,K.jsx)(`span`,{className:`inline-block rounded-full border border-brand/30 bg-brand/10 px-3.5 py-1 font-mono text-[10px] font-bold tracking-[0.2em] text-brand uppercase`,children:e.isNewer?`NEW RELEASE`:`RELEASE NOTES`}),(0,K.jsxs)(Wee,{className:`text-[44px] leading-none font-extrabold tracking-tight text-brand`,children:[`v`,e.version]}),(0,K.jsxs)(Gee,{className:`font-mono text-xs text-muted-foreground`,children:[`Released `,n,e.isNewer&&(0,K.jsxs)(K.Fragment,{children:[` · you’re on v`,e.currentVersion]})]})]}),(0,K.jsx)(`div`,{className:Y(`px-8 py-5`,Xee),dangerouslySetInnerHTML:r}),(0,K.jsxs)(Uee,{className:`flex-row items-center justify-between border-t border-border px-8 pt-3.5 pb-6`,children:[(0,K.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground hover:text-foreground`,children:[`View on GitHub`,(0,K.jsx)(Rc,{className:`size-3.5`})]}),(0,K.jsx)(X,{type:`default`,size:`sm`,onClick:t,children:`Got it`})]})]})})}zi.registerPlugin(G);function G9(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,document.body.append(i),i.click(),i.remove(),URL.revokeObjectURL(r)}var K9=[{id:`overview`,label:`Overview`,sub:`Calls, latency & risk at a glance`},{id:`devices`,label:`Devices`,sub:`Connectivity radar & system health`},{id:`clients`,label:`Clients`,sub:`Connected LAN devices — usage, block/allow, pin IP`},{id:`aaa`,label:`RADIUS & UM`,sub:`RADIUS client & User Manager RADIUS server`},{id:`topology`,label:`Topology`,sub:`Layer-2 neighbours via MNDP / CDP / LLDP`},{id:`packets`,label:`Packets`,sub:`Live TZSP capture & decode`},{id:`snapshots`,label:`Snapshots`,sub:`Config history & time-travel diff`},{id:`drift`,label:`Drift Guard`,sub:`Golden config baselines & live drift detection`},{id:`plan`,label:`Change Plan`,sub:`Dry-run intended RouterOS commands`},{id:`s3`,label:`S3 Backups`,sub:`List, download & delete S3 backup objects`},{id:`backups`,label:`Backups`,sub:`Local config vault — create, restore, manage`},{id:`modules`,label:`Modules`,sub:`Enable/disable tool modules — curate the surface`},{id:`config`,label:`Config`,sub:`Effective configuration & safe editor`},{id:`memory`,label:`Memory`,sub:`Knowledge graph — entities, relations & observations`},{id:`feed`,label:`Live Feed`,sub:`Every tool call, in real time`}],q9=new Set(K9.map(e=>e.id)),J9=`mt-view`;function Y9(){try{let e=location.hash.replace(/^#\/?/,``);return q9.has(e)?e:null}catch{return null}}function ete(){let e=Y9();if(e)return e;try{let e=localStorage.getItem(J9);if(e&&q9.has(e))return e}catch{}return`overview`}var X9=[`var(--foreground)`,`var(--muted-foreground)`],Z9={overview:X9,devices:X9,clients:X9,aaa:X9,topology:X9,packets:X9,snapshots:X9,drift:X9,plan:X9,s3:X9,backups:X9,modules:X9,config:X9,memory:X9,feed:X9},tte={overview:{what:`A live pulse of all MCP tool activity: total calls, error rate, p50/p95 latency, the busiest tools, and a risk breakdown — over a time window you choose.`,tips:[`Change the time window (top-right) to zoom from the last 5 minutes out to 24 hours.`,`The risk donut splits calls by annotation: read · write · destructive · dangerous.`,`A rising error line usually points at one device or one tool — jump to Live Feed to see which.`]},devices:{what:`Every configured router with its live reachability (SSH or MAC-Telnet), latency, identity, and system health — CPU, memory and disk — refreshed continuously.`,tips:[`Each device gets a stable colour so you can track it across the connectivity radar.`,`Health (CPU/Mem/Disk) is probed periodically; MAC-Telnet devices are probed on a slower cadence.`,`Latency tiers are colour-coded green → amber → red; a grey node is currently unreachable.`,`The SSH Connection Pool panel shows persistent connections: green = idle/ready, blue = busy with inflight channels, red = reconnecting.`]},clients:{what:`The LAN devices connected to a router — merged from its DHCP leases and ARP table — with live Download/Upload charts, and one-click controls to block/allow a device, pin (reserve) its IP, change that IP, or relabel it.`,tips:[`Pick the router (top-right) to inspect its connected devices; filter by IP, MAC or name.`,`Click a device to open its live ↓/↑ traffic chart — needs a simple queue targeting its IP.`,`Block/allow is enforced by MAC, so it survives the device changing IP; “Pin IP” makes its lease static.`]},aaa:{what:"Full management of the router's RADIUS client (`/radius`) and the built-in User Manager RADIUS server (`/user-manager`): RADIUS servers + incoming CoA, and User Manager users, service profiles, rate/quota limitations, NAS clients, profile assignments, accounting sessions, and global settings.",tips:[`Pick the router (top-right), then switch tabs across RADIUS, Users, Profiles, Limitations, NAS, Assignments, Sessions and Settings.`,`Every tab is full CRUD: add, edit, enable/disable and remove — secrets are write-only and shown redacted.`,`The Usage & Heatmap tab shows each user's 3-month download/upload and a GitHub-style connection heatmap, persisted locally.`,`If a device lacks the user-manager package, the User Manager tabs explain how to install it; RADIUS-client tabs still work.`]},topology:{what:`A Layer-2 map of neighbours each router discovers via MNDP / CDP / LLDP — the physical adjacency of your network, drawn live.`,tips:[`Solid nodes are configured devices; faint nodes are discovered-but-unmanaged neighbours.`,`Use “Add to config →” on an unmanaged neighbour to pre-fill it in the Config editor.`,`Drag to pan; the layout settles automatically as new neighbours arrive.`]},packets:{what:`Live packet capture streamed from a router over TZSP — decode headers in real time without leaving the dashboard.`,tips:[`Pick a device and start the capture; packets decode as they arrive.`,`Stop the capture when done — it frees the router-side sniffer.`,`Great for debugging a protocol issue alongside the Live Feed of tool calls.`]},snapshots:{what:`Point-in-time captures of a device’s full configuration (/export), stored locally so you can diff any two and see exactly what changed.`,tips:[`Capture a snapshot before a risky change, then diff after to audit the delta.`,`The diff is line-level: green added, red removed.`,`Snapshots are device config exports — for the dashboard’s OWN config history see the Config page.`]},drift:{what:`Detect when router configs drift from their golden baseline — with change attribution and one-click reconciliation.`,tips:[`Set a baseline via MCP tools (config_set_baseline) or the Baseline Manager below.`,`Click a device card to run a live drift check against its golden config.`,`Promote accepted changes as the new baseline, or reconcile to roll back.`]},plan:{what:`Dry-run the exact RouterOS commands a change would run before it touches a device — a change plan you can review and trust.`,tips:[`Paste or build intended commands to see them validated and ordered.`,`Nothing is sent to the device from here — it’s a preview.`,`Pair with Safe Mode (auto-revert) when you do apply for real.`]},s3:{what:`Browse, download, and delete backup objects in your configured S3-compatible bucket — your off-box archive of device backups and exports.`,tips:[`Filter by key prefix to find a device’s backups quickly.`,`Download fetches the object through a presigned URL; delete is permanent.`,`For host-side .rsc backups instead, use the Backups page.`]},backups:{what:`A local config vault on the MCP server: capture a device’s /export as a timestamped .rsc file, then download, upload, rename, restore (via Safe Mode), or delete it.`,tips:[`Restore offers a dry-run (applies then rolls back) before you commit for real.`,`Edit the vault path inline in the header — it’s saved to your config.`,`Filenames are stamped in the device’s local 24-hour clock.`]},modules:{what:"Every tool module in the catalog with a live on/off switch. Toggling one writes your config file's `tools` block (disabledModules / enabledModules) and applies it immediately, so you can curate exactly which scopes the MCP server exposes.",tips:[`MCP clients search-rank tools and degrade past ~100; trim the surface below ~150–200 tools so every remaining tool is reliably findable.`,`Disable adds the module to tools.disabledModules; enable removes it (or adds it to an active allow-list) — your config file is updated live on each toggle.`,`Changes need an MCP client reconnect (or a server restart) to actually shrink/grow the visible tool list.`]},config:{what:`View the effective configuration, edit it safely with schema-aware validation and auto-rollback, browse a full field guide, and travel through config version history.`,tips:[`Every successful apply is auto-saved to the version timeline — restore any point in time.`,`Save a named checkpoint before a big change for an easy, labelled rollback.`,`The Field Guide documents every config option, its type, and default — straight from the schema.`]},memory:{what:`A persistent knowledge graph the AI builds across sessions — entities (routers, subnets, users), relations between them, and free-text observations.`,tips:[`Entities are created by the AI via MCP tools — you can browse and delete them here.`,`The graph visualization shows entities as circles and relations as directed edges; click a node to inspect it.`,`Change the database path to switch between different knowledge bases.`]},feed:{what:`Every tool call as it happens — tool, device, risk, duration, and success/error — with full request/response detail on click.`,tips:[`Filter by status to isolate failures, or by tool/device to follow one thread.`,`Click any row to open the full (secret-redacted) request and response.`,`Pause the stream when you want to inspect without rows shifting under you.`]}};function Q9({icon:e,title:t,sub:n,body:r,className:i}){return(0,K.jsxs)(`div`,{className:Y(`text-muted-foreground flex flex-col items-center gap-2 rounded-lg border border-dashed px-6 py-14 text-center`,i),children:[e,(0,K.jsx)(`p`,{className:`text-foreground text-sm font-medium`,children:t}),n!=null&&(0,K.jsx)(`p`,{className:`max-w-md text-xs`,children:n}),r]})}function nte({view:e}){let t=tte[e];return(0,K.jsxs)(`div`,{className:`bg-card reveal flex gap-3 rounded-lg border p-4`,role:`region`,"aria-label":`Page help`,children:[(0,K.jsx)(Nc,{className:`text-brand mt-0.5 size-4 shrink-0`,"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,K.jsx)(`p`,{className:`text-sm`,children:t.what}),(0,K.jsx)(`ul`,{className:`text-muted-foreground list-disc space-y-1 pl-4 text-xs`,children:t.tips.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]})]})}function rte({name:e}){return(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:{overview:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`3`,width:`8`,height:`8`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`3`,width:`8`,height:`5`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`10`,width:`8`,height:`11`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`8`,height:`8`,rx:`1.6`})]}),devices:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),clients:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3`}),(0,K.jsx)(`path`,{d:`M3.5 19a5.5 5.5 0 0 1 11 0`}),(0,K.jsx)(`path`,{d:`M16 7.5a2.5 2.5 0 0 1 0 5M17.5 19a4.5 4.5 0 0 0-2-3.6`})]}),aaa:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 4 6v5c0 4.4 3.2 7.6 8 9 4.8-1.4 8-4.6 8-9V6l-8-3Z`}),(0,K.jsx)(`path`,{d:`M9.5 11.5 11 13l3.5-3.5`})]}),topology:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`5`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`5`,cy:`19`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`19`,cy:`19`,r:`2.4`}),(0,K.jsx)(`path`,{d:`M12 7.4 6.4 16.6M12 7.4 17.6 16.6`})]}),packets:(0,K.jsx)(`path`,{d:`M3 12h4l2-7 4 14 2-7h6`}),snapshots:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 3 7.5 12 12 21 7.5 12 3Z`}),(0,K.jsx)(`path`,{d:`M3 12 12 16.5 21 12`}),(0,K.jsx)(`path`,{d:`M3 16.5 12 21 21 16.5`})]}),drift:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z`}),(0,K.jsx)(`path`,{d:`M9 12l2 2 4-4`}),(0,K.jsx)(`path`,{d:`M12 6v2M12 16v2M6 12h2M16 12h2`})]}),plan:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`18`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.3`}),(0,K.jsx)(`path`,{d:`M6 8.3v7.4M8.3 6H13a3 3 0 0 1 3 3v0`})]}),s3:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.6`}),(0,K.jsx)(`path`,{d:`M5 6v12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6V6`}),(0,K.jsx)(`path`,{d:`M5 12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6`})]}),backups:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M3 6.5 5 3.5h14l2 3`}),(0,K.jsx)(`rect`,{x:`3`,y:`6.5`,width:`18`,height:`14`,rx:`2`}),(0,K.jsx)(`path`,{d:`M9.5 12h5`})]}),modules:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.5`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`16`,cy:`16`,r:`1.5`})]}),config:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M4 7h8M16 7h4M4 17h4M12 17h8`}),(0,K.jsx)(`circle`,{cx:`14`,cy:`7`,r:`2.2`}),(0,K.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2.2`})]}),memory:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`6`,r:`2`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`2`}),(0,K.jsx)(`path`,{d:`M12 8v-0.5M12 8 7.2 12.5M12 8 16.8 12.5M6 16 10.5 18.5M18 16 13.5 18.5`})]}),feed:(0,K.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h10`})}[e]})}function ite(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=Qee(n?.version),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)([]),[b,x]=(0,v.useState)(36e5),S=Number(d?.dashboard?.feedLimit)||200,C=(0,v.useCallback)(async e=>{if(!d)return;let t={...d.dashboard,feedLimit:e};await hc(`/api/config`,{config:{...d,dashboard:t},rollbackMs:0}).catch(()=>{}),await mc(`/api/config`).then(f).catch(()=>{})},[d]),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(`off`),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(()=>new Set),[M,N]=(0,v.useState)({}),[P,F]=(0,v.useState)({tool:``,risk:``,device:``,status:``,q:``}),I=(0,v.useRef)(w);I.current=w;let L=(0,v.useRef)(null);l9(L);let[R,ee]=(0,v.useState)(ete),te=(0,v.useCallback)(e=>{ee(e);try{Y9()!==e&&(location.hash=e),localStorage.setItem(J9,e)}catch{}},[]);(0,v.useEffect)(()=>{if(Y9()!==R)try{location.hash=R}catch{}let e=()=>{let e=Y9();e&&te(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let[z,B]=(0,v.useState)(()=>{try{let e=localStorage.getItem(`mt-help-open`);return new Set(e?JSON.parse(e):[])}catch{return new Set}}),V=e=>B(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(`mt-help-open`,JSON.stringify([...n]))}catch{}return n}),[ne,re]=(0,v.useState)(``),[ie,ae]=(0,v.useState)(`all`),oe=(0,v.useMemo)(()=>{let e=i?.devices??[];return{online:e.filter(e=>e.status.reachable===!0).length,offline:e.filter(e=>e.status.reachable===!1).length,total:e.length}},[i]),se=(0,v.useMemo)(()=>{let e=i?.devices??[],t=ne.trim().toLowerCase();return e.filter(e=>!(ie===`online`&&e.status.reachable!==!0||ie===`offline`&&e.status.reachable!==!1||t&&!e.name.toLowerCase().includes(t)&&!(e.address??e.host??``).toLowerCase().includes(t)))},[i,ne,ie]);c9((0,v.useCallback)(e=>{if(I.current)return;y(t=>[e,...t].slice(0,yb));let t=e.device;t&&N(e=>({...e,[t]:(e[t]??0)+1}))},[]),(0,v.useCallback)(e=>D(e),[])),(0,v.useEffect)(()=>{mc(`/api/events?limit=${yb}`).then(e=>y(e.events)).catch(()=>{})},[]);let H=(0,v.useCallback)(()=>{mc(`/api/stats?window=${b}&buckets=60`).then(t).catch(()=>{})},[b]);(0,v.useEffect)(()=>{H();let e=()=>{H(),mc(`/api/meta`).then(r).catch(()=>{}),mc(`/api/devices`).then(a).catch(()=>{}),mc(`/api/ssh-pool`).then(s).catch(()=>{}),mc(`/api/topology`).then(u).catch(()=>{})};e();let t=setInterval(()=>{I.current||e()},4e3);return()=>clearInterval(t)},[H]),(0,v.useEffect)(()=>{let e=()=>void mc(`/api/config`).then(f).catch(()=>{});e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let ce=(0,v.useCallback)((e,t)=>{hc(`/api/devices/toggle`,{device:e,disabled:t}).then(e=>{a(e)})},[]);(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&k(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let le=(0,v.useMemo)(()=>{let e=P.q.trim().toLowerCase();return _.filter(t=>!(P.tool&&t.tool!==P.tool||P.risk&&t.risk!==P.risk||P.device&&t.device!==P.device||P.status===`ok`&&t.isError||P.status===`error`&&!t.isError||e&&!t.tool.toLowerCase().includes(e)&&!t.input.toLowerCase().includes(e)&&!t.output.toLowerCase().includes(e)&&!(t.error??``).toLowerCase().includes(e))).sort((e,t)=>t.ts-e.ts)},[_,P]),ue=!!(P.tool||P.risk||P.device||P.status||P.q),de=(0,v.useMemo)(()=>_.filter(e=>e.isError),[_]),fe=(0,v.useMemo)(()=>({ok:_.length-de.length,error:de.length}),[_,de]),pe=(0,v.useCallback)(async e=>{try{k(await mc(`/api/event/${encodeURIComponent(e.id)}`))}catch{k(e)}},[]),me=(0,v.useMemo)(()=>le.slice(0,S),[le,S]),he=(0,v.useMemo)(()=>me.map(e=>e.id),[me]),ge=he.length>0&&he.every(e=>A.has(e)),_e=!ge&&he.some(e=>A.has(e)),ve=(0,v.useCallback)(e=>{j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ye=(0,v.useCallback)(()=>{j(e=>{let t=new Set(e);if(he.length>0&&he.every(e=>t.has(e)))for(let e of he)t.delete(e);else for(let e of he)t.add(e);return t})},[he]),[be,xe]=(0,v.useState)(!1),Se=(0,v.useCallback)(async()=>{let e=[...A];if(e.length!==0)try{await _c({ids:e});let t=new Set(e);y(e=>e.filter(e=>!t.has(e.id))),j(new Set)}catch{}finally{xe(!1)}},[A]),Ce=e=>{if(e===`json`){G9(`mcp-events.json`,JSON.stringify(le,null,2),`application/json`);return}let t=[`ts`,`tool`,`risk`,`device`,`durationMs`,`isError`,`error`,`reason`],n=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e,r=le.map(e=>[new Date(e.ts).toISOString(),e.tool,e.risk,e.device??``,String(e.durationMs),String(e.isError),e.error??``,e.reason??``].map(n).join(`,`)).join(`
155
- `);G9(`mcp-events.csv`,`${t.join(`,`)}\n${r}\n`,`text/csv`)},we=e?e.errorRate>=.2?`text-destructive`:e.errorRate>=.05?`text-warning`:``:``,Te=d?.mcp??{},Ee=d?.dashboard??{},De=d?.ssh??{},Oe=(e,t,n)=>(0,K.jsx)(Gb,{size:`sm`,"aria-label":t,value:P[e],onValueChange:t=>F(n=>({...n,[e]:t})),options:[{value:``,label:t},...n.map(e=>({value:e,label:e}))]}),ke=K9.find(e=>e.id===R)??K9[0];return(0,K.jsxs)(`div`,{className:`bg-background text-foreground grid min-h-screen grid-cols-[240px_1fr]`,ref:L,"data-view":R,style:{"--page-accent":Z9[R][0],"--page-accent-2":Z9[R][1]},children:[(0,K.jsxs)(`aside`,{className:`bg-card sticky top-0 flex h-screen flex-col gap-4 border-r p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`bg-foreground text-background grid size-9 shrink-0 place-items-center rounded-md`,children:(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`size-5`,children:(0,K.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`path`,{d:`M12 12 L4 5 M12 12 L20 5 M12 12 L12 20`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`4`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`20`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`1.9`,fill:`currentColor`,stroke:`none`})]})})}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col leading-tight`,children:[(0,K.jsx)(`b`,{className:`truncate text-sm`,children:`MikroTik MCP`}),(0,K.jsxs)(`small`,{className:Y(`text-muted-foreground inline-flex items-center gap-1 text-[11px]`,c.release&&`hover:text-foreground cursor-pointer`),title:c.release?`View release notes`:void 0,onClick:c.release?()=>c.openModal():void 0,children:[n?.version?`v${n.version}`:`Observability`,c.showIndicator&&(0,K.jsx)(`span`,{className:`bg-brand inline-block size-1.5 rounded-full`,title:`v${c.release?.version} available`})]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(lb,{})]}),(0,K.jsx)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto`,children:K9.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:Y(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-[13px] transition-colors`,`[&_svg]:size-4 [&_svg]:shrink-0`,R===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),onClick:()=>te(e.id),children:[(0,K.jsx)(rte,{name:e.id}),(0,K.jsx)(`span`,{className:`truncate`,children:e.label}),e.id===`feed`&&_.length>0&&(0,K.jsx)(`span`,{className:`bg-brand text-brand-foreground animate-in zoom-in-50 ml-auto rounded-full px-1.5 py-0.5 text-[10px] tabular-nums`,children:_.length>999?`999+`:_.length},_.length)]},e.id))}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t pt-3`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[11px]`,title:`Live transport: WebSocket (preferred) or SSE fallback`,children:[(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`}),E===`off`?`offline`:`live · ${E}`]}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-[11px]`,children:n?`${pb(n.total)} events · ${n.transport}`:`connecting…`})]})]}),(0,K.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-5 p-6`,"data-view":R,children:[(0,K.jsxs)(`header`,{className:`reveal flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(`h1`,{className:`truncate text-xl font-semibold`,children:ke.label}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-xs`,children:ke.sub})]}),(0,K.jsx)(`span`,{className:`flex-1`}),R===`overview`&&(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Stats time window`,value:String(b),onValueChange:e=>x(Number(e)),options:vb.map(([e,t])=>({value:String(t),label:`window: ${e}`}))}),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:z.has(R)?`accent`:`default`,onClick:()=>V(R),"aria-expanded":z.has(R),title:`About this page`,icon:(0,K.jsx)(Nc,{}),children:`Help`})]}),z.has(R)&&(0,K.jsx)(nte,{view:R}),R===`overview`&&(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-3`,children:e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(nb,{k:`Calls (window)`,v:pb(e.total)}),(0,K.jsx)(nb,{k:`Calls / min`,v:e.callsPerMin.toFixed(1)}),(0,K.jsx)(nb,{k:`Error rate`,v:`${(e.errorRate*100).toFixed(1)}%`,sub:`${e.errors} err`,cls:we}),(0,K.jsx)(nb,{k:`Avg latency`,v:ub(e.latency.avg)}),(0,K.jsx)(nb,{k:`p95 latency`,v:ub(e.latency.p95)}),(0,K.jsx)(nb,{k:`p99 latency`,v:ub(e.latency.p99)}),(0,K.jsx)(nb,{k:`Distinct tools`,v:pb(e.distinctTools)}),(0,K.jsx)(nb,{k:`Output volume`,v:db(e.outputBytes)})]}):(0,K.jsx)(nb,{k:`Loading…`,v:`—`})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-1 gap-4 xl:grid-cols-3`,children:[(0,K.jsx)(tb,{title:`Calls over time`,className:`xl:col-span-2`,children:e?(0,K.jsx)(y5,{series:e.series}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no data`})}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(tb,{title:`By risk`,children:(0,K.jsx)(b5,{segments:Object.keys(e.byRisk).map(t=>({label:t,value:e.byRisk[t],color:gb[t]}))})}),(0,K.jsx)(tb,{title:`Top tools`,className:`xl:col-span-2`,children:(0,K.jsx)(rb,{rows:e.byTool.map(e=>({label:e.tool,value:e.count,sub:`${e.count}× · ${ub(e.p95Ms)} p95${e.errors?` · ${e.errors} err`:``}`,color:e.errors?`var(--destructive)`:void 0}))})}),(0,K.jsx)(tb,{title:`Status`,children:(0,K.jsx)(b5,{centerLabel:`calls`,segments:[{label:`ok`,value:fe.ok,color:`var(--muted-foreground)`},{label:`error`,value:fe.error,color:`var(--destructive)`}]})}),(0,K.jsx)(tb,{title:`By device`,children:e.byDevice.length?(0,K.jsx)(rb,{rows:e.byDevice.map(e=>({label:e.device,value:e.count}))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`single device`})}),(0,K.jsx)(tb,{title:`Recent errors`,children:de.length?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:de.slice(0,8).map(e=>(0,K.jsxs)(`div`,{className:`hover:bg-accent/50 grid cursor-pointer grid-cols-[auto_1fr] items-center gap-3 rounded-md px-1 py-0.5`,onClick:()=>void pe(e),children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:fb(e.ts)}),(0,K.jsxs)(`span`,{className:`text-destructive min-w-0 truncate text-xs`,title:e.error??e.output,children:[e.tool,`: `,e.error??e.output??`error`]})]},e.id))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no errors 🎉`})})]})]})]}),R===`devices`&&(i&&i.devices.length>0?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(`div`,{className:`reveal flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search devices by name or address…`,value:ne,onChange:e=>re(e.target.value)}),(0,K.jsx)(`div`,{className:`bg-muted flex gap-0.5 rounded-md p-0.5`,children:[`all`,`online`,`offline`].map(e=>(0,K.jsx)(`button`,{type:`button`,className:Y(`rounded-sm px-2.5 py-1 text-xs transition-colors`,ie===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:text-foreground`),onClick:()=>ae(e),children:e===`all`?`All ${oe.total}`:e===`online`?`Online ${oe.online}`:`Offline ${oe.offline}`},e))}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[se.length,`/`,oe.total,` shown`]})]}),(0,K.jsxs)(`details`,{className:`bg-card reveal rounded-lg border p-4`,open:oe.total<=8,children:[(0,K.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[`Connectivity radar`,(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[` `,`· `,oe.online,` online · `,oe.offline,` offline ·`,` `,oe.total,` total`]})]}),(0,K.jsx)(Z7,{payload:i,pulses:M})]}),(0,K.jsx)(Lee,{devices:se,poolPayload:o}),se.length===0?(0,K.jsx)(Q9,{className:`reveal`,icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No devices match`,sub:`Try a different search or status filter.`}):(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))] gap-4`,children:se.map(e=>(0,K.jsx)(Q7,{d:e,onToggle:ce},e.name))}),se.length>0&&(0,K.jsx)(tb,{title:`Device system health`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`CPU · memory · disk · latency · live probe`}),children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(17rem,1fr))] gap-3`,children:se.map(e=>(0,K.jsx)(s9,{d:e},e.name))})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Wc,{className:`size-6`}),title:`No devices configured`,body:(0,K.jsx)(Pb,{type:`secondary`,label:`Tip`,children:`Add a device to your config to see connectivity and system health here.`})})),R===`clients`&&(0,K.jsx)(I5,{}),R===`aaa`&&(0,K.jsx)(Px,{}),R===`topology`&&(l&&l.nodes.length>0?(0,K.jsx)(`section`,{className:`reveal grid content-start gap-[18px]`,children:(0,K.jsx)(Mee,{topo:l,onOnboard:(e,t)=>{g({name:e,body:t}),m(!0),te(`config`)}})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Yc,{className:`size-6`}),title:`No neighbours discovered yet`,sub:`Layer-2 neighbours (MNDP / CDP / LLDP) appear here as the device reports them.`})),R===`packets`&&(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`Packet capture`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`live TZSP decode · /tool sniffer streaming`}),children:(0,K.jsx)(Eee,{})})}),R===`snapshots`&&(0,K.jsx)(Oee,{}),R===`drift`&&(0,K.jsx)(y9,{}),R===`plan`&&(0,K.jsx)(Rx,{}),R===`s3`&&(0,K.jsx)(Dee,{}),R===`backups`&&(0,K.jsx)(qb,{}),R===`modules`&&(0,K.jsx)(M9,{}),R===`config`&&(d?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(tb,{title:`Configuration`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>m(e=>!e),title:`Edit the config JSON with autocomplete, validation and safe-apply`,icon:p?void 0:(0,K.jsx)(Kc,{}),children:p?`View`:`Edit config`}),children:p?(0,K.jsx)(R7,{initial:h?{...d,devices:{...d.devices,[h.name]:h.body}}:d,onClose:()=>{m(!1),g(null)},onReload:()=>{g(null),mc(`/api/config`).then(f).catch(()=>{})}},h?`seed-${h.name}`:`config`):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`text-muted-foreground mb-2.5 flex flex-wrap gap-x-4 gap-y-1 text-[11px]`,children:[(0,K.jsxs)(`span`,{children:[`transport: `,mb(Te.transport)]}),(0,K.jsxs)(`span`,{children:[`read-only: `,d.readOnly?`yes`:`no`]}),(0,K.jsxs)(`span`,{children:[`dashboard: `,mb(Ee.host),`:`,mb(Ee.port)]}),(0,K.jsxs)(`span`,{children:[`capture: `,Ee.captureBody?`on`:`off`]}),(0,K.jsxs)(`span`,{children:[`s3: `,d.s3?`configured`:`off`]}),(0,K.jsxs)(`span`,{children:[`ssh pool: `,De.keepAlive===!1?`off`:`on`]})]}),(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{className:`cursor-pointer text-sm`,children:`Full effective configuration (secrets redacted)`}),(0,K.jsx)(G5,{value:d,maxHeight:340})]})]})}),(0,K.jsx)(tb,{title:`Dashboard preferences`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`saved to `,(0,K.jsx)(`code`,{children:`dashboard.feedLimit`}),` in the config`]}),children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(zy,{className:`text-[12.5px]`,children:`Live Feed rows`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`How many matching calls the feed table renders. Up to `,pb(1e4),` are kept in memory regardless; this only bounds what is drawn.`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Live Feed rows`,value:String(S),onValueChange:e=>void C(Number(e)),options:ab.map(e=>({value:String(e),label:`${pb(e)} rows${e===200?` (default)`:``}`}))})]})}),(0,K.jsx)(tb,{title:`Version history`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`point-in-time snapshots · diff & restore`}),children:(0,K.jsx)($5,{onRestored:()=>void mc(`/api/config`).then(f).catch(()=>{})})}),(0,K.jsx)(tb,{title:`Field guide`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`every config option, documented from the schema`}),children:(0,K.jsx)(t7,{})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Bb,{}),title:`Loading configuration…`})),R===`memory`&&(0,K.jsx)(k9,{}),R===`feed`&&(0,K.jsxs)(tb,{className:`reveal`,title:`Live tool calls`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(me.length),` shown`,le.length>me.length&&` of ${pb(le.length)} matching`,` ·`,` `,pb(_.length),` buffered`]}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search tool / input / output / error…`,value:P.q,onChange:e=>F(t=>({...t,q:e.target.value}))}),Oe(`tool`,`all tools`,n?.tools??[]),Oe(`risk`,`all risk`,[`READ`,`WRITE`,`WRITE_IDEMPOTENT`,`DESTRUCTIVE`,`DANGEROUS`]),Oe(`device`,`all devices`,n?.devices??[]),Oe(`status`,`all status`,[`ok`,`error`]),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:w?`accent`:`default`,onClick:()=>T(e=>!e),icon:w?(0,K.jsx)(qc,{}):(0,K.jsx)(Gc,{}),children:w?`Resume`:`Pause`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`csv`),children:`CSV`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`json`),children:`JSON`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear`}),be&&A.size>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(X,{size:`sm`,type:`error`,onClick:()=>void Se(),icon:(0,K.jsx)(kc,{}),children:[`Confirm delete (`,A.size,`)`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>xe(!1),children:`Cancel`})]}):(0,K.jsxs)(X,{size:`sm`,ghost:!0,disabled:A.size===0,onClick:()=>xe(!0),title:`Delete the selected rows`,icon:(0,K.jsx)(il,{}),children:[`Delete`,A.size>0?` (${A.size})`:``]})]}),le.length===0?ue?(0,K.jsx)(Q9,{icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No calls match your filters`,sub:`${_.length} call${_.length===1?``:`s`} buffered — try widening the search or the risk / device / status filters.`,body:(0,K.jsx)(X,{size:`sm`,ghost:!0,className:`mt-2`,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear filters`})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`,className:`size-3`}),title:E===`off`?`Not connected`:`Listening for tool calls…`,sub:E===`off`?`The live stream is offline — it will reconnect automatically.`:`Tool calls the LLM makes against this server stream in here in real time.`}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{className:`w-7`,children:(0,K.jsx)(Ry,{"aria-label":`Select all shown rows`,checked:ge?!0:_e?`indeterminate`:!1,onCheckedChange:ye})}),(0,K.jsx)(Wy,{children:`time`}),(0,K.jsx)(Wy,{children:`tool`}),(0,K.jsx)(Wy,{children:`risk`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{className:`text-right`,children:`dur`}),(0,K.jsx)(Wy,{children:`status`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:me.map(e=>(0,K.jsxs)(Uy,{"data-state":A.has(e.id)?`selected`:void 0,className:Y(`cursor-pointer`,e.isError&&`bg-destructive/8`),onClick:()=>void pe(e),children:[(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(Ry,{"aria-label":`Select row`,checked:A.has(e.id),onCheckedChange:()=>ve(e.id)})}),(0,K.jsx)(Gy,{className:`tabular-nums`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.tool}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:Y(`rounded-full border px-1.5 py-0.5 text-[10px]`,_b[e.risk]),children:e.risk.replace(`WRITE_IDEMPOTENT`,`WRITE·I`)})}),(0,K.jsx)(Gy,{children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:ub(e.durationMs)}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-muted-foreground`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(Gy,{className:`text-muted-foreground max-w-[24rem] truncate`,children:e.isError?e.error??`error`:e.reason?(0,K.jsx)(`span`,{className:`italic`,children:e.reason}):e.output||`—`})]},e.id))})]})})]})]}),c.showModal&&c.release&&(0,K.jsx)($ee,{release:c.release,onDismiss:c.dismissRelease}),O&&(0,K.jsx)(a9,{event:O,onClose:()=>k(null)})]})}var $9=document.getElementById(`root`);$9&&(0,y.createRoot)($9).render((0,K.jsx)(ite,{}));
155
+ `);G9(`mcp-events.csv`,`${t.join(`,`)}\n${r}\n`,`text/csv`)},we=e?e.errorRate>=.2?`text-destructive`:e.errorRate>=.05?`text-warning`:``:``,Te=d?.mcp??{},Ee=d?.dashboard??{},De=d?.ssh??{},Oe=(e,t,n)=>(0,K.jsx)(Gb,{size:`sm`,"aria-label":t,value:P[e],onValueChange:t=>F(n=>({...n,[e]:t})),options:[{value:``,label:t},...n.map(e=>({value:e,label:e}))]}),ke=K9.find(e=>e.id===R)??K9[0];return(0,K.jsxs)(`div`,{className:`bg-background text-foreground grid min-h-screen grid-cols-[240px_1fr]`,ref:L,"data-view":R,style:{"--page-accent":Z9[R][0],"--page-accent-2":Z9[R][1]},children:[(0,K.jsxs)(`aside`,{className:`bg-card sticky top-0 flex h-screen flex-col gap-4 border-r p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`bg-foreground text-background grid size-9 shrink-0 place-items-center rounded-md`,children:(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`size-5`,children:(0,K.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`path`,{d:`M12 12 L4 5 M12 12 L20 5 M12 12 L12 20`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`4`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`20`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`1.9`,fill:`currentColor`,stroke:`none`})]})})}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col leading-tight`,children:[(0,K.jsx)(`b`,{className:`truncate text-sm`,children:`MikroTik MCP`}),(0,K.jsxs)(`small`,{className:Y(`text-muted-foreground inline-flex items-center gap-1 text-[11px]`,c.release&&`hover:text-foreground cursor-pointer`),title:c.release?`View release notes`:void 0,onClick:c.release?()=>c.openModal():void 0,children:[n?.version?`v${n.version}`:`Observability`,c.showIndicator&&(0,K.jsx)(`span`,{className:`bg-brand inline-block size-1.5 rounded-full`,title:`v${c.release?.version} available`})]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(lb,{})]}),(0,K.jsx)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto`,children:K9.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:Y(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-[13px] transition-colors`,`[&_svg]:size-4 [&_svg]:shrink-0`,R===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),onClick:()=>te(e.id),children:[(0,K.jsx)(rte,{name:e.id}),(0,K.jsx)(`span`,{className:`truncate`,children:e.label}),e.id===`feed`&&_.length>0&&(0,K.jsx)(`span`,{className:`bg-brand text-brand-foreground animate-in zoom-in-50 ml-auto rounded-full px-1.5 py-0.5 text-[10px] tabular-nums`,children:_.length>999?`999+`:_.length},_.length)]},e.id))}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t pt-3`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[11px]`,title:`Live transport: WebSocket (preferred) or SSE fallback`,children:[(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`}),E===`off`?`offline`:`live · ${E}`]}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-[11px]`,children:n?`${pb(n.total)} events · ${n.transport}`:`connecting…`})]})]}),(0,K.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-5 p-6`,"data-view":R,children:[(0,K.jsxs)(`header`,{className:`reveal flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(`h1`,{className:`truncate text-xl font-semibold`,children:ke.label}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-xs`,children:ke.sub})]}),(0,K.jsx)(`span`,{className:`flex-1`}),R===`overview`&&(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Stats time window`,value:String(b),onValueChange:e=>x(Number(e)),options:vb.map(([e,t])=>({value:String(t),label:`window: ${e}`}))}),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:z.has(R)?`accent`:`default`,onClick:()=>V(R),"aria-expanded":z.has(R),title:`About this page`,icon:(0,K.jsx)(Nc,{}),children:`Help`})]}),z.has(R)&&(0,K.jsx)(nte,{view:R}),R===`overview`&&(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-3`,children:e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(nb,{k:`Calls (window)`,v:pb(e.total)}),(0,K.jsx)(nb,{k:`Calls / min`,v:e.callsPerMin.toFixed(1)}),(0,K.jsx)(nb,{k:`Error rate`,v:`${(e.errorRate*100).toFixed(1)}%`,sub:`${e.errors} err`,cls:we}),(0,K.jsx)(nb,{k:`Avg latency`,v:ub(e.latency.avg)}),(0,K.jsx)(nb,{k:`p95 latency`,v:ub(e.latency.p95)}),(0,K.jsx)(nb,{k:`p99 latency`,v:ub(e.latency.p99)}),(0,K.jsx)(nb,{k:`Distinct tools`,v:pb(e.distinctTools)}),(0,K.jsx)(nb,{k:`Output volume`,v:db(e.outputBytes)})]}):(0,K.jsx)(nb,{k:`Loading…`,v:`—`})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-1 gap-4 xl:grid-cols-3`,children:[(0,K.jsx)(tb,{title:`Calls over time`,className:`xl:col-span-2`,children:e?(0,K.jsx)(y5,{series:e.series}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no data`})}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(tb,{title:`By risk`,children:(0,K.jsx)(b5,{segments:Object.keys(e.byRisk).map(t=>({label:t,value:e.byRisk[t],color:gb[t]}))})}),(0,K.jsx)(tb,{title:`Top tools`,className:`xl:col-span-2`,children:(0,K.jsx)(rb,{rows:e.byTool.map(e=>({label:e.tool,value:e.count,sub:`${e.count}× · ${ub(e.p95Ms)} p95${e.errors?` · ${e.errors} err`:``}`,color:e.errors?`var(--destructive)`:void 0}))})}),(0,K.jsx)(tb,{title:`Status`,children:(0,K.jsx)(b5,{centerLabel:`calls`,segments:[{label:`ok`,value:fe.ok,color:`var(--muted-foreground)`},{label:`error`,value:fe.error,color:`var(--destructive)`}]})}),(0,K.jsx)(tb,{title:`By device`,children:e.byDevice.length?(0,K.jsx)(rb,{rows:e.byDevice.map(e=>({label:e.device,value:e.count}))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`single device`})}),(0,K.jsx)(tb,{title:`Recent errors`,children:de.length?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:de.slice(0,8).map(e=>(0,K.jsxs)(`div`,{className:`hover:bg-accent/50 grid cursor-pointer grid-cols-[auto_1fr] items-center gap-3 rounded-md px-1 py-0.5`,onClick:()=>void pe(e),children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:fb(e.ts)}),(0,K.jsxs)(`span`,{className:`text-destructive min-w-0 truncate text-xs`,title:e.error??e.output,children:[e.tool,`: `,e.error??e.output??`error`]})]},e.id))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no errors 🎉`})})]})]})]}),R===`devices`&&(i&&i.devices.length>0?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(`div`,{className:`reveal flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search devices by name or address…`,value:ne,onChange:e=>re(e.target.value)}),(0,K.jsx)(`div`,{className:`bg-muted flex gap-0.5 rounded-md p-0.5`,children:[`all`,`online`,`offline`].map(e=>(0,K.jsx)(`button`,{type:`button`,className:Y(`rounded-sm px-2.5 py-1 text-xs transition-colors`,ie===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:text-foreground`),onClick:()=>ae(e),children:e===`all`?`All ${oe.total}`:e===`online`?`Online ${oe.online}`:`Offline ${oe.offline}`},e))}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[se.length,`/`,oe.total,` shown`]})]}),(0,K.jsxs)(`details`,{className:`bg-card reveal rounded-lg border p-4`,open:oe.total<=8,children:[(0,K.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[`Connectivity radar`,(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[` `,`· `,oe.online,` online · `,oe.offline,` offline ·`,` `,oe.total,` total`]})]}),(0,K.jsx)(Z7,{payload:i,pulses:M})]}),(0,K.jsx)(Lee,{devices:se,poolPayload:o}),se.length===0?(0,K.jsx)(Q9,{className:`reveal`,icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No devices match`,sub:`Try a different search or status filter.`}):(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))] gap-4`,children:se.map(e=>(0,K.jsx)(Q7,{d:e,onToggle:ce},e.name))}),se.length>0&&(0,K.jsx)(tb,{title:`Device system health`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`CPU · memory · disk · latency · live probe`}),children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(22rem,1fr))] gap-3`,children:se.map(e=>(0,K.jsx)(s9,{d:e},e.name))})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Wc,{className:`size-6`}),title:`No devices configured`,body:(0,K.jsx)(Pb,{type:`secondary`,label:`Tip`,children:`Add a device to your config to see connectivity and system health here.`})})),R===`clients`&&(0,K.jsx)(I5,{}),R===`aaa`&&(0,K.jsx)(Px,{}),R===`topology`&&(l&&l.nodes.length>0?(0,K.jsx)(`section`,{className:`reveal grid content-start gap-[18px]`,children:(0,K.jsx)(Mee,{topo:l,onOnboard:(e,t)=>{g({name:e,body:t}),m(!0),te(`config`)}})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Yc,{className:`size-6`}),title:`No neighbours discovered yet`,sub:`Layer-2 neighbours (MNDP / CDP / LLDP) appear here as the device reports them.`})),R===`packets`&&(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`Packet capture`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`live TZSP decode · /tool sniffer streaming`}),children:(0,K.jsx)(Eee,{})})}),R===`snapshots`&&(0,K.jsx)(Oee,{}),R===`drift`&&(0,K.jsx)(y9,{}),R===`plan`&&(0,K.jsx)(Rx,{}),R===`s3`&&(0,K.jsx)(Dee,{}),R===`backups`&&(0,K.jsx)(qb,{}),R===`modules`&&(0,K.jsx)(M9,{}),R===`config`&&(d?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(tb,{title:`Configuration`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>m(e=>!e),title:`Edit the config JSON with autocomplete, validation and safe-apply`,icon:p?void 0:(0,K.jsx)(Kc,{}),children:p?`View`:`Edit config`}),children:p?(0,K.jsx)(R7,{initial:h?{...d,devices:{...d.devices,[h.name]:h.body}}:d,onClose:()=>{m(!1),g(null)},onReload:()=>{g(null),mc(`/api/config`).then(f).catch(()=>{})}},h?`seed-${h.name}`:`config`):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`text-muted-foreground mb-2.5 flex flex-wrap gap-x-4 gap-y-1 text-[11px]`,children:[(0,K.jsxs)(`span`,{children:[`transport: `,mb(Te.transport)]}),(0,K.jsxs)(`span`,{children:[`read-only: `,d.readOnly?`yes`:`no`]}),(0,K.jsxs)(`span`,{children:[`dashboard: `,mb(Ee.host),`:`,mb(Ee.port)]}),(0,K.jsxs)(`span`,{children:[`capture: `,Ee.captureBody?`on`:`off`]}),(0,K.jsxs)(`span`,{children:[`s3: `,d.s3?`configured`:`off`]}),(0,K.jsxs)(`span`,{children:[`ssh pool: `,De.keepAlive===!1?`off`:`on`]})]}),(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{className:`cursor-pointer text-sm`,children:`Full effective configuration (secrets redacted)`}),(0,K.jsx)(G5,{value:d,maxHeight:340})]})]})}),(0,K.jsx)(tb,{title:`Dashboard preferences`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`saved to `,(0,K.jsx)(`code`,{children:`dashboard.feedLimit`}),` in the config`]}),children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(zy,{className:`text-[12.5px]`,children:`Live Feed rows`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`How many matching calls the feed table renders. Up to `,pb(1e4),` are kept in memory regardless; this only bounds what is drawn.`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Live Feed rows`,value:String(S),onValueChange:e=>void C(Number(e)),options:ab.map(e=>({value:String(e),label:`${pb(e)} rows${e===200?` (default)`:``}`}))})]})}),(0,K.jsx)(tb,{title:`Version history`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`point-in-time snapshots · diff & restore`}),children:(0,K.jsx)($5,{onRestored:()=>void mc(`/api/config`).then(f).catch(()=>{})})}),(0,K.jsx)(tb,{title:`Field guide`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`every config option, documented from the schema`}),children:(0,K.jsx)(t7,{})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Bb,{}),title:`Loading configuration…`})),R===`memory`&&(0,K.jsx)(k9,{}),R===`feed`&&(0,K.jsxs)(tb,{className:`reveal`,title:`Live tool calls`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(me.length),` shown`,le.length>me.length&&` of ${pb(le.length)} matching`,` ·`,` `,pb(_.length),` buffered`]}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search tool / input / output / error…`,value:P.q,onChange:e=>F(t=>({...t,q:e.target.value}))}),Oe(`tool`,`all tools`,n?.tools??[]),Oe(`risk`,`all risk`,[`READ`,`WRITE`,`WRITE_IDEMPOTENT`,`DESTRUCTIVE`,`DANGEROUS`]),Oe(`device`,`all devices`,n?.devices??[]),Oe(`status`,`all status`,[`ok`,`error`]),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:w?`accent`:`default`,onClick:()=>T(e=>!e),icon:w?(0,K.jsx)(qc,{}):(0,K.jsx)(Gc,{}),children:w?`Resume`:`Pause`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`csv`),children:`CSV`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`json`),children:`JSON`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear`}),be&&A.size>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(X,{size:`sm`,type:`error`,onClick:()=>void Se(),icon:(0,K.jsx)(kc,{}),children:[`Confirm delete (`,A.size,`)`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>xe(!1),children:`Cancel`})]}):(0,K.jsxs)(X,{size:`sm`,ghost:!0,disabled:A.size===0,onClick:()=>xe(!0),title:`Delete the selected rows`,icon:(0,K.jsx)(il,{}),children:[`Delete`,A.size>0?` (${A.size})`:``]})]}),le.length===0?ue?(0,K.jsx)(Q9,{icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No calls match your filters`,sub:`${_.length} call${_.length===1?``:`s`} buffered — try widening the search or the risk / device / status filters.`,body:(0,K.jsx)(X,{size:`sm`,ghost:!0,className:`mt-2`,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear filters`})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`,className:`size-3`}),title:E===`off`?`Not connected`:`Listening for tool calls…`,sub:E===`off`?`The live stream is offline — it will reconnect automatically.`:`Tool calls the LLM makes against this server stream in here in real time.`}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{className:`w-7`,children:(0,K.jsx)(Ry,{"aria-label":`Select all shown rows`,checked:ge?!0:_e?`indeterminate`:!1,onCheckedChange:ye})}),(0,K.jsx)(Wy,{children:`time`}),(0,K.jsx)(Wy,{children:`tool`}),(0,K.jsx)(Wy,{children:`risk`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{className:`text-right`,children:`dur`}),(0,K.jsx)(Wy,{children:`status`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:me.map(e=>(0,K.jsxs)(Uy,{"data-state":A.has(e.id)?`selected`:void 0,className:Y(`cursor-pointer`,e.isError&&`bg-destructive/8`),onClick:()=>void pe(e),children:[(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(Ry,{"aria-label":`Select row`,checked:A.has(e.id),onCheckedChange:()=>ve(e.id)})}),(0,K.jsx)(Gy,{className:`tabular-nums`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.tool}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:Y(`rounded-full border px-1.5 py-0.5 text-[10px]`,_b[e.risk]),children:e.risk.replace(`WRITE_IDEMPOTENT`,`WRITE·I`)})}),(0,K.jsx)(Gy,{children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:ub(e.durationMs)}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-muted-foreground`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(Gy,{className:`text-muted-foreground max-w-[24rem] truncate`,children:e.isError?e.error??`error`:e.reason?(0,K.jsx)(`span`,{className:`italic`,children:e.reason}):e.output||`—`})]},e.id))})]})})]})]}),c.showModal&&c.release&&(0,K.jsx)($ee,{release:c.release,onDismiss:c.dismissRelease}),O&&(0,K.jsx)(a9,{event:O,onClose:()=>k(null)})]})}var $9=document.getElementById(`root`);$9&&(0,y.createRoot)($9).render((0,K.jsx)(ite,{}));
156
156
  </script>
157
157
  <style>
158
- @import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-mt);--font-mono:var(--font-mt);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-mt);--default-mono-font-family:var(--font-mt);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--font-mt:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);font-family:var(--font-mt);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components{@media (prefers-reduced-motion:no-preference){.js-motion .reveal{opacity:0}}}@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-px{top:-1px}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[50\%\]{top:50%}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-1\.5{bottom:calc(var(--spacing) * -1.5)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[5\]{z-index:5}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-\[3px\]{margin-top:3px}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.\[field-sizing\:fixed\]{field-sizing:fixed}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[7px\]{width:7px;height:7px}.size-\[9px\]{width:9px;height:9px}.size-\[11px\]{width:11px;height:11px}.size-\[12px\]{width:12px;height:12px}.size-\[13px\]{width:13px;height:13px}.size-\[14px\]{width:14px;height:14px}.size-\[18px\]{width:18px;height:18px}.size-\[72px\]{width:72px;height:72px}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-40{height:calc(var(--spacing) * 40)}.h-\[18px\]{height:18px}.h-\[46px\]{height:46px}.h-\[150px\]{height:150px}.h-\[200px\]{height:200px}.h-\[360px\]{height:360px}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[184px\]{max-height:184px}.max-h-\[250px\]{max-height:250px}.max-h-\[280px\]{max-height:280px}.max-h-\[320px\]{max-height:320px}.max-h-\[360px\]{max-height:360px}.max-h-\[420px\]{max-height:420px}.max-h-\[440px\]{max-height:440px}.max-h-\[500px\]{max-height:500px}.max-h-\[calc\(100vh-80px\)\]{max-height:calc(100vh - 80px)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-\[120px\]{min-height:120px}.min-h-screen{min-height:100vh}.w-0{width:0}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\/4{width:75%}.w-7{width:calc(var(--spacing) * 7)}.w-11{width:calc(var(--spacing) * 11)}.w-20{width:calc(var(--spacing) * 20)}.w-40{width:calc(var(--spacing) * 40)}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[150px\]{width:150px}.w-\[170px\]{width:170px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[380px\]{width:380px}.w-\[min\(48vw\,380px\)\]{width:min(48vw,380px)}.w-\[min\(360px\,60vw\)\]{width:min(360px,60vw)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[24rem\]{max-width:24rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[200px\]{max-width:200px}.max-w-\[260px\]{max-width:260px}.max-w-\[300px\]{max-width:300px}.max-w-\[320px\]{max-width:320px}.max-w-\[460px\]{max-width:460px}.max-w-\[520px\]{max-width:520px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(60vw\,520px\)\]{max-width:min(60vw,520px)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[38px\]{min-width:38px}.min-w-\[48px\]{min-width:48px}.min-w-\[60px\]{min-width:60px}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[980px\]{min-width:980px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-100\%-9px\)\]{--tw-translate-y:calc(-100% - 9px);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:var(--spacing)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[24px_minmax\(0\,1fr\)_auto\]{grid-template-columns:24px minmax(0,1fr) auto}.grid-cols-\[52px_1fr_34px\]{grid-template-columns:52px 1fr 34px}.grid-cols-\[90px_64px_48px_1fr\]{grid-template-columns:90px 64px 48px 1fr}.grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.grid-cols-\[240px_1fr\]{grid-template-columns:240px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,7rem\)_1fr_auto\]{grid-template-columns:minmax(0,7rem) 1fr auto}.grid-cols-\[minmax\(120px\,0\.4fr\)_1fr\]{grid-template-columns:minmax(120px,.4fr) 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(17rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(17rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(20rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(20rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(240px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,360px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(9rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-\[18px\]{gap:18px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-\[3px\]{row-gap:3px}.self-start{align-self:flex-start}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[7px\]{border-radius:7px}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--color-border\){border-color:var(--color-border)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border) 50%, transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-brand,.border-brand\/30{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/30{border-color:color-mix(in oklab, var(--brand) 30%, transparent)}}.border-brand\/40{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/40{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.border-brand\/50{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/50{border-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.border-brand\/55{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/55{border-color:color-mix(in oklab, var(--brand) 55%, transparent)}}.border-chart-1\/40{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/40{border-color:color-mix(in oklab, var(--chart-1) 40%, transparent)}}.border-chart-1\/45{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/45{border-color:color-mix(in oklab, var(--chart-1) 45%, transparent)}}.border-chart-1\/50{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/50{border-color:color-mix(in oklab, var(--chart-1) 50%, transparent)}}.border-chart-2\/40{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/40{border-color:color-mix(in oklab, var(--chart-2) 40%, transparent)}}.border-chart-2\/45{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/45{border-color:color-mix(in oklab, var(--chart-2) 45%, transparent)}}.border-chart-3\/35{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/35{border-color:color-mix(in oklab, var(--chart-3) 35%, transparent)}}.border-chart-3\/40{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/40{border-color:color-mix(in oklab, var(--chart-3) 40%, transparent)}}.border-chart-4\/40{border-color:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.border-chart-4\/40{border-color:color-mix(in oklab, var(--chart-4) 40%, transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/40{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.border-destructive\/45{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/45{border-color:color-mix(in oklab, var(--destructive) 45%, transparent)}}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/50{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.border-input{border-color:var(--input)}.border-success\/35{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/35{border-color:color-mix(in oklab, var(--success) 35%, transparent)}}.border-success\/40{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/40{border-color:color-mix(in oklab, var(--success) 40%, transparent)}}.border-success\/45{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/45{border-color:color-mix(in oklab, var(--success) 45%, transparent)}}.border-transparent{border-color:#0000}.border-warning\/30{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/30{border-color:color-mix(in oklab, var(--warning) 30%, transparent)}}.border-warning\/40{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/40{border-color:color-mix(in oklab, var(--warning) 40%, transparent)}}.border-warning\/45{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/45{border-color:color-mix(in oklab, var(--warning) 45%, transparent)}}.border-warning\/60{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/60{border-color:color-mix(in oklab, var(--warning) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-border{border-left-color:var(--border)}.border-l-destructive{border-left-color:var(--destructive)}.border-l-success{border-left-color:var(--success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--warning)}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-border{background-color:var(--border)}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/10{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.bg-brand\/15{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/15{background-color:color-mix(in oklab, var(--brand) 15%, transparent)}}.bg-brand\/20{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/20{background-color:color-mix(in oklab, var(--brand) 20%, transparent)}}.bg-brand\/40{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/40{background-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.bg-brand\/\[0\.13\]{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/\[0\.13\]{background-color:color-mix(in oklab, var(--brand) 13%, transparent)}}.bg-card{background-color:var(--card)}.bg-chart-1\/10{background-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.bg-chart-1\/10{background-color:color-mix(in oklab, var(--chart-1) 10%, transparent)}}.bg-chart-2,.bg-chart-2\/10{background-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.bg-chart-2\/10{background-color:color-mix(in oklab, var(--chart-2) 10%, transparent)}}.bg-destructive,.bg-destructive\/8{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/8{background-color:color-mix(in oklab, var(--destructive) 8%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/60{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/60{background-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/45{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/45{background-color:color-mix(in oklab, var(--muted) 45%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\/8{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/8{background-color:color-mix(in oklab, var(--warning) 8%, transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.fill-background{fill:var(--background)}.fill-brand\/15{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/15{fill:color-mix(in oklab, var(--brand) 15%, transparent)}}.fill-brand\/25{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/25{fill:color-mix(in oklab, var(--brand) 25%, transparent)}}.fill-card{fill:var(--card)}.fill-chart-3\/20{fill:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.fill-chart-3\/20{fill:color-mix(in oklab, var(--chart-3) 20%, transparent)}}.fill-chart-4\/15{fill:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.fill-chart-4\/15{fill:color-mix(in oklab, var(--chart-4) 15%, transparent)}}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-muted{fill:var(--muted)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-none{fill:none}.fill-success\/20{fill:var(--success)}@supports (color:color-mix(in lab, red, red)){.fill-success\/20{fill:color-mix(in oklab, var(--success) 20%, transparent)}}.fill-warning\/15{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.fill-warning\/15{fill:color-mix(in oklab, var(--warning) 15%, transparent)}}.stroke-background{stroke:var(--background)}.stroke-border,.stroke-border\/40{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/40{stroke:color-mix(in oklab, var(--border) 40%, transparent)}}.stroke-border\/60{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/60{stroke:color-mix(in oklab, var(--border) 60%, transparent)}}.stroke-border\/70{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/70{stroke:color-mix(in oklab, var(--border) 70%, transparent)}}.stroke-brand,.stroke-brand\/55{stroke:var(--brand)}@supports (color:color-mix(in lab, red, red)){.stroke-brand\/55{stroke:color-mix(in oklab, var(--brand) 55%, transparent)}}.stroke-chart-2\/70{stroke:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.stroke-chart-2\/70{stroke:color-mix(in oklab, var(--chart-2) 70%, transparent)}}.stroke-chart-3{stroke:var(--chart-3)}.stroke-chart-4{stroke:var(--chart-4)}.stroke-foreground{stroke:var(--foreground)}.stroke-none{stroke:none}.stroke-success{stroke:var(--success)}.stroke-warning{stroke:var(--warning)}.stroke-1{stroke-width:1px}.stroke-2{stroke-width:2px}.stroke-\[1\.5px\]{stroke-width:1.5px}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[5px\]{padding-inline:5px}.px-\[7px\]{padding-inline:7px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-\[54px\]{padding-block:54px}.py-px{padding-block:1px}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-px{padding-top:1px}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mt)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-\[11px\]\/\[1\.5\]{font-size:11px;line-height:1.5}.text-\[11px\]\/\[1\.6\]{font-size:11px;line-height:1.6}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[44px\]{font-size:44px}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.5\]{--tw-leading:1.5;line-height:1.5}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.35\]{--tw-leading:1.35;line-height:1.35}.leading-\[8px\]{--tw-leading:8px;line-height:8px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.04em\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.09em\]{--tw-tracking:.09em;letter-spacing:.09em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:2\]{tab-size:2}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-brand{color:var(--brand)}.text-brand-foreground{color:var(--brand-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-chart-1{color:var(--chart-1)}.text-chart-2{color:var(--chart-2)}.text-chart-3{color:var(--chart-3)}.text-chart-4{color:var(--chart-4)}.text-chart-5{color:var(--chart-5)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/50{color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.text-muted-foreground\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-success{color:var(--success)}.text-transparent{color:#0000}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.caret-brand{caret-color:var(--brand)}.accent-brand{accent-color:var(--brand)}.opacity-15{opacity:.15}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-brand\/25{--tw-ring-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ring-brand\/25{--tw-ring-color:color-mix(in oklab, var(--brand) 25%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale-\[0\.4\]{--tw-grayscale:grayscale(.4);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,border-color\]{transition-property:transform,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-\[400ms\]{--tw-duration:.4s;transition-duration:.4s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-50{--tw-enter-scale:.5}.zoom-in-95{--tw-enter-scale:.95}.\[text-shadow\:0_0_3px_rgba\(0\,0\,0\,0\.6\)\]{text-shadow:0 0 3px #0009}.\[transition\:stroke_0\.1s_ease\]{transition:stroke .1s}.\[vector-effect\:non-scaling-stroke\]{vector-effect:non-scaling-stroke}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[orientation\=horizontal\]\/tabs\:h-9:is(:where(.group\/tabs)[data-orientation=horizontal] *){height:calc(var(--spacing) * 9)}.group-data-\[orientation\=vertical\]\/tabs\:h-fit:is(:where(.group\/tabs)[data-orientation=vertical] *){height:fit-content}.group-data-\[orientation\=vertical\]\/tabs\:w-full:is(:where(.group\/tabs)[data-orientation=vertical] *){width:100%}.group-data-\[orientation\=vertical\]\/tabs\:flex-col:is(:where(.group\/tabs)[data-orientation=vertical] *){flex-direction:column}.group-data-\[orientation\=vertical\]\/tabs\:justify-start:is(:where(.group\/tabs)[data-orientation=vertical] *){justify-content:flex-start}.group-data-\[size\=default\]\/switch\:size-4:is(:where(.group\/switch)[data-size=default] *){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/switch\:size-3:is(:where(.group\/switch)[data-size=sm] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[variant\=line\]\/tabs-list\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *){background-color:#0000}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-brand\/35 ::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35 ::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-brand\/35::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-\[25px\]:before{content:var(--tw-content);top:25px}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-\[22px\]:before{content:var(--tw-content);left:22px}.before\:w-px:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:var(--border)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);inset-inline:0}.group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);bottom:-5px}.group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}.group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);inset-block:0}.group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}.group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.last\:before\:hidden:last-child:before{content:var(--tw-content);display:none}.odd\:bg-card\/40:nth-child(odd){background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.odd\:bg-card\/40:nth-child(odd){background-color:color-mix(in oklab, var(--card) 40%, transparent)}}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-brand\/35:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/35:hover{border-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.hover\:border-brand\/40:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/40:hover{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.hover\:border-chart-2\/35:hover{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.hover\:border-chart-2\/35:hover{border-color:color-mix(in oklab, var(--chart-2) 35%, transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-brand\/10:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/10:hover{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.hover\:bg-brand\/90:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/90:hover{background-color:color-mix(in oklab, var(--brand) 90%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-foreground\/5:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/5:hover{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-success\/10:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/10:hover{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.hover\:bg-success\/90:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/90:hover{background-color:color-mix(in oklab, var(--success) 90%, transparent)}}.hover\:bg-warning\/10:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/10:hover{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.hover\:bg-warning\/90:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/90:hover{background-color:color-mix(in oklab, var(--warning) 90%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-0:focus-visible{border-style:var(--tw-border-style);border-width:0}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=default\]\:h-\[1\.15rem\][data-size=default]{height:1.15rem}.data-\[size\=default\]\:w-8[data-size=default]{width:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:h-3\.5[data-size=sm]{height:calc(var(--spacing) * 3.5)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:w-6[data-size=sm]{width:calc(var(--spacing) * 6)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.group-data-\[variant\=default\]\/tabs-list\:data-\[state\=active\]\:shadow-sm:is(:where(.group\/tabs-list)[data-variant=default] *)[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:shadow-none:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]:after{content:var(--tw-content);opacity:1}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}@media not all and (width>=720px){.max-\[720px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{border-color:#0000}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_\.j-bool\]\:text-chart-4 .j-bool{color:var(--chart-4)}.\[\&_\.j-key\]\:text-chart-1 .j-key{color:var(--chart-1)}.\[\&_\.j-null\]\:text-muted-foreground .j-null{color:var(--muted-foreground)}.\[\&_\.j-num\]\:text-chart-3 .j-num{color:var(--chart-3)}.\[\&_\.j-str\]\:text-chart-2 .j-str{color:var(--chart-2)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:color-mix(in oklab, var(--border) 50%, transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.wn-check\]\:inline-block .wn-check{display:inline-block}.\[\&_\.wn-check\]\:w-4 .wn-check{width:calc(var(--spacing) * 4)}.\[\&_\.wn-table-wrap\]\:my-2\.5 .wn-table-wrap{margin-block:calc(var(--spacing) * 2.5)}.\[\&_\.wn-table-wrap\]\:overflow-x-auto .wn-table-wrap{overflow-x:auto}.\[\&_\.wn-table-wrap\]\:rounded-md .wn-table-wrap{border-radius:var(--radius)}.\[\&_\.wn-table-wrap\]\:border .wn-table-wrap{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.wn-table-wrap\]\:border-border .wn-table-wrap{border-color:var(--border)}.\[\&_\.wn-task\]\:-ml-\[18px\] .wn-task{margin-left:-18px}.\[\&_\.wn-task\]\:list-none .wn-task{list-style-type:none}.\[\&_\.wn-task\.done_\.wn-check\]\:text-success .wn-task.done .wn-check{color:var(--success)}.\[\&_a\]\:text-brand a{color:var(--brand)}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-2 a{text-underline-offset:2px}.\[\&_b\]\:font-medium b{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_b\]\:break-words b{overflow-wrap:break-word}.\[\&_b\]\:text-foreground b{color:var(--foreground)}.\[\&_blockquote\]\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\[\&_blockquote\]\:border-l-\[3px\] blockquote{border-left-style:var(--tw-border-style);border-left-width:3px}.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.\[\&_blockquote\]\:px-3\.5 blockquote{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_blockquote\]\:py-1\.5 blockquote{padding-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:italic blockquote{font-style:italic}.\[\&_code\]\:rounded code{border-radius:.25rem}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border code{border-color:var(--border)}.\[\&_code\]\:bg-muted code{background-color:var(--muted)}.\[\&_code\]\:px-1\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:font-mono code{font-family:var(--font-mt)}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:text-brand code{color:var(--brand)}.\[\&_del\]\:text-muted-foreground del{color:var(--muted-foreground)}.\[\&_del\]\:opacity-60 del{opacity:.6}.\[\&_h2\]\:mt-\[18px\] h2{margin-top:18px}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:text-\[17px\] h2{font-size:17px}.\[\&_h2\]\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h2\]\:text-foreground h2{color:var(--foreground)}.\[\&_h3\]\:mt-\[18px\] h3{margin-top:18px}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:text-\[15px\] h3{font-size:15px}.\[\&_h3\]\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h3\]\:text-foreground h3{color:var(--foreground)}.\[\&_h4\]\:mt-\[18px\] h4{margin-top:18px}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-\[14px\] h4{font-size:14px}.\[\&_h4\]\:font-bold h4{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h4\]\:text-foreground h4{color:var(--foreground)}.\[\&_h5\]\:mt-\[18px\] h5{margin-top:18px}.\[\&_h5\]\:mb-1\.5 h5{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h5\]\:text-\[14px\] h5{font-size:14px}.\[\&_h5\]\:font-bold h5{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h5\]\:text-foreground h5{color:var(--foreground)}.\[\&_hr\]\:my-3\.5 hr{margin-block:calc(var(--spacing) * 3.5)}.\[\&_hr\]\:border-0 hr{border-style:var(--tw-border-style);border-width:0}.\[\&_hr\]\:border-t hr{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_hr\]\:border-border hr{border-color:var(--border)}.\[\&_i\]\:inline-block i{display:inline-block}.\[\&_i\]\:size-2\.5 i{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_i\]\:rounded-\[3px\] i{border-radius:3px}.\[\&_img\]\:my-1\.5 img{margin-block:calc(var(--spacing) * 1.5)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-md img{border-radius:var(--radius)}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_li\]\:my-\[3px\] li{margin-block:3px}.\[\&_li\]\:marker\:text-brand li ::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li ::-webkit-details-marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::-webkit-details-marker{color:var(--brand)}.\[\&_ol\]\:my-\[5px\] ol{margin-block:5px}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-\[22px\] ol{padding-left:22px}.\[\&_p\]\:my-\[5px\] p{margin-block:5px}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:var(--radius)}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border pre{border-color:var(--border)}.\[\&_pre\]\:bg-background pre{background-color:var(--background)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:text-muted-foreground pre code{color:var(--muted-foreground)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-foreground strong{color:var(--foreground)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_table\]\:w-full table{width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:font-mono table{font-family:var(--font-mt)}.\[\&_table\]\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-border td{border-color:var(--border)}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:py-\[7px\] td{padding-block:7px}.\[\&_td\]\:text-muted-foreground td{color:var(--muted-foreground)}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-border th{border-color:var(--border)}.\[\&_th\]\:bg-muted th{background-color:var(--muted)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:py-\[7px\] th{padding-block:7px}.\[\&_th\]\:text-left th{text-align:left}.\[\&_th\]\:text-\[11px\] th{font-size:11px}.\[\&_th\]\:font-semibold th{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_th\]\:tracking-wide th{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_th\]\:text-foreground th{color:var(--foreground)}.\[\&_th\]\:uppercase th{text-transform:uppercase}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&_ul\]\:my-\[5px\] ul{margin-block:5px}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-\[18px\] ul{padding-left:18px}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>b\]\:text-foreground>b{color:var(--foreground)}.\[\&\>span\]\:inline-flex>span{display:inline-flex}.\[\&\>span\]\:items-center>span{align-items:center}.\[\&\>span\]\:gap-1\.5>span{gap:calc(var(--spacing) * 1.5)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, var(--secondary) 90%, transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}a.\[a\&\]\:hover\:underline:hover{text-decoration-line:underline}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.conn{display:block;overflow:visible}.conn-grid{fill:none;stroke:var(--border);stroke-opacity:.7;stroke-dasharray:2 7}.conn-sonar{fill:none;stroke:var(--brand);stroke-width:1.5px;opacity:0;animation:3.3s ease-out infinite conn-sonar}.conn-hub-glow{fill:var(--brand);opacity:.22;filter:blur(11px)}.conn-hub-ring{fill:none;stroke:var(--brand);stroke-width:1.4px;stroke-dasharray:4 9;opacity:.7;transform-box:fill-box;transform-origin:50%;animation:15s linear infinite conn-rot}.conn-node text{pointer-events:none}.conn-node-halo{fill:none;stroke-width:2px;transform-box:fill-box;transform-origin:50%;animation:2.4s ease-in-out infinite conn-halo}.conn-link{fill:none;stroke-width:1.6px;opacity:.38}.conn-flow{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:2 13;opacity:.9;filter:drop-shadow(0 0 4px);animation:1.05s linear infinite conn-flow}.conn-packet{filter:drop-shadow(0 0 6px var(--chart-2))}.conn-chevron{fill:none;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;opacity:.6}.conn-tunnel-halo{fill:none;stroke-width:8px;stroke-linecap:round;opacity:.1}.conn-tunnel{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:6 6;animation:.9s linear infinite conn-tunnel-flow}.conn-tunnel-lock{filter:drop-shadow(0 0 4px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-lock{filter:drop-shadow(0 0 4px color-mix(in srgb, var(--warning) 80%, transparent))}}.conn-tunnel-sat{stroke-width:1.5px;filter:drop-shadow(0 0 5px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-sat{filter:drop-shadow(0 0 5px color-mix(in srgb, var(--warning) 53%, transparent))}}.conn-tunnel-badge{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{fill:color-mix(in srgb, var(--warning) 16%, var(--background))}}.conn-tunnel-badge{stroke:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{stroke:color-mix(in srgb, var(--warning) 60%, var(--border))}}.conn-tunnel-badge{stroke-width:1px}.conn-tunnel-badge-tx{fill:var(--warning);letter-spacing:.02em;font-weight:700}.jump-route__wire{background-image:linear-gradient(90deg, var(--border) 0 50%, transparent 50% 100%);background-size:8px 2px;border-radius:2px;flex:1;min-width:18px;height:2px;animation:.7s linear infinite jump-wire}.jump-route__wire--enc{background-image:linear-gradient(90deg, var(--warning) 0 55%, transparent 55% 100%);min-width:34px;height:3px;box-shadow:0 0 8px -1px var(--warning);background-size:10px 3px;position:relative}@supports (color:color-mix(in lab, red, red)){.jump-route__wire--enc{box-shadow:0 0 8px -1px color-mix(in srgb, var(--warning) 53%, transparent)}}.jump-route__lock{filter:drop-shadow(0 0 3px var(--warning));font-size:11px;animation:2.2s linear infinite jump-lock;position:absolute;top:50%}.topo-sweep{animation:8s linear infinite topo-sweep}.topo-ring{transform-box:fill-box;transform-origin:50%;animation:90s linear infinite reverse topo-ring}.topo-flow{animation:1.4s linear infinite topo-flow}.topo-pulse{transform-box:fill-box;transform-origin:50%;animation:2.6s ease-in-out infinite topo-pulse}.topo-halo{transform-box:fill-box;transform-origin:50%;animation:2.2s ease-out infinite topo-halo}@keyframes topo-sweep{to{transform:rotate(360deg)}}@keyframes topo-ring{to{transform:rotate(360deg)}}@keyframes topo-flow{to{stroke-dashoffset:-16px}}@keyframes topo-pulse{0%,to{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.12)}}@keyframes topo-halo{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.9)}}@keyframes conn-sonar{0%{r:30px;opacity:.5}to{r:150px;opacity:0}}@keyframes conn-flow{to{stroke-dashoffset:-60px}}@keyframes conn-rot{to{transform:rotate(360deg)}}@keyframes conn-halo{0%,to{opacity:.45;transform:scale(1)}50%{opacity:0;transform:scale(1.55)}}@keyframes conn-tunnel-flow{to{stroke-dashoffset:-24px}}@keyframes jump-wire{to{background-position:8px 0}}@keyframes jump-lock{0%{left:-4px;transform:translateY(-50%)scale(.9)}50%{transform:translateY(-50%)scale(1.1)}to{left:calc(100% - 8px);transform:translateY(-50%)scale(.9)}}@media (prefers-reduced-motion:reduce){.conn-sonar,.topo-sweep{display:none}.conn-flow,.conn-hub-ring,.conn-node-halo,.conn-tunnel,.jump-route__wire,.jump-route__lock,.topo-ring,.topo-flow,.topo-pulse,.topo-halo{animation:none}.conn-packet animateMotion,.conn-tunnel-lock animateMotion{display:none}}:root{--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:#0a0a0a;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#0a0a0a;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#0a0a0a;--destructive:#e5484d;--destructive-foreground:#fff;--success:#18794e;--warning:#ab6400;--border:#e4e4e7;--input:#e4e4e7;--radius:.5rem;--page-accent:var(--foreground);--page-accent-2:var(--muted-foreground);--brand:var(--page-accent);--brand-foreground:var(--background);--ring:var(--brand);--chart-1:#0068d6;--chart-2:#0f8a7e;--chart-3:#3d8f2f;--chart-4:#a35200;--chart-5:#7048c4;--entity-1:#0068d6;--entity-2:#087a52;--entity-3:#6d3fc4;--entity-4:#a35200;--entity-5:#c02a2a;--entity-6:#0f8a7e;--entity-7:#c0267a;--entity-8:#2563eb;--entity-9:#8a6a00;--entity-10:#b4530f}.dark{--background:#0a0a0a;--foreground:#ededed;--card:#111;--card-foreground:#ededed;--popover:#111;--popover-foreground:#ededed;--primary:#ededed;--primary-foreground:#0a0a0a;--secondary:#1a1a1a;--secondary-foreground:#ededed;--muted:#1a1a1a;--muted-foreground:#a1a1a1;--accent:#1a1a1a;--accent-foreground:#ededed;--destructive:#ff5c5c;--destructive-foreground:#fff;--success:#2dd4a7;--warning:#f5a623;--border:#2a2a2a;--input:#2a2a2a;--chart-1:#3291ff;--chart-2:#2dd4bf;--chart-3:#69d05a;--chart-4:#f5a623;--chart-5:#9d7bff;--entity-1:#3291ff;--entity-2:#34d399;--entity-3:#a78bfa;--entity-4:#f59e0b;--entity-5:#ef4444;--entity-6:#2dd4bf;--entity-7:#f472b6;--entity-8:#60a5fa;--entity-9:#facc15;--entity-10:#fb923c}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
158
+ @import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-mt);--font-mono:var(--font-mt);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-mt);--default-mono-font-family:var(--font-mt);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--font-mt:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);font-family:var(--font-mt);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components{@media (prefers-reduced-motion:no-preference){.js-motion .reveal{opacity:0}}}@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-px{top:-1px}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[50\%\]{top:50%}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-1\.5{bottom:calc(var(--spacing) * -1.5)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[5\]{z-index:5}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-\[3px\]{margin-top:3px}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.\[field-sizing\:fixed\]{field-sizing:fixed}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[7px\]{width:7px;height:7px}.size-\[9px\]{width:9px;height:9px}.size-\[11px\]{width:11px;height:11px}.size-\[12px\]{width:12px;height:12px}.size-\[13px\]{width:13px;height:13px}.size-\[14px\]{width:14px;height:14px}.size-\[18px\]{width:18px;height:18px}.size-\[72px\]{width:72px;height:72px}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-40{height:calc(var(--spacing) * 40)}.h-\[18px\]{height:18px}.h-\[46px\]{height:46px}.h-\[150px\]{height:150px}.h-\[200px\]{height:200px}.h-\[360px\]{height:360px}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[184px\]{max-height:184px}.max-h-\[250px\]{max-height:250px}.max-h-\[280px\]{max-height:280px}.max-h-\[320px\]{max-height:320px}.max-h-\[360px\]{max-height:360px}.max-h-\[420px\]{max-height:420px}.max-h-\[440px\]{max-height:440px}.max-h-\[500px\]{max-height:500px}.max-h-\[calc\(100vh-80px\)\]{max-height:calc(100vh - 80px)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-\[120px\]{min-height:120px}.min-h-screen{min-height:100vh}.w-0{width:0}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\/4{width:75%}.w-7{width:calc(var(--spacing) * 7)}.w-11{width:calc(var(--spacing) * 11)}.w-20{width:calc(var(--spacing) * 20)}.w-40{width:calc(var(--spacing) * 40)}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[150px\]{width:150px}.w-\[170px\]{width:170px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[380px\]{width:380px}.w-\[min\(48vw\,380px\)\]{width:min(48vw,380px)}.w-\[min\(360px\,60vw\)\]{width:min(360px,60vw)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[24rem\]{max-width:24rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[200px\]{max-width:200px}.max-w-\[260px\]{max-width:260px}.max-w-\[300px\]{max-width:300px}.max-w-\[320px\]{max-width:320px}.max-w-\[460px\]{max-width:460px}.max-w-\[520px\]{max-width:520px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(60vw\,520px\)\]{max-width:min(60vw,520px)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[38px\]{min-width:38px}.min-w-\[48px\]{min-width:48px}.min-w-\[60px\]{min-width:60px}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[980px\]{min-width:980px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-100\%-9px\)\]{--tw-translate-y:calc(-100% - 9px);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:var(--spacing)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[24px_minmax\(0\,1fr\)_auto\]{grid-template-columns:24px minmax(0,1fr) auto}.grid-cols-\[52px_1fr_34px\]{grid-template-columns:52px 1fr 34px}.grid-cols-\[90px_64px_48px_1fr\]{grid-template-columns:90px 64px 48px 1fr}.grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.grid-cols-\[240px_1fr\]{grid-template-columns:240px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,7rem\)_1fr_auto\]{grid-template-columns:minmax(0,7rem) 1fr auto}.grid-cols-\[minmax\(120px\,0\.4fr\)_1fr\]{grid-template-columns:minmax(120px,.4fr) 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(20rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(20rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(22rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(22rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(240px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,360px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(9rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-\[18px\]{gap:18px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-\[3px\]{row-gap:3px}.self-start{align-self:flex-start}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[7px\]{border-radius:7px}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--color-border\){border-color:var(--color-border)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border) 50%, transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-brand,.border-brand\/30{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/30{border-color:color-mix(in oklab, var(--brand) 30%, transparent)}}.border-brand\/40{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/40{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.border-brand\/50{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/50{border-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.border-brand\/55{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/55{border-color:color-mix(in oklab, var(--brand) 55%, transparent)}}.border-chart-1\/40{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/40{border-color:color-mix(in oklab, var(--chart-1) 40%, transparent)}}.border-chart-1\/45{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/45{border-color:color-mix(in oklab, var(--chart-1) 45%, transparent)}}.border-chart-1\/50{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/50{border-color:color-mix(in oklab, var(--chart-1) 50%, transparent)}}.border-chart-2\/40{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/40{border-color:color-mix(in oklab, var(--chart-2) 40%, transparent)}}.border-chart-2\/45{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/45{border-color:color-mix(in oklab, var(--chart-2) 45%, transparent)}}.border-chart-3\/35{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/35{border-color:color-mix(in oklab, var(--chart-3) 35%, transparent)}}.border-chart-3\/40{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/40{border-color:color-mix(in oklab, var(--chart-3) 40%, transparent)}}.border-chart-4\/40{border-color:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.border-chart-4\/40{border-color:color-mix(in oklab, var(--chart-4) 40%, transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/40{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.border-destructive\/45{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/45{border-color:color-mix(in oklab, var(--destructive) 45%, transparent)}}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/50{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.border-input{border-color:var(--input)}.border-success\/35{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/35{border-color:color-mix(in oklab, var(--success) 35%, transparent)}}.border-success\/40{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/40{border-color:color-mix(in oklab, var(--success) 40%, transparent)}}.border-success\/45{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/45{border-color:color-mix(in oklab, var(--success) 45%, transparent)}}.border-transparent{border-color:#0000}.border-warning\/30{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/30{border-color:color-mix(in oklab, var(--warning) 30%, transparent)}}.border-warning\/40{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/40{border-color:color-mix(in oklab, var(--warning) 40%, transparent)}}.border-warning\/45{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/45{border-color:color-mix(in oklab, var(--warning) 45%, transparent)}}.border-warning\/60{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/60{border-color:color-mix(in oklab, var(--warning) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-border{border-left-color:var(--border)}.border-l-destructive{border-left-color:var(--destructive)}.border-l-success{border-left-color:var(--success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--warning)}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-border{background-color:var(--border)}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/10{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.bg-brand\/15{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/15{background-color:color-mix(in oklab, var(--brand) 15%, transparent)}}.bg-brand\/20{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/20{background-color:color-mix(in oklab, var(--brand) 20%, transparent)}}.bg-brand\/40{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/40{background-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.bg-brand\/\[0\.13\]{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/\[0\.13\]{background-color:color-mix(in oklab, var(--brand) 13%, transparent)}}.bg-card{background-color:var(--card)}.bg-chart-1\/10{background-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.bg-chart-1\/10{background-color:color-mix(in oklab, var(--chart-1) 10%, transparent)}}.bg-chart-2,.bg-chart-2\/10{background-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.bg-chart-2\/10{background-color:color-mix(in oklab, var(--chart-2) 10%, transparent)}}.bg-destructive,.bg-destructive\/8{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/8{background-color:color-mix(in oklab, var(--destructive) 8%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/60{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/60{background-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/45{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/45{background-color:color-mix(in oklab, var(--muted) 45%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\/8{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/8{background-color:color-mix(in oklab, var(--warning) 8%, transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.fill-background{fill:var(--background)}.fill-brand\/15{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/15{fill:color-mix(in oklab, var(--brand) 15%, transparent)}}.fill-brand\/25{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/25{fill:color-mix(in oklab, var(--brand) 25%, transparent)}}.fill-card{fill:var(--card)}.fill-chart-3\/20{fill:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.fill-chart-3\/20{fill:color-mix(in oklab, var(--chart-3) 20%, transparent)}}.fill-chart-4\/15{fill:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.fill-chart-4\/15{fill:color-mix(in oklab, var(--chart-4) 15%, transparent)}}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-muted{fill:var(--muted)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-none{fill:none}.fill-success\/20{fill:var(--success)}@supports (color:color-mix(in lab, red, red)){.fill-success\/20{fill:color-mix(in oklab, var(--success) 20%, transparent)}}.fill-warning\/15{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.fill-warning\/15{fill:color-mix(in oklab, var(--warning) 15%, transparent)}}.stroke-background{stroke:var(--background)}.stroke-border,.stroke-border\/40{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/40{stroke:color-mix(in oklab, var(--border) 40%, transparent)}}.stroke-border\/60{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/60{stroke:color-mix(in oklab, var(--border) 60%, transparent)}}.stroke-border\/70{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/70{stroke:color-mix(in oklab, var(--border) 70%, transparent)}}.stroke-brand,.stroke-brand\/55{stroke:var(--brand)}@supports (color:color-mix(in lab, red, red)){.stroke-brand\/55{stroke:color-mix(in oklab, var(--brand) 55%, transparent)}}.stroke-chart-2\/70{stroke:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.stroke-chart-2\/70{stroke:color-mix(in oklab, var(--chart-2) 70%, transparent)}}.stroke-chart-3{stroke:var(--chart-3)}.stroke-chart-4{stroke:var(--chart-4)}.stroke-foreground{stroke:var(--foreground)}.stroke-none{stroke:none}.stroke-success{stroke:var(--success)}.stroke-warning{stroke:var(--warning)}.stroke-1{stroke-width:1px}.stroke-2{stroke-width:2px}.stroke-\[1\.5px\]{stroke-width:1.5px}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[5px\]{padding-inline:5px}.px-\[7px\]{padding-inline:7px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-\[54px\]{padding-block:54px}.py-px{padding-block:1px}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-px{padding-top:1px}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mt)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-\[11px\]\/\[1\.5\]{font-size:11px;line-height:1.5}.text-\[11px\]\/\[1\.6\]{font-size:11px;line-height:1.6}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[44px\]{font-size:44px}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.5\]{--tw-leading:1.5;line-height:1.5}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.35\]{--tw-leading:1.35;line-height:1.35}.leading-\[8px\]{--tw-leading:8px;line-height:8px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.04em\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.09em\]{--tw-tracking:.09em;letter-spacing:.09em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:2\]{tab-size:2}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-brand{color:var(--brand)}.text-brand-foreground{color:var(--brand-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-chart-1{color:var(--chart-1)}.text-chart-2{color:var(--chart-2)}.text-chart-3{color:var(--chart-3)}.text-chart-4{color:var(--chart-4)}.text-chart-5{color:var(--chart-5)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/50{color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.text-muted-foreground\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-success{color:var(--success)}.text-transparent{color:#0000}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.caret-brand{caret-color:var(--brand)}.accent-brand{accent-color:var(--brand)}.opacity-15{opacity:.15}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-brand\/25{--tw-ring-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ring-brand\/25{--tw-ring-color:color-mix(in oklab, var(--brand) 25%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale-\[0\.4\]{--tw-grayscale:grayscale(.4);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,border-color\]{transition-property:transform,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-\[400ms\]{--tw-duration:.4s;transition-duration:.4s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-50{--tw-enter-scale:.5}.zoom-in-95{--tw-enter-scale:.95}.\[text-shadow\:0_0_3px_rgba\(0\,0\,0\,0\.6\)\]{text-shadow:0 0 3px #0009}.\[transition\:stroke_0\.1s_ease\]{transition:stroke .1s}.\[vector-effect\:non-scaling-stroke\]{vector-effect:non-scaling-stroke}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[orientation\=horizontal\]\/tabs\:h-9:is(:where(.group\/tabs)[data-orientation=horizontal] *){height:calc(var(--spacing) * 9)}.group-data-\[orientation\=vertical\]\/tabs\:h-fit:is(:where(.group\/tabs)[data-orientation=vertical] *){height:fit-content}.group-data-\[orientation\=vertical\]\/tabs\:w-full:is(:where(.group\/tabs)[data-orientation=vertical] *){width:100%}.group-data-\[orientation\=vertical\]\/tabs\:flex-col:is(:where(.group\/tabs)[data-orientation=vertical] *){flex-direction:column}.group-data-\[orientation\=vertical\]\/tabs\:justify-start:is(:where(.group\/tabs)[data-orientation=vertical] *){justify-content:flex-start}.group-data-\[size\=default\]\/switch\:size-4:is(:where(.group\/switch)[data-size=default] *){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/switch\:size-3:is(:where(.group\/switch)[data-size=sm] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[variant\=line\]\/tabs-list\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *){background-color:#0000}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-brand\/35 ::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35 ::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-brand\/35::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-\[25px\]:before{content:var(--tw-content);top:25px}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-\[22px\]:before{content:var(--tw-content);left:22px}.before\:w-px:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:var(--border)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);inset-inline:0}.group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);bottom:-5px}.group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}.group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);inset-block:0}.group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}.group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.last\:before\:hidden:last-child:before{content:var(--tw-content);display:none}.odd\:bg-card\/40:nth-child(odd){background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.odd\:bg-card\/40:nth-child(odd){background-color:color-mix(in oklab, var(--card) 40%, transparent)}}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-brand\/35:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/35:hover{border-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.hover\:border-brand\/40:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/40:hover{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.hover\:border-chart-2\/35:hover{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.hover\:border-chart-2\/35:hover{border-color:color-mix(in oklab, var(--chart-2) 35%, transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-brand\/10:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/10:hover{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.hover\:bg-brand\/90:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/90:hover{background-color:color-mix(in oklab, var(--brand) 90%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-foreground\/5:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/5:hover{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-success\/10:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/10:hover{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.hover\:bg-success\/90:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/90:hover{background-color:color-mix(in oklab, var(--success) 90%, transparent)}}.hover\:bg-warning\/10:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/10:hover{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.hover\:bg-warning\/90:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/90:hover{background-color:color-mix(in oklab, var(--warning) 90%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-0:focus-visible{border-style:var(--tw-border-style);border-width:0}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=default\]\:h-\[1\.15rem\][data-size=default]{height:1.15rem}.data-\[size\=default\]\:w-8[data-size=default]{width:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:h-3\.5[data-size=sm]{height:calc(var(--spacing) * 3.5)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:w-6[data-size=sm]{width:calc(var(--spacing) * 6)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.group-data-\[variant\=default\]\/tabs-list\:data-\[state\=active\]\:shadow-sm:is(:where(.group\/tabs-list)[data-variant=default] *)[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:shadow-none:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]:after{content:var(--tw-content);opacity:1}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}@media not all and (width>=720px){.max-\[720px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{border-color:#0000}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_\.j-bool\]\:text-chart-4 .j-bool{color:var(--chart-4)}.\[\&_\.j-key\]\:text-chart-1 .j-key{color:var(--chart-1)}.\[\&_\.j-null\]\:text-muted-foreground .j-null{color:var(--muted-foreground)}.\[\&_\.j-num\]\:text-chart-3 .j-num{color:var(--chart-3)}.\[\&_\.j-str\]\:text-chart-2 .j-str{color:var(--chart-2)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:color-mix(in oklab, var(--border) 50%, transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.wn-check\]\:inline-block .wn-check{display:inline-block}.\[\&_\.wn-check\]\:w-4 .wn-check{width:calc(var(--spacing) * 4)}.\[\&_\.wn-table-wrap\]\:my-2\.5 .wn-table-wrap{margin-block:calc(var(--spacing) * 2.5)}.\[\&_\.wn-table-wrap\]\:overflow-x-auto .wn-table-wrap{overflow-x:auto}.\[\&_\.wn-table-wrap\]\:rounded-md .wn-table-wrap{border-radius:var(--radius)}.\[\&_\.wn-table-wrap\]\:border .wn-table-wrap{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.wn-table-wrap\]\:border-border .wn-table-wrap{border-color:var(--border)}.\[\&_\.wn-task\]\:-ml-\[18px\] .wn-task{margin-left:-18px}.\[\&_\.wn-task\]\:list-none .wn-task{list-style-type:none}.\[\&_\.wn-task\.done_\.wn-check\]\:text-success .wn-task.done .wn-check{color:var(--success)}.\[\&_a\]\:text-brand a{color:var(--brand)}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-2 a{text-underline-offset:2px}.\[\&_b\]\:font-medium b{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_b\]\:break-words b{overflow-wrap:break-word}.\[\&_b\]\:text-foreground b{color:var(--foreground)}.\[\&_blockquote\]\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\[\&_blockquote\]\:border-l-\[3px\] blockquote{border-left-style:var(--tw-border-style);border-left-width:3px}.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.\[\&_blockquote\]\:px-3\.5 blockquote{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_blockquote\]\:py-1\.5 blockquote{padding-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:italic blockquote{font-style:italic}.\[\&_code\]\:rounded code{border-radius:.25rem}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border code{border-color:var(--border)}.\[\&_code\]\:bg-muted code{background-color:var(--muted)}.\[\&_code\]\:px-1\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:font-mono code{font-family:var(--font-mt)}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:text-brand code{color:var(--brand)}.\[\&_del\]\:text-muted-foreground del{color:var(--muted-foreground)}.\[\&_del\]\:opacity-60 del{opacity:.6}.\[\&_h2\]\:mt-\[18px\] h2{margin-top:18px}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:text-\[17px\] h2{font-size:17px}.\[\&_h2\]\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h2\]\:text-foreground h2{color:var(--foreground)}.\[\&_h3\]\:mt-\[18px\] h3{margin-top:18px}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:text-\[15px\] h3{font-size:15px}.\[\&_h3\]\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h3\]\:text-foreground h3{color:var(--foreground)}.\[\&_h4\]\:mt-\[18px\] h4{margin-top:18px}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-\[14px\] h4{font-size:14px}.\[\&_h4\]\:font-bold h4{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h4\]\:text-foreground h4{color:var(--foreground)}.\[\&_h5\]\:mt-\[18px\] h5{margin-top:18px}.\[\&_h5\]\:mb-1\.5 h5{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h5\]\:text-\[14px\] h5{font-size:14px}.\[\&_h5\]\:font-bold h5{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h5\]\:text-foreground h5{color:var(--foreground)}.\[\&_hr\]\:my-3\.5 hr{margin-block:calc(var(--spacing) * 3.5)}.\[\&_hr\]\:border-0 hr{border-style:var(--tw-border-style);border-width:0}.\[\&_hr\]\:border-t hr{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_hr\]\:border-border hr{border-color:var(--border)}.\[\&_i\]\:inline-block i{display:inline-block}.\[\&_i\]\:size-2\.5 i{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_i\]\:rounded-\[3px\] i{border-radius:3px}.\[\&_img\]\:my-1\.5 img{margin-block:calc(var(--spacing) * 1.5)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-md img{border-radius:var(--radius)}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_li\]\:my-\[3px\] li{margin-block:3px}.\[\&_li\]\:marker\:text-brand li ::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li ::-webkit-details-marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::-webkit-details-marker{color:var(--brand)}.\[\&_ol\]\:my-\[5px\] ol{margin-block:5px}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-\[22px\] ol{padding-left:22px}.\[\&_p\]\:my-\[5px\] p{margin-block:5px}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:var(--radius)}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border pre{border-color:var(--border)}.\[\&_pre\]\:bg-background pre{background-color:var(--background)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:text-muted-foreground pre code{color:var(--muted-foreground)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-foreground strong{color:var(--foreground)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_table\]\:w-full table{width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:font-mono table{font-family:var(--font-mt)}.\[\&_table\]\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-border td{border-color:var(--border)}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:py-\[7px\] td{padding-block:7px}.\[\&_td\]\:text-muted-foreground td{color:var(--muted-foreground)}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-border th{border-color:var(--border)}.\[\&_th\]\:bg-muted th{background-color:var(--muted)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:py-\[7px\] th{padding-block:7px}.\[\&_th\]\:text-left th{text-align:left}.\[\&_th\]\:text-\[11px\] th{font-size:11px}.\[\&_th\]\:font-semibold th{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_th\]\:tracking-wide th{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_th\]\:text-foreground th{color:var(--foreground)}.\[\&_th\]\:uppercase th{text-transform:uppercase}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&_ul\]\:my-\[5px\] ul{margin-block:5px}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-\[18px\] ul{padding-left:18px}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>b\]\:text-foreground>b{color:var(--foreground)}.\[\&\>span\]\:inline-flex>span{display:inline-flex}.\[\&\>span\]\:items-center>span{align-items:center}.\[\&\>span\]\:gap-1\.5>span{gap:calc(var(--spacing) * 1.5)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, var(--secondary) 90%, transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}a.\[a\&\]\:hover\:underline:hover{text-decoration-line:underline}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.conn{display:block;overflow:visible}.conn-grid{fill:none;stroke:var(--border);stroke-opacity:.7;stroke-dasharray:2 7}.conn-sonar{fill:none;stroke:var(--brand);stroke-width:1.5px;opacity:0;animation:3.3s ease-out infinite conn-sonar}.conn-hub-glow{fill:var(--brand);opacity:.22;filter:blur(11px)}.conn-hub-ring{fill:none;stroke:var(--brand);stroke-width:1.4px;stroke-dasharray:4 9;opacity:.7;transform-box:fill-box;transform-origin:50%;animation:15s linear infinite conn-rot}.conn-node text{pointer-events:none}.conn-node-halo{fill:none;stroke-width:2px;transform-box:fill-box;transform-origin:50%;animation:2.4s ease-in-out infinite conn-halo}.conn-link{fill:none;stroke-width:1.6px;opacity:.38}.conn-flow{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:2 13;opacity:.9;filter:drop-shadow(0 0 4px);animation:1.05s linear infinite conn-flow}.conn-packet{filter:drop-shadow(0 0 6px var(--chart-2))}.conn-chevron{fill:none;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;opacity:.6}.conn-tunnel-halo{fill:none;stroke-width:8px;stroke-linecap:round;opacity:.1}.conn-tunnel{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:6 6;animation:.9s linear infinite conn-tunnel-flow}.conn-tunnel-lock{filter:drop-shadow(0 0 4px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-lock{filter:drop-shadow(0 0 4px color-mix(in srgb, var(--warning) 80%, transparent))}}.conn-tunnel-sat{stroke-width:1.5px;filter:drop-shadow(0 0 5px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-sat{filter:drop-shadow(0 0 5px color-mix(in srgb, var(--warning) 53%, transparent))}}.conn-tunnel-badge{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{fill:color-mix(in srgb, var(--warning) 16%, var(--background))}}.conn-tunnel-badge{stroke:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{stroke:color-mix(in srgb, var(--warning) 60%, var(--border))}}.conn-tunnel-badge{stroke-width:1px}.conn-tunnel-badge-tx{fill:var(--warning);letter-spacing:.02em;font-weight:700}.jump-route__wire{background-image:linear-gradient(90deg, var(--border) 0 50%, transparent 50% 100%);background-size:8px 2px;border-radius:2px;flex:1;min-width:18px;height:2px;animation:.7s linear infinite jump-wire}.jump-route__wire--enc{background-image:linear-gradient(90deg, var(--warning) 0 55%, transparent 55% 100%);min-width:34px;height:3px;box-shadow:0 0 8px -1px var(--warning);background-size:10px 3px;position:relative}@supports (color:color-mix(in lab, red, red)){.jump-route__wire--enc{box-shadow:0 0 8px -1px color-mix(in srgb, var(--warning) 53%, transparent)}}.jump-route__lock{filter:drop-shadow(0 0 3px var(--warning));font-size:11px;animation:2.2s linear infinite jump-lock;position:absolute;top:50%}.topo-sweep{animation:8s linear infinite topo-sweep}.topo-ring{transform-box:fill-box;transform-origin:50%;animation:90s linear infinite reverse topo-ring}.topo-flow{animation:1.4s linear infinite topo-flow}.topo-pulse{transform-box:fill-box;transform-origin:50%;animation:2.6s ease-in-out infinite topo-pulse}.topo-halo{transform-box:fill-box;transform-origin:50%;animation:2.2s ease-out infinite topo-halo}@keyframes topo-sweep{to{transform:rotate(360deg)}}@keyframes topo-ring{to{transform:rotate(360deg)}}@keyframes topo-flow{to{stroke-dashoffset:-16px}}@keyframes topo-pulse{0%,to{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.12)}}@keyframes topo-halo{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.9)}}@keyframes conn-sonar{0%{r:30px;opacity:.5}to{r:150px;opacity:0}}@keyframes conn-flow{to{stroke-dashoffset:-60px}}@keyframes conn-rot{to{transform:rotate(360deg)}}@keyframes conn-halo{0%,to{opacity:.45;transform:scale(1)}50%{opacity:0;transform:scale(1.55)}}@keyframes conn-tunnel-flow{to{stroke-dashoffset:-24px}}@keyframes jump-wire{to{background-position:8px 0}}@keyframes jump-lock{0%{left:-4px;transform:translateY(-50%)scale(.9)}50%{transform:translateY(-50%)scale(1.1)}to{left:calc(100% - 8px);transform:translateY(-50%)scale(.9)}}@media (prefers-reduced-motion:reduce){.conn-sonar,.topo-sweep{display:none}.conn-flow,.conn-hub-ring,.conn-node-halo,.conn-tunnel,.jump-route__wire,.jump-route__lock,.topo-ring,.topo-flow,.topo-pulse,.topo-halo{animation:none}.conn-packet animateMotion,.conn-tunnel-lock animateMotion{display:none}}:root{--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:#0a0a0a;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#0a0a0a;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#0a0a0a;--destructive:#e5484d;--destructive-foreground:#fff;--success:#18794e;--warning:#ab6400;--border:#e4e4e7;--input:#e4e4e7;--radius:.5rem;--page-accent:var(--foreground);--page-accent-2:var(--muted-foreground);--brand:var(--page-accent);--brand-foreground:var(--background);--ring:var(--brand);--chart-1:#0068d6;--chart-2:#0f8a7e;--chart-3:#3d8f2f;--chart-4:#a35200;--chart-5:#7048c4;--entity-1:#0068d6;--entity-2:#087a52;--entity-3:#6d3fc4;--entity-4:#a35200;--entity-5:#c02a2a;--entity-6:#0f8a7e;--entity-7:#c0267a;--entity-8:#2563eb;--entity-9:#8a6a00;--entity-10:#b4530f}.dark{--background:#0a0a0a;--foreground:#ededed;--card:#111;--card-foreground:#ededed;--popover:#111;--popover-foreground:#ededed;--primary:#ededed;--primary-foreground:#0a0a0a;--secondary:#1a1a1a;--secondary-foreground:#ededed;--muted:#1a1a1a;--muted-foreground:#a1a1a1;--accent:#1a1a1a;--accent-foreground:#ededed;--destructive:#ff5c5c;--destructive-foreground:#fff;--success:#2dd4a7;--warning:#f5a623;--border:#2a2a2a;--input:#2a2a2a;--chart-1:#3291ff;--chart-2:#2dd4bf;--chart-3:#69d05a;--chart-4:#f5a623;--chart-5:#9d7bff;--entity-1:#3291ff;--entity-2:#34d399;--entity-3:#a78bfa;--entity-4:#f59e0b;--entity-5:#ef4444;--entity-6:#2dd4bf;--entity-7:#f472b6;--entity-8:#60a5fa;--entity-9:#facc15;--entity-10:#fb923c}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
159
159
  /*$vite$:1*/
160
160
  </style>
161
161
  </head>