@bpinhosilva/agent-orchestrator 1.1.0-alpha.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,87 @@
1
+ ## [1.1.1](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.1.0...v1.1.1) (2026-04-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * enhance static file serving to handle dotfile directories correctly ([89ea96a](https://github.com/bpinhosilva/agent-orchestrator/commit/89ea96a9d58abd029515c16c5e222af6dbe6226e))
7
+ * update priority handling in task forms and add comprehensive tests ([a3414d5](https://github.com/bpinhosilva/agent-orchestrator/commit/a3414d5584379ff9701252e9df9aafcbf5b3681e))
8
+ * update priority handling in task schemas and tests for better validation ([858b48d](https://github.com/bpinhosilva/agent-orchestrator/commit/858b48dcfadeefdd5597d81f6597dace2c9e9ee2))
9
+
10
+ # [1.1.0](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0...v1.1.0) (2026-04-17)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **ci:** use legacy-peer-deps to resolve peer dependency conflicts ([b450b45](https://github.com/bpinhosilva/agent-orchestrator/commit/b450b4500ff02addb1bca6cc7f6a40c93e442e7f))
16
+ * compatibility with path-to-regexp for serve-static excluding ([3675042](https://github.com/bpinhosilva/agent-orchestrator/commit/3675042ed0b2b7588c236b6d774aa2136e4835b8))
17
+ * downgrade class-validator from ^0.15.1 to ^0.14.1 ([6d9bb29](https://github.com/bpinhosilva/agent-orchestrator/commit/6d9bb291145cdfad7d8c5f4fc8a7ac6ee48ee776))
18
+ * ensure cli binary is executable and correctly mapped ([7616d98](https://github.com/bpinhosilva/agent-orchestrator/commit/7616d98ec29f4dfb0091869b746a3c9a00fe8cea))
19
+ * trigger release with updated build steps ([1ad13b0](https://github.com/bpinhosilva/agent-orchestrator/commit/1ad13b0eb64adb603762edecb82b27f6672fb847))
20
+ * update collisionDetection to return an empty array in TaskManager tests ([b64158e](https://github.com/bpinhosilva/agent-orchestrator/commit/b64158e61c76a0d148900d36cb9f05784e5d5461))
21
+
22
+
23
+ ### Features
24
+
25
+ * add .npmrc to enable legacy peer dependencies ([2f41a07](https://github.com/bpinhosilva/agent-orchestrator/commit/2f41a0747e3cc862241f90c24405c6ad0976557b))
26
+ * add agent probing functionality with a new API endpoint, service logic ([f71abb6](https://github.com/bpinhosilva/agent-orchestrator/commit/f71abb601745b7f2ae5c1f8be53143429302c1d2))
27
+ * add AGENTS.md file ([51c706f](https://github.com/bpinhosilva/agent-orchestrator/commit/51c706f8784dd354280d853f605bb8c69e53175c))
28
+ * add Claude agent implementation with Anthropic SDK and refactor agent-provider ([1400a0d](https://github.com/bpinhosilva/agent-orchestrator/commit/1400a0dec6beb8393ddc4c5a23b9b860532079e8))
29
+ * add CreateTaskDto ([1604945](https://github.com/bpinhosilva/agent-orchestrator/commit/1604945737b5df5480c6c0814c369902f7cc9142))
30
+ * add early crash detection and log tailing for server process ([b3c7945](https://github.com/bpinhosilva/agent-orchestrator/commit/b3c79454f030845f3056e30f9daab1a7726ce00e))
31
+ * add environment variable setup and JWT refresh secret handling ([c9dfd05](https://github.com/bpinhosilva/agent-orchestrator/commit/c9dfd05070dfc4bc0e34e3853d0efe85d84d404a))
32
+ * add initial user interface for agent management and orchestration ([7a27019](https://github.com/bpinhosilva/agent-orchestrator/commit/7a270197691453384e5827987574f94e93cad7fb))
33
+ * add InitialsAvatar component and do some refactor ([417eff3](https://github.com/bpinhosilva/agent-orchestrator/commit/417eff3bdf4ac8cf072c99fc56744a3a93807a31))
34
+ * add Ollama provider and model support ([7c24c38](https://github.com/bpinhosilva/agent-orchestrator/commit/7c24c38704975c0083485e1e2a4552997cd17e34))
35
+ * add Spanish release notes and update task priority handling ([42484db](https://github.com/bpinhosilva/agent-orchestrator/commit/42484db728a48eed290c00be180598718ca572a5))
36
+ * add user management module, introduce task output field, and include a design document ([7d0717d](https://github.com/bpinhosilva/agent-orchestrator/commit/7d0717d5a566435641e46b2f4b40101df0f62ed6))
37
+ * add UsersPage component with user management features and tests ([bb46646](https://github.com/bpinhosilva/agent-orchestrator/commit/bb466468849b01dd30bc228e3c0375b6aea874e8))
38
+ * **cli:** enhance setup command with detailed configuration options and improved process ([2b7f51d](https://github.com/bpinhosilva/agent-orchestrator/commit/2b7f51d16e8f1949e222c03968d925030e4b0574))
39
+ * **cli:** refactor project, split into multiple components ([f18903b](https://github.com/bpinhosilva/agent-orchestrator/commit/f18903be0b1b09a1e651918d081d96267bfe2bc6))
40
+ * **docs:** add HOST configuration to README and CLI documentation ([8e7820e](https://github.com/bpinhosilva/agent-orchestrator/commit/8e7820e554088bc976559780088927c469f5d059))
41
+ * enhance file path validation and logging in uploads, add ExecLogModal component ([2d9ca31](https://github.com/bpinhosilva/agent-orchestrator/commit/2d9ca31fd67924958f417d113ec974252858782d))
42
+ * enhance JWT security by specifying HS256 algorithm and improve logging in services ([349c94b](https://github.com/bpinhosilva/agent-orchestrator/commit/349c94b31bfdcc2f397cd81848bb2fd3b977a438))
43
+ * enhance project management with user roles and member management ([877832f](https://github.com/bpinhosilva/agent-orchestrator/commit/877832fc4ad8d77499124a4da23c14a1270622a4))
44
+ * enhance task scheduling with dynamic settings and improved error handling ([cbb5097](https://github.com/bpinhosilva/agent-orchestrator/commit/cbb50979f8e79e6cdc581ed29fa0933f82c3e4ee))
45
+ * implement automated database migrations and interactive admin user setup in CLI ([6868b13](https://github.com/bpinhosilva/agent-orchestrator/commit/6868b137ad80c85d4ffc56b884b8016df8a3c533))
46
+ * implement cli and setup alpha releases ([c664ce8](https://github.com/bpinhosilva/agent-orchestrator/commit/c664ce8a6c7301227997fe23f9113053d074c462))
47
+ * implement comprehensive project management, task comments with attachments ([10eb382](https://github.com/bpinhosilva/agent-orchestrator/commit/10eb38268d50ff9418a3e7af1788d55c759522a9))
48
+ * implement containerization, add health check endpoint, and update RBAC ([17149d3](https://github.com/bpinhosilva/agent-orchestrator/commit/17149d32a623f532308ba0f415a4b2ba332ec794))
49
+ * implement models and providers modules add swagger documentation, and update agents ([b6e8245](https://github.com/bpinhosilva/agent-orchestrator/commit/b6e824547f4f603cecf0352b383d20a078fe6662))
50
+ * implement project and task management modules, including entities, DTOs, services, controllers ([3df2c2a](https://github.com/bpinhosilva/agent-orchestrator/commit/3df2c2a6d0bdf4e3e4edbf12f544a8e12970e2dd))
51
+ * implement provider and model management UI and API, and enhance agent configuration ([01dbe34](https://github.com/bpinhosilva/agent-orchestrator/commit/01dbe345b8763da433682d7bc185c017e5b5d5d9))
52
+ * implement recurrent task scheduling system with backend services and UI management modal ([b3c699a](https://github.com/bpinhosilva/agent-orchestrator/commit/b3c699a5b7eb261458d97a7a0d40e5071e33fb1e))
53
+ * implement release workflow with semantic release and build steps; remove old release.yml ([f17eb48](https://github.com/bpinhosilva/agent-orchestrator/commit/f17eb48c64b165c8fd05e142d175716f7990f670))
54
+ * implement scheduler page, add database indexes for performance, and update release workflow ([b4e067a](https://github.com/bpinhosilva/agent-orchestrator/commit/b4e067a1b20e4275214309c1241c163b456260da))
55
+ * implement security fixes ([f570f92](https://github.com/bpinhosilva/agent-orchestrator/commit/f570f92a10cf1473c36a0145c160f6e23905bb1f))
56
+ * implement server startup verification and enhance command handling for restart, rotate-secrets ([4033161](https://github.com/bpinhosilva/agent-orchestrator/commit/40331617046bcfe3bc96e189fa27614bee505235))
57
+ * implement task detail view with comment polling, numeric priorities, and enhanced task card ([7a38155](https://github.com/bpinhosilva/agent-orchestrator/commit/7a38155ac796dbe528d48a340a0e6be7fa0150a3))
58
+ * implement transaction management in services and tests for improved data integrity ([7b213da](https://github.com/bpinhosilva/agent-orchestrator/commit/7b213da8e9ee46da2e40f3e51e3d61c8a50ac850))
59
+ * implement transient agent instances with dynamic configurationn ([5d57b08](https://github.com/bpinhosilva/agent-orchestrator/commit/5d57b0886edf4b14d93ab76f245f4311b6657f7d))
60
+ * implement user authentication system with JWT, registration, and login functionality ([63582fa](https://github.com/bpinhosilva/agent-orchestrator/commit/63582fa8f318c8a6bc174795364a4d3cbd221d45))
61
+ * integrate Personality Matrix component, refactor storage service ([2aa80d3](https://github.com/bpinhosilva/agent-orchestrator/commit/2aa80d3b64cd6431ba0113182dcb5d871075fcfd))
62
+ * integrate wait-on for improved dev workflow ([af26318](https://github.com/bpinhosilva/agent-orchestrator/commit/af2631820f5fc95b7b85c9f6ec52157b7df74264))
63
+ * introduce a task scheduler service for automated agent task assignment and execution ([d756f10](https://github.com/bpinhosilva/agent-orchestrator/commit/d756f10c441aadb3b31335a55926700b5518ec9e))
64
+ * introduce task management UI with draggable cards and refactor provider ([1002dd1](https://github.com/bpinhosilva/agent-orchestrator/commit/1002dd1ac373fe4f6c3acb2eb6e9345b3ec35aba))
65
+ * **migrations:** add initial schema with users, providers, models, agents, projects, tasks ([e08e338](https://github.com/bpinhosilva/agent-orchestrator/commit/e08e3388794e8a556be3584daedd30252a8904fb))
66
+ * **migrations:** add migration to set default UUIDs for ID columns ([ea9289b](https://github.com/bpinhosilva/agent-orchestrator/commit/ea9289b8623d244737dfb7340a58637c8967edf8))
67
+ * **migrations:** add seed and backfill migrations ([5991146](https://github.com/bpinhosilva/agent-orchestrator/commit/5991146cbb3bc971bddf73295dcf7dbd3e2b74e4))
68
+ * **migrations:** db schema ([a0a98b7](https://github.com/bpinhosilva/agent-orchestrator/commit/a0a98b725e09f6d3a9a8fc2305704772195fe2d8))
69
+ * **models:** implement model deletion with agent association check and enhance UI for model mgn ([e4cc599](https://github.com/bpinhosilva/agent-orchestrator/commit/e4cc599263f910e80e00116218e9408ec2ac2bf3))
70
+ * refactor task and comment entities to use Artifact interface for artifacts ([806fde7](https://github.com/bpinhosilva/agent-orchestrator/commit/806fde736b734de0cb3cb9a7a05c5c3eb2d7f171))
71
+ * **refactor:** project terminology and update UI components ([47e5cb4](https://github.com/bpinhosilva/agent-orchestrator/commit/47e5cb4d45c05f893ebdd898f02ceeadcd213652))
72
+ * **TaskManager:** refactor task management with lazy loading and improved state handling ([8988277](https://github.com/bpinhosilva/agent-orchestrator/commit/898827701c7824c93b063fc6ab88862a7d79110b))
73
+ * **ui:** integrate MarkdownField for task description input and enhance TaskExecutions ([d4b91e8](https://github.com/bpinhosilva/agent-orchestrator/commit/d4b91e8b9c392f77a2cab3c0a5bcc641110bced2))
74
+ * update CI workflow to include E2E and UI tests; bump lodash version ([b8ceee6](https://github.com/bpinhosilva/agent-orchestrator/commit/b8ceee6adf0855b54d4a45d959e87ec338c55887))
75
+ * update default port to 15789 for production, enhance migration handling, and refactor env ([e59ba31](https://github.com/bpinhosilva/agent-orchestrator/commit/e59ba3105c5ce7367281bf3ee637bcc3bc124dcc))
76
+ * update Google Gemini API client library, adapt agent implementation and tests ([46a52dd](https://github.com/bpinhosilva/agent-orchestrator/commit/46a52dd518f27cded3213248e9646300b6bc2fb8))
77
+ * update mascot image format and adjust display size in README ([6779313](https://github.com/bpinhosilva/agent-orchestrator/commit/6779313a26a6906ecb47a8819789dc8312f3d6fc))
78
+ * update README and documentation files with additional references and streamlined content ([ae7b1ac](https://github.com/bpinhosilva/agent-orchestrator/commit/ae7b1acbd47eebbc91b154f2b54da83eb8da0be8))
79
+
80
+
81
+ ### Performance Improvements
82
+
83
+ * **db:** optimize schema with composite and missing indexes ([091d7c4](https://github.com/bpinhosilva/agent-orchestrator/commit/091d7c417d9b3291d704754f8cd0b22924aec871))
84
+
1
85
  # [1.1.0-alpha.1](https://github.com/bpinhosilva/agent-orchestrator/compare/v1.0.0...v1.1.0-alpha.1) (2026-04-17)
2
86
 
3
87
 
@@ -77,6 +77,14 @@ exports.AppModule = AppModule = __decorate([
77
77
  rootPath: process.env.NODE_ENV === 'production'
78
78
  ? (0, path_1.join)(__dirname, 'ui')
79
79
  : (0, path_1.join)(__dirname, '..', 'ui', 'dist'),
80
+ serveStaticOptions: {
81
+ setHeaders: (res) => {
82
+ const original = res.sendFile;
83
+ res.sendFile = function (path, opts, cb) {
84
+ original.call(this, (0, path_1.basename)(path), opts === null ? { root: (0, path_1.dirname)(path) } : opts, cb);
85
+ };
86
+ },
87
+ },
80
88
  }),
81
89
  ]
82
90
  : []),
@@ -1 +1 @@
1
- import{a as e,t}from"./rolldown-runtime-COnpUsM8.js";import{g as n}from"./vendor-dnd-CfaHPvi0.js";import{c as r,s as i}from"./vendor-react-BmVaKUwY.js";import{i as a,n as o,t as s}from"./vendor-query-xpDrc4rM.js";import{n as c,r as l,t as u}from"./vendor-markdown-DoJbQ1of.js";import{i as d,t as f}from"./client-BGOBXkO8.js";import{t as p}from"./chevron-right-G5-HRo_C.js";import{t as m}from"./MarkdownField--1gpyapw.js";import{t as h}from"./save-DycJmlX0.js";import{t as g}from"./send-BZjwSrJW.js";import{t as _}from"./shield-check-Cr4SHjdR.js";import{t as v}from"./trash-2-DJpTXgEP.js";import{t as y}from"./ConfirmDialog-y3vTcqFR.js";import{t as b}from"./user--KOoEB9m.js";import{t as x}from"./zap-BmhZqgvm.js";import{n as S}from"./AuthContextInstance-DiFo9Qb2.js";import{n as C}from"./agents-b8btewki.js";import{t as w}from"./useNotification-DQayTSUL.js";import{a as T}from"./agentEmojis-BQA0jC3z.js";import{a as E,c as D,o as O,s as ee}from"./vendor-forms-DHyqHeyd.js";import{i as k,n as A,t as j}from"./tasks-DEUQCNoH.js";import{o as te}from"./taskFormSchemas-dl1t1OyX.js";import{t as M}from"./AttachmentItem-Cerhbyya.js";var ne=d(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),re=d(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),N=d(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),ie=d(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ae=d(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),P=e(n(),1),F={USER:`user`,AGENT:`agent`},I={create:async(e,t)=>(await f.post(`/tasks/${e}/comments`,t)).data,findAllByTask:async e=>(await f.get(`/tasks/${e}/comments`)).data,remove:async(e,t)=>{await f.delete(`/tasks/${e}/comments/${t}`)}},L=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),R=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e=e||{};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),z=e(L(),1),B=e(R(),1),V=l();z.default.extend(B.default);var H=({comment:e,onDelete:t})=>{let n=e.authorType===F.AGENT,r=n?e.authorAgent?.name:e.authorUser?.username,i=n?e.authorAgent?.avatarUrl:e.authorUser?.avatarUrl,a=n?T(e.authorAgent?.emoji):null;return(0,V.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,V.jsx)(`div`,{className:`flex-shrink-0 h-10 w-10 rounded-xl flex items-center justify-center border transition-all ${n?`bg-tertiary/10 border-tertiary/20 text-tertiary shadow-[0_0_15px_rgba(221,183,255,0.1)]`:`bg-primary/10 border-primary/20 text-primary shadow-[0_0_15px_rgba(173,198,255,0.1)]`}`,children:n?(0,V.jsx)(`span`,{className:`text-2xl`,"aria-label":`${r} emoji`,children:a}):i?(0,V.jsx)(`img`,{src:i,alt:r,className:`h-full w-full object-cover p-1`}):(0,V.jsx)(b,{size:20})}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-sm font-headline font-bold ${n?`text-tertiary`:`text-primary`}`,children:r||`Anonymous`}),n&&(0,V.jsx)(`span`,{className:`px-1.5 py-0.5 bg-tertiary/10 text-tertiary text-[9px] font-black uppercase tracking-widest rounded border border-tertiary/20`,children:`Agent`})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`span`,{className:`text-xs font-mono text-on-surface-variant/40 lowercase`,children:(0,z.default)(e.createdAt).format(`MMM DD, YYYY HH:mm:ss`)}),t&&(0,V.jsx)(`button`,{onClick:()=>t(e.id),className:`opacity-0 group-hover:opacity-100 p-2 hover:bg-error/10 text-on-surface-variant/40 hover:text-error rounded-lg transition-all`,title:`Delete comment`,children:(0,V.jsx)(v,{size:18})})]})]}),(0,V.jsxs)(`div`,{className:`bg-surface-container-high/40 border border-outline-variant/5 p-4 rounded-xl shadow-sm group-hover:bg-surface-container-high/60 transition-colors`,children:[(0,V.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none text-on-surface leading-relaxed`,children:(0,V.jsx)(c,{remarkPlugins:[u],children:e.content})}),e.artifacts&&e.artifacts.length>0&&(0,V.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 mt-4 pt-4 border-t border-outline-variant/10`,children:e.artifacts.map(e=>(0,V.jsx)(M,{name:e.originalName,type:e.mimeType.split(`/`)[1]||`file`,filePath:e.filePath,size:`Artifact`},e.id))})]})]})]})},U=({comments:e,isLoading:t,onDelete:n})=>(0,V.jsx)(`div`,{className:`flex-1 overflow-y-auto px-6 py-6 custom-scrollbar`,children:t?(0,V.jsx)(`div`,{className:`space-y-6 animate-pulse`,children:[1,2,3].map(e=>(0,V.jsxs)(`div`,{className:`flex gap-4`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 bg-surface-container-highest rounded-xl`}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-3`,children:[(0,V.jsx)(`div`,{className:`h-4 w-1/4 bg-surface-container-highest rounded`}),(0,V.jsx)(`div`,{className:`h-20 w-full bg-surface-container-highest rounded-xl`})]})]},e))}):e.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-12 text-center space-y-4 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20`,children:[(0,V.jsx)(`div`,{className:`h-12 w-12 rounded-full bg-surface-container-highest flex items-center justify-center text-on-surface-variant/40`,children:(0,V.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})})}),(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-on-surface`,children:`No comments yet`}),(0,V.jsx)(`p`,{className:`text-xs text-on-surface-variant/60`,children:`Start the conversation by adding a comment below.`})]})]}):(0,V.jsx)(`div`,{className:`space-y-8`,children:e.map(e=>(0,V.jsx)(H,{comment:e,onDelete:n},e.id))})}),W=({onSend:e,isSending:t})=>{let[n,r]=(0,P.useState)(``),i=()=>{n.trim()&&!t&&(e(n),r(``))};return(0,V.jsxs)(`div`,{className:`bg-surface-container-low border border-outline-variant/10 rounded-2xl p-4 shadow-2xl shadow-primary/5 focus-within:border-primary/30 transition-all space-y-4`,children:[(0,V.jsx)(m,{value:n,onChange:r,onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&i()},placeholder:`Write a comment...`,height:`min-h-[120px]`}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between pt-4 border-t border-outline-variant/5`,children:[(0,V.jsx)(`div`,{className:`flex items-center gap-1`}),(0,V.jsx)(`button`,{onClick:i,disabled:!n.trim()||t,className:`flex items-center gap-2 px-5 py-2.5 rounded-xl font-bold text-xs uppercase tracking-widest transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 ${n.trim()?`bg-gradient-to-r from-primary to-primary/80 text-on-primary shadow-lg shadow-primary/20 hover:brightness-110`:`bg-surface-container-highest text-on-surface-variant cursor-not-allowed`}`,children:t?(0,V.jsx)(`div`,{className:`w-4 h-4 rounded-full border-2 border-on-primary/30 border-t-on-primary animate-spin`}):(0,V.jsxs)(V.Fragment,{children:[`Send`,(0,V.jsx)(g,{size:14})]})})]})]})},oe=({taskId:e})=>{let[t,n]=(0,P.useState)(!1),[r,i]=(0,P.useState)(null),[s,c]=(0,P.useState)(!1),{user:l}=S(),{notifySuccess:u,notifyApiError:d}=w(),f=a(),{data:p=[],isLoading:m}=o({queryKey:[`comments`,e],queryFn:async()=>[...await I.findAllByTask(e)].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),enabled:!!e,refetchInterval:1e4}),h=(0,P.useCallback)(()=>{f.invalidateQueries({queryKey:[`comments`,e]})},[f,e]);return(0,V.jsxs)(`div`,{className:`bg-surface-container-low rounded-2xl border border-outline-variant/10 shadow-2xl shadow-primary/5 overflow-hidden flex flex-col h-full`,children:[(0,V.jsxs)(`div`,{className:`p-6 border-b border-outline-variant/5 flex items-center justify-between bg-surface-container-low/50 backdrop-blur-md sticky top-0 z-10`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`bg-primary/20 p-2.5 rounded-xl shadow-lg shadow-primary/10`,children:(0,V.jsx)(N,{size:22,className:`text-secondary stroke-[2.5]`})}),(0,V.jsx)(`h2`,{className:`text-lg font-headline font-black tracking-tight text-on-surface`,children:`Comments & Activity`})]}),(0,V.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,V.jsxs)(`span`,{className:`text-[10px] bg-white/5 border border-white/10 px-2 py-0.5 rounded text-white/40 font-mono tracking-widest uppercase`,children:[p.length,` Logged`]})})]}),(0,V.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,V.jsx)(U,{comments:p,isLoading:m,onDelete:e=>{i(e)}})}),(0,V.jsx)(`div`,{className:`p-6 bg-surface-container-low/50 border-t border-outline-variant/5 backdrop-blur-md`,children:(0,V.jsx)(W,{onSend:async t=>{if(!(!e||!l))try{n(!0),await I.create(e,{content:t,authorType:F.USER,authorUserId:l.id}),h()}catch{}finally{n(!1)}},isSending:t})}),(0,V.jsx)(y,{isOpen:!!r,onClose:()=>!s&&i(null),onConfirm:async()=>{if(!(!e||!r))try{c(!0),await I.remove(e,r),h(),i(null),u(`Protocol Cleared`,`The comment data has been purged from the orchestration logs.`)}catch(e){d(e,`Purge Failed`)}finally{c(!1)}},title:`Purge Communication Protocol?`,message:`This action will permanently erase the selected entry and all its associated artifacts from the neural stream. This operation is irreversible.`,confirmText:`Execute Purge`,variant:`danger`,loading:s})]})},G=[`#6366f1`,`#8b5cf6`,`#a855f7`,`#d946ef`,`#ec4899`,`#f43f5e`,`#ef4444`,`#f97316`,`#eab308`,`#84cc16`,`#22c55e`,`#14b8a6`,`#06b6d4`,`#0ea5e9`,`#3b82f6`,`#6d28d9`];function K(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Math.abs(t)}var se=({name:e,size:t=40,className:n=``})=>{let r=(0,P.useMemo)(()=>{let t=e.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():(t[0]?.[0]??`U`).toUpperCase()},[e]),i=(0,P.useMemo)(()=>G[K(e)%G.length],[e]);return(0,V.jsx)(`div`,{role:`img`,"aria-label":`${e} avatar`,className:`inline-flex items-center justify-center rounded-full text-white font-bold select-none shrink-0 ${n}`,style:{width:t,height:t,backgroundColor:i,fontSize:t*.38},children:r})},ce={title:``,description:``,status:A.BACKLOG,priority:j.MEDIUM,assigneeId:``},q=()=>{let{projectId:e,taskId:t}=r(),n=i(),c=a(),{notifyApiError:l,notifyError:u,notifySuccess:d}=w(),[f,g]=(0,P.useState)(!1),b=(0,P.useId)(),S=(0,P.useId)(),T=(0,P.useId)(),M=(0,P.useId)(),N=(0,P.useId)(),{control:F,formState:{errors:I,isDirty:L},handleSubmit:R,register:z,reset:B,setValue:H}=ee({resolver:E(te),defaultValues:ce,mode:`onBlur`}),U=o({queryKey:[`task`,e,t],enabled:!!(e&&t),queryFn:async()=>(await k.findOne(e,t)).data}),W=o({queryKey:[`agents`],queryFn:async()=>(await C.findAll()).data});(0,P.useEffect)(()=>{U.error&&l(U.error,`Fetch Error`)},[l,U.error]),(0,P.useEffect)(()=>{W.error&&l(W.error,`Agents Load Failed`)},[W.error,l]),(0,P.useEffect)(()=>{if(!U.data)return;let e=U.data.status===A.ARCHIVED?A.BACKLOG:U.data.status;B({title:U.data.title,description:U.data.description,status:e,priority:U.data.priority,assigneeId:U.data.assignee?.id??``})},[B,U.data]);let G=s({mutationFn:async n=>{if(!e||!t)throw Error(`Task route is missing required identifiers`);return await k.update(e,t,{title:n.title,description:n.description,status:n.status,priority:n.priority,assigneeId:n.assigneeId||null}),n},onSuccess:n=>{!e||!t||(c.invalidateQueries({queryKey:[`task`,e,t]}),c.invalidateQueries({queryKey:[`tasks`,e]}),B(n),d(`Task Updated`,`Intelligence node parameters successfully reconfigured.`))},onError:e=>{l(e,`Update Failed`)}}),K=s({mutationFn:async()=>{if(!e||!t)throw Error(`Task route is missing required identifiers`);await k.delete(e,t)},onSuccess:()=>{e&&c.invalidateQueries({queryKey:[`tasks`,e]}),c.removeQueries({queryKey:[`task`,e,t]}),d(`Task Decommissioned`,`Intelligence node removed from the orchestration grid.`),n(`/`)},onError:e=>{l(e,`Decommission Failed`)}}),q=U.data,J=(0,P.useMemo)(()=>W.data??[],[W.data]),le=D({control:F,name:`title`}),Y=D({control:F,name:`status`}),ue=D({control:F,name:`priority`}),X=D({control:F,name:`assigneeId`}),Z=(0,P.useMemo)(()=>J.find(e=>e.id===X)??null,[J,X]),Q=U.isPending||G.isPending||K.isPending,de=R(async e=>{await G.mutateAsync(e)},()=>{u(`Validation Error`,`Please review the highlighted fields before saving.`)}),fe=()=>{K.isPending||g(!0)};if(U.isPending)return(0,V.jsx)(`div`,{className:`w-full h-[60vh] flex items-center justify-center`,"aria-busy":`true`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsx)(`div`,{className:`w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin`}),(0,V.jsx)(`p`,{className:`text-on-surface-variant text-sm font-black uppercase tracking-[0.3em] animate-pulse`,children:`Accessing Node Data`})]})});if(!q)return(0,V.jsxs)(`div`,{className:`max-w-4xl mx-auto w-full py-16 text-center space-y-4`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black uppercase tracking-[0.2em] text-on-surface-variant/60`,children:`Task intelligence node unavailable`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(`/`),className:`px-5 py-2 rounded-xl bg-surface-container-high text-on-surface hover:bg-surface-container-highest transition-colors`,children:`Return to Task Manager`})]});let $=`#NODE-${q.id.substring(0,4).toUpperCase()}`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`max-w-7xl mx-auto w-full space-y-8 animate-in fade-in duration-500`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,V.jsxs)(`nav`,{className:`flex items-center space-x-2 text-sm text-on-surface-variant font-medium`,"aria-label":`Task breadcrumb`,children:[(0,V.jsx)(`button`,{type:`button`,className:`hover:text-primary transition-colors`,onClick:()=>n(`/`),children:`Task Manager`}),(0,V.jsx)(p,{size:16,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-on-surface`,children:$})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:fe,disabled:Q,className:`flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-error hover:bg-error/10 transition-all rounded-xl active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,V.jsx)(v,{size:16,"aria-hidden":`true`}),`Decommission`]}),(0,V.jsxs)(`button`,{type:`button`,disabled:!0,"aria-disabled":`true`,className:`flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-on-surface bg-surface-container-high hover:bg-surface-container-highest transition-all rounded-xl opacity-50 cursor-not-allowed`,children:[(0,V.jsx)(re,{size:16,"aria-hidden":`true`}),`Halt execution`]}),(0,V.jsxs)(`button`,{type:`button`,onClick:de,disabled:Q||!L,className:`flex items-center gap-2 px-6 py-2 text-xs font-black uppercase tracking-widest bg-primary text-on-primary rounded-xl shadow-lg shadow-primary/20 hover:scale-105 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100`,children:[(0,V.jsx)(h,{size:16,"aria-hidden":`true`}),G.isPending?`Synchronizing...`:`Save Protocol`]})]})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-12 gap-6`,children:[(0,V.jsxs)(`div`,{className:`lg:col-span-8 flex flex-col gap-6`,children:[(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-2xl relative overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 w-32 h-32 bg-primary/5 rounded-full blur-3xl -mr-16 -mt-16`}),(0,V.jsxs)(`div`,{className:`flex items-start justify-between mb-10 relative z-10 gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-1 min-w-0`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-primary/70`,children:`Intelligence Node identifier`}),(0,V.jsxs)(`h2`,{className:`text-3xl font-headline font-black text-white tracking-tight break-words`,children:[$,`: `,le||q.title]})]}),(0,V.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,V.jsxs)(`select`,{...z(`status`),"aria-invalid":!!I.status,"aria-describedby":I.status?b:void 0,className:`appearance-none cursor-pointer px-6 py-2 rounded-xl border font-black text-[10px] uppercase tracking-widest outline-none transition-all hover:brightness-110 active:scale-95 ${Y===A.DONE?`bg-secondary/10 border-secondary/20 text-secondary`:Y===A.IN_PROGRESS?`bg-primary/10 border-primary/20 text-primary`:`bg-surface-container-highest/50 border-outline-variant/20 text-on-surface-variant`}`,children:[(0,V.jsx)(`option`,{value:A.BACKLOG,className:`bg-surface-container-low`,children:`Backlog`}),(0,V.jsx)(`option`,{value:A.IN_PROGRESS,className:`bg-surface-container-low`,children:`In Progress`}),(0,V.jsx)(`option`,{value:A.REVIEW,className:`bg-surface-container-low`,children:`Review`}),(0,V.jsx)(`option`,{value:A.DONE,className:`bg-surface-container-low`,children:`Done`})]}),Y===A.IN_PROGRESS&&(0,V.jsxs)(`span`,{className:`absolute -left-1 -top-1 flex h-2 w-2`,"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75`}),(0,V.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-primary`})]})]})]}),I.status&&(0,V.jsx)(`p`,{id:b,className:`mb-6 text-xs text-error font-semibold`,children:I.status.message}),(0,V.jsxs)(`div`,{className:`space-y-8 relative z-10`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`task-detail-title`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Node Designation`}),(0,V.jsx)(`input`,{id:`task-detail-title`,className:`w-full bg-surface-container-highest/30 border border-outline-variant/10 rounded-xl px-4 py-3 text-sm text-white focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50 transition-all outline-none font-medium`,type:`text`,"aria-invalid":!!I.title,"aria-describedby":I.title?S:void 0,...z(`title`)}),I.title&&(0,V.jsx)(`p`,{id:S,className:`text-xs text-error font-semibold`,children:I.title.message})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`task-detail-priority`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Operational Priority`}),(0,V.jsx)(O,{control:F,name:`priority`,render:({field:e})=>(0,V.jsxs)(`select`,{id:`task-detail-priority`,value:e.value,onChange:t=>e.onChange(Number(t.target.value)),onBlur:e.onBlur,"aria-invalid":!!I.priority,"aria-describedby":I.priority?T:void 0,className:`w-full border rounded-xl px-4 py-3 text-sm transition-all outline-none font-black tracking-widest uppercase appearance-none ${ue===j.CRITICAL?`bg-error/30 text-white border-error shadow-[0_0_15px_rgba(255,107,107,0.15)] ring-1 ring-error/20`:`bg-surface-container-highest/30 text-white border-outline-variant/10 focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50`}`,children:[(0,V.jsx)(`option`,{value:j.CRITICAL,className:`bg-surface-container-low`,children:`CRITICAL`}),(0,V.jsx)(`option`,{value:j.HIGH,className:`bg-surface-container-low`,children:`HIGH`}),(0,V.jsx)(`option`,{value:j.MEDIUM,className:`bg-surface-container-low`,children:`MEDIUM`}),(0,V.jsx)(`option`,{value:j.LOW,className:`bg-surface-container-low`,children:`LOW`})]})}),I.priority&&(0,V.jsx)(`p`,{id:T,className:`text-xs text-error font-semibold`,children:I.priority.message})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(O,{control:F,name:`description`,render:({field:e})=>(0,V.jsx)(m,{label:`Objective / Parameters`,value:e.value,onChange:t=>e.onChange(t),placeholder:`Describe the desired output and constraints for this node...`,height:`h-56`,helperText:`Supports GitHub Flavored Markdown for logic structure`,initialMode:`preview`,maxLength:2e3})}),I.description&&(0,V.jsx)(`p`,{id:M,className:`text-xs text-error font-semibold`,children:I.description.message})]})]})]}),(0,V.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,V.jsx)(oe,{taskId:t||``})})]}),(0,V.jsxs)(`div`,{className:`lg:col-span-4 space-y-6`,children:[(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-tertiary/80 block mb-6`,children:`Assigned Intelligence`}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`select`,{value:X,onChange:e=>{H(`assigneeId`,e.target.value,{shouldDirty:!0,shouldValidate:!0})},"aria-invalid":!!I.assigneeId,"aria-describedby":I.assigneeId?N:void 0,className:`w-full bg-surface-container-high/50 border border-outline-variant/5 rounded-2xl p-5 appearance-none cursor-pointer focus:ring-1 focus:ring-tertiary/40 outline-none text-white font-headline font-black transition-all hover:border-tertiary/30`,children:[(0,V.jsx)(`option`,{value:``,children:`Protocol Unassigned`}),J.map(e=>(0,V.jsx)(`option`,{value:e.id,className:`bg-surface-container-low`,children:e.name},e.id))]}),(0,V.jsx)(`div`,{className:`absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-on-surface-variant/40`,children:(0,V.jsx)(ne,{size:20,"aria-hidden":`true`})})]}),I.assigneeId&&(0,V.jsx)(`p`,{id:N,className:`text-xs text-error font-semibold`,children:I.assigneeId.message}),Z?(0,V.jsxs)(`div`,{className:`flex items-center gap-5 p-5 bg-tertiary/5 rounded-2xl border border-tertiary/10 animate-in fade-in slide-in-from-top-2 duration-300`,children:[(0,V.jsx)(`div`,{className:`h-14 w-14 rounded-xl bg-tertiary/10 flex items-center justify-center text-tertiary overflow-hidden shadow-inner`,children:(0,V.jsx)(se,{name:Z.name||`U`,size:48,className:`rounded-lg`})}),(0,V.jsxs)(`div`,{className:`flex-1`,children:[(0,V.jsx)(`h4`,{className:`font-headline font-black text-white`,children:Z.name}),(0,V.jsx)(`p`,{className:`text-[10px] text-tertiary/60 font-black uppercase tracking-widest mt-1`,children:Z.role||`Intelligence Unit`})]})]}):(0,V.jsxs)(`div`,{className:`flex items-center gap-5 p-5 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20 italic`,children:[(0,V.jsx)(`div`,{className:`h-14 w-14 rounded-xl bg-surface-container-highest/30 flex items-center justify-center text-on-surface-variant/20`,children:(0,V.jsx)(x,{size:24,"aria-hidden":`true`})}),(0,V.jsxs)(`div`,{className:`flex-1`,children:[(0,V.jsx)(`h4`,{className:`font-headline font-bold text-on-surface-variant/40`,children:`Awaiting Assignment`}),(0,V.jsx)(`p`,{className:`text-[9px] text-on-surface-variant/30 font-black uppercase tracking-widest mt-1`,children:`Grid performance limited`})]})]})]}),(0,V.jsxs)(`button`,{type:`button`,disabled:!0,"aria-disabled":`true`,className:`w-full mt-6 py-3 text-[10px] font-black uppercase tracking-[0.2em] text-on-surface-variant transition-all flex items-center justify-center gap-3 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5 opacity-50 cursor-not-allowed`,children:[(0,V.jsx)(ie,{size:16,className:`text-primary`,"aria-hidden":`true`}),`Tune Node Parameters`]})]}),(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 block mb-8`,children:`Execution metrics`}),(0,V.jsxs)(`div`,{className:`space-y-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex justify-between items-end`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface`,children:`Node Progress`}),(0,V.jsxs)(`span`,{className:`text-xs font-mono text-primary font-bold`,children:[Y===A.DONE?`100`:Y===A.IN_PROGRESS?`42`:`0`,`%`]})]}),(0,V.jsx)(`div`,{className:`h-2 w-full bg-surface-container-highest rounded-full overflow-hidden`,children:(0,V.jsx)(`div`,{className:`h-full rounded-full transition-all duration-1000 ${Y===A.DONE?`bg-secondary`:`bg-primary`}`,style:{width:`${Y===A.DONE?100:Y===A.IN_PROGRESS?42:0}%`}})})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,V.jsxs)(`div`,{className:`p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 text-on-surface-variant/60`,children:[(0,V.jsx)(x,{size:14,className:`text-secondary`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-widest`,children:`Latency`})]}),(0,V.jsxs)(`div`,{className:`text-lg font-mono font-bold text-white`,children:[q.llmLatency||0,`ms`]})]}),(0,V.jsxs)(`div`,{className:`p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 text-on-surface-variant/60`,children:[(0,V.jsx)(ae,{size:14,className:`text-tertiary`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-widest`,children:`Node Cost`})]}),(0,V.jsxs)(`div`,{className:`text-lg font-mono font-bold text-white`,children:[`$`,(q.costEstimate||0).toFixed(6)]})]})]})]})]}),(0,V.jsxs)(`div`,{className:`bg-gradient-to-br from-secondary/5 to-primary/5 p-8 rounded-2xl border border-secondary/10 relative overflow-hidden group shadow-xl`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 -mr-4 -mt-4 text-secondary/5 opacity-50 transition-transform group-hover:scale-110`,children:(0,V.jsx)(_,{size:120,"aria-hidden":`true`})}),(0,V.jsxs)(`div`,{className:`relative z-10`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-secondary/80`,children:`Integrity status`}),(0,V.jsx)(`span`,{className:`px-2 py-0.5 bg-secondary/20 text-secondary text-[9px] font-black rounded uppercase`,children:`Optimal`})]}),(0,V.jsx)(`div`,{className:`text-4xl font-headline font-black text-white tracking-tighter`,children:`99.8%`}),(0,V.jsx)(`p`,{className:`text-[10px] text-on-surface-variant/60 mt-2 italic font-medium leading-relaxed`,children:`Intelligence stream verified and synchronized across grid.`})]})]})]})]})]}),(0,V.jsx)(y,{isOpen:f,onClose:()=>g(!1),onConfirm:()=>{g(!1),K.mutate()},title:`Decommission Task Node?`,message:`Are you sure you want to decommission this task node? This action cannot be undone.`,confirmText:`Decommission`,variant:`danger`,loading:K.isPending})]})};export{q as default};
1
+ import{a as e,t}from"./rolldown-runtime-COnpUsM8.js";import{g as n}from"./vendor-dnd-CfaHPvi0.js";import{c as r,s as i}from"./vendor-react-BmVaKUwY.js";import{i as a,n as o,t as s}from"./vendor-query-xpDrc4rM.js";import{n as c,r as l,t as u}from"./vendor-markdown-DoJbQ1of.js";import{i as d,t as f}from"./client-BGOBXkO8.js";import{t as p}from"./chevron-right-G5-HRo_C.js";import{t as m}from"./MarkdownField--1gpyapw.js";import{t as h}from"./save-DycJmlX0.js";import{t as g}from"./send-BZjwSrJW.js";import{t as _}from"./shield-check-Cr4SHjdR.js";import{t as v}from"./trash-2-DJpTXgEP.js";import{t as y}from"./ConfirmDialog-y3vTcqFR.js";import{t as b}from"./user--KOoEB9m.js";import{t as x}from"./zap-BmhZqgvm.js";import{n as S}from"./AuthContextInstance-DiFo9Qb2.js";import{n as C}from"./agents-b8btewki.js";import{t as w}from"./useNotification-DQayTSUL.js";import{a as T}from"./agentEmojis-BQA0jC3z.js";import{a as E,c as D,o as O,s as ee}from"./vendor-forms-DHyqHeyd.js";import{i as k,n as A,t as j}from"./tasks-DEUQCNoH.js";import{o as te}from"./taskFormSchemas-dl1t1OyX.js";import{t as M}from"./AttachmentItem-Cerhbyya.js";var ne=d(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),re=d(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),N=d(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),ie=d(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ae=d(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),P=e(n(),1),F={USER:`user`,AGENT:`agent`},I={create:async(e,t)=>(await f.post(`/tasks/${e}/comments`,t)).data,findAllByTask:async e=>(await f.get(`/tasks/${e}/comments`)).data,remove:async(e,t)=>{await f.delete(`/tasks/${e}/comments/${t}`)}},L=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),R=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e=e||{};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),z=e(L(),1),B=e(R(),1),V=l();z.default.extend(B.default);var H=({comment:e,onDelete:t})=>{let n=e.authorType===F.AGENT,r=n?e.authorAgent?.name:e.authorUser?.username,i=n?e.authorAgent?.avatarUrl:e.authorUser?.avatarUrl,a=n?T(e.authorAgent?.emoji):null;return(0,V.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,V.jsx)(`div`,{className:`flex-shrink-0 h-10 w-10 rounded-xl flex items-center justify-center border transition-all ${n?`bg-tertiary/10 border-tertiary/20 text-tertiary shadow-[0_0_15px_rgba(221,183,255,0.1)]`:`bg-primary/10 border-primary/20 text-primary shadow-[0_0_15px_rgba(173,198,255,0.1)]`}`,children:n?(0,V.jsx)(`span`,{className:`text-2xl`,"aria-label":`${r} emoji`,children:a}):i?(0,V.jsx)(`img`,{src:i,alt:r,className:`h-full w-full object-cover p-1`}):(0,V.jsx)(b,{size:20})}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-sm font-headline font-bold ${n?`text-tertiary`:`text-primary`}`,children:r||`Anonymous`}),n&&(0,V.jsx)(`span`,{className:`px-1.5 py-0.5 bg-tertiary/10 text-tertiary text-[9px] font-black uppercase tracking-widest rounded border border-tertiary/20`,children:`Agent`})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`span`,{className:`text-xs font-mono text-on-surface-variant/40 lowercase`,children:(0,z.default)(e.createdAt).format(`MMM DD, YYYY HH:mm:ss`)}),t&&(0,V.jsx)(`button`,{onClick:()=>t(e.id),className:`opacity-0 group-hover:opacity-100 p-2 hover:bg-error/10 text-on-surface-variant/40 hover:text-error rounded-lg transition-all`,title:`Delete comment`,children:(0,V.jsx)(v,{size:18})})]})]}),(0,V.jsxs)(`div`,{className:`bg-surface-container-high/40 border border-outline-variant/5 p-4 rounded-xl shadow-sm group-hover:bg-surface-container-high/60 transition-colors`,children:[(0,V.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none text-on-surface leading-relaxed`,children:(0,V.jsx)(c,{remarkPlugins:[u],children:e.content})}),e.artifacts&&e.artifacts.length>0&&(0,V.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 mt-4 pt-4 border-t border-outline-variant/10`,children:e.artifacts.map(e=>(0,V.jsx)(M,{name:e.originalName,type:e.mimeType.split(`/`)[1]||`file`,filePath:e.filePath,size:`Artifact`},e.id))})]})]})]})},U=({comments:e,isLoading:t,onDelete:n})=>(0,V.jsx)(`div`,{className:`flex-1 overflow-y-auto px-6 py-6 custom-scrollbar`,children:t?(0,V.jsx)(`div`,{className:`space-y-6 animate-pulse`,children:[1,2,3].map(e=>(0,V.jsxs)(`div`,{className:`flex gap-4`,children:[(0,V.jsx)(`div`,{className:`h-10 w-10 bg-surface-container-highest rounded-xl`}),(0,V.jsxs)(`div`,{className:`flex-1 space-y-3`,children:[(0,V.jsx)(`div`,{className:`h-4 w-1/4 bg-surface-container-highest rounded`}),(0,V.jsx)(`div`,{className:`h-20 w-full bg-surface-container-highest rounded-xl`})]})]},e))}):e.length===0?(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-12 text-center space-y-4 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20`,children:[(0,V.jsx)(`div`,{className:`h-12 w-12 rounded-full bg-surface-container-highest flex items-center justify-center text-on-surface-variant/40`,children:(0,V.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})})}),(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`p`,{className:`text-sm font-bold text-on-surface`,children:`No comments yet`}),(0,V.jsx)(`p`,{className:`text-xs text-on-surface-variant/60`,children:`Start the conversation by adding a comment below.`})]})]}):(0,V.jsx)(`div`,{className:`space-y-8`,children:e.map(e=>(0,V.jsx)(H,{comment:e,onDelete:n},e.id))})}),W=({onSend:e,isSending:t})=>{let[n,r]=(0,P.useState)(``),i=()=>{n.trim()&&!t&&(e(n),r(``))};return(0,V.jsxs)(`div`,{className:`bg-surface-container-low border border-outline-variant/10 rounded-2xl p-4 shadow-2xl shadow-primary/5 focus-within:border-primary/30 transition-all space-y-4`,children:[(0,V.jsx)(m,{value:n,onChange:r,onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&i()},placeholder:`Write a comment...`,height:`min-h-[120px]`}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between pt-4 border-t border-outline-variant/5`,children:[(0,V.jsx)(`div`,{className:`flex items-center gap-1`}),(0,V.jsx)(`button`,{onClick:i,disabled:!n.trim()||t,className:`flex items-center gap-2 px-5 py-2.5 rounded-xl font-bold text-xs uppercase tracking-widest transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 ${n.trim()?`bg-gradient-to-r from-primary to-primary/80 text-on-primary shadow-lg shadow-primary/20 hover:brightness-110`:`bg-surface-container-highest text-on-surface-variant cursor-not-allowed`}`,children:t?(0,V.jsx)(`div`,{className:`w-4 h-4 rounded-full border-2 border-on-primary/30 border-t-on-primary animate-spin`}):(0,V.jsxs)(V.Fragment,{children:[`Send`,(0,V.jsx)(g,{size:14})]})})]})]})},oe=({taskId:e})=>{let[t,n]=(0,P.useState)(!1),[r,i]=(0,P.useState)(null),[s,c]=(0,P.useState)(!1),{user:l}=S(),{notifySuccess:u,notifyApiError:d}=w(),f=a(),{data:p=[],isLoading:m}=o({queryKey:[`comments`,e],queryFn:async()=>[...await I.findAllByTask(e)].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),enabled:!!e,refetchInterval:1e4}),h=(0,P.useCallback)(()=>{f.invalidateQueries({queryKey:[`comments`,e]})},[f,e]);return(0,V.jsxs)(`div`,{className:`bg-surface-container-low rounded-2xl border border-outline-variant/10 shadow-2xl shadow-primary/5 overflow-hidden flex flex-col h-full`,children:[(0,V.jsxs)(`div`,{className:`p-6 border-b border-outline-variant/5 flex items-center justify-between bg-surface-container-low/50 backdrop-blur-md sticky top-0 z-10`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(`div`,{className:`bg-primary/20 p-2.5 rounded-xl shadow-lg shadow-primary/10`,children:(0,V.jsx)(N,{size:22,className:`text-secondary stroke-[2.5]`})}),(0,V.jsx)(`h2`,{className:`text-lg font-headline font-black tracking-tight text-on-surface`,children:`Comments & Activity`})]}),(0,V.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,V.jsxs)(`span`,{className:`text-[10px] bg-white/5 border border-white/10 px-2 py-0.5 rounded text-white/40 font-mono tracking-widest uppercase`,children:[p.length,` Logged`]})})]}),(0,V.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,V.jsx)(U,{comments:p,isLoading:m,onDelete:e=>{i(e)}})}),(0,V.jsx)(`div`,{className:`p-6 bg-surface-container-low/50 border-t border-outline-variant/5 backdrop-blur-md`,children:(0,V.jsx)(W,{onSend:async t=>{if(!(!e||!l))try{n(!0),await I.create(e,{content:t,authorType:F.USER,authorUserId:l.id}),h()}catch{}finally{n(!1)}},isSending:t})}),(0,V.jsx)(y,{isOpen:!!r,onClose:()=>!s&&i(null),onConfirm:async()=>{if(!(!e||!r))try{c(!0),await I.remove(e,r),h(),i(null),u(`Protocol Cleared`,`The comment data has been purged from the orchestration logs.`)}catch(e){d(e,`Purge Failed`)}finally{c(!1)}},title:`Purge Communication Protocol?`,message:`This action will permanently erase the selected entry and all its associated artifacts from the neural stream. This operation is irreversible.`,confirmText:`Execute Purge`,variant:`danger`,loading:s})]})},G=[`#6366f1`,`#8b5cf6`,`#a855f7`,`#d946ef`,`#ec4899`,`#f43f5e`,`#ef4444`,`#f97316`,`#eab308`,`#84cc16`,`#22c55e`,`#14b8a6`,`#06b6d4`,`#0ea5e9`,`#3b82f6`,`#6d28d9`];function K(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Math.abs(t)}var se=({name:e,size:t=40,className:n=``})=>{let r=(0,P.useMemo)(()=>{let t=e.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():(t[0]?.[0]??`U`).toUpperCase()},[e]),i=(0,P.useMemo)(()=>G[K(e)%G.length],[e]);return(0,V.jsx)(`div`,{role:`img`,"aria-label":`${e} avatar`,className:`inline-flex items-center justify-center rounded-full text-white font-bold select-none shrink-0 ${n}`,style:{width:t,height:t,backgroundColor:i,fontSize:t*.38},children:r})},ce={title:``,description:``,status:A.BACKLOG,priority:j.MEDIUM,assigneeId:``},q=()=>{let{projectId:e,taskId:t}=r(),n=i(),c=a(),{notifyApiError:l,notifyError:u,notifySuccess:d}=w(),[f,g]=(0,P.useState)(!1),b=(0,P.useId)(),S=(0,P.useId)(),T=(0,P.useId)(),M=(0,P.useId)(),N=(0,P.useId)(),{control:F,formState:{errors:I,isDirty:L},handleSubmit:R,register:z,reset:B,setValue:H}=ee({resolver:E(te),defaultValues:ce,mode:`onBlur`}),U=o({queryKey:[`task`,e,t],enabled:!!(e&&t),queryFn:async()=>(await k.findOne(e,t)).data}),W=o({queryKey:[`agents`],queryFn:async()=>(await C.findAll()).data});(0,P.useEffect)(()=>{U.error&&l(U.error,`Fetch Error`)},[l,U.error]),(0,P.useEffect)(()=>{W.error&&l(W.error,`Agents Load Failed`)},[W.error,l]),(0,P.useEffect)(()=>{if(!U.data)return;let e=U.data.status===A.ARCHIVED?A.BACKLOG:U.data.status;B({title:U.data.title,description:U.data.description,status:e,priority:Number(U.data.priority),assigneeId:U.data.assignee?.id??``})},[B,U.data]);let G=s({mutationFn:async n=>{if(!e||!t)throw Error(`Task route is missing required identifiers`);return await k.update(e,t,{title:n.title,description:n.description,status:n.status,priority:n.priority,assigneeId:n.assigneeId||null}),n},onSuccess:n=>{!e||!t||(c.invalidateQueries({queryKey:[`task`,e,t]}),c.invalidateQueries({queryKey:[`tasks`,e]}),B(n),d(`Task Updated`,`Intelligence node parameters successfully reconfigured.`))},onError:e=>{l(e,`Update Failed`)}}),K=s({mutationFn:async()=>{if(!e||!t)throw Error(`Task route is missing required identifiers`);await k.delete(e,t)},onSuccess:()=>{e&&c.invalidateQueries({queryKey:[`tasks`,e]}),c.removeQueries({queryKey:[`task`,e,t]}),d(`Task Decommissioned`,`Intelligence node removed from the orchestration grid.`),n(`/`)},onError:e=>{l(e,`Decommission Failed`)}}),q=U.data,J=(0,P.useMemo)(()=>W.data??[],[W.data]),le=D({control:F,name:`title`}),Y=D({control:F,name:`status`}),ue=D({control:F,name:`priority`}),X=D({control:F,name:`assigneeId`}),Z=(0,P.useMemo)(()=>J.find(e=>e.id===X)??null,[J,X]),Q=U.isPending||G.isPending||K.isPending,de=R(async e=>{await G.mutateAsync(e)},()=>{u(`Validation Error`,`Please review the highlighted fields before saving.`)}),fe=()=>{K.isPending||g(!0)};if(U.isPending)return(0,V.jsx)(`div`,{className:`w-full h-[60vh] flex items-center justify-center`,"aria-busy":`true`,children:(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,V.jsx)(`div`,{className:`w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin`}),(0,V.jsx)(`p`,{className:`text-on-surface-variant text-sm font-black uppercase tracking-[0.3em] animate-pulse`,children:`Accessing Node Data`})]})});if(!q)return(0,V.jsxs)(`div`,{className:`max-w-4xl mx-auto w-full py-16 text-center space-y-4`,children:[(0,V.jsx)(`p`,{className:`text-sm font-black uppercase tracking-[0.2em] text-on-surface-variant/60`,children:`Task intelligence node unavailable`}),(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(`/`),className:`px-5 py-2 rounded-xl bg-surface-container-high text-on-surface hover:bg-surface-container-highest transition-colors`,children:`Return to Task Manager`})]});let $=`#NODE-${q.id.substring(0,4).toUpperCase()}`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`max-w-7xl mx-auto w-full space-y-8 animate-in fade-in duration-500`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,V.jsxs)(`nav`,{className:`flex items-center space-x-2 text-sm text-on-surface-variant font-medium`,"aria-label":`Task breadcrumb`,children:[(0,V.jsx)(`button`,{type:`button`,className:`hover:text-primary transition-colors`,onClick:()=>n(`/`),children:`Task Manager`}),(0,V.jsx)(p,{size:16,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-on-surface`,children:$})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:fe,disabled:Q,className:`flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-error hover:bg-error/10 transition-all rounded-xl active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,V.jsx)(v,{size:16,"aria-hidden":`true`}),`Decommission`]}),(0,V.jsxs)(`button`,{type:`button`,disabled:!0,"aria-disabled":`true`,className:`flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-on-surface bg-surface-container-high hover:bg-surface-container-highest transition-all rounded-xl opacity-50 cursor-not-allowed`,children:[(0,V.jsx)(re,{size:16,"aria-hidden":`true`}),`Halt execution`]}),(0,V.jsxs)(`button`,{type:`button`,onClick:de,disabled:Q||!L,className:`flex items-center gap-2 px-6 py-2 text-xs font-black uppercase tracking-widest bg-primary text-on-primary rounded-xl shadow-lg shadow-primary/20 hover:scale-105 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100`,children:[(0,V.jsx)(h,{size:16,"aria-hidden":`true`}),G.isPending?`Synchronizing...`:`Save Protocol`]})]})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-12 gap-6`,children:[(0,V.jsxs)(`div`,{className:`lg:col-span-8 flex flex-col gap-6`,children:[(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-2xl relative overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 w-32 h-32 bg-primary/5 rounded-full blur-3xl -mr-16 -mt-16`}),(0,V.jsxs)(`div`,{className:`flex items-start justify-between mb-10 relative z-10 gap-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-1 min-w-0`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-primary/70`,children:`Intelligence Node identifier`}),(0,V.jsxs)(`h2`,{className:`text-3xl font-headline font-black text-white tracking-tight break-words`,children:[$,`: `,le||q.title]})]}),(0,V.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,V.jsxs)(`select`,{...z(`status`),"aria-invalid":!!I.status,"aria-describedby":I.status?b:void 0,className:`appearance-none cursor-pointer px-6 py-2 rounded-xl border font-black text-[10px] uppercase tracking-widest outline-none transition-all hover:brightness-110 active:scale-95 ${Y===A.DONE?`bg-secondary/10 border-secondary/20 text-secondary`:Y===A.IN_PROGRESS?`bg-primary/10 border-primary/20 text-primary`:`bg-surface-container-highest/50 border-outline-variant/20 text-on-surface-variant`}`,children:[(0,V.jsx)(`option`,{value:A.BACKLOG,className:`bg-surface-container-low`,children:`Backlog`}),(0,V.jsx)(`option`,{value:A.IN_PROGRESS,className:`bg-surface-container-low`,children:`In Progress`}),(0,V.jsx)(`option`,{value:A.REVIEW,className:`bg-surface-container-low`,children:`Review`}),(0,V.jsx)(`option`,{value:A.DONE,className:`bg-surface-container-low`,children:`Done`})]}),Y===A.IN_PROGRESS&&(0,V.jsxs)(`span`,{className:`absolute -left-1 -top-1 flex h-2 w-2`,"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75`}),(0,V.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-primary`})]})]})]}),I.status&&(0,V.jsx)(`p`,{id:b,className:`mb-6 text-xs text-error font-semibold`,children:I.status.message}),(0,V.jsxs)(`div`,{className:`space-y-8 relative z-10`,children:[(0,V.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`task-detail-title`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Node Designation`}),(0,V.jsx)(`input`,{id:`task-detail-title`,className:`w-full bg-surface-container-highest/30 border border-outline-variant/10 rounded-xl px-4 py-3 text-sm text-white focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50 transition-all outline-none font-medium`,type:`text`,"aria-invalid":!!I.title,"aria-describedby":I.title?S:void 0,...z(`title`)}),I.title&&(0,V.jsx)(`p`,{id:S,className:`text-xs text-error font-semibold`,children:I.title.message})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`label`,{htmlFor:`task-detail-priority`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Operational Priority`}),(0,V.jsx)(O,{control:F,name:`priority`,render:({field:e})=>(0,V.jsxs)(`select`,{id:`task-detail-priority`,value:e.value,onChange:t=>e.onChange(Number(t.target.value)),onBlur:e.onBlur,"aria-invalid":!!I.priority,"aria-describedby":I.priority?T:void 0,className:`w-full border rounded-xl px-4 py-3 text-sm transition-all outline-none font-black tracking-widest uppercase appearance-none ${ue===j.CRITICAL?`bg-error/30 text-white border-error shadow-[0_0_15px_rgba(255,107,107,0.15)] ring-1 ring-error/20`:`bg-surface-container-highest/30 text-white border-outline-variant/10 focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50`}`,children:[(0,V.jsx)(`option`,{value:j.CRITICAL,className:`bg-surface-container-low`,children:`CRITICAL`}),(0,V.jsx)(`option`,{value:j.HIGH,className:`bg-surface-container-low`,children:`HIGH`}),(0,V.jsx)(`option`,{value:j.MEDIUM,className:`bg-surface-container-low`,children:`MEDIUM`}),(0,V.jsx)(`option`,{value:j.LOW,className:`bg-surface-container-low`,children:`LOW`})]})}),I.priority&&(0,V.jsx)(`p`,{id:T,className:`text-xs text-error font-semibold`,children:I.priority.message})]})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(O,{control:F,name:`description`,render:({field:e})=>(0,V.jsx)(m,{label:`Objective / Parameters`,value:e.value,onChange:t=>e.onChange(t),placeholder:`Describe the desired output and constraints for this node...`,height:`h-56`,helperText:`Supports GitHub Flavored Markdown for logic structure`,initialMode:`preview`,maxLength:2e3})}),I.description&&(0,V.jsx)(`p`,{id:M,className:`text-xs text-error font-semibold`,children:I.description.message})]})]})]}),(0,V.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,V.jsx)(oe,{taskId:t||``})})]}),(0,V.jsxs)(`div`,{className:`lg:col-span-4 space-y-6`,children:[(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-tertiary/80 block mb-6`,children:`Assigned Intelligence`}),(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsxs)(`select`,{value:X,onChange:e=>{H(`assigneeId`,e.target.value,{shouldDirty:!0,shouldValidate:!0})},"aria-invalid":!!I.assigneeId,"aria-describedby":I.assigneeId?N:void 0,className:`w-full bg-surface-container-high/50 border border-outline-variant/5 rounded-2xl p-5 appearance-none cursor-pointer focus:ring-1 focus:ring-tertiary/40 outline-none text-white font-headline font-black transition-all hover:border-tertiary/30`,children:[(0,V.jsx)(`option`,{value:``,children:`Protocol Unassigned`}),J.map(e=>(0,V.jsx)(`option`,{value:e.id,className:`bg-surface-container-low`,children:e.name},e.id))]}),(0,V.jsx)(`div`,{className:`absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-on-surface-variant/40`,children:(0,V.jsx)(ne,{size:20,"aria-hidden":`true`})})]}),I.assigneeId&&(0,V.jsx)(`p`,{id:N,className:`text-xs text-error font-semibold`,children:I.assigneeId.message}),Z?(0,V.jsxs)(`div`,{className:`flex items-center gap-5 p-5 bg-tertiary/5 rounded-2xl border border-tertiary/10 animate-in fade-in slide-in-from-top-2 duration-300`,children:[(0,V.jsx)(`div`,{className:`h-14 w-14 rounded-xl bg-tertiary/10 flex items-center justify-center text-tertiary overflow-hidden shadow-inner`,children:(0,V.jsx)(se,{name:Z.name||`U`,size:48,className:`rounded-lg`})}),(0,V.jsxs)(`div`,{className:`flex-1`,children:[(0,V.jsx)(`h4`,{className:`font-headline font-black text-white`,children:Z.name}),(0,V.jsx)(`p`,{className:`text-[10px] text-tertiary/60 font-black uppercase tracking-widest mt-1`,children:Z.role||`Intelligence Unit`})]})]}):(0,V.jsxs)(`div`,{className:`flex items-center gap-5 p-5 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20 italic`,children:[(0,V.jsx)(`div`,{className:`h-14 w-14 rounded-xl bg-surface-container-highest/30 flex items-center justify-center text-on-surface-variant/20`,children:(0,V.jsx)(x,{size:24,"aria-hidden":`true`})}),(0,V.jsxs)(`div`,{className:`flex-1`,children:[(0,V.jsx)(`h4`,{className:`font-headline font-bold text-on-surface-variant/40`,children:`Awaiting Assignment`}),(0,V.jsx)(`p`,{className:`text-[9px] text-on-surface-variant/30 font-black uppercase tracking-widest mt-1`,children:`Grid performance limited`})]})]})]}),(0,V.jsxs)(`button`,{type:`button`,disabled:!0,"aria-disabled":`true`,className:`w-full mt-6 py-3 text-[10px] font-black uppercase tracking-[0.2em] text-on-surface-variant transition-all flex items-center justify-center gap-3 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5 opacity-50 cursor-not-allowed`,children:[(0,V.jsx)(ie,{size:16,className:`text-primary`,"aria-hidden":`true`}),`Tune Node Parameters`]})]}),(0,V.jsxs)(`div`,{className:`bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl`,children:[(0,V.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 block mb-8`,children:`Execution metrics`}),(0,V.jsxs)(`div`,{className:`space-y-8`,children:[(0,V.jsxs)(`div`,{className:`space-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex justify-between items-end`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface`,children:`Node Progress`}),(0,V.jsxs)(`span`,{className:`text-xs font-mono text-primary font-bold`,children:[Y===A.DONE?`100`:Y===A.IN_PROGRESS?`42`:`0`,`%`]})]}),(0,V.jsx)(`div`,{className:`h-2 w-full bg-surface-container-highest rounded-full overflow-hidden`,children:(0,V.jsx)(`div`,{className:`h-full rounded-full transition-all duration-1000 ${Y===A.DONE?`bg-secondary`:`bg-primary`}`,style:{width:`${Y===A.DONE?100:Y===A.IN_PROGRESS?42:0}%`}})})]}),(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,V.jsxs)(`div`,{className:`p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 text-on-surface-variant/60`,children:[(0,V.jsx)(x,{size:14,className:`text-secondary`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-widest`,children:`Latency`})]}),(0,V.jsxs)(`div`,{className:`text-lg font-mono font-bold text-white`,children:[q.llmLatency||0,`ms`]})]}),(0,V.jsxs)(`div`,{className:`p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-1 text-on-surface-variant/60`,children:[(0,V.jsx)(ae,{size:14,className:`text-tertiary`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-[9px] font-black uppercase tracking-widest`,children:`Node Cost`})]}),(0,V.jsxs)(`div`,{className:`text-lg font-mono font-bold text-white`,children:[`$`,(q.costEstimate||0).toFixed(6)]})]})]})]})]}),(0,V.jsxs)(`div`,{className:`bg-gradient-to-br from-secondary/5 to-primary/5 p-8 rounded-2xl border border-secondary/10 relative overflow-hidden group shadow-xl`,children:[(0,V.jsx)(`div`,{className:`absolute top-0 right-0 -mr-4 -mt-4 text-secondary/5 opacity-50 transition-transform group-hover:scale-110`,children:(0,V.jsx)(_,{size:120,"aria-hidden":`true`})}),(0,V.jsxs)(`div`,{className:`relative z-10`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] text-secondary/80`,children:`Integrity status`}),(0,V.jsx)(`span`,{className:`px-2 py-0.5 bg-secondary/20 text-secondary text-[9px] font-black rounded uppercase`,children:`Optimal`})]}),(0,V.jsx)(`div`,{className:`text-4xl font-headline font-black text-white tracking-tighter`,children:`99.8%`}),(0,V.jsx)(`p`,{className:`text-[10px] text-on-surface-variant/60 mt-2 italic font-medium leading-relaxed`,children:`Intelligence stream verified and synchronized across grid.`})]})]})]})]})]}),(0,V.jsx)(y,{isOpen:f,onClose:()=>g(!1),onConfirm:()=>{g(!1),K.mutate()},title:`Decommission Task Node?`,message:`Are you sure you want to decommission this task node? This action cannot be undone.`,confirmText:`Decommission`,variant:`danger`,loading:K.isPending})]})};export{q as default};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AgentFleet-BarfEwcK.js","assets/vendor-query-xpDrc4rM.js","assets/rolldown-runtime-COnpUsM8.js","assets/vendor-dnd-CfaHPvi0.js","assets/vendor-markdown-DoJbQ1of.js","assets/vendor-forms-DHyqHeyd.js","assets/client-BGOBXkO8.js","assets/vendor-motion-CMGWJcqR.js","assets/activity-CmAajKmR.js","assets/box-Bw_pyYzU.js","assets/brain-C6vlLcg3.js","assets/check-DTei8Qlg.js","assets/chevron-down-LTeQHW9O.js","assets/circle-alert-pUx6yhcF.js","assets/circle-check-B9kyRki5.js","assets/terminal-a6AV2mPO.js","assets/MarkdownField--1gpyapw.js","assets/eye-Cc-vy4Zu.js","assets/sparkles-v57Nc-z-.js","assets/providers-CNrSTcdc.js","assets/layers-BcHXXg-4.js","assets/loader-circle-Cl6yIkPK.js","assets/plus-Dx6G8SOZ.js","assets/send-BZjwSrJW.js","assets/settings-at7JqFrc.js","assets/trash-2-DJpTXgEP.js","assets/ConfirmDialog-y3vTcqFR.js","assets/info-1jA6X-_e.js","assets/x-wDy15QMx.js","assets/agents-b8btewki.js","assets/useNotification-DQayTSUL.js","assets/agentEmojis-BQA0jC3z.js","assets/taskFormSchemas-dl1t1OyX.js","assets/tasks-DEUQCNoH.js","assets/Providers-DR7srJHq.js","assets/cn-CWOQtFh4.js","assets/chevron-right-G5-HRo_C.js","assets/clock-BY4rrypg.js","assets/cpu-8Sbc9Dk0.js","assets/database-D6O4hvbm.js","assets/rocket-CMSwBl_C.js","assets/server-CJE2K1Vt.js","assets/zap-BmhZqgvm.js","assets/UserDetail-BvWm-U4y.js","assets/vendor-react-BmVaKUwY.js","assets/UserAvatar-Z5W8S1dG.js","assets/chevron-left-CJc_eQid.js","assets/users-C6WiDiuN.js","assets/save-DycJmlX0.js","assets/shield-check-Cr4SHjdR.js","assets/user--KOoEB9m.js","assets/projects-CUOthD8N.js","assets/AuthContextInstance-DiFo9Qb2.js","assets/TaskManager-BA2Y31ut.js","assets/panels-top-left-Vk8FzAxf.js","assets/paperclip-DWJjaP8B.js","assets/shield-alert-CP5GVXxa.js","assets/AppErrorBoundary-BwnK_K-O.js","assets/useProject-DhK9Ze6F.js","assets/usePersistentFlag-R3_SXL_2.js","assets/TaskDetail-CyKAF8lf.js","assets/AttachmentItem-Cerhbyya.js","assets/download-DHcd5oLD.js","assets/file-text-DWBSXx5l.js","assets/ProjectDetail-ZYQG9yn2.js","assets/briefcase-DtHlat45.js","assets/Scheduler-Bs3DC0re.js","assets/bot-QVmnxPf4.js","assets/trending-up-DlrXEXE6.js","assets/refresh-cw-DQW6jR7M.js","assets/recurrent-tasks-CKT47N2l.js","assets/Profile-qnuRN5Qv.js","assets/user-plus-nDkwsBT1.js","assets/auth-dROenHXk.js","assets/Users-CQNcXLyV.js","assets/users-Ef6Sh2iR.js","assets/Settings-C3ad44vP.js","assets/TaskExecutions-BeodRIz1.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AgentFleet-BarfEwcK.js","assets/vendor-query-xpDrc4rM.js","assets/rolldown-runtime-COnpUsM8.js","assets/vendor-dnd-CfaHPvi0.js","assets/vendor-markdown-DoJbQ1of.js","assets/vendor-forms-DHyqHeyd.js","assets/client-BGOBXkO8.js","assets/vendor-motion-CMGWJcqR.js","assets/activity-CmAajKmR.js","assets/box-Bw_pyYzU.js","assets/brain-C6vlLcg3.js","assets/check-DTei8Qlg.js","assets/chevron-down-LTeQHW9O.js","assets/circle-alert-pUx6yhcF.js","assets/circle-check-B9kyRki5.js","assets/terminal-a6AV2mPO.js","assets/MarkdownField--1gpyapw.js","assets/eye-Cc-vy4Zu.js","assets/sparkles-v57Nc-z-.js","assets/providers-CNrSTcdc.js","assets/layers-BcHXXg-4.js","assets/loader-circle-Cl6yIkPK.js","assets/plus-Dx6G8SOZ.js","assets/send-BZjwSrJW.js","assets/settings-at7JqFrc.js","assets/trash-2-DJpTXgEP.js","assets/ConfirmDialog-y3vTcqFR.js","assets/info-1jA6X-_e.js","assets/x-wDy15QMx.js","assets/agents-b8btewki.js","assets/useNotification-DQayTSUL.js","assets/agentEmojis-BQA0jC3z.js","assets/taskFormSchemas-dl1t1OyX.js","assets/tasks-DEUQCNoH.js","assets/Providers-DR7srJHq.js","assets/cn-CWOQtFh4.js","assets/chevron-right-G5-HRo_C.js","assets/clock-BY4rrypg.js","assets/cpu-8Sbc9Dk0.js","assets/database-D6O4hvbm.js","assets/rocket-CMSwBl_C.js","assets/server-CJE2K1Vt.js","assets/zap-BmhZqgvm.js","assets/UserDetail-BvWm-U4y.js","assets/vendor-react-BmVaKUwY.js","assets/UserAvatar-Z5W8S1dG.js","assets/chevron-left-CJc_eQid.js","assets/users-C6WiDiuN.js","assets/save-DycJmlX0.js","assets/shield-check-Cr4SHjdR.js","assets/user--KOoEB9m.js","assets/projects-CUOthD8N.js","assets/AuthContextInstance-DiFo9Qb2.js","assets/TaskManager-BA2Y31ut.js","assets/panels-top-left-Vk8FzAxf.js","assets/paperclip-DWJjaP8B.js","assets/shield-alert-CP5GVXxa.js","assets/AppErrorBoundary-BwnK_K-O.js","assets/useProject-DhK9Ze6F.js","assets/usePersistentFlag-R3_SXL_2.js","assets/TaskDetail-D-f_Ao2a.js","assets/AttachmentItem-Cerhbyya.js","assets/download-DHcd5oLD.js","assets/file-text-DWBSXx5l.js","assets/ProjectDetail-ZYQG9yn2.js","assets/briefcase-DtHlat45.js","assets/Scheduler-Bs3DC0re.js","assets/bot-QVmnxPf4.js","assets/trending-up-DlrXEXE6.js","assets/refresh-cw-DQW6jR7M.js","assets/recurrent-tasks-CKT47N2l.js","assets/Profile-qnuRN5Qv.js","assets/user-plus-nDkwsBT1.js","assets/auth-dROenHXk.js","assets/Users-CQNcXLyV.js","assets/users-Ef6Sh2iR.js","assets/Settings-C3ad44vP.js","assets/TaskExecutions-BeodRIz1.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{g as t}from"./vendor-dnd-CfaHPvi0.js";import{a as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./vendor-react-BmVaKUwY.js";import{C as d,D as f,E as p,M as m,N as h,O as g,S as _,T as v,_ as y,a as ee,b,d as te,f as ne,g as x,h as re,j as S,l as C,m as ie,n as ae,o as oe,p as se,r as ce,u as w,v as T,w as le,x as E,y as D}from"./vendor-query-xpDrc4rM.js";import{r as ue}from"./vendor-markdown-DoJbQ1of.js";import{i as O,n as k,r as de}from"./client-BGOBXkO8.js";import{t as fe}from"./bot-QVmnxPf4.js";import{t as pe}from"./briefcase-DtHlat45.js";import{t as me}from"./circle-alert-pUx6yhcF.js";import{t as he}from"./circle-check-B9kyRki5.js";import{n as ge,t as A}from"./auth-dROenHXk.js";import{t as _e}from"./info-1jA6X-_e.js";import{t as ve}from"./panels-top-left-Vk8FzAxf.js";import{t as ye}from"./plus-Dx6G8SOZ.js";import{t as be}from"./server-CJE2K1Vt.js";import{t as xe}from"./settings-at7JqFrc.js";import{t as Se}from"./users-Ef6Sh2iR.js";import{t as Ce}from"./x-wDy15QMx.js";import{n as we,t as Te}from"./useProject-DhK9Ze6F.js";import{n as j,t as Ee}from"./AuthContextInstance-DiFo9Qb2.js";import{n as De,t as M}from"./vendor-motion-CMGWJcqR.js";import{n as Oe}from"./projects-CUOthD8N.js";import{n as ke,t as N}from"./useNotification-DQayTSUL.js";import{t as Ae}from"./UserAvatar-Z5W8S1dG.js";import{t as P}from"./AppErrorBoundary-BwnK_K-O.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function F(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{te(e,()=>t.signal,()=>n=!0)},u=ie(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?se:ne;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?je:I,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:I(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function I(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function je(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}m(),g(),p();var L,R,z,Me=(L=new WeakMap,R=new WeakMap,z=new WeakMap,class extends h{constructor(e={}){super(),S(this,L,void 0),S(this,R,void 0),S(this,z,void 0),this.config=e,f(L,this,new Set),f(R,this,new Map),f(z,this,0)}build(e,t,n){var r;let i=new ee({client:e,mutationCache:this,mutationId:f(z,this,(r=v(z,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){v(L,this).add(e);let t=B(e);if(typeof t==`string`){let n=v(R,this).get(t);n?n.push(e):v(R,this).set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(v(L,this).delete(e)){let t=B(e);if(typeof t==`string`){let n=v(R,this).get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&v(R,this).delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=B(e);if(typeof t==`string`){let n=v(R,this).get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=B(e);return typeof t==`string`?(v(R,this).get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){w.batch(()=>{v(L,this).forEach(e=>{this.notify({type:`removed`,mutation:e})}),v(L,this).clear(),v(R,this).clear()})}getAll(){return Array.from(v(L,this))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>T(t,e))}findAll(e={}){return this.getAll().filter(t=>T(e,t))}notify(e){w.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return w.batch(()=>Promise.all(e.map(e=>e.continue().catch(b))))}});function B(e){return e.options.scope?.id}m(),g(),p();var V,Ne=(V=new WeakMap,class extends h{constructor(e={}){super(),S(this,V,void 0),this.config=e,f(V,this,new Map)}build(e,t,n){let r=t.queryKey,i=t.queryHash??y(r,t),a=this.get(i);return a||(a=new oe({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){v(V,this).has(e.queryHash)||(v(V,this).set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=v(V,this).get(e.queryHash);t&&(e.destroy(),t===e&&v(V,this).delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){w.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return v(V,this).get(e)}getAll(){return[...v(V,this).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>D(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>D(e,t)):t}notify(e){w.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){w.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){w.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}});m(),g(),p();var H,U,W,G,K,q,J,Y,Pe=(H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakMap,Y=new WeakMap,class{constructor(e={}){S(this,H,void 0),S(this,U,void 0),S(this,W,void 0),S(this,G,void 0),S(this,K,void 0),S(this,q,void 0),S(this,J,void 0),S(this,Y,void 0),f(H,this,e.queryCache||new Ne),f(U,this,e.mutationCache||new Me),f(W,this,e.defaultOptions||{}),f(G,this,new Map),f(K,this,new Map),f(q,this,0)}mount(){var e;f(q,this,(e=v(q,this),e++,e)),v(q,this)===1&&(f(J,this,le.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(H,this).onFocus())})),f(Y,this,C.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(H,this).onOnline())})))}unmount(){var e;f(q,this,(e=v(q,this),e--,e)),v(q,this)===0&&(v(J,this)?.call(this),f(J,this,void 0),v(Y,this)?.call(this),f(Y,this,void 0))}isFetching(e){return v(H,this).findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return v(U,this).findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return v(H,this).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=v(H,this).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(_(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return v(H,this).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=v(H,this).get(r.queryHash)?.state.data,a=re(t,i);if(a!==void 0)return v(H,this).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return w.batch(()=>v(H,this).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return v(H,this).get(t.queryHash)?.state}removeQueries(e){let t=v(H,this);w.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=v(H,this);return w.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=w.batch(()=>v(H,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(b).catch(b)}invalidateQueries(e,t={}){return w.batch(()=>(v(H,this).findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=w.batch(()=>v(H,this).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(b)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(b)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=v(H,this).build(this,t);return n.isStaleByTime(_(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(b).catch(b)}fetchInfiniteQuery(e){return e.behavior=F(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(b).catch(b)}ensureInfiniteQueryData(e){return e.behavior=F(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return C.isOnline()?v(U,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return v(H,this)}getMutationCache(){return v(U,this)}getDefaultOptions(){return v(W,this)}setDefaultOptions(e){f(W,this,e)}setQueryDefaults(e,t){v(G,this).set(x(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...v(G,this).values()],n={};return t.forEach(t=>{E(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){v(K,this).set(x(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...v(K,this).values()],n={};return t.forEach(t=>{E(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...v(W,this).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=y(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===d&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...v(W,this).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){v(H,this).clear(),v(U,this).clear()}}),X=e(t(),1),Fe=u(),Ie=O(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Le=O(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Re=O(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Z=O(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Q=ue(),ze=()=>{let{activeProject:e,loading:t,refreshProjects:n}=Te(),{logout:r,user:i}=j(),[a,o]=(0,X.useState)(!1),c=i?.role===`admin`,l=[{icon:Re,label:`Task Manager`,path:`/`},{icon:Ie,label:`Scheduler`,path:`/scheduler`},{icon:fe,label:`Agents`,path:`/agents`},{icon:be,label:`Providers`,path:`/providers`}];return(0,Q.jsxs)(`aside`,{className:`h-screen w-64 sticky top-0 bg-surface-container-low flex flex-col py-6 shadow-xl z-50 transition-all duration-300`,role:`complementary`,"aria-label":`Main sidebar`,children:[(0,Q.jsxs)(`div`,{className:`px-6 mb-8`,children:[(0,Q.jsx)(`h1`,{className:`text-lg font-black text-primary font-headline tracking-tight uppercase`,children:`Orchestrator`}),(0,Q.jsx)(`p`,{className:`text-[10px] text-on-surface-variant font-medium tracking-[0.2em] mt-1`,children:`AI CONTROL CENTER`})]}),(0,Q.jsx)(`div`,{className:`px-3 mb-8`,children:t?(0,Q.jsx)(`div`,{className:`mx-3 h-16 bg-surface-container-highest/20 rounded-xl animate-pulse border border-outline-variant/10`}):e?(0,Q.jsxs)(s,{to:`/projects/${e.id}`,className:({isActive:e})=>`group relative mx-2 p-4 rounded-xl bg-surface-container-high border transition-all cursor-pointer overflow-hidden block ${e?`border-primary shadow-lg shadow-primary/5 ring-1 ring-primary/20`:`border-outline-variant/10 hover:border-primary/30`}`,children:[(0,Q.jsx)(`div`,{className:`absolute top-0 right-0 p-2 opacity-10 group-hover:opacity-30 transition-opacity`,children:(0,Q.jsx)(pe,{size:24,className:`text-primary`})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary border border-primary/20`,children:(0,Q.jsx)(ve,{size:16})}),(0,Q.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-[9px] font-black uppercase tracking-[0.2em] text-on-surface-variant/50 leading-none mb-1`,children:`Active Project`}),(0,Q.jsx)(`h3`,{className:`text-xs font-bold text-white truncate`,children:e.title})]})]})]}):c?(0,Q.jsxs)(`button`,{onClick:()=>o(!0),className:`w-full mx-auto px-4 py-4 rounded-xl bg-secondary/10 border border-secondary/20 hover:bg-secondary/20 hover:border-secondary/40 transition-all group flex flex-col items-center gap-2 text-center`,children:[(0,Q.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-secondary/20 flex items-center justify-center text-secondary group-hover:scale-110 transition-transform`,children:(0,Q.jsx)(ye,{size:16})}),(0,Q.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-secondary`,children:`Create Project`})]}):(0,Q.jsx)(`div`,{className:`mx-2 px-4 py-4 rounded-xl bg-surface-container-high border border-outline-variant/10 text-center`,children:(0,Q.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant`,children:`No Project Assigned`})})}),(0,Q.jsx)(ge,{isOpen:a,onClose:()=>o(!1),onCreated:n,canCreate:c,blockedReason:`Only admins can create projects.`}),(0,Q.jsxs)(`nav`,{className:`flex-1 px-3 space-y-2`,"aria-label":`Main navigation`,children:[l.map(e=>(0,Q.jsxs)(s,{to:e.path,className:({isActive:e})=>`flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-300 group ${e?`text-secondary border-r-2 border-secondary bg-gradient-to-r from-secondary/10 to-transparent`:`text-on-surface-variant hover:text-on-surface hover:bg-surface-container-high`}`,children:[(0,Q.jsx)(e.icon,{size:20}),(0,Q.jsx)(`span`,{className:`font-body text-sm`,children:e.label})]},e.path)),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`px-4 pt-4 pb-1`,children:(0,Q.jsx)(`p`,{className:`text-[9px] font-black uppercase tracking-[0.2em] text-on-surface-variant/40`,children:`Administration`})}),(0,Q.jsxs)(s,{to:`/users`,className:({isActive:e})=>`flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-300 group ${e?`text-secondary border-r-2 border-secondary bg-gradient-to-r from-secondary/10 to-transparent`:`text-on-surface-variant hover:text-on-surface hover:bg-surface-container-high`}`,children:[(0,Q.jsx)(Se,{size:20}),(0,Q.jsx)(`span`,{className:`font-body text-sm`,children:`Users`})]})]})]}),(0,Q.jsx)(`div`,{className:`px-3 space-y-2 pt-6`,children:(0,Q.jsxs)(`div`,{className:`pt-4 border-t border-outline-variant/20`,children:[(0,Q.jsxs)(`a`,{href:`https://github.com/bpinhosilva/agent-orchestrator/issues`,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-3 px-4 py-2 rounded-lg text-on-surface-variant hover:text-on-surface transition-all`,children:[(0,Q.jsx)(Le,{size:20}),(0,Q.jsx)(`span`,{className:`font-body text-sm`,children:`Help`})]}),(0,Q.jsxs)(`button`,{onClick:r,className:`w-full flex items-center gap-3 px-4 py-2 rounded-lg text-on-surface-variant hover:text-on-surface transition-all`,children:[(0,Q.jsx)(Z,{size:20}),(0,Q.jsx)(`span`,{className:`font-body text-sm`,children:`Logout`})]})]})})]})},Be=()=>{let{user:e,logout:t}=j(),n=c(),r=e?`${e.name} ${e.lastName}`.trim():`Agent`;return(0,Q.jsxs)(`header`,{role:`banner`,className:`w-full top-0 sticky bg-surface flex items-center justify-between px-6 py-3 shadow-[0_8px_32px_rgba(173,198,255,0.06)] z-40`,children:[(0,Q.jsx)(`div`,{className:`flex items-center gap-8`,children:(0,Q.jsx)(`div`,{className:`hidden md:flex items-center gap-6`,children:(0,Q.jsx)(`a`,{href:`https://github.com/bpinhosilva/agent-orchestrator/blob/main/README.md`,target:`_blank`,rel:`noreferrer`,className:`text-on-surface-variant hover:text-primary transition-colors font-headline text-sm tracking-tight`,children:`Docs`})})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Q.jsxs)(`div`,{className:`hidden sm:flex flex-col items-end mr-2`,children:[(0,Q.jsx)(`span`,{className:`text-xs font-bold text-on-surface leading-none`,children:r}),(0,Q.jsx)(`span`,{className:`text-[10px] text-on-surface-variant uppercase tracking-widest`,children:e?.email||`Active Protocol`})]}),(0,Q.jsx)(`button`,{onClick:()=>n(`/settings`),"aria-label":`Settings`,className:`text-on-surface-variant hover:text-primary transition-all active:scale-95 duration-200`,children:(0,Q.jsx)(xe,{size:20,"aria-hidden":`true`})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 pl-4 border-l border-outline-variant/20`,children:[(0,Q.jsx)(`button`,{onClick:()=>n(`/profile`),"aria-label":`Open profile`,title:`View profile`,className:`w-8 h-8 rounded-full overflow-hidden ring-2 ring-primary/20 hover:ring-primary/60 transition-all active:scale-95 duration-200`,children:(0,Q.jsx)(Ae,{name:r,avatar:e?.avatar,avatarUrl:e?.avatarUrl,alt:`User avatar`,className:`h-full w-full`})}),(0,Q.jsx)(`button`,{onClick:t,className:`p-2 text-on-surface-variant hover:text-error transition-all active:scale-95 duration-200 rounded-lg hover:bg-error/10`,title:`Terminate Session`,children:(0,Q.jsx)(Z,{size:18})})]})]})]})},Ve=({children:e})=>(0,Q.jsxs)(`div`,{className:`flex min-h-screen bg-surface text-on-surface overflow-hidden`,children:[(0,Q.jsx)(ze,{}),(0,Q.jsxs)(`div`,{className:`flex-1 flex flex-col h-screen relative overflow-hidden`,children:[(0,Q.jsx)(Be,{}),(0,Q.jsx)(`main`,{className:`flex-1 overflow-y-auto p-8 custom-scrollbar`,children:e})]})]}),He=({children:e})=>{let[t,n]=(0,X.useState)({isOpen:!1,type:`info`,title:``,message:``}),r=(0,X.useCallback)((e,t)=>{n({isOpen:!0,type:`success`,title:e,message:t})},[]),i=(0,X.useCallback)((e,t)=>{n({isOpen:!0,type:`error`,title:e,message:t})},[]),a=(0,X.useCallback)((e,t)=>{let r=e,i=r.response?.data,a=i?.errors,o=a?.length?a.join(`
3
- `):i?.message||r.message||`An unexpected error occurred`;n({isOpen:!0,type:`error`,title:t||r.response?.statusText||`Backend Error`,message:o})},[]),o=(0,X.useCallback)((e,t)=>{n({isOpen:!0,type:`info`,title:e,message:t})},[]),s=(0,X.useCallback)(()=>{n(e=>({...e,isOpen:!1}))},[]);return(0,Q.jsx)(ke.Provider,{value:{notifySuccess:r,notifyError:i,notifyApiError:a,notifyInfo:o,closeNotification:s,state:t},children:e})},Ue=[`projects`],We=({children:e})=>{let[t,n]=(0,X.useState)(null),{data:r=[],isPending:i,isFetching:a,refetch:o}=ae({queryKey:Ue,queryFn:async()=>(await Oe.findAll()).data}),s=(0,X.useMemo)(()=>r.length===0?null:r.find(e=>e.id===t)??r[0]??null,[t,r]),c=(0,X.useCallback)(async()=>{await o()},[o]),l=(0,X.useCallback)(e=>{n(t=>r.find(t=>t.id===e)?.id??t)},[r]),u=(0,X.useMemo)(()=>({projects:r,activeProject:s,loading:i||a,refreshProjects:c,setActiveProjectById:l}),[s,a,i,r,c,l]);return(0,Q.jsx)(we.Provider,{value:u,children:e})},Ge=({children:e})=>{let[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(!0),a=(0,X.useCallback)(()=>{n(null)},[]),o=(0,X.useCallback)(async()=>{try{await A.logout()}finally{a()}},[a]),s=(0,X.useCallback)(async()=>{try{i(!0),n(await A.me())}catch{a()}finally{i(!1)}},[a]);(0,X.useEffect)(()=>{s()},[s]),(0,X.useEffect)(()=>(k(a),()=>{k(null)}),[a]);let c=async(e,t)=>{await A.login(e,t),n(await A.me())},l={user:t,token:t?`authenticated`:null,isLoading:r,login:c,register:async(e,t,n,r)=>{await A.register(e,t,n,r),await c(n,r)},logout:o,refreshUser:s};return(0,Q.jsx)(Ee.Provider,{value:l,children:e})},Ke=()=>{let{state:e,closeNotification:t}=N(),{isOpen:n,type:r,title:i,message:a}=e;X.useEffect(()=>{let e=e=>{e.key===`Escape`&&t()};return n&&window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,t]);let o={success:{icon:(0,Q.jsx)(he,{className:`text-secondary`,size:24}),bgIcon:`bg-secondary/10`,accent:`from-secondary/40`,shadow:`shadow-secondary/10`},error:{icon:(0,Q.jsx)(me,{className:`text-error`,size:24}),bgIcon:`bg-error/10`,accent:`from-error/40`,shadow:`shadow-error/10`},info:{icon:(0,Q.jsx)(_e,{className:`text-primary`,size:24}),bgIcon:`bg-primary/10`,accent:`from-primary/40`,shadow:`shadow-primary/10`}}[r];return(0,Q.jsx)(De,{children:n&&(0,Q.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center p-4`,children:[(0,Q.jsx)(M.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:`absolute inset-0 bg-background/60 backdrop-blur-sm`}),(0,Q.jsxs)(M.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},className:`relative w-full max-w-sm bg-surface-container-low/95 backdrop-blur-2xl rounded-3xl shadow-2xl p-8 border border-outline-variant/10 overflow-hidden ${o.shadow}`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center text-center space-y-6`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 rounded-2xl ${o.bgIcon} flex items-center justify-center`,children:o.icon}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`h3`,{className:`text-xl font-headline font-bold text-on-surface tracking-tight`,children:i}),(0,Q.jsx)(`p`,{className:`text-sm text-on-surface-variant/70 leading-relaxed font-medium`,children:a})]}),(0,Q.jsx)(`button`,{onClick:t,className:`w-full bg-surface-container-high hover:bg-surface-container-highest text-on-surface text-[10px] font-black uppercase tracking-[0.2em] py-4 rounded-2xl transition-all active:scale-95`,children:`Dismiss`})]}),(0,Q.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/20 hover:text-white`,children:(0,Q.jsx)(Ce,{size:16})}),(0,Q.jsx)(`div`,{className:`absolute top-0 right-0 w-24 h-1 bg-gradient-to-l ${o.accent} to-transparent opacity-50`}),(0,Q.jsx)(`div`,{className:`absolute bottom-0 left-0 w-16 h-16 ${o.bgIcon} blur-3xl opacity-20 rounded-full -ml-8 -mb-8`})]})]})})},qe=()=>{let{notifyError:e}=N();return(0,X.useEffect)(()=>{de(e)},[e]),null},Je=()=>{let[e,t]=(0,X.useState)(``),[n,r]=(0,X.useState)(``),[i,a]=(0,X.useState)(null),[o,s]=(0,X.useState)(!1),[l,u]=(0,X.useState)(!1),{login:d}=j(),f=c();return(0,Q.jsxs)(`div`,{className:`bg-surface font-body text-on-surface selection:bg-primary selection:text-on-primary min-h-screen`,children:[(0,Q.jsxs)(`header`,{className:`fixed top-0 w-full flex justify-between items-center px-6 py-4 bg-transparent z-50`,children:[(0,Q.jsx)(`div`,{className:`text-xl font-bold tracking-tight text-[#adc6ff] font-headline`,children:`Agent Orchestrator`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-4 text-slate-400`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`help_outline`}),(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`dark_mode`})]})]}),(0,Q.jsxs)(`main`,{className:`min-h-screen flex items-center justify-center bg-glow relative px-4 overflow-hidden`,children:[(0,Q.jsxs)(`div`,{className:`absolute inset-0 z-0 pointer-events-none opacity-20`,children:[(0,Q.jsx)(`div`,{className:`absolute top-1/4 left-1/4 w-96 h-96 bg-primary blur-[120px] rounded-full`}),(0,Q.jsx)(`div`,{className:`absolute bottom-1/4 right-1/4 w-96 h-96 bg-tertiary blur-[120px] rounded-full`})]}),(0,Q.jsxs)(`section`,{className:`glass-panel ghost-border w-full max-w-md rounded-xl p-8 md:p-12 relative z-10 accent-glow`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center mb-10`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 bg-primary-container rounded-full flex items-center justify-center mb-6 ghost-border`,children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-primary text-4xl`,style:{fontVariationSettings:`'FILL' 1`},children:`deployed_code`})}),(0,Q.jsx)(`h1`,{className:`font-headline text-2xl font-extrabold tracking-tight text-on-surface uppercase mb-2`,children:`Agent Orchestrator`}),(0,Q.jsx)(`p`,{className:`font-label text-xs tracking-widest text-on-surface-variant uppercase`,children:`Neural Gateway`})]}),i&&(0,Q.jsxs)(`div`,{className:`mb-6 p-4 bg-error-container/20 border border-error/20 rounded-lg flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-300`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-error text-xl`,children:`error`}),(0,Q.jsx)(`p`,{className:`text-error text-sm font-medium`,children:i})]}),(0,Q.jsxs)(`form`,{className:`space-y-6`,onSubmit:async t=>{t.preventDefault(),a(null),s(!0);try{await d(e,n),f(`/`)}catch(e){let t=e.response?.data?.message||`Authentication failed. Please check your credentials.`;Array.isArray(t)&&(t=t.join(`. `)),a(t)}finally{s(!1)}},children:[(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Identity Protocol`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`alternate_email`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`email@aetheric.logic`,type:`email`,value:e,onChange:e=>t(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`div`,{className:`flex justify-between items-center ml-1`,children:(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline`,children:`Security Key`})}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`vibration`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-12 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:l?`text`:`password`,value:n,onChange:e=>r(e.target.value),required:!0}),(0,Q.jsx)(`button`,{className:`absolute right-4 top-1/2 -translate-y-1/2 text-outline hover:text-on-surface transition-colors`,type:`button`,onClick:()=>u(!l),children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-xl`,children:l?`visibility_off`:`visibility`})})]})]}),(0,Q.jsxs)(`div`,{className:`pt-4 space-y-4`,children:[(0,Q.jsx)(`button`,{className:`w-full bg-primary hover:bg-primary-fixed-dim text-on-primary font-headline font-bold py-4 rounded-lg shadow-lg shadow-primary/10 active:scale-[0.98] transition-all flex items-center justify-center gap-2 group disabled:opacity-50 disabled:cursor-not-allowed`,type:`submit`,disabled:o,children:o?(0,Q.jsx)(`div`,{className:`w-5 h-5 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,Q.jsxs)(Q.Fragment,{children:[`Initiate Session`,(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-lg group-hover:translate-x-1 transition-transform`,children:`bolt`})]})}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-3`})]})]})]})]}),(0,Q.jsxs)(`footer`,{className:`fixed bottom-0 w-full flex flex-col md:flex-row justify-center items-center gap-4 pb-8 bg-transparent z-50`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] uppercase tracking-widest text-slate-500`,children:`© 2024 Agent Orchestrator. All rights reserved.`}),(0,Q.jsxs)(`div`,{className:`flex gap-6`,children:[(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Security Architecture`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Privacy Policy`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Terms of Service`})]})]})]})},Ye=()=>{let[e,t]=(0,X.useState)(``),[n,r]=(0,X.useState)(``),[i,o]=(0,X.useState)(``),[s,l]=(0,X.useState)(``),[u,d]=(0,X.useState)(``),[f,p]=(0,X.useState)(null),[m,h]=(0,X.useState)(!1),{register:g}=j(),_=c();return(0,Q.jsxs)(`div`,{className:`bg-surface font-body text-on-surface selection:bg-primary selection:text-on-primary min-h-screen`,children:[(0,Q.jsxs)(`header`,{className:`fixed top-0 w-full flex justify-between items-center px-6 py-4 bg-transparent z-50`,children:[(0,Q.jsx)(`div`,{className:`text-xl font-bold tracking-tight text-[#adc6ff] font-headline`,children:`Agent Orchestrator`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-4 text-slate-400`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`help_outline`}),(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`dark_mode`})]})]}),(0,Q.jsxs)(`main`,{className:`min-h-screen flex items-center justify-center bg-glow relative px-4 overflow-hidden py-20`,children:[(0,Q.jsxs)(`div`,{className:`absolute inset-0 z-0 pointer-events-none opacity-20`,children:[(0,Q.jsx)(`div`,{className:`absolute top-1/4 left-1/4 w-96 h-96 bg-primary blur-[120px] rounded-full`}),(0,Q.jsx)(`div`,{className:`absolute bottom-1/4 right-1/4 w-96 h-96 bg-tertiary blur-[120px] rounded-full`})]}),(0,Q.jsxs)(`section`,{className:`glass-panel ghost-border w-full max-w-md rounded-xl p-8 md:p-12 relative z-10 accent-glow`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center mb-10`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 bg-primary-container rounded-full flex items-center justify-center mb-6 ghost-border`,children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-primary text-4xl`,style:{fontVariationSettings:`'FILL' 1`},children:`person_add`})}),(0,Q.jsx)(`h1`,{className:`font-headline text-2xl font-extrabold tracking-tight text-on-surface uppercase mb-2`,children:`Registration`}),(0,Q.jsx)(`p`,{className:`font-label text-xs tracking-widest text-on-surface-variant uppercase`,children:`New Agent Protocol`})]}),f&&(0,Q.jsxs)(`div`,{className:`mb-6 p-4 bg-error-container/20 border border-error/20 rounded-lg flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-300`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-error text-xl`,children:`error`}),(0,Q.jsx)(`p`,{className:`text-error text-sm font-medium`,children:f})]}),(0,Q.jsxs)(`form`,{className:`space-y-6`,onSubmit:async t=>{if(t.preventDefault(),p(null),s!==u){p(`Security keys do not match. Please re-verify.`);return}h(!0);try{await g(e,n,i,s),_(`/`)}catch(e){let t=e.response?.data?.message||`Protocol registration failed. Please try again.`;Array.isArray(t)&&(t=t.join(`. `)),p(t)}finally{h(!1)}},children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-6`,children:[(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`First Name`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`fingerprint`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`Agent`,type:`text`,value:e,onChange:e=>t(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Last Name`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`badge`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`Zero`,type:`text`,value:n,onChange:e=>r(e.target.value),required:!0})]})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Identity Protocol`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`alternate_email`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`email@aetheric.logic`,type:`email`,value:i,onChange:e=>o(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Security Key`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`vibration`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:`password`,value:s,onChange:e=>l(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Re-verify Security Key`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`lock_reset`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:`password`,value:u,onChange:e=>d(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`pt-4 space-y-4`,children:[(0,Q.jsx)(`button`,{className:`w-full bg-primary hover:bg-primary-fixed-dim text-on-primary font-headline font-bold py-4 rounded-lg shadow-lg shadow-primary/10 active:scale-[0.98] transition-all flex items-center justify-center gap-2 group disabled:opacity-50 disabled:cursor-not-allowed`,type:`submit`,disabled:m,children:m?(0,Q.jsx)(`div`,{className:`w-5 h-5 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,Q.jsxs)(Q.Fragment,{children:[`Initialize Protocol`,(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-lg group-hover:translate-x-1 transition-transform`,children:`bolt`})]})}),(0,Q.jsx)(`div`,{className:`pt-4 text-center`,children:(0,Q.jsxs)(`p`,{className:`font-label text-xs text-outline`,children:[`Already have a protocol?`,` `,(0,Q.jsx)(a,{to:`/login`,className:`text-primary hover:text-tertiary transition-colors font-bold uppercase tracking-widest`,children:`Login`})]})})]})]})]})]}),(0,Q.jsxs)(`footer`,{className:`fixed bottom-0 w-full flex flex-col md:flex-row justify-center items-center gap-4 pb-8 bg-transparent z-50`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] uppercase tracking-widest text-slate-500`,children:`© 2024 Agent Orchestrator. All rights reserved.`}),(0,Q.jsxs)(`div`,{className:`flex gap-6`,children:[(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Security Architecture`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Privacy Policy`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Terms of Service`})]})]})]})},Xe=(0,X.lazy)(()=>i(()=>import(`./AgentFleet-BarfEwcK.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),Ze=(0,X.lazy)(()=>i(()=>import(`./Providers-DR7srJHq.js`),__vite__mapDeps([34,1,2,3,4,6,35,7,9,36,37,38,39,19,27,22,40,41,25,26,14,28,42,30]))),Qe=(0,X.lazy)(()=>i(()=>import(`./UserDetail-BvWm-U4y.js`),__vite__mapDeps([43,2,44,3,45,4,46,6,13,14,47,22,48,49,25,50,28,51,52]))),$e=(0,X.lazy)(()=>i(()=>import(`./TaskManager-BA2Y31ut.js`),__vite__mapDeps([53,1,2,3,4,44,6,35,11,37,54,55,56,18,26,7,14,27,28,57,51,33,30,58,59,31]))),et=(0,X.lazy)(()=>i(()=>import(`./TaskDetail-CyKAF8lf.js`),__vite__mapDeps([60,1,2,3,4,44,5,6,36,16,17,18,48,23,49,25,26,7,14,27,28,50,42,29,33,61,62,63,52,30,31,32]))),tt=(0,X.lazy)(()=>i(()=>import(`./ProjectDetail-ZYQG9yn2.js`),__vite__mapDeps([64,2,44,3,4,6,65,12,16,17,18,20,48,49,25,50,29,51,30,58]))),nt=(0,X.lazy)(()=>i(()=>import(`./Scheduler-Bs3DC0re.js`),__vite__mapDeps([66,1,2,3,4,44,6,7,8,67,39,54,68,22,69,18,25,26,14,27,28,70,33,30,58,59]))),rt=(0,X.lazy)(()=>i(()=>import(`./Profile-qnuRN5Qv.js`),__vite__mapDeps([71,2,44,3,45,4,6,9,11,12,14,72,17,47,73,7,28,29,51,30,40,48,49,50,52,58]))),it=(0,X.lazy)(()=>i(()=>import(`./Users-CQNcXLyV.js`),__vite__mapDeps([74,2,44,3,45,4,6,12,46,36,13,14,72,17,47,21,69,56,49,25,26,7,27,28,50,75,51,52]))),at=(0,X.lazy)(()=>i(()=>import(`./Settings-C3ad44vP.js`),__vite__mapDeps([76,2,3,4,6,8,15,38,69,48,30]))),ot=(0,X.lazy)(()=>i(()=>import(`./TaskExecutions-BeodRIz1.js`),__vite__mapDeps([77,1,2,3,4,44,6,8,46,36,37,62,54,68,26,7,14,27,28,42,70,33,30,58]))),st=(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-8 h-full min-h-[50vh]`,children:(0,Q.jsx)(`div`,{className:`w-8 h-8 rounded-full border-4 border-outline-variant/30 border-t-primary animate-spin`})});function $({children:e,roles:t}){let{user:n,isLoading:i}=j();return i?(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-surface`,children:(0,Q.jsx)(`div`,{className:`w-12 h-12 rounded-full border-4 border-outline-variant/30 border-t-primary animate-spin`})}):n?t&&!t.includes(n.role||``)?(0,Q.jsx)(r,{to:`/`,replace:!0}):(0,Q.jsx)(Q.Fragment,{children:e}):(0,Q.jsx)(r,{to:`/login`,replace:!0})}function ct(){return(0,Q.jsx)(P,{title:`The app shell crashed`,description:`A rendering error escaped the route tree. Retry to recover the application shell.`,children:(0,Q.jsxs)(He,{children:[(0,Q.jsx)(qe,{}),(0,Q.jsx)(Ge,{children:(0,Q.jsx)(l,{children:(0,Q.jsxs)(o,{children:[(0,Q.jsx)(n,{path:`/login`,element:(0,Q.jsx)(P,{title:`Unable to render login`,children:(0,Q.jsx)(Je,{})})}),(0,Q.jsx)(n,{path:`/register`,element:(0,Q.jsx)(P,{title:`Unable to render registration`,children:(0,Q.jsx)(Ye,{})})}),(0,Q.jsx)(n,{path:`/*`,element:(0,Q.jsx)($,{children:(0,Q.jsx)(We,{children:(0,Q.jsx)(Ve,{children:(0,Q.jsx)(X.Suspense,{fallback:st,children:(0,Q.jsxs)(o,{children:[(0,Q.jsx)(n,{path:`/`,element:(0,Q.jsx)(P,{title:`Unable to render task manager`,children:(0,Q.jsx)($e,{})})}),(0,Q.jsx)(n,{path:`/projects/:projectId/tasks/:taskId`,element:(0,Q.jsx)(P,{title:`Unable to render task detail`,children:(0,Q.jsx)(et,{})})}),(0,Q.jsx)(n,{path:`/projects/:projectId`,element:(0,Q.jsx)(P,{title:`Unable to render project detail`,children:(0,Q.jsx)(tt,{})})}),(0,Q.jsx)(n,{path:`/agents`,element:(0,Q.jsx)(P,{title:`Unable to render agents`,children:(0,Q.jsx)(Xe,{})})}),(0,Q.jsx)(n,{path:`/providers`,element:(0,Q.jsx)(P,{title:`Unable to render providers`,children:(0,Q.jsx)(Ze,{})})}),(0,Q.jsx)(n,{path:`/scheduler`,element:(0,Q.jsx)(P,{title:`Unable to render scheduler`,children:(0,Q.jsx)(nt,{})})}),(0,Q.jsx)(n,{path:`/scheduler/tasks/:taskId/executions`,element:(0,Q.jsx)(P,{title:`Unable to render task executions`,children:(0,Q.jsx)(ot,{})})}),(0,Q.jsx)(n,{path:`/profile`,element:(0,Q.jsx)(P,{title:`Unable to render profile`,children:(0,Q.jsx)(rt,{})})}),(0,Q.jsx)(n,{path:`/users`,element:(0,Q.jsx)(P,{title:`Unable to render users`,children:(0,Q.jsx)(it,{})})}),(0,Q.jsx)(n,{path:`/settings`,element:(0,Q.jsx)(P,{title:`Unable to render settings`,children:(0,Q.jsx)($,{roles:[`admin`],children:(0,Q.jsx)(at,{})})})}),(0,Q.jsx)(n,{path:`/users/:id`,element:(0,Q.jsx)(P,{title:`Unable to render user details`,children:(0,Q.jsx)($,{roles:[`admin`],children:(0,Q.jsx)(Qe,{})})})}),(0,Q.jsx)(n,{path:`*`,element:(0,Q.jsx)(r,{to:`/`,replace:!0})})]})})})})})})]})})}),(0,Q.jsx)(Ke,{})]})})}var lt=new Pe({defaultOptions:{queries:{retry:1,staleTime:3e4,refetchOnWindowFocus:!1},mutations:{retry:0}}});(0,Fe.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(X.StrictMode,{children:(0,Q.jsx)(ce,{client:lt,children:(0,Q.jsx)(ct,{})})}));
3
+ `):i?.message||r.message||`An unexpected error occurred`;n({isOpen:!0,type:`error`,title:t||r.response?.statusText||`Backend Error`,message:o})},[]),o=(0,X.useCallback)((e,t)=>{n({isOpen:!0,type:`info`,title:e,message:t})},[]),s=(0,X.useCallback)(()=>{n(e=>({...e,isOpen:!1}))},[]);return(0,Q.jsx)(ke.Provider,{value:{notifySuccess:r,notifyError:i,notifyApiError:a,notifyInfo:o,closeNotification:s,state:t},children:e})},Ue=[`projects`],We=({children:e})=>{let[t,n]=(0,X.useState)(null),{data:r=[],isPending:i,isFetching:a,refetch:o}=ae({queryKey:Ue,queryFn:async()=>(await Oe.findAll()).data}),s=(0,X.useMemo)(()=>r.length===0?null:r.find(e=>e.id===t)??r[0]??null,[t,r]),c=(0,X.useCallback)(async()=>{await o()},[o]),l=(0,X.useCallback)(e=>{n(t=>r.find(t=>t.id===e)?.id??t)},[r]),u=(0,X.useMemo)(()=>({projects:r,activeProject:s,loading:i||a,refreshProjects:c,setActiveProjectById:l}),[s,a,i,r,c,l]);return(0,Q.jsx)(we.Provider,{value:u,children:e})},Ge=({children:e})=>{let[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(!0),a=(0,X.useCallback)(()=>{n(null)},[]),o=(0,X.useCallback)(async()=>{try{await A.logout()}finally{a()}},[a]),s=(0,X.useCallback)(async()=>{try{i(!0),n(await A.me())}catch{a()}finally{i(!1)}},[a]);(0,X.useEffect)(()=>{s()},[s]),(0,X.useEffect)(()=>(k(a),()=>{k(null)}),[a]);let c=async(e,t)=>{await A.login(e,t),n(await A.me())},l={user:t,token:t?`authenticated`:null,isLoading:r,login:c,register:async(e,t,n,r)=>{await A.register(e,t,n,r),await c(n,r)},logout:o,refreshUser:s};return(0,Q.jsx)(Ee.Provider,{value:l,children:e})},Ke=()=>{let{state:e,closeNotification:t}=N(),{isOpen:n,type:r,title:i,message:a}=e;X.useEffect(()=>{let e=e=>{e.key===`Escape`&&t()};return n&&window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,t]);let o={success:{icon:(0,Q.jsx)(he,{className:`text-secondary`,size:24}),bgIcon:`bg-secondary/10`,accent:`from-secondary/40`,shadow:`shadow-secondary/10`},error:{icon:(0,Q.jsx)(me,{className:`text-error`,size:24}),bgIcon:`bg-error/10`,accent:`from-error/40`,shadow:`shadow-error/10`},info:{icon:(0,Q.jsx)(_e,{className:`text-primary`,size:24}),bgIcon:`bg-primary/10`,accent:`from-primary/40`,shadow:`shadow-primary/10`}}[r];return(0,Q.jsx)(De,{children:n&&(0,Q.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center p-4`,children:[(0,Q.jsx)(M.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:`absolute inset-0 bg-background/60 backdrop-blur-sm`}),(0,Q.jsxs)(M.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},className:`relative w-full max-w-sm bg-surface-container-low/95 backdrop-blur-2xl rounded-3xl shadow-2xl p-8 border border-outline-variant/10 overflow-hidden ${o.shadow}`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center text-center space-y-6`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 rounded-2xl ${o.bgIcon} flex items-center justify-center`,children:o.icon}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`h3`,{className:`text-xl font-headline font-bold text-on-surface tracking-tight`,children:i}),(0,Q.jsx)(`p`,{className:`text-sm text-on-surface-variant/70 leading-relaxed font-medium`,children:a})]}),(0,Q.jsx)(`button`,{onClick:t,className:`w-full bg-surface-container-high hover:bg-surface-container-highest text-on-surface text-[10px] font-black uppercase tracking-[0.2em] py-4 rounded-2xl transition-all active:scale-95`,children:`Dismiss`})]}),(0,Q.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 rounded-full hover:bg-white/5 transition-colors text-on-surface-variant/20 hover:text-white`,children:(0,Q.jsx)(Ce,{size:16})}),(0,Q.jsx)(`div`,{className:`absolute top-0 right-0 w-24 h-1 bg-gradient-to-l ${o.accent} to-transparent opacity-50`}),(0,Q.jsx)(`div`,{className:`absolute bottom-0 left-0 w-16 h-16 ${o.bgIcon} blur-3xl opacity-20 rounded-full -ml-8 -mb-8`})]})]})})},qe=()=>{let{notifyError:e}=N();return(0,X.useEffect)(()=>{de(e)},[e]),null},Je=()=>{let[e,t]=(0,X.useState)(``),[n,r]=(0,X.useState)(``),[i,a]=(0,X.useState)(null),[o,s]=(0,X.useState)(!1),[l,u]=(0,X.useState)(!1),{login:d}=j(),f=c();return(0,Q.jsxs)(`div`,{className:`bg-surface font-body text-on-surface selection:bg-primary selection:text-on-primary min-h-screen`,children:[(0,Q.jsxs)(`header`,{className:`fixed top-0 w-full flex justify-between items-center px-6 py-4 bg-transparent z-50`,children:[(0,Q.jsx)(`div`,{className:`text-xl font-bold tracking-tight text-[#adc6ff] font-headline`,children:`Agent Orchestrator`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-4 text-slate-400`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`help_outline`}),(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`dark_mode`})]})]}),(0,Q.jsxs)(`main`,{className:`min-h-screen flex items-center justify-center bg-glow relative px-4 overflow-hidden`,children:[(0,Q.jsxs)(`div`,{className:`absolute inset-0 z-0 pointer-events-none opacity-20`,children:[(0,Q.jsx)(`div`,{className:`absolute top-1/4 left-1/4 w-96 h-96 bg-primary blur-[120px] rounded-full`}),(0,Q.jsx)(`div`,{className:`absolute bottom-1/4 right-1/4 w-96 h-96 bg-tertiary blur-[120px] rounded-full`})]}),(0,Q.jsxs)(`section`,{className:`glass-panel ghost-border w-full max-w-md rounded-xl p-8 md:p-12 relative z-10 accent-glow`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center mb-10`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 bg-primary-container rounded-full flex items-center justify-center mb-6 ghost-border`,children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-primary text-4xl`,style:{fontVariationSettings:`'FILL' 1`},children:`deployed_code`})}),(0,Q.jsx)(`h1`,{className:`font-headline text-2xl font-extrabold tracking-tight text-on-surface uppercase mb-2`,children:`Agent Orchestrator`}),(0,Q.jsx)(`p`,{className:`font-label text-xs tracking-widest text-on-surface-variant uppercase`,children:`Neural Gateway`})]}),i&&(0,Q.jsxs)(`div`,{className:`mb-6 p-4 bg-error-container/20 border border-error/20 rounded-lg flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-300`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-error text-xl`,children:`error`}),(0,Q.jsx)(`p`,{className:`text-error text-sm font-medium`,children:i})]}),(0,Q.jsxs)(`form`,{className:`space-y-6`,onSubmit:async t=>{t.preventDefault(),a(null),s(!0);try{await d(e,n),f(`/`)}catch(e){let t=e.response?.data?.message||`Authentication failed. Please check your credentials.`;Array.isArray(t)&&(t=t.join(`. `)),a(t)}finally{s(!1)}},children:[(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Identity Protocol`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`alternate_email`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`email@aetheric.logic`,type:`email`,value:e,onChange:e=>t(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`div`,{className:`flex justify-between items-center ml-1`,children:(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline`,children:`Security Key`})}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`vibration`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-12 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:l?`text`:`password`,value:n,onChange:e=>r(e.target.value),required:!0}),(0,Q.jsx)(`button`,{className:`absolute right-4 top-1/2 -translate-y-1/2 text-outline hover:text-on-surface transition-colors`,type:`button`,onClick:()=>u(!l),children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-xl`,children:l?`visibility_off`:`visibility`})})]})]}),(0,Q.jsxs)(`div`,{className:`pt-4 space-y-4`,children:[(0,Q.jsx)(`button`,{className:`w-full bg-primary hover:bg-primary-fixed-dim text-on-primary font-headline font-bold py-4 rounded-lg shadow-lg shadow-primary/10 active:scale-[0.98] transition-all flex items-center justify-center gap-2 group disabled:opacity-50 disabled:cursor-not-allowed`,type:`submit`,disabled:o,children:o?(0,Q.jsx)(`div`,{className:`w-5 h-5 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,Q.jsxs)(Q.Fragment,{children:[`Initiate Session`,(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-lg group-hover:translate-x-1 transition-transform`,children:`bolt`})]})}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-3`})]})]})]})]}),(0,Q.jsxs)(`footer`,{className:`fixed bottom-0 w-full flex flex-col md:flex-row justify-center items-center gap-4 pb-8 bg-transparent z-50`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] uppercase tracking-widest text-slate-500`,children:`© 2024 Agent Orchestrator. All rights reserved.`}),(0,Q.jsxs)(`div`,{className:`flex gap-6`,children:[(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Security Architecture`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Privacy Policy`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Terms of Service`})]})]})]})},Ye=()=>{let[e,t]=(0,X.useState)(``),[n,r]=(0,X.useState)(``),[i,o]=(0,X.useState)(``),[s,l]=(0,X.useState)(``),[u,d]=(0,X.useState)(``),[f,p]=(0,X.useState)(null),[m,h]=(0,X.useState)(!1),{register:g}=j(),_=c();return(0,Q.jsxs)(`div`,{className:`bg-surface font-body text-on-surface selection:bg-primary selection:text-on-primary min-h-screen`,children:[(0,Q.jsxs)(`header`,{className:`fixed top-0 w-full flex justify-between items-center px-6 py-4 bg-transparent z-50`,children:[(0,Q.jsx)(`div`,{className:`text-xl font-bold tracking-tight text-[#adc6ff] font-headline`,children:`Agent Orchestrator`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-4 text-slate-400`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`help_outline`}),(0,Q.jsx)(`span`,{className:`material-symbols-outlined hover:text-[#adc6ff] transition-colors cursor-pointer`,children:`dark_mode`})]})]}),(0,Q.jsxs)(`main`,{className:`min-h-screen flex items-center justify-center bg-glow relative px-4 overflow-hidden py-20`,children:[(0,Q.jsxs)(`div`,{className:`absolute inset-0 z-0 pointer-events-none opacity-20`,children:[(0,Q.jsx)(`div`,{className:`absolute top-1/4 left-1/4 w-96 h-96 bg-primary blur-[120px] rounded-full`}),(0,Q.jsx)(`div`,{className:`absolute bottom-1/4 right-1/4 w-96 h-96 bg-tertiary blur-[120px] rounded-full`})]}),(0,Q.jsxs)(`section`,{className:`glass-panel ghost-border w-full max-w-md rounded-xl p-8 md:p-12 relative z-10 accent-glow`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center mb-10`,children:[(0,Q.jsx)(`div`,{className:`w-16 h-16 bg-primary-container rounded-full flex items-center justify-center mb-6 ghost-border`,children:(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-primary text-4xl`,style:{fontVariationSettings:`'FILL' 1`},children:`person_add`})}),(0,Q.jsx)(`h1`,{className:`font-headline text-2xl font-extrabold tracking-tight text-on-surface uppercase mb-2`,children:`Registration`}),(0,Q.jsx)(`p`,{className:`font-label text-xs tracking-widest text-on-surface-variant uppercase`,children:`New Agent Protocol`})]}),f&&(0,Q.jsxs)(`div`,{className:`mb-6 p-4 bg-error-container/20 border border-error/20 rounded-lg flex items-center gap-3 animate-in fade-in slide-in-from-top-4 duration-300`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-error text-xl`,children:`error`}),(0,Q.jsx)(`p`,{className:`text-error text-sm font-medium`,children:f})]}),(0,Q.jsxs)(`form`,{className:`space-y-6`,onSubmit:async t=>{if(t.preventDefault(),p(null),s!==u){p(`Security keys do not match. Please re-verify.`);return}h(!0);try{await g(e,n,i,s),_(`/`)}catch(e){let t=e.response?.data?.message||`Protocol registration failed. Please try again.`;Array.isArray(t)&&(t=t.join(`. `)),p(t)}finally{h(!1)}},children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-6`,children:[(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`First Name`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`fingerprint`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`Agent`,type:`text`,value:e,onChange:e=>t(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Last Name`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`badge`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`Zero`,type:`text`,value:n,onChange:e=>r(e.target.value),required:!0})]})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Identity Protocol`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`alternate_email`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`email@aetheric.logic`,type:`email`,value:i,onChange:e=>o(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Security Key`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`vibration`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:`password`,value:s,onChange:e=>l(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`label`,{className:`font-label text-[10px] uppercase tracking-widest text-outline ml-1`,children:`Re-verify Security Key`}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsx)(`span`,{className:`material-symbols-outlined absolute left-4 top-1/2 -translate-y-1/2 text-outline group-focus-within:text-primary transition-colors`,children:`lock_reset`}),(0,Q.jsx)(`input`,{className:`w-full bg-surface-container-lowest border-none rounded-lg py-4 pl-12 pr-4 text-sm font-body text-on-surface placeholder:text-surface-variant focus:ring-1 focus:ring-tertiary transition-all duration-300`,placeholder:`••••••••••••`,type:`password`,value:u,onChange:e=>d(e.target.value),required:!0})]})]}),(0,Q.jsxs)(`div`,{className:`pt-4 space-y-4`,children:[(0,Q.jsx)(`button`,{className:`w-full bg-primary hover:bg-primary-fixed-dim text-on-primary font-headline font-bold py-4 rounded-lg shadow-lg shadow-primary/10 active:scale-[0.98] transition-all flex items-center justify-center gap-2 group disabled:opacity-50 disabled:cursor-not-allowed`,type:`submit`,disabled:m,children:m?(0,Q.jsx)(`div`,{className:`w-5 h-5 border-2 border-on-primary/30 border-t-on-primary rounded-full animate-spin`}):(0,Q.jsxs)(Q.Fragment,{children:[`Initialize Protocol`,(0,Q.jsx)(`span`,{className:`material-symbols-outlined text-lg group-hover:translate-x-1 transition-transform`,children:`bolt`})]})}),(0,Q.jsx)(`div`,{className:`pt-4 text-center`,children:(0,Q.jsxs)(`p`,{className:`font-label text-xs text-outline`,children:[`Already have a protocol?`,` `,(0,Q.jsx)(a,{to:`/login`,className:`text-primary hover:text-tertiary transition-colors font-bold uppercase tracking-widest`,children:`Login`})]})})]})]})]})]}),(0,Q.jsxs)(`footer`,{className:`fixed bottom-0 w-full flex flex-col md:flex-row justify-center items-center gap-4 pb-8 bg-transparent z-50`,children:[(0,Q.jsx)(`p`,{className:`text-[10px] uppercase tracking-widest text-slate-500`,children:`© 2024 Agent Orchestrator. All rights reserved.`}),(0,Q.jsxs)(`div`,{className:`flex gap-6`,children:[(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Security Architecture`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Privacy Policy`}),(0,Q.jsx)(`a`,{className:`text-[10px] uppercase tracking-widest text-slate-600 hover:text-[#adc6ff] transition-opacity duration-200`,href:`#`,children:`Terms of Service`})]})]})]})},Xe=(0,X.lazy)(()=>i(()=>import(`./AgentFleet-BarfEwcK.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),Ze=(0,X.lazy)(()=>i(()=>import(`./Providers-DR7srJHq.js`),__vite__mapDeps([34,1,2,3,4,6,35,7,9,36,37,38,39,19,27,22,40,41,25,26,14,28,42,30]))),Qe=(0,X.lazy)(()=>i(()=>import(`./UserDetail-BvWm-U4y.js`),__vite__mapDeps([43,2,44,3,45,4,46,6,13,14,47,22,48,49,25,50,28,51,52]))),$e=(0,X.lazy)(()=>i(()=>import(`./TaskManager-BA2Y31ut.js`),__vite__mapDeps([53,1,2,3,4,44,6,35,11,37,54,55,56,18,26,7,14,27,28,57,51,33,30,58,59,31]))),et=(0,X.lazy)(()=>i(()=>import(`./TaskDetail-D-f_Ao2a.js`),__vite__mapDeps([60,1,2,3,4,44,5,6,36,16,17,18,48,23,49,25,26,7,14,27,28,50,42,29,33,61,62,63,52,30,31,32]))),tt=(0,X.lazy)(()=>i(()=>import(`./ProjectDetail-ZYQG9yn2.js`),__vite__mapDeps([64,2,44,3,4,6,65,12,16,17,18,20,48,49,25,50,29,51,30,58]))),nt=(0,X.lazy)(()=>i(()=>import(`./Scheduler-Bs3DC0re.js`),__vite__mapDeps([66,1,2,3,4,44,6,7,8,67,39,54,68,22,69,18,25,26,14,27,28,70,33,30,58,59]))),rt=(0,X.lazy)(()=>i(()=>import(`./Profile-qnuRN5Qv.js`),__vite__mapDeps([71,2,44,3,45,4,6,9,11,12,14,72,17,47,73,7,28,29,51,30,40,48,49,50,52,58]))),it=(0,X.lazy)(()=>i(()=>import(`./Users-CQNcXLyV.js`),__vite__mapDeps([74,2,44,3,45,4,6,12,46,36,13,14,72,17,47,21,69,56,49,25,26,7,27,28,50,75,51,52]))),at=(0,X.lazy)(()=>i(()=>import(`./Settings-C3ad44vP.js`),__vite__mapDeps([76,2,3,4,6,8,15,38,69,48,30]))),ot=(0,X.lazy)(()=>i(()=>import(`./TaskExecutions-BeodRIz1.js`),__vite__mapDeps([77,1,2,3,4,44,6,8,46,36,37,62,54,68,26,7,14,27,28,42,70,33,30,58]))),st=(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-8 h-full min-h-[50vh]`,children:(0,Q.jsx)(`div`,{className:`w-8 h-8 rounded-full border-4 border-outline-variant/30 border-t-primary animate-spin`})});function $({children:e,roles:t}){let{user:n,isLoading:i}=j();return i?(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-surface`,children:(0,Q.jsx)(`div`,{className:`w-12 h-12 rounded-full border-4 border-outline-variant/30 border-t-primary animate-spin`})}):n?t&&!t.includes(n.role||``)?(0,Q.jsx)(r,{to:`/`,replace:!0}):(0,Q.jsx)(Q.Fragment,{children:e}):(0,Q.jsx)(r,{to:`/login`,replace:!0})}function ct(){return(0,Q.jsx)(P,{title:`The app shell crashed`,description:`A rendering error escaped the route tree. Retry to recover the application shell.`,children:(0,Q.jsxs)(He,{children:[(0,Q.jsx)(qe,{}),(0,Q.jsx)(Ge,{children:(0,Q.jsx)(l,{children:(0,Q.jsxs)(o,{children:[(0,Q.jsx)(n,{path:`/login`,element:(0,Q.jsx)(P,{title:`Unable to render login`,children:(0,Q.jsx)(Je,{})})}),(0,Q.jsx)(n,{path:`/register`,element:(0,Q.jsx)(P,{title:`Unable to render registration`,children:(0,Q.jsx)(Ye,{})})}),(0,Q.jsx)(n,{path:`/*`,element:(0,Q.jsx)($,{children:(0,Q.jsx)(We,{children:(0,Q.jsx)(Ve,{children:(0,Q.jsx)(X.Suspense,{fallback:st,children:(0,Q.jsxs)(o,{children:[(0,Q.jsx)(n,{path:`/`,element:(0,Q.jsx)(P,{title:`Unable to render task manager`,children:(0,Q.jsx)($e,{})})}),(0,Q.jsx)(n,{path:`/projects/:projectId/tasks/:taskId`,element:(0,Q.jsx)(P,{title:`Unable to render task detail`,children:(0,Q.jsx)(et,{})})}),(0,Q.jsx)(n,{path:`/projects/:projectId`,element:(0,Q.jsx)(P,{title:`Unable to render project detail`,children:(0,Q.jsx)(tt,{})})}),(0,Q.jsx)(n,{path:`/agents`,element:(0,Q.jsx)(P,{title:`Unable to render agents`,children:(0,Q.jsx)(Xe,{})})}),(0,Q.jsx)(n,{path:`/providers`,element:(0,Q.jsx)(P,{title:`Unable to render providers`,children:(0,Q.jsx)(Ze,{})})}),(0,Q.jsx)(n,{path:`/scheduler`,element:(0,Q.jsx)(P,{title:`Unable to render scheduler`,children:(0,Q.jsx)(nt,{})})}),(0,Q.jsx)(n,{path:`/scheduler/tasks/:taskId/executions`,element:(0,Q.jsx)(P,{title:`Unable to render task executions`,children:(0,Q.jsx)(ot,{})})}),(0,Q.jsx)(n,{path:`/profile`,element:(0,Q.jsx)(P,{title:`Unable to render profile`,children:(0,Q.jsx)(rt,{})})}),(0,Q.jsx)(n,{path:`/users`,element:(0,Q.jsx)(P,{title:`Unable to render users`,children:(0,Q.jsx)(it,{})})}),(0,Q.jsx)(n,{path:`/settings`,element:(0,Q.jsx)(P,{title:`Unable to render settings`,children:(0,Q.jsx)($,{roles:[`admin`],children:(0,Q.jsx)(at,{})})})}),(0,Q.jsx)(n,{path:`/users/:id`,element:(0,Q.jsx)(P,{title:`Unable to render user details`,children:(0,Q.jsx)($,{roles:[`admin`],children:(0,Q.jsx)(Qe,{})})})}),(0,Q.jsx)(n,{path:`*`,element:(0,Q.jsx)(r,{to:`/`,replace:!0})})]})})})})})})]})})}),(0,Q.jsx)(Ke,{})]})})}var lt=new Pe({defaultOptions:{queries:{retry:1,staleTime:3e4,refetchOnWindowFocus:!1},mutations:{retry:0}}});(0,Fe.createRoot)(document.getElementById(`root`)).render((0,Q.jsx)(X.StrictMode,{children:(0,Q.jsx)(ce,{client:lt,children:(0,Q.jsx)(ct,{})})}));
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Agent Orchestrator | Secure Gateway</title>
8
8
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
9
- <script type="module" crossorigin src="/assets/index-VNAG8cJ1.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-BvUv9Lzq.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-COnpUsM8.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-dnd-CfaHPvi0.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/vendor-markdown-DoJbQ1of.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinhosilva/agent-orchestrator",
3
- "version": "1.1.0-alpha.1",
3
+ "version": "1.1.1",
4
4
  "description": "An open-source AI agent orchestrator platform built with NestJS.",
5
5
  "author": "bpinhosilva",
6
6
  "license": "MIT",