@sleep2agi/agent-network-dashboard 0.4.5-preview.19 → 0.4.5-preview.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +4 -4
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +2 -2
- package/.next/server/app/admin.rsc +2 -2
- package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +2 -2
- package/.next/server/app/logs.rsc +2 -2
- package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +2 -2
- package/.next/server/app/messages.rsc +2 -2
- package/.next/server/app/messages.segments/_full.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +2 -2
- package/.next/server/app/node.segments/_full.segment.rsc +2 -2
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +2 -2
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +2 -2
- package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +2 -2
- package/.next/server/app/server-logs.rsc +2 -2
- package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +2 -2
- package/.next/server/app/settings/networks.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +2 -2
- package/.next/server/app/settings/tokens.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page.js.nft.json +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +2 -2
- package/.next/server/app/tasks.rsc +3 -3
- package/.next/server/app/tasks.segments/_full.segment.rsc +3 -3
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__04e5_8f._.js → [root-of-the-server]__0jjqrcf._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0jjqrcf._.js.map +1 -0
- package/.next/server/chunks/ssr/_0nne7mz._.js +3 -0
- package/.next/server/chunks/ssr/_0nne7mz._.js.map +1 -0
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js +3 -0
- package/.next/server/chunks/ssr/app_components_0lhp_k.._.js.map +1 -0
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js +1 -1
- package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/09i1e1zou_kxn.css +2 -0
- package/.next/static/chunks/0eajktwdxy7qt.js +1 -0
- package/.next/static/chunks/0hqhvq6f83m38.js +1 -0
- package/.next/static/chunks/0pf4_9.-8s34p.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/TaskDrawer.tsx +61 -22
- package/app/globals.css +12 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__04e5_8f._.js.map +0 -1
- package/.next/server/chunks/ssr/_0kdizff._.js +0 -3
- package/.next/server/chunks/ssr/_0kdizff._.js.map +0 -1
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +0 -3
- package/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js.map +0 -1
- package/.next/static/chunks/0aby6p.a03e3n.js +0 -1
- package/.next/static/chunks/0elnqam.~nrl2.js +0 -1
- package/.next/static/chunks/0lb13~qih~i61.js +0 -1
- package/.next/static/chunks/0vu6hg8v.i15e.css +0 -2
- /package/.next/static/{-U8Zt1EDSjgyBVIuyhwtS → MBLKeNzIT_BLWGkgUbmPI}/_buildManifest.js +0 -0
- /package/.next/static/{-U8Zt1EDSjgyBVIuyhwtS → MBLKeNzIT_BLWGkgUbmPI}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{-U8Zt1EDSjgyBVIuyhwtS → MBLKeNzIT_BLWGkgUbmPI}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../app/components/utils.ts","../../../../app/components/AliasAvatar.tsx","../../../../app/components/EmptyState.tsx","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/style.js"],"sourcesContent":["export function timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n\nexport function formatUptime(seconds: number): string {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n if (h > 0) return `${h}h ${m}m`;\n return `${m}m`;\n}\n","/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Overview-specific variant with a hint about cross-network global count.\n * Kept here so /app/page.tsx can drop in without ceremony.\n */\nexport function NodesEmptyState({ hint }: { hint?: { global_count?: number; filtered_network?: string } }) {\n if (hint?.global_count) {\n return (\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n );\n }\n return (\n <EmptyState\n variant=\"nodes\"\n cta={{ label: 'Run anet quickstart', href: 'https://anet.sh' }}\n />\n );\n}\n","require('client-only');\nvar React = require('react');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n/*\nBased on Glamor's sheet\nhttps://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js\n*/ function _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nvar isProd = typeof process !== \"undefined\" && process.env && process.env.NODE_ENV === \"production\";\nvar isString = function(o) {\n return Object.prototype.toString.call(o) === \"[object String]\";\n};\nvar StyleSheet = /*#__PURE__*/ function() {\n function StyleSheet(param) {\n var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? \"stylesheet\" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;\n invariant$1(isString(name), \"`name` must be a string\");\n this._name = name;\n this._deletedRulePlaceholder = \"#\" + name + \"-deleted-rule____{}\";\n invariant$1(typeof optimizeForSpeed === \"boolean\", \"`optimizeForSpeed` must be a boolean\");\n this._optimizeForSpeed = optimizeForSpeed;\n this._serverSheet = undefined;\n this._tags = [];\n this._injected = false;\n this._rulesCount = 0;\n var node = typeof window !== \"undefined\" && document.querySelector('meta[property=\"csp-nonce\"]');\n this._nonce = node ? node.getAttribute(\"content\") : null;\n }\n var _proto = StyleSheet.prototype;\n _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {\n invariant$1(typeof bool === \"boolean\", \"`setOptimizeForSpeed` accepts a boolean\");\n invariant$1(this._rulesCount === 0, \"optimizeForSpeed cannot be when rules have already been inserted\");\n this.flush();\n this._optimizeForSpeed = bool;\n this.inject();\n };\n _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {\n return this._optimizeForSpeed;\n };\n _proto.inject = function inject() {\n var _this = this;\n invariant$1(!this._injected, \"sheet already injected\");\n this._injected = true;\n if (typeof window !== \"undefined\" && this._optimizeForSpeed) {\n this._tags[0] = this.makeStyleTag(this._name);\n this._optimizeForSpeed = \"insertRule\" in this.getSheet();\n if (!this._optimizeForSpeed) {\n if (!isProd) {\n console.warn(\"StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.\");\n }\n this.flush();\n this._injected = true;\n }\n return;\n }\n this._serverSheet = {\n cssRules: [],\n insertRule: function(rule, index) {\n if (typeof index === \"number\") {\n _this._serverSheet.cssRules[index] = {\n cssText: rule\n };\n } else {\n _this._serverSheet.cssRules.push({\n cssText: rule\n });\n }\n return index;\n },\n deleteRule: function(index) {\n _this._serverSheet.cssRules[index] = null;\n }\n };\n };\n _proto.getSheetForTag = function getSheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n }\n // this weirdness brought to you by firefox\n for(var i = 0; i < document.styleSheets.length; i++){\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n };\n _proto.getSheet = function getSheet() {\n return this.getSheetForTag(this._tags[this._tags.length - 1]);\n };\n _proto.insertRule = function insertRule(rule, index) {\n invariant$1(isString(rule), \"`insertRule` accepts only strings\");\n if (typeof window === \"undefined\") {\n if (typeof index !== \"number\") {\n index = this._serverSheet.cssRules.length;\n }\n this._serverSheet.insertRule(rule, index);\n return this._rulesCount++;\n }\n if (this._optimizeForSpeed) {\n var sheet = this.getSheet();\n if (typeof index !== \"number\") {\n index = sheet.cssRules.length;\n }\n // this weirdness for perf, and chrome's weird bug\n // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n return -1;\n }\n } else {\n var insertionPoint = this._tags[index];\n this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));\n }\n return this._rulesCount++;\n };\n _proto.replaceRule = function replaceRule(index, rule) {\n if (this._optimizeForSpeed || typeof window === \"undefined\") {\n var sheet = typeof window !== \"undefined\" ? this.getSheet() : this._serverSheet;\n if (!rule.trim()) {\n rule = this._deletedRulePlaceholder;\n }\n if (!sheet.cssRules[index]) {\n // @TBD Should we throw an error?\n return index;\n }\n sheet.deleteRule(index);\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n // In order to preserve the indices we insert a deleteRulePlaceholder\n sheet.insertRule(this._deletedRulePlaceholder, index);\n }\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"old rule at index `\" + index + \"` not found\");\n tag.textContent = rule;\n }\n return index;\n };\n _proto.deleteRule = function deleteRule(index) {\n if (typeof window === \"undefined\") {\n this._serverSheet.deleteRule(index);\n return;\n }\n if (this._optimizeForSpeed) {\n this.replaceRule(index, \"\");\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"rule at index `\" + index + \"` not found\");\n tag.parentNode.removeChild(tag);\n this._tags[index] = null;\n }\n };\n _proto.flush = function flush() {\n this._injected = false;\n this._rulesCount = 0;\n if (typeof window !== \"undefined\") {\n this._tags.forEach(function(tag) {\n return tag && tag.parentNode.removeChild(tag);\n });\n this._tags = [];\n } else {\n // simpler on server\n this._serverSheet.cssRules = [];\n }\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n if (typeof window === \"undefined\") {\n return this._serverSheet.cssRules;\n }\n return this._tags.reduce(function(rules, tag) {\n if (tag) {\n rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {\n return rule.cssText === _this._deletedRulePlaceholder ? null : rule;\n }));\n } else {\n rules.push(null);\n }\n return rules;\n }, []);\n };\n _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {\n if (cssString) {\n invariant$1(isString(cssString), \"makeStyleTag accepts only strings as second parameter\");\n }\n var tag = document.createElement(\"style\");\n if (this._nonce) tag.setAttribute(\"nonce\", this._nonce);\n tag.type = \"text/css\";\n tag.setAttribute(\"data-\" + name, \"\");\n if (cssString) {\n tag.appendChild(document.createTextNode(cssString));\n }\n var head = document.head || document.getElementsByTagName(\"head\")[0];\n if (relativeToTag) {\n head.insertBefore(tag, relativeToTag);\n } else {\n head.appendChild(tag);\n }\n return tag;\n };\n _createClass(StyleSheet, [\n {\n key: \"length\",\n get: function get() {\n return this._rulesCount;\n }\n }\n ]);\n return StyleSheet;\n}();\nfunction invariant$1(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheet: \" + message + \".\");\n }\n}\n\nfunction hash(str) {\n var _$hash = 5381, i = str.length;\n while(i){\n _$hash = _$hash * 33 ^ str.charCodeAt(--i);\n }\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;\n}\nvar stringHash = hash;\n\nvar sanitize = function(rule) {\n return rule.replace(/\\/style/gi, \"\\\\/style\");\n};\nvar cache = {};\n/**\n * computeId\n *\n * Compute and memoize a jsx id from a basedId and optionally props.\n */ function computeId(baseId, props) {\n if (!props) {\n return \"jsx-\" + baseId;\n }\n var propsToString = String(props);\n var key = baseId + propsToString;\n if (!cache[key]) {\n cache[key] = \"jsx-\" + stringHash(baseId + \"-\" + propsToString);\n }\n return cache[key];\n}\n/**\n * computeSelector\n *\n * Compute and memoize dynamic selectors.\n */ function computeSelector(id, css) {\n var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;\n // Sanitize SSR-ed CSS.\n // Client side code doesn't need to be sanitized since we use\n // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).\n if (typeof window === \"undefined\") {\n css = sanitize(css);\n }\n var idcss = id + css;\n if (!cache[idcss]) {\n cache[idcss] = css.replace(selectoPlaceholderRegexp, id);\n }\n return cache[idcss];\n}\n\nfunction mapRulesToStyle(cssRules, options) {\n if (options === void 0) options = {};\n return cssRules.map(function(args) {\n var id = args[0];\n var css = args[1];\n return /*#__PURE__*/ React__default[\"default\"].createElement(\"style\", {\n id: \"__\" + id,\n // Avoid warnings upon render with a key\n key: \"__\" + id,\n nonce: options.nonce ? options.nonce : undefined,\n dangerouslySetInnerHTML: {\n __html: css\n }\n });\n });\n}\nvar StyleSheetRegistry = /*#__PURE__*/ function() {\n function StyleSheetRegistry(param) {\n var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;\n this._sheet = styleSheet || new StyleSheet({\n name: \"styled-jsx\",\n optimizeForSpeed: optimizeForSpeed\n });\n this._sheet.inject();\n if (styleSheet && typeof optimizeForSpeed === \"boolean\") {\n this._sheet.setOptimizeForSpeed(optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n }\n var _proto = StyleSheetRegistry.prototype;\n _proto.add = function add(props) {\n var _this = this;\n if (undefined === this._optimizeForSpeed) {\n this._optimizeForSpeed = Array.isArray(props.children);\n this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n if (typeof window !== \"undefined\" && !this._fromServer) {\n this._fromServer = this.selectFromServer();\n this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {\n acc[tagName] = 0;\n return acc;\n }, {});\n }\n var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;\n // Deduping: just increase the instances count.\n if (styleId in this._instancesCounts) {\n this._instancesCounts[styleId] += 1;\n return;\n }\n var indices = rules.map(function(rule) {\n return _this._sheet.insertRule(rule);\n })// Filter out invalid rules\n .filter(function(index) {\n return index !== -1;\n });\n this._indices[styleId] = indices;\n this._instancesCounts[styleId] = 1;\n };\n _proto.remove = function remove(props) {\n var _this = this;\n var styleId = this.getIdAndRules(props).styleId;\n invariant(styleId in this._instancesCounts, \"styleId: `\" + styleId + \"` not found\");\n this._instancesCounts[styleId] -= 1;\n if (this._instancesCounts[styleId] < 1) {\n var tagFromServer = this._fromServer && this._fromServer[styleId];\n if (tagFromServer) {\n tagFromServer.parentNode.removeChild(tagFromServer);\n delete this._fromServer[styleId];\n } else {\n this._indices[styleId].forEach(function(index) {\n return _this._sheet.deleteRule(index);\n });\n delete this._indices[styleId];\n }\n delete this._instancesCounts[styleId];\n }\n };\n _proto.update = function update(props, nextProps) {\n this.add(nextProps);\n this.remove(props);\n };\n _proto.flush = function flush() {\n this._sheet.flush();\n this._sheet.inject();\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {\n return [\n styleId,\n _this._fromServer[styleId]\n ];\n }) : [];\n var cssRules = this._sheet.cssRules();\n return fromServer.concat(Object.keys(this._indices).map(function(styleId) {\n return [\n styleId,\n _this._indices[styleId].map(function(index) {\n return cssRules[index].cssText;\n }).join(_this._optimizeForSpeed ? \"\" : \"\\n\")\n ];\n })// filter out empty rules\n .filter(function(rule) {\n return Boolean(rule[1]);\n }));\n };\n _proto.styles = function styles(options) {\n return mapRulesToStyle(this.cssRules(), options);\n };\n _proto.getIdAndRules = function getIdAndRules(props) {\n var css = props.children, dynamic = props.dynamic, id = props.id;\n if (dynamic) {\n var styleId = computeId(id, dynamic);\n return {\n styleId: styleId,\n rules: Array.isArray(css) ? css.map(function(rule) {\n return computeSelector(styleId, rule);\n }) : [\n computeSelector(styleId, css)\n ]\n };\n }\n return {\n styleId: computeId(id),\n rules: Array.isArray(css) ? css : [\n css\n ]\n };\n };\n /**\n * selectFromServer\n *\n * Collects style tags from the document with id __jsx-XXX\n */ _proto.selectFromServer = function selectFromServer() {\n var elements = Array.prototype.slice.call(document.querySelectorAll('[id^=\"__jsx-\"]'));\n return elements.reduce(function(acc, element) {\n var id = element.id.slice(2);\n acc[id] = element;\n return acc;\n }, {});\n };\n return StyleSheetRegistry;\n}();\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheetRegistry: \" + message + \".\");\n }\n}\nvar StyleSheetContext = /*#__PURE__*/ React.createContext(null);\nStyleSheetContext.displayName = \"StyleSheetContext\";\nfunction createStyleRegistry() {\n return new StyleSheetRegistry();\n}\nfunction StyleRegistry(param) {\n var configuredRegistry = param.registry, children = param.children;\n var rootRegistry = React.useContext(StyleSheetContext);\n var ref = React.useState(function() {\n return rootRegistry || configuredRegistry || createStyleRegistry();\n }), registry = ref[0];\n return /*#__PURE__*/ React__default[\"default\"].createElement(StyleSheetContext.Provider, {\n value: registry\n }, children);\n}\nfunction useStyleRegistry() {\n return React.useContext(StyleSheetContext);\n}\n\n// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.\n// https://github.com/reactwg/react-18/discussions/110\nvar useInsertionEffect = React__default[\"default\"].useInsertionEffect || React__default[\"default\"].useLayoutEffect;\nvar defaultRegistry = typeof window !== \"undefined\" ? createStyleRegistry() : undefined;\nfunction JSXStyle(props) {\n var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();\n // If `registry` does not exist, we do nothing here.\n if (!registry) {\n return null;\n }\n if (typeof window === \"undefined\") {\n registry.add(props);\n return null;\n }\n useInsertionEffect(function() {\n registry.add(props);\n return function() {\n registry.remove(props);\n };\n // props.children can be string[], will be striped since id is identical\n }, [\n props.id,\n String(props.dynamic)\n ]);\n return null;\n}\nJSXStyle.dynamic = function(info) {\n return info.map(function(tagInfo) {\n var baseId = tagInfo[0];\n var props = tagInfo[1];\n return computeId(baseId, props);\n }).join(\" \");\n};\n\nexports.StyleRegistry = StyleRegistry;\nexports.createStyleRegistry = createStyleRegistry;\nexports.style = JSXStyle;\nexports.useStyleRegistry = useStyleRegistry;\n","module.exports = require('./dist/index').style\n"],"names":["timeAgo","dateStr","diff","Date","now","replace","getTime","s","Math","floor","statusColor","status","hasSse","formatUptime","seconds","h","m","AVATAR_HUES","aliasAvatarColors","alias","i","length","charCodeAt","hue","bg","ring","text","aliasInitial","ch","trim","match","toUpperCase","AliasAvatar","size","className","c","fs","max","round","style","width","height","fontSize","backgroundColor","borderColor","color","title","DEFAULTS","nodes","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","role","href","label","onClick","NodesEmptyState","hint","global_count","React","_interopDefaultLegacy","e","React__default","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","isProd","process","env","isString","o","toString","call","StyleSheet","param","ref","_name","name","_optimizeForSpeed","optimizeForSpeed","invariant$1","_deletedRulePlaceholder","_serverSheet","undefined","_tags","_injected","_rulesCount","node","document","querySelector","_nonce","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","_this","cssRules","insertRule","rule","index","cssText","push","deleteRule","getSheetForTag","tag","sheet","styleSheets","ownerNode","getSheet","insertionPoint","replaceRule","error","console","warn","makeStyleTag","cssString","relativeToTag","createElement","setAttribute","type","appendChild","createTextNode","head","getElementsByTagName","insertBefore","get","condition","message","Error","hash","str","_$hash","stringHash","sanitize","cache","computeId","baseId","propsToString","String","computeSelector","id","css","selectoPlaceholderRegexp","idcss","mapRulesToStyle","options","map","args","nonce","dangerouslySetInnerHTML","__html","StyleSheetRegistry","_styleSheet","styleSheet","_sheet","_fromServer","_indices","_instancesCounts","add","Array","isArray","children","getIdAndRules","styleId","rules","indices","filter","remove","invariant","tagFromServer","parentNode","removeChild","forEach","update","nextProps","fromServer","keys","concat","join","Boolean","styles","dynamic","selectFromServer","elements","slice","querySelectorAll","reduce","acc","element","StyleSheetContext","createContext","displayName","createStyleRegistry","StyleRegistry","configuredRegistry","registry","rootRegistry","useContext","useState","Provider","value","useStyleRegistry","useInsertionEffect","useLayoutEffect","defaultRegistry","JSXStyle","info","tagInfo","exports","module"],"mappings":"6DAkBO,SAASa,AAAaC,CAAe,EAC1C,IAAMC,EAAIP,KAAKC,KAAK,CAACK,EAAU,MACzBE,EAAIR,KAAKC,KAAK,CAAEK,EAAU,KAAQ,WACxC,AAAIC,EAAI,EAAU,CAAP,AAAO,EAAGA,EAAE,EAAE,EAAEC,EAAE,CAAC,CAAC,CACxB,CAAA,EAAGA,EAAE,CAAC,CAAC,AAChB,cAvBO,SAAiBf,AAARD,CAAuB,EACrC,GAAI,CAACC,EAAS,MAAO,KAErB,IAAMM,EAAIC,KAAKC,KAAK,CAACP,CADRC,KAAKC,GAAG,GAAK,IAAID,KAAKF,EAAQI,OAAO,CAAC,IAAK,KAAO,KAAKC,OAAO,EAAA,EAC/C,YAC5B,AAAIC,EAAI,GAAW,CAAP,AAAO,EAAGA,EAAE,KAAK,CAAC,CAC1BA,EAAI,KAAa,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,IAAI,KAAK,CAAC,CAC7CA,EAAI,MAAc,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,MAAM,KAAK,CAAC,CAC7C,CAAA,EAAGC,KAAKC,KAAK,CAACF,EAAI,OAAO,KAAK,CAAC,AACxC,4CCHA,IAAMU,EAAc,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAI,GAAG,sBAyBnD,SAASe,AAAY,OAAEb,CAAK,CAAEc,OAAO,EAAE,WAAEC,EAAY,EAAE,CAAoB,EA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GAAG,CAAC3G,CAJF,EACJ,IAiBf,CA3CA0I,EAAkBE,WAAW,CAAG,KAuBK,eAHZ/I,EAAe,OAAU,CAAC0J,IAAZ,cAA8B,EAAI1J,EAAe,OAAU,CAAC2J,IAAZ,WAA2B,CAwBlHE,EAASxB,OAAO,CAAG,SAASyB,CAAI,EAC5B,OAAOA,EAAK5D,GAAG,CAAC,SAAS6D,CAAO,EAG5B,OAAOxE,EAFMwE,CAAO,CAAC,EAAE,CACXA,CAAO,CAAC,CACHvE,CADK,CAE1B,GAAG0C,GAD0B/H,CACtB,CAAC,IACZ,EAEA6J,EAAQf,aAAa,CAhDrB,EAgDwBA,OAhDfA,AAAczH,CAAK,EACxB,IAAI0H,EAAqB1H,EAAM2H,QAAQ,CAAElC,EAAWzF,EAAMyF,QAAQ,CAC9DmC,EAAevJ,EAAMwJ,UAAU,CAACR,GAGhCM,EAFMtJ,AAEK4B,EAFC6H,QAAQ,CAAC,WACrB,OAAOF,GAAgBF,GAAsBF,GACjD,EAAkB,CAAC,EAAE,CACrB,OAAO,AAAchJ,EAAe,OAAU,CAACqE,CAA7B,GAAiB,SAAyB,CAACwE,EAAkBU,QAAQ,CAAE,CACrFC,MAAOL,CACX,EAAGlC,EACP,EAwCA+C,EAAQhB,mBAAmB,CAAGA,EAC9BgB,EAAQxN,KAAK,CAAGqN,EAChBG,EAAQP,gBAAgB,CAAGA,mBClf3BQ,EAAOD,OAAO,CAAG,EAAA,CAAA,CAAA,OAAwBxN,KAAK","ignoreList":[3,4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[60350,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(43515);function f({online:a,working:c,total:d,version:e,uptime:h}){let i=d>0?Math.round(a/d*100):0;return(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Agent Network"}),(0,b.jsxs)("span",{className:"text-xs text-gray-500",children:["CommHub ",e," · ",h]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,b.jsx)(g,{value:a,label:"Online",sub:`${i}% of fleet`,color:"text-green-400",accent:"from-green-500/20 to-green-500/0",border:"border-green-500/15"}),(0,b.jsx)(g,{value:c,label:"Working",sub:a>0?`${Math.round(c/a*100)}% utilization`:"--",color:"text-cyan-400",accent:"from-cyan-500/20 to-cyan-500/0",border:"border-cyan-500/15"}),(0,b.jsx)(g,{value:d-a,label:"Offline",sub:d-a==0?"All systems go":`${d-a} disconnected`,color:"text-gray-400",accent:"from-gray-500/10 to-gray-500/0",border:"border-gray-500/15"}),(0,b.jsx)(g,{value:d,label:"Total",sub:"Registered nodes",color:"text-white",accent:"from-blue-500/15 to-blue-500/0",border:"border-blue-500/15"})]})]})}function g({value:a,label:c,sub:d,color:e,accent:f,border:h}){let i=e.replace("text-","").split("-")[0];return(0,b.jsxs)("div",{"data-anet-stat-card":i,className:`anet-stat-card relative overflow-hidden rounded-xl border ${h} bg-[#111128] px-4 py-3 transition-all`,children:[(0,b.jsx)("div",{className:`absolute inset-0 bg-gradient-to-br ${f} pointer-events-none`}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("div",{className:`text-3xl font-bold ${e} tabular-nums leading-tight`,children:a}),(0,b.jsx)("div",{className:"text-sm text-gray-300 mt-0.5",children:c}),(0,b.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:d})]})]})}function h(){let[a,d]=(0,c.useState)(""),[e,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(""),i=async()=>{if(a.trim()){f(!0),h("");try{let b=await fetch("/api/hub/broadcast",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a})}),c=await b.json();c.ok?(h(`Broadcast sent to ${c.recipients} node(s)`),d("")):h(`Failed: ${c.error||"Send error"}`)}catch(a){h(`Failed: ${a instanceof Error?a.message:"Send error"}`)}f(!1),setTimeout(()=>h(""),5e3)}};return(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"text",value:a,onChange:a=>d(a.target.value),onKeyDown:a=>"Enter"===a.key&&i(),placeholder:"Broadcast message to all online agents...",maxLength:500,"aria-label":"Broadcast message",className:"flex-1 bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/20 focus:outline-none transition-colors"}),(0,b.jsx)("button",{onClick:i,disabled:e||!a.trim(),"aria-label":"Send broadcast",className:"px-5 py-2.5 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-all font-medium cursor-pointer disabled:cursor-not-allowed",children:e?"Sending...":"Broadcast"})]}),a.length>0&&(0,b.jsxs)("div",{className:"text-right text-xs text-gray-600 mt-1",children:[a.length,"/500"]}),g&&(0,b.jsx)("div",{className:`mt-3 text-sm text-center ${g.startsWith("Failed")?"text-red-400":"text-green-400/80"} animate-fade-in`,children:g})]})}function i(a,b,c,d=0){let e=b<=2?Math.PI:1.78*Math.PI,f=-Math.PI/2-e/2,g=b<=1?-Math.PI/2:f+e*a/(b-1)+d;return{x:500+c*Math.cos(g),y:330+c*Math.sin(g)}}function j(a,b,c=0){let d=(a.x+b.x)/2,e=(a.y+b.y)/2,f=b.x-a.x,g=b.y-a.y,h=Math.hypot(f,g)||1,i={x:d+-g/h*c,y:e+f/h*c};return`M${a.x},${a.y} Q${i.x},${i.y} ${b.x},${b.y}`}function k(a,b){return a.length>b?`${a.slice(0,b-1)}...`:a}let l={panelStops:["#0b1220","#080814","#101018"],radarStops:[{color:"#22d3ee",opacity:.18},{color:"#22c55e",opacity:.045},{color:"#020617",opacity:0}],arrowFill:"#67e8f9",ringStroke:"#164e63",spokeStroke:{active:"#22d3ee",idle:"#155e75"},flowEdge:"#67e8f9",flowPath:"#e0f2fe",flowParticle:"#fef08a",nodeFill:{online:"#020617",offline:"#080814"},labelBox:{fill:"#020617",stroke:"#1f2937"},legendBox:{fill:"#020617",stroke:"#1f2937"},legendText:"#94a3b8",legendHeadline:"#e5e7eb",legendAccent:"#67e8f9",containerBg:"#080814",containerBorder:"#2a2a4a",topRailGradient:"from-transparent via-cyan-400/70 to-transparent"},m={panelStops:["#f8fafc","#ffffff","#f1f5f9"],radarStops:[{color:"#10b981",opacity:.06},{color:"#3b82f6",opacity:.03},{color:"#ffffff",opacity:0}],arrowFill:"#10b981",ringStroke:"#cbd5e1",spokeStroke:{active:"#10b981",idle:"#cbd5e1"},flowEdge:"#10b981",flowPath:"#475569",flowParticle:"#f59e0b",nodeFill:{online:"#ffffff",offline:"#f8fafc"},labelBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendBox:{fill:"#ffffff",stroke:"#e2e8f0"},legendText:"#475569",legendHeadline:"#0f172a",legendAccent:"#0d9488",containerBg:"#ffffff",containerBorder:"#e3e6eb",topRailGradient:"from-transparent via-emerald-500/40 to-transparent"};function n({sessions:a,sseSessions:d}){let e="light"===function(){let[a,b]=(0,c.useState)("dark");return(0,c.useEffect)(()=>{let a=()=>{let a=document.documentElement.getAttribute("data-theme")||"cyber";b("light"===a||"mint"===a?"light":"dark")};a();let c=new MutationObserver(a);return c.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>c.disconnect()},[]),a}(),f=e?m:l,[g,h]=(0,c.useState)([]);(0,c.useEffect)(()=>{let a=async()=>{try{let a=await fetch("/api/hub/messages?limit=50");if(401===a.status)return void window.location.assign("/login");let b=await a.json();h(b.messages||[])}catch{}};a();let b=setInterval(a,5e3);return()=>clearInterval(b)},[]);let{onlineNodes:o,offlineNodes:p,nodePositions:q,flowLinks:r,activeAliases:s}=(0,c.useMemo)(()=>{let b,c=a=>(a.network_id?d[`${a.network_id}:${a.alias}`]:void 0)??d[a.alias],e=a.filter(a=>"offline"!==a.status||c(a)),f=a.filter(a=>"offline"===a.status&&!c(a)),h={};e.forEach((a,b)=>{h[a.alias]=i(b,Math.max(e.length,1),220)});let j=e.length<=2?Math.PI:1.78*Math.PI,k=e.length>1?j/(e.length-1):0,l=e.length>0?k/2:0,m=315+6*Math.max(0,f.length-4);f.forEach((a,b)=>{h[a.alias]=i(b,Math.max(f.length,1),m,l)});let n=(b=new Map,g.forEach(a=>{if(!h[a.from_alias]||!h[a.to_alias]||a.from_alias===a.to_alias)return;let c=`${a.from_alias}->${a.to_alias}`,d=b.get(c);b.set(c,{key:c,from:a.from_alias,to:a.to_alias,count:(d?.count||0)+1,content:d?.content||a.content})}),[...b.values()].slice(0,18)),o=new Set;return n.forEach(a=>{o.add(a.from),o.add(a.to)}),{onlineNodes:e,offlineNodes:f,nodePositions:h,flowLinks:n,activeAliases:o}},[g,a,d]),t=o.filter(a=>"working"===a.status).length;return(0,b.jsxs)("section",{className:"w-full max-w-6xl mx-auto mb-8",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between mb-3 px-1",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs uppercase text-gray-600 tracking-wider",children:"Network Topology"}),(0,b.jsx)("h2",{className:"text-lg text-white font-semibold",children:"Command mesh"})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,b.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-green-500/10 text-green-300 border border-green-500/20",children:[t," working"]}),(0,b.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-cyan-500/10 text-cyan-300 border border-cyan-500/20",children:[o.length," online"]}),(0,b.jsxs)("span",{className:"px-2.5 py-1 rounded-md bg-gray-500/10 text-gray-400 border border-gray-500/20",children:[r.length," active links"]})]})]}),(0,b.jsxs)("div",{className:`relative overflow-hidden rounded-lg border shadow-2xl ${e?"shadow-zinc-900/5":"shadow-cyan-950/30"}`,style:{background:f.containerBg,borderColor:f.containerBorder},children:[(0,b.jsx)("div",{className:`absolute inset-x-0 top-0 h-px bg-gradient-to-r ${f.topRailGradient}`}),(0,b.jsxs)("svg",{viewBox:"0 0 1000 680",className:"w-full h-auto block",preserveAspectRatio:"xMidYMid meet",children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"topo-panel",x1:"0",x2:"1",y1:"0",y2:"1",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:f.panelStops[0]}),(0,b.jsx)("stop",{offset:"48%",stopColor:f.panelStops[1]}),(0,b.jsx)("stop",{offset:"100%",stopColor:f.panelStops[2]})]}),(0,b.jsxs)("radialGradient",{id:"topo-radar",cx:"50%",cy:"50%",r:"55%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:f.radarStops[0].color,stopOpacity:f.radarStops[0].opacity}),(0,b.jsx)("stop",{offset:"45%",stopColor:f.radarStops[1].color,stopOpacity:f.radarStops[1].opacity}),(0,b.jsx)("stop",{offset:"100%",stopColor:f.radarStops[2].color,stopOpacity:f.radarStops[2].opacity})]}),!e&&(0,b.jsxs)("filter",{id:"topo-glow",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"blur"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]}),(0,b.jsx)("marker",{id:"topo-arrow",viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"5",markerHeight:"5",orient:"auto-start-reverse",children:(0,b.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:f.arrowFill})})]}),(0,b.jsx)("rect",{width:"1000",height:"680",fill:"url(#topo-panel)"}),(0,b.jsx)("circle",{cx:500,cy:330,r:"330",fill:"url(#topo-radar)"}),[90,170,250,330].map(a=>(0,b.jsx)("circle",{cx:500,cy:330,r:a,fill:"none",stroke:f.ringStroke,strokeWidth:"1",opacity:e?.6:.35},a)),[0,30,60,90,120,150].map(a=>(0,b.jsx)("line",{x1:500-360*Math.cos(a*Math.PI/180),y1:330-360*Math.sin(a*Math.PI/180),x2:500+360*Math.cos(a*Math.PI/180),y2:330+360*Math.sin(a*Math.PI/180),stroke:f.ringStroke,strokeWidth:"1",opacity:e?.35:.18},a)),o.map(a=>{let c=q[a.alias];if(!c)return null;let d=j({x:500,y:330},c,0);return(0,b.jsx)("path",{d:d,fill:"none",stroke:s.has(a.alias)?f.spokeStroke.active:f.spokeStroke.idle,strokeWidth:s.has(a.alias)?2:1,strokeDasharray:s.has(a.alias)?"none":"8 10",opacity:s.has(a.alias)?.65:.35},`hub-${a.alias}`)}),r.map((a,c)=>{let d=q[a.from],g=q[a.to];if(!d||!g)return null;let h=j(d,g,c%2==0?36:-36),i=Math.min(2+a.count,7);return(0,b.jsxs)("g",{children:[(0,b.jsx)("path",{d:h,fill:"none",stroke:f.flowEdge,strokeWidth:i,opacity:e?.22:.28,filter:e?void 0:"url(#topo-glow)",markerEnd:"url(#topo-arrow)"}),(0,b.jsx)("path",{id:`flow-path-${c}`,d:h,fill:"none",stroke:f.flowPath,strokeWidth:"1",strokeDasharray:"2 12",opacity:e?.4:.75}),(0,b.jsx)("circle",{r:"4",fill:f.flowParticle,filter:e?void 0:"url(#topo-glow)",children:(0,b.jsx)("animateMotion",{dur:`${2.2+c%5*.32}s`,repeatCount:"indefinite",path:h})})]},a.key)}),(0,b.jsxs)("g",{children:[(0,b.jsxs)("circle",{cx:500,cy:330,r:"6",fill:"none",stroke:"#10b981",strokeWidth:"1.5",children:[(0,b.jsx)("animate",{attributeName:"r",values:"6;28;6",dur:"2.4s",repeatCount:"indefinite"}),(0,b.jsx)("animate",{attributeName:"opacity",values:"0.55;0;0.55",dur:"2.4s",repeatCount:"indefinite"})]}),(0,b.jsxs)("circle",{cx:500,cy:330,r:"6",fill:"none",stroke:"#10b981",strokeWidth:"1.5",opacity:"0",children:[(0,b.jsx)("animate",{attributeName:"r",values:"6;28;6",dur:"2.4s",begin:"1.2s",repeatCount:"indefinite"}),(0,b.jsx)("animate",{attributeName:"opacity",values:"0.45;0;0.45",dur:"2.4s",begin:"1.2s",repeatCount:"indefinite"})]}),(0,b.jsx)("circle",{cx:500,cy:330,r:"6",fill:"#10b981"}),(0,b.jsx)("circle",{cx:500,cy:330,r:"3",fill:"#d1fae5",opacity:"0.9"})]}),[...o,...p].map(a=>{let c=q[a.alias];if(!c)return null;let g=(a.network_id?d[`${a.network_id}:${a.alias}`]:void 0)??d[a.alias],h="offline"!==a.status||!!g,i=h?"working"===a.status?{label:"working",primary:e?"#059669":"#22c55e",halo:e?"#d1fae5":"#14532d",text:e?"#065f46":"#dcfce7"}:"idle"===a.status?{label:"idle",primary:e?"#0d9488":"#2dd4bf",halo:e?"#ccfbf1":"#134e4a",text:e?"#115e59":"#ccfbf1"}:{label:a.status||"online",primary:e?"#0284c7":"#38bdf8",halo:e?"#dbeafe":"#0c4a6e",text:e?"#0c4a6e":"#e0f2fe"}:{label:"offline",primary:e?"#94a3b8":"#6b7280",halo:e?"#e2e8f0":"#111827",text:e?"#475569":"#9ca3af"},j=s.has(a.alias),l=h?26:18;return(0,b.jsxs)("g",{className:"transition-opacity",children:[j&&(0,b.jsxs)("circle",{cx:c.x,cy:c.y,r:l+14,fill:i.primary,opacity:e?.08:.12,children:[(0,b.jsx)("animate",{attributeName:"r",values:`${l+8};${l+22};${l+8}`,dur:"2.4s",repeatCount:"indefinite"}),(0,b.jsx)("animate",{attributeName:"opacity",values:e?"0.12;0.02;0.12":"0.18;0.04;0.18",dur:"2.4s",repeatCount:"indefinite"})]}),(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l+8,fill:i.halo,opacity:h?e?.85:.55:e?.4:.25}),(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:l,fill:h?f.nodeFill.online:f.nodeFill.offline,stroke:i.primary,strokeWidth:h?3:1.5,strokeDasharray:h?"none":"5 5",filter:h&&!e?"url(#topo-glow)":void 0}),(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:h?8:5,fill:i.primary}),"working"===a.status&&(0,b.jsx)("path",{d:`M${c.x-9},${c.y+11} h18`,stroke:f.flowParticle,strokeWidth:"3",strokeLinecap:"round",children:(0,b.jsx)("animate",{attributeName:"opacity",values:"1;0.25;1",dur:"1.1s",repeatCount:"indefinite"})}),(0,b.jsxs)("g",{transform:`translate(${c.x}, ${c.y+l+22})`,children:[(0,b.jsx)("rect",{x:"-62",y:"-14",width:"124",height:"42",rx:"6",fill:f.labelBox.fill,stroke:f.labelBox.stroke,opacity:e?1:.94}),(0,b.jsx)("text",{x:"0",y:"1",textAnchor:"middle",fill:i.text,fontSize:"12",fontFamily:"monospace",fontWeight:"700",children:k(a.alias,14)}),(0,b.jsxs)("text",{x:"0",y:"17",textAnchor:"middle",fill:i.primary,fontSize:"9",fontFamily:"monospace",children:[i.label,h&&null!=g?` sse:${g}`:""]})]})]},a.alias)}),(0,b.jsxs)("g",{transform:"translate(28, 34)",children:[(0,b.jsx)("rect",{x:"0",y:"0",width:"285",height:60+20*Math.min(r.length,4),rx:"8",fill:f.legendBox.fill,stroke:f.legendBox.stroke,opacity:e?1:.94}),(0,b.jsx)("text",{x:"16",y:"26",fill:f.legendHeadline,fontSize:"13",fontFamily:"monospace",fontWeight:"700",children:"recent signal"}),(0,b.jsxs)("text",{x:"178",y:"26",fill:f.legendAccent,fontSize:"11",fontFamily:"monospace",children:[g.length," messages"]}),r.slice(0,4).map((a,c)=>(0,b.jsxs)("text",{x:"16",y:54+20*c,fill:f.legendText,fontSize:"10",fontFamily:"monospace",children:[k(a.from,8)," ","->"," ",k(a.to,8)," / ",a.count," / ",k(a.content,18)]},a.key))]}),(0,b.jsxs)("g",{transform:"translate(720, 34)",children:[(0,b.jsx)("rect",{x:"0",y:"0",width:"250",height:"112",rx:"8",fill:f.legendBox.fill,stroke:f.legendBox.stroke,opacity:e?1:.94}),(0,b.jsx)("circle",{cx:"18",cy:"26",r:"6",fill:e?"#059669":"#22c55e"}),(0,b.jsx)("text",{x:"34",y:"30",fill:f.legendText,fontSize:"11",fontFamily:"monospace",children:"working node"}),(0,b.jsx)("circle",{cx:"18",cy:"52",r:"6",fill:e?"#0d9488":"#2dd4bf"}),(0,b.jsx)("text",{x:"34",y:"56",fill:f.legendText,fontSize:"11",fontFamily:"monospace",children:"online idle"}),(0,b.jsx)("circle",{cx:"18",cy:"78",r:"6",fill:e?"#94a3b8":"#6b7280"}),(0,b.jsx)("text",{x:"34",y:"82",fill:f.legendText,fontSize:"11",fontFamily:"monospace",children:"offline / no SSE"}),(0,b.jsx)("path",{d:"M150,78 Q176,52 210,78",fill:"none",stroke:f.flowEdge,strokeWidth:"3",markerEnd:"url(#topo-arrow)"})]})]})]})]})}var o=a.i(1720);let p={working:{bg:"bg-green-900/30 border-green-800/30",text:"text-green-300",dot:"bg-green-500",glow:"shadow-green-500/10"},idle:{bg:"bg-cyan-900/30 border-cyan-800/30",text:"text-cyan-300",dot:"bg-cyan-400",glow:"shadow-cyan-500/5"},blocked:{bg:"bg-yellow-900/30 border-yellow-800/30",text:"text-yellow-300",dot:"bg-yellow-500",glow:""},error:{bg:"bg-red-900/30 border-red-800/30",text:"text-red-300",dot:"bg-red-500",glow:""}},q={bg:"bg-gray-800/50 border-gray-700/30",text:"text-gray-500",dot:"bg-gray-500",glow:""};function r({session:a,hasSse:c,sseCount:f,onChat:g}){let h=c&&p[a.status]||q;return(0,b.jsxs)(d.default,{href:`/node?alias=${encodeURIComponent(a.alias)}`,prefetch:!1,className:`block rounded-xl border p-4 transition-all duration-300 cursor-pointer ${c?`bg-[#111128] border-[#2a2a4a] hover:border-cyan-500/30 hover:shadow-lg ${h.glow}`:"bg-[#0d0d1a] border-[#1a1a2a] opacity-40"}`,children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(o.AliasAvatar,{alias:a.alias,size:22}),(0,b.jsx)("span",{className:"font-semibold text-white truncate text-sm",title:a.alias,children:a.alias}),(0,b.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${h.dot} ${c&&"working"===a.status?"animate-pulse":""}`})]}),(0,b.jsx)("span",{className:`text-[11px] px-2 py-0.5 rounded-md border shrink-0 ${h.bg} ${h.text}`,children:c?a.status:"offline"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)("span",{className:"text-xs text-gray-600 bg-[#0a0a15] px-2 py-0.5 rounded border border-[#1a1a2a]",children:a.agent||"unknown"}),c&&(0,b.jsxs)("span",{className:"text-[10px] text-green-500",children:["SSE:",f]})]}),a.task?(0,b.jsx)("div",{className:"text-xs text-gray-400 bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] line-clamp-2",title:a.task,children:a.task}):(0,b.jsx)("div",{className:"text-xs text-gray-700 italic",children:"No active task"}),a.progress>0&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsxs)("div",{className:"flex justify-between text-[10px] mb-1",children:[(0,b.jsx)("span",{className:"text-gray-600",children:"Progress"}),(0,b.jsxs)("span",{className:h.text,children:[a.progress,"%"]})]}),(0,b.jsx)("div",{className:"w-full bg-gray-800 rounded-full h-1.5 overflow-hidden",children:(0,b.jsx)("div",{className:`h-1.5 rounded-full transition-all duration-700 ${"working"===a.status?"bg-green-500":"bg-cyan-500"}`,style:{width:`${Math.min(a.progress,100)}%`}})})]}),(0,b.jsxs)("div",{className:"mt-3 flex justify-between items-center text-[10px] text-gray-600",children:[(0,b.jsx)("span",{children:a.server||"--"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[g&&c&&(0,b.jsx)("button",{onClick:b=>{b.preventDefault(),b.stopPropagation(),g(a.alias)},className:"text-cyan-400 hover:text-cyan-300 px-1.5 py-0.5 rounded border border-cyan-500/20 hover:bg-cyan-500/10 transition-colors",children:"Chat"}),(0,b.jsx)("span",{children:(0,e.timeAgo)(a.updated_at)})]})]})]})}function s({messages:a}){return 0===a.length?null:(0,b.jsxs)("div",{className:"mt-8",children:[(0,b.jsxs)("h2",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-gray-500",children:"Inbox"}),(0,b.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:a.length})]}),(0,b.jsx)("div",{className:"space-y-2 max-h-96 overflow-y-auto pr-1 scrollbar-thin",children:a.map(a=>(0,b.jsxs)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm transition-colors hover:border-[#3a3a5a]",children:[(0,b.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mb-1.5",children:[(0,b.jsx)("span",{className:"text-blue-400 font-medium",children:a.from_session}),(0,b.jsx)("span",{children:a.created_at})]}),(0,b.jsx)("div",{className:"text-gray-300 leading-relaxed",children:a.content})]},a.id))})]})}function t(){return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-8 anet-skeleton-pulse",children:[1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-4 py-3",children:[(0,b.jsx)(u,{w:"2.5rem",h:"1.75rem"}),(0,b.jsx)(u,{w:"3.5rem",h:"0.75rem",className:"mt-2"}),(0,b.jsx)(u,{w:"5rem",h:"0.625rem",className:"mt-1"})]},a))}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-3 anet-skeleton-pulse",children:[(0,b.jsx)(u,{w:"6rem",h:"2.5rem",rounded:"0.75rem"}),(0,b.jsxs)("div",{className:"flex-1 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-2.5 flex items-center gap-3",children:[(0,b.jsx)("div",{className:"w-8 h-8 rounded-full anet-skeleton-bar"}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)(u,{w:"6rem",h:"0.875rem"}),(0,b.jsx)(u,{w:"10rem",h:"0.625rem",className:"mt-1"})]})]})]}),(0,b.jsx)("div",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 anet-skeleton-pulse",children:(0,b.jsx)(u,{w:"14rem",h:"0.875rem"})}),(0,b.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-3 anet-skeleton-pulse",children:[1,2,3].map(a=>(0,b.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-3",children:[(0,b.jsx)(u,{w:"2rem",h:"1.25rem"}),(0,b.jsx)(u,{w:"2.5rem",h:"0.75rem",className:"mt-1"}),(0,b.jsx)(u,{w:"3.5rem",h:"0.625rem",className:"mt-px"})]},a))}),(0,b.jsx)("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 mb-6 anet-skeleton-pulse",children:[1,2,3].map(a=>(0,b.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 flex items-center justify-center gap-2",children:[(0,b.jsx)("div",{className:"w-4 h-4 rounded anet-skeleton-bar"}),(0,b.jsx)(u,{w:"4rem",h:"0.75rem"})]},a))}),(0,b.jsxs)("div",{className:"mb-6 flex gap-2 anet-skeleton-pulse",children:[(0,b.jsx)("div",{className:"flex-1 h-10 rounded-lg border border-[#2a2a4a] bg-[#111128]"}),(0,b.jsx)("div",{className:"w-28 h-10 rounded-lg anet-skeleton-bar"})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4 anet-skeleton-pulse",children:[1,2,3,4].map(a=>(0,b.jsxs)("div",{className:"rounded-xl border border-[#2a2a4a] bg-[#111128] p-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)("div",{className:"w-2 h-2 rounded-full anet-skeleton-bar"}),(0,b.jsx)(u,{w:"6rem",h:"0.875rem"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(u,{w:"100%",h:"0.625rem"}),(0,b.jsx)(u,{w:"75%",h:"0.625rem"}),(0,b.jsx)(u,{w:"55%",h:"0.625rem"})]})]},a))})]})}function u({w:a,h:c,rounded:d,className:e}){return(0,b.jsx)("div",{className:`anet-skeleton-bar ${e||""}`,style:{width:a,height:c,borderRadius:d||"0.375rem"}})}var v=a.i(53142),w=a.i(22397);function x(){let{setNetworkId:a}=(0,w.useNetworkId)(),[d,e]=(0,c.useState)({user:null,networks:[],currentNetwork:"",token:""}),[f,g]=(0,c.useState)(!1),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(""),[l,m]=(0,c.useState)(""),[n,o]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let a=sessionStorage.getItem("anet_v3_auth");if(a)try{e(JSON.parse(a))}catch{}},[]);let[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(""),v=async()=>{try{await fetch(`/api/hub/auth?token=${d.token}&endpoint=/api/auth/me`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:d.token,display_name:r,email:t})});let a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update_profile",token:d.token,display_name:r,email:t})}),b=await a.json();if(b.ok&&b.user){let a={...d,user:b.user};e(a),sessionStorage.setItem("anet_v3_auth",JSON.stringify(a)),q(!1)}}catch{}};if(!d.user)return null;let x=(d.user.display_name||d.user.username).slice(0,2).toUpperCase();return(0,b.jsxs)("div",{className:"flex items-center justify-between bg-[#111128] border border-[#2a2a4a] rounded-lg px-4 py-2.5 mb-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center text-xs font-bold text-white",children:x}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm text-white font-medium",children:d.user.display_name||d.user.username}),(0,b.jsxs)("div",{className:"text-[10px] text-gray-500",children:[d.user.role," · ",d.user.user_id]})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[d.networks.length>0&&(0,b.jsx)("select",{value:d.currentNetwork,onChange:b=>{let c={...d,currentNetwork:b.target.value};e(c),a(b.target.value),sessionStorage.setItem("anet_v3_auth",JSON.stringify(c))},className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white focus:outline-none",children:d.networks.map(a=>(0,b.jsx)("option",{value:a.network_id,children:a.network_name},a.network_id))}),(0,b.jsxs)("button",{onClick:()=>{s(d.user?.display_name||""),u(""),q(!p)},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Edit profile",children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:"Edit"}),(0,b.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.862 4.487z"})})]}),(0,b.jsxs)("button",{onClick:()=>{e({user:null,networks:[],currentNetwork:"",token:""}),sessionStorage.removeItem("anet_v3_auth")},className:"text-xs text-gray-500 hover:text-gray-300 whitespace-nowrap","aria-label":"Sign out",children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:"Sign out"}),(0,b.jsx)("svg",{className:"sm:hidden w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})})]})]}),p&&(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-2 pt-2 border-t border-[#2a2a4a]",children:[(0,b.jsx)("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:"Display name",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-32"}),(0,b.jsx)("input",{type:"email",value:t,onChange:a=>u(a.target.value),placeholder:"Email",className:"bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-40"}),(0,b.jsx)("button",{onClick:v,className:"px-2 py-1 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded",children:"Save"})]})]})}var y=a.i(31626),z=a.i(15261);function A({tabs:a,activeTab:c,onOpenTab:d,onCloseTab:e,onSetActive:f,onClose:g}){return 0===a.length?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:g,className:"jsx-f7cf3d1a6fdfc074 fixed inset-0 bg-black/30 z-40 lg:hidden"}),(0,b.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 animate-slide-in",children:[(0,b.jsxs)("div",{className:"jsx-f7cf3d1a6fdfc074 flex items-center border-b border-[#2a2a4a] bg-[#0d0d1a] overflow-x-auto",children:[(0,b.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 flex min-w-0",children:a.map(a=>(0,b.jsxs)("button",{onClick:()=>f(a),className:`jsx-f7cf3d1a6fdfc074 flex items-center gap-1.5 px-3 py-2.5 text-xs border-b-2 transition-colors shrink-0 ${c===a?"border-cyan-400 text-cyan-300 bg-cyan-500/5":"border-transparent text-gray-500 hover:text-gray-300"}`,children:[(0,b.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 w-2 h-2 rounded-full ${c===a?"bg-cyan-400":"bg-gray-600"}`}),(0,b.jsx)("span",{className:"jsx-f7cf3d1a6fdfc074 max-w-[80px] truncate",children:a}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),e(a)},className:"jsx-f7cf3d1a6fdfc074 ml-1 text-gray-600 hover:text-gray-300 p-0.5",children:"×"})]},a))}),(0,b.jsx)("button",{onClick:g,className:"jsx-f7cf3d1a6fdfc074 text-gray-500 hover:text-white px-3 py-2.5 shrink-0 border-l border-[#2a2a4a]",children:(0,b.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-f7cf3d1a6fdfc074 w-4 h-4",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-f7cf3d1a6fdfc074"})})})]}),(0,b.jsx)("div",{className:"jsx-f7cf3d1a6fdfc074 flex-1 relative overflow-hidden",children:a.map(a=>(0,b.jsx)("div",{className:`jsx-f7cf3d1a6fdfc074 absolute inset-0 ${c===a?"block":"hidden"}`,children:(0,b.jsx)(B,{alias:a})},a))})]}),(0,b.jsx)(y.default,{id:"f7cf3d1a6fdfc074",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}function B({alias:a}){return(0,b.jsx)(z.TaskChatPanel,{alias:a,onClose:()=>{},inline:!0})}function C({sessions:a,onClose:d}){let[e,f]=(0,c.useState)(new Set),[g,h]=(0,c.useState)(""),[i,j]=(0,c.useState)("normal"),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)([]),[o,p]=(0,c.useState)(""),q=a.filter(a=>"offline"!==a.status).filter(a=>!o||a.alias.toLowerCase().includes(o.toLowerCase())||(a.agent||"").toLowerCase().includes(o.toLowerCase())),r=async()=>{if(!g.trim()||0===e.size||k)return;l(!0),n([]);let a=[...e].map(async a=>{try{let b=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:a,task:g,priority:i})}),c=await b.json();return{alias:a,ok:!!c.ok,error:c.error}}catch(b){return{alias:a,ok:!1,error:"send failed"}}});n(await Promise.all(a)),l(!1)},s=m.filter(a=>a.ok).length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:d}),(0,b.jsxs)("div",{className:"fixed inset-4 lg:inset-x-[15%] lg:inset-y-[5%] bg-[#0a0a1a] border border-[#2a2a4a] rounded-2xl z-50 flex flex-col shadow-2xl shadow-black/70 overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-lg font-bold text-white",children:"Dispatch Task"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Send a task to one or more agents"})]}),(0,b.jsx)("button",{onClick:d,className:"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 flex flex-col lg:flex-row overflow-hidden",children:[(0,b.jsxs)("div",{className:"lg:w-[280px] border-b lg:border-b-0 lg:border-r border-[#2a2a4a] flex flex-col",children:[(0,b.jsxs)("div",{className:"px-4 py-3 border-b border-[#2a2a4a]",children:[(0,b.jsx)("input",{type:"text",value:o,onChange:a=>p(a.target.value),placeholder:"Filter agents...",className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none"}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,b.jsx)("button",{onClick:()=>{e.size===q.length?f(new Set):f(new Set(q.map(a=>a.alias)))},className:"text-[10px] text-cyan-400 hover:text-cyan-300",children:e.size===q.length?"Deselect all":`Select all (${q.length})`}),(0,b.jsxs)("span",{className:"text-[10px] text-gray-600",children:[e.size," selected"]})]})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-2 py-2 space-y-0.5 max-h-[200px] lg:max-h-none",children:[q.map(a=>(0,b.jsxs)("button",{onClick:()=>{var b;return b=a.alias,void f(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-left transition-colors ${e.has(a.alias)?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/20":"text-gray-400 hover:bg-[#1a1a2a]"}`,children:[(0,b.jsx)("div",{className:`w-2 h-2 rounded-full shrink-0 ${"working"===a.status?"bg-green-400":"idle"===a.status?"bg-cyan-400":"bg-gray-500"}`}),(0,b.jsx)("span",{className:"truncate flex-1",children:a.alias}),(0,b.jsx)("span",{className:"text-[9px] text-gray-600",children:a.agent||"--"})]},a.alias)),0===q.length&&(0,b.jsx)("div",{className:"text-center text-xs text-gray-600 py-4",children:"No online agents"})]})]}),(0,b.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,b.jsxs)("div",{className:"flex-1 px-6 py-4 flex flex-col",children:[(0,b.jsx)("label",{className:"text-xs text-gray-500 uppercase mb-2",children:"Task Prompt"}),(0,b.jsx)("textarea",{value:g,onChange:a=>h(a.target.value),placeholder:"Enter the task you want to dispatch...",className:"flex-1 min-h-[120px] bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none"}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-4",children:[(0,b.jsxs)("select",{value:i,onChange:a=>j(a.target.value),className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-xs text-white focus:outline-none",children:[(0,b.jsx)("option",{value:"normal",children:"Normal priority"}),(0,b.jsx)("option",{value:"high",children:"High priority"}),(0,b.jsx)("option",{value:"low",children:"Low priority"})]}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsx)("button",{onClick:r,disabled:k||!g.trim()||0===e.size,className:"px-6 py-2.5 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-xl transition-all shadow-lg shadow-cyan-500/10 disabled:shadow-none active:scale-95",children:k?(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Sending..."]}):`Dispatch to ${e.size} agent${e.size>1?"s":""}`})]})]}),m.length>0&&(0,b.jsxs)("div",{className:"px-6 py-3 border-t border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,b.jsxs)("div",{className:"text-xs text-gray-500 mb-2",children:[s,"/",m.length," dispatched successfully"]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:m.map(a=>(0,b.jsxs)("span",{className:`text-[10px] px-2 py-0.5 rounded-full border ${a.ok?"text-green-300 border-green-500/20 bg-green-500/5":"text-red-300 border-red-500/20 bg-red-500/5"}`,children:[a.alias,": ",a.ok?"✓":a.error||"✗"]},a.alias))})]})]})]})]})]})}var D=a.i(44332),E=a.i(58224),F=a.i(64565);a.s(["default",0,function(){let a,g,i,j,k;(0,c.useEffect)(()=>{sessionStorage.getItem("anet_v3_auth")||(fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login"))},[]);let{sessions:l,hint:m,error:p,isLoading:q}=(0,D.useSessions)(),{health:u}=(0,D.useHealth)(),{config:w}=(0,D.useAnetConfig)(),{tasks:y}=(0,D.useTasks)({limit:"500"}),{stats:z}=(0,D.useStats)(),{license:B}=(0,D.useLicense)(),[G,H]=(0,c.useState)(!1),[I,J]=(0,c.useState)(!1),K=function(){let[a,b]=(0,c.useState)([]),[d,e]=(0,c.useState)("");return{tabs:a,activeTab:d,openTab:a=>{b(b=>b.includes(a)?b:[...b,a]),e(a)},closeTab:a=>{b(b=>{let c=b.filter(b=>b!==a);return d===a&&e(c[c.length-1]||""),c})},closeAll:()=>{b([]),e("")},setActiveTab:e}}(),[L,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)([]),[P,Q]=(0,c.useState)("all"),{mutate:R}=(0,F.useSWRConfig)(),S="1"!==process.env.NEXT_PUBLIC_DISABLE_SSE,{connected:T,supported:U}=(0,E.useSSE)({url:"/api/hub/events",enabled:S,onEvent:a=>{["new_task","new_message","new_reply","node_status_changed","broadcast"].includes(a.type)&&(R("/api/hub/status"),R(a=>"string"==typeof a&&a.startsWith("/api/hub/tasks"),void 0,{revalidate:!0}))}});if((0,c.useEffect)(()=>{let a=()=>{fetch("/api/hub/inbox").then(a=>a.json()).then(a=>{a.messages?.length&&O(b=>{let c=new Set(b.map(a=>a.id));return[...a.messages.filter(a=>!c.has(a.id)),...b].slice(0,100)})}).catch(()=>{})};a();let b=setInterval(a,1e4);return()=>clearInterval(b)},[]),q)return(0,b.jsx)(t,{});let V=u?.sse_sessions||{},W=a=>(a.network_id?V[`${a.network_id}:${a.alias}`]:void 0)??V[a.alias],X=a=>"offline"!==a.status||!!W(a),Y=l.filter(X).length,Z=l.length,$=l.filter(a=>"working"===a.status).length,_=u?(0,e.formatUptime)(u.uptime):"--",aa=u?.version||"--",ab=!!(w?.hub&&w.tokenConfigured),ac=w?.source==="file"?"Local config":w?.source==="runtime-env"?"Runtime env":"Config missing",ad={};if(z?.tasks?.by_status?.length)for(let a of z.tasks.by_status)ad[a.status]=a.count;else for(let a of y)ad[a.status]=(ad[a.status]||0)+1;let ae=[...l].sort((a,b)=>{let c=+!!X(a),d=+!!X(b);if(c!==d)return d-c;let e=+("working"===a.status);return("working"===b.status)-e});return(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsx)("div",{className:"lg:ml-0 ml-10",children:(0,b.jsx)(f,{online:Y,working:$,total:Z,version:aa,uptime:_})}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.jsx)("button",{onClick:()=>M(!0),className:"px-4 py-2 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 text-white text-sm font-medium rounded-xl shadow-lg shadow-cyan-500/10 transition-all active:scale-95 shrink-0",children:"⚡ Dispatch"}),(0,b.jsx)("div",{className:"flex-1",children:(0,b.jsx)(x,{})})]}),(0,b.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,b.jsxs)("button",{onClick:()=>J(!I),className:"w-full flex items-center justify-between text-left",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)("span",{className:"uppercase text-gray-600",children:"Config"}),(0,b.jsx)("span",{className:`w-2 h-2 rounded-full ${ab?"bg-green-400":"bg-red-400"}`}),(0,b.jsx)("span",{className:"text-gray-500",children:ac})]}),(0,b.jsx)("svg",{className:`w-4 h-4 text-gray-600 transition-transform ${I?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),I&&(0,b.jsxs)("div",{className:"mt-3 pt-3 border-t border-[#2a2a4a]",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,b.jsx)("div",{className:"min-w-0",children:(0,b.jsxs)("div",{className:"text-gray-100 truncate text-sm",title:w?.hub||void 0,children:["Hub: ",(0,b.jsx)("span",{className:w?.hub?"text-cyan-300":"text-red-300",children:w?.hub?.trim()||"not configured"})]})}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2 text-xs",children:(0,b.jsxs)("span",{className:`px-2.5 py-1 rounded-md border ${w?.tokenConfigured?"bg-blue-500/5 text-blue-300 border-blue-500/20":"bg-gray-500/5 text-gray-400 border-gray-500/20"}`,children:["Token: ",w?.tokenPreview||"not configured"]})})]}),w?.error&&(0,b.jsx)("div",{className:"mt-2 text-xs text-gray-600",children:w.error})]})]}),Object.keys(ad).length>0&&(0,b.jsxs)("section",{className:"mb-6 rounded-lg border border-[#2a2a4a] bg-[#111128] px-4 py-3 shadow-lg shadow-black/20",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,b.jsx)("div",{className:"text-xs uppercase text-gray-600",children:"Task Status"}),(0,b.jsx)(d.default,{href:"/tasks",prefetch:!1,className:"text-xs text-cyan-400 hover:text-cyan-300",children:"View all →"})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:[{key:"running",color:"bg-green-500/10 text-green-300 border-green-500/20"},{key:"delivered",color:"bg-blue-500/10 text-blue-300 border-blue-500/20"},{key:"acked",color:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"},{key:"replied",color:"bg-purple-500/10 text-purple-300 border-purple-500/20"},{key:"failed",color:"bg-red-500/10 text-red-300 border-red-500/20"},{key:"cancelled",color:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20"},{key:"expired",color:"bg-orange-500/10 text-orange-300 border-orange-500/20"},{key:"closed",color:"bg-gray-500/10 text-gray-500 border-gray-500/20"}].filter(({key:a})=>ad[a]).map(({key:a,color:c})=>(0,b.jsxs)(d.default,{href:`/tasks?status=${a}`,prefetch:!1,className:`px-2.5 py-1 rounded-md border text-xs ${c} hover:opacity-80 transition-opacity`,children:[a,": ",ad[a]]},a))})]}),(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-gray-600 mb-2",children:"Quick navigation"}),(0,b.jsx)("section",{className:"mb-3 grid grid-cols-3 gap-2 sm:gap-3",children:(a=l.filter(a=>X(a)&&"working"!==a.status).length,g=Z-Y,i=y.filter(a=>"failed"===a.status).length,[{href:"/nodes",label:"Nodes",value:`${Y}/${Z}`,sub:`${Z>0?Math.round(Y/Z*100):0}% online`,color:"text-green-400 border-green-500/20",popover:0===Z?null:[{k:"working",v:$,dot:"",color:"#4ade80"},{k:"idle",v:a,dot:"",color:"#22d3ee"},{k:"offline",v:g,dot:"",color:"#9ca3af"}]},{href:"/tasks",label:"Tasks",value:String(Object.values(ad).reduce((a,b)=>a+b,0)||0),sub:"all-time",color:"text-cyan-400 border-cyan-500/20",popover:0===Object.keys(ad).length?null:["running","replied","failed","cancelled","expired","closed","created","delivered","acked"].filter(a=>ad[a]).map(a=>({k:a,v:ad[a],dot:"",color:({running:"#4ade80",replied:"#a78bfa",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c",closed:"#9ca3af",created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee"})[a]||"#9ca3af"}))},{href:"/tasks?status=failed",label:"Failed",value:String(ad.failed||0),sub:ad.failed?"needs review":"none",color:ad.failed?"text-red-400 border-red-500/25":"text-gray-500 border-gray-700/30",popover:i?[{k:`${i} in current view`,v:"",dot:"",color:"#f87171"}]:[{k:"no failures yet",v:"",dot:"",color:"#4b5563"}]}].map(a=>(0,b.jsxs)(d.default,{href:a.href,prefetch:!1,className:`anet-stat-link group relative rounded-xl border ${a.color} bg-[#111128] px-3 py-3 transition-all hover:-translate-y-px`,children:[(0,b.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,b.jsx)("div",{className:`text-xl font-semibold tabular-nums ${a.color.split(" ")[0]}`,children:a.value}),(0,b.jsx)("div",{className:"hidden sm:block text-[10px] text-gray-600 group-hover:text-gray-400 transition-colors",children:"View →"})]}),(0,b.jsx)("div",{className:"text-[11px] text-gray-400 mt-0.5",children:a.label}),(0,b.jsx)("div",{className:"text-[10px] text-gray-600 mt-px",children:a.sub}),a.popover&&a.popover.length>0&&(0,b.jsxs)("div",{className:"anet-stat-popover hidden md:block pointer-events-none absolute left-2 right-2 top-full mt-1 z-20 rounded-lg border border-[#2a2a4a] bg-[#0d0d1a] shadow-lg shadow-black/30 px-3 py-2 opacity-0 translate-y-[-2px] group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-150 delay-100",children:[(0,b.jsx)("div",{className:"text-[10px] text-gray-600 uppercase tracking-wider mb-1.5",children:"Breakdown"}),(0,b.jsx)("ul",{className:"space-y-1",children:a.popover.map(a=>(0,b.jsxs)("li",{className:"flex items-center gap-2 text-[11px]",children:[(0,b.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:a.color},"aria-hidden":!0}),(0,b.jsx)("span",{className:"text-gray-400 capitalize",children:a.k}),""!==a.v&&(0,b.jsx)("span",{className:"ml-auto text-gray-300 tabular-nums font-medium",children:a.v})]},a.k))})]})]},a.href)))}),(0,b.jsx)("section",{className:"mb-6 grid grid-cols-3 gap-2 sm:gap-3",children:[{href:"/messages",label:"Messages",icon:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"},{href:"/logs",label:"Audit log",icon:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8"},{href:"/admin",label:"Admin",icon:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"}].map(a=>(0,b.jsxs)(d.default,{href:a.href,prefetch:!1,className:"anet-nav-tile flex items-center justify-center gap-2 rounded-xl border border-[#2a2a4a] bg-[#111128] px-3 py-2.5 text-[12px] text-gray-400 hover:text-gray-200 transition-colors",children:[(0,b.jsx)("svg",{className:"w-4 h-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,b.jsx)("path",{d:a.icon})}),(0,b.jsx)("span",{children:a.label})]},a.href))}),(0,b.jsx)(h,{}),y.length>0&&(0,b.jsxs)("section",{className:"mb-6 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Recent Activity"}),(0,b.jsx)(d.default,{href:"/tasks",className:"text-xs text-cyan-400 hover:text-cyan-300",children:"All tasks →"})]}),(0,b.jsx)("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:y.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${"replied"===a.status?"bg-purple-400":"running"===a.status?"bg-green-400":"failed"===a.status?"bg-red-400":"bg-blue-400"}`}),a.from_name&&(0,b.jsx)(o.AliasAvatar,{alias:a.from_name,size:14}),(0,b.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:a.from_name||"?"}),(0,b.jsx)("span",{className:"text-gray-600",children:"→"}),a.to_name&&(0,b.jsx)(o.AliasAvatar,{alias:a.to_name,size:14}),(0,b.jsx)("span",{className:"text-gray-300 shrink-0 max-w-[20%] truncate",children:a.to_name||"?"}),(0,b.jsx)("span",{className:"text-gray-500 truncate flex-1",children:a.content?.slice(0,40)||"--"}),(0,b.jsx)("span",{className:`shrink-0 px-1.5 py-0.5 rounded text-[10px] border ${"replied"===a.status?"text-purple-300 border-purple-500/20":"failed"===a.status?"text-red-300 border-red-500/20":"text-gray-500 border-gray-700/30"}`,children:a.status})]},a.task_id))})]}),p&&(0,b.jsxs)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-3 rounded-lg mb-6 text-sm flex items-center justify-between",role:"alert",children:[(0,b.jsx)("span",{children:String(p)}),(0,b.jsx)("span",{className:"text-gray-500 text-xs",children:"Check CommHub connection"})]}),l.length>0&&(0,b.jsx)("div",{className:"flex justify-center mb-4",children:(0,b.jsx)("button",{onClick:()=>H(!G),className:"text-xs text-gray-500 hover:text-gray-300 border border-gray-700/50 px-4 py-1.5 rounded-lg transition-colors hover:border-gray-600 cursor-pointer",children:G?"Hide Topology":"Show Topology"})}),!G&&l.length>0&&(0,b.jsx)("div",{className:"lg:hidden text-center text-xs text-gray-600 mb-4",children:"Topology hidden on mobile for better readability"}),G&&l.length>0&&(0,b.jsx)(n,{sessions:l,sseSessions:V}),0!==l.length||p?(j={all:ae.length,working:ae.filter(a=>X(a)&&"working"===a.status).length,idle:ae.filter(a=>X(a)&&"working"!==a.status).length,offline:ae.filter(a=>!X(a)).length},k=ae.filter(a=>"all"===P||("offline"===P?!X(a):"working"===P?X(a)&&"working"===a.status:"idle"!==P||X(a)&&"working"!==a.status)),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"mb-3 flex flex-wrap items-center gap-1",children:[{key:"all",label:"All"},{key:"working",label:"Working",dot:"#4ade80"},{key:"idle",label:"Idle",dot:"#22d3ee"},{key:"offline",label:"Offline",dot:"#6b7280"}].map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>Q(a.key),disabled:0===j[a.key]&&"all"!==a.key,className:`flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors disabled:opacity-30 disabled:cursor-not-allowed ${P===a.key?"bg-cyan-500/10 text-cyan-300 border border-cyan-500/30":"text-gray-500 hover:text-gray-200 hover:bg-[#1a1a2a] border border-transparent"}`,children:[a.dot&&(0,b.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:a.dot}}),(0,b.jsx)("span",{children:a.label}),(0,b.jsx)("span",{className:`text-[10px] tabular-nums ${P===a.key?"text-cyan-400":"text-gray-600"}`,children:j[a.key]})]},a.key))}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4",children:k.map(a=>(0,b.jsx)(r,{session:a,hasSse:X(a),sseCount:W(a)||0,onChat:K.openTab},a.alias))}),0===k.length&&(0,b.jsxs)("div",{className:"mt-4 text-center text-xs text-gray-600",children:['No agents match "',P,'" — ',(0,b.jsx)("button",{onClick:()=>Q("all"),className:"underline hover:text-gray-400",children:"Show all"})]})]})):(0,b.jsx)(v.NodesEmptyState,{hint:m}),(0,b.jsx)(s,{messages:N}),(0,b.jsxs)("div",{className:"mt-8 text-center text-xs text-gray-600 flex items-center justify-center gap-2 flex-wrap",children:[U&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${T?"bg-green-400":"bg-gray-600"}`}),T?"SSE live":"SWR polling"]}),B?.license&&(0,b.jsxs)(b.Fragment,{children:[U&&(0,b.jsx)(b.Fragment,{children:"·"}),(0,b.jsxs)("span",{className:B.license.days_left<=7?"text-red-400":"pro"===B.license.type?"text-green-400":"text-yellow-400",children:[B.license.type," (",B.license.days_left,"d left)"]})]})]}),L&&(0,b.jsx)(C,{sessions:l,onClose:()=>M(!1)}),K.tabs.length>0&&(0,b.jsx)(A,{tabs:K.tabs,activeTab:K.activeTab,onOpenTab:K.openTab,onCloseTab:K.closeTab,onSetActive:K.setActiveTab,onClose:K.closeAll})]})}],60350)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=app_page_tsx_0es_sk2._.js.map
|